annotate gui/wm/ws.h @ 33556:520fb0f7544c

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