1 //------------------------------------------------------------------------------ 2 // Copyright (c) 2001-2004, Haiku 3 // 4 // Permission is hereby granted, free of charge, to any person obtaining a 5 // copy of this software and associated documentation files (the "Software"), 6 // to deal in the Software without restriction, including without limitation 7 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 // and/or sell copies of the Software, and to permit persons to whom the 9 // Software is furnished to do so, subject to the following conditions: 10 // 11 // The above copyright notice and this permission notice shall be included in 12 // all copies or substantial portions of the Software. 13 // 14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 // DEALINGS IN THE SOFTWARE. 21 // 22 // File Name: GraphicsDefs.cpp 23 // Author: DarkWyrm <bpmagic@columbus.rr.com> 24 // Caz <turok2@currantbun.com> 25 // Axel Dörfler <axeld@pinc-software.de> 26 // Description: Graphics functions and variables for the Interface Kit 27 // 28 //------------------------------------------------------------------------------ 29 30 #include <GraphicsDefs.h> 31 32 // patterns 33 const pattern B_SOLID_HIGH = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}; 34 const pattern B_MIXED_COLORS = {{0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55}}; 35 const pattern B_SOLID_LOW = {{0, 0, 0, 0, 0, 0, 0, 0}}; 36 37 // colors 38 const rgb_color B_TRANSPARENT_COLOR = {0x77, 0x74, 0x77, 0x00}; 39 const rgb_color B_TRANSPARENT_32_BIT = {0x77, 0x74, 0x77, 0x00}; 40 const uint8 B_TRANSPARENT_8_BIT = 0xff; 41 42 const uint8 B_TRANSPARENT_MAGIC_CMAP8 = 0xff; 43 const uint16 B_TRANSPARENT_MAGIC_RGBA15 = 0x39ce; 44 const uint16 B_TRANSPARENT_MAGIC_RGBA15_BIG = 0xce39; 45 const uint32 B_TRANSPARENT_MAGIC_RGBA32 = 0x00777477; 46 const uint32 B_TRANSPARENT_MAGIC_RGBA32_BIG = 0x77747700; 47 48 // misc. 49 const struct screen_id B_MAIN_SCREEN_ID = {0}; 50 51 // GraphicsDefs.h 52 53 // Note: one would think that these functions need to query the app server to retrieve 54 // the needed values, since this kind of stuff is kept server side. Well, a quick 55 // examination of the asm dump showed that it's not the case, at least on BeOS R5. 56 // libbe probably keeps some global struct which is updated when the resolution changes. 57 58 _IMPEXP_BE status_t 59 get_pixel_size_for(color_space space, size_t *pixelChunk, size_t *rowAlignment, size_t *pixelsPerChunk) 60 { 61 // TODO: Implement 62 return B_ERROR; 63 } 64 65 66 _IMPEXP_BE bool 67 bitmaps_support_space(color_space space, uint32 *supportFlags) 68 { 69 // TODO: Implement 70 return false; 71 } 72