comparison gui/app.h @ 32897:14af78beac02

Cosmetic: Format to MPlayer coding style.
author ib
date Mon, 28 Feb 2011 13:25:45 +0000
parents 12ae3b893c59
children 1481268ccd30
comparison
equal deleted inserted replaced
32896:c39348b4064a 32897:14af78beac02
19 #ifndef MPLAYER_GUI_APP_H 19 #ifndef MPLAYER_GUI_APP_H
20 #define MPLAYER_GUI_APP_H 20 #define MPLAYER_GUI_APP_H
21 21
22 #include "bitmap.h" 22 #include "bitmap.h"
23 #include "wm/ws.h" 23 #include "wm/ws.h"
24 #include "wm/wskeys.h"
25 24
26 // --- User events ------ 25 // User events
27 26
28 #define evNone 0 27 #define evNone 0
29 #define evPlay 1 28 #define evPlay 1
30 #define evStop 2 29 #define evStop 2
31 #define evPause 3 30 #define evPause 3
59 #define evSetBalance 29 58 #define evSetBalance 29
60 #define evMute 30 59 #define evMute 30
61 60
62 #define evIncVolume 31 61 #define evIncVolume 31
63 #define evDecVolume 32 62 #define evDecVolume 32
64 #define evIncAudioBufDelay 33 63 #define evIncAudioBufDelay 33 // NOTE TO MYSELF: not all of these events
65 #define evDecAudioBufDelay 34 64 #define evDecAudioBufDelay 34 // are actually implemented, and update doc
66 #define evIncBalance 35 65 #define evIncBalance 35
67 #define evDecBalance 36 66 #define evDecBalance 36
68 67
69 #define evHelp 37 68 #define evHelp 37
70 69
71 #define evLoadSubtitle 38 70 #define evLoadSubtitle 38
72 #define evDropSubtitle 43 71 #define evDropSubtitle 43
73 #define evPlayDVD 39 72 #define evPlayDVD 39
74 #define evPlayVCD 40 73 #define evPlayVCD 40
75 #define evPlayNetwork 41 74 #define evPlayNetwork 41
76 #define evLoadAudioFile 42 75 #define evLoadAudioFile 42
77 #define evSetAspect 44 76 #define evSetAspect 44
78 #define evSetAudio 45 77 #define evSetAudio 45
79 #define evSetVideo 46 78 #define evSetVideo 46
80 #define evSetSubtitle 47 79 #define evSetSubtitle 47
81 // 48 ...
82 80
83 #define evExit 1000 81 #define evExit 1000
84 82
85 // --- General events --- 83 // General events
86 84
87 #define evFileLoaded 5000 85 #define evFileLoaded 5000
88 #define evHideMouseCursor 5001 86 #define evHideMouseCursor 5001
89 #define evMessageBox 5002 87 #define evMessageBox 5002
90 #define evGeneralTimer 5003 88 #define evGeneralTimer 5003
104 #define evRedraw 7002 102 #define evRedraw 7002
105 #define evHideWindow 7003 103 #define evHideWindow 7003
106 #define evShowWindow 7004 104 #define evShowWindow 7004
107 #define evFirstLoad 7005 105 #define evFirstLoad 7005
108 106
109 // ---------------------- 107 typedef struct {
110 108 int msg;
111 typedef struct 109 const char *name;
112 {
113 int msg;
114 const char * name;
115 } evName; 110 } evName;
116 111
112 // Skin items
113
117 #define itNULL 0 114 #define itNULL 0
118 #define itButton 101 // button 115 #define itButton 101
119 #define itHPotmeter 102 // horizontal potmeter 116 #define itHPotmeter 102
120 #define itVPotmeter 103 // vertical potmeter 117 #define itVPotmeter 103
121 #define itSLabel 104 // static label 118 #define itSLabel 104
122 #define itDLabel 105 // dynamic label 119 #define itDLabel 105
123 #define itBase 106 120 #define itBase 106
124 #define itPotmeter 107 121 #define itPotmeter 107
125 #define itFont 108 122 #define itFont 108
126 // --- 123
124 // Button states
125
127 #define btnPressed 0 126 #define btnPressed 0
128 #define btnReleased 1 127 #define btnReleased 1
129 #define btnDisabled 2 128 #define btnDisabled 2
130 // --- 129
131 typedef struct 130 typedef struct {
132 { 131 int type;
133 int type; 132
134 // --- 133 int x, y;
135 int x,y; 134 int width, height;
136 int width,height; 135
137 // --- 136 int px, py, psx, psy;
138 int px,py,psx,psy; 137
139 // --- 138 int msg, msg2;
140 int msg,msg2; 139 int pressed, tmp;
141 int pressed,tmp; 140 int key, key2;
142 int key,key2; 141 int phases;
143 int phases; 142 float value;
144 float value; 143
145 txSample Bitmap; 144 txSample Bitmap;
146 txSample Mask; 145 txSample Mask;
147 // --- 146
148 int fontid; 147 int fontid;
149 int align; 148 int align;
150 char * label; 149 char *label;
151 char * text; 150
152 int textwidth; 151 char *text;
153 unsigned int starttime; 152 int textwidth;
154 int last_x; 153 unsigned int starttime;
155 // --- 154 int last_x;
156 int event; 155
157 // --- 156 int event;
158 int R,G,B; 157
158 int R, G, B;
159 } wItem; 159 } wItem;
160 160
161 typedef struct 161 typedef struct {
162 { 162 wItem main;
163 wItem main; 163 wsTWindow mainWindow;
164 wsTWindow mainWindow; 164 int mainDecoration;
165 int mainDecoration;
166 165
167 wItem sub; 166 wItem sub;
168 wsTWindow subWindow; 167 wsTWindow subWindow;
169 168
170 wItem bar; 169 wItem bar;
171 wsTWindow barWindow; 170 wsTWindow barWindow;
172 int barIsPresent; 171 int barIsPresent;
173 172
174 wItem menuBase; 173 wItem menuBase;
175 wItem menuSelected; 174 wItem menuSelected;
176 wsTWindow menuWindow; 175 wsTWindow menuWindow;
177 int menuIsPresent; 176 int menuIsPresent;
178 177
179 // --- 178 int NumberOfItems;
180 int NumberOfItems; 179 wItem Items[256];
181 wItem Items[256]; 180
182 // --- 181 int NumberOfMenuItems;
183 int NumberOfMenuItems; 182 wItem MenuItems[64];
184 wItem MenuItems[64]; 183
185 // --- 184 int NumberOfBarItems;
186 int NumberOfBarItems; 185 wItem barItems[256];
187 wItem barItems[256];
188 } listItems; 186 } listItems;
189 187
190 extern listItems appMPlayer; 188 extern listItems appMPlayer;
191 189
192 extern char * skinDirInHome; 190 extern char *skinDirInHome;
193 extern char * skinMPlayerDir; 191 extern char *skinMPlayerDir;
194 192
195 void appInitStruct( listItems * item ); 193 int appFindMessage(unsigned char *);
196 void appClearItem( wItem * item ); 194 void appInitStruct(listItems *);
197 void appCopy( listItems * item1, listItems * item2 ); 195 void btnModify(int, float);
198 int appFindMessage( unsigned char * str ); 196 void btnSet(int, int);
199 int appFindKey( unsigned char * name );
200
201 void btnModify( int event, float state );
202 float btnGetValue( int event );
203 void btnSet( int event, int set );
204 197
205 #endif /* MPLAYER_GUI_APP_H */ 198 #endif /* MPLAYER_GUI_APP_H */