summaryrefslogtreecommitdiff
path: root/widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widget.cpp')
-rw-r--r--widget.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/widget.cpp b/widget.cpp
new file mode 100644
index 0000000..f75e2aa
--- /dev/null
+++ b/widget.cpp
@@ -0,0 +1,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);
+}