Lines Matching defs:gcPtr
103 register TkGC *gcPtr;
243 gcPtr = (TkGC *) Tcl_GetHashValue(valueHashPtr);
244 gcPtr->refCount++;
245 return gcPtr->gc;
253 gcPtr = (TkGC *) ckalloc(sizeof(TkGC));
274 gcPtr->gc = XCreateGC(valueKey.display, d, valueMask, &valueKey.values);
275 gcPtr->display = valueKey.display;
276 gcPtr->refCount = 1;
277 gcPtr->valueHashPtr = valueHashPtr;
279 idKey.gc = gcPtr->gc;
284 Tcl_SetHashValue(valueHashPtr, gcPtr);
285 Tcl_SetHashValue(idHashPtr, gcPtr);
290 return gcPtr->gc;
319 register TkGC *gcPtr;
331 gcPtr = (TkGC *) Tcl_GetHashValue(idHashPtr);
332 gcPtr->refCount--;
333 if (gcPtr->refCount == 0) {
334 Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
335 XFreeGC(gcPtr->display, gcPtr->gc);
336 Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
338 ckfree((char *) gcPtr);