comparison src/EmacsFrame.c @ 3025:facf3239ba30

[xemacs-hg @ 2005-10-25 11:16:19 by ben] rename new->new_, convert 'foo to `foo' EmacsFrame.c, ExternalClient.c, ExternalShell.c, chartab.c, cmdloop.c, compiler.h, console.c, database.c, device-msw.c, device-x.c, device.c, doc.c, dragdrop.c, eval.c, event-msw.c, event-stream.c, events.c, extents.c, file-coding.c, fns.c, frame-tty.c, frame.c, gpmevent.c, gutter.c, hash.c, imgproc.c, indent.c, keymap.c, lisp-union.h, macros.c, malloc.c, marker.c, menubar-x.c, menubar.c, mule-charset.c, number.c, process.c, profile.h, ralloc.c, redisplay.c, select-common.h, select.c, syntax.c, sysfile.h, sysproc.h, systime.h, syswindows.h, toolbar.c, tooltalk.c, tparam.c, unexaix.c, unexalpha.c, unexconvex.c, unexec.c, unexhp9k800.c, unexmips.c, unicode.c, window.c: new -> new_. 'foo -> `foo'. lwlib-internal.h: redo assert macros to follow lisp.h and not trigger warnings. lwlib.c, xlwtabs.c: new -> new_.
author ben
date Tue, 25 Oct 2005 11:16:49 +0000
parents 3d8143fc88e1
children 374186f156d5
comparison
equal deleted inserted replaced
3024:b7f26b2f78bd 3025:facf3239ba30
264 ew->emacs_frame.frame->pixheight = ew->core.height; 264 ew->emacs_frame.frame->pixheight = ew->core.height;
265 ew->emacs_frame.frame->pixwidth = ew->core.width; 265 ew->emacs_frame.frame->pixwidth = ew->core.width;
266 } 266 }
267 267
268 static void 268 static void
269 EmacsFrameInitialize (Widget UNUSED (request), Widget new, 269 EmacsFrameInitialize (Widget UNUSED (request), Widget new_,
270 ArgList UNUSED (unused1), Cardinal *UNUSED (unused2)) 270 ArgList UNUSED (unused1), Cardinal *UNUSED (unused2))
271 { 271 {
272 EmacsFrame ew = (EmacsFrame)new; 272 EmacsFrame ew = (EmacsFrame)new_;
273 struct frame *f = ew->emacs_frame.frame; 273 struct frame *f = ew->emacs_frame.frame;
274 274
275 if (!f) 275 if (!f)
276 fatal ("can't create an emacs frame widget without a frame."); 276 fatal ("can't create an emacs frame widget without a frame.");
277 277
378 static Boolean 378 static Boolean
379 EmacsFrameSetValues (Widget cur_widget, Widget UNUSED (req_widget), 379 EmacsFrameSetValues (Widget cur_widget, Widget UNUSED (req_widget),
380 Widget new_widget, ArgList argv, Cardinal *argc) 380 Widget new_widget, ArgList argv, Cardinal *argc)
381 { 381 {
382 EmacsFrame cur = (EmacsFrame) cur_widget; 382 EmacsFrame cur = (EmacsFrame) cur_widget;
383 EmacsFrame new = (EmacsFrame) new_widget; 383 EmacsFrame new_ = (EmacsFrame) new_widget;
384 struct frame *f = new->emacs_frame.frame; 384 struct frame *f = new_->emacs_frame.frame;
385 in_resource_setting++; 385 in_resource_setting++;
386 /* This function does not need to do much. Pretty much everything 386 /* This function does not need to do much. Pretty much everything
387 interesting will get done in the resize method, which will 387 interesting will get done in the resize method, which will
388 (if necessary) get called by Xt when this function returns 388 (if necessary) get called by Xt when this function returns
389 (see below). 389 (see below).
394 The code located there should be moved inside of here instead, 394 The code located there should be moved inside of here instead,
395 so that things work if either SET_FACE_PROPERTY() is 395 so that things work if either SET_FACE_PROPERTY() is
396 called or XtSetValues() is called. 396 called or XtSetValues() is called.
397 */ 397 */
398 398
399 if (cur->emacs_frame.iconic != new->emacs_frame.iconic && 399 if (cur->emacs_frame.iconic != new_->emacs_frame.iconic &&
400 FRAME_X_TOP_LEVEL_FRAME_P (new->emacs_frame.frame)) 400 FRAME_X_TOP_LEVEL_FRAME_P (new_->emacs_frame.frame))
401 x_wm_set_shell_iconic_p (FRAME_X_SHELL_WIDGET (new->emacs_frame.frame), 401 x_wm_set_shell_iconic_p (FRAME_X_SHELL_WIDGET (new_->emacs_frame.frame),
402 new->emacs_frame.iconic); 402 new_->emacs_frame.iconic);
403 403
404 /* If we got here, then we were likely called as a result of 404 /* If we got here, then we were likely called as a result of
405 the EditRes protocol, so go ahead and change scrollbar-width 405 the EditRes protocol, so go ahead and change scrollbar-width
406 and scrollbar-height. Otherwise, we're merely mirroring 406 and scrollbar-height. Otherwise, we're merely mirroring
407 a change made to scrollbar-width etc. so don't do anything 407 a change made to scrollbar-width etc. so don't do anything
408 special. */ 408 special. */
409 if (cur->emacs_frame.internal_border_width != 409 if (cur->emacs_frame.internal_border_width !=
410 new->emacs_frame.internal_border_width) 410 new_->emacs_frame.internal_border_width)
411 { 411 {
412 f->internal_border_width = new->emacs_frame.internal_border_width; 412 f->internal_border_width = new_->emacs_frame.internal_border_width;
413 MARK_FRAME_SIZE_SLIPPED (f); 413 MARK_FRAME_SIZE_SLIPPED (f);
414 } 414 }
415 415
416 #ifdef HAVE_SCROLLBARS 416 #ifdef HAVE_SCROLLBARS
417 if (cur->emacs_frame.scrollbar_width != 417 if (cur->emacs_frame.scrollbar_width !=
418 new->emacs_frame.scrollbar_width) 418 new_->emacs_frame.scrollbar_width)
419 Fadd_spec_to_specifier 419 Fadd_spec_to_specifier
420 (Vscrollbar_width, 420 (Vscrollbar_width,
421 make_int (new->emacs_frame.scrollbar_width), 421 make_int (new_->emacs_frame.scrollbar_width),
422 wrap_frame (f), Qnil, Qnil); 422 wrap_frame (f), Qnil, Qnil);
423 if (cur->emacs_frame.scrollbar_height != 423 if (cur->emacs_frame.scrollbar_height !=
424 new->emacs_frame.scrollbar_height) 424 new_->emacs_frame.scrollbar_height)
425 Fadd_spec_to_specifier 425 Fadd_spec_to_specifier
426 (Vscrollbar_height, 426 (Vscrollbar_height,
427 make_int (new->emacs_frame.scrollbar_height), 427 make_int (new_->emacs_frame.scrollbar_height),
428 wrap_frame (f), Qnil, Qnil); 428 wrap_frame (f), Qnil, Qnil);
429 #endif /* HAVE_SCROLLBARS */ 429 #endif /* HAVE_SCROLLBARS */
430 #ifdef HAVE_TOOLBARS 430 #ifdef HAVE_TOOLBARS
431 if (cur->emacs_frame.top_toolbar_height != 431 if (cur->emacs_frame.top_toolbar_height !=
432 new->emacs_frame.top_toolbar_height) 432 new_->emacs_frame.top_toolbar_height)
433 Fadd_spec_to_specifier 433 Fadd_spec_to_specifier
434 (Vtoolbar_size[TOP_TOOLBAR], 434 (Vtoolbar_size[TOP_TOOLBAR],
435 make_int (new->emacs_frame.top_toolbar_height), 435 make_int (new_->emacs_frame.top_toolbar_height),
436 wrap_frame (f), Qnil, Qnil); 436 wrap_frame (f), Qnil, Qnil);
437 if (cur->emacs_frame.bottom_toolbar_height != 437 if (cur->emacs_frame.bottom_toolbar_height !=
438 new->emacs_frame.bottom_toolbar_height) 438 new_->emacs_frame.bottom_toolbar_height)
439 Fadd_spec_to_specifier 439 Fadd_spec_to_specifier
440 (Vtoolbar_size[BOTTOM_TOOLBAR], 440 (Vtoolbar_size[BOTTOM_TOOLBAR],
441 make_int (new->emacs_frame.bottom_toolbar_height), 441 make_int (new_->emacs_frame.bottom_toolbar_height),
442 wrap_frame (f), Qnil, Qnil); 442 wrap_frame (f), Qnil, Qnil);
443 if (cur->emacs_frame.left_toolbar_width != 443 if (cur->emacs_frame.left_toolbar_width !=
444 new->emacs_frame.left_toolbar_width) 444 new_->emacs_frame.left_toolbar_width)
445 Fadd_spec_to_specifier 445 Fadd_spec_to_specifier
446 (Vtoolbar_size[LEFT_TOOLBAR], 446 (Vtoolbar_size[LEFT_TOOLBAR],
447 make_int (new->emacs_frame.left_toolbar_width), 447 make_int (new_->emacs_frame.left_toolbar_width),
448 wrap_frame (f), Qnil, Qnil); 448 wrap_frame (f), Qnil, Qnil);
449 if (cur->emacs_frame.right_toolbar_width != 449 if (cur->emacs_frame.right_toolbar_width !=
450 new->emacs_frame.right_toolbar_width) 450 new_->emacs_frame.right_toolbar_width)
451 Fadd_spec_to_specifier 451 Fadd_spec_to_specifier
452 (Vtoolbar_size[RIGHT_TOOLBAR], 452 (Vtoolbar_size[RIGHT_TOOLBAR],
453 make_int (new->emacs_frame.right_toolbar_width), 453 make_int (new_->emacs_frame.right_toolbar_width),
454 wrap_frame (f), Qnil, Qnil); 454 wrap_frame (f), Qnil, Qnil);
455 if (cur->emacs_frame.top_toolbar_border_width != 455 if (cur->emacs_frame.top_toolbar_border_width !=
456 new->emacs_frame.top_toolbar_border_width) 456 new_->emacs_frame.top_toolbar_border_width)
457 Fadd_spec_to_specifier 457 Fadd_spec_to_specifier
458 (Vtoolbar_border_width[TOP_TOOLBAR], 458 (Vtoolbar_border_width[TOP_TOOLBAR],
459 make_int (new->emacs_frame.top_toolbar_border_width), 459 make_int (new_->emacs_frame.top_toolbar_border_width),
460 wrap_frame (f), Qnil, Qnil); 460 wrap_frame (f), Qnil, Qnil);
461 if (cur->emacs_frame.bottom_toolbar_border_width != 461 if (cur->emacs_frame.bottom_toolbar_border_width !=
462 new->emacs_frame.bottom_toolbar_border_width) 462 new_->emacs_frame.bottom_toolbar_border_width)
463 Fadd_spec_to_specifier 463 Fadd_spec_to_specifier
464 (Vtoolbar_border_width[BOTTOM_TOOLBAR], 464 (Vtoolbar_border_width[BOTTOM_TOOLBAR],
465 make_int (new->emacs_frame.bottom_toolbar_border_width), 465 make_int (new_->emacs_frame.bottom_toolbar_border_width),
466 wrap_frame (f), Qnil, Qnil); 466 wrap_frame (f), Qnil, Qnil);
467 if (cur->emacs_frame.left_toolbar_border_width != 467 if (cur->emacs_frame.left_toolbar_border_width !=
468 new->emacs_frame.left_toolbar_border_width) 468 new_->emacs_frame.left_toolbar_border_width)
469 Fadd_spec_to_specifier 469 Fadd_spec_to_specifier
470 (Vtoolbar_border_width[LEFT_TOOLBAR], 470 (Vtoolbar_border_width[LEFT_TOOLBAR],
471 make_int (new->emacs_frame.left_toolbar_border_width), 471 make_int (new_->emacs_frame.left_toolbar_border_width),
472 wrap_frame (f), Qnil, Qnil); 472 wrap_frame (f), Qnil, Qnil);
473 if (cur->emacs_frame.right_toolbar_border_width != 473 if (cur->emacs_frame.right_toolbar_border_width !=
474 new->emacs_frame.right_toolbar_border_width) 474 new_->emacs_frame.right_toolbar_border_width)
475 Fadd_spec_to_specifier 475 Fadd_spec_to_specifier
476 (Vtoolbar_border_width[RIGHT_TOOLBAR], 476 (Vtoolbar_border_width[RIGHT_TOOLBAR],
477 make_int (new->emacs_frame.right_toolbar_border_width), 477 make_int (new_->emacs_frame.right_toolbar_border_width),
478 wrap_frame (f), Qnil, Qnil); 478 wrap_frame (f), Qnil, Qnil);
479 #endif /* HAVE_TOOLBARS */ 479 #endif /* HAVE_TOOLBARS */
480 480
481 in_resource_setting--; 481 in_resource_setting--;
482 482
483 /* If the request was to resize us, but the size has not changed, Xt 483 /* If the request was to resize us, but the size has not changed, Xt
484 will do nothing, and won't call our resize callback. Since such a 484 will do nothing, and won't call our resize callback. Since such a
485 request might be issued as a result of hiding/showing menubar or 485 request might be issued as a result of hiding/showing menubar or
486 changing toolbar placement, where we rely on relayout made by the 486 changing toolbar placement, where we rely on relayout made by the
487 callback, we go ahead and simulate such a call */ 487 callback, we go ahead and simulate such a call */
488 if (cur->core.width == new->core.width 488 if (cur->core.width == new_->core.width
489 && cur->core.height == new->core.height) 489 && cur->core.height == new_->core.height)
490 { 490 {
491 int i; 491 int i;
492 for (i = 0; i < (int) *argc; i++) 492 for (i = 0; i < (int) *argc; i++)
493 if (strcmp (argv[i].name, XtNwidth) == 0 493 if (strcmp (argv[i].name, XtNwidth) == 0
494 || strcmp (argv[i].name, XtNheight) == 0) 494 || strcmp (argv[i].name, XtNheight) == 0)