Removed direct vtable calls from uiControl.

This commit is contained in:
Pietro Gagliardi 2015-04-09 19:17:23 -04:00
parent e78b625172
commit 10ea719dc8
6 changed files with 6 additions and 6 deletions

View File

@ -56,7 +56,7 @@ uiLogObjCClassAllocations
} }
d.xPadding = macXPadding; d.xPadding = macXPadding;
d.yPadding = macYPadding; d.yPadding = macYPadding;
(*(self.child->resize))(self.child, x, y, width, height, &d); uiControlResize(self.child, x, y, width, height, &d);
} }
// TODO margined // TODO margined

View File

@ -81,7 +81,7 @@ static void uiContainer_size_allocate(GtkWidget *widget, GtkAllocation *allocati
} }
d.xPadding = gtkXPadding; d.xPadding = gtkXPadding;
d.yPadding = gtkYPadding; d.yPadding = gtkYPadding;
(*(c->child->resize))(c->child, x, y, width, height, &d); uiControlResize(c->child, x, y, width, height, &d);
} }
struct forall { struct forall {

View File

@ -250,7 +250,7 @@ void uiStackAdd(uiControl *st, uiControl *c, int stretchy)
s->controls[s->len] = c; s->controls[s->len] = c;
s->stretchy[s->len] = stretchy; s->stretchy[s->len] = stretchy;
if (s->parent != 0) if (s->parent != 0)
(*(s->controls[s->len]->setParent))(s->controls[s->len], s->parent); uiControlSetParent(s->controls[s->len], s->parent);
s->len++; s->len++;
updateParent(s->parent); updateParent(s->parent);
} }

View File

@ -108,7 +108,7 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data)
void uiWindowSetChild(uiWindow *w, uiControl *c) void uiWindowSetChild(uiWindow *w, uiControl *c)
{ {
D.container.child = 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 // TODO margined

View File

@ -79,7 +79,7 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data)
void uiWindowSetChild(uiWindow *w, uiControl *c) void uiWindowSetChild(uiWindow *w, uiControl *c)
{ {
uiContainer(w->container)->child = c; uiContainer(w->container)->child = c;
(*(c->setParent))(c, (uintptr_t) (w->container)); uiControlSetParent(uiContainer(w->container)->child, (uintptr_t) (w->container));
} }
// TODO margined // TODO margined

View File

@ -177,7 +177,7 @@ void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *, void *), void *data)
void uiWindowSetChild(uiWindow *w, uiControl *c) void uiWindowSetChild(uiWindow *w, uiControl *c)
{ {
w->child = c; w->child = c;
(*(w->child->setParent))(w->child, (uintptr_t) (w->hwnd)); uiControlSetParent(w->child, (uintptr_t) (w->hwnd));
} }
// TODO uiWindowMargined // TODO uiWindowMargined