From 10ea719dc8b9fa5fedc4c94c77775de3e64aed75 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 9 Apr 2015 19:17:23 -0400 Subject: [PATCH] Removed direct vtable calls from uiControl. --- new/container_darwin.m | 2 +- new/container_unix.c | 2 +- new/stack.c | 2 +- new/window_darwin.m | 2 +- new/window_unix.c | 2 +- new/window_windows.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/new/container_darwin.m b/new/container_darwin.m index bdfab90..51cd1e7 100644 --- a/new/container_darwin.m +++ b/new/container_darwin.m @@ -56,7 +56,7 @@ uiLogObjCClassAllocations } d.xPadding = macXPadding; d.yPadding = macYPadding; - (*(self.child->resize))(self.child, x, y, width, height, &d); + uiControlResize(self.child, x, y, width, height, &d); } // TODO margined diff --git a/new/container_unix.c b/new/container_unix.c index bb0cbb8..279e418 100644 --- a/new/container_unix.c +++ b/new/container_unix.c @@ -81,7 +81,7 @@ static void uiContainer_size_allocate(GtkWidget *widget, GtkAllocation *allocati } d.xPadding = gtkXPadding; d.yPadding = gtkYPadding; - (*(c->child->resize))(c->child, x, y, width, height, &d); + uiControlResize(c->child, x, y, width, height, &d); } struct forall { diff --git a/new/stack.c b/new/stack.c index f65e0d7..338f18a 100644 --- a/new/stack.c +++ b/new/stack.c @@ -250,7 +250,7 @@ void uiStackAdd(uiControl *st, uiControl *c, int stretchy) s->controls[s->len] = c; s->stretchy[s->len] = stretchy; if (s->parent != 0) - (*(s->controls[s->len]->setParent))(s->controls[s->len], s->parent); + uiControlSetParent(s->controls[s->len], s->parent); s->len++; updateParent(s->parent); } diff --git a/new/window_darwin.m b/new/window_darwin.m index 8a7309d..0b8f1c3 100644 --- a/new/window_darwin.m +++ b/new/window_darwin.m @@ -108,7 +108,7 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data) void uiWindowSetChild(uiWindow *w, uiControl *c) { D.container.child = c; - (*(D.container.child->setParent))(D.container.child, (uintptr_t) (D.container)); + uiControlSetParent(D.container.child, (uintptr_t) (D.container)); } // TODO margined diff --git a/new/window_unix.c b/new/window_unix.c index b778b26..9a614af 100644 --- a/new/window_unix.c +++ b/new/window_unix.c @@ -79,7 +79,7 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data) void uiWindowSetChild(uiWindow *w, uiControl *c) { uiContainer(w->container)->child = c; - (*(c->setParent))(c, (uintptr_t) (w->container)); + uiControlSetParent(uiContainer(w->container)->child, (uintptr_t) (w->container)); } // TODO margined diff --git a/new/window_windows.c b/new/window_windows.c index 4e87d3e..c3cd93d 100644 --- a/new/window_windows.c +++ b/new/window_windows.c @@ -177,7 +177,7 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data) void uiWindowSetChild(uiWindow *w, uiControl *c) { w->child = c; - (*(w->child->setParent))(w->child, (uintptr_t) (w->hwnd)); + uiControlSetParent(w->child, (uintptr_t) (w->hwnd)); } // TODO uiWindowMargined