From c7ee25fdcab4f723211646f1e56fdcbbffbc4f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 29 Jul 2004 10:24:31 +0000 Subject: [PATCH] Splitted Globals.cpp in GraphicsDefs.cpp and InterfaceDefs.cpp to match headers git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8500 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/GraphicsDefs.cpp | 64 +++++++++++++++++++ .../{Globals.cpp => InterfaceDefs.cpp} | 39 +---------- src/kits/interface/interface.src | 3 +- 3 files changed, 67 insertions(+), 39 deletions(-) create mode 100644 src/kits/interface/GraphicsDefs.cpp rename src/kits/interface/{Globals.cpp => InterfaceDefs.cpp} (91%) diff --git a/src/kits/interface/GraphicsDefs.cpp b/src/kits/interface/GraphicsDefs.cpp new file mode 100644 index 0000000000..4095892d05 --- /dev/null +++ b/src/kits/interface/GraphicsDefs.cpp @@ -0,0 +1,64 @@ +//------------------------------------------------------------------------------ +// Copyright (c) 2001-2004, Haiku +// +// 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: GraphicsDefs.cpp +// Author: DarkWyrm +// Caz +// Axel Dörfler +// Description: Graphics functions and variables for the Interface Kit +// +//------------------------------------------------------------------------------ + +#include + +// patterns +const pattern B_SOLID_HIGH = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; +const pattern B_MIXED_COLORS = {{0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55}}; +const pattern B_SOLID_LOW = {{0, 0, 0, 0, 0, 0, 0, 0}}; + +// colors +const rgb_color B_TRANSPARENT_COLOR = {0x77, 0x74, 0x77, 0x00}; +const rgb_color B_TRANSPARENT_32_BIT = {0x77, 0x74, 0x77, 0x00}; +const uint8 B_TRANSPARENT_8_BIT = 0xff; + +const uint8 B_TRANSPARENT_MAGIC_CMAP8 = 0xff; +const uint16 B_TRANSPARENT_MAGIC_RGBA15 = 0x39ce; +const uint16 B_TRANSPARENT_MAGIC_RGBA15_BIG = 0xce39; +const uint32 B_TRANSPARENT_MAGIC_RGBA32 = 0x00777477; +const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG = 0x77747700; + +// misc. +const struct screen_id B_MAIN_SCREEN_ID = {0}; + +// GraphicsDefs.h + +_IMPEXP_BE status_t +get_pixel_size_for(color_space space, size_t * pixel_chunk, size_t * row_alignment, size_t * pixels_per_chunk) +{ + // TODO: Implement +} + + +_IMPEXP_BE bool +bitmaps_support_space(color_space space, uint32 * support_flags) +{ + // TODO: Implement +} diff --git a/src/kits/interface/Globals.cpp b/src/kits/interface/InterfaceDefs.cpp similarity index 91% rename from src/kits/interface/Globals.cpp rename to src/kits/interface/InterfaceDefs.cpp index e7c025a035..ca55a9a6f8 100644 --- a/src/kits/interface/Globals.cpp +++ b/src/kits/interface/InterfaceDefs.cpp @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // -// File Name: Globals.cpp +// File Name: InterfaceDefs.cpp // Author: DarkWyrm // Caz // Axel Dörfler @@ -28,7 +28,6 @@ //------------------------------------------------------------------------------ #include -#include #include #include #include @@ -49,27 +48,6 @@ extern "C" status_t _fini_interface_kit_(); using namespace BPrivate; - -// patterns -const pattern B_SOLID_HIGH = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; -const pattern B_MIXED_COLORS = {{0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55}}; -const pattern B_SOLID_LOW = {{0, 0, 0, 0, 0, 0, 0, 0}}; - -// colors -const rgb_color B_TRANSPARENT_COLOR = {0x77, 0x74, 0x77, 0x00}; -const rgb_color B_TRANSPARENT_32_BIT = {0x77, 0x74, 0x77, 0x00}; -const uint8 B_TRANSPARENT_8_BIT = 0xff; - -const uint8 B_TRANSPARENT_MAGIC_CMAP8 = 0xff; -const uint16 B_TRANSPARENT_MAGIC_RGBA15 = 0x39ce; -const uint16 B_TRANSPARENT_MAGIC_RGBA15_BIG = 0xce39; -const uint32 B_TRANSPARENT_MAGIC_RGBA32 = 0x00777477; -const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG = 0x77747700; - -// misc. -const struct screen_id B_MAIN_SCREEN_ID = {0}; - - // InterfaceDefs.h _IMPEXP_BE const color_map * @@ -640,21 +618,6 @@ _init_global_fonts() } -// GraphicsDefs.h - -_IMPEXP_BE status_t -get_pixel_size_for(color_space space, size_t * pixel_chunk, size_t * row_alignment, size_t * pixels_per_chunk) -{ - // TODO: Implement -} - - -_IMPEXP_BE bool -bitmaps_support_space(color_space space, uint32 * support_flags) -{ - // TODO: Implement -} - /*! \brief private function used by Tracker to set window decor \param theme The theme to choose diff --git a/src/kits/interface/interface.src b/src/kits/interface/interface.src index bf1a178f39..fdba3b9381 100644 --- a/src/kits/interface/interface.src +++ b/src/kits/interface/interface.src @@ -11,8 +11,9 @@ INTERFACE_KIT_SOURCE = Deskbar.cpp Dragger.cpp Font.cpp - Globals.cpp + GraphicsDefs.cpp Input.cpp + InterfaceDefs.cpp Menu.cpp MenuBar.cpp MenuField.cpp