From f9a1b2091274fc7b3dc1192483ba9fd0c4c433e0 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 12 Apr 2020 05:25:11 +0200 Subject: [PATCH] Add stubs for gwindow_{get,set}_resizable() --- include/GToolkit/GWindow.h | 4 ++++ src/gwindow.c | 21 +++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/include/GToolkit/GWindow.h b/include/GToolkit/GWindow.h index f5880bc..1210455 100644 --- a/include/GToolkit/GWindow.h +++ b/include/GToolkit/GWindow.h @@ -31,6 +31,8 @@ #ifndef GTOOLKIT_GWINDOW_H # define GTOOLKIT_GWINDOW_H +# include + /* GWindow */ /* types */ @@ -43,7 +45,9 @@ void gwindow_delete(GWindow * gwindow); /* accessors */ +bool gwindow_get_resizable(GWindow * gwindow); char const * gwindow_get_title(GWindow * gwindow); +void gwindow_set_resizable(GWindow * gwindow, bool resizable); void gwindow_set_title(GWindow * gwindow, char const * title); /* useful */ diff --git a/src/gwindow.c b/src/gwindow.c index 587d8af..b5b686d 100644 --- a/src/gwindow.c +++ b/src/gwindow.c @@ -44,7 +44,8 @@ struct _GWindow /* GWindow */ char * title; - Bool fullscreen; + bool fullscreen; + bool resizable; int width; int height; @@ -68,7 +69,8 @@ GWindow * gwindow_new(void) if((gwindow = malloc(sizeof(*gwindow))) == NULL) return NULL; /* FIXME report */ gwindow->title = NULL; - gwindow->fullscreen = False; + gwindow->fullscreen = false; + gwindow->resizable = true; gwindow->width = -1; gwindow->height = -1; display = gtoolkit_get_display(); @@ -102,6 +104,13 @@ void gwindow_delete(GWindow * gwindow) /* accessors */ +/* gwindow_get_resizable */ +bool gwindow_get_resizable(GWindow * gwindow) +{ + return gwindow->resizable; +} + + /* gwindow_get_title */ char const * gwindow_get_title(GWindow * gwindow) { @@ -116,6 +125,14 @@ Window gwindow_get_window(GWindow * gwindow) } +/* gwindow_set_resizable */ +void gwindow_set_resizable(GWindow * gwindow, bool resizable) +{ + /* FIXME really implement */ + gwindow->resizable = resizable; +} + + /* gwindow_set_title */ void gwindow_set_title(GWindow * gwindow, char const * title) {