Mercurial > mplayer.hg
annotate gui/app.h @ 34994:b6ac08b94fc3
Go without pointless variable hWnd/hwnd.
It will be saved later in the gui_t structure anyway,
so save it early and use the struct member instead.
author | ib |
---|---|
date | Wed, 15 Aug 2012 12:33:45 +0000 |
parents | ac6b38cd0d45 |
children | ac6c531dc9d1 |
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. | |
17 */ | |
18 | |
26029 | 19 #ifndef MPLAYER_GUI_APP_H |
20 #define MPLAYER_GUI_APP_H | |
23077 | 21 |
33046 | 22 #include "util/bitmap.h" |
23077 | 23 #include "wm/ws.h" |
24 | |
34684 | 25 /* User events */ |
23077 | 26 |
27 #define evNone 0 | |
34317 | 28 |
23077 | 29 #define evPlay 1 |
30 #define evStop 2 | |
31 #define evPause 3 | |
32 #define evPrev 6 | |
33 #define evNext 7 | |
34 #define evLoad 8 | |
34317 | 35 #define evLoadPlay 13 |
36 #define evLoadAudioFile 42 | |
37 #define evLoadSubtitle 38 | |
38 #define evDropSubtitle 43 | |
34321
daebf766dea6
Cosmetic: Synchronize evPlaylist event and message names.
ib
parents:
34317
diff
changeset
|
39 #define evPlaylist 10 |
34387 | 40 #define evPlayCD 48 |
34317 | 41 #define evPlayVCD 40 |
42 #define evPlayDVD 39 | |
34324 | 43 #define evLoadURL 5013 |
23077 | 44 #define evPlaySwitchToPause 16 |
45 #define evPauseSwitchToPlay 17 | |
46 | |
47 #define evBackward10sec 18 | |
48 #define evForward10sec 19 | |
49 #define evBackward1min 20 | |
50 #define evForward1min 21 | |
51 #define evBackward10min 22 | |
52 #define evForward10min 23 | |
34317 | 53 #define evSetMoviePosition 27 |
23077 | 54 |
55 #define evHalfSize 301 | |
56 #define evDoubleSize 25 | |
57 #define evFullScreen 26 | |
34317 | 58 #define evNormalSize 24 |
34322 | 59 #define evSetAspect 44 |
23077 | 60 |
61 #define evIncVolume 31 | |
62 #define evDecVolume 32 | |
34317 | 63 #define evSetVolume 28 |
64 #define evMute 30 | |
65 #define evSetBalance 29 | |
66 #define evEqualizer 9 | |
67 | |
68 #define evAbout 12 | |
69 #define evPreferences 14 | |
70 #define evSkinBrowser 15 | |
34458 | 71 #define evMenu 33 |
34317 | 72 |
73 #define evIconify 11 | |
74 #define evExit 1000 | |
75 | |
34684 | 76 /* Internal events */ |
34317 | 77 |
34333 | 78 #define ivSetAudio 45 |
79 #define ivSetVideo 46 | |
80 #define ivSetSubtitle 47 | |
23077 | 81 |
34333 | 82 #define ivShowPopUpMenu 5005 |
83 #define ivHidePopUpMenu 5006 | |
84 #define ivSetDVDAudio 5007 | |
85 #define ivSetDVDSubtitle 5008 | |
86 #define ivSetDVDTitle 5009 | |
87 #define ivSetDVDChapter 5010 | |
88 #define ivSetVCDTrack 5012 | |
34387 | 89 #define ivSetCDTrack 5014 |
23077 | 90 |
34333 | 91 #define ivRedraw 7002 |
34455
00cf27b14c15
Replace goto label by an internal event case expression.
ib
parents:
34387
diff
changeset
|
92 #define ivPlayDVD 7003 |
23077 | 93 |
32897 | 94 typedef struct { |
32911 | 95 int message; |
32897 | 96 const char *name; |
23077 | 97 } evName; |
98 | |
34684 | 99 /* Skin items */ |
32897 | 100 |
32919 | 101 #define itNone 0 |
32897 | 102 #define itButton 101 |
103 #define itHPotmeter 102 | |
104 #define itVPotmeter 103 | |
105 #define itSLabel 104 | |
106 #define itDLabel 105 | |
23077 | 107 #define itBase 106 |
108 #define itPotmeter 107 | |
33100 | 109 #define itMenu 108 |
32897 | 110 |
32919 | 111 #define itPLMButton (itNone - 1) |
112 #define itPRMButton (itNone - 2) | |
113 | |
34684 | 114 /* Button states */ |
32897 | 115 |
32920 | 116 #define btnDisabled 0 |
23077 | 117 #define btnReleased 1 |
32920 | 118 #define btnPressed 2 |
32897 | 119 |
34684 | 120 /* Item definition */ |
32938 | 121 |
122 #define MAX_ITEMS 64 | |
123 | |
32897 | 124 typedef struct { |
125 int type; | |
126 | |
127 int x, y; | |
128 int width, height; | |
129 | |
33555 | 130 guiImage Bitmap; |
131 guiImage Mask; | |
32897 | 132 |
133 int fontid; | |
134 int align; | |
135 char *label; | |
136 | |
32911 | 137 int pwidth, pheight; |
138 int numphases; | |
139 float value; | |
140 | |
141 int message; | |
142 | |
143 int R, G, B; | |
144 | |
32897 | 145 char *text; |
146 int textwidth; | |
147 unsigned int starttime; | |
148 int last_x; | |
149 | |
33103 | 150 int pressed; |
23077 | 151 } wItem; |
152 | |
32897 | 153 typedef struct { |
154 wItem main; | |
155 wsTWindow mainWindow; | |
156 int mainDecoration; | |
23077 | 157 |
34697 | 158 wItem video; |
159 wsTWindow videoWindow; | |
23077 | 160 |
33555 | 161 wItem playbar; |
162 wsTWindow playbarWindow; | |
163 int playbarIsPresent; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
164 |
33084 | 165 wItem menu; |
32897 | 166 wItem menuSelected; |
167 wsTWindow menuWindow; | |
168 int menuIsPresent; | |
23077 | 169 |
32931
03b1051bed5c
Rename the 'NumberOf' members of the listItems structure.
ib
parents:
32927
diff
changeset
|
170 int IndexOfMainItems; |
32938 | 171 wItem mainItems[MAX_ITEMS]; |
32897 | 172 |
33555 | 173 int IndexOfPlaybarItems; |
174 wItem playbarItems[MAX_ITEMS]; | |
32912 | 175 |
32931
03b1051bed5c
Rename the 'NumberOf' members of the listItems structure.
ib
parents:
32927
diff
changeset
|
176 int IndexOfMenuItems; |
32938 | 177 wItem menuItems[MAX_ITEMS]; |
32937 | 178 } guiItems; |
23077 | 179 |
33555 | 180 extern guiItems guiApp; |
23077 | 181 |
34339 | 182 wItem *appFindItem(int event); |
34328 | 183 int appFindMessage(const char *name); |
32932 | 184 void appFreeStruct(void); |
32948 | 185 void btnModify(int event, float state); |
186 void btnSet(int event, int set); | |
23077 | 187 |
26029 | 188 #endif /* MPLAYER_GUI_APP_H */ |