xref: /aoo4110/main/rsc/inc/rscall.h (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _RSCALL_H
24 #define _RSCALL_H
25 
26 #include <tools/string.hxx>
27 #include <rsctools.hxx>
28 #include <rscerror.h>
29 #include <rscdef.hxx>
30 #include <rschash.hxx>
31 #include <rtl/alloc.h>
32 
33 /******************* T y p e s *******************************************/
34 typedef char * CLASS_DATA;	// Zeiger auf die Daten einer Klasse
35 
36 /******************* C l a s s e s	 F o r w a r d s *********************/
37 class RscCompiler;
38 class RscTop;
39 class RscTypCont;
40 class RscIncList;
41 
42 /******************* G l o b a l   V a r i a b l e s *********************/
43 extern ByteString*	pStdParType;
44 extern ByteString*	pStdPar1;
45 extern ByteString*	pStdPar2;
46 extern ByteString*	pWinParType;
47 extern ByteString*	pWinPar1;
48 extern ByteString*	pWinPar2;
49 extern sal_uInt32		nRefDeep;
50 extern sal_uInt32		nRsc_XYMAPMODEId;
51 extern sal_uInt32		nRsc_WHMAPMODEId;
52 extern sal_uInt32		nRsc_X;
53 extern sal_uInt32		nRsc_Y;
54 extern sal_uInt32		nRsc_WIDTH;
55 extern sal_uInt32		nRsc_HEIGHT;
56 extern sal_uInt32		nRsc_DELTALANG;
57 extern sal_uInt32		nRsc_DELTASYSTEM;
58 extern sal_uInt32		nRsc_EXTRADATA;
59 extern AtomContainer*   pHS;
60 
61 /******************* D e f i n e s ***************************************/
62 
63 #define HELP_FLAG		  0x0001  // Hilfe anzeigen
64 #define NOPREPRO_FLAG	  0x0002  // kein Preprozesor
65 #define NOSYNTAX_FLAG	  0x0004  // keine Syntaxanalyse
66 #define NOLINK_FLAG 	  0x0008  // nicht linken
67 #define NORESFILE_FLAG	  0x0010  // keine .res-Datei erzeugen
68 #define DEFINE_FLAG 	  0x0020  // es wurde Definitionen angegeben
69 #define INCLUDE_FLAG	  0x0040  // der Include-Pfad wurde erweitert
70 #define MSCPREPRO_FLAG	  0x0080  // spezial Preprozessor
71 #define PRINTSYNTAX_FLAG  0x0100  // Syntax ausgeben
72 #define PRELOAD_FLAG	  0x0200  // Alle Ressourcen Preloaden
73 #define SMART_FLAG		  0x0400  // abgekuertze Name
74 #define SRSDEFAULT_FLAG   0x1000  // immer der Default geschrieben
75 #define NOSYSRESTEST_FLAG 0x2000  // ueberprueft nicht die Richtigkeit von (bmp, ico, cur)
76 
77 
78 /******************* T y p e s *******************************************/
79 enum RSCCLASS_TYPE	{ RSCCLASS_BOOL, RSCCLASS_STRING, RSCCLASS_NUMBER,
80 						RSCCLASS_CONST, RSCCLASS_COMPLEX, RSCCLASS_ENUMARRAY };
81 
82 typedef void (* VarEnumCallbackProc)( void * pData, RSCCLASS_TYPE, Atom );
83 
84 /******************* S t r u c t s ***************************************/
85 struct RSCINST {
86 	RscTop *	pClass;
87 	CLASS_DATA	pData;
88 
RSCINSTRSCINST89 				RSCINST(){ pClass = NULL; pData = NULL; }
RSCINSTRSCINST90 				RSCINST( RscTop * pCl, CLASS_DATA pClassData ){
91 					pClass = pCl;
92 					pData = pClassData;
93 				}
IsInstRSCINST94 	sal_Bool		IsInst() const { return( pData != NULL ); }
95 };
96 
97 /********************** S U B I N F O S T R U C T ************************/
98 struct SUBINFO_STRUCT {
SUBINFO_STRUCTSUBINFO_STRUCT99 	SUBINFO_STRUCT(){ nPos = 0; pClass = NULL; };
100 	RscId	     aId;	 // Identifier der Resource
101 	sal_uInt32	 nPos;	 // Position der Resource
102 	RscTop *     pClass; // Klasse des Eintrages
103 };
104 
105 /******************* F u n c t i o n *************************************/
106 void InitRscCompiler();
107 
108 #endif // _RSCALL_H
109