dirty redraw and SDL framebuffer example
[windtk] / src / wtimpl.h
index 76e51f1..d0c2ea4 100644 (file)
@@ -23,6 +23,8 @@ enum {
 enum { FRM_OUT, FRM_IN, FRM_NOFILL = 0x8000 };
 #define FRMSTYLE(x)    ((x) & 0xff)
 
+#define MAX_UPD_RECTS  16
+
 struct wt_context {
        struct wt_graphics gfx;
        struct wt_rect vp;
@@ -32,6 +34,9 @@ struct wt_context {
        int colors[NUM_COLORS];
 
        wt_widget *focuswin;
+
+       struct wt_rect upd[MAX_UPD_RECTS];
+       int num_upd;
 };
 
 extern struct wt_context *wt_curctx_;
@@ -47,4 +52,6 @@ void wt_gfx_fillrect(struct wt_rect *r);
 void wt_gfx_frame(struct wt_rect *r, int style, int basecol);
 void wt_gfx_line(int x0, int y0, int x1, int y1);
 
+void calc_window_rect(struct wt_rect *r, wt_widget *w);
+
 #endif /* WTIMPL_H_ */