-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathHtmlScreen.cpp
More file actions
75 lines (69 loc) · 1.52 KB
/
Copy pathHtmlScreen.cpp
File metadata and controls
75 lines (69 loc) · 1.52 KB
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
71
72
73
74
75
#include "stdafx.h"
#include "HtmlScreen.h"
#include "OpenglContext.h"
IMPLEMENT_CUSTOM_CLASS(HtmlScreen, CustomClassBase)
HtmlScreen::HtmlScreen()
{
}
HtmlScreen::~HtmlScreen()
{
}
bool HtmlScreen::InitClass(const HandleContext&context)
{
return InitClass_s(context, "HTMLScreen", HandleObject());
}
bool HtmlScreen::OnGetProperty(GetPropertyArgs&args)
{
const char*name = args.GetName();
if (!PROPCMP(name, "availTop"))
{
args.SetRetValue(ValueBase().SetInt(0));
return true;
}
else if (!PROPCMP(name, "availLeft"))
{
args.SetRetValue(ValueBase().SetInt(0));
return true;
}
else if (!PROPCMP(name, "availHeight"))
{
args.SetRetValue(ValueBase().SetInt(OpenglContext::GetHeight()));
return true;
}
else if (!PROPCMP(name, "availWidth"))
{
args.SetRetValue(ValueBase().SetInt(OpenglContext::GetWidth()));
return true;
}
else if (!PROPCMP(name, "colorDepth"))
{
args.SetRetValue(ValueBase().SetInt(32));
return true;
}
else if (!PROPCMP(name, "left"))
{
args.SetRetValue(ValueBase().SetInt(0));
return true;
}
else if (!PROPCMP(name, "top"))
{
args.SetRetValue(ValueBase().SetInt(0));
return true;
}
else if (!PROPCMP(name, "pixelDepth"))
{
args.SetRetValue(ValueBase().SetInt(32));
return true;
}
else if (!PROPCMP(name, "width"))
{
args.SetRetValue(ValueBase().SetInt(OpenglContext::GetWidth()));
return true;
}
else if (!PROPCMP(name, "height"))
{
args.SetRetValue(ValueBase().SetInt(OpenglContext::GetHeight()));
return true;
}
return CustomClassBase::OnGetProperty(args);
}