Mercurial > mplayer.hg
annotate gui/wm/ws.h @ 35665:c31b82bd6092
Remove unused code and declarations.
author | ib |
---|---|
date | Thu, 17 Jan 2013 14:56:27 +0000 |
parents | 8de55114a330 |
children | 01ac3cd2f101 |
rev | line source |
---|---|
26458 | 1 /* |
2 * AutoSpace Window System for Linux/Win32 v0.61 | |
3 * written by pontscho/fresh!mindworkz | |
4 * | |
5 * This file is part of MPlayer. | |
6 * | |
7 * MPlayer is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
11 * | |
12 * MPlayer is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License along | |
18 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 */ | |
23077 | 21 |
26029 | 22 #ifndef MPLAYER_GUI_WS_H |
23 #define MPLAYER_GUI_WS_H | |
23077 | 24 |
35529 | 25 #include "gui/dialog/dialog.h" |
35450 | 26 #include "config.h" |
33529 | 27 |
23077 | 28 #include <X11/Xlib.h> |
29 #include <X11/Xutil.h> | |
30 #include <X11/keysym.h> | |
31 #include <X11/Xatom.h> | |
34465 | 32 #ifdef HAVE_SHM |
23077 | 33 #include <X11/extensions/XShm.h> |
34465 | 34 #endif |
23077 | 35 |
36 #define wsKeyReleased 0 | |
37 #define wsKeyPressed 1 | |
38 | |
39 #define wsPLMouseButton 1 | |
40 #define wsPMMouseButton 2 | |
41 #define wsPRMouseButton 3 | |
42 #define wsP4MouseButton 4 | |
43 #define wsP5MouseButton 5 | |
44 #define wsRLMouseButton (1 + 128) | |
45 #define wsRMMouseButton (2 + 128) | |
46 #define wsRRMouseButton (3 + 128) | |
47 #define wsR4MouseButton (4 + 128) | |
48 #define wsR5MouseButton (5 + 128) | |
49 #define wsEnterWindow 253 | |
50 #define wsLeaveWindow 254 | |
51 #define wsMoveMouse 255 | |
52 | |
53 #define wsShowMouseCursor 1 | |
54 #define wsHideMouseCursor 0 | |
55 #define wsHandleMouseButton 2 | |
56 #define wsHandleMouseMove 4 | |
57 | |
58 #define wsHideFrame 0 | |
59 #define wsShowFrame 1 | |
60 #define wsMaxSize 2 | |
61 #define wsMinSize 4 | |
62 #define wsShowWindow 8 | |
63 #define wsHideWindow 16 | |
64 #define wsOverredirect 32 | |
35652 | 65 #define wsWaitMap 64 |
35657 | 66 #define wsAspect 128 |
23077 | 67 |
68 #define wsRGB32 1 | |
69 #define wsBGR32 2 | |
70 #define wsRGB24 3 | |
71 #define wsBGR24 4 | |
72 #define wsRGB16 5 | |
73 #define wsBGR16 6 | |
74 #define wsRGB15 7 | |
75 #define wsBGR15 8 | |
76 | |
35499
af72f85b6f44
Define symbolic constant wsNone for "no window state".
ib
parents:
35498
diff
changeset
|
77 #define wsNone 0 |
23077 | 78 #define wsWindowVisible 1 |
79 #define wsWindowPartialVisible 2 | |
80 #define wsWindowNotVisible 4 | |
81 #define wsWindowMapped 8 | |
82 #define wsWindowUnmapped 16 | |
83 #define wsWindowFocusIn 32 | |
84 #define wsWindowFocusOut 64 | |
85 #define wsWindowExpose 128 | |
86 #define wsWindowRolled 256 | |
87 #define wsWindowClosed 512 | |
88 | |
35498
c505a4aa9582
Rename wsNone wsNo and use it instead of a numeric constant.
ib
parents:
35497
diff
changeset
|
89 #define wsNo 0 |
23077 | 90 #define wsMapped 1 |
91 #define wsFocused 2 | |
92 #define wsVisible 3 | |
93 #define wsNotVisible 4 | |
94 #define wsPVisible 5 | |
95 #define wsRolled 6 | |
96 | |
33539 | 97 typedef void (*wsTReDraw)(void); |
98 typedef void (*wsTReSize)(unsigned int X, unsigned int Y, unsigned int width, unsigned int height); | |
99 typedef void (*wsTIdle)(void); | |
100 typedef void (*wsTKeyHandler)(int KeyCode, int Type, int Key); | |
101 typedef void (*wsTMouseHandler)(int Button, int X, int Y, int RX, int RY); | |
102 typedef void (*wsTDNDHandler)(int num, char **str); | |
23077 | 103 |
33539 | 104 typedef struct { |
105 Window WindowID; | |
106 Window Parent; | |
107 int X, Y, Width, Height; | |
108 int OldX, OldY, OldWidth, OldHeight; | |
109 int MaxX, MaxY; | |
110 int isFullScreen; | |
111 int BorderWidth; | |
112 int Property; | |
113 unsigned char *bImage; | |
114 XImage *xImage; | |
115 Pixmap Mask; | |
116 int Decorations; | |
23077 | 117 |
33539 | 118 int State; |
119 int Visible; | |
120 int Mapped; | |
121 int Focused; | |
122 int Rolled; | |
23077 | 123 |
33539 | 124 wsTReDraw ReDraw; |
125 wsTReSize ReSize; | |
126 wsTIdle Idle; | |
127 wsTKeyHandler KeyHandler; | |
128 wsTMouseHandler MouseHandler; | |
129 wsTDNDHandler DandDHandler; | |
23077 | 130 |
33539 | 131 int Alt; |
132 int Shift; | |
133 int Control; | |
134 int NumLock; | |
135 int CapsLock; | |
34684 | 136 /* Misc ------------------------------------------------------------------------------------- */ |
23077 | 137 |
33539 | 138 Atom AtomDeleteWindow; |
139 Atom AtomTakeFocus; | |
140 Atom AtomRolle; | |
141 Atom AtomProtocols; | |
142 Atom AtomsProtocols[3]; | |
143 Atom AtomLeaderClient; | |
144 Atom AtomRemote; | |
145 Atom AtomWMSizeHint; | |
146 Atom AtomWMNormalHint; | |
23077 | 147 |
34465 | 148 #ifdef HAVE_SHM |
33539 | 149 XShmSegmentInfo Shminfo; |
34465 | 150 #endif |
33539 | 151 unsigned char *ImageData; |
152 unsigned short int *ImageDataw; | |
153 unsigned int *ImageDatadw; | |
154 GC wGC; | |
155 XGCValues wGCV; | |
156 unsigned long WindowMask; | |
157 XVisualInfo VisualInfo; | |
158 XSetWindowAttributes WindowAttrib; | |
159 XWMHints WMHints; | |
23077 | 160 |
33539 | 161 XFontStruct *Font; |
162 int FontHeight; | |
23077 | 163 |
33539 | 164 Cursor wsCursor; |
165 char wsCursorData[1]; | |
166 Pixmap wsCursorPixmap; | |
167 int wsMouseEventType; | |
168 XColor wsColor; | |
35656 | 169 } wsWindow; |
23077 | 170 |
33539 | 171 extern int wsMaxX; |
172 extern int wsMaxY; | |
173 extern int wsOrgX; | |
174 extern int wsOrgY; | |
23077 | 175 |
33539 | 176 extern Display *wsDisplay; |
23077 | 177 |
33539 | 178 extern int wsDepthOnScreen; |
23077 | 179 |
180 // ---------------------------------------------------------------------------------------------- | |
181 // wsKeyTable | |
182 // ---------------------------------------------------------------------------------------------- | |
33539 | 183 void wsXDone(void); |
35631 | 184 void wsXInit(Display *display); |
35636 | 185 void wsSetErrorHandler(void); |
23077 | 186 |
33539 | 187 int wsGetDepthOnScreen(void); |
23077 | 188 |
34083 | 189 void wsAutohideCursor(void); |
35637 | 190 Bool wsEvents(XEvent *event); |
33539 | 191 void wsHandleEvents(void); |
23077 | 192 |
35656 | 193 void wsCreateWindow(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label); |
194 void wsDestroyWindow(wsWindow *win); | |
195 void wsMoveWindow(wsWindow *win, Bool abs, int x, int y); | |
196 void wsMoveWindowWithin(wsWindow *win, Bool abs, int x, int y); | |
197 void wsResizeWindow(wsWindow *win, int sx, int sy); | |
198 void wsIconify(wsWindow *win); | |
35631 | 199 void wsRaiseWindowTop(Display *display, Window Win); |
35656 | 200 void wsSetBackgroundRGB(wsWindow *win, int r, int g, int b); |
201 void wsClearWindow(wsWindow *win); | |
202 void wsSetTitle(wsWindow *win, char *name); | |
203 void wsVisibleWindow(wsWindow *win, int show); | |
204 void wsWindowDecoration(wsWindow *win, Bool decor); | |
35642 | 205 void wsSetLayer(Display *display, Window Win, Bool fullscreen); |
35656 | 206 void wsFullScreen(wsWindow *win); |
207 void wsPostRedisplay(wsWindow *win); | |
208 void wsSetShape(wsWindow *win, char *data); | |
35631 | 209 void wsSetIcon(Display *display, Window Win, guiIcon_t *icon); |
23077 | 210 |
211 // ---------------------------------------------------------------------------------------------- | |
212 // Show / hide mouse cursor. | |
213 // ---------------------------------------------------------------------------------------------- | |
35656 | 214 void wsVisibleMouse(wsWindow *win, int m); |
23077 | 215 |
216 // ---------------------------------------------------------------------------------------------- | |
217 // Image handling | |
218 // ---------------------------------------------------------------------------------------------- | |
35656 | 219 void wsCreateImage(wsWindow *win, int Width, int Height); |
220 void wsConvert(wsWindow *win, unsigned char *Image); | |
221 void wsPutImage(wsWindow *win); | |
222 void wsResizeImage(wsWindow *win, int Width, int Height); | |
223 void wsDestroyImage(wsWindow *win); | |
33539 | 224 int wsGetOutMask(void); |
23077 | 225 |
33539 | 226 #define wgIsRect(X, Y, tX, tY, bX, bY) (((X) > (tX)) && ((Y) > (tY)) && ((X) < (bX)) && ((Y) < (bY))) |
23077 | 227 |
26029 | 228 #endif /* MPLAYER_GUI_WS_H */ |