-
Notifications
You must be signed in to change notification settings - Fork 0
/
type_def.hpp
70 lines (62 loc) · 1.4 KB
/
type_def.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#ifndef _HG_TYPE_DEF_HPP_
#define _HG_TYPE_DEF_HPP_
namespace hg
{
typedef unsigned short ushort;
typedef wchar_t wchar;
typedef wchar_t * pwchar;
typedef const wchar_t * cpwchar;
typedef char * pchar;
typedef const char * cpchar;
typedef unsigned char uchar;
typedef unsigned char * puchar;
typedef const unsigned char * cpuchar;
typedef unsigned long ulong;
typedef unsigned long long ullong;
typedef unsigned int uint;
typedef void * pvoid;
typedef void * handle;
typedef unsigned long long jsdatetime;
template<typename outtype, typename intype>
inline outtype implicit_cast(intype value) { return value; }
#pragma pack(1)
typedef struct
{
ushort year;
ushort month;
ushort week;
ushort day;
ushort hour;
ushort minute;
ushort second;
ushort milliseconds;
} sys_time;
struct point
{
long x;
long y;
point();
point(long lx, long ly);
};
struct rect
{
long left;
long top;
long right;
long bottom;
rect();
rect(long vleft, long vtop, long vright, long vbottom);
rect(hg::point& lt, hg::point& rb);
rect(long vleft, long vtop, hg::point& rb);
rect(hg::point& lt, long vright, long vbottom);
long height() const;
long width() const;
hg::point lefttop() const;
hg::point rightbottom() const;
hg::point leftbottom() const;
hg::point righttop() const;
};
#pragma pack()
}
#endif // _HG_TYPE_DEF_HPP_