Add free functions for allocated resources

This commit is contained in:
Drew DeVault 2017-04-25 21:26:29 -04:00
parent 1e8970b4a9
commit 1aed987301
10 changed files with 96 additions and 10 deletions

View file

@ -7,11 +7,13 @@
struct wlr_wl_seat {
struct wl_seat *wl_seat;
uint32_t capabilities;
const char *name;
char *name;
list_t *keyboards;
list_t *pointers;
};
void wlr_wl_seat_free(struct wlr_wl_seat *seat);
struct wlr_wl_output_mode {
uint32_t flags; // enum wl_output_mode
int32_t width, height;
@ -21,8 +23,8 @@ struct wlr_wl_output_mode {
struct wlr_wl_output {
struct wl_output *wl_output;
uint32_t flags;
const char *make;
const char *model;
char *make;
char *model;
uint32_t scale;
int32_t x, y;
int32_t phys_width, phys_height; // mm
@ -32,6 +34,8 @@ struct wlr_wl_output {
struct wlr_wl_output_mode *current_mode;
};
void wlr_wl_output_free(struct wlr_wl_output *output);
struct wlr_wl_keyboard {
struct wl_keyboard *wl_keyboard;
};