changeset: 11:25840162d26b
tag: tip
user: pancake <pancake_AT_nopcode.org>
date: Wed Apr 21 03:35:01 2010 +0200
files: gi_sdl.c swk.c swk.h test.c
description:
fix test program
reduce font size to 14px
swk_fit_row is now static
diff -r e86c6a25ee1f -r 25840162d26b gi_sdl.c
--- a/gi_sdl.c Wed Apr 21 03:21:46 2010 +0200
+++ b/gi_sdl.c Wed Apr 21 03:35:01 2010 +0200
@@ -8,7 +8,7 @@
#define TFCOLOR 0xff,0xff,0xff
#define FONTNAME "Inconsolata.otf"
//#define FONTSIZE 16
-#define FONTSIZE 32
+#define FONTSIZE 14
#define FS FONTSIZE
#define BPP 32
/* --- */
@@ -64,7 +64,7 @@
if (font == NULL) {
fprintf(stderr, "Cannot open font '%s'\n", FONTNAME);
return 0;
- }
+ } //else TTF_SetFontStyle(font, TTF_STYLE_BOLD);
return 1;
}
diff -r e86c6a25ee1f -r 25840162d26b swk.c
--- a/swk.c Wed Apr 21 03:21:46 2010 +0200
+++ b/swk.c Wed Apr 21 03:35:01 2010 +0200
@@ -47,8 +47,8 @@
swk_event_handle(e);
} while (!e || e->type != EQuit);
}
-void
-swk_fit_row(SwkBox *a, SwkBox *b, int y) {
+
+static void swk_fit_row(SwkBox *a, SwkBox *b, int y) {
int count, x = 0;
SwkBox *btmp;
count = 0;
diff -r e86c6a25ee1f -r 25840162d26b swk.h
--- a/swk.h Wed Apr 21 03:21:46 2010 +0200
+++ b/swk.h Wed Apr 21 03:35:01 2010 +0200
@@ -65,7 +65,6 @@
void swk_exit();
void swk_fit();
void swk_loop();
-void swk_fit_row(SwkBox *a, SwkBox *b, int y);
SwkEvent * swk_event();
void swk_event_handle(SwkEvent *e);
int swk_gi_has_event();
diff -r e86c6a25ee1f -r 25840162d26b test.c
--- a/test.c Wed Apr 21 03:21:46 2010 +0200
+++ b/test.c Wed Apr 21 03:35:01 2010 +0200
@@ -8,7 +8,7 @@
static void mybutton(SwkEvent *e) {
if (e->type == EClick) {
sprintf(text, "Do it again %d times\n", count);
- helloworld[0].text = text;
+ helloworld[1].text = text;
if (count-- == 0)
swk_exit();
}
@@ -21,13 +21,8 @@
{ .cb=swk_label, .text="Press a button", },
{ SWK_NEWLINE(2) },
{ .cb=mybutton, .text="yes" },
+ { .cb=mybutton, .text="no" },
{ .cb=swk_filler, },
- { .cb=mybutton, .text="no" },
-#if 0
- { SWK_NEWLINE(1) },
- { .cb=mybutton, .text="yes" },
- { .cb=mybutton, .text="no" },
-#endif
{ SWK_NEWLINE(5) },
{ .cb=swk_label, .text="--swktest", },
{ .cb=NULL }
Received on Wed Apr 21 2010 - 01:41:33 UTC
This archive was generated by hypermail 2.2.0 : Wed Apr 21 2010 - 01:48:04 UTC