~ubuntu-branches/ubuntu/karmic/moon/karmic

« back to all changes in this revision

Viewing changes to src/enums.h

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-14 12:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20090214120108-06539vb25vhbd8bn
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
2
/*
 
3
 * enums.c: various enumerated types + enum -> str helpers
 
4
 *
 
5
 * Copyright 2007 Novell, Inc. (http://www.novell.com)
 
6
 *
 
7
 * See the LICENSE file included with the distribution for details.
 
8
 * 
 
9
 */
 
10
 
 
11
#ifndef __MOON_ENUMS_H__
 
12
#define __MOON_ENUMS_H__
 
13
 
 
14
#include <glib.h>
 
15
 
 
16
enum ErrorType {
 
17
        NoError,
 
18
        UnknownError,
 
19
        InitializeError,
 
20
        ParserError,
 
21
        ObjectModelError,
 
22
        RuntimeError,
 
23
        DownloadError,
 
24
        MediaError,
 
25
        ImageError
 
26
};
 
27
 
 
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
 
39
};
 
40
 
 
41
enum FontStyles {
 
42
        FontStylesNormal,
 
43
        FontStylesOblique,
 
44
        FontStylesItalic
 
45
};
 
46
 
 
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,
 
58
};
 
59
 
 
60
enum LineStackingStrategy {
 
61
        LineStackingStrategyMaxHeight,
 
62
        LineStackingStrategyBlockLineHeight
 
63
};
 
64
 
 
65
enum StyleSimulations {
 
66
        StyleSimulationsNone
 
67
};
 
68
 
 
69
enum TextAlignment {
 
70
        TextAlignmentCenter,
 
71
        TextAlignmentLeft,
 
72
        TextAlignmentRight
 
73
};
 
74
 
 
75
// TextDecorations would appear to be a collection of bit flags rather
 
76
// than a normal enumeration of values
 
77
enum TextDecorations {
 
78
        TextDecorationsNone      = 0,
 
79
        TextDecorationsUnderline = (1 << 0)
 
80
};
 
81
 
 
82
enum TextWrapping {
 
83
        TextWrappingWrap,
 
84
        TextWrappingNoWrap,
 
85
        TextWrappingWrapWithOverflow
 
86
};
 
87
 
 
88
enum Stretch {
 
89
        StretchNone,
 
90
        StretchFill,
 
91
        StretchUniform,
 
92
        StretchUniformToFill
 
93
};
 
94
 
 
95
enum PenLineCap {
 
96
        PenLineCapFlat,
 
97
        PenLineCapSquare,
 
98
        PenLineCapRound,
 
99
        PenLineCapTriangle
 
100
};
 
101
 
 
102
enum PenLineJoin {
 
103
        PenLineJoinMiter,
 
104
        PenLineJoinBevel,
 
105
        PenLineJoinRound
 
106
};
 
107
 
 
108
enum FillRule {
 
109
        FillRuleEvenOdd,
 
110
        FillRuleNonzero
 
111
};
 
112
 
 
113
enum SweepDirection {
 
114
        SweepDirectionCounterclockwise,
 
115
        SweepDirectionClockwise
 
116
};
 
117
 
 
118
enum Visibility {
 
119
        VisibilityVisible,
 
120
        VisibilityCollapsed
 
121
};
 
122
 
 
123
enum Orientation {
 
124
        OrientationVertical,
 
125
        OrientationHorizontal
 
126
};
 
127
 
 
128
// make sure this stays in sync with System.Windows/System.Windows.Input/Cursor.cs (CursorType enum)
 
129
enum MouseCursor {
 
130
        MouseCursorDefault,
 
131
        MouseCursorArrow,
 
132
        MouseCursorHand,
 
133
        MouseCursorWait,
 
134
        MouseCursorIBeam,
 
135
        MouseCursorStylus,
 
136
        MouseCursorEraser,
 
137
        MouseCursorNone 
 
138
};
 
