annotate gui/wm/wsxdnd.h @ 36305:d8a13d907c61

Enable switch_ratio -1 with videos with aspect changes. The original aspect ratio may change during playback, so sh->original_aspect must be set accordingly. This is missing in r36391.
author ib
date Sun, 04 Aug 2013 20:19:58 +0000
parents 01ac3cd2f101
children 1236a692d0c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
2 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
3 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
5 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
7 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
8 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
12 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
13 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
14 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35666
01ac3cd2f101 Cosmetic: Relocate and revise comments on code origin.
ib
parents: 35656
diff changeset
17 *
01ac3cd2f101 Cosmetic: Relocate and revise comments on code origin.
ib
parents: 35656
diff changeset
18 * based on: WindowMaker implementation,
01ac3cd2f101 Cosmetic: Relocate and revise comments on code origin.
ib
parents: 35656
diff changeset
19 * adopted for MPlayer
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
20 */
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26136
diff changeset
21
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
22 #ifndef MPLAYER_GUI_WSXDND_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
23 #define MPLAYER_GUI_WSXDND_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24
26136
a8eb9fd1ac21 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
25 #include "ws.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 void wsXDNDInitialize(void);
35656
f2093dc82b5f Cosmetic: Rename wsTWindow wsWindow.
ib
parents: 35631
diff changeset
28 Bool wsXDNDProcessSelection(wsWindow* win,XEvent *event);
34470
571201af959c Remove unused parameter from wsXDNDProcessClientMessage().
ib
parents: 26458
diff changeset
29 Bool wsXDNDProcessClientMessage(XClientMessageEvent *event);
35656
f2093dc82b5f Cosmetic: Rename wsTWindow wsWindow.
ib
parents: 35631
diff changeset
30 void wsXDNDMakeAwareness(wsWindow* win);
f2093dc82b5f Cosmetic: Rename wsTWindow wsWindow.
ib
parents: 35631
diff changeset
31 void wsXDNDClearAwareness(wsWindow* win);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 /* header was ripped from xdnd's example on its page */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 #define XDND_THREE 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 #define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 #define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 #define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 #define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 #define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 #define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + (i)]) /* i => (0, 1, 2) */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 /* XdndPosition */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 #define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 #define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 #define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 #define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 #define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 #define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 /* XdndStatus */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 #define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 #define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 #define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 #define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 #define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 #define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 #define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL)
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 #define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 #define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 /* XdndLeave */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 #define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 /* XdndDrop */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 #define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 #define XDND_DROP_TIME(e) ((e)->xclient.data.l[2])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 /* XdndFinished */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 #define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0])
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
74 #endif /* MPLAYER_GUI_WSXDND_H */