Some cleanup
This commit is contained in:
parent
8763235078
commit
b877a736ca
|
@ -1,4 +1,4 @@
|
|||
/* GToolkit.h */
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
|||
# include "GToolkit/GWindow.h"
|
||||
|
||||
|
||||
/* GToolkit */
|
||||
/* functions */
|
||||
int g_init(void);
|
||||
int g_quit(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* GToolkit/GWidget.h */
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
|||
# define GTOOLKIT_GWIDGET_H
|
||||
|
||||
|
||||
/* GWidget */
|
||||
/* types */
|
||||
typedef struct _GWidget GWidget;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* GToolkit/GWindow.h */
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
|
||||
|
@ -6,11 +6,15 @@
|
|||
# define GTOOLKIT_GWINDOW_H
|
||||
|
||||
|
||||
/* GWindow */
|
||||
/* types */
|
||||
typedef struct _GWindow GWindow;
|
||||
|
||||
|
||||
/* functions */
|
||||
GWindow * gwindow_new();
|
||||
GWindow * gwindow_new(void);
|
||||
|
||||
/* useful */
|
||||
void gwindow_show(GWindow * gwindow);
|
||||
|
||||
#endif /* !GTOOLKIT_GWINDOW_H */
|
||||
|
|
|
@ -7,10 +7,19 @@
|
|||
#include "common.h"
|
||||
|
||||
|
||||
/* GToolkit */
|
||||
/* private */
|
||||
/* variables */
|
||||
static int _gt_init = 0; /* FIXME pointer(s) to function(s) instead? */
|
||||
|
||||
|
||||
/* protected */
|
||||
/* variables */
|
||||
GToolkit gt;
|
||||
|
||||
|
||||
/* public */
|
||||
/* functions */
|
||||
/* g_init */
|
||||
int g_init(void)
|
||||
{
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include "GToolkit/GWindow.h"
|
||||
|
||||
|
||||
/* GWindow */
|
||||
/* private */
|
||||
/* types */
|
||||
struct _GWindow
|
||||
{
|
||||
|
@ -19,6 +21,7 @@ struct _GWindow
|
|||
};
|
||||
|
||||
|
||||
/* public */
|
||||
/* functions */
|
||||
/* gwindow_new */
|
||||
GWindow * gwindow_new(void)
|
||||
|
@ -45,6 +48,7 @@ GWindow * gwindow_new(void)
|
|||
}
|
||||
|
||||
|
||||
/* gwindow_delete */
|
||||
void gwindow_delete(GWindow * gwindow)
|
||||
{
|
||||
if(g_alloced(gwindow) != gwindow)
|
||||
|
@ -55,8 +59,9 @@ void gwindow_delete(GWindow * gwindow)
|
|||
|
||||
|
||||
/* useful */
|
||||
/* gwindow_show */
|
||||
void gwindow_show(GWindow * gwindow)
|
||||
/* FIXME generic widget_show() instead */
|
||||
/* FIXME accept flags (focus...) */
|
||||
{
|
||||
XMapRaised(gt.display, gwindow->window);
|
||||
glXMakeCurrent(gt.display, gwindow->window, gwindow->context);
|
||||
|
|
Loading…
Reference in New Issue
Block a user