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