summaryrefslogtreecommitdiff
path: root/test/plottest.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-04-15 11:33:03 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-04-15 11:33:03 +0000
commit2b23052622dc6d4effbeee4f079561343347ebf7 (patch)
treeb411dbb345012196dde7f8b00b143c59427f44c5 /test/plottest.c
parentc554e32f8202e6628422cab831c996615911092d (diff)
downloadlibnsfb-2b23052622dc6d4effbeee4f079561343347ebf7.tar.gz
libnsfb-2b23052622dc6d4effbeee4f079561343347ebf7.tar.bz2
add event interface
svn path=/trunk/libnsfb/; revision=7088
Diffstat (limited to 'test/plottest.c')
-rw-r--r--test/plottest.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/plottest.c b/test/plottest.c
index dc469f6..522cf82 100644
--- a/test/plottest.c
+++ b/test/plottest.c
@@ -4,14 +4,15 @@
#include "libnsfb.h"
#include "libnsfb_plot.h"
+#include "libnsfb_event.h"
#define UNUSED(x) ((x) = (x))
extern const struct {
- unsigned int width;
- unsigned int height;
- unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
- unsigned char pixel_data[132 * 135 * 4 + 1];
+ unsigned int width;
+ unsigned int height;
+ unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
+ unsigned char pixel_data[132 * 135 * 4 + 1];
} nsglobe;
const struct {
@@ -67,6 +68,7 @@ const struct {
int main(int argc, char **argv)
{
nsfb_t *nsfb;
+ nsfb_event_t event;
nsfb_bbox_t box;
nsfb_bbox_t box2;
nsfb_bbox_t box3;
@@ -240,8 +242,8 @@ int main(int argc, char **argv)
}
- while (true )
- nsfb_input(nsfb);
+ while (event.type != NSFB_EVENT_CONTROL)
+ nsfb_input(nsfb, &event, -1);
return 0;
}