application/main.c

changeset 103
6a6718269c22
parent 102
2988f00ed9d6
child 104
3efe0210e27e
--- a/application/main.c	Wed Jan 20 16:00:05 2016 +0100
+++ b/application/main.c	Wed Jan 20 17:37:52 2016 +0100
@@ -43,11 +43,13 @@
     printf("button clicked\n");
     fflush(stdout);
 }
-/*
+
 void draw(UiEvent *event, UiGraphics *g, void *data) {
+
     int width = g->width;
     int height = g->height;
-    //printf("rec[%d,%d]\n", width, height);
+    printf("rec[%d,%d]\n", width, height);
+    
     ui_graphics_color(g, 64, 64, 64);
     ui_draw_rect(g, 0, 0, width, height, TRUE);
     
@@ -63,7 +65,6 @@
     
     ui_text_free(text);
 }
-*/
 
 void click(UiEvent *event, void *data) {
     UiMouseEvent *me = event->eventdata;
@@ -89,9 +90,10 @@
     ui_toolbar_add_default("button2");
     
     UiObject *obj = ui_window("Test", NULL);
-    //UIWIDGET w = ui_drawingarea(obj, draw, NULL);
+    UIWIDGET w = ui_drawingarea(obj, draw, NULL);
     //ui_mouse_handler(obj, w, click, NULL);
     
+/*
     ui_grid_sp(obj, 8, 4, 4);
     
     ui_button(obj, "OK", NULL, NULL);
@@ -113,6 +115,7 @@
     ui_button(obj, "BTN1", NULL, NULL);
     
     ui_end(obj);
+*/
     
     ui_show(obj);
     ui_main();

mercurial