Mercurial > mplayer.hg
comparison gui/app/app.h @ 35525:e27855a45128
Rebuild GUI directory structure.
Create new directory app/ and
move app.*, cfg.* and gui.h to app/.
author | ib |
---|---|
date | Thu, 06 Dec 2012 13:47:47 +0000 |
parents | gui/app.h@13ae955b6eae |
children | f2093dc82b5f |
comparison
equal
deleted
inserted
replaced
35524:dd7de6052739 | 35525:e27855a45128 |
---|---|
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 | |
19 #ifndef MPLAYER_GUI_APP_H | |
20 #define MPLAYER_GUI_APP_H | |
21 | |
22 #include "gui/util/bitmap.h" | |
23 #include "gui/wm/ws.h" | |
24 | |
25 /// GUI messages (user events) | |
26 enum { | |
27 evNone, | |
28 evPlay, | |
29 evStop, | |
30 evPause, | |
31 evPrev, | |
32 evNext, | |
33 evLoad, | |
34 evLoadPlay, | |
35 evLoadAudioFile, | |
36 evLoadSubtitle, | |
37 evDropSubtitle, | |
38 evPlaylist, | |
39 evPlayCD, | |
40 evPlayVCD, | |
41 evPlayDVD, | |
42 evLoadURL, | |
43 evPlaySwitchToPause, | |
44 evPauseSwitchToPlay, | |
45 evBackward10sec, | |
46 evForward10sec, | |
47 evBackward1min, | |
48 evForward1min, | |
49 evBackward10min, | |
50 evForward10min, | |
51 evSetMoviePosition, | |
52 evHalfSize, | |
53 evDoubleSize, | |
54 evFullScreen, | |
55 evNormalSize, | |
56 evSetAspect, | |
57 evIncVolume, | |
58 evDecVolume, | |
59 evSetVolume, | |
60 evMute, | |
61 evSetBalance, | |
62 evEqualizer, | |
63 evAbout, | |
64 evPreferences, | |
65 evSkinBrowser, | |
66 evMenu, | |
67 evIconify, | |
68 evExit = 100 | |
69 }; | |
70 | |
71 /// Internal messages (events) | |
72 enum { | |
73 ivSetVideo = 1000, | |
74 ivSetAudio, | |
75 ivSetSubtitle, | |
76 ivSetCDTrack, | |
77 ivSetVCDTrack, | |
78 ivSetDVDTitle, | |
79 ivSetDVDChapter, | |
80 ivSetDVDAudio, | |
81 ivSetDVDSubtitle, | |
82 ivPlayDVD, | |
83 ivShowPopUpMenu, | |
84 ivHidePopUpMenu, | |
85 ivRedraw | |
86 }; | |
87 | |
88 typedef struct { | |
89 int message; | |
90 const char *name; | |
91 } evName; | |
92 | |
93 /// Skin items | |
94 enum { | |
95 itNone, | |
96 itBase, | |
97 itButton, | |
98 itSLabel, | |
99 itDLabel, | |
100 itHPotmeter, | |
101 itVPotmeter, | |
102 itPotmeter, | |
103 itMenu, | |
104 itPLMButton = 100, | |
105 itPRMButton | |
106 }; | |
107 | |
108 //@{ | |
109 /// Button state | |
110 #define btnDisabled 0 | |
111 #define btnReleased 1 | |
112 #define btnPressed 2 | |
113 //@} | |
114 | |
115 /// Item definition | |
116 typedef struct { | |
117 int type; | |
118 | |
119 int x, y; | |
120 int width, height; | |
121 | |
122 guiImage Bitmap; | |
123 guiImage Mask; | |
124 | |
125 int fontid; | |
126 int align; | |
127 char *label; | |
128 | |
129 int pwidth, pheight; | |
130 int numphases; | |
131 float value; | |
132 | |
133 int message; | |
134 | |
135 int R, G, B; | |
136 | |
137 char *text; | |
138 int textwidth; | |
139 unsigned int starttime; | |
140 int last_x; | |
141 | |
142 int pressed; | |
143 } wItem; | |
144 | |
145 /// Maximum GUI items | |
146 #define MAX_ITEMS 64 | |
147 | |
148 typedef struct { | |
149 wItem main; | |
150 wsTWindow mainWindow; | |
151 int mainDecoration; | |
152 | |
153 wItem video; | |
154 wsTWindow videoWindow; | |
155 | |
156 wItem playbar; | |
157 wsTWindow playbarWindow; | |
158 int playbarIsPresent; | |
159 | |
160 wItem menu; | |
161 wItem menuSelected; | |
162 wsTWindow menuWindow; | |
163 int menuIsPresent; | |
164 | |
165 int IndexOfMainItems; | |
166 wItem mainItems[MAX_ITEMS]; | |
167 | |
168 int IndexOfPlaybarItems; | |
169 wItem playbarItems[MAX_ITEMS]; | |
170 | |
171 int IndexOfMenuItems; | |
172 wItem menuItems[MAX_ITEMS]; | |
173 } guiItems; | |
174 | |
175 extern guiItems guiApp; | |
176 | |
177 wItem *appFindItem(int event); | |
178 int appFindMessage(const char *name); | |
179 void appFreeStruct(void); | |
180 void btnModify(int event, float state); | |
181 void btnSet(int event, int set); | |
182 | |
183 #endif /* MPLAYER_GUI_APP_H */ |