2009-12-07 Rolf Bjarne Kvinge <RKvinge@novell.com>
[moon.git] / src / enums.h
blobcca8e818cb2756027874885d49cdf2524b3fe7f1
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,
76 enum PixelFormats {
77 PixelFormatBgr32 = 1,
78 PixelFormatPbgra32 = 2
81 enum StyleSimulations {
82 StyleSimulationsNone = 0,
83 StyleSimulationsBold = (1 << 0),
84 StyleSimulationsItalic = (1 << 1),
85 StyleSimulationsBoldItalic = (StyleSimulationsBold | StyleSimulationsItalic),
88 enum TextAlignment {
89 TextAlignmentCenter,
90 TextAlignmentLeft,
91 TextAlignmentRight
94 // TextDecorations would appear to be a collection of bit flags rather
95 // than a normal enumeration of values
96 enum TextDecorations {
97 TextDecorationsNone = 0,
98 TextDecorationsUnderline = (1 << 0)
101 enum TextWrapping {
102 TextWrappingWrapWithOverflow,
103 TextWrappingNoWrap,
104 TextWrappingWrap,
107 enum Stretch {
108 StretchNone,
109 StretchFill,
110 StretchUniform,
111 StretchUniformToFill
114 enum PenLineCap {
115 PenLineCapFlat,
116 PenLineCapSquare,
117 PenLineCapRound,
118 PenLineCapTriangle
121 enum PenLineJoin {
122 PenLineJoinMiter,
123 PenLineJoinBevel,
124 PenLineJoinRound
127 enum FillRule {
128 FillRuleEvenOdd,
129 FillRuleNonzero
132 enum SweepDirection {
133 SweepDirectionCounterclockwise,
134 SweepDirectionClockwise
137 enum Visibility {
138 VisibilityVisible,
139 VisibilityCollapsed
142 enum Orientation {
143 OrientationVertical,
144 OrientationHorizontal
147 // make sure this stays in sync with System.Windows/System.Windows.Input/Cursor.cs (CursorType enum)
148 enum MouseCursor {
149 MouseCursorDefault,
150 MouseCursorArrow,
151 MouseCursorHand,
152 MouseCursorWait,
153 MouseCursorIBeam,
154 MouseCursorStylus,
155 MouseCursorEraser,
156 MouseCursorSizeNS,
157 MouseCursorSizeWE,
158 MouseCursorNone
161 enum Key {
162 KeyKEYNONE = 0,
163 KeyBACKSPACE = 1,
164 KeyTAB = 2,
165 KeyENTER = 3,
166 KeySHIFT = 4,
167 KeyCTRL = 5,
168 KeyALT = 6,
169 KeyCAPSLOCK = 7,
170 KeyESCAPE = 8,
171 KeySPACE = 9,
172 KeyPAGEUP = 10,
173 KeyPAGEDOWN = 11,
174 KeyEND = 12,
175 KeyHOME = 13,
176 KeyLEFT = 14,
177 KeyUP = 15,
178 KeyRIGHT = 16,
179 KeyDOWN = 17,
180 KeyINSERT = 18,
181 KeyDELETE = 19,
182 KeyDIGIT0 = 20,
183 KeyDIGIT1 = 21,
184 KeyDIGIT2 = 22,
185 KeyDIGIT3 = 23,
186 KeyDIGIT4 = 24,
187 KeyDIGIT5 = 25,
188 KeyDIGIT6 = 26,
189 KeyDIGIT7 = 27,
190 KeyDIGIT8 = 28,
191 KeyDIGIT9 = 29,
192 KeyA = 30,
193 KeyB = 31,
194 KeyC = 32,
195 KeyD = 33,
196 KeyE = 34,
197 KeyF = 35,
198 KeyG = 36,
199 KeyH = 37,
200 KeyI = 38,
201 KeyJ = 39,
202 KeyK = 40,
203 KeyL = 41,
204 KeyM = 42,
205 KeyN = 43,
206 KeyO = 44,
207 KeyP = 45,
208 KeyQ = 46,
209 KeyR = 47,
210 KeyS = 48,
211 KeyT = 49,
212 KeyU = 50,
213 KeyV = 51,
214 KeyW = 52,
215 KeyX = 53,
216 KeyY = 54,
217 KeyZ = 55,
218 KeyF1 = 56,
219 KeyF2 = 57,
220 KeyF3 = 58,
221 KeyF4 = 59,
222 KeyF5 = 60,
223 KeyF6 = 61,
224 KeyF7 = 62,
225 KeyF8 = 63,
226 KeyF9 = 64,
227 KeyF10 = 65,
228 KeyF11 = 66,
229 KeyF12 = 67,
230 KeyNUMPAD0 = 68,
231 KeyNUMPAD1 = 69,
232 KeyNUMPAD2 = 70,
233 KeyNUMPAD3 = 71,
234 KeyNUMPAD4 = 72,
235 KeyNUMPAD5 = 73,
236 KeyNUMPAD6 = 74,
237 KeyNUMPAD7 = 75,
238 KeyNUMPAD8 = 76,
239 KeyNUMPAD9 = 77,
240 KeyMULTIPLY = 78,
241 KeyADD = 79,
242 KeySUBTRACT = 80,
243 KeyDECIMAL = 81,
244 KeyDIVIDE = 82,
245 KeyUNKNOWN = 255
249 // Silverlight 2.0 Enums:
251 enum BindingMode {
252 BindingModeOneWay = 1,
253 BindingModeOneTime = 2,
254 BindingModeTwoWay = 3
257 enum GridUnitType {
258 GridUnitTypeAuto,
259 GridUnitTypePixel,
260 GridUnitTypeStar
264 enum HorizontalAlignment {
265 HorizontalAlignmentLeft,
266 HorizontalAlignmentCenter,
267 HorizontalAlignmentRight,
268 HorizontalAlignmentStretch
271 enum KeyboardNavigationMode {
272 KeyboardNavigationModeLocal,
273 KeyboardNavigationModeCycle,
274 KeyboardNavigationModeOnce
277 enum ModifierKeys {
278 ModifierKeyNone = 0,
279 ModifierKeyAlt = (1 << 0),
280 ModifierKeyControl = (1 << 1),
281 ModifierKeyShift = (1 << 2),
282 ModifierKeyWindows = (1 << 3),
283 ModifierKeyApple = (1 << 3)
286 enum ScrollBarVisibility {
287 ScrollBarVisibilityDisabled,
288 ScrollBarVisibilityAuto,
289 ScrollBarVisibilityHidden,
290 ScrollBarVisibilityVisible
293 enum VerticalAlignment {
294 VerticalAlignmentTop,
295 VerticalAlignmentCenter,
296 VerticalAlignmentBottom,
297 VerticalAlignmentStretch
300 enum CrossDomainAccess {
301 CrossDomainAccessNoAccess = 0,
302 // CrossDomainAccessFullAccess (1) was removed before final SL2 release
303 CrossDomainAccessScriptableOnly = 2,
306 enum FillBehavior {
307 FillBehaviorHoldEnd,
308 FillBehaviorStop
311 enum EasingMode {
312 EasingModeIn,
313 EasingModeOut,
314 EasingModeInOut
317 // Silverlight 3.0 enums
319 enum LogSource {
320 LogSourceRequestLog,
321 LogSourceStop,
322 LogSourceSeek,
323 LogSourcePause,
324 LogSourceSourceChanged,
325 LogSourceEndOfStream,
326 LogSourceMediaElementShutdown,
327 LogSourceRuntimeShutdown
331 // enums used in the pipeline
332 // there is no string <-> enum conversions for these
334 enum MediaSourceType {
335 MediaSourceTypeFile = 1,
336 MediaSourceTypeLive = 2,
337 MediaSourceTypeProgressive = 3,
338 MediaSourceTypeMemory = 4,
339 MediaSourceTypeMms = 5,
340 MediaSourceTypeMmsEntry = 6,
341 MediaSourceTypeManagedStream = 7,
344 enum MediaStreamSourceDiagnosticKind {
345 BufferLevelInMilliseconds = 1,
346 BufferLevelInBytes = 2
349 enum MoonPixelFormat {
350 MoonPixelFormatNone = 0,
351 MoonPixelFormatRGB32,
352 MoonPixelFormatRGBA32,
353 MoonPixelFormatYUV420P
356 enum MediaStreamType {
357 MediaTypeAudio = 0,
358 MediaTypeVideo = 1,
359 MediaTypeMarker = 2
362 enum MediaFrameState {
363 MediaFramePlanar = 1 << 0,
364 MediaFrameDecoded = 1 << 1,
365 MediaFrameDemuxed = 1 << 2,
366 MediaFrameConverted = 1 << 3,
367 MediaFrameKeyFrame = 1 << 4,
368 MediaFrameMarker = 1 << 5,
371 enum TextHintingMode {
372 TextHintingModeFixed,
373 TextHintingModeAnimated
376 G_BEGIN_DECLS
378 int enums_str_to_int (const char *prop_name, const char *str);
379 const char *enums_int_to_str (const char *prop_name, int e);
380 bool enums_is_enum_name (const char *enum_name);
382 G_END_DECLS
384 #endif