summaryrefslogtreecommitdiff
path: root/widget.cpp
blob: f75e2aa7ab16d995c9b3df06f4a0fdc5e90077d9 (plain)
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
#include <skygi/skygi.h>

#include "widget.h"

CWidget::CWidget() {
	this->hWnd = NULL;
}

HANDLE CWidget::GetHANDLE() {
	return this->hWnd;
}

HRESULT CWidget::SetSize(int w, int h) {
	return GI_ApplicationSetSize(this->hWnd, w, h);
}

int CWidget::GetWidth() {
	return GI_WindowGetWidth(this->hWnd);
}

int CWidget::GetHeight() {
	return GI_WindowGetHeight(this->hWnd);
}

HRESULT CWidget::SetPos(int x, int y) {
	return GI_WindowSetPos(this->hWnd, x, y);
}

int CWidget::GetX() {
	return GI_WindowGetX(this->hWnd);
}

int CWidget::GetXAbsolute() {
	return GI_WindowGetXAbsolute(this->hWnd);
}

int CWidget::GetY() {
	return GI_WindowGetY(this->hWnd);
}

int CWidget::GetYAbsolute() {
	return GI_WindowGetYAbsolute(this->hWnd);
}

HRESULT CWidget::SetSizeAndPos(int x, int y, int w, int h) {
	return GI_WindowSetSizeAndPos(this->hWnd, x, y, w, h);
}

HRESULT CWidget::DimensionSetNotify(int notify, int x1, int y1, int w, int h) {
	return GI_WindowDimensionSetNotify(this->hWnd, notify, x1, y1, w, h);
}

/*HRESULT CWidget::SetParent(HANDLE hParent, int x, int y) {
	return GI_WindowSetParent(this->hWnd, hParent, x, y);
}*/

HANDLE CWidget::GetParent() {
	return GI_WindowGetParent(this->hWnd);
}

HANDLE CWidget::GetTopLevel() {
	return GI_WindowGetTopLevel(this->hWnd);
}