////////// // // Called to release all fonts allocated in this block // ////// void iFont_releaseAll(SBuilder* fontRoot, bool tlDeleteSelf) { u32 lnI; SFont* font; // Make sure our environment is sane if (fontRoot) { ////////// // Delete all allocated fonts ////// for (lnI = 0; lnI < fontRoot->populatedLength; lnI += sizeof(SFont)) { // Grab the pointer font = (SFont*)(fontRoot->data_u8 + lnI); // Delete this font if (font->isUsed) { iFont_delete(&font, false); // Delete the font font->isUsed = false; // Mark the slot unused } } ////////// // Delete self ////// if (tlDeleteSelf) iBuilder_freeAndRelease(&fontRoot); } }
////////// // // Delete the region for this window (if any) // ////// void iHwndX_deleteRegion(SHwndX* win) { ////////// // Make sure we have a window and a region ////// if (win && win->x11 && win->regionx && win->regionPixmap) { // Is there a region? if (iBuilder_isPointer(gsRegions, (uptr)win->regionx)) { ////////// // Disable it ////// win->regionx->isValid = false; ////////// // Remove the clipping mask ////// XSetClipMask(win->x11->display, win->x11->gc, null0); ////////// // Delete the Pixmap ////// XFreePixmap(win->x11->display, win->regionPixmap); win->regionPixmap = null0; ////////// // Delete the regionx itself ////// iBuilder_freeAndRelease(&win->regionx->regionArray); } } }