wlt: toolkit: add wlt_window_get_display() helper
This is useful to get access to input devices from the display when only a widget or window is available. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
70bfc314e0
commit
1c813d1d1d
@ -1566,6 +1566,14 @@ struct ev_eloop *wlt_window_get_eloop(struct wlt_window *wnd)
|
||||
return wnd->disp->eloop;
|
||||
}
|
||||
|
||||
struct wlt_display *wlt_window_get_display(struct wlt_window *wnd)
|
||||
{
|
||||
if (!wnd)
|
||||
return NULL;
|
||||
|
||||
return wnd->disp;
|
||||
}
|
||||
|
||||
void wlt_widget_destroy(struct wlt_widget *widget)
|
||||
{
|
||||
if (!widget)
|
||||
|
@ -157,6 +157,7 @@ void wlt_window_close(struct wlt_window *wnd);
|
||||
void wlt_window_toggle_maximize(struct wlt_window *wnd);
|
||||
void wlt_window_toggle_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);
|
||||
|
||||
void wlt_widget_destroy(struct wlt_widget *widget);
|
||||
struct wlt_window *wlt_widget_get_window(struct wlt_widget *widget);
|
||||
|
Loading…
x
Reference in New Issue
Block a user