|
1 /* |
|
2 * To change this license header, choose License Headers in Project Properties. |
|
3 * To change this template file, choose Tools | Templates |
|
4 * and open the template in the editor. |
|
5 */ |
|
6 |
|
7 /* |
|
8 * File: graphics.h |
|
9 * Author: Olaf |
|
10 * |
|
11 * Created on 22. Januar 2017, 18:34 |
|
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 // drawing functions |
|
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 //void UIdraw_text(UiGraphics *g, int x, int y, UiTextLayout *text); |
|
49 |
|
50 |
|
51 #ifdef __cplusplus |
|
52 } |
|
53 #endif |
|
54 |
|
55 #endif /* GRAPHICS_H */ |
|
56 |