00001
00007 #ifndef __LGI_OS_DEFS_H
00008 #define __LGI_OS_DEFS_H
00009
00010 #include "assert.h"
00011
00012 #include <stdarg.h>
00013 #include <stdlib.h>
00014 #include <stdio.h>
00015 #define _MULTI_THREADED
00016 #include <pthread.h>
00017 #include "LgiInc.h"
00018 #include <Y/c++.h>
00019
00020
00021 #define min(a,b) (((a) < (b)) ? (a) : (b))
00022 #define max(a,b) (((a) > (b)) ? (a) : (b))
00023
00024 #define LINUX 1
00025 #define XP_CTRLS 1
00026
00028 #define LgiSleep(i) _lgi_sleep(i)
00029 LgiFunc void _lgi_sleep(int i);
00030
00032 #define LgiYield() LgiApp->Run(false)
00033
00034 #define K_CHAR 0x0
00035
00037 #define LGI_FileDropFormat "text/uri-list"
00038
00039 #define SND_ASYNC 1
00040
00041 #define DOUBLE_CLICK_THRESHOLD 5
00042
00043
00044 #define GWF_VISIBLE 0x00000001
00045 #define GWF_ENABLED 0x00000002
00046 #define GWF_FOCUS 0x00000004
00047 #define GWF_OVER 0x00000008
00048 #define GWF_DROP_TARGET 0x00000010
00049 #define GWF_SUNKEN 0x00000020
00050 #define GWF_FLAT 0x00000040
00051 #define GWF_RAISED 0x00000080
00052 #define GWF_BORDER 0x00000100
00053 #define GWF_DIALOG 0x00000200
00054 #define GWF_DESTRUCTOR 0x00000400
00055 #define GWF_QUIT_WND 0x00000800
00056
00057
00058 #define ODS_SELECTED 0x1
00059 #define ODS_DISABLED 0x2
00060 #define ODS_CHECKED 0x4
00061
00063 #define SUNKEN 1
00064
00065 #define RAISED 2
00066
00067 #define CHISEL 3
00068
00069 #define FLAT 4
00070
00072 #define DIR_CHAR '/'
00073
00074 #define DIR_STR "/"
00075
00076 #define EOL_SEQUENCE "\n"
00077
00078 #define IsSlash(c) (((c)=='/')OR((c)=='\\'))
00079
00080 #define IsQuote(c) (((c)=='\"')OR((c)=='\''))
00081
00082 #define LGI_PATH_SEPARATOR ":"
00083
00084 #define LGI_ALL_FILES "*"
00085
00086 #define LGI_LIBRARY_EXT "so"
00087
00089 #define M_SYSTEM (1000)
00090
00091 #define M_CLOSE (M_SYSTEM+1)
00092
00093 #define M_X11_INVALIDATE (M_SYSTEM+2)
00094
00095 #define M_X11_PULSE (M_SYSTEM+3)
00096
00097 #define M_X11_REPARENT (M_SYSTEM+4)
00098
00100 #define M_USER (M_SYSTEM+1000)
00101
00106 #define M_MOUSEENTER (M_USER+100)
00107
00112 #define M_MOUSEEXIT (M_USER+101)
00113
00118 #define M_CHANGE (M_USER+102)
00119
00124 #define M_DESCRIBE (M_USER+103)
00125
00126
00127 #define M_WANT_DIALOG_PROC (M_USER+104)
00128
00129 #define M_MENU (M_USER+105)
00130 #define M_COMMAND (M_USER+106)
00131 #define M_DRAG_DROP (M_USER+107)
00132
00133 #define M_TRAY_NOTIFY (M_USER+108)
00134 #define M_CUT (M_USER+109)
00135 #define M_COPY (M_USER+110)
00136 #define M_PASTE (M_USER+111)
00137
00140 #define IDOK 1
00143 #define IDCANCEL 2
00146 #define IDYES 3
00149 #define IDNO 4
00150
00153 #define MB_OK 5
00156 #define MB_OKCANCEL 6
00159 #define MB_YESNO 7
00162 #define MB_YESNOCANCEL 8
00163
00164 #define MB_SYSTEMMODAL 0x1000
00165
00168 #define LGI_VKEY_CTRL 0x001
00171 #define LGI_VKEY_ALT 0x002
00174 #define LGI_VKEY_SHIFT 0x004
00175
00178 #define LGI_VMOUSE_LEFT 0x008
00181 #define LGI_VMOUSE_MIDDLE 0x010
00184 #define LGI_VMOUSE_RIGHT 0x020
00187 #define LGI_VMOUSE_CTRL 0x040
00190 #define LGI_VMOUSE_ALT 0x080
00193 #define LGI_VMOUSE_SHIFT 0x100
00196 #define LGI_VMOUSE_DOWN 0x200
00199 #define LGI_VMOUSE_DOUBLE 0x400
00200
00201
00202 #define VK_F1 1
00203 #define VK_F2 2
00204 #define VK_F3 3
00205 #define VK_F4 4
00206 #define VK_F5 5
00207 #define VK_F6 6
00208 #define VK_F7 7
00209 #define VK_F8 11
00210 #define VK_F9 12
00211 #define VK_F10 14
00212 #define VK_F11 15
00213 #define VK_F12 16
00214
00215 #define VK_BACK 8
00216 #define VK_TAB 9
00217 #define VK_RETURN 10
00218
00219 #define VK_SHIFT 17
00220 #define VK_ESCAPE 18
00221 #define VK_RIGHT 19
00222 #define VK_LEFT 20
00223 #define VK_UP 21
00224 #define VK_DOWN 22
00225 #define VK_PRIOR 23
00226 #define VK_NEXT 24
00227 #define VK_HOME 25
00228 #define VK_END 26
00229 #define VK_INSERT 27
00230 #define VK_DELETE 28
00231
00232 #define abs(a) ( (a) < 0 ? -(a) : (a) )
00233
00235
00236 #ifndef __CYGWIN__
00237 LgiFunc char *strnistr(char *a, char *b, int n);
00238 LgiFunc int strnicmp(char *a, char *b, int i);
00239 LgiFunc char *strupr(char *a);
00240 LgiFunc char *strlwr(char *a);
00241 LgiFunc int stricmp(char *a, char *b);
00242 #endif
00243
00244 LgiFunc int stricmp(char *a, char *b);
00245
00246 #endif
00247