summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXPort.h
diff options
context:
space:
mode:
authorculler <culler>2019-02-27 06:31:30 (GMT)
committerculler <culler>2019-02-27 06:31:30 (GMT)
commitfd087b19f442d4ea569093b1e9f2a308bb93bade (patch)
tree434ec23f3dd5db1f839a7a48badad12ff0dca211 /macosx/tkMacOSXPort.h
parent998ef733dd784bdbf4a50349cd74ea26e30cbe5a (diff)
downloadtk-fd087b19f442d4ea569093b1e9f2a308bb93bade.zip
tk-fd087b19f442d4ea569093b1e9f2a308bb93bade.tar.gz
tk-fd087b19f442d4ea569093b1e9f2a308bb93bade.tar.bz2
Cleaned up the code in tkMacOSXColors.c. Discovered along the way that we can partially support
Dark Mode for ttk widgets.
Diffstat (limited to 'macosx/tkMacOSXPort.h')
-rw-r--r--macosx/tkMacOSXPort.h38
1 files changed, 14 insertions, 24 deletions
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index bd48bd5..617abda 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -128,17 +128,6 @@
#define TkpSync(display)
/*
- * The following macro returns the pixel value that corresponds to the
- * RGB values in the given XColor structure.
- */
-
-#define PIXEL_MAGIC ((unsigned char) 0x69)
-#define TkpGetPixel(p) ((((((PIXEL_MAGIC << 8) \
- | (((p)->red >> 8) & 0xff)) << 8) \
- | (((p)->green >> 8) & 0xff)) << 8) \
- | (((p)->blue >> 8) & 0xff))
-
-/*
* This macro stores a representation of the window handle in a string.
*/
@@ -159,19 +148,20 @@
*/
#define TRANSPARENT_PIXEL 30
-#define HIGHLIGHT_PIXEL 31
-#define HIGHLIGHT_SECONDARY_PIXEL 32
-#define HIGHLIGHT_TEXT_PIXEL 33
-#define HIGHLIGHT_ALTERNATE_PIXEL 34
-#define CONTROL_TEXT_PIXEL 35
-#define CONTROL_BODY_PIXEL 37
-#define CONTROL_FRAME_PIXEL 39
-#define WINDOW_BODY_PIXEL 41
-#define MENU_ACTIVE_PIXEL 43
-#define MENU_ACTIVE_TEXT_PIXEL 45
-#define MENU_BACKGROUND_PIXEL 47
-#define MENU_DISABLED_PIXEL 49
-#define MENU_TEXT_PIXEL 51
#define APPEARANCE_PIXEL 52
+#define PIXEL_MAGIC ((unsigned char) 0x69)
+
+/*
+ * The following macro returns the pixel value that corresponds to the
+ * 16-bit RGB values in the given XColor structure.
+ * The format is: (PIXEL_MAGIC <<< 24) | (R << 16) | (G << 8) | B
+ * where each of R, G and B is the high order byte of a 16-bit component.
+ */
+
+#define TkpGetPixel(p) ((((((PIXEL_MAGIC << 8) \
+ | (((p)->red >> 8) & 0xff)) << 8) \
+ | (((p)->green >> 8) & 0xff)) << 8) \
+ | (((p)->blue >> 8) & 0xff))
+
#endif /* _TKMACPORT */