00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef OBJSTR_H
00018 #define OBJSTR_H
00019
00020 #include <commctrl.h>
00021
00022 #define MAX_TEXT 32000
00023
00024 #define OBJ_TYPE_NULL 0
00025 #define OBJ_TYPE_WINDOW 1
00026 #define OBJ_TYPE_TEXT 2
00027 #define OBJ_TYPE_EDIT_LINE 3
00028 #define OBJ_TYPE_EDIT_TEXT 4
00029 #define OBJ_TYPE_PUSHBUTTON 5
00030 #define OBJ_TYPE_MENU 6
00031 #define OBJ_TYPE_CHECK_BOX 7
00032 #define OBJ_TYPE_COMBO_BOX 8
00033 #define OBJ_TYPE_FONT 9
00034 #define OBJ_TYPE_RICH_TEXT 10
00035 #define OBJ_TYPE_BITMAP 11
00036 #define OBJ_TYPE_PUSH_BUTTON_BITMAP 12
00037 #define OBJ_TYPE_LIST_BOX 14
00038 #define OBJ_TYPE_MENU_ITEM 15
00039 #define OBJ_TYPE_CURSOR 16
00040 #define OBJ_TYPE_TREE 17
00041 #define OBJ_TYPE_LISTBITMAP 18
00042 #define OBJ_TYPE_LISTTAB 19
00043 #define OBJ_TYPE_HEADER 20
00044
00045
00046 #define WINDOW_MINIMIZED 1
00047 #define WINDOW_MAXIMIZED 2
00048 #define WINDOW_RESTORED 3
00049 #define WINDOW_HIDDEN 4
00050 #define WINDOW_UNHIDDEN 5
00051
00052
00053 #define WN_MINIMIZE (1<<0)
00054 #define WN_NOBORDER (1<<1)
00055 #define WN_NOCAPTION (1<<2)
00056 #define WN_NOCLIPCHILDREN (1<<3)
00057 #define WN_CHILD (1<<4)
00058 #define WN_ACTIVEX (1<<5)
00059 #define WN_MINBOX (1<<6)
00060 #define WN_SIZEBOX (1<<7)
00061 #define WN_MENU (1<<8)
00062 #define WN_NOCURSOR (1<<9)
00063 #define WN_NOFOCUS (1<<10)
00064 #define WN_DRAGDROP (1<<11)
00065 #define WN_CHILDMENU (1<<12)
00066 #define WN_HIDE (1<<13)
00067 #define WN_DIALOG (1<<14)
00068 #define WN_DOWN (1<<15)
00069 #define WN_GROUP (1<<16)
00070 #define WN_MAXBOX (1<<17)
00071 #define WN_MODAL (1<<18)
00072 #define WN_HSCROLL (1<<19)
00073 #define WN_VSCROLL (1<<20)
00074 #define WN_CHILDSCROLL (1<<21)
00075 #define WN_NOBACKGROUND (1<<22)
00076
00077 #define WN_NOSCOL (1<<24) // Same as in objstr.h under Lib_OS_2D_24
00078
00079 #define BUFFER_FLAG_DOWN 1
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 struct ObjVoid {
00091
00092 int Type ;
00093 int Father ;
00094 int Buffer ;
00095 int Tab ;
00096 } ;
00097
00098
00099 typedef struct ObjVoid *PtrObjVoid ;
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 #define OBJ_TYPE_NULL 0
00113
00114
00115 #define OBJ_MAX_TYPE 1
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 typedef unsigned char* OBJBITMAP_BUFFER;
00130
00131 struct ObjBitmap {
00132
00133 int PosX ;
00134 int PosY ;
00135 int TailleW ;
00136 int TailleH ;
00137 int BPP , BytesPP, BPL ;
00138 int Flags ;
00139 HWND WHandler ;
00140 int Couleurs ;
00141
00142 int handler;
00143 OBJBITMAP_BUFFER bits;
00144 PALETTEENTRY *table;
00145 HBITMAP DIBhandler;
00146 };
00147
00148 typedef struct ObjBitmap * PtrObjBitmap ;
00149
00150
00151
00152
00153
00154 extern PtrObjBitmap LIB2DtransBkg;
00155
00156
00157 struct Palette {
00158 unsigned char R [ 256 ] ;
00159 unsigned char G [ 256 ] ;
00160 unsigned char B [ 256 ] ;
00161 } ;
00162
00163 typedef struct Palette * PtrPalette ;
00164 #define GET_RED(pal,num) ((pal)->R[num])
00165 #define GET_GREEN(pal,num) ((pal)->G[num])
00166 #define GET_BLUE(pal,num) ((pal)->B[num])
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 struct ObjWindow {
00182
00183 int PosX ;
00184 int PosY ;
00185 int TailleW ;
00186 int TailleH ;
00187 int Flags ;
00188 HWND WHandler ;
00189 int MinW ;
00190 int MinH ;
00191 int MaxW ;
00192 int MaxH ;
00193 HWND Child ;
00194 HCURSOR Cursor ;
00195
00196
00197 unsigned char tSimulated;
00198 PtrObjBitmap tBuf ;
00199 PtrObjBitmap tBkg ;
00200 int tX, tY ;
00201 unsigned char tColorB ;
00202 unsigned char tColorG ;
00203 unsigned char tColorR ;
00204 unsigned char tfactor ;
00205 int tflags ;
00206
00207 };
00208
00209 typedef struct ObjWindow *PtrObjWindow ;
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222 struct ObjFont {
00223
00224 int Height ;
00225 int Direction ;
00226 int Flags ;
00227 HFONT WHandler ;
00228 } ;
00229
00230 typedef struct ObjFont * PtrObjFont ;
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 struct ObjCursor {
00244
00245 HCURSOR HCursor ;
00246 int X ;
00247 int Y ;
00248 } ;
00249
00250 typedef struct ObjCursor * PtrObjCursor ;
00251
00252
00253
00254
00255
00256
00257
00258
00259 #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
00260 #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
00261 #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
00262 #define SAFE_CLOSE_HANDLE(p) { if(p) { CloseHandle(p); (p)=NULL; } }
00263 #define SAFE_DELETE_BUFFER(p) { if(p) { if( (p)->buffer ) delete[] (p)->buffer; delete (p); (p)=NULL; } }
00264
00265 #endif
00266
00267