Mercurial > mplayer.hg
annotate gui/wm/ws.h @ 35679:23183b261ca9
Remove unused structure member wGCV.
Additionally, change parameters to XCreateGC() call, because no
XGCValues are actually being set.
author | ib |
---|---|
date | Thu, 17 Jan 2013 18:01:06 +0000 |
parents | 2261c68180a7 |
children | 80c5c89f77d6 |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
35666
01ac3cd2f101
Cosmetic: Relocate and revise comments on code origin.
ib
parents:
35665
diff
changeset
|
17 * |
01ac3cd2f101
Cosmetic: Relocate and revise comments on code origin.
ib
parents:
35665
diff
changeset
|
18 * based on: AutoSpace Window System for Linux/Win32, |
01ac3cd2f101
Cosmetic: Relocate and revise comments on code origin.
ib
parents:
35665
diff
changeset
|
19 * written by pontscho/fresh!mindworkz |
26458 | 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 (*wsTKeyHandler)(int KeyCode, int Type, int Key); | |
99 typedef void (*wsTMouseHandler)(int Button, int X, int Y, int RX, int RY); | |
100 typedef void (*wsTDNDHandler)(int num, char **str); | |
23077 | 101 |
33539 | 102 typedef struct { |
103 Window WindowID; | |
104 Window Parent; | |
105 int X, Y, Width, Height; | |
106 int OldX, OldY, OldWidth, OldHeight; | |
107 int MaxX, MaxY; | |
108 int isFullScreen; | |
109 int BorderWidth; | |
110 int Property; | |
111 unsigned char *bImage; | |
112 XImage *xImage; | |
113 Pixmap Mask; | |
114 int Decorations; | |
23077 | 115 |
33539 | 116 int State; |
117 int Visible; | |
118 int Mapped; | |
119 int Focused; | |
120 int Rolled; | |
23077 | 121 |
33539 | 122 wsTReDraw ReDraw; |
123 wsTKeyHandler KeyHandler; | |
124 wsTMouseHandler MouseHandler; | |
125 wsTDNDHandler DandDHandler; | |
23077 | 126 |
33539 | 127 int Alt; |
128 int Shift; | |
129 int Control; | |
130 int NumLock; | |
131 int CapsLock; | |
34684 | 132 /* Misc ------------------------------------------------------------------------------------- */ |
23077 | 133 |
33539 | 134 Atom AtomDeleteWindow; |
135 Atom AtomTakeFocus; | |
136 Atom AtomRolle; | |
137 Atom AtomProtocols; | |
138 Atom AtomsProtocols[3]; | |
139 Atom AtomLeaderClient; | |
140 Atom AtomRemote; | |
141 Atom AtomWMSizeHint; | |
142 Atom AtomWMNormalHint; | |
23077 | 143 |
34465 | 144 #ifdef HAVE_SHM |
33539 | 145 XShmSegmentInfo Shminfo; |
34465 | 146 #endif |
33539 | 147 unsigned char *ImageData; |
148 unsigned short int *ImageDataw; | |
149 unsigned int *ImageDatadw; | |
150 GC wGC; | |
151 unsigned long WindowMask; | |
152 XVisualInfo VisualInfo; | |
153 XSetWindowAttributes WindowAttrib; | |
154 XWMHints WMHints; | |
23077 | 155 |
33539 | 156 XFontStruct *Font; |
157 int FontHeight; | |
23077 | 158 |
33539 | 159 Cursor wsCursor; |
160 char wsCursorData[1]; | |
161 Pixmap wsCursorPixmap; | |
162 int wsMouseEventType; | |
163 XColor wsColor; | |
35656 | 164 } wsWindow; |
23077 | 165 |
33539 | 166 extern int wsMaxX; |
167 extern int wsMaxY; | |
168 extern int wsOrgX; | |
169 extern int wsOrgY; | |
23077 | 170 |
33539 | 171 extern Display *wsDisplay; |
23077 | 172 |
173 // ---------------------------------------------------------------------------------------------- | |
33539 | 174 void wsXDone(void); |
35631 | 175 void wsXInit(Display *display); |
35636 | 176 void wsSetErrorHandler(void); |
23077 | 177 |
34083 | 178 void wsAutohideCursor(void); |
35669 | 179 void wsEvents(XEvent *event); |
33539 | 180 void wsHandleEvents(void); |
23077 | 181 |
35656 | 182 void wsCreateWindow(wsWindow *win, int x, int y, int w, int h, int b, int c, unsigned char p, char *label); |
183 void wsDestroyWindow(wsWindow *win); | |
184 void wsMoveWindow(wsWindow *win, Bool abs, int x, int y); | |
185 void wsMoveWindowWithin(wsWindow *win, Bool abs, int x, int y); | |
186 void wsResizeWindow(wsWindow *win, int sx, int sy); | |
187 void wsIconify(wsWindow *win); | |
35631 | 188 void wsRaiseWindowTop(Display *display, Window Win); |
35656 | 189 void wsSetBackgroundRGB(wsWindow *win, int r, int g, int b); |
190 void wsClearWindow(wsWindow *win); | |
191 void wsVisibleWindow(wsWindow *win, int show); | |
192 void wsWindowDecoration(wsWindow *win, Bool decor); | |
35642 | 193 void wsSetLayer(Display *display, Window Win, Bool fullscreen); |
35656 | 194 void wsFullScreen(wsWindow *win); |
195 void wsPostRedisplay(wsWindow *win); | |
196 void wsSetShape(wsWindow *win, char *data); | |
35631 | 197 void wsSetIcon(Display *display, Window Win, guiIcon_t *icon); |
23077 | 198 |
199 // ---------------------------------------------------------------------------------------------- | |
200 // Show / hide mouse cursor. | |
201 // ---------------------------------------------------------------------------------------------- | |
35656 | 202 void wsVisibleMouse(wsWindow *win, int m); |
23077 | 203 |
204 // ---------------------------------------------------------------------------------------------- | |
205 // Image handling | |
206 // ---------------------------------------------------------------------------------------------- | |
35656 | 207 void wsCreateImage(wsWindow *win, int Width, int Height); |
208 void wsConvert(wsWindow *win, unsigned char *Image); | |
209 void wsPutImage(wsWindow *win); | |
210 void wsResizeImage(wsWindow *win, int Width, int Height); | |
211 void wsDestroyImage(wsWindow *win); | |
23077 | 212 |
26029 | 213 #endif /* MPLAYER_GUI_WS_H */ |