ui/motif/graphics.c

changeset 119
d7a7fb79b5f7
parent 115
102fc0b8fe3e
child 120
49bc645df8b7
equal deleted inserted replaced
118:bb21210e9cac 119:d7a7fb79b5f7
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include <stdio.h> 29 #include <stdio.h>
30 #include <stdlib.h> 30 #include <stdlib.h>
31 #include <X11/Intrinsic.h>
32 #include <X11/IntrinsicP.h>
31 33
32 #include "graphics.h" 34 #include "graphics.h"
33 35
34 #include "container.h" 36 #include "container.h"
35 37
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));

mercurial