Mercurial > mplayer.hg
annotate Gui/wm/ws.h @ 2779:0ecadf56dc05
Eugene's fixes to work with QuickTime.qts
author | arpi |
---|---|
date | Fri, 09 Nov 2001 03:27:29 +0000 |
parents | 016f6d583733 |
children | b64fa5d25142 |
rev | line source |
---|---|
1693 | 1 |
2 // ---------------------------------------------------------------------------------------------- | |
3 // AutoSpace Window System for Linux/Win32 v0.61 | |
4 // Writed by pontscho / fresh!mindworkz | |
5 // ---------------------------------------------------------------------------------------------- | |
6 | |
7 #ifndef __MY_WS | |
8 #define __MY_WS | |
9 | |
10 #include <X11/Xlib.h> | |
11 #include <X11/Xutil.h> | |
12 #include <X11/keysym.h> | |
13 #include <X11/Xatom.h> | |
14 #include <X11/extensions/XShm.h> | |
15 #include <X11/extensions/dpms.h> | |
16 | |
17 #define wsKeyReleased 0 | |
18 #define wsKeyPressed 1 | |
19 | |
20 #define wsShift (1L<<0) | |
21 #define wsLock (1L<<1) | |
22 #define wsCtrl (1L<<2) | |
23 #define wsAlt (1L<<3) | |
24 | |
25 #define wsPLMouseButton 1 | |
26 #define wsPMMouseButton 2 | |
27 #define wsPRMouseButton 3 | |
28 #define wsRLMouseButton 1 + 128 | |
29 #define wsRMMouseButton 2 + 128 | |
30 #define wsRRMouseButton 3 + 128 | |
31 #define wsEnterWindow 253 | |
32 #define wsLeaveWindow 254 | |
33 #define wsMoveMouse 255 | |
34 | |
35 #define wsShowMouseCursor 1 | |
36 #define wsMouse 1 | |
37 #define wsHideMouseCursor 0 | |
38 #define wsNoMouse 0 | |
39 #define wsHandleMouseButton 2 | |
40 #define wsHandleMouseMove 4 | |
41 | |
42 #define wsHideFrame 0 | |
43 #define wsNoFrame 0 | |
44 #define wsShowFrame 1 | |
45 #define wsFrame 1 | |
46 #define wsMaxSize 2 | |
47 #define wsMinSize 4 | |
48 #define wsShowWindow 8 | |
49 #define wsHideWindow 16 | |
50 #define wsOverredirect 32 | |
51 | |
52 #define wsNoBorder 0 | |
53 | |
54 #define wsSysName "AutoSpace Window System LiTe" | |
55 | |
56 #define wsRGB32 1 | |
57 #define wsBGR32 2 | |
58 #define wsRGB24 3 | |
59 #define wsBGR24 4 | |
60 #define wsRGB16 5 | |
61 #define wsBGR16 6 | |
62 #define wsRGB15 7 | |
63 #define wsBGR15 8 | |
64 | |
65 #define wsWindowVisible 1 | |
66 #define wsWindowPartialVisible 2 | |
67 #define wsWindowNotVisible 4 | |
68 #define wsWindowMapped 8 | |
69 #define wsWindowUnmapped 16 | |
70 #define wsWindowFocusIn 32 | |
71 #define wsWindowFocusOut 64 | |
72 #define wsWindowExpose 128 | |
73 #define wsWindowRolled 256 | |
74 | |
75 #define wsNone 0 | |
76 #define wsMapped 1 | |
77 #define wsFocused 2 | |
78 #define wsVisible 3 | |
79 #define wsNotVisible 4 | |
80 #define wsPVisible 5 | |
81 #define wsRolled 6 | |
82 | |
83 #define wsParamDisplay Display *dpy,Window w | |
84 | |
85 typedef void (*wsTReDraw)( wsParamDisplay ); | |
86 typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height ); | |
87 typedef void (*wsTIdle)( void ); | |
88 typedef void (*wsTKeyHandler)( int State,int Type,int Key ); | |
89 typedef void (*wsTMouseHandler)( int Button,int X,int Y,int RX,int RY ); | |
90 typedef void (*wsRemoteHandler)( char * str ); | |
91 | |
92 typedef struct | |
93 { | |
94 Window WindowID; | |
95 Window Parent; | |
96 int X,Y,Width,Height; | |
97 int OldX,OldY,OldWidth,OldHeight; | |
98 int MaxX,MaxY; | |
99 int isFullScreen; | |
100 int BorderWidth; | |
101 int Property; | |
102 unsigned char * bImage; | |
103 XImage * xImage; | |
104 Pixmap Mask; | |
105 int Decorations; | |
106 | |
107 int State; | |
108 int Visible; | |
109 int Mapped; | |
110 int Focused; | |
111 int Rolled; | |
112 | |
113 wsTReDraw ReDraw; | |
114 wsTReSize ReSize; | |
115 wsTIdle Idle; | |
116 wsTKeyHandler KeyHandler; | |
117 wsTMouseHandler MouseHandler; | |
118 wsRemoteHandler RemoteHandler; | |
119 | |
120 int Alt; | |
121 int Shift; | |
122 int Control; | |
123 int NumLock; | |
124 int CapsLock; | |
125 // --- Misc ------------------------------------------------------------------------------------- | |
126 | |
127 Atom AtomDeleteWindow; | |
128 Atom AtomTakeFocus; | |
129 Atom AtomRolle; | |
130 Atom AtomProtocols; | |
131 Atom AtomsProtocols[3]; | |
132 Atom AtomLeaderClient; | |
133 Atom AtomRemote; | |
134 | |
135 XShmSegmentInfo Shminfo; | |
136 unsigned char * ImageData; | |
137 unsigned short int * ImageDataw; | |
138 unsigned int * ImageDatadw; | |
139 GC wGC; | |
140 XGCValues wGCV; | |
141 unsigned long WindowMask; | |
142 XVisualInfo VisualInfo; | |
143 XWindowAttributes Attribs; | |
144 XSetWindowAttributes WindowAttrib; | |
145 XSizeHints SizeHint; | |
146 XWMHints WMHints; | |
147 | |
148 XFontStruct * Font; | |
149 int FontHeight; | |
150 | |
151 Cursor wsCursor; | |
152 char wsCursorData[1]; | |
153 Pixmap wsCursorPixmap; | |
154 int wsMouseEventType; | |
155 XColor wsColor; | |
156 } wsTWindow; | |
157 | |
158 extern unsigned int wsMaxX; | |
159 extern unsigned int wsMaxY; | |
160 | |
161 extern Display * wsDisplay; | |
162 extern int wsScreen; | |
163 extern Window wsRootWin; | |
164 | |
165 extern unsigned char * wsImageData; | |
166 | |
167 extern XEvent wsEvent; | |
168 | |
169 extern int wsDepthOnScreen; | |
170 extern int wsRedMask; | |
171 extern int wsGreenMask; | |
172 extern int wsBlueMask; | |
173 | |
174 extern int wsUseXShm; | |
175 extern int wsUseDGA; | |
176 | |
177 // ---------------------------------------------------------------------------------------------- | |
178 // wsKeyTable | |
179 // ---------------------------------------------------------------------------------------------- | |
180 extern unsigned long wsKeyTable[512]; | |
181 | |
182 extern void wsXDone( void ); | |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1693
diff
changeset
|
183 extern void wsXInit( void* disp ); |
1693 | 184 |
185 extern int wsGetDepthOnScreen( void ); | |
186 | |
187 extern void wsDoExit( void ); | |
188 extern void wsMainLoop( void ); | |
189 | |
190 // ---------------------------------------------------------------------------------------------- | |
191 // wsCrateWindow: create a new window on the screen. | |
192 // X,Y : window position | |
193 // wX,hY : window size | |
194 // bW : window frame size | |
195 // cV : mouse cursor visible | |
196 // D : "decoration", visible titlebar, etc ... | |
197 // ---------------------------------------------------------------------------------------------- | |
198 extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label ); | |
199 extern void wsDestroyWindow( wsTWindow * win ); | |
200 extern void wsMoveWindow( wsTWindow * win,int x, int y ); | |
201 extern void wsResizeWindow( wsTWindow * win,int sx, int sy ); | |
202 extern void wsIconify( wsTWindow win ); | |
203 extern void wsMoveTopWindow( wsTWindow * win ); | |
204 extern void wsSetBackground( wsTWindow * win,int color ); | |
1814 | 205 extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b ); |
1693 | 206 extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b ); |
207 #define wsClearWindow( win ); XClearWindow( wsDisplay,win.WindowID ); | |
208 extern void wsSetTitle( wsTWindow * win,char * name ); | |
209 extern void wsVisibleWindow( wsTWindow * win,int show ); | |
210 extern void wsWindowDecoration( wsTWindow * win,long d ); | |
211 extern void wsFullScreen( wsTWindow * win ); | |
212 extern void wsPostRedisplay( wsTWindow * win ); | |
213 extern void wsSetShape( wsTWindow * win,char * data ); | |
214 | |
215 // ---------------------------------------------------------------------------------------------- | |
216 // Draw string at x,y with fc ( foreground color ) and bc ( background color ). | |
217 // ---------------------------------------------------------------------------------------------- | |
218 extern void wsDrawString( wsTWindow win,int x,int y,char * str,int fc,int bc ); | |
219 extern int wsTextWidth( wsTWindow win,char * str ); | |
220 | |
221 // ---------------------------------------------------------------------------------------------- | |
222 // Show / hide mouse cursor. | |
223 // ---------------------------------------------------------------------------------------------- | |
224 extern void wsVisibleMouse( wsTWindow * win,int m ); | |
225 extern void wsSetMousePosition( wsTWindow * win,int x, int y ); | |
226 | |
227 // ---------------------------------------------------------------------------------------------- | |
228 // Image handling | |
229 // ---------------------------------------------------------------------------------------------- | |
1858
88a88d0a3f94
fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents:
1853
diff
changeset
|
230 extern void wsCreateImage( wsTWindow * win,int Width,int Height ); |
1693 | 231 extern void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size ); |
232 extern void wsPutImage( wsTWindow * win ); | |
1858
88a88d0a3f94
fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents:
1853
diff
changeset
|
233 extern void wsResizeImage( wsTWindow * win,int Width,int Height ); |
1693 | 234 extern void wsDestroyImage( wsTWindow * win ); |
235 extern int wsGetOutMask( void ); | |
236 | |
237 extern void wsScreenSaverOn( Display *mDisplay ); | |
238 extern void wsScreenSaverOff( Display * mDisplay ); | |
239 | |
2082 | 240 #endif |
241 |