00001
00002
00003 #ifndef __LgiLinux_h
00004 #define __LgiLinux_h
00005
00006 #include <stdio.h>
00007 #include <X11/Xlib.h>
00008 #include <X11/Xutil.h>
00009 #include <X11/Xatom.h>
00010
00011 #include "GMem.h"
00012 #include "GToken.h"
00013 #include "GRect.h"
00014
00015 #undef Status
00016 #undef Success
00017 #undef None
00018 #undef Above
00019 #undef Below
00020
00021 #define XStatus int
00022 #define XSuccess 0
00023 #define XAbove 0
00024 #define XBelow 1
00025 #define XNone 0L
00026
00027 extern "C" uint64 LgiCurrentTime();
00028 extern bool _GetKdePaths(GToken &t, char *Type);
00029 extern bool _GetIniField(char *Grp, char *Field, char *In, char *Out, int OutSize);
00030 extern bool _GetSystemFont(char *FontType, char *Font, int FontBufSize, int &PointSize);
00031
00032 XChar2b *ConvertToX(char16 *s, int len = -1);
00033 extern char *XErr(int i);
00034 extern char *XMessage(int i);
00035
00036 class XObject
00037 {
00038 public:
00039 virtual ~XObject() {}
00040
00041 static Display *XDisplay();
00042 static class XApplication *XApp();
00043 };
00044
00045 class OsPoint
00046 {
00047 public:
00048 int x, y;
00049
00050 OsPoint()
00051 {
00052 x = y = 0;
00053 }
00054
00055 OsPoint(int X, int Y)
00056 {
00057 x = X;
00058 y = Y;
00059 }
00060
00061 void set(int sx, int sy) { x = sx; y = sy; }
00062 };
00063
00064 class XCursor : public XObject
00065 {
00066 public:
00067 OsPoint &pos();
00068 };
00069
00070 class XEventSink : public XObject
00071 {
00072 public:
00073 virtual void OnEvent(XEvent *Event) = 0;
00074 };
00075
00076 enum ViewBackground
00077 {
00078 NoBackground
00079 };
00080
00081 #include "xlist.h"
00082
00083 #endif