PangoFontDescription* iupgtkGetPangoFontDesc(const char* value) { IgtkFont *gtkfont = gtkFindFont(value); if (!gtkfont) { iupERROR1("Failed to create Font: %s", value); return NULL; } return gtkfont->fontdesc; }
XmFontList iupmotFontCreateNativeFont(const char* value) { ImotFont *motfont = motFindFont(NULL, value); if (!motfont) { iupERROR1("Failed to create Font: %s", value); return NULL; } return motfont->fontlist; }
static IwinFont* winFontCreateNativeFont(Ihandle *ih, const char* value) { IwinFont* winfont = winFindFont(value); if (!winfont) { iupERROR1("Failed to create Font: %s", value); return NULL; } iupAttribSet(ih, "_IUP_WINFONT", (char*)winfont); return winfont; }
static IgtkFont* gtkFontCreateNativeFont(Ihandle* ih, const char* value) { IgtkFont *gtkfont = gtkFindFont(value); if (!gtkfont) { iupERROR1("Failed to create Font: %s", value); return NULL; } iupAttribSetStr(ih, "_IUP_GTKFONT", (char*)gtkfont); return gtkfont; }
static ImotFont* motFontCreateNativeFont(Ihandle* ih, const char* value) { ImotFont *motfont = motFindFont(iupAttribGetStr(ih, "FOUNDRY"), value); if (!motfont) { iupERROR1("Failed to create Font: %s", value); return NULL; } iupAttribSetStr(ih, "_IUPMOT_FONT", (char*)motfont); iupAttribSetStr(ih, "XLFD", motfont->xlfd); return motfont; }
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; }