annotate Gui/wm/ws.h @ 21339:4556f7c82535

support Intel Core 2 and AMD Geode in the processor detection routines patch from Zuxy Meng, zuxy.meng gmail com
author diego
date Tue, 28 Nov 2006 12:04:59 +0000
parents 3047f69e3d74
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 // AutoSpace Window System for Linux/Win32 v0.61
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4 // Writed by pontscho / fresh!mindworkz
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7 #ifndef __MY_WS
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 #define __MY_WS
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
9
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
10 #include <X11/Xlib.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
11 #include <X11/Xutil.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
12 #include <X11/keysym.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
13 #include <X11/Xatom.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
14 #include <X11/extensions/XShm.h>
4679
6347d9c6e115 missing #ifdef HAVE_XDPMS
pl
parents: 4465
diff changeset
15 #ifdef HAVE_XDPMS
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
16 #include <X11/extensions/dpms.h>
4679
6347d9c6e115 missing #ifdef HAVE_XDPMS
pl
parents: 4465
diff changeset
17 #endif
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
18
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19 #define wsKeyReleased 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 #define wsKeyPressed 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22 #define wsShift (1L<<0)
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
23 #define wsLock (1L<<1)
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24 #define wsCtrl (1L<<2)
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
25 #define wsAlt (1L<<3)
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27 #define wsPLMouseButton 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
28 #define wsPMMouseButton 2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29 #define wsPRMouseButton 3
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2082
diff changeset
30 #define wsP4MouseButton 4
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2082
diff changeset
31 #define wsP5MouseButton 5
20102
3047f69e3d74 a + b => (a + b) for defines, just to be sure.
reimar
parents: 10194
diff changeset
32 #define wsRLMouseButton (1 + 128)
3047f69e3d74 a + b => (a + b) for defines, just to be sure.
reimar
parents: 10194
diff changeset
33 #define wsRMMouseButton (2 + 128)
3047f69e3d74 a + b => (a + b) for defines, just to be sure.
reimar
parents: 10194
diff changeset
34 #define wsRRMouseButton (3 + 128)
3047f69e3d74 a + b => (a + b) for defines, just to be sure.
reimar
parents: 10194
diff changeset
35 #define wsR4MouseButton (4 + 128)
3047f69e3d74 a + b => (a + b) for defines, just to be sure.
reimar
parents: 10194
diff changeset
36 #define wsR5MouseButton (5 + 128)
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
37 #define wsEnterWindow 253
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
38 #define wsLeaveWindow 254
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
39 #define wsMoveMouse 255
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
41 #define wsShowMouseCursor 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
42 #define wsMouse 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
43 #define wsHideMouseCursor 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
44 #define wsNoMouse 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
45 #define wsHandleMouseButton 2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
46 #define wsHandleMouseMove 4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
47
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 #define wsHideFrame 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 #define wsNoFrame 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 #define wsShowFrame 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 #define wsFrame 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
52 #define wsMaxSize 2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53 #define wsMinSize 4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 #define wsShowWindow 8
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 #define wsHideWindow 16
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
56 #define wsOverredirect 32
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
57
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
58 #define wsNoBorder 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 #define wsSysName "AutoSpace Window System LiTe"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 #define wsRGB32 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 #define wsBGR32 2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 #define wsRGB24 3
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
65 #define wsBGR24 4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
66 #define wsRGB16 5
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
67 #define wsBGR16 6
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
68 #define wsRGB15 7
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
69 #define wsBGR15 8
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
70
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 #define wsWindowVisible 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72 #define wsWindowPartialVisible 2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
73 #define wsWindowNotVisible 4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
74 #define wsWindowMapped 8
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 #define wsWindowUnmapped 16
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
76 #define wsWindowFocusIn 32
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 #define wsWindowFocusOut 64
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 #define wsWindowExpose 128
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 #define wsWindowRolled 256
5919
60cf2bca993f some bug fix
pontscho
parents: 4818
diff changeset
80 #define wsWindowClosed 512
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 #define wsNone 0
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
83 #define wsMapped 1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
84 #define wsFocused 2
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
85 #define wsVisible 3
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
86 #define wsNotVisible 4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
87 #define wsPVisible 5
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 #define wsRolled 6
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89
6089
39c2bfe5c267 small fixes
pontscho
parents: 5997
diff changeset
90 #define wsWMUnknown 0
39c2bfe5c267 small fixes
pontscho
parents: 5997
diff changeset
91 #define wsWMNetWM 1
39c2bfe5c267 small fixes
pontscho
parents: 5997
diff changeset
92 #define wsWMKDE 2
39c2bfe5c267 small fixes
pontscho
parents: 5997
diff changeset
93 #define wsWMIceWM 3
39c2bfe5c267 small fixes
pontscho
parents: 5997
diff changeset
94 #define wsWMWMaker 4
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
95
8058
9246adcf95f0 cosmetic
pontscho
parents: 8052
diff changeset
96 typedef void (*wsTReDraw)( void );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
97 typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
98 typedef void (*wsTIdle)( void );
6183
a4bbda72ce86 fix two small bug and add multimedia keyboard support ( i tested with Acer AirKey V only )
pontscho
parents: 6146
diff changeset
99 typedef void (*wsTKeyHandler)( int KeyCode,int Type,int Key );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
100 typedef void (*wsTMouseHandler)( int Button,int X,int Y,int RX,int RY );
6967
0fa27966ac47 add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents: 6794
diff changeset
101 typedef void (*wsTDNDHandler)( int num,char ** str );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
102
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
103 typedef struct
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
104 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
105 Window WindowID;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
106 Window Parent;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
107 int X,Y,Width,Height;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
108 int OldX,OldY,OldWidth,OldHeight;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
109 int MaxX,MaxY;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
110 int isFullScreen;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
111 int BorderWidth;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
112 int Property;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
113 unsigned char * bImage;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
114 XImage * xImage;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
115 Pixmap Mask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
116 int Decorations;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
117
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
118 int State;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
119 int Visible;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
120 int Mapped;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
121 int Focused;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
122 int Rolled;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
123
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
124 wsTReDraw ReDraw;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
125 wsTReSize ReSize;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
126 wsTIdle Idle;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
127 wsTKeyHandler KeyHandler;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
128 wsTMouseHandler MouseHandler;
6967
0fa27966ac47 add xdnd support (from Gregory Kovriga <gkovriga@techunix.technion.ac.il>) and fix -subdelay bug
pontscho
parents: 6794
diff changeset
129 wsTDNDHandler DandDHandler;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
130
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
131 int Alt;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
132 int Shift;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
133 int Control;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
134 int NumLock;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
135 int CapsLock;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
136 // --- Misc -------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
137
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
138 Atom AtomDeleteWindow;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
139 Atom AtomTakeFocus;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
140 Atom AtomRolle;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
141 Atom AtomProtocols;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
142 Atom AtomsProtocols[3];
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
143 Atom AtomLeaderClient;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
144 Atom AtomRemote;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2082
diff changeset
145 Atom AtomWMSizeHint;
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2082
diff changeset
146 Atom AtomWMNormalHint;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
147
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
148 XShmSegmentInfo Shminfo;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
149 unsigned char * ImageData;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
150 unsigned short int * ImageDataw;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
151 unsigned int * ImageDatadw;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
152 GC wGC;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
153 XGCValues wGCV;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
154 unsigned long WindowMask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
155 XVisualInfo VisualInfo;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
156 XSetWindowAttributes WindowAttrib;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
157 XSizeHints SizeHint;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
158 XWMHints WMHints;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
159
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
160 XFontStruct * Font;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
161 int FontHeight;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
162
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
163 Cursor wsCursor;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
164 char wsCursorData[1];
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
165 Pixmap wsCursorPixmap;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
166 int wsMouseEventType;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
167 XColor wsColor;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
168 } wsTWindow;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
169
4465
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 2854
diff changeset
170 extern int wsMaxX;
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 2854
diff changeset
171 extern int wsMaxY;
10194
2608bf0037b6 From: Ben Low <ben@bdlow.net>
pontscho
parents: 8957
diff changeset
172 extern int wsOrgX;
2608bf0037b6 From: Ben Low <ben@bdlow.net>
pontscho
parents: 8957
diff changeset
173 extern int wsOrgY;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
174
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
175 extern Display * wsDisplay;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
176 extern int wsScreen;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
177 extern Window wsRootWin;
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
178 extern int wsLayer;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
179
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
180 extern unsigned char * wsImageData;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
181
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
182 extern XEvent wsEvent;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
183
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
184 extern int wsDepthOnScreen;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
185 extern int wsRedMask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
186 extern int wsGreenMask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
187 extern int wsBlueMask;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
188
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
189 extern int wsUseXShm;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
190 extern int wsUseDGA;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
191
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
192 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
193 // wsKeyTable
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
194 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
195 extern unsigned long wsKeyTable[512];
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
196
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
197 extern void wsXDone( void );
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
198 extern void wsXInit( void* disp );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
199
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
200 extern int wsGetDepthOnScreen( void );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
201
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
202 extern void wsDoExit( void );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
203 extern void wsMainLoop( void );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4679
diff changeset
204 extern Bool wsEvents( Display * display,XEvent * Event,XPointer arg );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4679
diff changeset
205 extern void wsHandleEvents( void );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
206
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
207 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
208 // wsCrateWindow: create a new window on the screen.
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
209 // X,Y : window position
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
210 // wX,hY : window size
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
211 // bW : window frame size
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
212 // cV : mouse cursor visible
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
213 // D : "decoration", visible titlebar, etc ...
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
214 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
215 extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
216 extern void wsDestroyWindow( wsTWindow * win );
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2851
diff changeset
217 extern void wsMoveWindow( wsTWindow * win,int b,int x, int y );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
218 extern void wsResizeWindow( wsTWindow * win,int sx, int sy );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
219 extern void wsIconify( wsTWindow win );
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 6089
diff changeset
220 extern void wsMoveTopWindow( Display * wsDisplay,Window win );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
221 extern void wsSetBackground( wsTWindow * win,int color );
1814
9c674dc76ff3 add wsSetForegroundRGB
pontscho
parents: 1723
diff changeset
222 extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
223 extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b );
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
224 #define wsClearWindow( win ) XClearWindow( wsDisplay,win.WindowID )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
225 extern void wsSetTitle( wsTWindow * win,char * name );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
226 extern void wsVisibleWindow( wsTWindow * win,int show );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
227 extern void wsWindowDecoration( wsTWindow * win,long d );
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
228 extern void wsSetLayer( Display * wsDisplay,Window win, int layer );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
229 extern void wsFullScreen( wsTWindow * win );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
230 extern void wsPostRedisplay( wsTWindow * win );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
231 extern void wsSetShape( wsTWindow * win,char * data );
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6183
diff changeset
232 extern void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
233
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
234 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
235 // Draw string at x,y with fc ( foreground color ) and bc ( background color ).
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
236 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
237 extern void wsDrawString( wsTWindow win,int x,int y,char * str,int fc,int bc );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
238 extern int wsTextWidth( wsTWindow win,char * str );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
239
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
240 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
241 // Show / hide mouse cursor.
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
242 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
243 extern void wsVisibleMouse( wsTWindow * win,int m );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
244 extern void wsSetMousePosition( wsTWindow * win,int x, int y );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
245
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
246 // ----------------------------------------------------------------------------------------------
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
247 // Image handling
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
248 // ----------------------------------------------------------------------------------------------
1858
88a88d0a3f94 fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents: 1853
diff changeset
249 extern void wsCreateImage( wsTWindow * win,int Width,int Height );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
250 extern void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
251 extern void wsPutImage( wsTWindow * win );
1858
88a88d0a3f94 fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents: 1853
diff changeset
252 extern void wsResizeImage( wsTWindow * win,int Width,int Height );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
253 extern void wsDestroyImage( wsTWindow * win );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
254 extern int wsGetOutMask( void );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
255
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
256 extern void wsScreenSaverOn( Display *mDisplay );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
257 extern void wsScreenSaverOff( Display * mDisplay );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
258
8957
36a5cdca733b bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)
mosu
parents: 8864
diff changeset
259 #define wgIsRect( X,Y,tX,tY,bX,bY ) ( ( (X) > (tX) )&&( (Y) > (tY) )&&( (X) < (bX) )&&( (Y) < (bY) ) )
8052
bab84c42ee57 not needed
pontscho
parents: 7802
diff changeset
260
2082
016f6d583733 missing newlines fixed
arpi
parents: 1858
diff changeset
261 #endif
016f6d583733 missing newlines fixed
arpi
parents: 1858
diff changeset
262