00001 00011 #ifndef OBJSTR_H 00012 #define OBJSTR_H 00013 00014 #include <windows.h> 00015 00016 00017 00018 00019 #define OBJ_TYPE_NULL 0 00020 #define OBJ_TYPE_WINDOW 1 00021 #define OBJ_TYPE_TEXT 2 00022 #define OBJ_TYPE_EDIT_LINE 3 00023 #define OBJ_TYPE_EDIT_TEXT 4 00024 #define OBJ_TYPE_PUSHBUTTON 5 00025 #define OBJ_TYPE_MENU 6 00026 #define OBJ_TYPE_CHECK_BOX 7 00027 #define OBJ_TYPE_COMBO_BOX 8 00028 #define OBJ_TYPE_FONT 9 00029 #define OBJ_TYPE_RICH_TEXT 10 00030 #define OBJ_TYPE_BITMAP 11 00031 #define OBJ_TYPE_PUSH_BUTTON_BITMAP 12 00032 #define OBJ_TYPE_LIST_BOX 14 00033 #define OBJ_TYPE_MENU_ITEM 15 00034 #define OBJ_TYPE_CURSOR 16 00035 #define OBJ_TYPE_TREE 17 00036 #define OBJ_TYPE_LISTBITMAP 18 00037 #define OBJ_TYPE_LISTTAB 19 00038 #define OBJ_TYPE_HEADER 20 00039 00040 /* definition des constantes d'etat de la fenetre */ 00041 #define WINDOW_MINIMIZED 1 00042 #define WINDOW_MAXIMIZED 2 00043 #define WINDOW_RESTORED 3 00044 #define WINDOW_HIDDEN 4 00045 #define WINDOW_UNHIDDEN 5 00046 00047 /* definition des constantes de creation des 'fenetres 2d' */ 00048 #define WN_MINIMIZE (1<<0) 00049 #define WN_NOBORDER (1<<1) 00050 #define WN_NOCAPTION (1<<2) 00051 #define WN_NOCLIPCHILDREN (1<<3) 00052 #define WN_CHILD (1<<4) 00053 #define WN_ACTIVEX (1<<5) 00054 #define WN_MINBOX (1<<6) 00055 #define WN_SIZEBOX (1<<7) 00056 #define WN_MENU (1<<8) 00057 #define WN_NOCURSOR (1<<9) 00058 #define WN_NOFOCUS (1<<10) 00059 #define WN_DRAGDROP (1<<11) 00060 #define WN_CHILDMENU (1<<12) 00061 #define WN_HIDE (1<<13) 00062 #define WN_DIALOG (1<<14) 00063 #define WN_DOWN (1<<15) 00064 #define WN_GROUP (1<<16) 00065 #define WN_MAXBOX (1<<17) 00066 #define WN_MODAL (1<<18) 00067 #define WN_HSCROLL (1<<19) 00068 #define WN_VSCROLL (1<<20) 00069 #define WN_CHILDSCROLL (1<<21) 00070 #define WN_NOBACKGROUND (1<<22) 00071 //$BLG - v4.6a4 00072 #define WN_NOSCOL (1<<24) // Same as in objstr.h under Lib_OS_2D_24 00073 00074 /****************************************************************************************/ 00075 /* */ 00076 /* Structure ObjVoid : structure de base, commune a tout les objets */ 00077 /* */ 00078 /****************************************************************************************/ 00079 00080 struct ObjVoid { 00081 00082 int Type ; /* le type d'objet , voir plus bas */ 00083 int Father ; /* le pointeur magma sur le pere */ 00084 int Buffer ; /* donnee de type TYPEBUF */ 00085 int Tab ; /* donnee de type TYPETAB */ 00086 } ; 00087 00088 00089 typedef struct ObjVoid *PtrObjVoid ; 00090 00091 00092 00093 00094 /****************************************************************************************/ 00095 /* */ 00096 /* Structure for bitmap type */ 00097 /* */ 00098 /****************************************************************************************/ 00099 00100 //$ LB (13/06/2002) : changed the objbitmap struct to manage the GDI problem. 00101 //$ LB (12/07/2003) : 16 bits to 24 bits 00102 00103 00104 typedef unsigned char* OBJBITMAP_BUFFER; 00105 00106 struct ObjBitmap { 00107 00108 int PosX ; 00109 int PosY ; 00110 int TailleW ; 00111 int TailleH ; 00112 int BPP , BytesPP, BPL ; 00113 int Flags ; 00114 HWND WHandler ; 00115 int Couleurs ; /* nombre de couleur */ 00116 00117 int handler; // new global handler 00118 OBJBITMAP_BUFFER bits; // bitmap buffer 00119 PALETTEENTRY *table; // table of colors 00120 HBITMAP DIBhandler; // handler of the DIBSection 00121 }; 00122 00123 typedef struct ObjBitmap * PtrObjBitmap ; 00124 00125 00126 00127 00128 //$LB (16/12/2003) 00129 extern PtrObjBitmap LIB2DtransBkg; /* background bitmap for simulated window transparency */ 00130 00131 00132 struct Palette { 00133 unsigned char R [ 256 ] ; 00134 unsigned char G [ 256 ] ; 00135 unsigned char B [ 256 ] ; 00136 } ; 00137 00138 typedef struct Palette * PtrPalette ; 00139 #define GET_RED(pal,num) ((pal)->R[num]) 00140 #define GET_GREEN(pal,num) ((pal)->G[num]) 00141 #define GET_BLUE(pal,num) ((pal)->B[num]) 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 /****************************************************************************************/ 00152 /* */ 00153 /* Structure ObjWindow : structure de donnees buffer d'un objet window */ 00154 /* */ 00155 /****************************************************************************************/ 00156 00157 //$LB (16/12/2003) : add a background bitmap to the ObjWindow struct, in order to simulate 00158 // the windows transparency (Win95, 98, Me). (WinXp, win2k : doesn't have to be 00159 // simulated). 00160 struct ObjWindow { 00161 00162 int PosX ; /* position X a l'ecran */ 00163 int PosY ; /* position Y a l'ecran */ 00164 int TailleW ; /* taille horizontale de la fenetre */ 00165 int TailleH ; /* tailel verticale de la fenetre */ 00166 int Flags ; /* flags de la fenetre */ 00167 HWND WHandler ; /* Handler Windows */ 00168 int MinW ; /* taille minimale horizontale de la fenetre */ 00169 int MinH ; /* taille minimale verticale de la fenetre */ 00170 int MaxW ; /* taille maximale horizontale de la fenetre */ 00171 int MaxH ; /* taille maximale verticale de la fenetre */ 00172 HWND Child ; /* fenetre fille pour le scrolling */ 00173 HCURSOR Cursor ; /* fenetre fille pour le scrolling */ 00174 00175 //$LB(16/12/2003) 00176 unsigned char tSimulated; /* 1 if simulated (Win95,98,ME,NT), */ 00177 PtrObjBitmap tBuf ; /* bitmap buffer for simulated transpary */ 00178 PtrObjBitmap tBkg ; /* point to LIB2DtransBkg */ 00179 int tX, tY ; /* <=> window coordinates <=> coordinates of the LIB2DtransBkg area to draw */ 00180 unsigned char tColorB ; /* transparency color R G B */ 00181 unsigned char tColorG ; 00182 unsigned char tColorR ; 00183 unsigned char tfactor ; /* alpha blending factor */ 00184 int tflags ; /* transparency flags : transparency color | alpha blending */ 00185 00186 }; 00187 00188 typedef struct ObjWindow *PtrObjWindow ; 00189 00190 00191 /****************************************************************************************/ 00192 /* */ 00193 /* Structure pour le type Font */ 00194 /* */ 00195 /****************************************************************************************/ 00196 00197 struct ObjFont { 00198 00199 int Height ; 00200 int Direction ; 00201 int Flags ; 00202 HFONT WHandler ; 00203 } ; 00204 00205 typedef struct ObjFont * PtrObjFont ; 00206 00207 00208 00209 00210 00211 00212 //$LB (11/11/2003) 00213 /****************************************************************************************/ 00214 /* */ 00215 /* Structure pour le type cursor */ 00216 /* */ 00217 /****************************************************************************************/ 00218 00219 struct ObjCursor { 00220 00221 HCURSOR HCursor ; 00222 int X ; 00223 int Y ; 00224 } ; 00225 00226 typedef struct ObjCursor * PtrObjCursor ; 00228 00229 00230 #endif
1.6.3