diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-06 21:59:05 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-06 22:03:44 -0500 |
commit | 4f7dcd6eb18ea708f172a9e0239992f49c6860d2 (patch) | |
tree | ad658c510e29ba558c37c5facd1dcc8805247536 /clients/window.h | |
parent | 249713bbe0ebb046c091d8cb2ec9ed7b70eb3923 (diff) |
window: Add a window menu
At least this gives us a way to close the toy toolkit clients.
Diffstat (limited to 'clients/window.h')
-rw-r--r-- | clients/window.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clients/window.h b/clients/window.h index f1bad3f..30311df 100644 --- a/clients/window.h +++ b/clients/window.h @@ -197,15 +197,21 @@ typedef void (*window_drop_handler_t)(struct window *window, typedef void (*window_item_focus_handler_t)(struct window *window, struct item *focus, void *data); +typedef void (*window_close_handler_t)(struct window *window, void *data); + struct window * window_create(struct display *display, int32_t width, int32_t height); struct window * window_create_transient(struct display *display, struct window *parent, int32_t x, int32_t y, int32_t width, int32_t height); + +typedef void (*menu_func_t)(struct window *window, int index, void *data); + struct window * window_create_menu(struct display *display, struct input *input, uint32_t time, struct window *parent, - int32_t x, int32_t y, const char **entries, int count); + int32_t x, int32_t y, + menu_func_t func, const char **entries, int count); void window_destroy(struct window *window); @@ -341,6 +347,10 @@ window_set_drop_handler(struct window *window, window_drop_handler_t handler); void +window_set_close_handler(struct window *window, + window_close_handler_t handler); + +void window_set_title(struct window *window, const char *title); const char * |