diff --git a/zOLD_common/control.c b/zOLD_common/control.c index 16cce968..cdcd2d2d 100644 --- a/zOLD_common/control.c +++ b/zOLD_common/control.c @@ -7,16 +7,6 @@ uintptr_t uiControlHandle(uiControl *c) return (*(c->Handle))(c); } -uiControl *uiControlParent(uiControl *c) -{ - return (*(c->Parent))(c); -} - -void uiControlSetParent(uiControl *c, uiControl *parent) -{ - (*(c->SetParent))(c, parent); -} - int uiControlToplevel(uiControl *c) { return (*(c->Toplevel))(c); @@ -52,19 +42,6 @@ void uiControlDisable(uiControl *c) (*(c->Disable))(c); } -void uiControlVerifySetParent(uiControl *c, uiControl *parent) -{ - uiControl *curParent; - - if (uiControlToplevel(c)) - uiprivUserBug("You cannot give a toplevel uiControl a parent. (control: %p)", c); - curParent = uiControlParent(c); - if (parent != NULL && curParent != NULL) - uiprivUserBug("You cannot give a uiControl a parent while it already has one. (control: %p; current parent: %p; new parent: %p)", c, curParent, parent); - if (parent == NULL && curParent == NULL) - uiprivImplBug("attempt to double unparent uiControl %p", c); -} - int uiControlEnabledToUser(uiControl *c) { while (c != NULL) { diff --git a/zOLD_ui.h b/zOLD_ui.h index b09ce4fa..db57278c 100644 --- a/zOLD_ui.h +++ b/zOLD_ui.h @@ -41,13 +41,7 @@ uiprivExtern void uiFreeText(char *text); typedef struct uiControl uiControl; struct uiControl { - uint32_t Signature; - uint32_t OSSignature; - uint32_t TypeSignature; - void (*Destroy)(uiControl *); uintptr_t (*Handle)(uiControl *); - uiControl *(*Parent)(uiControl *); - void (*SetParent)(uiControl *, uiControl *); int (*Toplevel)(uiControl *); int (*Visible)(uiControl *); void (*Show)(uiControl *); @@ -58,10 +52,7 @@ struct uiControl { }; // TOOD add argument names to all arguments #define uiControl(this) ((uiControl *) (this)) -uiprivExtern void uiControlDestroy(uiControl *); uiprivExtern uintptr_t uiControlHandle(uiControl *); -uiprivExtern uiControl *uiControlParent(uiControl *); -uiprivExtern void uiControlSetParent(uiControl *, uiControl *); uiprivExtern int uiControlToplevel(uiControl *); uiprivExtern int uiControlVisible(uiControl *); uiprivExtern void uiControlShow(uiControl *); @@ -74,7 +65,6 @@ uiprivExtern uiControl *uiAllocControl(size_t n, uint32_t OSsig, uint32_t typesi uiprivExtern void uiFreeControl(uiControl *); // TODO make sure all controls have these -uiprivExtern void uiControlVerifySetParent(uiControl *, uiControl *); uiprivExtern int uiControlEnabledToUser(uiControl *); uiprivExtern void uiUserBugCannotSetParentOnToplevel(const char *type);