in plugin/:
[moon.git] / src / enums.h
blobfc48fd343ed759e7659f00640376d7fea65d220b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * enums.c: various enumerated types + enum -> str helpers
5 * Copyright 2007 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
8 *
9 */
11 #ifndef __MOON_ENUMS_H__
12 #define __MOON_ENUMS_H__
14 #include <glib.h>
16 enum ErrorEventArgsType {
17 NoError,
18 UnknownError,
19 InitializeError,
20 ParserError,
21 ObjectModelError,
22 RuntimeError,
23 DownloadError,
24 MediaError,
25 ImageError
28 enum FontStretches {
29 FontStretchesUltraCondensed = 1,
30 FontStretchesExtraCondensed = 2,
31 FontStretchesCondensed = 3,
32 FontStretchesSemiCondensed = 4,
33 FontStretchesNormal = 5,
34 FontStretchesMedium = 5,
35 FontStretchesSemiExpanded = 6,
36 FontStretchesExpanded = 7,
37 FontStretchesExtraExpanded = 8,
38 FontStretchesUltraExpanded = 9
41 enum FontStyles {
42 FontStylesNormal,
43 FontStylesOblique,
44 FontStylesItalic
47 enum FontWeights {
48 FontWeightsThin = 100,
49 FontWeightsExtraLight = 200,
50 FontWeightsLight = 300,
51 FontWeightsNormal = 400,
52 FontWeightsMedium = 500,
53 FontWeightsSemiBold = 600,
54 FontWeightsBold = 700,
55 FontWeightsExtraBold = 800,
56 FontWeightsBlack = 900,
57 FontWeightsExtraBlack = 950,
60 enum LineStackingStrategy {
61 LineStackingStrategyMaxHeight,
62 LineStackingStrategyBlockLineHeight
65 enum MediaState {
66 MediaStateClosed,
67 MediaStateOpening,
68 MediaStateBuffering,
69 MediaStatePlaying,
70 MediaStatePaused,
71 MediaStateStopped,
72 MediaStateIndividualizing,
73 MediaStateAcquiringLicense,
74 MediaStateError
77 enum PixelFormats {
78 PixelFormatBgr32 = 1,
79 PixelFormatPbgra32 = 2
82 enum StyleSimulations {
83 StyleSimulationsNone = 0,
84 StyleSimulationsBold = (1 << 0),
85 StyleSimulationsItalic = (1 << 1),
86 StyleSimulationsBoldItalic = (StyleSimulationsBold | StyleSimulationsItalic),
89 enum TextAlignment {
90 TextAlignmentCenter,
91 TextAlignmentLeft,
92 TextAlignmentRight
95 // TextDecorations would appear to be a collection of bit flags rather
96 // than a normal enumeration of values
97 enum TextDecorations {
98 TextDecorationsNone = 0,
99 TextDecorationsUnderline = (1 << 0)
102 enum TextWrapping {
103 TextWrappingWrapWithOverflow,
104 TextWrappingNoWrap,
105 TextWrappingWrap,
108 enum Stretch {
109 StretchNone,
110 StretchFill,
111 StretchUniform,
112 StretchUniformToFill
115 enum PenLineCap {
116 PenLineCapFlat,
117 PenLineCapSquare,
118 PenLineCapRound,
119 PenLineCapTriangle
122 enum PenLineJoin {
123 PenLineJoinMiter,
124 PenLineJoinBevel,
125 PenLineJoinRound
128 enum FillRule {
129 FillRuleEvenOdd,
130 FillRuleNonzero
133 enum SweepDirection {
134 SweepDirectionCounterclockwise,
135 SweepDirectionClockwise
138 enum Visibility {
139 VisibilityVisible,
140 VisibilityCollapsed
143 enum Orientation {
144 OrientationVertical,
145 OrientationHorizontal
148 // make sure this stays in sync with System.Windows/System.Windows.Input/Cursor.cs (CursorType enum)
149 enum MouseCursor {
150 MouseCursorDefault,
151 MouseCursorArrow,
152 MouseCursorHand,
153 MouseCursorWait,
154 MouseCursorIBeam,
155 MouseCursorStylus,
156 MouseCursorEraser,
157 MouseCursorSizeNS,
158 MouseCursorSizeWE,
159 MouseCursorNone
162 enum Key {
163 KeyKEYNONE = 0,
164 KeyBACKSPACE = 1,
165 KeyTAB = 2,
166 KeyENTER = 3,
167 KeySHIFT = 4,
168 KeyCTRL = 5,
169 KeyALT = 6,
170 KeyCAPSLOCK = 7,
171 KeyESCAPE = 8,
172 KeySPACE = 9,
173 KeyPAGEUP = 10,
174 KeyPAGEDOWN = 11,
175 KeyEND = 12,
176 KeyHOME = 13,
177 KeyLEFT = 14,
178 KeyUP = 15,
179 KeyRIGHT = 16,
180 KeyDOWN = 17,
181 KeyINSERT = 18,
182 KeyDELETE = 19,
183 KeyDIGIT0 = 20,
184 KeyDIGIT1 = 21,
185 KeyDIGIT2 = 22,
186 KeyDIGIT3 = 23,
187 KeyDIGIT4 = 24,
188 KeyDIGIT5 = 25,
189 KeyDIGIT6 = 26,
190 KeyDIGIT7 = 27,
191 KeyDIGIT8 = 28,
192 KeyDIGIT9 = 29,
193 KeyA = 30,
194 KeyB = 31,
195 KeyC = 32,
196 KeyD = 33,
197 KeyE = 34,
198 KeyF = 35,
199 KeyG = 36,
200 KeyH = 37,
201 KeyI = 38,
202 KeyJ = 39,
203 KeyK = 40,
204 KeyL = 41,
205 KeyM = 42,
206 KeyN = 43,
207 KeyO = 44,
208 KeyP = 45,
209 KeyQ = 46,
210 KeyR = 47,
211 KeyS = 48,
212 KeyT = 49,
213 KeyU = 50,
214 KeyV = 51,
215 KeyW = 52,
216 KeyX = 53,
217 KeyY = 54,
218 KeyZ = 55,
219 KeyF1 = 56,
220 KeyF2 = 57,
221 KeyF3 = 58,
222 KeyF4 = 59,
223 KeyF5 = 60,
224 KeyF6 = 61,
225 KeyF7 = 62,
226 KeyF8 = 63,
227 KeyF9 = 64,
228 KeyF10 = 65,
229 KeyF11 = 66,
230 KeyF12 = 67,
231 KeyNUMPAD0 = 68,
232 KeyNUMPAD1 = 69,
233 KeyNUMPAD2 = 70,
234 KeyNUMPAD3 = 71,
235 KeyNUMPAD4 = 72,
236 KeyNUMPAD5 = 73,
237 KeyNUMPAD6 = 74,
238 KeyNUMPAD7 = 75,
239 KeyNUMPAD8 = 76,
240 KeyNUMPAD9 = 77,
241 KeyMULTIPLY = 78,
242 KeyADD = 79,
243 KeySUBTRACT = 80,
244 KeyDECIMAL = 81,
245 KeyDIVIDE = 82,
246 KeyUNKNOWN = 255
250 // Silverlight 2.0 Enums:
252 enum BindingMode {
253 BindingModeOneWay = 1,
254 BindingModeOneTime = 2,
255 BindingModeTwoWay = 3
258 enum GridUnitType {
259 GridUnitTypeAuto,
260 GridUnitTypePixel,
261 GridUnitTypeStar
265 enum HorizontalAlignment {
266 HorizontalAlignmentLeft,
267 HorizontalAlignmentCenter,
268 HorizontalAlignmentRight,
269 HorizontalAlignmentStretch
272 enum KeyboardNavigationMode {
273 KeyboardNavigationModeLocal,
274 KeyboardNavigationModeCycle,
275 KeyboardNavigationModeOnce
278 enum ModifierKeys {
279 ModifierKeyNone = 0,
280 ModifierKeyAlt = (1 << 0),
281 ModifierKeyControl = (1 << 1),
282 ModifierKeyShift = (1 << 2),
283 ModifierKeyWindows = (1 << 3),
284 ModifierKeyApple = (1 << 3)
287 enum ScrollBarVisibility {
288 ScrollBarVisibilityDisabled,
289 ScrollBarVisibilityAuto,
290 ScrollBarVisibilityHidden,
291 ScrollBarVisibilityVisible
294 enum VerticalAlignment {
295 VerticalAlignmentTop,
296 VerticalAlignmentCenter,
297 VerticalAlignmentBottom,
298 VerticalAlignmentStretch
301 enum CrossDomainAccess {
302 CrossDomainAccessNoAccess = 0,
303 // CrossDomainAccessFullAccess (1) was removed before final SL2 release
304 CrossDomainAccessScriptableOnly = 2,
307 enum FillBehavior {
308 FillBehaviorHoldEnd,
309 FillBehaviorStop
312 enum EasingMode {
313 EasingModeIn,
314 EasingModeOut,
315 EasingModeInOut
319 // enums used in the pipeline
320 // there is no string <-> enum conversions for these
322 enum MediaSourceType {
323 MediaSourceTypeFile = 1,
324 MediaSourceTypeLive = 2,
325 MediaSourceTypeProgressive = 3,
326 MediaSourceTypeMemory = 4,
327 MediaSourceTypeMms = 5,
328 MediaSourceTypeMmsEntry = 6,
329 MediaSourceTypeManagedStream = 7,
332 enum MediaStreamSourceDiagnosticKind {
333 BufferLevelInMilliseconds = 1,
334 BufferLevelInBytes = 2
337 enum MoonPixelFormat {
338 MoonPixelFormatNone = 0,
339 MoonPixelFormatRGB32,
340 MoonPixelFormatRGBA32,
341 MoonPixelFormatYUV420P
344 enum MediaStreamType {
345 MediaTypeAudio = 0,
346 MediaTypeVideo = 1,
347 MediaTypeMarker = 2
350 enum MediaFrameState {
351 MediaFramePlanar = 1 << 0,
352 MediaFrameDecoded = 1 << 1,
353 MediaFrameDemuxed = 1 << 2,
354 MediaFrameConverted = 1 << 3,
355 MediaFrameKeyFrame = 1 << 4,
356 MediaFrameMarker = 1 << 5,
359 G_BEGIN_DECLS
361 int enums_str_to_int (const char *prop_name, const char *str);
362 const char *enums_int_to_str (const char *prop_name, int e);
363 bool enums_is_enum_name (const char *enum_name);
365 G_END_DECLS
367 #endif