Add stubs for gwindow_{get,set}_resizable()

This commit is contained in:
Pierre Pronchery 2020-04-12 05:25:11 +02:00
parent e7fb2501bd
commit f9a1b20912
2 changed files with 23 additions and 2 deletions

View File

@ -31,6 +31,8 @@
#ifndef GTOOLKIT_GWINDOW_H
# define GTOOLKIT_GWINDOW_H
# include <stdbool.h>
/* 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 */

View File

@ -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)
{