DAS  3.1.6 - 18/09/2017
Mguidefs.h
Go to the documentation of this file.
1 /*
2  * This file is part of the MGUI (Morello Graphic User Interface)
3  * library. Copyright 1995-2003 Vincenzo Morello.
4  *
5  * Contains all MGUI macro definitions and typedefs
6  */
7 
8 #ifndef _MGUIDEFS_H
9 #define _MGUIDEFS_H
10 
11 #define MGUI_RELEASE 0x414
12 
13 /*
14  * Auto environment detection (if not set):
15  * BC_MGUI (DOS BGI), DJGPP_MGUI, W4GW_MGUI, WGRX_MGUI and WIN_MGUI
16  * (both 16 & 32 bit) are detected.
17  * WIN32 and __WIN32__ are set when compiling for Win32, Win 95 and NT.
18  * X11_MGUI is set by default. LIBGRX must be set to compile in LINUX
19  * console (svgalib)
20  */
21 
22 #if !defined DJGPP_MGUI && !defined X11_MGUI && !defined BC_MGUI && !defined WIN_MGUI && !defined WGRX_MGUI && !defined W4GW_MGUI
23  #if defined __TURBOC__
24  #if defined __DPMI32__
25  #define BGI_MGUI
26  #elif defined __DPMI16__
27  #define BGI_MGUI
28  #elif defined _Windows
29  #define WIN_MGUI
30  #if defined __WIN32__ && !defined WIN32
31  #define WIN32
32  #endif
33  #else
34  #define BGI_MGUI
35  #define BC_MGUI
36  #endif
37  #elif defined __CYGWIN32__
38  #define WIN_MGUI
39  #define WIN32
40  #define __WIN32__
41  #define __GNUWIN32__
42  #elif defined __MINGW32__
43  #define WIN_MGUI
44  #if !defined WIN32
45  #define WIN32
46  #endif
47  #define __GNUWIN32__
48  #elif defined __LCC__
49  #define WIN_MGUI
50  #define __WIN32__
51  #elif defined __RSXNT__
52  #define WIN_MGUI
53  #define WIN32
54  #define __GNUWIN32__
55  #elif defined __GO32__
56  #if defined __WIN32__
57  #ifndef WIN32
58  #define WIN32
59  #endif
60  #define WIN_MGUI
61  #else
62  #define DJGPP_MGUI
63  #define LIBGRX
64  #endif
65  #elif defined _WINDOWS
66  #define WIN_MGUI
67  #ifdef _WINNT
68  #define __WIN32__
69  #endif
70  #elif defined __WATCOMC__
71  #ifdef __NT__
72  #define __WIN32__
73  #define WIN_MGUI
74  #elif defined __WINDOWS__
75  #define WIN_MGUI
76  #elif defined LIBGRX
77  #define WGRX_MGUI
78  #elif defined METAWINDOW
79  #define WMW_MGUI
80  #else
81  #define W4GW_MGUI
82  #endif
83  #else
84  #ifndef LIBGRX
85  #define X11_MGUI
86  #endif
87  #define UNIX
88  #endif
89 #endif
90 
91 #if defined __TURBOC__ || defined _MSC_VER || defined __WATCOMC__ || defined __LCC__
92 #include <time.h>
93 #elif !defined WIN_MGUI
94 #include <sys/time.h>
95 #endif
96 
97 /*
98  * This include file contains key codes definition
99  */
100 #include "keycodes.h"
101 
102 #ifdef UNIX
103 #define DIR_SEP '/'
104 #else
105 #define DIR_SEP '\\'
106 #endif
107 
108 #if defined __GNUC__ && !defined WIN32
109 #define stricmp strcasecmp
110 #endif
111 
112 #ifdef DEBUG_MALLOC
113 #include <dmalloc.h>
114 #endif
115 
116 
126 
128 
133 
134 
144 struct MPOINT {
145 #if defined X11_MGUI
146  short x;
147  short y;
148 #else
149  int x; // point's x coordinate
150  int y; // point's y coordinate
151 #endif
152 };
153 typedef struct MPOINT MPOINT;
154 
155 /*
156  * Integer size typedefs
157  */
158 #ifdef X11_MGUI
159 #include "X11/X.h"
160 #include <X11/Xmd.h>
161 #else
162 #if !defined _BASETSD_H_ && !defined _BASETSD_H && !defined __basetsd_h__
163  typedef long INT32;
164 #endif
165  typedef short INT16;
166  typedef char INT8;
167  typedef unsigned long CARD32;
168  typedef unsigned short CARD16;
169  typedef unsigned char CARD8;
170 #endif /* X11_MGUI */
171 
175 typedef int MTFont;
176 
180 typedef int MTCursor;
181 
183 typedef CARD32 MTColor;
184 
185 /* Transparent color definition */
186 #define NOCOLOR ((MTColor)~0)
187 
188 #if !defined _MGUI_OBJECT_H
189 
192 typedef void *MOBJECT;
193 
194 #endif
195 
197 struct MRECT {
198  int x;
199  int y;
200  int w;
201  int h;
202 };
203 typedef struct MRECT MRECT;
204 
206 struct RLIST {
208  struct RLIST *next;
209 };
210 typedef struct RLIST RLIST;
211 
212 /*
213  * Window type definition.
214  * Window typedef form X11 is used as is (not redefined).
215  */
216 #if !defined(X11_MGUI) && !defined(WIN_MGUI)
217 
218 /* Window structure for DOS and Linux/console environments */
219 struct _Window { MRECT r; RLIST *rl; };
220 
221 /* Window identifier for DOS and Linux/console environments */
222 typedef struct _Window *Window;
223 
224 #elif defined WIN_MGUI
225 
226 /* Window identifier under Windows */
227 typedef void *Window;
228 
229 #endif
230 
231 
232 
233 #ifndef True
234 
235 #define True 1
236 #define False 0
237 
238 #endif
239 
240 
255 #define CS_LIGHTER 140
258 #define CS_DARKER 60
260 #define CS_DARK 85
262 #define CS_LIGHT 115
264 
273 #define E_NO_EVENT 0
274 #define E_KEY_PRESS 1
275 #define E_BUTTON_PRESS 2
276 #define E_BUTTON_RELEASE 3
277 #define E_MOTION 4
278 #define E_WINDOW_ENTER 5
279 #define E_WINDOW_EXIT 6
280 #define E_EXPOSE 7
281 #define E_DESTROY 8
282 #define E_MAP 9
283 #define E_UNMAP 10
284 #define E_AUTOSIZE 11
285 #define E_RESIZE 12
286 #define E_MOVE 13
287 #define E_SELECT 14
288 #define E_DESELECT 15
289 #define E_CONFIGURE 16
290 #define E_PARENT_MAP 17
291 #define E_PARENT_UNMAP 18
292 #define E_SET_COLOR 19
293 #define E_SET_SHADOW 20
294 #define E_SET_TEXT 21
295 #define E_GET_TEXT 22
296 #define E_WM_CLOSE 23
297 #define E_SET_SENS 24
298 #define E_SET_PARENT_SENS 25
299 #define E_GRAB_LOSE 26
300 #define E_SET_BG_IMAGE 27
301 #define E_MOUSE_WHEEL 28
302 #define E_SET_TRANSPARENCY 29
303 #define E_PARENT_CHANGED 30
304 
305 
315 #define EM_NO_EVENT 0L
316 #define EM_KEY_PRESS 1L
317 #define EM_BUTTON_PRESS (1L<<1)
318 #define EM_BUTTON_RELEASE (1L<<2)
319 #define EM_MOTION (1L<<3)
320 #define EM_WINDOW_ENTER (1L<<4)
321 #define EM_WINDOW_EXIT (1L<<5)
322 #define EM_EXPOSE (1L<<6)
323 #define EM_DESTROY (1L<<7)
324 #define EM_MAP (1L<<8)
325 #define EM_UNMAP (1L<<9)
326 #define EM_AUTOSIZE (1L<<10)
327 #define EM_RESIZE (1L<<11)
328 #define EM_MOVE (1L<<12)
329 #define EM_SELECT (1L<<13)
330 #define EM_DESELECT (1L<<14)
331 #define EM_CONFIGURE (1L<<15)
332 #define EM_PARENT_MAP (1L<<16)
333 #define EM_PARENT_UNMAP (1L<<17)
334 #define EM_SET_COLOR (1L<<18)
335 #define EM_SET_SHADOW (1L<<19)
336 #define EM_SET_TEXT (1L<<20)
337 #define EM_GET_TEXT (1L<<21)
338 #define EM_WM_CLOSE (1L<<22)
339 #define EM_SET_SENS (1L<<23)
340 #define EM_SET_PARENT_SENS (1L<<24)
341 #define EM_GRAB_LOSE (1L<<25)
342 #define EM_SET_BG_IMAGE (1L<<26)
343 #define EM_MOUSE_WHEEL (1L<<27)
344 #define EM_SET_TRANSPARENCY (1L<<28)
345 #define EM_PARENT_CHANGED (1L<<29)
346 
347 
348 #if !defined X11_MGUI || defined DOXYGEN
349 
356 #define Button1Mask (1<<8)
357 #define Button2Mask (1<<9)
358 #define Button3Mask (1<<10)
359 
360 
369 #define Button1 1
370 #define Button2 2
371 #define Button3 3
372 
373 
382 #define ShiftMask (1<<0)
383 #define LockMask (1<<1)
384 #define ControlMask (1<<2)
385 #ifdef DOXYGEN
386 #define AltMask (1<<3)
387 #endif
388 
389 
390 #endif
391 
392 #define AltMask (1<<3)
393 
397 #if defined BC_MGUI || defined __DPMI16__ || defined WIN_MGUI && !defined __WIN32__ && !defined _MSC_VER
398 typedef unsigned char huge *IMAGE_DATA;
399 #else
400 typedef unsigned char *IMAGE_DATA;
401 #endif
402 
410 struct IMAGE_CMAP {
412  unsigned char blue;
414  unsigned char green;
416  unsigned char red;
423  unsigned char index;
424 };
425 typedef struct IMAGE_CMAP IMAGE_CMAP;
426 
436 struct MIMAGE_DESCR {
439  unsigned int installed;
441  unsigned int ncolors;
443  unsigned int nplanes;
445  unsigned int img_w;
447  unsigned int img_h;
449  unsigned int row_w;
451  CARD32 pixmap_id;
461  char *fname;
465  CARD32 flags;
466 };
467 typedef struct MIMAGE_DESCR MIMAGE_DESCR;
468 
470 
473 
503 
513  int type;
515  Window window;
516 };
518 
533 struct MKeyEvent {
535  int type;
537  Window window;
539  unsigned int state;
541  unsigned int keycode;
542 };
543 typedef struct MKeyEvent MKeyEvent;
552 
563 
575 
587 
588 /*
589  * Input Focus Gaining Event.
590  * The Window Manager uses this event to notify the program that a given
591  * window is gaining the input focus. The same event is then propagated
592  * by the library to the MGui object actually gaining the keyboard focus.
593  */
595 
596 /*
597  * Input Focus Losing Event.
598  * The Window Manager uses this event to notify the program that a given
599  * window is losing the input focus. The same event is then propagated
600  * by the library to the MGui object actually gaining the keyboard focus.
601  */
603 
610 struct MMouseEvent {
612  int type;
614  Window window;
616  int x, y;
618  int x_root, y_root;
620  unsigned int state;
622  unsigned int button;
625 };
626 typedef struct MMouseEvent MMouseEvent;
627 
638 struct MExposeEvent {
640  int type;
642  Window window;
644  int x_off, y_off;
646  int x, y;
648  int width, height;
651 };
652 typedef struct MExposeEvent MExposeEvent;
653 
666  int type;
668  Window window;
670  int width, height;
671 };
672 typedef struct MResizeEvent MResizeEvent;
673 
683 typedef struct {
685  int type;
687  Window window;
689  int x, y;
691  int x_off, y_off;
693  int width, height;
695 
705 typedef struct {
707  int type;
709  Window window;
711  int x, y;
712 } MMoveEvent;
713 
714 /* misc events (related to Objects rather than windows). */
715 
729 typedef struct {
731  int type;
735 
744 typedef struct {
746  int type;
748  char *text;
750 
762 typedef struct {
764  int type;
770 
779 typedef struct {
781  int type;
783  int shadow;
785  int in_thick;
789 
799 typedef struct {
801  int type;
805  CARD8 mode;
807 
817 typedef struct {
819  int type;
821  CARD8 level;
823 
828 union MEvent {
829  int type;
847 };
848 typedef union MEvent MEvent;
850 
851 
860 #define MC_NONE (MTCursor)0
861 #define MC_UL_ARROW (MTCursor)1
862 #define MC_CROSSHAIR (MTCursor)2
863 #define MC_HOURGLASS (MTCursor)3
864 #define MC_HSIZE (MTCursor)4
865 #define MC_VSIZE (MTCursor)5
866 #define MC_NWSIZE (MTCursor)6
867 #define MC_NESIZE (MTCursor)7
868 
869 
877 #define DEFAULT_FONT 0
878 #define FIXED_SMALL 1
879 #define FIXED_MEDIUM 2
880 #define FIXED_LARGE 3
881 #define HELV_SMALL 4
882 #define HELV_MEDIUM 5
883 #define TIMES_SMALL 6
884 #define TIMES_MEDIUM 7
885 #define HELV_LARGE 8
886 #define TIMES_LARGE 9
887 
888 
893 #define SMALL_FONT FIXED_SMALL
894 #define MEDIUM_FONT FIXED_MEDIUM
895 #define LARGE_FONT FIXED_LARGE
896 #define TIMES_N_FONT TIMES_SMALL
897 #define TIMES_L_FONT TIMES_MEDIUM
898 #define HELV_N_FONT HELV_SMALL
899 #define HELV_L_FONT HELV_MEDIUM
900 
915 #define LEFT_ALIGN 0
916 #define RIGHT_ALIGN 1
917 #define CENTER_ALIGN 2
918 #define TOP_ALIGN 3
919 #define BOTTOM_ALIGN 4
920 #define UNDEF_ALIGN 0x3f
921 
922 
928 #define MO_FONT 0x1
929 #define MO_FGCOLOR 0x2
930 #define MO_BGCOLOR 0x4
931 #define MO_SHADOW 0x8
932 #define MO_TEXT 0x10
933 #define MO_BG_IMAGE 0x20
934 #define MO_TRANSPARENCY 0x40
935 #define MO_COLOR (MO_FGCOLOR|MO_BGCOLOR)
936 #define MO_ALL 0x7f
937 
938 
945 #define BI_TILED 0
946 #define BI_CENTERED 1
947 #define BI_SIZE_FORCING 2 /* Object size is forced to be equal to image size */
948 
949 
950 
956 #define WS_NONE 0
957 #define WS_SHADOW_OUT 1
958 #define WS_SHADOW_IN 2
959 #define WS_ETCHED_IN 3
960 #define WS_ETCHED_OUT 4
961 
962 
963 /*
964  * The following macros are present only for sources written for
965  * release 1.4.3 or earlier. Don't use in new sources!
966  */
967 #define WS_HATCHED_IN WS_ETCHED_IN
968 #define WS_HATCHED_OUT WS_ETCHED_OUT
969 
976 #define OT_SHELL 1
977 #define OT_FORM 2
978 #define OT_LABEL 3
979 #define OT_PBUTTON 4
980 #define OT_TBUTTON 5
981 #define OT_RBUTTON 6
982 #define OT_SCROLLBAR 7
983 #define OT_EDIT 8
984 #define OT_STATUSBAR 9
985 #define OT_TEXT 10
986 #define OT_SBLIST 11
987 #define OT_MENUBAR 12
988 #define OT_MENU 13
989 #define OT_DRAWAREA 14
990 #define OT_SPLITTER 15
991 
992 
996 #ifdef _MGTREE_H
997  typedef struct _mtnode *MTNODE;
998 #else
999  typedef void *MTNODE;
1000 #endif
1001 
1002 
1010 #define SF_NO_FOCUS_CHANGE 0x1
1011 
1015 #define SF_SAVEUNDER 0x2
1016 
1019 #define SF_MODAL 0x4
1020 
1021 #define SF_POPUP 0x8
1022 
1025 #define SF_IGNORE_WM_CLOSE 0x10
1026 
1030 #define SF_UNMAP_ON_WM_CLOSE 0x20
1031 
1032 #define SF_NO_CLOSE 0x40
1033 
1034 #define SF_NO_MAXIMIZE 0x80
1035 
1036 #define SF_NO_MINIMIZE 0x100
1037 
1038 #define SF_NO_RESIZE 0x200
1039 
1040 #define SF_NO_W_RESIZE 0x400
1041 
1042 #define SF_NO_H_RESIZE 0x800
1043 
1044 
1051 #define DEF_POSITION -32768
1052 /* Default width/height useable in MShellRealizeXYWH() */
1053 #define DEF_SIZE -32768
1054 
1055 
1061 #define NF_CONTAINER 0x1
1062 #define NF_TOGGLE 0x2
1063 
1064 
1065 
1066 
1073 #define DBF_ALLOW_RENAME 0x1
1074 
1075 #define DBF_ALLOW_CREATE 0x2
1076 
1077 #define DBF_ALLOW_DELETE 0x4
1078 
1079 
1085 #define MSPOOL_OK 0
1086 #define MSPOOL_FULL_QUEUE -1
1087 #define MSPOOL_NOT_READY -2
1088 #define MSPOOL_FILE_ERR -3
1089 
1090 
1096 #define F_PREF_ATT_POS 0
1097 #define F_PREF_ATT_ROW 1
1098 #define F_PREF_ATT_COL 2
1099 #define F_PREF_ATT_TABLE 3
1100 
1101 
1106 #define F_ATT_NONE 0
1107 #define F_ATT_FORM 1
1108 #define F_ATT_OBJ 2
1109 
1110 
1124  int old_w;
1126  int old_h;
1128  int new_w;
1130  int new_h;
1131 };
1133 
1139 #define SBT_HOR 0
1140 #define SBT_VERT 1
1141 
1142 
1143 /* SBLIST */
1144 #define SBLT_TEXT 0
1145 #define SBLT_LIST 1
1146 #define SBLT_ELIST 2
1147 #define SBLT_FILE 3
1148 #define SBL_ITEM_SELECTED 0x1L
1149 #define SBL_ITEM_CHECKED 0x2L
1150 
1159 struct XL_ITEM {
1161  struct XL_ITEM *next;
1163  char *data;
1165  long misc;
1167  void *u_data;
1168 };
1169 typedef struct XL_ITEM XL_ITEM;
1170 
1179 struct LIST_ACT {
1181  char *item;
1183  void *u_data;
1185  long pos;
1187  unsigned char selected;
1189  unsigned char checked;
1190 };
1191 typedef struct LIST_ACT LIST_ACT;
1192 
1203 struct LIST_SEL {
1205  char *item;
1207  void *u_data;
1209  long pos;
1211  unsigned char selected;
1213  unsigned char checked;
1218 };
1219 typedef struct LIST_SEL LIST_SEL;
1220 
1227 struct EL_TEMPLATE {
1229  char *head;
1231  short len;
1233  short vis_len;
1235  short changeable;
1240 };
1241 typedef struct EL_TEMPLATE EL_TEMPLATE;
1242 
1263  int from;
1265  long offset;
1267  int nc;
1273  int nr;
1276 };
1278 
1292  long pos;
1294  char *sub_item;
1295 };
1297 
1301 #define XLItemCheck(pxl) ((pxl)->misc |= SBL_ITEM_CHECKED)
1302 
1306 #define XLItemUncheck(pxl) ((pxl)->misc &= ~SBL_ITEM_CHECKED)
1307 
1313 #define NOCHAR 0
1314 #define ANYCHAR 0x1
1315 #define ALPHA 0x2
1316 #define DIGIT 0x4
1317 #define SPACE 0x8
1318 
1319 /* Basic EDIT filter modifiers */
1320 #define SIGNED 0x100
1321 #define DOT 0x200
1322 #define UPPER 0x400
1323 #define LOWER 0x800
1324 
1325 /* Composed EDIT filter values */
1326 #define ALPHANUM (ALPHA|DIGIT)
1327 #define UPALPHA (ALPHA|UPPER)
1328 #define LOWALPHA (ALPHA|LOWER)
1329 #define U_INT DIGIT
1330 #define S_INT (DIGIT|SIGNED)
1331 #define U_FLOAT (DIGIT|DOT)
1332 #define S_FLOAT (DIGIT|DOT|SIGNED)
1333 
1334 
1343 struct EDIT_CURS {
1345  int pos;
1347  int pos_x;
1349  int pos_y;
1350 };
1351 typedef struct EDIT_CURS EDIT_CURS;
1352 
1361 struct EDIT_CHANGE {
1365  char *change;
1367  int pos;
1369  int len;
1373  unsigned validate;
1375  unsigned exec;
1376 };
1377 typedef struct EDIT_CHANGE EDIT_CHANGE;
1378 
1387 struct EDIT_VAL {
1389  char *text;
1391  short len;
1393  int key;
1395  unsigned focus_lost;
1397  unsigned focus_leave;
1399  unsigned text_changed;
1401  unsigned text_validated;
1402 };
1403 typedef struct EDIT_VAL EDIT_VAL;
1404 
1409 #define SE_READ 0x1
1410 #define SE_WRITE 0x2
1411 #define SE_EXCP 0x4
1412 
1413 typedef void (*SOCKET_CB)(int s, unsigned event, void *data);
1414 
1415 
1416 /* MENU */
1417 
1418 typedef void *MENU_ITEM;
1419 
1420 
1421 typedef CARD32 TIMEOUT_ID;
1422 typedef INT32 MVALUE;
1423 
1427 
1430 typedef void (*TIMEOUT_CB)(TIMEOUT_ID id, void *data);
1431 typedef int (*STRCMP_CB)(const char *, const char *);
1432 
1433 #ifdef NO_MGUI_CB_PROTO
1434 typedef void (*MGUI_CB)();
1435 #else
1436 typedef void (*MGUI_CB)(MOBJECT obj, void *od, void *ad);
1437 #endif
1438 
1439 #if defined UNIQUE_CB_PROTO || defined NO_MGUI_CB_PROTO
1440 typedef MGUI_CB OBJ_EVENT_CB;
1441 typedef MGUI_CB OBJ_STRING_CB;
1442 typedef MGUI_CB OBJ_VALUE_CB;
1443 typedef MGUI_CB WM_CLOSE_CB;
1444 typedef MGUI_CB NEW_BLOCK_CB;
1445 typedef MGUI_CB ITEM_SEEK_CB;
1446 typedef MGUI_CB EDIT_VAL_CB;
1447 typedef MGUI_CB EDIT_CURS_CB;
1448 typedef MGUI_CB EDIT_CHANGE_CB;
1449 typedef MGUI_CB LIST_ACT_CB;
1450 typedef MGUI_CB LIST_SEL_CB;
1451 typedef MGUI_CB DRAWAREA_PREF_CB;
1452 typedef MGUI_CB MENU_ITEM_CB;
1453 typedef MGUI_CB MTREE_NODE_CB;
1454 typedef MGUI_CB MTREE_POPUP_CB;
1455 #else
1456 typedef void (*OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad);
1457 typedef void (*OBJ_STRING_CB)(MOBJECT obj, char *str, void *ad);
1458 typedef void (*OBJ_VALUE_CB)(MOBJECT obj, MVALUE value, void *ad);
1459 typedef void (*WM_CLOSE_CB)(MOBJECT obj, void *odata, void *cdata);
1460 typedef void (*NEW_BLOCK_CB)(MOBJECT obj, SBL_NEW_BLOCK *nbs, void *ad);
1461 typedef void (*ITEM_SEEK_CB)(MOBJECT obj, SBL_ITEM_SEEK *iss, void *ad);
1462 typedef void (*EDIT_VAL_CB)(MOBJECT edit, EDIT_VAL *ev, void *ad);
1463 typedef void (*EDIT_CURS_CB)(MOBJECT edit, EDIT_CURS *ev, void *ad);
1464 typedef void (*EDIT_CHANGE_CB)(MOBJECT edit, EDIT_CHANGE *ec, void *ad);
1465 typedef void (*LIST_ACT_CB)(MOBJECT list, LIST_ACT *la, void *ad);
1466 typedef void (*LIST_SEL_CB)(MOBJECT list, LIST_SEL *la, void *ad);
1467 typedef void (*DRAWAREA_PREF_CB)(MOBJECT drawa, DRAWAREA_PREF *dp, void *ad);
1468 typedef void (*MENU_ITEM_CB)(MENU_ITEM item, MVALUE status, void *ad);
1469 typedef void (*MTREE_NODE_CB)(MTNODE node, void *ad);
1470 typedef void (*MTREE_POPUP_CB)(MTNODE node, int mx, int my, void *ad);
1471 typedef int (*MTREE_NODE_RENAME_CB)(MTNODE node, const char *, void *ad);
1472 typedef int (*MTREE_NODE_DELETE_CB)(MTNODE node, void *ad);
1473 typedef void (*DB_DIR_CHANGE_CB)(MOBJECT, const char *, void *);
1474 typedef int (*DB_ACTION_CB)(MOBJECT, const char *, char *, void *);
1475 #endif /* UNIQUE_CB_PROTO */
1476 
1477 
1482 struct FB_PREFS {
1485  CARD8 change_cwd;
1503  const char *filter_label;
1505  const char *file_label;
1507  const char *ok_button;
1509  const char *close_button;
1511  const char *create_menu;
1513  const char *rename_menu;
1515  const char *remove_menu;
1519  const char *bg_image_file;
1520 };
1521 typedef struct FB_PREFS FB_PREFS;
1522 
1523 /*
1524  * Graphic printing currently works only under Windows
1525  */
1526 
1527 #ifdef WIN_MGUI
1528 
1534 #define PM_FULL 0 /* the printing is maximized */
1535 #define PM_MM 1 /* dimesnsions in mm */
1536 #define PM_PIXEL 3 /* dimensions in printer pixels */
1537 #define PM_PERC 4 /* dimensions in percentage (0-100%) of the paper size */
1538 
1539 
1545 #define PO_DEFAULT 0 /* use the printer setup default */
1546 #define PO_PORTRAIT 1 /* portrait orientation */
1547 #define PO_LANDSCAPE 2 /* landscape orientation */
1548 
1549 
1550 typedef struct
1551 {
1552  int mode; /* Page mode one of PM_FULL, PM_MM, PM_PIXEL, PM_PERC */
1553  int x; /* X position of the object to print (-1 to center horiz) */
1554  int y; /* Y position of the object to print (-1 to center vert) */
1555  int w; /* Width of the object to print */
1556  int h; /* Height of the object to print */
1557 } MPRINT_OPTIONS;
1558 
1559 typedef struct
1560 {
1561  int startPage; /* Starting page to print */
1562  int endPage; /* Ending page to print */
1563  int minPage; /* min printable page */
1564  int maxPage; /* max printable page */
1565 } MPAGE_OPTIONS;
1566 
1567 typedef void *DOC_ID;
1568 
1569 #endif /* WIN_MGUI */
1570 #endif
char * change
Definition: Mguidefs.h:1365
List Item Selection.
Definition: Mguidefs.h:1203
CARD8 no_filter_editing
Definition: Mguidefs.h:1497
Window window
Window which the event is directed to.
Definition: Mguidefs.h:642
const char * rename_menu
Definition: Mguidefs.h:1513
int type
Event type (E_EXPOSE)
Definition: Mguidefs.h:640
IMAGE_DATA backup_data
Definition: Mguidefs.h:457
char * fname
Definition: Mguidefs.h:461
int type
Event type.
Definition: Mguidefs.h:513
const char * create_menu
Definition: Mguidefs.h:1511
IMAGE_DATA data
Definition: Mguidefs.h:455
int parent_drawn
Flag stating whether the parent object has already drawn itself.
Definition: Mguidefs.h:650
short x
Definition: Mguidefs.h:146
int x
Definition: Mguidefs.h:198
Window window
Window which the event is directed to.
Definition: Mguidefs.h:687
CARD32 flags
Definition: Mguidefs.h:465
long misc
Definition: Mguidefs.h:1165
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
const char * remove_menu
Definition: Mguidefs.h:1515
unsigned char * IMAGE_DATA
Definition: Mguidefs.h:400
int width
Size of the area to redraw.
Definition: Mguidefs.h:648
Window window
Window which the event is directed to.
Definition: Mguidefs.h:515
CARD8 mode
Image drawing mode (BI_TILED, BI_CENTERED, BI_SIZE_FORCING)
Definition: Mguidefs.h:805
const char * close_button
Definition: Mguidefs.h:1509
int w
Definition: Mguidefs.h:200
unsigned char checked
Definition: Mguidefs.h:1189
MSetGetTextEvent setgettext
Definition: Mguidefs.h:843
INT32 MVALUE
Definition: Mguidefs.h:1422
void(* MTREE_NODE_CB)(MTNODE node, void *ad)
Definition: Mguidefs.h:1469
unsigned int img_h
Definition: Mguidefs.h:447
Window/Object Resize Event.
Definition: Mguidefs.h:664
void * u_data
Definition: Mguidefs.h:1183
char * item
Definition: Mguidefs.h:1205
void(* SOCKET_CB)(int s, unsigned event, void *data)
Definition: Mguidefs.h:1413
MEvent * pe
Definition: Mguidefs.h:1217
void(* NEW_BLOCK_CB)(MOBJECT obj, SBL_NEW_BLOCK *nbs, void *ad)
Definition: Mguidefs.h:1460
MSetShadowEvent setshadow
Definition: Mguidefs.h:842
short vis_len
Definition: Mguidefs.h:1233
CARD8 change_cwd
Definition: Mguidefs.h:1485
Object Set Color Event.
Definition: Mguidefs.h:762
char * text
Definition: Mguidefs.h:1389
Used by the ItemSeek callback for &#39;Clip&#39; and &#39;Skip&#39; lists.
Definition: Mguidefs.h:1290
char * text
Pointer to the string to read text from (to store text to).
Definition: Mguidefs.h:748
List Item Activation.
Definition: Mguidefs.h:1179
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
void(* MENU_ITEM_CB)(MENU_ITEM item, MVALUE status, void *ad)
Definition: Mguidefs.h:1468
int(* MTREE_NODE_RENAME_CB)(MTNODE node, const char *, void *ad)
Definition: Mguidefs.h:1471
int type
Event type (E_SET_COLOR)
Definition: Mguidefs.h:764
int shadow
Shadow type.
Definition: Mguidefs.h:783
MWMCloseEvent wm_close
Definition: Mguidefs.h:834
Union for MGui events.
Definition: Mguidefs.h:828
void(* EDIT_CURS_CB)(MOBJECT edit, EDIT_CURS *ev, void *ad)
Definition: Mguidefs.h:1463
MTFont button_font
Definition: Mguidefs.h:1501
unsigned int img_w
Definition: Mguidefs.h:445
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
Cursor Position for the Edit Object.
Definition: Mguidefs.h:1343
int pos_y
Definition: Mguidefs.h:1349
MFocusEvent focus
Definition: Mguidefs.h:835
MTFont font
Definition: Mguidefs.h:1499
MSetColorEvent setcolor
Definition: Mguidefs.h:841
void * MENU_ITEM
Definition: Mguidefs.h:1418
void(* MTREE_POPUP_CB)(MTNODE node, int mx, int my, void *ad)
Definition: Mguidefs.h:1470
Window Configure Event.
Definition: Mguidefs.h:683
int type
Event type (E_SET_SENS, E_SET_PARENT_SENS)
Definition: Mguidefs.h:731
MAnyWindowEvent MWMCloseEvent
Window Close Event.
Definition: Mguidefs.h:551
int width
New Window/Object size.
Definition: Mguidefs.h:670
MIMAGE_DESCR * MIMAGE
Definition: Mguidefs.h:469
int(* STRCMP_CB)(const char *, const char *)
Definition: Mguidefs.h:1431
MAnyWindowEvent MSelectEvent
Definition: Mguidefs.h:594
char * data
Definition: Mguidefs.h:1163
int y_root
Definition: Mguidefs.h:618
char * item
Definition: Mguidefs.h:1181
MExposeEvent expose
Definition: Mguidefs.h:833
int width
New Window size.
Definition: Mguidefs.h:693
long pos
Definition: Mguidefs.h:1185
void(* ITEM_SEEK_CB)(MOBJECT obj, SBL_ITEM_SEEK *iss, void *ad)
Definition: Mguidefs.h:1461
unsigned int state
Bitmask of the state of modifier keys (ShiftMask, LockMask, ControlMask, AltMask) ...
Definition: Mguidefs.h:539
void(* DB_DIR_CHANGE_CB)(MOBJECT, const char *, void *)
Definition: Mguidefs.h:1473
char * current_text
Definition: Mguidefs.h:1363
void(* OBJ_STRING_CB)(MOBJECT obj, char *str, void *ad)
Definition: Mguidefs.h:1457
int(* DB_ACTION_CB)(MOBJECT, const char *, char *, void *)
Definition: Mguidefs.h:1474
int sensitive
Boolean flag representing the new sensitivity status.
Definition: Mguidefs.h:733
CARD32 MTColor
Definition: Mguidefs.h:183
Object Set background image Event.
Definition: Mguidefs.h:799
CARD8 level
Transparency level (0-255)
Definition: Mguidefs.h:821
Window window
Window which the event is directed to.
Definition: Mguidefs.h:537
int MTCursor
Definition: Mguidefs.h:180
MMouseEvent mouse
Definition: Mguidefs.h:832
unsigned char selected
Definition: Mguidefs.h:1187
int type
Event type (E_SET_TRANSPARENCY)
Definition: Mguidefs.h:819
int change_len
Definition: Mguidefs.h:1371
MResizeEvent resize
Definition: Mguidefs.h:839
List Item.
Definition: Mguidefs.h:1159
void * MTNODE
Definition: Mguidefs.h:999
short len
Definition: Mguidefs.h:1231
MOBJECT drawa
Definition: DAS_Spatram.h:3053
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
void(* LIST_ACT_CB)(MOBJECT list, LIST_ACT *la, void *ad)
Definition: Mguidefs.h:1465
int y
Definition: Mguidefs.h:199
MRECT r
Definition: Mguidefs.h:207
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
char * sub_item
Definition: Mguidefs.h:1294
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
MUnmapEvent unmap
Definition: Mguidefs.h:836
const char * ok_button
Definition: Mguidefs.h:1507
int type
Event type (E_SET_SHADOW)
Definition: Mguidefs.h:781
CARD8 transparent_tree
Definition: Mguidefs.h:1495
Object Set Shadow Event.
Definition: Mguidefs.h:779
int out_thick
External border thickness.
Definition: Mguidefs.h:787
unsigned int installed
Definition: Mguidefs.h:439
MOBJECT edit
Definition: Mguidefs.h:1237
MAnyWindowEvent MDeSelectEvent
Definition: Mguidefs.h:602
MAnyWindowEvent any_window_event
Definition: Mguidefs.h:830
MSetSensitivity setsensitivity
Definition: Mguidefs.h:844
int type
Event type (E_CONFIGURE)
Definition: Mguidefs.h:685
MAnyWindowEvent MMapEvent
Window/Object Map Event.
Definition: Mguidefs.h:586
DrawArea Object&#39;s resize data.
Definition: Mguidefs.h:1122
Object Set Sensitivity Event.
Definition: Mguidefs.h:729
Value Change for the Edit Object.
Definition: Mguidefs.h:1361
MMoveEvent move
Definition: Mguidefs.h:840
MKeyEvent key
Definition: Mguidefs.h:831
int MTFont
Definition: Mguidefs.h:175
void(* EDIT_CHANGE_CB)(MOBJECT edit, EDIT_CHANGE *ec, void *ad)
Definition: Mguidefs.h:1464
MTColor bgc
Background color.
Definition: Mguidefs.h:766
unsigned int ncolors
Definition: Mguidefs.h:441
Image description.
Definition: Mguidefs.h:436
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
void(* LIST_SEL_CB)(MOBJECT list, LIST_SEL *la, void *ad)
Definition: Mguidefs.h:1466
MSetTransparencyEvent settransparency
Definition: Mguidefs.h:846
unsigned int nplanes
Definition: Mguidefs.h:443
const char * file_label
Definition: Mguidefs.h:1505
short changeable
Definition: Mguidefs.h:1235
unsigned char index
Definition: Mguidefs.h:423
MTColor fgc
Foreground color.
Definition: Mguidefs.h:768
int type
Event type (E_RESIZE)
Definition: Mguidefs.h:666
void(* EDIT_VAL_CB)(MOBJECT edit, EDIT_VAL *ev, void *ad)
Definition: Mguidefs.h:1462
MConfigureEvent configure
Definition: Mguidefs.h:838
Window Move Event.
Definition: Mguidefs.h:705
int h
Definition: Mguidefs.h:201
MSetBGImageEvent setbgimage
Definition: Mguidefs.h:845
short y
Definition: Mguidefs.h:147
const char * bg_image_file
Definition: Mguidefs.h:1519
Data feed for Skip and Clip List objects.
Definition: Mguidefs.h:1254
unsigned char green
Definition: Mguidefs.h:414
int scroll_delta
scrolling lines (mouse wheel command)
Definition: Mguidefs.h:624
MAnyWindowEvent MFocusEvent
Window/Object Focus Event.
Definition: Mguidefs.h:562
unsigned char red
Definition: Mguidefs.h:416
Object Set/Get Text Event.
Definition: Mguidefs.h:744
Window/Object Expose Event.
Definition: Mguidefs.h:638
Validation data for the EditField Object.
Definition: Mguidefs.h:1387
IMAGE_CMAP * colormap
Definition: Mguidefs.h:453
void(* DRAWAREA_PREF_CB)(MOBJECT drawa, DRAWAREA_PREF *dp, void *ad)
Definition: Mguidefs.h:1467
MIMAGE bg_image
Definition: Mguidefs.h:1517
void(* OBJ_VALUE_CB)(MOBJECT obj, MVALUE value, void *ad)
Definition: Mguidefs.h:1458
int in_thick
Internal border thickness.
Definition: Mguidefs.h:785
MAnyWindowEvent MUnmapEvent
Window Unmap Event.
Definition: Mguidefs.h:574
MMapEvent map
Definition: Mguidefs.h:837
void(* MGUI_CB)(MOBJECT obj, void *od, void *ad)
Definition: Mguidefs.h:1436
int(* MTREE_NODE_DELETE_CB)(MTNODE node, void *ad)
Definition: Mguidefs.h:1472
struct MIMAGE_DESCR * mask
Definition: Mguidefs.h:463
unsigned focus_lost
Definition: Mguidefs.h:1395
int type
Event type (E_SET_TEXT, E_GET_TEXT)
Definition: Mguidefs.h:746
CARD32 pixmap_id
Definition: Mguidefs.h:451
struct RLIST * next
Definition: Mguidefs.h:208
unsigned validate
Definition: Mguidefs.h:1373
CARD32 TIMEOUT_ID
Definition: Mguidefs.h:1421
MOBJECT label
Definition: Mguidefs.h:1239
const char * filter_label
Definition: Mguidefs.h:1503
Object Set Transparency Event.
Definition: Mguidefs.h:817
void * MOBJECT
Definition: Mguidefs.h:192
void * u_data
Definition: Mguidefs.h:1207
unsigned int row_w
Definition: Mguidefs.h:449
int type
Event type (E_BUTTON_PRESS, E_BUTTON_RELEASE, E_MOTION, E_MOUSE_WHEEL)
Definition: Mguidefs.h:612
unsigned char selected
Definition: Mguidefs.h:1211
Template for EditList Object&#39;s creation.
Definition: Mguidefs.h:1227
unsigned int state
buttons and key modifiers mask
Definition: Mguidefs.h:620
unsigned exec
Definition: Mguidefs.h:1375
IMAGE_DATA alpha
Definition: Mguidefs.h:459
struct XL_ITEM * next
Definition: Mguidefs.h:1161
Window window
Window which the event is directed to.
Definition: Mguidefs.h:709
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
void * u_data
Definition: Mguidefs.h:1167
int pos_x
Definition: Mguidefs.h:1347
unsigned focus_leave
Definition: Mguidefs.h:1397
XL_ITEM * pi
Definition: Mguidefs.h:1275
MIMAGE img
Background image.
Definition: Mguidefs.h:803
int type
Definition: Mguidefs.h:829
int type
Event type (E_SET_BG_IMAGE)
Definition: Mguidefs.h:801
unsigned text_changed
Definition: Mguidefs.h:1399
int type
Event type (E_KEY_PRESS)
Definition: Mguidefs.h:535
short len
Definition: Mguidefs.h:1391
char * head
Definition: Mguidefs.h:1229
Colormap entry.
Definition: Mguidefs.h:410
Window window
Window which the event is directed to.
Definition: Mguidefs.h:614
int type
Event type (E_MOVE)
Definition: Mguidefs.h:707
Window window
Window which the event is directed to.
Definition: Mguidefs.h:668
void(* WM_CLOSE_CB)(MOBJECT obj, void *odata, void *cdata)
Definition: Mguidefs.h:1459
void(* TIMEOUT_CB)(TIMEOUT_ID id, void *data)
Definition: Mguidefs.h:1430
long pos
Definition: Mguidefs.h:1209
unsigned char blue
Definition: Mguidefs.h:412
Point structure.
Definition: Mguidefs.h:144
unsigned char checked
Definition: Mguidefs.h:1213
unsigned text_validated
Definition: Mguidefs.h:1401
int key
Definition: Mguidefs.h:1393
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:08 for DAS - Rel. 3.1.6 - 18/09/2017.