Mercurial > hg > xemacs-beta
comparison src/EmacsFrame.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | 57709be46d1b |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
38 #include "xmu.h" | 38 #include "xmu.h" |
39 | 39 |
40 #include "faces.h" | 40 #include "faces.h" |
41 #include "frame.h" | 41 #include "frame.h" |
42 #include "toolbar.h" | 42 #include "toolbar.h" |
43 #include "redisplay.h" | |
44 #include "window.h" | 43 #include "window.h" |
45 | 44 |
46 static void EmacsFrameClassInitialize (void); | 45 static void EmacsFrameClassInitialize (void); |
47 static void EmacsFrameInitialize (Widget, Widget, ArgList, Cardinal *); | 46 static void EmacsFrameInitialize (Widget, Widget, ArgList, Cardinal *); |
48 static void EmacsFrameRealize (Widget, XtValueMask*, XSetWindowAttributes*); | 47 static void EmacsFrameRealize (Widget, XtValueMask*, XSetWindowAttributes*); |
113 offset (left_toolbar_border_width), XtRImmediate, (XtPointer)-1}, | 112 offset (left_toolbar_border_width), XtRImmediate, (XtPointer)-1}, |
114 {XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth, XtRInt, | 113 {XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth, XtRInt, |
115 sizeof (int), | 114 sizeof (int), |
116 offset (right_toolbar_border_width), XtRImmediate, (XtPointer)-1}, | 115 offset (right_toolbar_border_width), XtRImmediate, (XtPointer)-1}, |
117 {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel), | 116 {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel), |
118 offset(top_toolbar_shadow_pixel), XtRString, "#000000"}, | 117 offset(top_toolbar_shadow_pixel), XtRString, (XtPointer) "#000000"}, |
119 {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel, | 118 {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel, |
120 sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, "#000000"}, | 119 sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, (XtPointer) "#000000"}, |
121 {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel, | 120 {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel, |
122 sizeof(Pixel), offset(background_toolbar_pixel), XtRImmediate, | 121 sizeof(Pixel), offset(background_toolbar_pixel), XtRImmediate, |
123 (XtPointer)-1}, | 122 (XtPointer)-1}, |
124 {XtNforegroundToolBarColor, XtCForegroundToolBarColor, XtRPixel, | 123 {XtNforegroundToolBarColor, XtCForegroundToolBarColor, XtRPixel, |
125 sizeof(Pixel), offset(foreground_toolbar_pixel), XtRImmediate, | 124 sizeof(Pixel), offset(foreground_toolbar_pixel), XtRImmediate, |
143 XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), | 142 XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), |
144 #endif | 143 #endif |
145 offset(font), XtRImmediate, (XtPointer)0 | 144 offset(font), XtRImmediate, (XtPointer)0 |
146 }, | 145 }, |
147 {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), | 146 {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), |
148 offset(foreground_pixel), XtRString, "Black"}, | 147 offset(foreground_pixel), XtRString, (XtPointer) "Black"}, |
149 {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), | 148 {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), |
150 offset(background_pixel), XtRString, "Gray80"}, | 149 offset(background_pixel), XtRString, (XtPointer) "Gray80"}, |
151 {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), | 150 {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), |
152 offset(cursor_color), XtRString, "XtDefaultForeground"}, | 151 offset(cursor_color), XtRString, (XtPointer) "XtDefaultForeground"}, |
153 {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean), | 152 {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean), |
154 offset (bar_cursor), XtRImmediate, (XtPointer)0}, | 153 offset (bar_cursor), XtRImmediate, (XtPointer)0}, |
155 {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean), | 154 {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean), |
156 offset (visual_bell), XtRImmediate, (XtPointer)0}, | 155 offset (visual_bell), XtRImmediate, (XtPointer)0}, |
157 {XtNbellVolume, XtCBellVolume, XtRInt, sizeof (int), | 156 {XtNbellVolume, XtCBellVolume, XtRInt, sizeof (int), |
409 new->emacs_frame.internal_border_width) | 408 new->emacs_frame.internal_border_width) |
410 { | 409 { |
411 f->internal_border_width = new->emacs_frame.internal_border_width; | 410 f->internal_border_width = new->emacs_frame.internal_border_width; |
412 MARK_FRAME_SIZE_SLIPPED (f); | 411 MARK_FRAME_SIZE_SLIPPED (f); |
413 } | 412 } |
414 | 413 |
415 #ifdef HAVE_SCROLLBARS | 414 #ifdef HAVE_SCROLLBARS |
416 if (cur->emacs_frame.scrollbar_width != | 415 if (cur->emacs_frame.scrollbar_width != |
417 new->emacs_frame.scrollbar_width) | 416 new->emacs_frame.scrollbar_width) |
418 Fadd_spec_to_specifier | 417 Fadd_spec_to_specifier |
419 (Vscrollbar_width, | 418 (Vscrollbar_width, |
623 EmacsFrameSetCharSize (Widget widget, int columns, int rows) | 622 EmacsFrameSetCharSize (Widget widget, int columns, int rows) |
624 { | 623 { |
625 EmacsFrame ew = (EmacsFrame) widget; | 624 EmacsFrame ew = (EmacsFrame) widget; |
626 int pixel_width, pixel_height; | 625 int pixel_width, pixel_height; |
627 struct frame *f = ew->emacs_frame.frame; | 626 struct frame *f = ew->emacs_frame.frame; |
628 Arg al [2]; | |
629 | 627 |
630 if (columns < 3) | 628 if (columns < 3) |
631 columns = 3; /* no way buddy */ | 629 columns = 3; /* no way buddy */ |
632 if (rows < 1) | 630 if (rows < 1) |
633 rows = 1; | 631 rows = 1; |
635 char_to_pixel_size (f, columns, rows, &pixel_width, &pixel_height); | 633 char_to_pixel_size (f, columns, rows, &pixel_width, &pixel_height); |
636 | 634 |
637 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) | 635 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) |
638 x_wm_set_variable_size (FRAME_X_SHELL_WIDGET (f), columns, rows); | 636 x_wm_set_variable_size (FRAME_X_SHELL_WIDGET (f), columns, rows); |
639 | 637 |
640 XtSetArg (al [0], XtNwidth, (Dimension) pixel_width); | 638 { |
641 XtSetArg (al [1], XtNheight, (Dimension) pixel_height); | 639 Arg al [2]; |
642 XtSetValues ((Widget) ew, al, 2); | 640 XtSetArg (al [0], XtNwidth, pixel_width); |
643 } | 641 XtSetArg (al [1], XtNheight, pixel_height); |
642 XtSetValues ((Widget) ew, al, countof (al)); | |
643 } | |
644 } |