1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef GRAPHICS_H
15 #define GRAPHICS_H
16
17 #include "toolkit.h"
18 #include "../ui/graphics.h"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 typedef struct UiDrawEvent {
25 UiObject *obj;
26 ui_drawfunc draw;
27 void *userdata;
28 } UiDrawEvent;
29
30 typedef struct UiWPFGraphics {
31 UiGraphics g;
32 void *gc;
33 } UiWPFGraphics;
34
35 typedef void(*ui_draw_callback)(
void *gc, UiDrawEvent *event,
int width,
int height);
36
37 UI_IMPORT UIWIDGET __stdcall UIdrawingarea(
void *container, ui_draw_callback f,
void *userdata);
38
39 UI_IMPORT void __stdcall UIdrawingarea_redraw(
UIWIDGET drawingarea);
40
41 void ui_draw_event(
void *gc, UiDrawEvent *event,
int width,
int height);
42
43
44
45 UI_IMPORT void __stdcall UIgraphics_color(UiGraphics *g,
int red,
int green,
int blue);
46 UI_IMPORT void __stdcall UIdraw_line(UiGraphics *g,
int x1,
int y1,
int x2,
int y2);
47 UI_IMPORT void __stdcall UIdraw_rect(UiGraphics *g,
int x,
int y,
int w,
int h,
int fill);
48
49
50
51 #ifdef __cplusplus
52 }
53 #endif
54
55 #endif
56
57