#ifndef _WINDOW_H_
#define _WINDOW_H_
+#include "config.h"
+
#include <xkbcommon/xkbcommon.h>
#include <wayland-client.h>
#include <cairo.h>
xzalloc(size_t s);
char *
xstrdup(const char *s);
+void *
+xrealloc(char *p, size_t s);
struct display *
display_create(int *argc, char *argv[]);
typedef void (*window_output_handler_t)(struct window *window, struct output *output,
int enter, void *data);
+typedef void (*window_state_changed_handler_t)(struct window *window,
+ void *data);
typedef void (*widget_resize_handler_t)(struct widget *widget,
int32_t width, int32_t height,
struct window *
window_create(struct display *display);
struct window *
-window_create_transient(struct display *display, struct window *parent,
- int32_t x, int32_t y, uint32_t flags);
-struct window *
window_create_custom(struct display *display);
+void
+window_set_parent(struct window *window, struct window *parent_window);
+struct window *
+window_get_parent(struct window *window);
+
int
window_has_focus(struct window *window);
-typedef void (*menu_func_t)(struct window *window,
- struct input *input, int index, void *data);
+typedef void (*menu_func_t)(void *data, struct input *input, int index);
+struct window *
+window_create_menu(struct display *display,
+ struct input *input, uint32_t time,
+ menu_func_t func, const char **entries, int count,
+ void *user_data);
void
window_show_menu(struct display *display,
struct input *input, uint32_t time, struct window *parent,
void
window_set_buffer_type(struct window *window, enum window_buffer_type type);
-int
-window_is_transient(struct window *window);
+enum window_buffer_type
+window_get_buffer_type(struct window *window);
int
window_is_fullscreen(struct window *window);
void
window_set_fullscreen(struct window *window, int fullscreen);
-void
-window_set_fullscreen_method(struct window *window,
- enum wl_shell_surface_fullscreen_method method);
int
window_is_maximized(struct window *window);
void
window_set_maximized(struct window *window, int maximized);
+int
+window_is_resizing(struct window *window);
+
+void
+window_set_minimized(struct window *window);
+
void
window_set_user_data(struct window *window, void *data);
void
window_set_output_handler(struct window *window,
window_output_handler_t handler);
+void
+window_set_state_changed_handler(struct window *window,
+ window_state_changed_handler_t handler);
void
window_set_title(struct window *window, const char *title);
widget_axis_handler_t handler);
void
widget_schedule_redraw(struct widget *widget);
+void
+widget_set_use_cairo(struct widget *widget, int use_cairo);
struct widget *
window_frame_create(struct window *window, void *data);
uint32_t
output_get_scale(struct output *output);
+const char *
+output_get_make(struct output *output);
+
+const char *
+output_get_model(struct output *output);
+
void
keysym_modifiers_add(struct wl_array *modifiers_map,
const char *name);