annotate gui/wm/ws.h @ 27839:9a46fffef0fc

vobsub: add sanity check
author aurel
date Sat, 01 Nov 2008 13:51:39 +0000
parents d58d06eafe83
children 9e739bdb049c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
2 * AutoSpace Window System for Linux/Win32 v0.61
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
3 * written by pontscho/fresh!mindworkz
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
4 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
5 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
6 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
7 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
8 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
10 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
11 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
12 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
15 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
16 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
17 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
18 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26029
diff changeset
20 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
22 #ifndef MPLAYER_GUI_WS_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
23 #define MPLAYER_GUI_WS_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 #include <X11/Xlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26 #include <X11/Xutil.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #include <X11/keysym.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 #include <X11/Xatom.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 #include <X11/extensions/XShm.h>
27377
d58d06eafe83 Change a bunch of X11-specific preprocessor directives.
diego
parents: 26458
diff changeset
30 #ifdef CONFIG_XDPMS
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 #include <X11/extensions/dpms.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 #define wsKeyReleased 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 #define wsKeyPressed 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 #define wsShift (1L<<0)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 #define wsLock (1L<<1)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 #define wsCtrl (1L<<2)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 #define wsAlt (1L<<3)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 #define wsPLMouseButton 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 #define wsPMMouseButton 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 #define wsPRMouseButton 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 #define wsP4MouseButton 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 #define wsP5MouseButton 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 #define wsRLMouseButton (1 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 #define wsRMMouseButton (2 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 #define wsRRMouseButton (3 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 #define wsR4MouseButton (4 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 #define wsR5MouseButton (5 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 #define wsEnterWindow 253
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #define wsLeaveWindow 254
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #define wsMoveMouse 255
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 #define wsShowMouseCursor 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 #define wsMouse 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 #define wsHideMouseCursor 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 #define wsNoMouse 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 #define wsHandleMouseButton 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 #define wsHandleMouseMove 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 #define wsHideFrame 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 #define wsNoFrame 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 #define wsShowFrame 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 #define wsFrame 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 #define wsMaxSize 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 #define wsMinSize 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 #define wsShowWindow 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 #define wsHideWindow 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 #define wsOverredirect 32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 #define wsNoBorder 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 #define wsSysName "AutoSpace Window System LiTe"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 #define wsRGB32 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 #define wsBGR32 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 #define wsRGB24 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 #define wsBGR24 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 #define wsRGB16 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 #define wsBGR16 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 #define wsRGB15 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 #define wsBGR15 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 #define wsWindowVisible 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 #define wsWindowPartialVisible 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 #define wsWindowNotVisible 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 #define wsWindowMapped 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 #define wsWindowUnmapped 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 #define wsWindowFocusIn 32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 #define wsWindowFocusOut 64
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 #define wsWindowExpose 128
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 #define wsWindowRolled 256
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 #define wsWindowClosed 512
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 #define wsNone 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 #define wsMapped 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 #define wsFocused 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 #define wsVisible 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 #define wsNotVisible 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 #define wsPVisible 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 #define wsRolled 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 #define wsWMUnknown 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 #define wsWMNetWM 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107 #define wsWMKDE 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 #define wsWMIceWM 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 #define wsWMWMaker 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 typedef void (*wsTReDraw)( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 typedef void (*wsTReSize)( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 typedef void (*wsTIdle)( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 typedef void (*wsTKeyHandler)( int KeyCode,int Type,int Key );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 typedef void (*wsTMouseHandler)( int Button,int X,int Y,int RX,int RY );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116 typedef void (*wsTDNDHandler)( int num,char ** str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 Window WindowID;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 Window Parent;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 int X,Y,Width,Height;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 int OldX,OldY,OldWidth,OldHeight;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 int MaxX,MaxY;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 int isFullScreen;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 int BorderWidth;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 int Property;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 unsigned char * bImage;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 XImage * xImage;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 Pixmap Mask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 int Decorations;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 int State;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 int Visible;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 int Mapped;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 int Focused;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 int Rolled;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139 wsTReDraw ReDraw;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 wsTReSize ReSize;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 wsTIdle Idle;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 wsTKeyHandler KeyHandler;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 wsTMouseHandler MouseHandler;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144 wsTDNDHandler DandDHandler;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 int Alt;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 int Shift;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 int Control;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 int NumLock;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 int CapsLock;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 // --- Misc -------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 Atom AtomDeleteWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 Atom AtomTakeFocus;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 Atom AtomRolle;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 Atom AtomProtocols;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 Atom AtomsProtocols[3];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 Atom AtomLeaderClient;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 Atom AtomRemote;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 Atom AtomWMSizeHint;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 Atom AtomWMNormalHint;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 XShmSegmentInfo Shminfo;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 unsigned char * ImageData;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 unsigned short int * ImageDataw;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 unsigned int * ImageDatadw;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 GC wGC;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168 XGCValues wGCV;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 unsigned long WindowMask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 XVisualInfo VisualInfo;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 XSetWindowAttributes WindowAttrib;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 XSizeHints SizeHint;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 XWMHints WMHints;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 XFontStruct * Font;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 int FontHeight;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 Cursor wsCursor;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 char wsCursorData[1];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 Pixmap wsCursorPixmap;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 int wsMouseEventType;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 XColor wsColor;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 } wsTWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 extern int wsMaxX;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 extern int wsMaxY;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 extern int wsOrgX;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 extern int wsOrgY;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190 extern Display * wsDisplay;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 extern int wsScreen;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192 extern Window wsRootWin;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 extern int wsLayer;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195 extern unsigned char * wsImageData;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197 extern XEvent wsEvent;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 extern int wsDepthOnScreen;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 extern int wsRedMask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 extern int wsGreenMask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 extern int wsBlueMask;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 extern int wsUseXShm;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207 // wsKeyTable
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 extern unsigned long wsKeyTable[512];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 extern void wsXDone( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 extern void wsXInit( void* disp );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
214 extern int wsGetDepthOnScreen( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
216 extern void wsDoExit( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217 extern void wsMainLoop( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
218 extern Bool wsEvents( Display * display,XEvent * Event,XPointer arg );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
219 extern void wsHandleEvents( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
220
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
221 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
222 // wsCrateWindow: create a new window on the screen.
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223 // X,Y : window position
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
224 // wX,hY : window size
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
225 // bW : window frame size
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
226 // cV : mouse cursor visible
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
227 // D : "decoration", visible titlebar, etc ...
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
228 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
229 extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
230 extern void wsDestroyWindow( wsTWindow * win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
231 extern void wsMoveWindow( wsTWindow * win,int b,int x, int y );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
232 extern void wsResizeWindow( wsTWindow * win,int sx, int sy );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
233 extern void wsIconify( wsTWindow win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
234 extern void wsMoveTopWindow( Display * wsDisplay,Window win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
235 extern void wsSetBackground( wsTWindow * win,int color );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
236 extern void wsSetForegroundRGB( wsTWindow * win,int r,int g,int b );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
237 extern void wsSetBackgroundRGB( wsTWindow * win,int r,int g,int b );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
238 #define wsClearWindow( win ) XClearWindow( wsDisplay,win.WindowID )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
239 extern void wsSetTitle( wsTWindow * win,char * name );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
240 extern void wsVisibleWindow( wsTWindow * win,int show );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
241 extern void wsWindowDecoration( wsTWindow * win,long d );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
242 extern void wsSetLayer( Display * wsDisplay,Window win, int layer );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
243 extern void wsFullScreen( wsTWindow * win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
244 extern void wsPostRedisplay( wsTWindow * win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
245 extern void wsSetShape( wsTWindow * win,char * data );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
246 extern void wsSetIcon( Display * dsp,Window win,Pixmap icon,Pixmap mask );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
247
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
248 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
249 // Draw string at x,y with fc ( foreground color ) and bc ( background color ).
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
250 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
251 extern void wsDrawString( wsTWindow win,int x,int y,char * str,int fc,int bc );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
252 extern int wsTextWidth( wsTWindow win,char * str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
253
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
254 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
255 // Show / hide mouse cursor.
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
256 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
257 extern void wsVisibleMouse( wsTWindow * win,int m );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
258 extern void wsSetMousePosition( wsTWindow * win,int x, int y );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
259
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
260 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
261 // Image handling
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
262 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
263 extern void wsCreateImage( wsTWindow * win,int Width,int Height );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
264 extern void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
265 extern void wsPutImage( wsTWindow * win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
266 extern void wsResizeImage( wsTWindow * win,int Width,int Height );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
267 extern void wsDestroyImage( wsTWindow * win );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
268 extern int wsGetOutMask( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
269
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
270 extern void wsScreenSaverOn( Display *mDisplay );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
271 extern void wsScreenSaverOff( Display * mDisplay );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
272
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
273 #define wgIsRect( X,Y,tX,tY,bX,bY ) ( ( (X) > (tX) )&&( (Y) > (tY) )&&( (X) < (bX) )&&( (Y) < (bY) ) )
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
274
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
275 #endif /* MPLAYER_GUI_WS_H */