Skip to content

Commit 7adbdc4

Browse files
authored
Merge pull request #575 from konakona418/main
Add C++ wrappers for C functions of window class.
2 parents 9136468 + d6354c5 commit 7adbdc4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/webui.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,27 @@ namespace webui {
367367
webui_set_public(webui_window, status);
368368
}
369369

370+
// Enable or disable the window frame.
371+
void set_frameless(bool status) const {
372+
webui_set_frameless(webui_window, status);
373+
}
374+
375+
// Enable or disable window background transparency.
376+
// When enabled, the window background will be transparent (if supported).
377+
void set_transparent(bool status) const {
378+
webui_set_transparent(webui_window, status);
379+
}
380+
381+
// Enable or disable window resizing by user.
382+
void set_resizable(bool status) const {
383+
webui_set_resizable(webui_window, status);
384+
}
385+
386+
// Set window position to the center of the screen.
387+
void set_center() const {
388+
webui_set_center(webui_window);
389+
}
390+
370391
// Same as `webui_show()`. But start only the web server and return the URL. No window will be shown.
371392
std::string_view start_server(const std::string_view content) const {
372393
return std::string_view{webui_start_server(webui_window, content.data())};

0 commit comments

Comments
 (0)