Mercurial > hg > xemacs-beta
comparison src/EmacsFrame.c @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | e04119814345 |
children | 1ce6082ce73f |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
83 offset (scrollbar_width), XtRImmediate, (XtPointer)-1}, | 83 offset (scrollbar_width), XtRImmediate, (XtPointer)-1}, |
84 {XtNscrollBarHeight, XtCScrollBarHeight, XtRInt, sizeof (int), | 84 {XtNscrollBarHeight, XtCScrollBarHeight, XtRInt, sizeof (int), |
85 offset (scrollbar_height), XtRImmediate, (XtPointer)-1}, | 85 offset (scrollbar_height), XtRImmediate, (XtPointer)-1}, |
86 {XtNscrollBarPlacement, XtCScrollBarPlacement, XtRScrollBarPlacement, | 86 {XtNscrollBarPlacement, XtCScrollBarPlacement, XtRScrollBarPlacement, |
87 sizeof(unsigned char), offset(scrollbar_placement), XtRImmediate, | 87 sizeof(unsigned char), offset(scrollbar_placement), XtRImmediate, |
88 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ | 88 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) |
89 defined (LWLIB_SCROLLBARS_ATHENA3D) | |
90 (XtPointer) XtBOTTOM_RIGHT | 89 (XtPointer) XtBOTTOM_RIGHT |
91 #else | 90 #else |
92 (XtPointer) XtBOTTOM_LEFT | 91 (XtPointer) XtBOTTOM_LEFT |
93 #endif | 92 #endif |
94 }, | 93 }, |
101 {XtNleftToolBarWidth, XtCLeftToolBarWidth, XtRInt, sizeof (int), | 100 {XtNleftToolBarWidth, XtCLeftToolBarWidth, XtRInt, sizeof (int), |
102 offset (left_toolbar_width), XtRImmediate, (XtPointer)-1}, | 101 offset (left_toolbar_width), XtRImmediate, (XtPointer)-1}, |
103 {XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, sizeof (int), | 102 {XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, sizeof (int), |
104 offset (right_toolbar_width), XtRImmediate, (XtPointer)-1}, | 103 offset (right_toolbar_width), XtRImmediate, (XtPointer)-1}, |
105 {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel), | 104 {XtNtopToolBarShadowColor, XtCTopToolBarShadowColor, XtRPixel, sizeof(Pixel), |
106 offset(top_toolbar_shadow_pixel), XtRString, (String) "#000000"}, | 105 offset(top_toolbar_shadow_pixel), XtRString, (String) "Gray90"}, |
107 {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel, | 106 {XtNbottomToolBarShadowColor, XtCBottomToolBarShadowColor, XtRPixel, |
108 sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, | 107 sizeof(Pixel), offset(bottom_toolbar_shadow_pixel), XtRString, |
109 (String) "#000000"}, | 108 (String) "Gray40"}, |
110 {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel, | 109 {XtNbackgroundToolBarColor, XtCBackgroundToolBarColor, XtRPixel, |
111 sizeof(Pixel), offset(background_toolbar_pixel), XtRString, | 110 sizeof(Pixel), offset(background_toolbar_pixel), XtRString, |
112 (String) "Gray75"}, | 111 (String) "Gray75"}, |
113 {XtNtopToolBarShadowPixmap, XtCTopToolBarShadowPixmap, XtRPixmap, | 112 {XtNtopToolBarShadowPixmap, XtCTopToolBarShadowPixmap, XtRPixmap, |
114 sizeof (Pixmap), offset(top_toolbar_shadow_pixmap), XtRImmediate, | 113 sizeof (Pixmap), offset(top_toolbar_shadow_pixmap), XtRImmediate, |
494 _CvtStringToScrollBarPlacement (XrmValuePtr args, /* unused */ | 493 _CvtStringToScrollBarPlacement (XrmValuePtr args, /* unused */ |
495 Cardinal *num_args, /* unused */ | 494 Cardinal *num_args, /* unused */ |
496 XrmValuePtr fromVal, | 495 XrmValuePtr fromVal, |
497 XrmValuePtr toVal) | 496 XrmValuePtr toVal) |
498 { | 497 { |
499 #define done(address, type) \ | |
500 toVal->size = sizeof(type); \ | |
501 toVal->addr = (XtPointer) address; \ | |
502 return /* `;' supplied by caller */ | |
503 | |
504 XrmQuark q; | 498 XrmQuark q; |
505 char lowerName[1000]; | 499 char *lowerName = (char *) alloca (strlen ( (char *) fromVal->addr) + 1); |
506 | 500 |
507 XmuCopyISOLatin1Lowered (lowerName, (char*)fromVal->addr); | 501 XmuCopyISOLatin1Lowered (lowerName, (char *) fromVal->addr); |
508 q = XrmStringToQuark(lowerName); | 502 q = XrmStringToQuark (lowerName); |
509 if (q == XrmStringToQuark ("top_left")) | 503 |
510 { | 504 toVal->size = sizeof (cvt_string_scrollbar_placement); |
511 cvt_string_scrollbar_placement = XtTOP_LEFT; | 505 toVal->addr = (XtPointer) &cvt_string_scrollbar_placement; |
512 done (&cvt_string_scrollbar_placement, unsigned char); | 506 cvt_string_scrollbar_placement = |
513 } | 507 q == XrmStringToQuark ("top_left") ? XtTOP_LEFT : |
514 if (q == XrmStringToQuark ("bottom_left")) | 508 q == XrmStringToQuark ("bottom_left") ? XtBOTTOM_LEFT : |
515 { | 509 q == XrmStringToQuark ("top_right") ? XtTOP_RIGHT : |
516 cvt_string_scrollbar_placement = XtBOTTOM_LEFT; | 510 q == XrmStringToQuark ("bottom_right") ? XtBOTTOM_RIGHT : |
517 done (&cvt_string_scrollbar_placement, unsigned char); | 511 0; |
518 } | 512 |
519 if (q == XrmStringToQuark ("top_right")) | 513 if (cvt_string_scrollbar_placement != 0) |
520 { | 514 return; |
521 cvt_string_scrollbar_placement = XtTOP_RIGHT; | 515 |
522 done (&cvt_string_scrollbar_placement, unsigned char); | |
523 } | |
524 if (q == XrmStringToQuark ("bottom_right")) | |
525 { | |
526 cvt_string_scrollbar_placement = XtBOTTOM_RIGHT; | |
527 done (&cvt_string_scrollbar_placement, unsigned char); | |
528 } | |
529 XtStringConversionWarning (fromVal->addr, "scrollBarPlacement"); | |
530 toVal->addr = NULL; | 516 toVal->addr = NULL; |
531 toVal->size = 0; | 517 toVal->size = 0; |
532 #undef done | 518 XtStringConversionWarning (fromVal->addr, "scrollBarPlacement"); |
533 } | 519 } |
534 | 520 |
535 static void | 521 static void |
536 EmacsFrameClassInitialize (void) | 522 EmacsFrameClassInitialize (void) |
537 { | 523 { |