MCPcopy Create free account
hub / github.com/SimHacker/micropolis / Tk_SizeOfBitmap

Function Tk_SizeOfBitmap

micropolis-activity/src/tk/tkbitmap.c:333–354  ·  view source on GitHub ↗
(bitmap, widthPtr, heightPtr)

Source from the content-addressed store, hash-verified

331 * If bitmap isn't managed by this module then the procedure
332 * panics..
333 *
334 *--------------------------------------------------------------
335 */
336
337void
338Tk_SizeOfBitmap(bitmap, widthPtr, heightPtr)
339 Pixmap bitmap; /* Bitmap whose size is wanted. */
340 unsigned int *widthPtr; /* Store bitmap width here. */
341 unsigned int *heightPtr; /* Store bitmap height here. */
342{
343 Tcl_HashEntry *idHashPtr;
344 TkBitmap *bitmapPtr;
345
346 if (!initialized) {
347 unknownBitmap:
348 panic("Tk_SizeOfBitmap received unknown bitmap argument");
349 }
350
351 idHashPtr = Tcl_FindHashEntry(&idTable, (char *) bitmap);
352 if (idHashPtr == NULL) {
353 goto unknownBitmap;
354 }
355 bitmapPtr = (TkBitmap *) Tcl_GetHashValue(idHashPtr);
356 *widthPtr = bitmapPtr->width;
357 *heightPtr = bitmapPtr->height;

Callers 7

DisplayButtonFunction · 0.85
ComputeButtonGeometryFunction · 0.85
ComputeMenuGeometryFunction · 0.85
DisplayMenuFunction · 0.85
ComputeBitmapBboxFunction · 0.85
DisplayMenuButtonFunction · 0.85

Calls 1

panicFunction · 0.85

Tested by

no test coverage detected