/** Copyright 2011-2013 Haiku, Inc. All rights reserved.* Distributed under the terms of the MIT License.** Authors:* John Scipione, jscipione@gmail.com** Corresponds to:* headers/os/interface/InterfaceDefs.h hrev45737* src/kits/interface/InterfaceDefs.cpp hrev45737*//*!\file InterfaceDefs.h\ingroup interface\ingroup libbe\brief Defines standard interface definitions for controls.\since BeOS R3*//*!\enum border_style\ingroup interfaceCollection of flags that determine the border style drawn around a BBox.\since BeOS R3*//*!\var border_style B_PLAIN_BORDER\image html B_PLAIN_BORDER.pngThe right and bottom sides of the box are darker than the top andleft sides to produce a shadow effect and make the box look like itis raised slightly above the surrounding surface.\since BeOS R3*//*!\var border_style B_FANCY_BORDER\image html B_FANCY_BORDER.pngThe border is a bevelled to give it a 3D effect. The border is uniformin appearance on all four sides. This is the default appearance.\since BeOS R3*//*!\var border_style B_NO_BORDERNo border.\since BeOS R3*//*!\enum orientationOrientation flag sets the layout to either horizontal or verticalalignment.\since BeOS R3*//*!\var orientation B_HORIZONTALHorizontal alignment\since BeOS R3*//*!\var orientation B_VERTICALVertical alignment\since BeOS R3*//*!\enum button_widthCollection of flags that determine how wide to draw the buttons in aBAlert dialog.\since BeOS R3*//*!\var button_width B_WIDTH_AS_USUALSet the width of each button based on the standard width.\since BeOS R3*//*!\var button_width B_WIDTH_FROM_WIDESTSet the width of each button based on the width of the widest button.\since BeOS R3*//*!\var button_width B_WIDTH_FROM_LABELSet the width of each button to accommodate the label.\since BeOS R5*/// Line join and cap modes/*!\enum join_modePostScript-style line join modes used by BView::SetLineMode()\since BeOS R3*//*!\var join_mode B_ROUND_JOINRound join mode.\since BeOS R3*//*!\var join_mode B_MITER_JOINMiter join mode.\since BeOS R3*//*!\var join_mode B_BEVEL_JOINBevel join mode.\since BeOS R3*//*!\var join_mode B_BUTT_JOINButt join mode.\since BeOS R3*//*!\var join_mode B_SQUARE_JOINSquare join mode.\since BeOS R3*//*!\enum cap_modePostScript-style line cap modes used by BView::SetLineMode()\since BeOS R3*//*!\var cap_mode B_ROUND_CAPRound cap mode.\since BeOS R3*//*!\var cap_mode B_BUTT_CAPButt cap mode.\since BeOS R3*//*!\var cap_mode B_SQUARE_CAPSquare cap mode.\since BeOS R3*//*!\var B_DEFAULT_MITER_LIMITDefault miter limit used to calculate the angle cut off for miter joins.\since BeOS R3*////// Keyboard related functions/*!\fn uint32 modifiers()\brief Gets a bitmap of each modifier key pressed down and each activekeyboard lock.Test the bitmap returned using a bit mask composed of the followingmodifier key constants:- \c B_CAPS_LOCK- \c B_COMMAND_KEY- \c B_CONTROL_KEY- \c B_MENU_KEY- \c B_NUM_LOCK- \c B_OPTION_KEY- \c B_SCROLL_LOCK- \c B_SHIFT_KEYYou may use a bit mask of 0 to test that no modifier keys are pressed.If it is important to know if the left or right modifier key is presseddown you can use the following additional constants:- \c B_LEFT_SHIFT_KEY- \c B_RIGHT_SHIFT_KEY- \c B_LEFT_CONTROL_KEY- \c B_RIGHT_CONTROL_KEY- \c B_LEFT_OPTION_KEY- \c B_RIGHT_OPTION_KEY- \c B_LEFT_COMMAND_KEY- \c B_RIGHT_COMMAND_KEY\returns A bitmap containing each active modifier keys and locks.\since BeOS R3*//*!\fn status_t get_key_info(key_info* info)\brief Fills out the key_info struct with the current state of thekeyboard.\param info The key_info struct to fill out.\retval B_OK Everything went fine.\retval B_ERROR There was an error retrieving the key_info struct.\since BeOS R3*//*!\fn void get_key_map(key_map** _map, char** _keyBuffer)\brief Provides a copy of the system keymap.\attention You must free \a _map and \a _keyBuffer when you are donewith them.\param _map A pointer to the system keymap structure.\param _keyBuffer A pointer containing the UTF-8 character encodings.\since BeOS R3*//*!\fn status_t get_keyboard_id(uint16* _id)\brief Fills out \a _id with the id of the currently attached keyboard.\retval B_OK Everything went fine.\retval B_ERROR There was an error retrieving the keyboard id.\since BeOS R3*//*!\fn status_t get_modifier_key(uint32 modifier, uint32 *key)\brief Gets the code of the requested \a modifier key from thesystem keymap.\param modifier The modifier key to get from the system keymap.\param key A pointer to an int32 to store the key code.\retval B_OK Everything went fine.\retval B_ERROR There was an error retrieving the modifier key.\since BeOS R3*//*!\fn void set_modifier_key(uint32 modifier, uint32 key)\brief Set the \a modifier \a key to the specified code in thesystem keymap.\param modifier The modifier key to set in the system keymap.\param key The key code to set the modifier key to.\since BeOS R3*//*!\fn void set_keyboard_locks(uint32 modifiers)\brief Set the keyboard locks.Pass in a bit mask containing the following constants:- \c B_CAPS_LOCK- \c B_NUM_LOCK- \c B_SCROLL_LOCKThe constants present in the bit mask will turn the lock on, thoseabsent will turn the lock off. Pass 0 in to turn off all locks.\param modifiers A bitmap of lock keys to set.\since BeOS R3*//*!\fn status_t get_mouse_type(int32* type)\brief Get the number of buttons of the mouse.If there are multiple mouses connected, the number of buttons for one ofthem picked at random will be returned.*//*!\fn status_t set_mouse_type(int32 type)\brief Set the number of buttons of the mouse.\deprecated use set_mouse_type_by_name instead.*//*!\fn status_t get_mouse_type_by_name(BString mouse_name, int32* type)\brief Get the number of buttons for a specific mouse.Mouse names can be known from BInputDevice.*//*!\fn status_t set_mouse_type_by_name(BString mouse_name, int32 type)\brief Configure the number of buttons for a specific mouse.The setting is saved and persists accross reboots.*//*!\fn status_t get_mouse_speed(int32* speed)\brief Get the mouse speedIf there are multiple mouses connected, this function return the speedfrom a random one.*//*!\fn status_t set_mouse_speed(int32 speed)\brief Set the mouse speed\deprecated use set_mouse_speed_by_name instead.*//*!\fn status_t get_mouse_speed_by_name(BString mouse_name, int32* speed)\brief Get the mouse speed setting for a specific mouse*//*!\fn status_t set_mouse_speed_by_name(BString mouse_name, int32 speed)\brief Set the mouse speed for a specific mouse.The setting is saved and persists accross reboots.*/