1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
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.
11 #ifndef __MOON_ENUMS_H__
12 #define __MOON_ENUMS_H__
16 enum ErrorEventArgsType
{
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
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
72 MediaStateIndividualizing
,
73 MediaStateAcquiringLicense
,
78 PixelFormatPbgra32
= 2
81 enum StyleSimulations
{
82 StyleSimulationsNone
= 0,
83 StyleSimulationsBold
= (1 << 0),
84 StyleSimulationsItalic
= (1 << 1),
85 StyleSimulationsBoldItalic
= (StyleSimulationsBold
| StyleSimulationsItalic
),
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)
102 TextWrappingWrapWithOverflow
,
132 enum SweepDirection
{
133 SweepDirectionCounterclockwise
,
134 SweepDirectionClockwise
144 OrientationHorizontal
147 // make sure this stays in sync with System.Windows/System.Windows.Input/Cursor.cs (CursorType enum)
249 // Silverlight 2.0 Enums:
252 BindingModeOneWay
= 1,
253 BindingModeOneTime
= 2,
254 BindingModeTwoWay
= 3
264 enum HorizontalAlignment
{
265 HorizontalAlignmentLeft
,
266 HorizontalAlignmentCenter
,
267 HorizontalAlignmentRight
,
268 HorizontalAlignmentStretch
271 enum KeyboardNavigationMode
{
272 KeyboardNavigationModeLocal
,
273 KeyboardNavigationModeCycle
,
274 KeyboardNavigationModeOnce
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,
317 // Silverlight 3.0 enums
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
{
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
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
);