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
,
79 PixelFormatPbgra32
= 2
82 enum StyleSimulations
{
83 StyleSimulationsNone
= 0,
84 StyleSimulationsBold
= (1 << 0),
85 StyleSimulationsItalic
= (1 << 1),
86 StyleSimulationsBoldItalic
= (StyleSimulationsBold
| StyleSimulationsItalic
),
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)
103 TextWrappingWrapWithOverflow
,
133 enum SweepDirection
{
134 SweepDirectionCounterclockwise
,
135 SweepDirectionClockwise
145 OrientationHorizontal
148 // make sure this stays in sync with System.Windows/System.Windows.Input/Cursor.cs (CursorType enum)
250 // Silverlight 2.0 Enums:
253 BindingModeOneWay
= 1,
254 BindingModeOneTime
= 2,
255 BindingModeTwoWay
= 3
265 enum HorizontalAlignment
{
266 HorizontalAlignmentLeft
,
267 HorizontalAlignmentCenter
,
268 HorizontalAlignmentRight
,
269 HorizontalAlignmentStretch
272 enum KeyboardNavigationMode
{
273 KeyboardNavigationModeLocal
,
274 KeyboardNavigationModeCycle
,
275 KeyboardNavigationModeOnce
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,
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
{
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,
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
);