LibreOffice
LibreOffice 4.1 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
typedescription.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef _TYPELIB_TYPEDESCRIPTION_H_
20 #define _TYPELIB_TYPEDESCRIPTION_H_
21 
22 #include <cppu/cppudllapi.h>
23 #include <typelib/uik.h>
24 #include <typelib/typeclass.h>
25 #include <rtl/ustring.h>
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
33 
34 #if defined( SAL_W32)
35 #pragma pack(push, 8)
36 #endif
37 
41 {
45  sal_Int32 nRefCount;
49  sal_Int32 nStaticRefCount;
55  rtl_uString * pTypeName;
64  void * pReserved;
66 
72 {
76  sal_Int32 nRefCount;
80  sal_Int32 nStaticRefCount;
86  rtl_uString * pTypeName;
95  void * pReserved;
96 
105  sal_Int32 nSize;
108  sal_Int32 nAlignment;
116 
120 {
124 
128 
131  sal_Int32 nMembers;
134  sal_Int32 * pMemberOffsets;
140  rtl_uString ** ppMemberNames;
142 
153 {
158 
167 
171 {
175 
179 
188  sal_Int32 nMembers;
191  sal_Int64 * pDiscriminants;
197  rtl_uString ** ppMemberNames;
200  sal_Int32 nValueOffset;
202 
206 {
210 
215 
219 {
223 
226  sal_Int32 nDimensions;
229  sal_Int32 nTotalElements;
232  sal_Int32 * pDimensions;
234 
238 {
242 
245  sal_Int32 nDefaultEnumValue;
248  sal_Int32 nEnumValues;
251  rtl_uString ** ppEnumNames;
254  sal_Int32 * pEnumValues;
256 
260 {
263  rtl_uString * pName;
276 
281 {
285 
289  sal_Int32 nPosition;
292  rtl_uString * pMemberName;
294 
299 {
303 
309  sal_Int32 nParams;
315  sal_Int32 nExceptions;
322 
339  sal_Int32 nIndex;
341 
346 {
350 
357 
374  sal_Int32 nIndex;
379  sal_Int32 nGetExceptions;
389  sal_Int32 nSetExceptions;
396 
425 {
429 
441  sal_Int32 nMembers;
447  sal_Int32 nAllMembers;
465  sal_Int32 nBaseTypes;
472 
476 {
485  rtl_uString * pTypeName;
488  rtl_uString * pMemberName;
490 
497 {
502 
509 
513 {
519  rtl_uString * pTypeName;
522  rtl_uString * pParamName;
530 
533 typedef struct _typelib_Union_Init
534 {
537  sal_Int64 nDiscriminant;
540  rtl_uString * pMemberName;
545 
546 #if defined( SAL_W32)
547 #pragma pack(pop)
548 #endif
549 
550 
563  typelib_TypeDescription ** ppRet,
564  rtl_uString * pTypeName,
565  typelib_TypeDescriptionReference * pDiscriminantTypeRef,
566  sal_Int64 nDefaultDiscriminant,
567  typelib_TypeDescriptionReference * pDefaultTypeRef,
568  sal_Int32 nMembers,
569  typelib_Union_Init * pMembers )
571 
582  typelib_TypeDescription ** ppRet,
583  rtl_uString * pTypeName,
584  sal_Int32 nDefaultValue,
585  sal_Int32 nEnumValues,
586  rtl_uString ** ppEnumNames,
587  sal_Int32 * pEnumValues )
589 
598  typelib_TypeDescription ** ppRet,
599  typelib_TypeDescriptionReference * pElementTypeRef,
600  sal_Int32 nDimensions,
601  sal_Int32 * pDimensions )
603 
620  typelib_TypeDescription ** ppRet,
621  typelib_TypeClass eTypeClass,
622  rtl_uString * pTypeName,
624  sal_Int32 nMembers,
625  typelib_CompoundMember_Init * pMembers )
627 
639  typelib_TypeDescription ** ppRet,
640  rtl_uString * pTypeName,
642  sal_Int32 nMembers,
643  typelib_StructMember_Init * pMembers )
645 
664  rtl_uString * pTypeName,
665  sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5,
666  typelib_TypeDescriptionReference * pBaseInterface,
667  sal_Int32 nMembers,
668  typelib_TypeDescriptionReference ** ppMembers )
670 
689  rtl_uString * pTypeName,
690  sal_uInt32 nUik1, sal_uInt16 nUik2, sal_uInt16 nUik3, sal_uInt32 nUik4, sal_uInt32 nUik5,
691  sal_Int32 nBaseInterfaces,
692  typelib_TypeDescriptionReference ** ppBaseInterfaces,
693  sal_Int32 nMembers,
694  typelib_TypeDescriptionReference ** ppMembers )
696 
712  sal_Int32 nAbsolutePosition,
713  sal_Bool bOneWay,
714  rtl_uString * pMethodName,
715  typelib_TypeClass eReturnTypeClass,
716  rtl_uString * pReturnTypeName,
717  sal_Int32 nParams,
718  typelib_Parameter_Init * pParams,
719  sal_Int32 nExceptions,
720  rtl_uString ** ppExceptionNames )
722 
738  sal_Int32 nAbsolutePosition,
739  rtl_uString * pAttributeName,
740  typelib_TypeClass eAttributeTypeClass,
741  rtl_uString * pAttributeTypeName,
742  sal_Bool bReadOnly )
744 
764  sal_Int32 nAbsolutePosition,
765  rtl_uString * pAttributeName,
766  typelib_TypeClass eAttributeTypeClass,
767  rtl_uString * pAttributeTypeName,
768  sal_Bool bReadOnly,
769  sal_Int32 nGetExceptions, rtl_uString ** ppGetExceptionNames,
770  sal_Int32 nSetExceptions, rtl_uString ** ppSetExceptionNames )
772 
778  typelib_TypeDescription * pDesc )
780 
787  typelib_TypeDescription * pDesc )
789 
796  typelib_TypeDescription ** ppNewDescription )
798 
806  const typelib_TypeDescription * p1, const typelib_TypeDescription * p2 )
808 
815  typelib_TypeDescription ** ppRet, rtl_uString * pName )
817 
823  sal_Int32 nNewSize )
825 
833 typedef void (SAL_CALL * typelib_typedescription_Callback)(
834  void * pContext, typelib_TypeDescription ** ppRet, rtl_uString * pTypeName );
835 
842  void * pContext, typelib_typedescription_Callback pCallback )
844 
851  void * pContext, typelib_typedescription_Callback pCallback )
853 
854 
855 /*----------------------------------------------------------------------------*/
856 /*----------------------------------------------------------------------------*/
857 /*----------------------------------------------------------------------------*/
858 
860 
867 #define TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass ) \
868  ((eTypeClass) == typelib_TypeClass_INTERFACE_METHOD || \
869  (eTypeClass) == typelib_TypeClass_INTERFACE_ATTRIBUTE)
870 
875 #define TYPELIB_DANGER_GET( ppDescription, pTypeRef ) \
876 { \
877  typelib_TypeDescriptionReference * pMacroTypeRef = (pTypeRef); \
878  typelib_TypeDescription ** ppMacroTypeDescr = (ppDescription); \
879  if (TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( pMacroTypeRef->eTypeClass )) \
880  { \
881  typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef ); \
882  } \
883  else if (!pMacroTypeRef->pType || !pMacroTypeRef->pType->pWeakRef) \
884  { \
885  typelib_typedescriptionreference_getDescription( ppMacroTypeDescr, pMacroTypeRef ); \
886  if (*ppMacroTypeDescr) \
887  typelib_typedescription_release( *ppMacroTypeDescr ); \
888  } \
889  else \
890  { \
891  *ppMacroTypeDescr = pMacroTypeRef->pType; \
892  } \
893 }
894 
897 #define TYPELIB_DANGER_RELEASE( pDescription ) \
898 { \
899  if (TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( (pDescription)->eTypeClass )) \
900  typelib_typedescription_release( pDescription ); \
901 }
902 
904 
914  typelib_TypeClass eTypeClass,
915  rtl_uString * pTypeName )
917 
927  typelib_TypeClass eTypeClass,
928  const sal_Char * pTypeName )
930 
938 
947 
957 
967 
977 
985  typelib_TypeDescription * pAssignable,
986  typelib_TypeDescription * pFrom )
988 
996  typelib_TypeDescriptionReference * pAssignable,
999 
1010  typelib_TypeClass eTypeClass )
1012 
1021  typelib_TypeClass eTypeClass, const sal_Char * pTypeName )
1023 
1031  typelib_TypeDescriptionReference * pElementType )
1032  SAL_THROW_EXTERN_C ();
1033 
1043  typelib_TypeDescriptionReference * pElementType,
1044  sal_Int32 nDimensions, ... )
1045  SAL_THROW_EXTERN_C ();
1046 
1062  typelib_TypeClass eTypeClass, const sal_Char * pTypeName,
1064  sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers )
1066 
1083  typelib_TypeDescriptionReference ** ppRef, const sal_Char * pTypeName,
1085  sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers,
1086  sal_Bool const * pParameterizedTypes )
1087  SAL_THROW_EXTERN_C();
1088 
1097  const sal_Char * pTypeName,
1098  typelib_TypeDescriptionReference * pBaseType )
1099  SAL_THROW_EXTERN_C();
1100 
1113  const sal_Char * pTypeName,
1114  sal_Int32 nBaseTypes,
1115  typelib_TypeDescriptionReference ** ppBaseTypes )
1116  SAL_THROW_EXTERN_C();
1117 
1126  const sal_Char * pTypeName,
1127  sal_Int32 nDefaultValue )
1128  SAL_THROW_EXTERN_C();
1129 
1139  typelib_TypeDescription ** ppTypeDescr )
1140  SAL_THROW_EXTERN_C();
1141 
1142 #ifdef __cplusplus
1143 }
1144 #endif
1145 
1146 #endif
1147 
1148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */