Mercurial > mplayer.hg
annotate gui/app/app.h @ 37195:ac6c37d85d65 default tip
configure: Fix initialization of variable def_local_aligned_32
It contiained the #define of HAVE_LOCAL_ALIGNED_16 instead
of HAVE_LOCAL_ALIGNED_32.
author | al |
---|---|
date | Sun, 28 Sep 2014 18:38:41 +0000 |
parents | e8559b9913ff |
children |
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 |
35525 | 22 #include "gui/util/bitmap.h" |
23 #include "gui/wm/ws.h" | |
23077 | 24 |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
25 /// GUI messages (user events) |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
26 enum { |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
27 evNone, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
28 evPlay, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
29 evStop, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
30 evPause, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
31 evPrev, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
32 evNext, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
33 evLoad, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
34 evLoadPlay, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
35 evLoadAudioFile, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
36 evLoadSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
37 evDropSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
38 evPlaylist, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
39 evPlayCD, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
40 evPlayVCD, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
41 evPlayDVD, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
42 evLoadURL, |
36429 | 43 evPlayTV, |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
44 evPlaySwitchToPause, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
45 evPauseSwitchToPlay, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
46 evBackward10sec, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
47 evForward10sec, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
48 evBackward1min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
49 evForward1min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
50 evBackward10min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
51 evForward10min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
52 evSetMoviePosition, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
53 evHalfSize, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
54 evDoubleSize, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
55 evFullScreen, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
56 evNormalSize, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
57 evSetAspect, |
37081 | 58 evSetRotation, |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
59 evIncVolume, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
60 evDecVolume, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
61 evSetVolume, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
62 evMute, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
63 evSetBalance, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
64 evEqualizer, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
65 evAbout, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
66 evPreferences, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
67 evSkinBrowser, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
68 evMenu, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
69 evIconify, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
70 evExit = 100 |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
71 }; |
23077 | 72 |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
73 /// Internal messages (events) |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
74 enum { |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
75 ivSetVideo = 1000, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
76 ivSetAudio, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
77 ivSetSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
78 ivSetCDTrack, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
79 ivSetVCDTrack, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
80 ivSetDVDTitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
81 ivSetDVDChapter, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
82 ivSetDVDAudio, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
83 ivSetDVDSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
84 ivPlayDVD, |
36933 | 85 ivSetVolume, |
36958 | 86 ivSetBalance, |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
87 ivShowPopUpMenu, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
88 ivHidePopUpMenu, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
89 ivRedraw |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
90 }; |
23077 | 91 |
32897 | 92 typedef struct { |
32911 | 93 int message; |
32897 | 94 const char *name; |
23077 | 95 } evName; |
96 | |
35504 | 97 /// Skin items |
98 enum { | |
99 itNone, | |
100 itBase, | |
101 itButton, | |
102 itSLabel, | |
103 itDLabel, | |
104 itHPotmeter, | |
105 itVPotmeter, | |
37053 | 106 itRPotmeter, |
36920 | 107 itPimage, |
35504 | 108 itMenu, |
109 itPLMButton = 100, | |
110 itPRMButton | |
111 }; | |
32897 | 112 |
35505 | 113 //@{ |
114 /// Button state | |
32920 | 115 #define btnDisabled 0 |
23077 | 116 #define btnReleased 1 |
32920 | 117 #define btnPressed 2 |
35505 | 118 //@} |
32897 | 119 |
35506 | 120 /// Item definition |
32897 | 121 typedef struct { |
122 int type; | |
123 | |
124 int x, y; | |
125 int width, height; | |
126 | |
33555 | 127 guiImage Bitmap; |
128 guiImage Mask; | |
32897 | 129 |
130 int fontid; | |
131 int align; | |
132 char *label; | |
133 | |
37020 | 134 int pbwidth, pbheight; |
32911 | 135 int numphases; |
136 float value; | |
37053 | 137 double zeropoint, arclength; |
32911 | 138 |
139 int message; | |
140 | |
141 int R, G, B; | |
142 | |
32897 | 143 char *text; |
144 int textwidth; | |
145 unsigned int starttime; | |
146 int last_x; | |
147 | |
33103 | 148 int pressed; |
35688 | 149 } guiItem; |
23077 | 150 |
35507 | 151 /// Maximum GUI items |
152 #define MAX_ITEMS 64 | |
153 | |
32897 | 154 typedef struct { |
35688 | 155 guiItem main; |
35656 | 156 wsWindow mainWindow; |
32897 | 157 int mainDecoration; |
23077 | 158 |
35688 | 159 guiItem video; |
35656 | 160 wsWindow videoWindow; |
23077 | 161 |
35688 | 162 guiItem playbar; |
35656 | 163 wsWindow playbarWindow; |
33555 | 164 int playbarIsPresent; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
165 |
35688 | 166 guiItem menu; |
167 guiItem menuSelected; | |
35656 | 168 wsWindow menuWindow; |
32897 | 169 int menuIsPresent; |
23077 | 170 |
32931
03b1051bed5c
Rename the 'NumberOf' members of the listItems structure.
ib
parents:
32927
diff
changeset
|
171 int IndexOfMainItems; |
35688 | 172 guiItem mainItems[MAX_ITEMS]; |
32897 | 173 |
33555 | 174 int IndexOfPlaybarItems; |
35688 | 175 guiItem playbarItems[MAX_ITEMS]; |
32912 | 176 |
32931
03b1051bed5c
Rename the 'NumberOf' members of the listItems structure.
ib
parents:
32927
diff
changeset
|
177 int IndexOfMenuItems; |
35688 | 178 guiItem menuItems[MAX_ITEMS]; |
32937 | 179 } guiItems; |
23077 | 180 |
33555 | 181 extern guiItems guiApp; |
23077 | 182 |
35688 | 183 guiItem *appFindItem(int event); |
34328 | 184 int appFindMessage(const char *name); |
32932 | 185 void appFreeStruct(void); |
37053 | 186 double appRadian(guiItem *item, int x, int y); |
36861 | 187 void btnModify(int event, float value); |
36858 | 188 void btnSet(int event, int state); |
36959
97a4746e7888
Utilize item defaults given in the skin configuration as start values.
ib
parents:
36958
diff
changeset
|
189 void btnValue(int event, float *value); |
23077 | 190 |
26029 | 191 #endif /* MPLAYER_GUI_APP_H */ |