Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

linux/X/LgiOsDefs.h

Go to the documentation of this file.
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 
00018 #undef stricmp
00019 
00020 #include "LgiInc.h"
00021 
00022 // System
00023 #define LINUX                       1
00024 #define XP_CTRLS                    1
00025 #define POSIX                       1
00026 
00027 class OsAppArguments
00028 {
00029 public:
00030     int Args;
00031     char **Arg;
00032 };
00033 
00034 // Process
00035 typedef int                         OsProcess;
00036 typedef int                         OsProcessId;
00037 
00038 // Windows
00039 #include "qmainwindow.h"
00040 typedef QMainWindow                 *OsWindow;
00041 typedef QWidget                     *OsView;
00042 
00043 // Threads
00044 typedef pthread_t                   OsThreadId;
00045 typedef pthread_mutex_t             OsSemaphore;
00046 #define LgiGetCurrentThread()       pthread_self()
00047 
00048 // Sockets
00049 #define ValidSocket(s)              ((s)>=0)
00050 #define INVALID_SOCKET              -1
00051 typedef int OsSocket;
00052 
00054 #define LgiSleep(i)                 _lgi_sleep(i)
00055 LgiFunc void _lgi_sleep(int i);
00056 
00057 #define atoi64                      atoll
00058 
00060 #define LgiYield()                  LgiApp->Run(false)
00061 
00062 #define K_CHAR                      0x0
00063 
00065 #define LGI_FileDropFormat          "text/uri-list"
00066 #define LGI_WideCharset             "utf-32"
00067 
00068 #define SND_ASYNC                   1
00069 
00070 #define DOUBLE_CLICK_THRESHOLD      5
00071 
00072 // Window flags
00073 #define GWF_VISIBLE                 0x00000001
00074 #define GWF_ENABLED                 0x00000002
00075 #define GWF_FOCUS                   0x00000004
00076 #define GWF_OVER                    0x00000008
00077 #define GWF_DROP_TARGET             0x00000010
00078 #define GWF_SUNKEN                  0x00000020
00079 #define GWF_FLAT                    0x00000040
00080 #define GWF_RAISED                  0x00000080
00081 #define GWF_BORDER                  0x00000100
00082 #define GWF_DIALOG                  0x00000200
00083 #define GWF_DESTRUCTOR              0x00000400
00084 #define GWF_QUIT_WND                0x00000800
00085 
00086 // Menu flags
00087 #define ODS_SELECTED                0x1
00088 #define ODS_DISABLED                0x2
00089 #define ODS_CHECKED                 0x4
00090 
00092 #define SUNKEN                      1
00093 
00094 #define RAISED                      2
00095 
00096 #define CHISEL                      3
00097 
00098 #define FLAT                        4
00099 
00101 #define DIR_CHAR                    '/'
00102 
00103 #define DIR_STR                     "/"
00104 
00105 #define EOL_SEQUENCE                "\n"
00106 
00107 #define IsSlash(c)                  (((c)=='/')OR((c)=='\\'))
00108 
00109 #define IsQuote(c)                  (((c)=='\"')OR((c)=='\''))
00110 
00111 #define LGI_PATH_SEPARATOR          ":"
00112 
00113 #define LGI_ALL_FILES               "*"
00114 
00115 #define LGI_LIBRARY_EXT             "so"
00116 
00118 #define M_SYSTEM                    (1000)
00119 
00120 #define M_CLOSE                     (M_SYSTEM+1)
00121 
00122 #define M_X11_INVALIDATE            (M_SYSTEM+2)
00123 
00124 #define M_X11_PULSE                 (M_SYSTEM+3)
00125 
00126 #define M_X11_REPARENT              (M_SYSTEM+4)
00127 
00129 #define M_USER                      (M_SYSTEM+1000)
00130 
00135 #define M_MOUSEENTER                (M_USER+100)
00136 
00141 #define M_MOUSEEXIT                 (M_USER+101)
00142 
00147 #define M_CHANGE                    (M_USER+102)
00148 
00153 #define M_DESCRIBE                  (M_USER+103)
00154 
00155 // return (bool)
00156 #define M_WANT_DIALOG_PROC          (M_USER+104)
00157 
00158 #define M_MENU                      (M_USER+105)
00159 #define M_COMMAND                   (M_USER+106)
00160 #define M_DRAG_DROP                 (M_USER+107)
00161 
00162 #define M_TRAY_NOTIFY               (M_USER+108)
00163 #define M_CUT                       (M_USER+109)
00164 #define M_COPY                      (M_USER+110)
00165 #define M_PASTE                     (M_USER+111)
00166 
00169 #define IDOK                        1
00172 #define IDCANCEL                    2
00175 #define IDYES                       3
00178 #define IDNO                        4
00179 
00182 #define MB_OK                       5
00185 #define MB_OKCANCEL                 6
00188 #define MB_YESNO                    7
00191 #define MB_YESNOCANCEL              8
00192 
00193 #define MB_SYSTEMMODAL              0x1000
00194 
00197 #define LGI_VKEY_CTRL               0x001
00200 #define LGI_VKEY_ALT                0x002
00203 #define LGI_VKEY_SHIFT              0x004
00204 
00207 #define LGI_VMOUSE_LEFT             0x008
00210 #define LGI_VMOUSE_MIDDLE           0x010
00213 #define LGI_VMOUSE_RIGHT            0x020
00216 #define LGI_VMOUSE_CTRL             0x040
00219 #define LGI_VMOUSE_ALT              0x080
00222 #define LGI_VMOUSE_SHIFT            0x100
00225 #define LGI_VMOUSE_DOWN             0x200
00228 #define LGI_VMOUSE_DOUBLE           0x400
00229 
00230 // Keys
00231 #define VK_F1                       1
00232 #define VK_F2                       2
00233 #define VK_F3                       3
00234 #define VK_F4                       4
00235 #define VK_F5                       5
00236 #define VK_F6                       6
00237 #define VK_F7                       7
00238 #define VK_F8                       11
00239 #define VK_F9                       12
00240 #define VK_F10                      14
00241 #define VK_F11                      15
00242 #define VK_F12                      16
00243 
00244 #define VK_BACK                     8
00245 #define VK_TAB                      9
00246 #define VK_RETURN                   13
00247 
00248 #define VK_SHIFT                    17
00249 #define VK_ESCAPE                   18
00250 #define VK_RIGHT                    19
00251 #define VK_LEFT                     20
00252 #define VK_UP                       21
00253 #define VK_DOWN                     22
00254 #define VK_PRIOR                    23
00255 #define VK_NEXT                     24
00256 #define VK_HOME                     25
00257 #define VK_END                      26
00258 #define VK_INSERT                   27
00259 #define VK_DELETE                   28
00260 
00261 #define abs(a)                      ( (a) < 0 ? -(a) : (a) )
00262 
00264 // Externs
00265 #ifndef __CYGWIN__
00266 LgiFunc char *strnistr(char *a, char *b, int n);
00267 LgiFunc int strnicmp(char *a, char *b, int i);
00268 LgiFunc char *strupr(char *a);
00269 LgiFunc char *strlwr(char *a);
00270 LgiFunc int stricmp(char *a, char *b);
00271 #endif
00272 
00273 LgiFunc int stricmp(char *a, char *b);
00274 
00276 LgiFunc int FormatToInt(char *s);
00278 LgiFunc char *FormatToStr(int f);
00279 
00280 #endif
00281 

Generated on Tue May 2 10:24:43 2006 for Lgi by  doxygen 1.4.1