Let clients override the suggested size on resize.

This lets gears enforce a square aspect ration and minimum size of 300x300
and the terminal now properly resizes in steps of character cells.
This commit is contained in:
Kristian Høgsberg 2008-12-08 13:50:07 -05:00
parent 1584c57edc
commit 221067654c
4 changed files with 104 additions and 40 deletions

View file

@ -32,7 +32,7 @@ struct rectangle {
int32_t height;
};
typedef void (*window_resize_handler_t)(struct window *window, struct rectangle *rectangle, void *data);
typedef void (*window_resize_handler_t)(struct window *window, void *data);
typedef void (*window_frame_handler_t)(struct window *window, uint32_t frame, uint32_t timestamp, void *data);
typedef void (*window_acknowledge_handler_t)(struct window *window, uint32_t key, void *data);
typedef void (*window_key_handler_t)(struct window *window, uint32_t key, uint32_t state, void *data);
@ -52,6 +52,9 @@ void
window_get_child_rectangle(struct window *window,
struct rectangle *rectangle);
void
window_set_child_size(struct window *window,
struct rectangle *rectangle);
void
window_copy(struct window *window,
struct rectangle *rectangle,
uint32_t name, uint32_t stride);