131 event->last_event = 0; |
133 event->last_event = 0; |
132 |
134 |
133 XtAddCallback(widget, XmNinputCallback, ui_drawingarea_input, event); |
135 XtAddCallback(widget, XmNinputCallback, ui_drawingarea_input, event); |
134 } |
136 } |
135 } |
137 } |
|
138 |
|
139 void ui_drawingarea_getsize(UIWIDGET drawingarea, int *width, int *height) { |
|
140 // TODO |
|
141 } |
|
142 |
|
143 void ui_drawingarea_redraw(UIWIDGET drawingarea) { |
|
144 XClearArea(XtDisplay(drawingarea), drawingarea->core.window, 0, 0, drawingarea->core.width, drawingarea->core.height, True); |
|
145 |
|
146 } |
|
147 |
136 |
148 |
137 /* -------------------- text layout functions -------------------- */ |
149 /* -------------------- text layout functions -------------------- */ |
138 UiTextLayout* ui_text(UiGraphics *g) { |
150 UiTextLayout* ui_text(UiGraphics *g) { |
139 UiTextLayout *text = malloc(sizeof(UiTextLayout)); |
151 UiTextLayout *text = malloc(sizeof(UiTextLayout)); |
140 memset(text, 0, sizeof(UiTextLayout)); |
152 memset(text, 0, sizeof(UiTextLayout)); |