/* * Start drawing to a frame. * Prepare for direct access to its backing buffer. */ void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) { void *data[2]; unsigned int rowbytes[2]; xp_error err; err = xp_lock_window((xp_window_id) wid, NULL, NULL, data, rowbytes, NULL); if (err != Success) FatalError("Could not lock window %i for drawing.", (int) wid); *pixelData = data[0]; *bytesPerRow = rowbytes[0]; }
/* * Start drawing to a frame. * Prepare for direct access to its backing buffer. */ static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) { void *data[2]; unsigned int rowbytes[2]; xp_error err; TA_SERVER(); err = xp_lock_window(x_cvt_vptr_to_uint(wid), NULL, NULL, data, rowbytes, NULL); if (err != Success) FatalError("Could not lock window %d for drawing (%d).", (int)x_cvt_vptr_to_uint(wid), (int)err); *pixelData = data[0]; *bytesPerRow = rowbytes[0]; }