diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-12-05 03:04:17 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-12-05 03:04:17 +0100 |
commit | bdf9f56152b96de90e7a32634fa90500abc08404 (patch) | |
tree | 1ac9da92ee48608d48ed9586d649159e8d6089ee | |
parent | 21e204cdea8564dace6dfb0abd8e0b034bff64be (diff) |
libui/GTK: add uiAreaSetBackgroundColor, not hooked up yet
-rw-r--r-- | src/libui_sdl/libui/unix/area.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/unix/area.c b/src/libui_sdl/libui/unix/area.c index 035675d..bdc0f3e 100644 --- a/src/libui_sdl/libui/unix/area.c +++ b/src/libui_sdl/libui/unix/area.c @@ -39,6 +39,8 @@ struct uiArea { GtkWidget *areaWidget; GtkDrawingArea *drawingArea; areaWidget *area; + + int bgR, bgG, bgB; uiAreaHandler *ah; @@ -578,6 +580,13 @@ static void areaWidget_class_init(areaWidgetClass *class) uiUnixControlAllDefaults(uiArea) +void uiAreaSetBackgroundColor(uiArea *a, int r, int g, int b) +{ + a->bgR = r; + a->bgG = g; + a->bgB = b; +} + void uiAreaSetSize(uiArea *a, int width, int height) { if (!a->scrolling) @@ -695,6 +704,8 @@ uiArea *uiNewArea(uiAreaHandler *ah) a->area = areaWidget(a->areaWidget); a->widget = a->areaWidget; + + uiAreaSetBackgroundColor(a, -1, -1, -1); return a; } @@ -721,6 +732,8 @@ uiArea *uiNewScrollingArea(uiAreaHandler *ah, int width, int height) a->area = areaWidget(a->areaWidget); a->widget = a->swidget; + + uiAreaSetBackgroundColor(a, -1, -1, -1); gtk_container_add(a->scontainer, a->areaWidget); // and make the area visible; only the scrolled window's visibility is controlled by libui |