@@ -42,7 +42,64 @@ PYBIND11_MODULE(HUI, m) {
4242 .def (" exit" , &WebView::exit)
4343
4444 ;
45+
46+
47+ py::class_<WindowControls>(m, " WindowControls" )
48+ .def (py::init<void *, void *>(), py::arg (" backend" ), py::arg (" handle" ))
49+
50+ .def (" set_type" , &WindowControls::set_type, py::arg (" type" ))
51+ .def (" get_type" , &WindowControls::get_type)
52+
53+ .def (" set_layer" , &WindowControls::set_layer, py::arg (" layer" ))
54+ .def (" get_layer" , &WindowControls::get_layer)
55+
56+ .def (" set_geometry" , &WindowControls::set_geometry, py::arg (" geometry" ))
57+ .def (" get_geometry" , &WindowControls::get_geometry)
58+
59+ .def (" set_opacity" , &WindowControls::set_opacity, py::arg (" opacity" ))
60+ .def (" get_opacity" , &WindowControls::get_opacity)
61+
62+ .def (" set_id" , &WindowControls::set_id, py::arg (" id" ))
63+ .def (" get_id" , &WindowControls::get_id)
64+
65+ .def (" set_title" , &WindowControls::set_title, py::arg (" title" ))
66+ .def (" get_title" , &WindowControls::get_title)
67+
68+ .def (" set_exclusive_zone" , &WindowControls::set_exclusive_zone, py::arg (" zone" ))
69+ .def (" get_exclusive_zone" , &WindowControls::get_exclusive_zone)
4570
46- // TODO: WindowControls
71+ .def (" set_focused" , &WindowControls::set_focused, py::arg (" activated" ))
72+ .def (" get_focused" , &WindowControls::get_focused)
73+
74+ .def (" set_input_mode_keyboard" , &WindowControls::set_input_mode_keyboard, py::arg (" mode" ))
75+ .def (" get_input_mode_keyboard" , &WindowControls::get_input_mode_keyboard)
76+
77+ ;
78+
4779
80+ m.attr (" WT_TOPLEVEL_SSD" ) = WT_TOPLEVEL_SSD;
81+ m.attr (" WT_TOPLEVEL_CSD" ) = WT_TOPLEVEL_CSD;
82+ m.attr (" WT_DESKTOP_COMPONENT" ) = WT_DESKTOP_COMPONENT;
83+ m.attr (" WT_POPOVER" ) = WT_POPOVER;
84+
85+ m.attr (" WL_BACKGROUND" ) = WL_BACKGROUND;
86+ m.attr (" WL_BOTTOM" ) = WL_BOTTOM;
87+ m.attr (" WL_TOP" ) = WL_TOP;
88+ m.attr (" WL_OVERLAY" ) = WL_OVERLAY;
89+ m.attr (" WL_TOPLEAST" ) = WL_TOPLEAST;
90+ m.attr (" WL_TOPMOST" ) = WL_TOPMOST;
91+
92+ m.attr (" WS_HIDDEN" ) = WS_HIDDEN;
93+ m.attr (" WS_NOT_HIDDEN" ) = WS_NOT_HIDDEN;
94+ m.attr (" WS_MINIMIZED" ) = WS_MINIMIZED;
95+ m.attr (" WS_NOT_MINIMIZED" ) = WS_NOT_MINIMIZED;
96+ m.attr (" WS_FULLSCREEN" ) = WS_FULLSCREEN;
97+ m.attr (" WS_NOT_FULLSCREEN" ) = WS_NOT_FULLSCREEN;
98+ m.attr (" WS_MAXIMIZED" ) = WS_MAXIMIZED;
99+ m.attr (" WS_NOT_MAXIMIZED" ) = WS_NOT_MAXIMIZED;
100+
101+ m.attr (" WIM_ALWAYS" ) = WIM_ALWAYS;
102+ m.attr (" WIM_AUTO_WINDOW" ) = WIM_AUTO_WINDOW;
103+ m.attr (" WIM_NEVER" ) = WIM_NEVER;
104+
48105}
0 commit comments