Ihandle* iupObjectCreate(Iclass* iclass, void** params) { /* create the base handle structure */ Ihandle* ih = iHandleCreate(); ih->iclass = iclass; /* create the element */ if (iupClassObjectCreate(ih, params) == IUP_ERROR) { iupERROR1("IUP object creation failed (%s).", iclass->name); iHandleDestroy(ih); return NULL; } return ih; }
Ihandle* iupObjectCreate(Iclass* iclass, void** params) { /* create the base handle structure */ Ihandle* ih = iHandleCreate(); ih->iclass = iclass; /* create the element */ if (iupClassObjectCreate(ih, params) == IUP_ERROR) { iupERROR1("IUP object creation failed (%s).", iclass->name); iHandleDestroy(ih); return NULL; } /* ensure attributes default values, at this time only the ones that can be set before map */ iupClassObjectEnsureDefaultAttributes(ih); return ih; }