summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjingham <jingham>1999-03-24 07:32:52 (GMT)
committerjingham <jingham>1999-03-24 07:32:52 (GMT)
commit87d69bf1d932f581e6c056f6586dcd0b4bb98246 (patch)
tree81ba83187bdac82326e83e52779a237b26c6fa22
parent9dff9ccd8861256932ab4bdb72c6fa006fd60d73 (diff)
downloadtk-87d69bf1d932f581e6c056f6586dcd0b4bb98246.zip
tk-87d69bf1d932f581e6c056f6586dcd0b4bb98246.tar.gz
tk-87d69bf1d932f581e6c056f6586dcd0b4bb98246.tar.bz2
Formatting fixes: some tabbing got lost.
-rw-r--r--mac/tkMacColor.c116
-rw-r--r--mac/tkMacDraw.c18
2 files changed, 67 insertions, 67 deletions
diff --git a/mac/tkMacColor.c b/mac/tkMacColor.c
index f5286de..d4e2533 100644
--- a/mac/tkMacColor.c
+++ b/mac/tkMacColor.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacColor.c,v 1.3.2.1 1999/03/22 06:43:25 jingham Exp $
+ * RCS: @(#) $Id: tkMacColor.c,v 1.3.2.2 1999/03/24 07:32:52 jingham Exp $
*/
#include <tkColor.h>
@@ -436,69 +436,69 @@ GetMenuPartColor(
are asked for the standard menu colors. So we return false (which
means don't use this color... */
- if (TkMacHaveAppearance() > 1) {
+ if (TkMacHaveAppearance()) {
macColor->red = 0xFFFF;
macColor->green = 0;
macColor->blue = 0;
- return 0;
+ return false;
} else {
mcEntryPtr = GetMCEntry(0, 0);
- switch (pixel) {
- case MENU_ACTIVE_PIXEL:
- if (mcEntryPtr == NULL) {
- macColor->red = macColor->blue = macColor->green = 0;
- } else {
- *macColor = mcEntryPtr->mctRGB3;
- }
- return 1;
- case MENU_ACTIVE_TEXT_PIXEL:
- if (mcEntryPtr == NULL) {
- macColor->red = macColor->blue = macColor->green = 0xFFFF;
- } else {
- *macColor = mcEntryPtr->mctRGB2;
- }
- return 1;
- case MENU_BACKGROUND_PIXEL:
- if (mcEntryPtr == NULL) {
- macColor->red = macColor->blue = macColor->green = 0xFFFF;
- } else {
- *macColor = mcEntryPtr->mctRGB2;
- }
- return 1;
- case MENU_DISABLED_PIXEL:
- if (mcEntryPtr == NULL) {
- backColor.red = backColor.blue = backColor.green = 0xFFFF;
- foreColor.red = foreColor.blue = foreColor.green = 0x0000;
- } else {
- backColor = mcEntryPtr->mctRGB2;
- foreColor = mcEntryPtr->mctRGB3;
- }
- SetRect(&globalRect, SHRT_MIN, SHRT_MIN, SHRT_MAX, SHRT_MAX);
- maxDevice = GetMaxDevice(&globalRect);
- if (GetGray(maxDevice, &backColor, &foreColor)) {
- *macColor = foreColor;
- } else {
+ switch (pixel) {
+ case MENU_ACTIVE_PIXEL:
+ if (mcEntryPtr == NULL) {
+ macColor->red = macColor->blue = macColor->green = 0;
+ } else {
+ *macColor = mcEntryPtr->mctRGB3;
+ }
+ return true;
+ case MENU_ACTIVE_TEXT_PIXEL:
+ if (mcEntryPtr == NULL) {
+ macColor->red = macColor->blue = macColor->green = 0xFFFF;
+ } else {
+ *macColor = mcEntryPtr->mctRGB2;
+ }
+ return true;
+ case MENU_BACKGROUND_PIXEL:
+ if (mcEntryPtr == NULL) {
+ macColor->red = macColor->blue = macColor->green = 0xFFFF;
+ } else {
+ *macColor = mcEntryPtr->mctRGB2;
+ }
+ return true;
+ case MENU_DISABLED_PIXEL:
+ if (mcEntryPtr == NULL) {
+ backColor.red = backColor.blue = backColor.green = 0xFFFF;
+ foreColor.red = foreColor.blue = foreColor.green = 0x0000;
+ } else {
+ backColor = mcEntryPtr->mctRGB2;
+ foreColor = mcEntryPtr->mctRGB3;
+ }
+ SetRect(&globalRect, SHRT_MIN, SHRT_MIN, SHRT_MAX, SHRT_MAX);
+ maxDevice = GetMaxDevice(&globalRect);
+ if (GetGray(maxDevice, &backColor, &foreColor)) {
+ *macColor = foreColor;
+ } else {
- /*
- * Pointer may have been moved by GetMaxDevice or GetGray.
- */
+ /*
+ * Pointer may have been moved by GetMaxDevice or GetGray.
+ */
- mcEntryPtr = GetMCEntry(0,0);
- if (mcEntryPtr == NULL) {
- macColor->red = macColor->green = macColor->blue = 0x7777;
- } else {
- *macColor = mcEntryPtr->mctRGB2;
- }
- }
- return 1;
- case MENU_TEXT_PIXEL:
- if (mcEntryPtr == NULL) {
- macColor->red = macColor->green = macColor->blue = 0;
- } else {
- *macColor = mcEntryPtr->mctRGB3;
- }
- return 1;
+ mcEntryPtr = GetMCEntry(0,0);
+ if (mcEntryPtr == NULL) {
+ macColor->red = macColor->green = macColor->blue = 0x7777;
+ } else {
+ *macColor = mcEntryPtr->mctRGB2;
+ }
+ }
+ return true;
+ case MENU_TEXT_PIXEL:
+ if (mcEntryPtr == NULL) {
+ macColor->red = macColor->green = macColor->blue = 0;
+ } else {
+ *macColor = mcEntryPtr->mctRGB3;
+ }
+ return true;
+ }
+ return false;
}
- return 0;
-}
}
diff --git a/mac/tkMacDraw.c b/mac/tkMacDraw.c
index cee0eae..265573a 100644
--- a/mac/tkMacDraw.c
+++ b/mac/tkMacDraw.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacDraw.c,v 1.2.2.1 1999/03/22 06:43:33 jingham Exp $
+ * RCS: @(#) $Id: tkMacDraw.c,v 1.2.2.2 1999/03/24 07:33:00 jingham Exp $
*/
#include "tkInt.h"
@@ -1180,19 +1180,19 @@ TkMacSetUpGraphicsPort(
gPenPat = NewPixPat();
}
- if (TkSetMacColor(gc->foreground, &macColor)) {
+ if (TkSetMacColor(gc->foreground, &macColor) == true) {
/* TODO: cache RGBPats for preformace - measure gains... */
MakeRGBPat(gPenPat, &macColor);
- PenNormal();
- if(gc->function == GXxor) {
- PenMode(patXor);
- }
- if (gc->line_width > 1) {
- PenSize(gc->line_width, gc->line_width);
+ PenNormal();
+ if(gc->function == GXxor) {
+ PenMode(patXor);
+ }
+ if (gc->line_width > 1) {
+ PenSize(gc->line_width, gc->line_width);
+ }
}
}
-}
/*
*----------------------------------------------------------------------