wlt: toolkit: add is_maximized/fullscreen helpers
These helpers return whether a window is maximized/fullscreen. This can be used by the theme/terminal control layer to change behavior depending on these flags. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
e4d25266b0
commit
96a82433b0
@ -1813,6 +1813,11 @@ void wlt_window_toggle_maximize(struct wlt_window *wnd)
|
||||
wnd->maximized = !wnd->maximized;
|
||||
}
|
||||
|
||||
bool wlt_window_is_maximized(struct wlt_window *wnd)
|
||||
{
|
||||
return wnd && wnd->maximized;
|
||||
}
|
||||
|
||||
void wlt_window_toggle_fullscreen(struct wlt_window *wnd)
|
||||
{
|
||||
if (!wnd)
|
||||
@ -1840,6 +1845,11 @@ void wlt_window_toggle_fullscreen(struct wlt_window *wnd)
|
||||
wnd->fullscreen = !wnd->fullscreen;
|
||||
}
|
||||
|
||||
bool wlt_window_is_fullscreen(struct wlt_window *wnd)
|
||||
{
|
||||
return wnd && wnd->fullscreen;
|
||||
}
|
||||
|
||||
struct ev_eloop *wlt_window_get_eloop(struct wlt_window *wnd)
|
||||
{
|
||||
if (!wnd)
|
||||
|
@ -164,7 +164,9 @@ void wlt_window_set_close_cb(struct wlt_window *wnd,
|
||||
wlt_window_close_cb cb);
|
||||
void wlt_window_close(struct wlt_window *wnd);
|
||||
void wlt_window_toggle_maximize(struct wlt_window *wnd);
|
||||
bool wlt_window_is_maximized(struct wlt_window *wnd);
|
||||
void wlt_window_toggle_fullscreen(struct wlt_window *wnd);
|
||||
bool wlt_window_is_fullscreen(struct wlt_window *wnd);
|
||||
struct ev_eloop *wlt_window_get_eloop(struct wlt_window *wnd);
|
||||
struct wlt_display *wlt_window_get_display(struct wlt_window *wnd);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user