libRocket
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Types.h
Go to the documentation of this file.
1 /*
2  * This source file is part of libRocket, the HTML/CSS Interface Middleware
3  *
4  * For the latest information, see http://www.librocket.com
5  *
6  * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a copy
9  * of this software and associated documentation files (the "Software"), to deal
10  * in the Software without restriction, including without limitation the rights
11  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12  * copies of the Software, and to permit persons to whom the Software is
13  * furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included in
16  * all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24  * THE SOFTWARE.
25  *
26  */
27 
28 #ifndef ROCKETCORETYPES_H
29 #define ROCKETCORETYPES_H
30 
31 // Define NULL as zero.
32 #if !defined NULL
33 #define NULL 0
34 #endif
35 
36 #include <float.h>
37 #include <limits.h>
38 #include <string>
39 #include <map>
40 #include <set>
41 #include <vector>
42 
43 #include "Platform.h"
44 #include "Debug.h"
45 
46 namespace Rocket {
47 namespace Core {
48 
49 // Define commonly used basic types.
50 typedef unsigned char byte;
51 typedef unsigned short word;
52 typedef double Time;
53 typedef float TimeDelta;
54 typedef unsigned int Hash;
55 typedef void* ScriptObject;
56 
57 }
58 }
59 
60 #ifdef ROCKET_PLATFORM_WIN32
61 typedef unsigned __int64 uint64_t;
62 #else
63 #include <inttypes.h>
64 #endif
65 
66 #include "Colour.h"
67 #include "Vector2.h"
68 #include "String.h"
69 
70 namespace Rocket {
71 namespace Core {
72 
73 // Default colour types.
77 typedef Vector2< int > Vector2i;
78 
79 
80 class Element;
81 class Dictionary;
82 
83 // Types for external interfaces.
84 typedef uintptr_t FileHandle;
85 typedef uintptr_t TextureHandle;
86 typedef uintptr_t CompiledGeometryHandle;
87 typedef uintptr_t DecoratorDataHandle;
88 
89 // List of elements.
90 typedef std::vector< Element* > ElementList;
91 typedef std::set< String > PseudoClassList;
92 typedef std::set< String > PropertyNameList;
93 typedef std::set< String > AttributeNameList;
95 
96 }
97 }
98 
99 #endif
unsigned char byte
Definition: Types.h:50
std::set< String > PseudoClassList
Definition: Types.h:91
Vector2< int > Vector2i
Definition: MathTypes.h:40
uintptr_t DecoratorDataHandle
Definition: Types.h:87
Definition: Clipboard.h:33
uintptr_t CompiledGeometryHandle
Definition: Types.h:86
Definition: Colour.h:43
Colour< float, 1 > Colourf
Definition: Types.h:74
uintptr_t TextureHandle
Definition: Types.h:85
std::set< String > PropertyNameList
Definition: Types.h:92
Dictionary ElementAttributes
Definition: Types.h:94
void * ScriptObject
Definition: Types.h:55
Colour< byte, 255 > Colourb
Definition: Types.h:75
unsigned int Hash
Definition: Types.h:54
Definition: Dictionary.h:44
unsigned short word
Definition: Types.h:51
Definition: Element.h:71
std::vector< Element * > ElementList
Definition: Types.h:90
float TimeDelta
Definition: Types.h:53
uintptr_t FileHandle
Definition: Types.h:81
double Time
Definition: Types.h:52
Vector2< float > Vector2f
Definition: MathTypes.h:41
std::set< String > AttributeNameList
Definition: Types.h:93