Banjo API 0.0.1
Multi-purpose C99 API
|
Macros | |
#define | BJ_BUTTON_1 1 |
First button. | |
#define | BJ_BUTTON_2 2 |
Second button. | |
#define | BJ_BUTTON_3 3 |
Third button. | |
#define | BJ_BUTTON_4 4 |
Fourth button. | |
#define | BJ_BUTTON_5 5 |
Fifth button. | |
#define | BJ_BUTTON_LEFT BJ_BUTTON_1 |
Left mouse button. | |
#define | BJ_BUTTON_RIGHT BJ_BUTTON_3 |
Right mouse button. | |
#define | BJ_BUTTON_MIDDLE BJ_BUTTON_2 |
Middle mouse button. | |
#define | BJ_BUTTON_UP BJ_BUTTON_4 |
Scroll up mouse button. | |
#define | BJ_BUTTON_DOWN BJ_BUTTON_5 |
Scroll down mouse button. | |
#define | BJ_KEY_APOSTROPHE BJ_KEY_OEM_7 |
Alias for BJ_KEY_OEM_7. | |
#define | BJ_KEY_BACKSLASH BJ_KEY_OEM_5 |
Alias for BJ_KEY_OEM_5. | |
#define | BJ_KEY_BACKSPACE BJ_KEY_BACK |
Alias for BJ_KEY_BACK. | |
#define | BJ_KEY_CAPSLOCK BJ_KEY_CAPITAL |
Alias for BJ_KEY_CAPITAL. | |
#define | BJ_KEY_COMMA BJ_KEY_OEM_COMMA |
Alias for BJ_KEY_OEM_COMMA. | |
#define | BJ_KEY_ENTER BJ_KEY_RETURN |
Alias for BJ_KEY_RETURN. | |
#define | BJ_KEY_GRAVE_ACCENT BJ_KEY_OEM_3 |
Alias for BJ_KEY_OEM_3. | |
#define | BJ_KEY_HANGUL BJ_KEY_KANA |
Alias for BJ_KEY_KANA. | |
#define | BJ_KEY_HANJA BJ_KEY_KANJI |
Alias for BJ_KEY_KANJI. | |
#define | BJ_KEY_LEFT_ALT BJ_KEY_LMENU |
Alias for BJ_KEY_LMENU. | |
#define | BJ_KEY_LEFT_BRACKET BJ_KEY_OEM_4 |
Alias for BJ_KEY_OEM_4. | |
#define | BJ_KEY_LEFT_CONTROL BJ_KEY_LCONTROL |
Alias for BJ_KEY_LCONTROL. | |
#define | BJ_KEY_LEFT_OS BJ_KEY_LWIN |
Alias for BJ_KEY_LWIN. | |
#define | BJ_KEY_LEFT_SHIT BJ_KEY_LSHIFT |
Alias for BJ_KEY_LSHIFT. | |
#define | BJ_KEY_MINUS BJ_KEY_OEM_MINUS |
Alias for BJ_KEY_OEM_MINUS. | |
#define | BJ_KEY_PAGE_DOWN BJ_KEY_NEXT |
Alias for BJ_KEY_NEXT. | |
#define | BJ_KEY_PAGE_UP BJ_KEY_PRIOR |
Alias for BJ_KEY_PRIOR. | |
#define | BJ_KEY_PERIOD BJ_KEY_OEM_PERIOD |
Alias for BJ_KEY_OEM_PERIOD. | |
#define | BJ_KEY_PLUS BJ_KEY_OEM_PLUS |
Alias for BJ_KEY_OEM_PLUS. | |
#define | BJ_KEY_PRINT_SCREEN BJ_KEY_SNAPSHOT |
Alias for BJ_KEY_SNAPSHOT. | |
#define | BJ_KEY_RIGHT_ALT BJ_KEY_RMENU |
Alias for BJ_KEY_RMENU. | |
#define | BJ_KEY_RIGHT_BRACKET BJ_KEY_OEM_6 |
Alias for BJ_KEY_OEM_6. | |
#define | BJ_KEY_RIGHT_CONTROL BJ_KEY_RCONTROL |
Alias for BJ_KEY_RCONTROL. | |
#define | BJ_KEY_RIGHT_OS BJ_KEY_RWIN |
Alias for BJ_KEY_RWIN. | |
#define | BJ_KEY_RIGHT_SHIFT BJ_KEY_RSHIFT |
Alias for BJ_KEY_RSHIFT. | |
#define | BJ_KEY_SEMICOLON BJ_KEY_OEM_1 |
Alias for BJ_KEY_OEM_1. | |
#define | BJ_KEY_SLASH BJ_KEY_OEM_2 |
Alias for BJ_KEY_OEM_2. | |
Typedefs | |
typedef enum bj_event_action_t | bj_event_action |
Event action type enumeration. | |
typedef enum bj_key_t | bj_key |
List of possible keys on a keyboard. | |
Functions | |
const char * | bj_get_key_name (int key) |
Get a C-String representation of a key. | |
typedef enum bj_event_action_t bj_event_action |
Used in key and button events to identify the action type.
The values are directly taken from the [VK codes in Microsoft API] (https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) This also includes the annotated documentation of each key.
Even if all values from the abovementioned page are present in this enum, not all are used by Banjo and some are never returned by key events.
Values for 0-9 and A-Z keys directly directly correspond to their ASCII equivalent.
enum bj_event_action_t |
enum bj_key_t |
The values are directly taken from the [VK codes in Microsoft API] (https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) This also includes the annotated documentation of each key.
Even if all values from the abovementioned page are present in this enum, not all are used by Banjo and some are never returned by key events.
Values for 0-9 and A-Z keys directly directly correspond to their ASCII equivalent.
const char * bj_get_key_name | ( | int | key | ) |
This function returns a C-String representing the given bj_key value. The returned value corresponds to the enum name without the BJ_KEY_
prefix.
key | The bj_key to get the name from. |
Banjo is responsible for the memory pointed by to the returned value.