From 7efc1255edeed3c197761e5ea8ecb489ac61832a Mon Sep 17 00:00:00 2001 From: DarkWyrm Date: Fri, 7 Feb 2003 17:30:17 +0000 Subject: [PATCH] Modified ColorSet to match new color_which defs in InterfaceDefs.h Added ending newlines to a number of files git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2648 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/AccelerantDriver.cpp | 2 +- src/servers/app/server/AppServer.h | 2 +- src/servers/app/server/ColorSet.cpp | 35 ++++++++++++++++----- src/servers/app/server/ColorSet.h | 18 ++++++++--- src/servers/app/server/CursorManager.h | 2 +- src/servers/app/server/Decorator.h | 1 + src/servers/app/server/Desktop.h | 2 +- src/servers/app/server/DisplayDriver.h | 3 +- src/servers/app/server/FontFamily.h | 2 +- src/servers/app/server/FontServer.h | 7 ++--- src/servers/app/server/Layer.h | 3 +- src/servers/app/server/LayerData.h | 2 +- src/servers/app/server/RGBColor.h | 2 +- src/servers/app/server/RectUtils.h | 28 ++++++++++++++++- src/servers/app/server/ServerApp.h | 2 +- src/servers/app/server/ServerBitmap.h | 2 +- src/servers/app/server/ServerConfig.h | 2 +- src/servers/app/server/ServerCursor.h | 2 +- src/servers/app/server/ServerProtocol.h | 2 +- src/servers/app/server/SharedObject.h | 2 +- src/servers/app/server/SystemPalette.h | 2 +- src/servers/app/server/TokenHandler.h | 2 +- src/servers/app/server/ViewDriver.h | 2 +- 23 files changed, 90 insertions(+), 37 deletions(-) diff --git a/src/servers/app/server/AccelerantDriver.cpp b/src/servers/app/server/AccelerantDriver.cpp index 58ecac8259..5d71479cfc 100644 --- a/src/servers/app/server/AccelerantDriver.cpp +++ b/src/servers/app/server/AccelerantDriver.cpp @@ -1757,7 +1757,7 @@ bool AccelerantDriver::DumpToFile(const char *path) */ float AccelerantDriver::StringWidth(const char *string, int32 length, LayerData *d) { - if(!string || !d || !d->font) + if(!string || !d || !d->font) return 0.0; _Lock(); diff --git a/src/servers/app/server/AppServer.h b/src/servers/app/server/AppServer.h index 6f02770413..380f46bf76 100644 --- a/src/servers/app/server/AppServer.h +++ b/src/servers/app/server/AppServer.h @@ -54,4 +54,4 @@ private: Decorator *instantiate_decorator(BRect rect, const char *title, int32 wlook, int32 wfeel, int32 wflags, DisplayDriver *ddriver); -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ColorSet.cpp b/src/servers/app/server/ColorSet.cpp index d00e7e99fe..16939959d9 100644 --- a/src/servers/app/server/ColorSet.cpp +++ b/src/servers/app/server/ColorSet.cpp @@ -57,13 +57,20 @@ ColorSet::ColorSet(const ColorSet &cs) menu_selected_background=cs.menu_selected_background; menu_text=cs.menu_text; menu_selected_text=cs.menu_selected_text; + menu_selected_border=cs.menu_selected_border; + + keyboard_navigation_base=cs.keyboard_navigation_base; + keyboard_navigation_pulse=cs.keyboard_navigation_pulse; + + success=cs.success; + failure=cs.failure; + shine=cs.shine; + shadow=cs.shadow; window_tab=cs.window_tab; window_tab_text=cs.window_tab_text; inactive_window_tab=cs.inactive_window_tab; inactive_window_tab_text=cs.inactive_window_tab_text; - keyboard_navigation=cs.keyboard_navigation; - desktop=cs.desktop; } /*! @@ -102,14 +109,20 @@ void ColorSet::SetColors(const ColorSet &cs) menu_selected_background=cs.menu_selected_background; menu_text=cs.menu_text; menu_selected_text=cs.menu_selected_text; + menu_selected_border=cs.menu_selected_border; + + keyboard_navigation_base=cs.keyboard_navigation_base; + keyboard_navigation_pulse=cs.keyboard_navigation_pulse; + + success=cs.success; + failure=cs.failure; + shine=cs.shine; + shadow=cs.shadow; window_tab=cs.window_tab; window_tab_text=cs.window_tab_text; inactive_window_tab=cs.inactive_window_tab; inactive_window_tab_text=cs.inactive_window_tab_text; - - keyboard_navigation=cs.keyboard_navigation; - desktop=cs.desktop; } /*! @@ -135,13 +148,19 @@ void ColorSet::PrintToStream(void) printf("menu_selected_background "); menu_selected_background.PrintToStream(); printf("menu_text "); menu_text.PrintToStream(); printf("menu_selected_text "); menu_selected_text.PrintToStream(); + printf("menu_selected_border "); menu_selected_border.PrintToStream(); + + printf("keyboard_navigation_base "); keyboard_navigation_base.PrintToStream(); + printf("keyboard_navigation_pulse "); keyboard_navigation_pulse.PrintToStream(); + + printf("success "); success.PrintToStream(); + printf("failure "); failure.PrintToStream(); + printf("shine "); shine.PrintToStream(); + printf("shadow "); shadow.PrintToStream(); printf("window_tab "); window_tab.PrintToStream(); printf("window_tab_text "); window_tab_text.PrintToStream(); printf("inactive_window_tab "); inactive_window_tab.PrintToStream(); printf("inactive_window_tab_text "); inactive_window_tab_text.PrintToStream(); - - printf("keyboard_navigation "); keyboard_navigation.PrintToStream(); - printf("desktop "); desktop.PrintToStream(); } diff --git a/src/servers/app/server/ColorSet.h b/src/servers/app/server/ColorSet.h index 0730b533d5..ce08a053eb 100644 --- a/src/servers/app/server/ColorSet.h +++ b/src/servers/app/server/ColorSet.h @@ -61,14 +61,22 @@ public: menu_selected_background, menu_text, menu_selected_text, + menu_selected_border, + keyboard_navigation_base, + keyboard_navigation_pulse, + + success, + failure, + shine, + shadow, + + // Not all of these guys don't exist in InterfaceDefs.h, but we keep + // them as part of the color set anyway - they're important nonetheless window_tab, window_tab_text, inactive_window_tab, - inactive_window_tab_text, - - keyboard_navigation, - desktop; + inactive_window_tab_text; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/CursorManager.h b/src/servers/app/server/CursorManager.h index 81284db769..5af4f64f31 100644 --- a/src/servers/app/server/CursorManager.h +++ b/src/servers/app/server/CursorManager.h @@ -96,4 +96,4 @@ private: extern CursorManager *cursormanager; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/Decorator.h b/src/servers/app/server/Decorator.h index 0ec5244e43..97692a3d0d 100644 --- a/src/servers/app/server/Decorator.h +++ b/src/servers/app/server/Decorator.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include "LayerData.h" diff --git a/src/servers/app/server/Desktop.h b/src/servers/app/server/Desktop.h index 2bee31407f..69d959e20d 100644 --- a/src/servers/app/server/Desktop.h +++ b/src/servers/app/server/Desktop.h @@ -60,4 +60,4 @@ void set_drag_message(int32 size, int8 *flattened); int8* get_drag_message(int32 *size); void empty_drag_message(void); -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/DisplayDriver.h b/src/servers/app/server/DisplayDriver.h index 6c8cf388c5..1bb5de2cdf 100644 --- a/src/servers/app/server/DisplayDriver.h +++ b/src/servers/app/server/DisplayDriver.h @@ -29,7 +29,6 @@ #define _DISPLAY_DRIVER_H_ #include -#include #include #include @@ -168,4 +167,4 @@ private: ServerCursor *_cursor; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/FontFamily.h b/src/servers/app/server/FontFamily.h index caae344f73..7d41c4ec61 100644 --- a/src/servers/app/server/FontFamily.h +++ b/src/servers/app/server/FontFamily.h @@ -159,4 +159,4 @@ protected: BList *styles; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/FontServer.h b/src/servers/app/server/FontServer.h index 0281ffe425..29f0ec04d8 100644 --- a/src/servers/app/server/FontServer.h +++ b/src/servers/app/server/FontServer.h @@ -69,12 +69,11 @@ public: bool SetSystemBold(const char *family, const char *style, float size); bool SetSystemFixed(const char *family, const char *style, float size); bool FontsNeedUpdated(void) { return need_update; } - - void FontsUpdated(void) { need_update=false; } -protected: /*! \brief Called when the fonts list has been updated */ + void FontsUpdated(void) { need_update=false; } +protected: FontFamily *_FindFamily(const char *name); FT_CharMap _GetSupportedCharmap(const FT_Face &face); bool init; @@ -88,4 +87,4 @@ extern FTC_Manager ftmanager; extern FT_Library ftlib; extern FontServer *fontserver; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/Layer.h b/src/servers/app/server/Layer.h index 2df279df19..c1a00931a9 100644 --- a/src/servers/app/server/Layer.h +++ b/src/servers/app/server/Layer.h @@ -33,6 +33,7 @@ #include #include #include +#include #include "LayerData.h" class ServerWindow; @@ -120,4 +121,4 @@ protected: extern BLocker *layerlock; extern BList *layerlist; extern Layer *rootlayer; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/LayerData.h b/src/servers/app/server/LayerData.h index 25050e3909..89b627d463 100644 --- a/src/servers/app/server/LayerData.h +++ b/src/servers/app/server/LayerData.h @@ -49,4 +49,4 @@ public: float scale; escapement_delta edelta; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/RGBColor.h b/src/servers/app/server/RGBColor.h index 6e272cabb4..e6a2622370 100644 --- a/src/servers/app/server/RGBColor.h +++ b/src/servers/app/server/RGBColor.h @@ -74,4 +74,4 @@ protected: uint8 color8; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/RectUtils.h b/src/servers/app/server/RectUtils.h index 8c7875eab0..41626287ad 100644 --- a/src/servers/app/server/RectUtils.h +++ b/src/servers/app/server/RectUtils.h @@ -1,3 +1,29 @@ +//------------------------------------------------------------------------------ +// Copyright (c) 2001-2002, OpenBeOS +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// File Name: RectUtils.h +// Author: DarkWyrm +// Description: Utilities for work around R5 Interface Kit bugs +// +//------------------------------------------------------------------------------ #ifndef RECTUTILS_H_ #define RECTUTILS_H_ @@ -9,4 +35,4 @@ bool TestRectIntersection(const BRect &r,const BRect &r2); bool TestRegionIntersection(BRegion *r,const BRect &r2); void IntersectRegionWith(BRegion *r,const BRect &r2); void ValidateRect(BRect *r); -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ServerApp.h b/src/servers/app/server/ServerApp.h index bf47533377..ca77a211d9 100644 --- a/src/servers/app/server/ServerApp.h +++ b/src/servers/app/server/ServerApp.h @@ -85,4 +85,4 @@ protected: bool _isactive; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ServerBitmap.h b/src/servers/app/server/ServerBitmap.h index 778c4cc311..5ff7c22bc0 100644 --- a/src/servers/app/server/ServerBitmap.h +++ b/src/servers/app/server/ServerBitmap.h @@ -116,4 +116,4 @@ protected: int _bpp; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ServerConfig.h b/src/servers/app/server/ServerConfig.h index 2743574e01..caab04d35d 100644 --- a/src/servers/app/server/ServerConfig.h +++ b/src/servers/app/server/ServerConfig.h @@ -66,4 +66,4 @@ // and ServerWindows #define DEFAULT_MONITOR_PORT_SIZE 30 -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ServerCursor.h b/src/servers/app/server/ServerCursor.h index 7957332786..93e9f89d71 100644 --- a/src/servers/app/server/ServerCursor.h +++ b/src/servers/app/server/ServerCursor.h @@ -63,4 +63,4 @@ private: int32 _token; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ServerProtocol.h b/src/servers/app/server/ServerProtocol.h index dda26c5c2f..151b43be04 100644 --- a/src/servers/app/server/ServerProtocol.h +++ b/src/servers/app/server/ServerProtocol.h @@ -109,4 +109,4 @@ #define VIEW_GET_TOKEN 'vgtk' #define VIEW_ADD 'vadd' #define VIEW_REMOVE 'vrem' -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/SharedObject.h b/src/servers/app/server/SharedObject.h index feaf45777e..4057a609a4 100644 --- a/src/servers/app/server/SharedObject.h +++ b/src/servers/app/server/SharedObject.h @@ -52,4 +52,4 @@ private: uint32 dependents; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/SystemPalette.h b/src/servers/app/server/SystemPalette.h index 02eb475225..386a5406e6 100644 --- a/src/servers/app/server/SystemPalette.h +++ b/src/servers/app/server/SystemPalette.h @@ -33,4 +33,4 @@ void GenerateSystemPalette(rgb_color *palette); extern rgb_color system_palette[]; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/TokenHandler.h b/src/servers/app/server/TokenHandler.h index b0bc2eac4b..5ad093577c 100644 --- a/src/servers/app/server/TokenHandler.h +++ b/src/servers/app/server/TokenHandler.h @@ -50,4 +50,4 @@ private: BList *_excludes; }; -#endif \ No newline at end of file +#endif diff --git a/src/servers/app/server/ViewDriver.h b/src/servers/app/server/ViewDriver.h index d22609e769..2c4f2ef95b 100644 --- a/src/servers/app/server/ViewDriver.h +++ b/src/servers/app/server/ViewDriver.h @@ -167,4 +167,4 @@ protected: bool is_initialized; }; -#endif \ No newline at end of file +#endif