Example #1
0
//////////
//
// Check the handle to make sure it's valid
//
//////
	bool iiDisk_isValidLockHandle(SThisCode* thisCode, SBuilder* lockRoot, SDiskLock* dl)
	{
		//////////
		// Verify the handle is valid
		//////
			if (dl && iBuilder_isPointer(lockRoot, (uptr)dl))
			{
				// It's in range, but the valid condition depends upon its property
				return(dl->isValid);

			} else {
				// Indicate failure
				return(false);
			}
	}
Example #2
0
//////////
//
// 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);
				}
			}
	}