16d5488e1SAxel Dörfler/*
2e047b40aSAxel Dörfler * Copyright 2001-2015, Haiku, Inc. All rights reserved.
389208c77SStephan Aßmus * Distributed under the terms of the MIT License.
46d5488e1SAxel Dörfler */
552a38012Sejakowatz#ifndef	_INTERFACE_DEFS_H
652a38012Sejakowatz#define	_INTERFACE_DEFS_H
752a38012Sejakowatz
852a38012Sejakowatz
952a38012Sejakowatz#include <GraphicsDefs.h>
1052a38012Sejakowatz#include <OS.h>
1152a38012Sejakowatz
1233394b85SStephan Aßmus
1333394b85SStephan Aßmusclass BBitmap;
147f9368caSlooncrazclass BMessage;
151c73ffa1SStephan Aßmusclass BPoint;
1633394b85SStephan Aßmusclass BRect;
1752a38012Sejakowatz
1852a38012Sejakowatz
196d5488e1SAxel Dörfler// some handy UTF-8 characters
2052a38012Sejakowatz
21860cab29SJérôme Duval#define B_UTF8_BULLET		"\xE2\x80\xA2"
2252a38012Sejakowatz#define B_UTF8_ELLIPSIS		"\xE2\x80\xA6"
2352a38012Sejakowatz#define B_UTF8_OPEN_QUOTE	"\xE2\x80\x9C"
2452a38012Sejakowatz#define B_UTF8_CLOSE_QUOTE	"\xE2\x80\x9D"
2552a38012Sejakowatz#define B_UTF8_COPYRIGHT	"\xC2\xA9"
2652a38012Sejakowatz#define B_UTF8_REGISTERED	"\xC2\xAE"
2752a38012Sejakowatz#define B_UTF8_TRADEMARK	"\xE2\x84\xA2"
2852a38012Sejakowatz#define B_UTF8_SMILING_FACE	"\xE2\x98\xBB"
2952a38012Sejakowatz#define B_UTF8_HIROSHI		"\xE5\xBC\x98"
30581cd2a2SAugustin Cavalier
31581cd2a2SAugustin Cavalier
32581cd2a2SAugustin Cavalier#define B_MAX_MOUSE_BUTTONS 16
3352a38012Sejakowatz
3452a38012Sejakowatz
35cfc3fa87SAxel Dörfler// Key definitions
366d5488e1SAxel Dörfler
376d5488e1SAxel Dörflerstruct key_info {
386d5488e1SAxel Dörfler	uint32	modifiers;
396d5488e1SAxel Dörfler	uint8	key_states[16];
406d5488e1SAxel Dörfler};
416d5488e1SAxel Dörfler
426d5488e1SAxel Dörflerenum {
436d5488e1SAxel Dörfler	B_BACKSPACE			= 0x08,
446d5488e1SAxel Dörfler	B_RETURN			= 0x0a,
456d5488e1SAxel Dörfler	B_ENTER				= 0x0a,
466d5488e1SAxel Dörfler	B_SPACE				= 0x20,
476d5488e1SAxel Dörfler	B_TAB				= 0x09,
486d5488e1SAxel Dörfler	B_ESCAPE			= 0x1b,
496d5488e1SAxel Dörfler	B_SUBSTITUTE		= 0x1a,
506d5488e1SAxel Dörfler
516d5488e1SAxel Dörfler	B_LEFT_ARROW		= 0x1c,
526d5488e1SAxel Dörfler	B_RIGHT_ARROW		= 0x1d,
536d5488e1SAxel Dörfler	B_UP_ARROW			= 0x1e,
546d5488e1SAxel Dörfler	B_DOWN_ARROW		= 0x1f,
556d5488e1SAxel Dörfler
566d5488e1SAxel Dörfler	B_INSERT			= 0x05,
576d5488e1SAxel Dörfler	B_DELETE			= 0x7f,
586d5488e1SAxel Dörfler	B_HOME				= 0x01,
596d5488e1SAxel Dörfler	B_END				= 0x04,
606d5488e1SAxel Dörfler	B_PAGE_UP			= 0x0b,
616d5488e1SAxel Dörfler	B_PAGE_DOWN			= 0x0c,
626d5488e1SAxel Dörfler
63ba64d892SJérôme Duval	B_FUNCTION_KEY		= 0x10,
64f7b619c9SKarsten Heimrich
6595c8163aSJérôme Duval	// for Japanese and Korean keyboards
66ba64d892SJérôme Duval	B_KATAKANA_HIRAGANA	= 0xf2,
6795c8163aSJérôme Duval	B_HANKAKU_ZENKAKU	= 0xf3,
6895c8163aSJérôme Duval	B_HANGUL			= 0xf0,
6995c8163aSJérôme Duval	B_HANGUL_HANJA		= 0xf1
706d5488e1SAxel Dörfler};
716d5488e1SAxel Dörfler
726d5488e1SAxel Dörflerenum {
736d5488e1SAxel Dörfler	B_F1_KEY			= 0x02,
746d5488e1SAxel Dörfler	B_F2_KEY			= 0x03,
756d5488e1SAxel Dörfler	B_F3_KEY			= 0x04,
766d5488e1SAxel Dörfler	B_F4_KEY			= 0x05,
776d5488e1SAxel Dörfler	B_F5_KEY			= 0x06,
786d5488e1SAxel Dörfler	B_F6_KEY			= 0x07,
796d5488e1SAxel Dörfler	B_F7_KEY			= 0x08,
806d5488e1SAxel Dörfler	B_F8_KEY			= 0x09,
816d5488e1SAxel Dörfler	B_F9_KEY			= 0x0a,
826d5488e1SAxel Dörfler	B_F10_KEY			= 0x0b,
836d5488e1SAxel Dörfler	B_F11_KEY			= 0x0c,
846d5488e1SAxel Dörfler	B_F12_KEY			= 0x0d,
856d5488e1SAxel Dörfler	B_PRINT_KEY			= 0x0e,
866d5488e1SAxel Dörfler	B_SCROLL_KEY		= 0x0f,
876d5488e1SAxel Dörfler	B_PAUSE_KEY			= 0x10
886d5488e1SAxel Dörfler};
8952a38012Sejakowatz
9052a38012Sejakowatzstruct key_map {
916d5488e1SAxel Dörfler	uint32	version;
926d5488e1SAxel Dörfler	uint32	caps_key;
936d5488e1SAxel Dörfler	uint32	scroll_key;
946d5488e1SAxel Dörfler	uint32	num_key;
956d5488e1SAxel Dörfler	uint32	left_shift_key;
966d5488e1SAxel Dörfler	uint32	right_shift_key;
976d5488e1SAxel Dörfler	uint32	left_command_key;
986d5488e1SAxel Dörfler	uint32	right_command_key;
996d5488e1SAxel Dörfler	uint32	left_control_key;
1006d5488e1SAxel Dörfler	uint32	right_control_key;
1016d5488e1SAxel Dörfler	uint32	left_option_key;
1026d5488e1SAxel Dörfler	uint32	right_option_key;
1036d5488e1SAxel Dörfler	uint32	menu_key;
1046d5488e1SAxel Dörfler	uint32	lock_settings;
1056d5488e1SAxel Dörfler	int32	control_map[128];
1066d5488e1SAxel Dörfler	int32	option_caps_shift_map[128];
1076d5488e1SAxel Dörfler	int32	option_caps_map[128];
1086d5488e1SAxel Dörfler	int32	option_shift_map[128];
1096d5488e1SAxel Dörfler	int32	option_map[128];
1106d5488e1SAxel Dörfler	int32	caps_shift_map[128];
1116d5488e1SAxel Dörfler	int32	caps_map[128];
1126d5488e1SAxel Dörfler	int32	shift_map[128];
1136d5488e1SAxel Dörfler	int32	normal_map[128];
1146d5488e1SAxel Dörfler	int32	acute_dead_key[32];
1156d5488e1SAxel Dörfler	int32	grave_dead_key[32];
1166d5488e1SAxel Dörfler	int32	circumflex_dead_key[32];
1176d5488e1SAxel Dörfler	int32	dieresis_dead_key[32];
1186d5488e1SAxel Dörfler	int32	tilde_dead_key[32];
1196d5488e1SAxel Dörfler	uint32	acute_tables;
1206d5488e1SAxel Dörfler	uint32	grave_tables;
1216d5488e1SAxel Dörfler	uint32	circumflex_tables;
1226d5488e1SAxel Dörfler	uint32	dieresis_tables;
1236d5488e1SAxel Dörfler	uint32	tilde_tables;
12452a38012Sejakowatz};
12552a38012Sejakowatz
126cfc3fa87SAxel Dörflerenum {
127cfc3fa87SAxel Dörfler	B_CONTROL_TABLE				= 0x00000001,
128cfc3fa87SAxel Dörfler	B_OPTION_CAPS_SHIFT_TABLE	= 0x00000002,
129cfc3fa87SAxel Dörfler	B_OPTION_CAPS_TABLE			= 0x00000004,
130cfc3fa87SAxel Dörfler	B_OPTION_SHIFT_TABLE		= 0x00000008,
131cfc3fa87SAxel Dörfler	B_OPTION_TABLE				= 0x00000010,
132cfc3fa87SAxel Dörfler	B_CAPS_SHIFT_TABLE			= 0x00000020,
133cfc3fa87SAxel Dörfler	B_CAPS_TABLE				= 0x00000040,
134cfc3fa87SAxel Dörfler	B_SHIFT_TABLE				= 0x00000080,
135cfc3fa87SAxel Dörfler	B_NORMAL_TABLE				= 0x00000100
136cfc3fa87SAxel Dörfler};
137cfc3fa87SAxel Dörfler
138cfc3fa87SAxel Dörfler// modifiers
139cfc3fa87SAxel Dörflerenum {
140cfc3fa87SAxel Dörfler	B_SHIFT_KEY			= 0x00000001,
141cfc3fa87SAxel Dörfler	B_COMMAND_KEY		= 0x00000002,
142cfc3fa87SAxel Dörfler	B_CONTROL_KEY		= 0x00000004,
143cfc3fa87SAxel Dörfler	B_CAPS_LOCK			= 0x00000008,
144cfc3fa87SAxel Dörfler	B_SCROLL_LOCK		= 0x00000010,
145cfc3fa87SAxel Dörfler	B_NUM_LOCK			= 0x00000020,
146cfc3fa87SAxel Dörfler	B_OPTION_KEY		= 0x00000040,
147cfc3fa87SAxel Dörfler	B_MENU_KEY			= 0x00000080,
148cfc3fa87SAxel Dörfler	B_LEFT_SHIFT_KEY	= 0x00000100,
149cfc3fa87SAxel Dörfler	B_RIGHT_SHIFT_KEY	= 0x00000200,
150cfc3fa87SAxel Dörfler	B_LEFT_COMMAND_KEY	= 0x00000400,
151cfc3fa87SAxel Dörfler	B_RIGHT_COMMAND_KEY	= 0x00000800,
152cfc3fa87SAxel Dörfler	B_LEFT_CONTROL_KEY	= 0x00001000,
153cfc3fa87SAxel Dörfler	B_RIGHT_CONTROL_KEY	= 0x00002000,
154cfc3fa87SAxel Dörfler	B_LEFT_OPTION_KEY	= 0x00004000,
155cfc3fa87SAxel Dörfler	B_RIGHT_OPTION_KEY	= 0x00008000
156cfc3fa87SAxel Dörfler};
157cfc3fa87SAxel Dörfler
158cfc3fa87SAxel Dörfler
159cfc3fa87SAxel Dörfler// Mouse definitions
160cfc3fa87SAxel Dörfler
16152a38012Sejakowatzstruct mouse_map {
1626d5488e1SAxel Dörfler	uint32	button[B_MAX_MOUSE_BUTTONS];
16352a38012Sejakowatz};
16452a38012Sejakowatz
165cfc3fa87SAxel Dörflerenum mode_mouse {
166cfc3fa87SAxel Dörfler	B_NORMAL_MOUSE 			= 0,
167926e63c8SBrecht Machiels	B_CLICK_TO_FOCUS_MOUSE	= -1,
168926e63c8SBrecht Machiels	B_FOCUS_FOLLOWS_MOUSE	= 1
169926e63c8SBrecht Machiels};
170926e63c8SBrecht Machiels
171926e63c8SBrecht Machielsenum mode_focus_follows_mouse {
172926e63c8SBrecht Machiels	B_NORMAL_FOCUS_FOLLOWS_MOUSE		= 0,
173926e63c8SBrecht Machiels	B_WARP_FOCUS_FOLLOWS_MOUSE			= 1,
174926e63c8SBrecht Machiels	B_INSTANT_WARP_FOCUS_FOLLOWS_MOUSE	= 2
175cfc3fa87SAxel Dörfler};
176cfc3fa87SAxel Dörfler
1776d5488e1SAxel Dörfler
178cfc3fa87SAxel Dörfler// View orientation/alignment/style
17952a38012Sejakowatz
18052a38012Sejakowatzenum border_style {
18152a38012Sejakowatz	B_PLAIN_BORDER,
18252a38012Sejakowatz	B_FANCY_BORDER,
18352a38012Sejakowatz	B_NO_BORDER
18452a38012Sejakowatz};
18552a38012Sejakowatz
18652a38012Sejakowatzenum orientation {
18752a38012Sejakowatz	B_HORIZONTAL,
18852a38012Sejakowatz	B_VERTICAL
18952a38012Sejakowatz};
19052a38012Sejakowatz
19152a38012Sejakowatzenum button_width {
19252a38012Sejakowatz	B_WIDTH_AS_USUAL,
19352a38012Sejakowatz	B_WIDTH_FROM_WIDEST,
19452a38012Sejakowatz	B_WIDTH_FROM_LABEL
19552a38012Sejakowatz};
19652a38012Sejakowatz
19752a38012Sejakowatzstruct scroll_bar_info {
19852a38012Sejakowatz	bool	proportional;
19952a38012Sejakowatz	bool	double_arrows;
20052a38012Sejakowatz	int32	knob;
20152a38012Sejakowatz	int32	min_knob_size;
20252a38012Sejakowatz};
20352a38012Sejakowatz
20452a38012Sejakowatzenum alignment {
20552a38012Sejakowatz	B_ALIGN_LEFT,
206dd114a0cSJérôme Duval	B_ALIGN_RIGHT,
207dd114a0cSJérôme Duval	B_ALIGN_CENTER,
2089ecf9d1cSIngo Weinhold
2099ecf9d1cSIngo Weinhold	B_ALIGN_HORIZONTAL_CENTER	= B_ALIGN_CENTER,
2109ecf9d1cSIngo Weinhold
2119ecf9d1cSIngo Weinhold	B_ALIGN_HORIZONTAL_UNSET	= -1L,
2122c97a8d1SIngo Weinhold	B_ALIGN_USE_FULL_WIDTH		= -2L
21352a38012Sejakowatz};
21452a38012Sejakowatz
21552a38012Sejakowatzenum vertical_alignment {
216cfc3fa87SAxel Dörfler	B_ALIGN_TOP					= 0x10L,
217cfc3fa87SAxel Dörfler	B_ALIGN_MIDDLE				= 0x20,
218cfc3fa87SAxel Dörfler	B_ALIGN_BOTTOM				= 0x30,
2199ecf9d1cSIngo Weinhold
2209ecf9d1cSIngo Weinhold	B_ALIGN_VERTICAL_CENTER		= B_ALIGN_MIDDLE,
2219ecf9d1cSIngo Weinhold
2229ecf9d1cSIngo Weinhold	B_ALIGN_VERTICAL_UNSET		= -1L,
2239ecf9d1cSIngo Weinhold	B_ALIGN_NO_VERTICAL			= B_ALIGN_VERTICAL_UNSET,
2242c97a8d1SIngo Weinhold	B_ALIGN_USE_FULL_HEIGHT		= -2L
22552a38012Sejakowatz};
22652a38012Sejakowatz
2276648dd3cSAlex Wilson
2286648dd3cSAlex Wilson// Layout spacing and insets, see BControlLook::ComposeSpacing()
2296648dd3cSAlex Wilson
2306648dd3cSAlex Wilson
2316648dd3cSAlex Wilsonenum {
232e047b40aSAxel Dörfler	B_USE_DEFAULT_SPACING = -1002,
233e047b40aSAxel Dörfler	B_USE_ITEM_SPACING = -1003,
234e047b40aSAxel Dörfler	B_USE_ITEM_INSETS = -1003,
235e047b40aSAxel Dörfler	B_USE_HALF_ITEM_SPACING = -1004,
236e047b40aSAxel Dörfler	B_USE_HALF_ITEM_INSETS = -1004,
237e047b40aSAxel Dörfler	B_USE_WINDOW_INSETS = -1005,
238e047b40aSAxel Dörfler	B_USE_WINDOW_SPACING = -1005,
239e047b40aSAxel Dörfler	B_USE_SMALL_INSETS = -1006,
240e047b40aSAxel Dörfler	B_USE_SMALL_SPACING = -1006,
241e047b40aSAxel Dörfler	B_USE_BIG_INSETS = -1007,
242e047b40aSAxel Dörfler	B_USE_BIG_SPACING = -1007
2436648dd3cSAlex Wilson};
24482ab3167SAlex Wilson
24552a38012Sejakowatz
246cfc3fa87SAxel Dörfler// Line join and cap modes
24752a38012Sejakowatz
248cfc3fa87SAxel Dörflerenum join_mode {
249cfc3fa87SAxel Dörfler	B_ROUND_JOIN = 0,
250cfc3fa87SAxel Dörfler	B_MITER_JOIN,
251cfc3fa87SAxel Dörfler	B_BEVEL_JOIN,
252cfc3fa87SAxel Dörfler	B_BUTT_JOIN,
253cfc3fa87SAxel Dörfler	B_SQUARE_JOIN
254cfc3fa87SAxel Dörfler};
25552a38012Sejakowatz
256cfc3fa87SAxel Dörflerenum cap_mode {
257cfc3fa87SAxel Dörfler	B_ROUND_CAP		= B_ROUND_JOIN,
258cfc3fa87SAxel Dörfler	B_BUTT_CAP		= B_BUTT_JOIN,
259cfc3fa87SAxel Dörfler	B_SQUARE_CAP	= B_SQUARE_JOIN
26052a38012Sejakowatz};
26152a38012Sejakowatz
262cfc3fa87SAxel Dörflerconst float B_DEFAULT_MITER_LIMIT = 10.0F;
263cfc3fa87SAxel Dörfler
264cfc3fa87SAxel Dörfler
265eb431663SAdrien Destugues// Polygon filling rules
266eb431663SAdrien Destugues
267eb431663SAdrien Destuguesenum {
268eb431663SAdrien Destugues	B_EVEN_ODD = 0,
269eb431663SAdrien Destugues	B_NONZERO
270eb431663SAdrien Destugues};
271eb431663SAdrien Destugues
272eb431663SAdrien Destugues
273cfc3fa87SAxel Dörfler// Bitmap and overlay constants
27452a38012Sejakowatz
27552a38012Sejakowatzenum bitmap_tiling {
27653eaeedeSStephan Aßmus	B_TILE_BITMAP_X				= 0x00000001,
27753eaeedeSStephan Aßmus	B_TILE_BITMAP_Y				= 0x00000002,
27853eaeedeSStephan Aßmus	B_TILE_BITMAP				= 0x00000003
27952a38012Sejakowatz};
28052a38012Sejakowatz
28152a38012Sejakowatzenum overlay_options {
28252a38012Sejakowatz	B_OVERLAY_FILTER_HORIZONTAL	= 0x00010000,
28352a38012Sejakowatz	B_OVERLAY_FILTER_VERTICAL	= 0x00020000,
28452a38012Sejakowatz	B_OVERLAY_MIRROR			= 0x00040000,
28552a38012Sejakowatz	B_OVERLAY_TRANSFER_CHANNEL	= 0x00080000
28652a38012Sejakowatz};
28752a38012Sejakowatz
28876d9e053SStephan Aßmusenum bitmap_drawing_options {
28976d9e053SStephan Aßmus	B_FILTER_BITMAP_BILINEAR	= 0x00000100,
29076d9e053SStephan Aßmus
29176d9e053SStephan Aßmus	B_WAIT_FOR_RETRACE			= 0x00000800
29253eaeedeSStephan Aßmus};
29352a38012Sejakowatz
29476d9e053SStephan Aßmus
295cfc3fa87SAxel Dörfler// Default UI Colors
29652a38012Sejakowatz
29752a38012Sejakowatzenum color_which {
2987f9368caSlooncraz	B_NO_COLOR = 0,
29952a38012Sejakowatz	B_PANEL_BACKGROUND_COLOR = 1,
300f971378fSejakowatz	B_PANEL_TEXT_COLOR = 10,
301f971378fSejakowatz	B_DOCUMENT_BACKGROUND_COLOR = 11,
302f971378fSejakowatz	B_DOCUMENT_TEXT_COLOR = 12,
303f971378fSejakowatz	B_CONTROL_BACKGROUND_COLOR = 13,
304f971378fSejakowatz	B_CONTROL_TEXT_COLOR = 14,
305f971378fSejakowatz	B_CONTROL_BORDER_COLOR = 15,
306f971378fSejakowatz	B_CONTROL_HIGHLIGHT_COLOR = 16,
3074bb5af76SJohn Scipione	B_CONTROL_MARK_COLOR = 27,
308f971378fSejakowatz	B_NAVIGATION_BASE_COLOR = 4,
309f971378fSejakowatz	B_NAVIGATION_PULSE_COLOR = 17,
310f971378fSejakowatz	B_SHINE_COLOR = 18,
311f971378fSejakowatz	B_SHADOW_COLOR = 19,
31223ae77aaSAxel Dörfler
3137f9368caSlooncraz	B_LINK_TEXT_COLOR = 33,
3147f9368caSlooncraz	B_LINK_HOVER_COLOR = 34,
3157f9368caSlooncraz	B_LINK_VISITED_COLOR = 35,
3167f9368caSlooncraz	B_LINK_ACTIVE_COLOR = 36,
3177f9368caSlooncraz
31852a38012Sejakowatz	B_MENU_BACKGROUND_COLOR = 2,
319f971378fSejakowatz	B_MENU_SELECTED_BACKGROUND_COLOR = 6,
32052a38012Sejakowatz	B_MENU_ITEM_TEXT_COLOR = 7,
32152a38012Sejakowatz	B_MENU_SELECTED_ITEM_TEXT_COLOR = 8,
322f971378fSejakowatz	B_MENU_SELECTED_BORDER_COLOR = 9,
32323ae77aaSAxel Dörfler
32491c78f09SJohn Scipione	B_LIST_BACKGROUND_COLOR = 28,
32591c78f09SJohn Scipione	B_LIST_SELECTED_BACKGROUND_COLOR = 29,
32691c78f09SJohn Scipione	B_LIST_ITEM_TEXT_COLOR = 30,
32791c78f09SJohn Scipione	B_LIST_SELECTED_ITEM_TEXT_COLOR = 31,
32891c78f09SJohn Scipione
3299f24981aSJohn Scipione	B_SCROLL_BAR_THUMB_COLOR = 32,
3309f24981aSJohn Scipione
3318318af01SAxel Dörfler	B_TOOL_TIP_BACKGROUND_COLOR = 20,
3328318af01SAxel Dörfler	B_TOOL_TIP_TEXT_COLOR = 21,
33323ae77aaSAxel Dörfler
33480bc632aSAugustin Cavalier	B_STATUS_BAR_COLOR = 37,
33580bc632aSAugustin Cavalier
336f971378fSejakowatz	B_SUCCESS_COLOR = 100,
337f971378fSejakowatz	B_FAILURE_COLOR = 101,
33823ae77aaSAxel Dörfler
339f971378fSejakowatz	B_WINDOW_TAB_COLOR = 3,
34023ae77aaSAxel Dörfler	B_WINDOW_TEXT_COLOR = 22,
34123ae77aaSAxel Dörfler	B_WINDOW_INACTIVE_TAB_COLOR = 23,
34230d17caaSJohn Scipione	B_WINDOW_INACTIVE_TEXT_COLOR = 24,
34330d17caaSJohn Scipione
34430d17caaSJohn Scipione	B_WINDOW_BORDER_COLOR = 25,
34591c78f09SJohn Scipione	B_WINDOW_INACTIVE_BORDER_COLOR = 26,
34691c78f09SJohn Scipione
34791c78f09SJohn Scipione	// Old name synonyms.
34891c78f09SJohn Scipione	B_KEYBOARD_NAVIGATION_COLOR = B_NAVIGATION_BASE_COLOR,
34991c78f09SJohn Scipione	B_MENU_SELECTION_BACKGROUND_COLOR = B_MENU_SELECTED_BACKGROUND_COLOR,
35091c78f09SJohn Scipione
35133025215SJohn Scipione	// The following constants are deprecated, do not use in new code.
35291c78f09SJohn Scipione	B_DESKTOP_COLOR = 5
35333025215SJohn Scipione		// see BScreen class for B_DESKTOP_COLOR replacement
35452a38012Sejakowatz};
35552a38012Sejakowatz
35652a38012Sejakowatz
357cfc3fa87SAxel Dörfler// Color tinting
358cfc3fa87SAxel Dörfler
359cfc3fa87SAxel Dörflerconst float B_LIGHTEN_MAX_TINT	= 0.0f;		// 216 --> 255.0 (255)
360cfc3fa87SAxel Dörflerconst float B_LIGHTEN_2_TINT	= 0.385f;	// 216 --> 240.0 (240)
361cfc3fa87SAxel Dörflerconst float B_LIGHTEN_1_TINT	= 0.590f;	// 216 --> 232.0 (232)
36252a38012Sejakowatz
363cfc3fa87SAxel Dörflerconst float B_NO_TINT			= 1.0f;		// 216 --> 216.0 (216)
36452a38012Sejakowatz
365cfc3fa87SAxel Dörflerconst float B_DARKEN_1_TINT		= 1.147f;	// 216 --> 184.2 (184)
366cfc3fa87SAxel Dörflerconst float B_DARKEN_2_TINT		= 1.295f;	// 216 --> 152.3 (152)
367cfc3fa87SAxel Dörflerconst float B_DARKEN_3_TINT		= 1.407f;	// 216 --> 128.1 (128)
368cfc3fa87SAxel Dörflerconst float B_DARKEN_4_TINT		= 1.555f;	// 216 -->  96.1  (96)
369cfc3fa87SAxel Dörflerconst float B_DARKEN_MAX_TINT	= 2.0f;		// 216 -->   0.0   (0)
370cfc3fa87SAxel Dörfler											// effects on standard gray level
37152a38012Sejakowatz
37252a38012Sejakowatzconst float B_DISABLED_LABEL_TINT		= B_DARKEN_3_TINT;
37352a38012Sejakowatzconst float B_HIGHLIGHT_BACKGROUND_TINT	= B_DARKEN_2_TINT;
37452a38012Sejakowatzconst float B_DISABLED_MARK_TINT		= B_LIGHTEN_2_TINT;
37552a38012Sejakowatz
376cfc3fa87SAxel Dörfler
3775414b3c4SIngo Weinhold// Icon related constants
3785414b3c4SIngo Weinhold
3795414b3c4SIngo Weinhold// Values for [Set]IconBitmap() of various view classes. Not all types are
3805414b3c4SIngo Weinhold// applicable for all views.
3815414b3c4SIngo Weinholdenum {
3825414b3c4SIngo Weinhold	B_INACTIVE_ICON_BITMAP					= 0x00,
3835414b3c4SIngo Weinhold	B_ACTIVE_ICON_BITMAP					= 0x01,
3845414b3c4SIngo Weinhold	B_PARTIALLY_ACTIVATE_ICON_BITMAP		= 0x02,
3855414b3c4SIngo Weinhold
3865414b3c4SIngo Weinhold	// flag, can be combined with any of the above
3875414b3c4SIngo Weinhold	B_DISABLED_ICON_BITMAP					= 0x80,
3885414b3c4SIngo Weinhold		// disabled version of the specified bitmap
3895414b3c4SIngo Weinhold};
3905414b3c4SIngo Weinhold
3915414b3c4SIngo Weinhold// flags for SetIconBitmap() of various view classes
3925414b3c4SIngo Weinholdenum {
3935414b3c4SIngo Weinhold	B_KEEP_ICON_BITMAP						= 0x0001,
3945414b3c4SIngo Weinhold		// transfer bitmap ownership to the view
3955414b3c4SIngo Weinhold};
3965414b3c4SIngo Weinhold
3975414b3c4SIngo Weinhold// flags for SetIcon() of various view classes
3985414b3c4SIngo Weinholdenum {
3995414b3c4SIngo Weinhold	B_TRIM_ICON_BITMAP						= 0x0100,
4005414b3c4SIngo Weinhold		// crop the bitmap to the not fully transparent area; may change the
4015414b3c4SIngo Weinhold		// icon size
4025414b3c4SIngo Weinhold	B_TRIM_ICON_BITMAP_KEEP_ASPECT			= 0x0200,
4035414b3c4SIngo Weinhold		// like B_TRIM_BITMAP, but keeps the aspect ratio
4045414b3c4SIngo Weinhold	B_CREATE_ACTIVE_ICON_BITMAP				= 0x0400,
4055414b3c4SIngo Weinhold	B_CREATE_PARTIALLY_ACTIVE_ICON_BITMAP	= 0x0800,
4065414b3c4SIngo Weinhold	B_CREATE_DISABLED_ICON_BITMAPS			= 0x1000,
4075414b3c4SIngo Weinhold};
4085414b3c4SIngo Weinhold
4095414b3c4SIngo Weinhold
410cfc3fa87SAxel Dörflerstatus_t		get_deskbar_frame(BRect* frame);
411cfc3fa87SAxel Dörfler
412cfc3fa87SAxel Dörflerconst color_map* system_colors();
413cfc3fa87SAxel Dörfler
414cfc3fa87SAxel Dörflerstatus_t		set_screen_space(int32 index, uint32 resolution,
415cfc3fa87SAxel Dörfler					bool save = true);
416cfc3fa87SAxel Dörfler
417cfc3fa87SAxel Dörflerstatus_t		get_scroll_bar_info(scroll_bar_info* info);
418cfc3fa87SAxel Dörflerstatus_t		set_scroll_bar_info(scroll_bar_info* info);
419cfc3fa87SAxel Dörfler
420cfc3fa87SAxel Dörflerstatus_t		get_mouse_type(int32* type);
421cfc3fa87SAxel Dörflerstatus_t		set_mouse_type(int32 type);
422cfc3fa87SAxel Dörflerstatus_t		get_mouse_map(mouse_map* map);
423cfc3fa87SAxel Dörflerstatus_t		set_mouse_map(mouse_map* map);
424cfc3fa87SAxel Dörflerstatus_t		get_click_speed(bigtime_t* speed);
425cfc3fa87SAxel Dörflerstatus_t		set_click_speed(bigtime_t speed);
426cfc3fa87SAxel Dörflerstatus_t		get_mouse_speed(int32* speed);
427cfc3fa87SAxel Dörflerstatus_t		set_mouse_speed(int32 speed);
428cfc3fa87SAxel Dörflerstatus_t		get_mouse_acceleration(int32* speed);
429cfc3fa87SAxel Dörflerstatus_t		set_mouse_acceleration(int32 speed);
430cfc3fa87SAxel Dörfler
431cfc3fa87SAxel Dörflerstatus_t		get_key_repeat_rate(int32* rate);
432cfc3fa87SAxel Dörflerstatus_t		set_key_repeat_rate(int32 rate);
433cfc3fa87SAxel Dörflerstatus_t		get_key_repeat_delay(bigtime_t* delay);
434cfc3fa87SAxel Dörflerstatus_t		set_key_repeat_delay(bigtime_t delay);
435cfc3fa87SAxel Dörfler
436cfc3fa87SAxel Dörfleruint32			modifiers();
437cfc3fa87SAxel Dörflerstatus_t		get_key_info(key_info* info);
438cfc3fa87SAxel Dörflervoid			get_key_map(key_map** _map, char** _keyBuffer);
439cfc3fa87SAxel Dörflerstatus_t		get_keyboard_id(uint16* _id);
44060581c63SJérôme Duvalstatus_t		get_modifier_key(uint32 modifier, uint32 *key);
441cfc3fa87SAxel Dörflervoid			set_modifier_key(uint32 modifier, uint32 key);
442cfc3fa87SAxel Dörflervoid			set_keyboard_locks(uint32 modifiers);
443cfc3fa87SAxel Dörfler
444cfc3fa87SAxel Dörflerrgb_color		keyboard_navigation_color();
445cfc3fa87SAxel Dörfler
446cfc3fa87SAxel Dörflerint32			count_workspaces();
447cfc3fa87SAxel Dörflervoid			set_workspace_count(int32 count);
448cfc3fa87SAxel Dörflerint32			current_workspace();
449cfc3fa87SAxel Dörflervoid			activate_workspace(int32 workspace);
450cfc3fa87SAxel Dörfler
451cfc3fa87SAxel Dörflerbigtime_t		idle_time();
452cfc3fa87SAxel Dörfler
453cfc3fa87SAxel Dörflervoid			run_select_printer_panel();
454cfc3fa87SAxel Dörflervoid			run_add_printer_panel();
455cfc3fa87SAxel Dörflervoid			run_be_about();
456cfc3fa87SAxel Dörfler
457cfc3fa87SAxel Dörflervoid			set_focus_follows_mouse(bool follow);
458cfc3fa87SAxel Dörflerbool			focus_follows_mouse();
459cfc3fa87SAxel Dörfler
460f7b619c9SKarsten Heimrichvoid			set_mouse_mode(mode_mouse mode);
461f7b619c9SKarsten Heimrichmode_mouse		mouse_mode();
462cfc3fa87SAxel Dörfler
463926e63c8SBrecht Machielsvoid			set_focus_follows_mouse_mode(mode_focus_follows_mouse mode);
464926e63c8SBrecht Machielsmode_focus_follows_mouse	focus_follows_mouse_mode();
465926e63c8SBrecht Machiels
4661c73ffa1SStephan Aßmusstatus_t		get_mouse(BPoint* screenWhere, uint32* buttons);
46733394b85SStephan Aßmusstatus_t		get_mouse_bitmap(BBitmap** bitmap, BPoint* hotspot);
4681c73ffa1SStephan Aßmus
469926e63c8SBrecht Machielsvoid			set_accept_first_click(bool acceptFirstClick);
470926e63c8SBrecht Machielsbool			accept_first_click();
471926e63c8SBrecht Machiels
472cfc3fa87SAxel Dörflerrgb_color		ui_color(color_which which);
4737f9368caSlooncrazconst char*		ui_color_name(color_which which);
4747f9368caSlooncrazcolor_which		which_ui_color(const char* name);
475cfc3fa87SAxel Dörflervoid			set_ui_color(const color_which& which, const rgb_color& color);
4767f9368caSlooncrazvoid			set_ui_colors(const BMessage* colors);
477cfc3fa87SAxel Dörflerrgb_color		tint_color(rgb_color color, float tint);
478cfc3fa87SAxel Dörfler
479cfc3fa87SAxel Dörflerextern "C" status_t _init_interface_kit_();
480cfc3fa87SAxel Dörfler	// for convenience, should be removed including the friend declarations
481cfc3fa87SAxel Dörfler	// in Menu.h, ...
482cfc3fa87SAxel Dörfler
48352a38012Sejakowatz#endif	// _INTERFACE_DEFS_H
484