Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=8b5e0856609bc6f4f64336690ad54f7e8f3707ca
commit 8b5e0856609bc6f4f64336690ad54f7e8f3707ca Author: James Buren <[email protected]> Date: Thu Aug 9 14:33:10 2012 -0500 initial import diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c471701 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +FLAGS := $(subst -pthread,-lpthread,$(shell pkg-config --cflags --libs glib-2.0 libnewt)) + +all: + tcc $(FLAGS) -DNEWT -run setup.c diff --git a/setup.c b/setup.c new file mode 100644 index 0000000..dba39d8 --- /dev/null +++ b/setup.c @@ -0,0 +1,37 @@ +#include <glib.h> + +struct config +{ + gint width; + gint height; +}; + +static struct config *config; + +#ifdef NEWT +#include <newt.h> + +static gboolean newt_begin(void) +{ + if(newtInit() != 0) + return FALSE; + + newtCls(); + + newtGetScreenSize(&config->width,&config->height); + + return TRUE; +} + +static void newt_end(void) +{ + newtFinished(); +} +#endif + +extern int main(void) +{ + config = g_new0(struct config,1); + + return 0; +} _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
