Lines Matching refs:masterPtr

57     BitmapMaster *masterPtr;	/* Pointer to master for image. */
71 * associated with masterPtr (NULL means
156 BitmapMaster *masterPtr, int argc, char **argv,
193 BitmapMaster *masterPtr;
195 masterPtr = (BitmapMaster *) ckalloc(sizeof(BitmapMaster));
196 masterPtr->tkMaster = master;
197 masterPtr->interp = interp;
198 masterPtr->imageCmd = Tcl_CreateCommand(interp, name, ImgBmapCmd,
199 (ClientData) masterPtr, ImgBmapCmdDeletedProc);
200 masterPtr->width = masterPtr->height = 0;
201 masterPtr->data = NULL;
202 masterPtr->maskData = NULL;
203 masterPtr->fgUid = NULL;
204 masterPtr->bgUid = NULL;
205 masterPtr->fileString = NULL;
206 masterPtr->dataString = NULL;
207 masterPtr->maskFileString = NULL;
208 masterPtr->maskDataString = NULL;
209 masterPtr->instancePtr = NULL;
210 if (ImgBmapConfigureMaster(masterPtr, argc, argv, 0) != TCL_OK) {
211 ImgBmapDelete((ClientData) masterPtr);
214 *clientDataPtr = (ClientData) masterPtr;
230 * an error message is left in masterPtr->interp->result.
240 ImgBmapConfigureMaster(masterPtr, argc, argv, flags)
241 BitmapMaster *masterPtr; /* Pointer to data structure describing
251 if (Tk_ConfigureWidget(masterPtr->interp, Tk_MainWindow(masterPtr->interp),
252 configSpecs, argc, argv, (char *) masterPtr, flags)
262 if (masterPtr->data != NULL) {
263 ckfree(masterPtr->data);
264 masterPtr->data = NULL;
266 if ((masterPtr->fileString != NULL) || (masterPtr->dataString != NULL)) {
267 masterPtr->data = TkGetBitmapData(masterPtr->interp,
268 masterPtr->dataString, masterPtr->fileString,
269 &masterPtr->width, &masterPtr->height, &dummy1, &dummy2);
270 if (masterPtr->data == NULL) {
274 if (masterPtr->maskData != NULL) {
275 ckfree(masterPtr->maskData);
276 masterPtr->maskData = NULL;
278 if ((masterPtr->maskFileString != NULL)
279 || (masterPtr->maskDataString != NULL)) {
280 if (masterPtr->data == NULL) {
281 masterPtr->interp->result = "can't have mask without bitmap";
284 masterPtr->maskData = TkGetBitmapData(masterPtr->interp,
285 masterPtr->maskDataString, masterPtr->maskFileString,
287 if (masterPtr->maskData == NULL) {
290 if ((maskWidth != masterPtr->width)
291 || (maskHeight != masterPtr->height)) {
292 ckfree(masterPtr->maskData);
293 masterPtr->maskData = NULL;
294 masterPtr->interp->result = "bitmap and mask have different sizes";
305 for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
309 Tk_ImageChanged(masterPtr->tkMaster, 0, 0, masterPtr->width,
310 masterPtr->height, masterPtr->width, masterPtr->height);
339 BitmapMaster *masterPtr = instancePtr->masterPtr;
346 * For each of the options in masterPtr, translate the string
350 if (*masterPtr->bgUid != 0) {
351 colorPtr = Tk_GetColor(masterPtr->interp, instancePtr->tkwin,
352 masterPtr->bgUid);
364 colorPtr = Tk_GetColor(masterPtr->interp, instancePtr->tkwin,
365 masterPtr->fgUid);
378 if (masterPtr->data != NULL) {
382 masterPtr->data, (unsigned) masterPtr->width,
383 (unsigned) masterPtr->height);
390 if (masterPtr->maskData != NULL) {
394 masterPtr->maskData, (unsigned) masterPtr->width,
395 (unsigned) masterPtr->height);
398 if (masterPtr->data != NULL) {
434 Tcl_AddErrorInfo(masterPtr->interp, "\n (while configuring image \"");
435 Tcl_AddErrorInfo(masterPtr->interp, Tk_NameOfImage(masterPtr->tkMaster));
436 Tcl_AddErrorInfo(masterPtr->interp, "\")");
437 Tcl_BackgroundError(masterPtr->interp);
721 BitmapMaster *masterPtr = (BitmapMaster *) clientData;
742 (char *) masterPtr, argv[2], 0);
747 configSpecs, (char *) masterPtr, (char *) NULL, 0);
750 configSpecs, (char *) masterPtr, argv[2], 0);
752 code = ImgBmapConfigureMaster(masterPtr, argc-2, argv+2,
790 BitmapMaster *masterPtr = (BitmapMaster *) masterData;
798 for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
813 instancePtr->masterPtr = masterPtr;
820 instancePtr->nextPtr = masterPtr->instancePtr;
821 masterPtr->instancePtr = instancePtr;
829 Tk_ImageChanged(masterPtr->tkMaster, 0, 0, 0, 0, masterPtr->width,
830 masterPtr->height);
950 if (instancePtr->masterPtr->instancePtr == instancePtr) {
951 instancePtr->masterPtr->instancePtr = instancePtr->nextPtr;
953 for (prevPtr = instancePtr->masterPtr->instancePtr;
985 BitmapMaster *masterPtr = (BitmapMaster *) masterData;
987 if (masterPtr->instancePtr != NULL) {
990 masterPtr->tkMaster = NULL;
991 if (masterPtr->imageCmd != NULL) {
992 Tcl_DeleteCommand(masterPtr->interp,
993 Tcl_GetCommandName(masterPtr->interp, masterPtr->imageCmd));
995 if (masterPtr->data != NULL) {
996 ckfree(masterPtr->data);
998 if (masterPtr->maskData != NULL) {
999 ckfree(masterPtr->maskData);
1001 Tk_FreeOptions(configSpecs, (char *) masterPtr, (Display *) NULL, 0);
1002 ckfree((char *) masterPtr);
1028 BitmapMaster *masterPtr = (BitmapMaster *) clientData;
1030 masterPtr->imageCmd = NULL;
1031 if (masterPtr->tkMaster != NULL) {
1032 Tk_DeleteImage(masterPtr->interp, Tk_NameOfImage(masterPtr->tkMaster));