annotate gui/wm/ws.h @ 35369:dac86d3464e2

Also free the noauth_url entry in the URL struct.
author reimar
date Fri, 23 Nov 2012 19:26:01 +0000
parents 80fe9ad7f318
children 31a5320909f7
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
33556
520fb0f7544c Rename GUI directory 'mplayer' and some files in it.
ib
parents: 33548
diff changeset
25 #include "gui/ui/widgets.h"
33529
276eef06fb3d Store icon data in a struct variable.
ib
parents: 33463
diff changeset
26
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 #include <X11/Xlib.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 #include <X11/Xutil.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 #include <X11/keysym.h>
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 #include <X11/Xatom.h>
34465
3c1a1038bfc7 Properly handle the lack of XShm.
ib
parents: 34408
diff changeset
31 #ifdef HAVE_SHM
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 #include <X11/extensions/XShm.h>
34465
3c1a1038bfc7 Properly handle the lack of XShm.
ib
parents: 34408
diff changeset
33 #endif
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 #define wsKeyReleased 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 #define wsKeyPressed 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
38 #define wsShift (1L << 0)
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
39 #define wsLock (1L << 1)
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
40 #define wsCtrl (1L << 2)
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
41 #define wsAlt (1L << 3)
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 #define wsPLMouseButton 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 #define wsPMMouseButton 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 #define wsPRMouseButton 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 #define wsP4MouseButton 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 #define wsP5MouseButton 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 #define wsRLMouseButton (1 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 #define wsRMMouseButton (2 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 #define wsRRMouseButton (3 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 #define wsR4MouseButton (4 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 #define wsR5MouseButton (5 + 128)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #define wsEnterWindow 253
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #define wsLeaveWindow 254
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 #define wsMoveMouse 255
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 #define wsShowMouseCursor 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 #define wsMouse 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 #define wsHideMouseCursor 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 #define wsNoMouse 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 #define wsHandleMouseButton 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 #define wsHandleMouseMove 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 #define wsHideFrame 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 #define wsNoFrame 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 #define wsShowFrame 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 #define wsFrame 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 #define wsMaxSize 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 #define wsMinSize 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 #define wsShowWindow 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 #define wsHideWindow 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 #define wsOverredirect 32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 #define wsNoBorder 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 #define wsSysName "AutoSpace Window System LiTe"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 #define wsRGB32 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 #define wsBGR32 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 #define wsRGB24 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 #define wsBGR24 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 #define wsRGB16 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 #define wsBGR16 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 #define wsRGB15 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 #define wsBGR15 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 #define wsWindowVisible 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 #define wsWindowPartialVisible 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 #define wsWindowNotVisible 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 #define wsWindowMapped 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 #define wsWindowUnmapped 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 #define wsWindowFocusIn 32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 #define wsWindowFocusOut 64
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 #define wsWindowExpose 128
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 #define wsWindowRolled 256
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 #define wsWindowClosed 512
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 #define wsNone 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 #define wsMapped 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 #define wsFocused 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 #define wsVisible 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 #define wsNotVisible 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 #define wsPVisible 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 #define wsRolled 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 #define wsWMUnknown 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107 #define wsWMNetWM 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 #define wsWMKDE 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 #define wsWMIceWM 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 #define wsWMWMaker 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
112 typedef void (*wsTReDraw)(void);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
113 typedef void (*wsTReSize)(unsigned int X, unsigned int Y, unsigned int width, unsigned int height);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
114 typedef void (*wsTIdle)(void);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
115 typedef void (*wsTKeyHandler)(int KeyCode, int Type, int Key);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
116 typedef void (*wsTMouseHandler)(int Button, int X, int Y, int RX, int RY);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
117 typedef void (*wsTDNDHandler)(int num, char **str);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
119 typedef struct {
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
120 Window WindowID;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
121 Window Parent;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
122 int X, Y, Width, Height;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
123 int OldX, OldY, OldWidth, OldHeight;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
124 int MaxX, MaxY;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
125 int isFullScreen;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
126 int BorderWidth;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
127 int Property;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
128 unsigned char *bImage;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
129 XImage *xImage;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
130 Pixmap Mask;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
131 int Decorations;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
133 int State;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
134 int Visible;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
135 int Mapped;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
136 int Focused;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
137 int Rolled;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
139 wsTReDraw ReDraw;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
140 wsTReSize ReSize;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
141 wsTIdle Idle;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
142 wsTKeyHandler KeyHandler;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
143 wsTMouseHandler MouseHandler;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
144 wsTDNDHandler DandDHandler;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
146 int Alt;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
147 int Shift;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
148 int Control;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
149 int NumLock;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
150 int CapsLock;
34684
b03481253518 Cosmetic: Prefer C style for single line comments.
ib
parents: 34465
diff changeset
151 /* Misc ------------------------------------------------------------------------------------- */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
153 Atom AtomDeleteWindow;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
154 Atom AtomTakeFocus;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
155 Atom AtomRolle;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
156 Atom AtomProtocols;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
157 Atom AtomsProtocols[3];
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
158 Atom AtomLeaderClient;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
159 Atom AtomRemote;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
160 Atom AtomWMSizeHint;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
161 Atom AtomWMNormalHint;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162
34465
3c1a1038bfc7 Properly handle the lack of XShm.
ib
parents: 34408
diff changeset
163 #ifdef HAVE_SHM
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
164 XShmSegmentInfo Shminfo;
34465
3c1a1038bfc7 Properly handle the lack of XShm.
ib
parents: 34408
diff changeset
165 #endif
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
166 unsigned char *ImageData;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
167 unsigned short int *ImageDataw;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
168 unsigned int *ImageDatadw;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
169 GC wGC;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
170 XGCValues wGCV;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
171 unsigned long WindowMask;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
172 XVisualInfo VisualInfo;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
173 XSetWindowAttributes WindowAttrib;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
174 XSizeHints SizeHint;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
175 XWMHints WMHints;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
177 XFontStruct *Font;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
178 int FontHeight;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
180 Cursor wsCursor;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
181 char wsCursorData[1];
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
182 Pixmap wsCursorPixmap;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
183 int wsMouseEventType;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
184 XColor wsColor;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 } wsTWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
187 extern int wsMaxX;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
188 extern int wsMaxY;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
189 extern int wsOrgX;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
190 extern int wsOrgY;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
192 extern Display *wsDisplay;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
193 extern int wsScreen;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
194 extern Window wsRootWin;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
195 extern int wsLayer;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
197 extern unsigned char *wsImageData;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
199 extern XEvent wsEvent;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
201 extern int wsDepthOnScreen;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
202 extern int wsRedMask;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
203 extern int wsGreenMask;
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
204 extern int wsBlueMask;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
206 extern int wsUseXShm;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 // wsKeyTable
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 // ----------------------------------------------------------------------------------------------
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
211 extern unsigned long wsKeyTable[512];
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
213 void wsXDone(void);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
214 void wsXInit(Display *disp);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
216 int wsGetDepthOnScreen(void);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
218 void wsDoExit(void);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
219 void wsMainLoop(void);
34083
0a44fc1d4e72 Simplify wsAutohideCursor().
ib
parents: 34081
diff changeset
220 void wsAutohideCursor(void);
33541
729826b857cf Avoid compiler warnings.
ib
parents: 33539
diff changeset
221 Bool wsEvents(Display *display, XEvent *Event);
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
222 void wsHandleEvents(void);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
224 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
225 // wsCrateWindow: create a new window on the screen.
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
226 // X,Y : window position
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
227 // wX,hY : window size
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
228 // bW : window frame size
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
229 // cV : mouse cursor visible
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
230 // D : "decoration", visible titlebar, etc ...
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
231 // ----------------------------------------------------------------------------------------------
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
232 void wsCreateWindow(wsTWindow *win, int X, int Y, int wX, int hY, int bW, int cV, unsigned char D, char *label);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
233 void wsDestroyWindow(wsTWindow *win);
33993
57d711d3dcca Change parameter b of wsMoveWindow().
ib
parents: 33990
diff changeset
234 void wsMoveWindow(wsTWindow *win, Bool abs, int x, int y);
33998
ca20e4098c1d Preserve x and y position of a double-size window if possible.
ib
parents: 33993
diff changeset
235 void wsMoveWindowWithin(wsTWindow *win, Bool abs, int x, int y);
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
236 void wsResizeWindow(wsTWindow *win, int sx, int sy);
35355
c8478a499a17 Pass big parameter by reference rather than by value.
ib
parents: 34684
diff changeset
237 void wsIconify(wsTWindow *win);
33999
3cf824f66821 Cosmetic: Rename all Display parameters dsp dpy.
ib
parents: 33998
diff changeset
238 void wsRaiseWindowTop(Display *dpy, Window win);
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
239 void wsSetBackground(wsTWindow *win, int color);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
240 void wsSetForegroundRGB(wsTWindow *win, int r, int g, int b);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
241 void wsSetBackgroundRGB(wsTWindow *win, int r, int g, int b);
35357
80fe9ad7f318 Pass guiApp's wsTWindow parameters always by reference (if possible).
ib
parents: 35356
diff changeset
242 #define wsClearWindow(win) XClearWindow(wsDisplay, (win)->WindowID)
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
243 void wsSetTitle(wsTWindow *win, char *name);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
244 void wsVisibleWindow(wsTWindow *win, int show);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
245 void wsWindowDecoration(wsTWindow *win, long d);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
246 void wsSetLayer(Display *wsDisplay, Window win, int layer);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
247 void wsFullScreen(wsTWindow *win);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
248 void wsPostRedisplay(wsTWindow *win);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
249 void wsSetShape(wsTWindow *win, char *data);
33999
3cf824f66821 Cosmetic: Rename all Display parameters dsp dpy.
ib
parents: 33998
diff changeset
250 void wsSetIcon(Display *dpy, Window win, guiIcon_t *icon);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
251
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
252 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
253 // Show / hide mouse cursor.
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
254 // ----------------------------------------------------------------------------------------------
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
255 void wsVisibleMouse(wsTWindow *win, int m);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
256 void wsSetMousePosition(wsTWindow *win, int x, int y);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
257
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
258 // ----------------------------------------------------------------------------------------------
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
259 // Image handling
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
260 // ----------------------------------------------------------------------------------------------
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
261 void wsCreateImage(wsTWindow *win, int Width, int Height);
33548
55b8f5d5df15 Remove unused parameter 'Size' in wsConvert().
ib
parents: 33541
diff changeset
262 void wsConvert(wsTWindow *win, unsigned char *Image);
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
263 void wsPutImage(wsTWindow *win);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
264 void wsResizeImage(wsTWindow *win, int Width, int Height);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
265 void wsDestroyImage(wsTWindow *win);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
266 int wsGetOutMask(void);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
267
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
268 void wsScreenSaverOn(Display *mDisplay);
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
269 void wsScreenSaverOff(Display *mDisplay);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
270
33539
5bdc088113f7 Cosmetic: Format to MPlayer coding style.
ib
parents: 33529
diff changeset
271 #define wgIsRect(X, Y, tX, tY, bX, bY) (((X) > (tX)) && ((Y) > (tY)) && ((X) < (bX)) && ((Y) < (bY)))
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
272
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
273 #endif /* MPLAYER_GUI_WS_H */