From ab3c19541d5feee8f522a80d862db8498a085861 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sat, 6 Apr 2013 17:13:36 -0400 Subject: [PATCH] Move B_COLOR_WHICH_COUNT to private ServerReadOnlyMemory header. This means the B_COLOR_WHICH_COUNT goes from being a public constant to a private one. It sill looks like a public constant starting with a B_ though. I hope that's not a big deal. Too bad we can't get the count of an enum. --- headers/os/interface/InterfaceDefs.h | 6 ------ headers/private/app/ServerReadOnlyMemory.h | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/headers/os/interface/InterfaceDefs.h b/headers/os/interface/InterfaceDefs.h index 38587d13b2..158eb3d7c4 100644 --- a/headers/os/interface/InterfaceDefs.h +++ b/headers/os/interface/InterfaceDefs.h @@ -331,12 +331,6 @@ enum color_which { B_KEYBOARD_NAVIGATION_COLOR = B_NAVIGATION_BASE_COLOR, B_MENU_SELECTION_BACKGROUND_COLOR = B_MENU_SELECTED_BACKGROUND_COLOR, - // Update this constant to be the largest color constant excluding - // B_SUCCESS_COLOR and B_FAILURE_COLOR. - // If you add a constant with index greater than 100 you'll have to add - // to the second operand below and also update ServerReadOnlyMemory.h - B_COLOR_WHICH_COUNT = B_SCROLL_BAR_THUMB_COLOR + 3, - // The following constants are deprecated, do not use in new code. B_DESKTOP_COLOR = 5 // see BScreen class for B_DESKTOP_COLOR replacement diff --git a/headers/private/app/ServerReadOnlyMemory.h b/headers/private/app/ServerReadOnlyMemory.h index 1401467f63..d9d1760c2c 100644 --- a/headers/private/app/ServerReadOnlyMemory.h +++ b/headers/private/app/ServerReadOnlyMemory.h @@ -13,6 +13,13 @@ #include +// Update this constant with the largest color constant excluding +// B_SUCCESS_COLOR and B_FAILURE_COLOR. +// If you add a constant with index greater than 100 you'll have to add +// to the second operand. +static const int32 B_COLOR_WHICH_COUNT = B_SCROLL_BAR_THUMB_COLOR + 3; + + struct server_read_only_memory { rgb_color colors[B_COLOR_WHICH_COUNT]; };