Mercurial > mplayer.hg
annotate gui/wm/ws.h @ 36603:ac9e4bb41a5b
Revise the man page after r36697 and r36698.
author | ib |
---|---|
date | Wed, 22 Jan 2014 19:27:47 +0000 |
parents | 63e8bfb208c6 |
children | 6738386f30da |
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 |
35702 | 25 #include <X11/Xlib.h> |
26 #include <X11/Xutil.h> | |
27 | |
35529 | 28 #include "gui/dialog/dialog.h" |
35689 | 29 |
35450 | 30 #include "config.h" |
33529 | 31 |
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 | |
35657 | 65 #define wsAspect 128 |
23077 | 66 |
35499
af72f85b6f44
Define symbolic constant wsNone for "no window state".
ib
parents:
35498
diff
changeset
|
67 #define wsNone 0 |
23077 | 68 #define wsWindowVisible 1 |
69 #define wsWindowPartialVisible 2 | |
70 #define wsWindowNotVisible 4 | |
71 #define wsWindowMapped 8 | |
72 #define wsWindowUnmapped 16 | |
73 #define wsWindowFocusIn 32 | |
74 #define wsWindowFocusOut 64 | |
75 #define wsWindowExpose 128 | |
76 #define wsWindowRolled 256 | |
77 #define wsWindowClosed 512 | |
78 | |
35498
c505a4aa9582
Rename wsNone wsNo and use it instead of a numeric constant.
ib
parents:
35497
diff
changeset
|
79 #define wsNo 0 |
23077 | 80 #define wsMapped 1 |
81 #define wsFocused 2 | |
82 #define wsVisible 3 | |
83 #define wsNotVisible 4 | |
84 #define wsPVisible 5 | |
85 #define wsRolled 6 | |
86 | |
35760 | 87 typedef void (*wsTDrawHandler)(void); |
35764 | 88 typedef void (*wsTMouseHandler)(int Button, int X, int Y, int RX, int RY); |
33539 | 89 typedef void (*wsTKeyHandler)(int KeyCode, int Type, int Key); |
90 typedef void (*wsTDNDHandler)(int num, char **str); | |
23077 | 91 |
33539 | 92 typedef struct { |
93 Window WindowID; | |
94 Window Parent; | |
95 int X, Y, Width, Height; | |
96 int OldX, OldY, OldWidth, OldHeight; | |
35695 | 97 Bool isFullScreen; |
33539 | 98 int Property; |
99 unsigned char *bImage; | |
100 XImage *xImage; | |
101 Pixmap Mask; | |
35696 | 102 Bool Decoration; |
23077 | 103 |
33539 | 104 int State; |
105 int Visible; | |
106 int Mapped; | |
107 int Focused; | |
108 int Rolled; | |
23077 | 109 |
35760 | 110 wsTDrawHandler DrawHandler; |
35764 | 111 wsTMouseHandler MouseHandler; |
33539 | 112 wsTKeyHandler KeyHandler; |
35759 | 113 wsTDNDHandler DNDHandler; |
23077 | 114 |
33539 | 115 int Alt; |
116 int Shift; | |
117 int Control; | |
118 int NumLock; | |
119 int CapsLock; | |
34684 | 120 /* Misc ------------------------------------------------------------------------------------- */ |
23077 | 121 |
33539 | 122 Atom AtomDeleteWindow; |
123 Atom AtomTakeFocus; | |
124 Atom AtomRolle; | |
125 Atom AtomProtocols; | |
126 Atom AtomsProtocols[3]; | |
127 Atom AtomLeaderClient; | |
128 Atom AtomWMSizeHint; | |
129 Atom AtomWMNormalHint; | |
23077 | 130 |
34465 | 131 #ifdef HAVE_SHM |
33539 | 132 XShmSegmentInfo Shminfo; |
34465 | 133 #endif |
33539 | 134 unsigned char *ImageData; |
135 unsigned short int *ImageDataw; | |
136 unsigned int *ImageDatadw; | |
137 GC wGC; | |
138 unsigned long WindowMask; | |
139 XVisualInfo VisualInfo; | |
140 XSetWindowAttributes WindowAttrib; | |
141 XWMHints WMHints; | |
23077 | 142 |
33539 | 143 Cursor wsCursor; |
144 char wsCursorData[1]; | |
145 Pixmap wsCursorPixmap; | |
146 int wsMouseEventType; | |
147 XColor wsColor; | |
35656 | 148 } wsWindow; |
23077 | 149 |
33539 | 150 extern int wsMaxX; |
151 extern int wsMaxY; | |
152 extern int wsOrgX; | |
153 extern int wsOrgY; | |
23077 | 154 |
33539 | 155 extern Display *wsDisplay; |
23077 | 156 |
157 // ---------------------------------------------------------------------------------------------- | |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
158 void wsDone(void); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
159 void wsInit(Display *display); |
35636 | 160 void wsSetErrorHandler(void); |
23077 | 161 |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
162 void wsMouseAutohide(void); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
163 void wsEvent(XEvent *event); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
164 void wsEvents(void); |
23077 | 165 |
35687 | 166 void wsWindowCreate(wsWindow *win, int x, int y, int w, int h, int p, int c, char *label); |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
167 void wsWindowDestroy(wsWindow *win); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
168 void wsWindowMove(wsWindow *win, Bool abs, int x, int y); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
169 void wsWindowMoveWithin(wsWindow *win, Bool abs, int x, int y); |
35682 | 170 void wsWindowResize(wsWindow *win, int w, int h); |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
171 void wsWindowIconify(wsWindow *win); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
172 void wsWindowRaiseTop(Display *display, Window Win); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
173 void wsWindowBackground(wsWindow *win, int r, int g, int b); |
35682 | 174 void wsWindowVisibility(wsWindow *win, int vis); |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
175 void wsWindowLayer(Display *display, Window Win, Bool fullscreen); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
176 void wsWindowFullscreen(wsWindow *win); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
177 void wsWindowRedraw(wsWindow *win); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
178 void wsWindowShape(wsWindow *win, char *data); |
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
179 void wsWindowIcon(Display *display, Window Win, guiIcon_t *icon); |
23077 | 180 |
181 // ---------------------------------------------------------------------------------------------- | |
182 // Show / hide mouse cursor. | |
183 // ---------------------------------------------------------------------------------------------- | |
35682 | 184 void wsMouseVisibility(wsWindow *win, int vis); |
23077 | 185 |
186 // ---------------------------------------------------------------------------------------------- | |
187 // Image handling | |
188 // ---------------------------------------------------------------------------------------------- | |
35682 | 189 void wsImageCreate(wsWindow *win, int w, int h); |
35744 | 190 void wsImageRender(wsWindow *win, unsigned char *img); |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
191 void wsImageDraw(wsWindow *win); |
35682 | 192 void wsImageResize(wsWindow *win, int w, int h); |
35681
80c5c89f77d6
Cosmetic: Rename ws functions for the sake of consistency.
ib
parents:
35679
diff
changeset
|
193 void wsImageDestroy(wsWindow *win); |
23077 | 194 |
26029 | 195 #endif /* MPLAYER_GUI_WS_H */ |