00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _MGUIDEFS_H
00009 #define _MGUIDEFS_H
00010
00011 #define MGUI_RELEASE 0x411
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined DJGPP_MGUI && !defined X11_MGUI && !defined BC_MGUI && !defined WIN_MGUI && !defined WGRX_MGUI && !defined W4GW_MGUI
00023 #if defined __TURBOC__
00024 #if defined __DPMI32__
00025 #define BGI_MGUI
00026 #elif defined __DPMI16__
00027 #define BGI_MGUI
00028 #elif defined _Windows
00029 #define WIN_MGUI
00030 #if defined __WIN32__ && !defined WIN32
00031 #define WIN32
00032 #endif
00033 #else
00034 #define BGI_MGUI
00035 #define BC_MGUI
00036 #endif
00037 #elif defined __CYGWIN32__
00038 #define WIN_MGUI
00039 #define WIN32
00040 #define __WIN32__
00041 #define __GNUWIN32__
00042 #elif defined __MINGW32__
00043 #define WIN_MGUI
00044 #if !defined WIN32
00045 #define WIN32
00046 #endif
00047 #define __GNUWIN32__
00048 #elif defined __LCC__
00049 #define WIN_MGUI
00050 #define __WIN32__
00051 #elif defined __RSXNT__
00052 #define WIN_MGUI
00053 #define WIN32
00054 #define __GNUWIN32__
00055 #elif defined __GO32__
00056 #if defined __WIN32__
00057 #ifndef WIN32
00058 #define WIN32
00059 #endif
00060 #define WIN_MGUI
00061 #else
00062 #define DJGPP_MGUI
00063 #define LIBGRX
00064 #endif
00065 #elif defined _WINDOWS
00066 #define WIN_MGUI
00067 #ifdef _WINNT
00068 #define __WIN32__
00069 #endif
00070 #elif defined __WATCOMC__
00071 #ifdef __NT__
00072 #define __WIN32__
00073 #define WIN_MGUI
00074 #elif defined __WINDOWS__
00075 #define WIN_MGUI
00076 #elif defined LIBGRX
00077 #define WGRX_MGUI
00078 #elif defined METAWINDOW
00079 #define WMW_MGUI
00080 #else
00081 #define W4GW_MGUI
00082 #endif
00083 #else
00084 #ifndef LIBGRX
00085 #define X11_MGUI
00086 #endif
00087 #define UNIX
00088 #endif
00089 #endif
00090
00091 #if defined __TURBOC__ || defined _MSC_VER || defined __WATCOMC__ || defined __LCC__
00092 #include <time.h>
00093 #elif !defined WIN_MGUI
00094 #include <sys/time.h>
00095 #endif
00096
00097
00098
00099
00100 #include "keycodes.h"
00101
00102 #ifdef UNIX
00103 #define DIR_SEP '/'
00104 #else
00105 #define DIR_SEP '\\'
00106 #endif
00107
00108 #if defined __GNUC__ && !defined WIN32
00109 #define stricmp strcasecmp
00110 #endif
00111
00126 struct MPOINT {
00127 #if defined X11_MGUI
00128 short x;
00129 short y;
00130 #else
00131 int x;
00132 int y;
00133 #endif
00134 };
00135 typedef struct MPOINT MPOINT;
00136
00137
00138
00139
00140 #ifdef X11_MGUI
00141 #include "X11/X.h"
00142 #include <X11/Xmd.h>
00143 #else
00144 #if !defined _BASETSD_H_ && !defined _BASETSD_H
00145 typedef long INT32;
00146 #endif
00147 typedef short INT16;
00148 typedef char INT8;
00149 typedef unsigned long CARD32;
00150 typedef unsigned short CARD16;
00151 typedef unsigned char CARD8;
00152 #endif
00153
00157 typedef int MTFont;
00158
00162 typedef int MTCursor;
00163
00165 typedef CARD32 MTColor;
00166
00167
00168 #define NOCOLOR ((MTColor)~0)
00169
00170 #if !defined _MGUI_OBJECT_H
00171
00174 typedef void *MOBJECT;
00175
00176 #endif
00177
00179 struct MRECT {
00180 int x;
00181 int y;
00182 int w;
00183 int h;
00184 };
00185 typedef struct MRECT MRECT;
00186
00188 struct RLIST {
00189 MRECT r;
00190 struct RLIST *next;
00191 };
00192 typedef struct RLIST RLIST;
00193
00194
00195
00196
00197
00198 #if !defined(X11_MGUI) && !defined(WIN_MGUI)
00199
00200
00201 struct _Window { MRECT r; RLIST *rl; };
00202
00203
00204 typedef struct _Window *Window;
00205
00206 #elif defined WIN_MGUI
00207
00208
00209 typedef void *Window;
00210
00211 #endif
00212
00213
00214
00215 #ifndef True
00216
00217 #define True 1
00218 #define False 0
00219
00220 #endif
00221
00235
00236 #define CS_LIGHTER 140
00237
00238 #define CS_DARKER 60
00239
00240 #define CS_DARK 85
00241
00242 #define CS_LIGHT 115
00243
00244
00251 #define E_NO_EVENT 0
00252 #define E_KEY_PRESS 1
00253 #define E_BUTTON_PRESS 2
00254 #define E_BUTTON_RELEASE 3
00255 #define E_MOTION 4
00256 #define E_WINDOW_ENTER 5
00257 #define E_WINDOW_EXIT 6
00258 #define E_EXPOSE 7
00259 #define E_DESTROY 8
00260 #define E_MAP 9
00261 #define E_UNMAP 10
00262 #define E_AUTOSIZE 11
00263 #define E_RESIZE 12
00264 #define E_MOVE 13
00265 #define E_SELECT 14
00266 #define E_DESELECT 15
00267 #define E_CONFIGURE 16
00268 #define E_PARENT_MAP 17
00269 #define E_PARENT_UNMAP 18
00270 #define E_SET_COLOR 19
00271 #define E_SET_SHADOW 20
00272 #define E_SET_TEXT 21
00273 #define E_GET_TEXT 22
00274 #define E_WM_CLOSE 23
00275 #define E_SET_SENS 24
00276 #define E_SET_PARENT_SENS 25
00277 #define E_GRAB_LOSE 26
00278 #define E_SET_BG_IMAGE 27
00279 #define E_MOUSE_WHEEL 28
00280 #define E_SET_TRANSPARENCY 29
00281 #define E_PARENT_CHANGED 30
00282
00283
00292 #define EM_NO_EVENT 0L
00293 #define EM_KEY_PRESS 1L
00294 #define EM_BUTTON_PRESS (1L<<1)
00295 #define EM_BUTTON_RELEASE (1L<<2)
00296 #define EM_MOTION (1L<<3)
00297 #define EM_WINDOW_ENTER (1L<<4)
00298 #define EM_WINDOW_EXIT (1L<<5)
00299 #define EM_EXPOSE (1L<<6)
00300 #define EM_DESTROY (1L<<7)
00301 #define EM_MAP (1L<<8)
00302 #define EM_UNMAP (1L<<9)
00303 #define EM_AUTOSIZE (1L<<10)
00304 #define EM_RESIZE (1L<<11)
00305 #define EM_MOVE (1L<<12)
00306 #define EM_SELECT (1L<<13)
00307 #define EM_DESELECT (1L<<14)
00308 #define EM_CONFIGURE (1L<<15)
00309 #define EM_PARENT_MAP (1L<<16)
00310 #define EM_PARENT_UNMAP (1L<<17)
00311 #define EM_SET_COLOR (1L<<18)
00312 #define EM_SET_SHADOW (1L<<19)
00313 #define EM_SET_TEXT (1L<<20)
00314 #define EM_GET_TEXT (1L<<21)
00315 #define EM_WM_CLOSE (1L<<22)
00316 #define EM_SET_SENS (1L<<23)
00317 #define EM_SET_PARENT_SENS (1L<<24)
00318 #define EM_GRAB_LOSE (1L<<25)
00319 #define EM_SET_BG_IMAGE (1L<<26)
00320 #define EM_MOUSE_WHEEL (1L<<27)
00321 #define EM_SET_TRANSPARENCY (1L<<28)
00322 #define EM_PARENT_CHANGED (1L<<29)
00323
00324
00325 #if !defined X11_MGUI || defined DOXYGEN
00326
00333 #define Button1Mask (1<<8)
00334 #define Button2Mask (1<<9)
00335 #define Button3Mask (1<<10)
00336
00337
00346 #define Button1 1
00347 #define Button2 2
00348 #define Button3 3
00349
00350
00359 #define ShiftMask (1<<0)
00360 #define LockMask (1<<1)
00361 #define ControlMask (1<<2)
00362 #ifdef DOXYGEN
00363 #define AltMask (1<<3)
00364 #endif
00365
00366
00367 #endif
00368
00369 #define AltMask (1<<3)
00370
00374 #if defined BC_MGUI || defined __DPMI16__ || defined WIN_MGUI && !defined __WIN32__ && !defined _MSC_VER
00375 typedef unsigned char huge *IMAGE_DATA;
00376 #else
00377 typedef unsigned char *IMAGE_DATA;
00378 #endif
00379
00387 struct IMAGE_CMAP {
00389 unsigned char blue;
00391 unsigned char green;
00393 unsigned char red;
00400 unsigned char index;
00401 };
00402 typedef struct IMAGE_CMAP IMAGE_CMAP;
00403
00413 struct MIMAGE_DESCR {
00416 unsigned int installed;
00418 unsigned int ncolors;
00420 unsigned int nplanes;
00422 unsigned int img_w;
00424 unsigned int img_h;
00426 unsigned int row_w;
00428 CARD32 pixmap_id;
00430 IMAGE_CMAP *colormap;
00432 IMAGE_DATA data;
00434 IMAGE_DATA backup_data;
00436 IMAGE_DATA alpha;
00438 char *fname;
00440 struct MIMAGE_DESCR *mask;
00442 CARD32 flags;
00443 };
00444 typedef struct MIMAGE_DESCR MIMAGE_DESCR;
00445
00446 typedef MIMAGE_DESCR *MIMAGE;
00447
00479
00487 struct MAnyWindowEvent {
00489 int type;
00491 Window window;
00492 };
00493 typedef struct MAnyWindowEvent MAnyWindowEvent;
00494
00509 struct MKeyEvent {
00511 int type;
00513 Window window;
00515 unsigned int state;
00517 unsigned int keycode;
00518 };
00519 typedef struct MKeyEvent MKeyEvent;
00527 typedef MAnyWindowEvent MWMCloseEvent;
00528
00538 typedef MAnyWindowEvent MFocusEvent;
00539
00550 typedef MAnyWindowEvent MUnmapEvent;
00551
00562 typedef MAnyWindowEvent MMapEvent;
00563
00564
00565
00566
00567
00568
00569
00570 typedef MAnyWindowEvent MSelectEvent;
00571
00572
00573
00574
00575
00576
00577
00578 typedef MAnyWindowEvent MDeSelectEvent;
00579
00586 struct MMouseEvent {
00588 int type;
00590 Window window;
00592 int x, y;
00594 int x_root, y_root;
00596 unsigned int state;
00598 unsigned int button;
00600 int scroll_delta;
00601 };
00602 typedef struct MMouseEvent MMouseEvent;
00603
00614 struct MExposeEvent {
00616 int type;
00618 Window window;
00620 int x_off, y_off;
00622 int x, y;
00624 int width, height;
00626 int parent_drawn;
00627 };
00628 typedef struct MExposeEvent MExposeEvent;
00629
00640 struct MResizeEvent{
00642 int type;
00644 Window window;
00646 int width, height;
00647 };
00648 typedef struct MResizeEvent MResizeEvent;
00649
00659 typedef struct {
00661 int type;
00663 Window window;
00665 int x, y;
00667 int x_off, y_off;
00669 int width, height;
00670 } MConfigureEvent;
00671
00681 typedef struct {
00683 int type;
00685 Window window;
00687 int x, y;
00688 } MMoveEvent;
00689
00690
00691
00705 typedef struct {
00707 int type;
00709 int sensitive;
00710 } MSetSensitivity;
00711
00720 typedef struct {
00722 int type;
00724 char *text;
00725 } MSetGetTextEvent;
00726
00738 typedef struct {
00740 int type;
00742 MTColor bgc;
00744 MTColor fgc;
00745 } MSetColorEvent;
00746
00755 typedef struct {
00757 int type;
00759 int shadow;
00761 int in_thick;
00763 int out_thick;
00764 } MSetShadowEvent;
00765
00775 typedef struct {
00777 int type;
00779 MIMAGE img;
00781 CARD8 mode;
00782 } MSetBGImageEvent;
00783
00793 typedef struct {
00795 int type;
00797 CARD8 level;
00798 } MSetTransparencyEvent;
00799
00804 union MEvent {
00805 int type;
00806 MAnyWindowEvent any_window_event;
00807 MKeyEvent key;
00808 MMouseEvent mouse;
00809 MExposeEvent expose;
00810 MWMCloseEvent wm_close;
00811 MFocusEvent focus;
00812 MUnmapEvent unmap;
00813 MMapEvent map;
00814 MConfigureEvent configure;
00815 MResizeEvent resize;
00816 MMoveEvent move;
00817 MSetColorEvent setcolor;
00818 MSetShadowEvent setshadow;
00819 MSetGetTextEvent setgettext;
00820 MSetSensitivity setsensitivity;
00821 MSetBGImageEvent setbgimage;
00822 MSetTransparencyEvent settransparency;
00823 };
00824 typedef union MEvent MEvent;
00826
00827
00836 #define MC_NONE (MTCursor)0
00837 #define MC_UL_ARROW (MTCursor)1
00838 #define MC_CROSSHAIR (MTCursor)2
00839 #define MC_HOURGLASS (MTCursor)3
00840 #define MC_HSIZE (MTCursor)4
00841 #define MC_VSIZE (MTCursor)5
00842 #define MC_NWSIZE (MTCursor)6
00843 #define MC_NESIZE (MTCursor)7
00844
00845
00853 #define DEFAULT_FONT 0
00854 #define FIXED_SMALL 1
00855 #define FIXED_MEDIUM 2
00856 #define FIXED_LARGE 3
00857 #define HELV_SMALL 4
00858 #define HELV_MEDIUM 5
00859 #define TIMES_SMALL 6
00860 #define TIMES_MEDIUM 7
00861 #define HELV_LARGE 8
00862 #define TIMES_LARGE 9
00863
00864
00869 #define SMALL_FONT FIXED_SMALL
00870 #define MEDIUM_FONT FIXED_MEDIUM
00871 #define LARGE_FONT FIXED_LARGE
00872 #define TIMES_N_FONT TIMES_SMALL
00873 #define TIMES_L_FONT TIMES_MEDIUM
00874 #define HELV_N_FONT HELV_SMALL
00875 #define HELV_L_FONT HELV_MEDIUM
00876
00891 #define LEFT_ALIGN 0
00892 #define RIGHT_ALIGN 1
00893 #define CENTER_ALIGN 2
00894 #define TOP_ALIGN 3
00895 #define BOTTOM_ALIGN 4
00896 #define UNDEF_ALIGN 0x3f
00897
00898
00904 #define MO_FONT 0x1
00905 #define MO_FGCOLOR 0x2
00906 #define MO_BGCOLOR 0x4
00907 #define MO_SHADOW 0x8
00908 #define MO_TEXT 0x10
00909 #define MO_BG_IMAGE 0x20
00910 #define MO_TRANSPARENCY 0x40
00911 #define MO_COLOR (MO_FGCOLOR|MO_BGCOLOR)
00912 #define MO_ALL 0x7f
00913
00914
00921 #define BI_TILED 0
00922 #define BI_CENTERED 1
00923 #define BI_SIZE_FORCING 2
00924
00925
00926
00932 #define WS_NONE 0
00933 #define WS_SHADOW_OUT 1
00934 #define WS_SHADOW_IN 2
00935 #define WS_ETCHED_IN 3
00936 #define WS_ETCHED_OUT 4
00937
00938
00939
00940
00941
00942
00943 #define WS_HATCHED_IN WS_ETCHED_IN
00944 #define WS_HATCHED_OUT WS_ETCHED_OUT
00945
00952 #define OT_SHELL 1
00953 #define OT_FORM 2
00954 #define OT_LABEL 3
00955 #define OT_PBUTTON 4
00956 #define OT_TBUTTON 5
00957 #define OT_RBUTTON 6
00958 #define OT_SCROLLBAR 7
00959 #define OT_EDIT 8
00960 #define OT_STATUSBAR 9
00961 #define OT_TEXT 10
00962 #define OT_SBLIST 11
00963 #define OT_MENUBAR 12
00964 #define OT_MENU 13
00965 #define OT_DRAWAREA 14
00966 #define OT_SPLITTER 15
00967
00968
00972 #ifdef _MGTREE_H
00973 typedef struct _mtnode *MTNODE;
00974 #else
00975 typedef void *MTNODE;
00976 #endif
00977
00978
00986 #define SF_NO_FOCUS_CHANGE 0x1
00987
00991 #define SF_SAVEUNDER 0x2
00992
00995 #define SF_MODAL 0x4
00996
00997 #define SF_POPUP 0x8
00998
01001 #define SF_IGNORE_WM_CLOSE 0x10
01002
01006 #define SF_UNMAP_ON_WM_CLOSE 0x20
01007
01008 #define SF_NO_CLOSE 0x40
01009
01010 #define SF_NO_MAXIMIZE 0x80
01011
01012 #define SF_NO_MINIMIZE 0x100
01013
01014 #define SF_NO_RESIZE 0x200
01015
01016 #define SF_NO_W_RESIZE 0x400
01017
01018 #define SF_NO_H_RESIZE 0x800
01019
01020
01027 #define DEF_POSITION -32768
01028
01029 #define DEF_SIZE -32768
01030
01031
01037 #define NF_CONTAINER 0x1
01038 #define NF_TOGGLE 0x2
01039
01040
01047 #define DBF_ALLOW_RENAME 0x1
01048
01049 #define DBF_ALLOW_CREATE 0x2
01050
01051 #define DBF_ALLOW_DELETE 0x4
01052
01053
01058 #define MSPOOL_OK 0
01059 #define MSPOOL_FULL_QUEUE -1
01060 #define MSPOOL_NOT_READY -2
01061 #define MSPOOL_FILE_ERR -3
01062
01063
01064
01065
01066 #define F_PREF_ATT_POS 0
01067 #define F_PREF_ATT_ROW 1
01068 #define F_PREF_ATT_COL 2
01069 #define F_PREF_ATT_TABLE 3
01070
01075 #define F_ATT_NONE 0
01076 #define F_ATT_FORM 1
01077 #define F_ATT_OBJ 2
01078
01079
01091 struct DRAWAREA_PREF {
01093 int old_w;
01095 int old_h;
01097 int new_w;
01099 int new_h;
01100 };
01101 typedef struct DRAWAREA_PREF DRAWAREA_PREF;
01102
01108 #define SBT_HOR 0
01109 #define SBT_VERT 1
01110
01111
01112
01113 #define SBLT_TEXT 0
01114 #define SBLT_LIST 1
01115 #define SBLT_ELIST 2
01116 #define SBLT_FILE 3
01117 #define SBL_ITEM_SELECTED 0x1L
01118 #define SBL_ITEM_CHECKED 0x2L
01119
01128 struct XL_ITEM {
01130 struct XL_ITEM *next;
01132 char *data;
01134 long misc;
01136 void *u_data;
01137 };
01138 typedef struct XL_ITEM XL_ITEM;
01139
01148 struct LIST_ACT {
01150 char *item;
01152 void *u_data;
01154 long pos;
01156 unsigned char selected;
01158 unsigned char checked;
01159 };
01160 typedef struct LIST_ACT LIST_ACT;
01161
01172 struct LIST_SEL {
01174 char *item;
01176 void *u_data;
01178 long pos;
01180 unsigned char selected;
01182 unsigned char checked;
01186 MEvent *pe;
01187 };
01188 typedef struct LIST_SEL LIST_SEL;
01189
01196 struct EL_TEMPLATE {
01198 char *head;
01200 short len;
01202 short vis_len;
01204 short changeable;
01206 MOBJECT edit;
01208 MOBJECT label;
01209 };
01210 typedef struct EL_TEMPLATE EL_TEMPLATE;
01211
01223 struct SBL_NEW_BLOCK {
01232 int from;
01234 long offset;
01236 int nc;
01242 int nr;
01244 XL_ITEM *pi;
01245 };
01246 typedef struct SBL_NEW_BLOCK SBL_NEW_BLOCK;
01247
01259 struct SBL_ITEM_SEEK {
01261 long pos;
01263 char *sub_item;
01264 };
01265 typedef struct SBL_ITEM_SEEK SBL_ITEM_SEEK;
01266
01270 #define XLItemCheck(pxl) ((pxl)->misc |= SBL_ITEM_CHECKED)
01271
01275 #define XLItemUncheck(pxl) ((pxl)->misc &= ~SBL_ITEM_CHECKED)
01276
01282 #define NOCHAR 0
01283 #define ANYCHAR 0x1
01284 #define ALPHA 0x2
01285 #define DIGIT 0x4
01286 #define SPACE 0x8
01287
01288
01289 #define SIGNED 0x100
01290 #define DOT 0x200
01291 #define UPPER 0x400
01292 #define LOWER 0x800
01293
01294
01295 #define ALPHANUM (ALPHA|DIGIT)
01296 #define UPALPHA (ALPHA|UPPER)
01297 #define LOWALPHA (ALPHA|LOWER)
01298 #define U_INT DIGIT
01299 #define S_INT (DIGIT|SIGNED)
01300 #define U_FLOAT (DIGIT|DOT)
01301 #define S_FLOAT (DIGIT|DOT|SIGNED)
01302
01303
01312 struct EDIT_CURS {
01314 int pos;
01316 int pos_x;
01318 int pos_y;
01319 };
01320 typedef struct EDIT_CURS EDIT_CURS;
01321
01330 struct EDIT_CHANGE {
01332 char *current_text;
01334 char *change;
01336 int pos;
01338 int len;
01340 int change_len;
01342 unsigned validate;
01344 unsigned exec;
01345 };
01346 typedef struct EDIT_CHANGE EDIT_CHANGE;
01347
01356 struct EDIT_VAL {
01358 char *text;
01360 short len;
01362 int key;
01364 unsigned focus_lost;
01366 unsigned focus_leave;
01368 unsigned text_changed;
01370 unsigned text_validated;
01371 };
01372 typedef struct EDIT_VAL EDIT_VAL;
01373
01378 #define SE_READ 0x1
01379 #define SE_WRITE 0x2
01380 #define SE_EXCP 0x4
01381
01382 typedef void (*SOCKET_CB)(int s, unsigned event, void *data);
01383
01384
01385
01386
01387 typedef void *MENU_ITEM;
01388
01389
01390 typedef CARD32 TIMEOUT_ID;
01391 typedef INT32 MVALUE;
01392
01397 typedef void (*TIMEOUT_CB)(TIMEOUT_ID id, void *data);
01398 typedef int (*STRCMP_CB)(const char *, const char *);
01399
01400 #ifdef NO_MGUI_CB_PROTO
01401 typedef void (*MGUI_CB)();
01402 #else
01403 typedef void (*MGUI_CB)(MOBJECT obj, void *od, void *ad);
01404 #endif
01405
01406 #if defined UNIQUE_CB_PROTO || defined NO_MGUI_CB_PROTO
01407 typedef MGUI_CB OBJ_EVENT_CB;
01408 typedef MGUI_CB OBJ_STRING_CB;
01409 typedef MGUI_CB OBJ_VALUE_CB;
01410 typedef MGUI_CB WM_CLOSE_CB;
01411 typedef MGUI_CB NEW_BLOCK_CB;
01412 typedef MGUI_CB ITEM_SEEK_CB;
01413 typedef MGUI_CB EDIT_VAL_CB;
01414 typedef MGUI_CB EDIT_CURS_CB;
01415 typedef MGUI_CB EDIT_CHANGE_CB;
01416 typedef MGUI_CB LIST_ACT_CB;
01417 typedef MGUI_CB LIST_SEL_CB;
01418 typedef MGUI_CB DRAWAREA_PREF_CB;
01419 typedef MGUI_CB MENU_ITEM_CB;
01420 typedef MGUI_CB MTREE_NODE_CB;
01421 typedef MGUI_CB MTREE_POPUP_CB;
01422 #else
01423 typedef void (*OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad);
01424 typedef void (*OBJ_STRING_CB)(MOBJECT obj, char *str, void *ad);
01425 typedef void (*OBJ_VALUE_CB)(MOBJECT obj, MVALUE value, void *ad);
01426 typedef void (*WM_CLOSE_CB)(MOBJECT obj, void *odata, void *cdata);
01427 typedef void (*NEW_BLOCK_CB)(MOBJECT obj, SBL_NEW_BLOCK *nbs, void *ad);
01428 typedef void (*ITEM_SEEK_CB)(MOBJECT obj, SBL_ITEM_SEEK *iss, void *ad);
01429 typedef void (*EDIT_VAL_CB)(MOBJECT edit, EDIT_VAL *ev, void *ad);
01430 typedef void (*EDIT_CURS_CB)(MOBJECT edit, EDIT_CURS *ev, void *ad);
01431 typedef void (*EDIT_CHANGE_CB)(MOBJECT edit, EDIT_CHANGE *ec, void *ad);
01432 typedef void (*LIST_ACT_CB)(MOBJECT list, LIST_ACT *la, void *ad);
01433 typedef void (*LIST_SEL_CB)(MOBJECT list, LIST_SEL *la, void *ad);
01434 typedef void (*DRAWAREA_PREF_CB)(MOBJECT drawa, DRAWAREA_PREF *dp, void *ad);
01435 typedef void (*MENU_ITEM_CB)(MENU_ITEM item, MVALUE status, void *ad);
01436 typedef void (*MTREE_NODE_CB)(MTNODE node, void *ad);
01437 typedef void (*MTREE_POPUP_CB)(MTNODE node, int mx, int my, void *ad);
01438 typedef int (*MTREE_NODE_RENAME_CB)(MTNODE node, const char *, void *ad);
01439 typedef int (*MTREE_NODE_DELETE_CB)(MTNODE node, void *ad);
01440 typedef void (*DB_DIR_CHANGE_CB)(MOBJECT, const char *, void *);
01441 typedef int (*DB_ACTION_CB)(MOBJECT, const char *, char *, void *);
01442 #endif
01443
01444
01449 struct FB_PREFS {
01452 CARD8 change_cwd;
01454 CARD8 allow_dir_create;
01457 CARD8 allow_dir_rename;
01460 CARD8 allow_dir_delete;
01462 CARD8 transparent_tree;
01464 MTFont font;
01466 MTFont button_font;
01468 const char *filter_label;
01470 const char *file_label;
01472 const char *ok_button;
01474 const char *close_button;
01476 const char *create_menu;
01478 const char *rename_menu;
01480 const char *remove_menu;
01482 MIMAGE bg_image;
01484 const char *bg_image_file;
01485 };
01486 typedef struct FB_PREFS FB_PREFS;
01487
01488
01489
01490
01491
01492 #ifdef WIN_MGUI
01493
01497 #define PM_FULL 0
01498 #define PM_MM 1
01499 #define PM_PIXEL 3
01500 #define PM_PERC 4
01501
01505 #define PO_DEFAULT 0
01506 #define PO_PORTRAIT 1
01507 #define PO_LANDSCAPE 2
01508
01509 typedef struct
01510 {
01511 int mode;
01512 int x;
01513 int y;
01514 int w;
01515 int h;
01516 } MPRINT_OPTIONS;
01517
01518 typedef struct
01519 {
01520 int startPage;
01521 int endPage;
01522 int minPage;
01523 int maxPage;
01524 } MPAGE_OPTIONS;
01525
01526 typedef void *DOC_ID;
01527
01528 #endif
01529 #endif