139
 
 
140
enum Key {
 
141
        KeyKEYNONE = 0,
 
142
        KeyBACKSPACE = 1,
 
143
        KeyTAB = 2,
 
144
        KeyENTER = 3,
 
145
        KeySHIFT = 4,
 
146
        KeyCTRL = 5,
 
147
        KeyALT = 6,
 
148
        KeyCAPSLOCK = 7,
 
149
        KeyESCAPE = 8,
 
150
        KeySPACE = 9,
 
151
        KeyPAGEUP = 10,
 
152
        KeyPAGEDOWN = 11,
 
153
        KeyEND = 12,
 
154
        KeyHOME = 13,
 
155
        KeyLEFT = 14,
 
156
        KeyUP = 15,
 
157
        KeyRIGHT = 16,
 
158
        KeyDOWN = 17,
 
159
        KeyINSERT = 18,
 
160
        KeyDELETE = 19,
 
161
        KeyDIGIT0 = 20,
 
162
        KeyDIGIT1 = 21,
 
163
        KeyDIGIT2 = 22,
 
164
        KeyDIGIT3 = 23,
 
165
        KeyDIGIT4 = 24,
 
166
        KeyDIGIT5 = 25,
 
167
        KeyDIGIT6 = 26,
 
168
        KeyDIGIT7 = 27,
 
169
        KeyDIGIT8 = 28,
 
170
        KeyDIGIT9 = 29,
 
171
        KeyA = 30,
 
172
        KeyB = 31,
 
173
        KeyC = 32,
 
174
        KeyD = 33,
 
175
        KeyE = 34,
 
176
        KeyF = 35,
 
177
        KeyG = 36,
 
178
        KeyH = 37,
 
179
        KeyI = 38,
 
180
        KeyJ = 39,
 
181
        KeyK = 40,
 
182
        KeyL = 41,
 
183
        KeyM = 42,
 
184
        KeyN = 43,
 
185
        KeyO = 44,
 
186
        KeyP = 45,
 
187
        KeyQ = 46,
 
188
        KeyR = 47,
 
189
        KeyS = 48,
 
190
        KeyT = 49,
 
191
        KeyU = 50,
 
192
        KeyV = 51,
 
193
        KeyW = 52,
 
194
        KeyX = 53,
 
195
        KeyY = 54,
 
196
        KeyZ = 55,
 
197
        KeyF1 = 56,
 
198
        KeyF2 = 57,
 
199
        KeyF3 = 58,
 
200
        KeyF4 = 59,
 
201
        KeyF5 = 60,
 
202
        KeyF6 = 61,
 
203
        KeyF7 = 62,
 
204
        KeyF8 = 63,
 
205
        KeyF9 = 64,
 
206
        KeyF10 = 65,
 
207
        KeyF11 = 66,
 
208
        KeyF12 = 67,
 
209
        KeyNUMPAD0 = 68,
 
210
        KeyNUMPAD1 = 69,
 
211
        KeyNUMPAD2 = 70,
 
212
        KeyNUMPAD3 = 71,
 
213
        KeyNUMPAD4 = 72,
 
214
        KeyNUMPAD5 = 73,
 
215
        KeyNUMPAD6 = 74,
 
216
        KeyNUMPAD7 = 75,
 
217
        KeyNUMPAD8 = 76,
 
218
        KeyNUMPAD9 = 77,
 
219
        KeyMULTIPLY = 78,
 
220
        KeyADD = 79,
 
221
        KeySUBTRACT = 80,
 
222
        KeyDECIMAL = 81,
 
223
        KeyDIVIDE = 82,
 
224
        KeyUNKNOWN = 255
 
225
};
 
226
 
 
227
 
 
228
// Silverlight 2.0 Enums:
 
229
 
 
230
enum GridUnitType {
 
231
       GridUnitTypeAuto,
 
232
       GridUnitTypePixel,
 
233
       GridUnitTypeStar
 
234
};
 
235
 
 
236
 
 
237
enum HorizontalAlignment {
 
238
        HorizontalAlignmentLeft,
 
239
        HorizontalAlignmentCenter,
 
240
        HorizontalAlignmentRight,
 
241
        HorizontalAlignmentStretch
 
242
};
 
243
 
 
244
enum KeyboardNavigationMode {
 
245
        KeyboardNavigationModeLocal,
 
246
        KeyboardNavigationModeCycle,
 
247
        KeyboardNavigationModeOnce
 
248
};
 
249
 
 
250
enum ModifierKeys {
 
251
        ModifierKeyNone     = 0,
 
252
        ModifierKeyAlt      = (1 << 0),
 
253
        ModifierKeyControl  = (1 << 1),
 
254
        ModifierKeyShift    = (1 << 2),
 
255
        ModifierKeyWindows  = (1 << 3),
 
256
        ModifierKeyApple    = (1 << 3)
 
257
};
 
258
 
 
259
enum ScrollBarVisibility {
 
260
        ScrollBarVisibilityDisabled,
 
261
        ScrollBarVisibilityAuto,
 
262
        ScrollBarVisibilityHidden,
 
263
        ScrollBarVisibilityVisible
 
264
};
 
265
 
 
266
enum VerticalAlignment {
 
267
        VerticalAlignmentTop,
 
268
        VerticalAlignmentCenter,
 
269
        VerticalAlignmentBottom,
 
270
        VerticalAlignmentStretch
 
271
};
 
272
 
 
273
enum CrossDomainAccess {
 
274
        CrossDomainAccessNoAccess,
 
275
        CrossDomainAccessFullAccess,
 
276
        CrossDomainAccessScriptableOnly,
 
277
};
 
278
 
 
279
G_BEGIN_DECLS
 
280
 
 
281
int enums_str_to_int (const char *prop_name, const char *str, bool sl2);
 
282
const char *enums_int_to_str (const char *prop_name, int e, bool sl2);
 
283
 
 
284
G_END_DECLS
 
285
 
 
286
#endif