carb package

carb.log_error(msg)
carb.log_info(msg)
carb.log_verbose(msg)
carb.log_warn(msg)
class carb._carb.ColorRgb
property b
property g
property r
class carb._carb.ColorRgbDouble
property b
property g
property r
class carb._carb.ColorRgba
property a
property b
property g
property r
class carb._carb.ColorRgbaDouble
property a
property b
property g
property r
class carb._carb.Double2
property x
property y
class carb._carb.Double3
property x
property y
property z
class carb._carb.Double4
property w
property x
property y
property z
class carb._carb.Float2

Pair of floating point values. These can be accessed via the named attributes, x & y, but also support sequence access, making them work where a list or tuple is expected.

>>> f = carb.Float2(1.0, 2.0)
>>> f[0]
1.0
>>> f.y
2.0
property x
property y
class carb._carb.Float3

A triplet of floating point values. These can be accessed via the named attributes, x, y & z, but also support sequence access, making them work where a list or tuple is expected.

>>> v = [1, 2, 3]
f = carb.Float3(v)
>>> f[0]
1.0
>>> f.y
2.0
>>> f[2]
3.0
property x
property y
property z
class carb._carb.Float4

A quadruplet of floating point values. These can be accessed via the named attributes, x, y, z & w, but also support sequence access, making them work where a list or tuple is expected.

>>> v = [1, 2, 3, 4]
f = carb.Float4(v)
>>> f[0]
1.0
>>> f.y
2.0
>>> f[2]
3.0
>>> f.w
4.0
property w
property x
property y
property z
class carb._carb.Framework
get_plugins(self: carb._carb.Framework) List[carb._carb.PluginDesc]
load_plugins(self: carb._carb.Framework, loaded_file_wildcards: List[str] = [], search_paths: List[str] = []) None
startup(self: carb._carb.Framework, argv: List[str] = [], config: str = None, initial_plugins_search_paths: List[str] = [], config_format: str = 'toml') None
try_reload_plugins(self: carb._carb.Framework) None
unload_all_plugins(self: carb._carb.Framework) None
class carb._carb.Int2
property x
property y
class carb._carb.Int3
property x
property y
property z
class carb._carb.Int4
property w
property x
property y
property z
class carb._carb.InterfaceDesc
property name
property version
class carb._carb.PluginDesc
property dependencies
property impl
property interfaces
property libPath
class carb._carb.PluginHotReload

Members:

DISABLED

ENABLED

DISABLED = <PluginHotReload.DISABLED: 0>
ENABLED = <PluginHotReload.ENABLED: 1>
property name
property value
class carb._carb.PluginImplDesc
property author
property build
property description
property hotReload
property name
class carb._carb.Subscription

Subscription holder.

This object is returned by different subscription functions. Subscription lifetime is associated with this object. You can it while you need subscribed callback to be called. Then you can explicitly make it equal to None or call unsubscribe method or del it to unsubscribe.

Quite common patter of usage is when you have a class which subscribes to various callbacks and you want to subscription to stay valid while class instance is alive.

class Foo:
    def __init__(self):
        events = carb.events.get_events_interface()
        stream = events.create_event_stream()
        self._event_sub = stream.subscribe_to_pop(0, self._on_event)

    def _on_event(self, e):
        print(f'event {e}')
>>> f = Foo()
>>> # f receives some events
>>> f._event_sub = None
>>> f = None
unsubscribe(self: carb._carb.Subscription) None
class carb._carb.Uint2
property x
property y
class carb._carb.Uint3
property x
property y
property z
class carb._carb.Uint4
property w
property x
property y
property z
class carb._carb.Version
property major
property minor
carb._carb.answer_question(question: str) str

This function can answer some questions.

It currently only answers a limited set of questions so don’t expect it to know everything.

Parameters

question – The question passed to the function, trailing question mark is not necessary and casing is not important.

Returns

The answer to the question or empty string if it doesn’t know the answer.

carb._carb.get_framework() carb::Framework
carb._carb.log(source: str, level: int, fileName: str, functionName: str, lineNumber: int, message: str) None
class carb._carb.logging.ILogging
add_logger(self: carb._carb.logging.ILogging, arg0: Callable[[str, int, str, int, str], None]) carb._carb.logging.LoggerHandle
get_level_threshold(self: carb._carb.logging.ILogging) int
is_log_enabled(self: carb._carb.logging.ILogging) bool
remove_logger(self: carb._carb.logging.ILogging, arg0: carb._carb.logging.LoggerHandle) None
reset(self: carb._carb.logging.ILogging) None
set_level_threshold(self: carb._carb.logging.ILogging, arg0: int) None
set_level_threshold_for_source(self: carb._carb.logging.ILogging, arg0: str, arg1: carb._carb.logging.LogSettingBehavior, arg2: int) None
set_log_enabled(self: carb._carb.logging.ILogging, arg0: bool) None
set_log_enabled_for_source(self: carb._carb.logging.ILogging, arg0: str, arg1: carb._carb.logging.LogSettingBehavior, arg2: bool) None
class carb._carb.logging.LogSettingBehavior

Members:

INHERIT

OVERRIDE

INHERIT = <LogSettingBehavior.INHERIT: 0>
OVERRIDE = <LogSettingBehavior.OVERRIDE: 1>
property name
property value
class carb._carb.logging.LoggerHandle
carb._carb.logging.acquire_logging(plugin_name: str = None, library_path: str = None) carb._carb.logging.ILogging
class carb._carb.filesystem.DirectoryItemType

Members:

FILE

DIRECTORY

DIRECTORY = <DirectoryItemType.DIRECTORY: 1>
FILE = <DirectoryItemType.FILE: 0>
property name
property value
class carb._carb.filesystem.File
class carb._carb.filesystem.IFileSystem
close_file(self: carb._carb.filesystem.IFileSystem, arg0: carb._carb.filesystem.File) None
copy(self: carb._carb.filesystem.IFileSystem, arg0: str, arg1: str) bool
exists(self: carb._carb.filesystem.IFileSystem, arg0: str) bool
flush_file(self: carb._carb.filesystem.IFileSystem, arg0: carb._carb.filesystem.File) None
get_app_directory_path(self: carb._carb.filesystem.IFileSystem) str
get_current_directory_path(self: carb._carb.filesystem.IFileSystem) str
get_file_size(self: carb._carb.filesystem.IFileSystem, arg0: carb._carb.filesystem.File) int
get_mod_time(self: carb._carb.filesystem.IFileSystem, arg0: str) int
is_directory(self: carb._carb.filesystem.IFileSystem, arg0: str) bool
make_directory(self: carb._carb.filesystem.IFileSystem, arg0: str) bool
make_temp_directory(self: carb._carb.filesystem.IFileSystem) object
open_file_to_append(self: carb._carb.filesystem.IFileSystem, arg0: str) carb._carb.filesystem.File
open_file_to_read(self: carb._carb.filesystem.IFileSystem, arg0: str) carb._carb.filesystem.File
open_file_to_write(self: carb._carb.filesystem.IFileSystem, arg0: str) carb._carb.filesystem.File
remove_directory(self: carb._carb.filesystem.IFileSystem, arg0: str) bool
set_app_directory_path(self: carb._carb.filesystem.IFileSystem, arg0: str) None
set_current_directory_path(self: carb._carb.filesystem.IFileSystem, arg0: str) bool
carb._carb.filesystem.acquire_filesystem(plugin_name: str = None, library_path: str = None) carb._carb.filesystem.IFileSystem

carb.dictionary

carb.dictionary.get_dictionary() carb.dictionary._dictionary.IDictionary

Returns cached carb.dictionary.IDictionary interface (shorthand).

carb.dictionary.get_dictionary_interface() carb.dictionary._dictionary.IDictionary

Returns cached carb.dictionary.IDictionary interface

carb.input

pybind11 carb.input bindings

class carb.input.ActionEvent
property action
property flags
property value
class carb.input.ActionMappingDesc
property device
property deviceType
property input
property modifiers
class carb.input.ActionMappingSet
class carb.input.DeviceType

Members:

KEYBOARD

MOUSE

GAMEPAD

GAMEPAD = <DeviceType.GAMEPAD: 2>
KEYBOARD = <DeviceType.KEYBOARD: 0>
MOUSE = <DeviceType.MOUSE: 1>
property name
property value
class carb.input.EventType

Members:

UNKNOWN

UNKNOWN = <EventType.UNKNOWN: 0>
property name
property value
class carb.input.Gamepad
class carb.input.GamepadConnectionEvent
property device
property gamepad
property type
class carb.input.GamepadConnectionEventType

Members:

CREATED

CONNECTED

DISCONNECTED

DESTROYED

CONNECTED = <GamepadConnectionEventType.CONNECTED: 1>
CREATED = <GamepadConnectionEventType.CREATED: 0>
DESTROYED = <GamepadConnectionEventType.DESTROYED: 3>
DISCONNECTED = <GamepadConnectionEventType.DISCONNECTED: 2>
property name
property value
class carb.input.GamepadEvent
property device
property gamepad
property input
property value
class carb.input.GamepadInput

Members:

LEFT_STICK_RIGHT

LEFT_STICK_LEFT

LEFT_STICK_UP

LEFT_STICK_DOWN

RIGHT_STICK_RIGHT

RIGHT_STICK_LEFT

RIGHT_STICK_UP

RIGHT_STICK_DOWN

LEFT_TRIGGER

RIGHT_TRIGGER

A

B

X

Y

LEFT_SHOULDER

RIGHT_SHOULDER

MENU1

MENU2

LEFT_STICK

RIGHT_STICK

DPAD_UP

DPAD_RIGHT

DPAD_DOWN

DPAD_LEFT

COUNT

A = <GamepadInput.A: 10>
B = <GamepadInput.B: 11>
COUNT = <GamepadInput.COUNT: 24>
DPAD_DOWN = <GamepadInput.DPAD_DOWN: 22>
DPAD_LEFT = <GamepadInput.DPAD_LEFT: 23>
DPAD_RIGHT = <GamepadInput.DPAD_RIGHT: 21>
DPAD_UP = <GamepadInput.DPAD_UP: 20>
LEFT_SHOULDER = <GamepadInput.LEFT_SHOULDER: 14>
LEFT_STICK = <GamepadInput.LEFT_STICK: 18>
LEFT_STICK_DOWN = <GamepadInput.LEFT_STICK_DOWN: 3>
LEFT_STICK_LEFT = <GamepadInput.LEFT_STICK_LEFT: 1>
LEFT_STICK_RIGHT = <GamepadInput.LEFT_STICK_RIGHT: 0>
LEFT_STICK_UP = <GamepadInput.LEFT_STICK_UP: 2>
LEFT_TRIGGER = <GamepadInput.LEFT_TRIGGER: 8>
MENU1 = <GamepadInput.MENU1: 16>
MENU2 = <GamepadInput.MENU2: 17>
RIGHT_SHOULDER = <GamepadInput.RIGHT_SHOULDER: 15>
RIGHT_STICK = <GamepadInput.RIGHT_STICK: 19>
RIGHT_STICK_DOWN = <GamepadInput.RIGHT_STICK_DOWN: 7>
RIGHT_STICK_LEFT = <GamepadInput.RIGHT_STICK_LEFT: 5>
RIGHT_STICK_RIGHT = <GamepadInput.RIGHT_STICK_RIGHT: 4>
RIGHT_STICK_UP = <GamepadInput.RIGHT_STICK_UP: 6>
RIGHT_TRIGGER = <GamepadInput.RIGHT_TRIGGER: 9>
X = <GamepadInput.X: 12>
Y = <GamepadInput.Y: 13>
property name
property value
class carb.input.IInput
add_action_mapping(*args, **kwargs)

Overloaded function.

  1. add_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Keyboard, arg3: carb.input.KeyboardInput, arg4: int) -> int

  2. add_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Gamepad, arg3: carb.input.GamepadInput) -> int

  3. add_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Mouse, arg3: carb.input.MouseInput, arg4: int) -> int

clear_action_mappings(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) None
get_action_button_flags(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) int
get_action_mapping_count(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) int
get_action_mapping_set_by_path(self: carb.input.IInput, arg0: str) carb.input.ActionMappingSet
get_action_mappings(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) List[carb.input.ActionMappingDesc]
get_action_value(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str) float
get_actions(self: carb.input.IInput, arg0: carb.input.ActionMappingSet) List[str]
get_device_name(self: carb.input.IInput, arg0: carb.input.InputDevice) str
get_device_type(self: carb.input.IInput, arg0: carb.input.InputDevice) carb.input.DeviceType
get_gamepad_button_flags(self: carb.input.IInput, arg0: carb.input.Gamepad, arg1: carb.input.GamepadInput) int
get_gamepad_guid(self: carb.input.IInput, arg0: carb.input.Gamepad) str
get_gamepad_name(self: carb.input.IInput, arg0: carb.input.Gamepad) str
get_gamepad_value(self: carb.input.IInput, arg0: carb.input.Gamepad, arg1: carb.input.GamepadInput) float
get_global_modifier_flags(self: carb.input.IInput, modifiers: int = 0, mouse_buttons: List[carb.input.MouseInput] = []) int
get_keyboard_button_flags(self: carb.input.IInput, arg0: carb.input.Keyboard, arg1: carb.input.KeyboardInput) int
get_keyboard_name(self: carb.input.IInput, arg0: carb.input.Keyboard) str
get_keyboard_value(self: carb.input.IInput, arg0: carb.input.Keyboard, arg1: carb.input.KeyboardInput) float
get_modifier_flags(self: carb.input.IInput, modifiers: int = 0, input_devices: List[carb.input.InputDevice] = [], device_types: List[carb.input.DeviceType] = [], mouse_buttons: List[carb.input.MouseInput] = []) int
get_mouse_button_flags(self: carb.input.IInput, arg0: carb.input.Mouse, arg1: carb.input.MouseInput) int
get_mouse_coords_normalized(self: carb.input.IInput, arg0: carb.input.Mouse) carb._carb.Float2
get_mouse_coords_pixel(self: carb.input.IInput, arg0: carb.input.Mouse) carb._carb.Float2
get_mouse_name(self: carb.input.IInput, arg0: carb.input.Mouse) str
get_mouse_value(self: carb.input.IInput, arg0: carb.input.Mouse, arg1: carb.input.MouseInput) float
remove_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: int) None
set_action_mapping(*args, **kwargs)

Overloaded function.

  1. set_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: int, arg3: carb.input.Keyboard, arg4: carb.input.KeyboardInput, arg5: int) -> None

  2. set_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: int, arg3: carb.input.Gamepad, arg4: carb.input.GamepadInput) -> None

  3. set_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: int, arg3: carb.input.Mouse, arg4: carb.input.MouseInput, arg5: int) -> None

set_default_action_mapping(*args, **kwargs)

Overloaded function.

  1. set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Keyboard, arg3: carb.input.KeyboardInput, arg4: int) -> bool

  2. set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Gamepad, arg3: carb.input.GamepadInput) -> bool

  3. set_default_action_mapping(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: carb.input.Mouse, arg3: carb.input.MouseInput, arg4: int) -> bool

subscribe_to_action_events(self: carb.input.IInput, arg0: carb.input.ActionMappingSet, arg1: str, arg2: Callable[[carb.input.ActionEvent], bool]) int
subscribe_to_gamepad_connection_events(self: carb.input.IInput, arg0: Callable[[carb.input.GamepadConnectionEvent], None]) int
subscribe_to_gamepad_events(self: carb.input.IInput, arg0: carb.input.Gamepad, arg1: Callable[[carb.input.GamepadEvent], bool]) int
subscribe_to_input_events(self: carb.input.IInput, eventFn: Callable[[carb.input.InputEvent], bool], eventTypes: int = 4294967295, device: carb.input.InputDevice = None, order: int = - 1) int
subscribe_to_keyboard_events(self: carb.input.IInput, arg0: carb.input.Keyboard, arg1: Callable[[carb.input.KeyboardEvent], bool]) int
subscribe_to_mouse_events(self: carb.input.IInput, arg0: carb.input.Mouse, arg1: Callable[[carb.input.MouseEvent], bool]) int
unsubscribe_to_action_events(self: carb.input.IInput, arg0: int) None
unsubscribe_to_gamepad_connection_events(self: carb.input.IInput, arg0: int) None
unsubscribe_to_gamepad_events(self: carb.input.IInput, arg0: carb.input.Gamepad, arg1: int) None
unsubscribe_to_input_events(self: carb.input.IInput, arg0: int) None
unsubscribe_to_keyboard_events(self: carb.input.IInput, arg0: carb.input.Keyboard, arg1: int) None
unsubscribe_to_mouse_events(self: carb.input.IInput, arg0: carb.input.Mouse, arg1: int) None
class carb.input.InputDevice
class carb.input.InputEvent
property device
property deviceType
property event
class carb.input.InputProvider
buffer_gamepad_event(self: carb.input.InputProvider, arg0: carb.input.Gamepad, arg1: carb.input.GamepadInput, arg2: float) None
buffer_keyboard_char_event(self: carb.input.InputProvider, arg0: carb.input.Keyboard, arg1: str, arg2: int) None
buffer_keyboard_key_event(self: carb.input.InputProvider, arg0: carb.input.Keyboard, arg1: carb.input.KeyboardEventType, arg2: carb.input.KeyboardInput, arg3: int) None
buffer_mouse_event(self: carb.input.InputProvider, arg0: carb.input.Mouse, arg1: carb.input.MouseEventType, arg2: carb._carb.Float2, arg3: int, arg4: carb._carb.Float2) None
create_gamepad(self: carb.input.InputProvider, arg0: str, arg1: str) carb.input.Gamepad
create_keyboard(self: carb.input.InputProvider, arg0: str) carb.input.Keyboard
create_mouse(self: carb.input.InputProvider, arg0: str) carb.input.Mouse
destroy_gamepad(self: carb.input.InputProvider, arg0: carb.input.Gamepad) None
destroy_keyboard(self: carb.input.InputProvider, arg0: carb.input.Keyboard) None
destroy_mouse(self: carb.input.InputProvider, arg0: carb.input.Mouse) None
set_gamepad_connected(self: carb.input.InputProvider, arg0: carb.input.Gamepad, arg1: bool) None
update_gamepad(self: carb.input.InputProvider, arg0: carb.input.Gamepad) None
update_keyboard(self: carb.input.InputProvider, arg0: carb.input.Keyboard) None
update_mouse(self: carb.input.InputProvider, arg0: carb.input.Mouse) None
class carb.input.Keyboard
class carb.input.KeyboardEvent
property device
property input
property keyboard
property modifiers
property type
class carb.input.KeyboardEventType

Members:

KEY_PRESS

KEY_REPEAT

KEY_RELEASE

CHAR

CHAR = <KeyboardEventType.CHAR: 3>
KEY_PRESS = <KeyboardEventType.KEY_PRESS: 0>
KEY_RELEASE = <KeyboardEventType.KEY_RELEASE: 2>
KEY_REPEAT = <KeyboardEventType.KEY_REPEAT: 1>
property name
property value
class carb.input.KeyboardInput

Members:

UNKNOWN

SPACE

APOSTROPHE

COMMA

MINUS

PERIOD

SLASH

KEY_0

KEY_1

KEY_2

KEY_3

KEY_4

KEY_5

KEY_6

KEY_7

KEY_8

KEY_9

SEMICOLON

EQUAL

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

LEFT_BRACKET

BACKSLASH

RIGHT_BRACKET

GRAVE_ACCENT

ESCAPE

TAB

ENTER

BACKSPACE

INSERT

DEL

RIGHT

LEFT

DOWN

UP

PAGE_UP

PAGE_DOWN

HOME

END

CAPS_LOCK

SCROLL_LOCK

NUM_LOCK

PRINT_SCREEN

PAUSE

F1

F2

F3

F4

F5

F6

F7

F8

F9

F10

F11

F12

NUMPAD_0

NUMPAD_1

NUMPAD_2

NUMPAD_3

NUMPAD_4

NUMPAD_5

NUMPAD_6

NUMPAD_7

NUMPAD_8

NUMPAD_9

NUMPAD_DEL

NUMPAD_DIVIDE

NUMPAD_MULTIPLY

NUMPAD_SUBTRACT

NUMPAD_ADD

NUMPAD_ENTER

NUMPAD_EQUAL

LEFT_SHIFT

LEFT_CONTROL

LEFT_ALT

LEFT_SUPER

RIGHT_SHIFT

RIGHT_CONTROL

RIGHT_ALT

RIGHT_SUPER

MENU

COUNT

A = <KeyboardInput.A: 19>
APOSTROPHE = <KeyboardInput.APOSTROPHE: 2>
B = <KeyboardInput.B: 20>
BACKSLASH = <KeyboardInput.BACKSLASH: 46>
BACKSPACE = <KeyboardInput.BACKSPACE: 52>
C = <KeyboardInput.C: 21>
CAPS_LOCK = <KeyboardInput.CAPS_LOCK: 63>
COMMA = <KeyboardInput.COMMA: 3>
COUNT = <KeyboardInput.COUNT: 106>
D = <KeyboardInput.D: 22>
DEL = <KeyboardInput.DEL: 54>
DOWN = <KeyboardInput.DOWN: 57>
E = <KeyboardInput.E: 23>
END = <KeyboardInput.END: 62>
ENTER = <KeyboardInput.ENTER: 51>
EQUAL = <KeyboardInput.EQUAL: 18>
ESCAPE = <KeyboardInput.ESCAPE: 49>
F = <KeyboardInput.F: 24>
F1 = <KeyboardInput.F1: 68>
F10 = <KeyboardInput.F10: 77>
F11 = <KeyboardInput.F11: 78>
F12 = <KeyboardInput.F12: 79>
F2 = <KeyboardInput.F2: 69>
F3 = <KeyboardInput.F3: 70>
F4 = <KeyboardInput.F4: 71>
F5 = <KeyboardInput.F5: 72>
F6 = <KeyboardInput.F6: 73>
F7 = <KeyboardInput.F7: 74>
F8 = <KeyboardInput.F8: 75>
F9 = <KeyboardInput.F9: 76>
G = <KeyboardInput.G: 25>
GRAVE_ACCENT = <KeyboardInput.GRAVE_ACCENT: 48>
H = <KeyboardInput.H: 26>
HOME = <KeyboardInput.HOME: 61>
I = <KeyboardInput.I: 27>
INSERT = <KeyboardInput.INSERT: 53>
J = <KeyboardInput.J: 28>
K = <KeyboardInput.K: 29>
KEY_0 = <KeyboardInput.KEY_0: 7>
KEY_1 = <KeyboardInput.KEY_1: 8>
KEY_2 = <KeyboardInput.KEY_2: 9>
KEY_3 = <KeyboardInput.KEY_3: 10>
KEY_4 = <KeyboardInput.KEY_4: 11>
KEY_5 = <KeyboardInput.KEY_5: 12>
KEY_6 = <KeyboardInput.KEY_6: 13>
KEY_7 = <KeyboardInput.KEY_7: 14>
KEY_8 = <KeyboardInput.KEY_8: 15>
KEY_9 = <KeyboardInput.KEY_9: 16>
L = <KeyboardInput.L: 30>
LEFT = <KeyboardInput.LEFT: 56>
LEFT_ALT = <KeyboardInput.LEFT_ALT: 99>
LEFT_BRACKET = <KeyboardInput.LEFT_BRACKET: 45>
LEFT_CONTROL = <KeyboardInput.LEFT_CONTROL: 98>
LEFT_SHIFT = <KeyboardInput.LEFT_SHIFT: 97>
LEFT_SUPER = <KeyboardInput.LEFT_SUPER: 100>
M = <KeyboardInput.M: 31>
MENU = <KeyboardInput.MENU: 105>
MINUS = <KeyboardInput.MINUS: 4>
N = <KeyboardInput.N: 32>
NUMPAD_0 = <KeyboardInput.NUMPAD_0: 80>
NUMPAD_1 = <KeyboardInput.NUMPAD_1: 81>
NUMPAD_2 = <KeyboardInput.NUMPAD_2: 82>
NUMPAD_3 = <KeyboardInput.NUMPAD_3: 83>
NUMPAD_4 = <KeyboardInput.NUMPAD_4: 84>
NUMPAD_5 = <KeyboardInput.NUMPAD_5: 85>
NUMPAD_6 = <KeyboardInput.NUMPAD_6: 86>
NUMPAD_7 = <KeyboardInput.NUMPAD_7: 87>
NUMPAD_8 = <KeyboardInput.NUMPAD_8: 88>
NUMPAD_9 = <KeyboardInput.NUMPAD_9: 89>
NUMPAD_ADD = <KeyboardInput.NUMPAD_ADD: 94>
NUMPAD_DEL = <KeyboardInput.NUMPAD_DEL: 90>
NUMPAD_DIVIDE = <KeyboardInput.NUMPAD_DIVIDE: 91>
NUMPAD_ENTER = <KeyboardInput.NUMPAD_ENTER: 95>
NUMPAD_EQUAL = <KeyboardInput.NUMPAD_EQUAL: 96>
NUMPAD_MULTIPLY = <KeyboardInput.NUMPAD_MULTIPLY: 92>
NUMPAD_SUBTRACT = <KeyboardInput.NUMPAD_SUBTRACT: 93>
NUM_LOCK = <KeyboardInput.NUM_LOCK: 65>
O = <KeyboardInput.O: 33>
P = <KeyboardInput.P: 34>
PAGE_DOWN = <KeyboardInput.PAGE_DOWN: 60>
PAGE_UP = <KeyboardInput.PAGE_UP: 59>
PAUSE = <KeyboardInput.PAUSE: 67>
PERIOD = <KeyboardInput.PERIOD: 5>
PRINT_SCREEN = <KeyboardInput.PRINT_SCREEN: 66>
Q = <KeyboardInput.Q: 35>
R = <KeyboardInput.R: 36>
RIGHT = <KeyboardInput.RIGHT: 55>
RIGHT_ALT = <KeyboardInput.RIGHT_ALT: 103>
RIGHT_BRACKET = <KeyboardInput.RIGHT_BRACKET: 47>
RIGHT_CONTROL = <KeyboardInput.RIGHT_CONTROL: 102>
RIGHT_SHIFT = <KeyboardInput.RIGHT_SHIFT: 101>
RIGHT_SUPER = <KeyboardInput.RIGHT_SUPER: 104>
S = <KeyboardInput.S: 37>
SCROLL_LOCK = <KeyboardInput.SCROLL_LOCK: 64>
SEMICOLON = <KeyboardInput.SEMICOLON: 17>
SLASH = <KeyboardInput.SLASH: 6>
SPACE = <KeyboardInput.SPACE: 1>
T = <KeyboardInput.T: 38>
TAB = <KeyboardInput.TAB: 50>
U = <KeyboardInput.U: 39>
UNKNOWN = <KeyboardInput.UNKNOWN: 0>
UP = <KeyboardInput.UP: 58>
V = <KeyboardInput.V: 40>
W = <KeyboardInput.W: 41>
X = <KeyboardInput.X: 42>
Y = <KeyboardInput.Y: 43>
Z = <KeyboardInput.Z: 44>
property name
property value
class carb.input.Mouse
class carb.input.MouseEvent
property device
property modifiers
property mouse
property normalized_coords
property pixel_coords
property scrollDelta
property type
class carb.input.MouseEventType

Members:

LEFT_BUTTON_DOWN

LEFT_BUTTON_UP

MIDDLE_BUTTON_DOWN

MIDDLE_BUTTON_UP

RIGHT_BUTTON_DOWN

RIGHT_BUTTON_UP

MOVE

SCROLL

LEFT_BUTTON_DOWN = <MouseEventType.LEFT_BUTTON_DOWN: 0>
LEFT_BUTTON_UP = <MouseEventType.LEFT_BUTTON_UP: 1>
MIDDLE_BUTTON_DOWN = <MouseEventType.MIDDLE_BUTTON_DOWN: 2>
MIDDLE_BUTTON_UP = <MouseEventType.MIDDLE_BUTTON_UP: 3>
MOVE = <MouseEventType.MOVE: 6>
RIGHT_BUTTON_DOWN = <MouseEventType.RIGHT_BUTTON_DOWN: 4>
RIGHT_BUTTON_UP = <MouseEventType.RIGHT_BUTTON_UP: 5>
SCROLL = <MouseEventType.SCROLL: 7>
property name
property value
class carb.input.MouseInput

Members:

LEFT_BUTTON

RIGHT_BUTTON

MIDDLE_BUTTON

FORWARD_BUTTON

BACK_BUTTON

SCROLL_RIGHT

SCROLL_LEFT

SCROLL_UP

SCROLL_DOWN

MOVE_RIGHT

MOVE_LEFT

MOVE_UP

MOVE_DOWN

COUNT

BACK_BUTTON = <MouseInput.BACK_BUTTON: 4>
COUNT = <MouseInput.COUNT: 13>
FORWARD_BUTTON = <MouseInput.FORWARD_BUTTON: 3>
LEFT_BUTTON = <MouseInput.LEFT_BUTTON: 0>
MIDDLE_BUTTON = <MouseInput.MIDDLE_BUTTON: 2>
MOVE_DOWN = <MouseInput.MOVE_DOWN: 12>
MOVE_LEFT = <MouseInput.MOVE_LEFT: 10>
MOVE_RIGHT = <MouseInput.MOVE_RIGHT: 9>
MOVE_UP = <MouseInput.MOVE_UP: 11>
RIGHT_BUTTON = <MouseInput.RIGHT_BUTTON: 1>
SCROLL_DOWN = <MouseInput.SCROLL_DOWN: 8>
SCROLL_LEFT = <MouseInput.SCROLL_LEFT: 6>
SCROLL_RIGHT = <MouseInput.SCROLL_RIGHT: 5>
SCROLL_UP = <MouseInput.SCROLL_UP: 7>
property name
property value
carb.input.acquire_input_interface(plugin_name: str = None, library_path: str = None) carb.input.IInput
carb.input.acquire_input_provider(plugin_name: str = None, library_path: str = None) carb::input::InputProvider
carb.input.get_action_mapping_desc_from_string(arg0: str) tuple
carb.input.get_string_from_action_mapping_desc(*args, **kwargs)

Overloaded function.

  1. get_string_from_action_mapping_desc(arg0: carb.input.KeyboardInput, arg1: int) -> str

  2. get_string_from_action_mapping_desc(arg0: carb.input.MouseInput, arg1: int) -> str

  3. get_string_from_action_mapping_desc(arg0: carb.input.GamepadInput) -> str

carb.settings

carb.settings.get_settings() carb.settings._settings.ISettings

Returns cached carb.settings.ISettings interface (shorthand).

carb.settings.get_settings_interface() carb.settings._settings.ISettings

Returns cached carb.settings.ISettings interface

carb.windowing

pybind11 carb.windowing bindings

class carb.windowing.Cursor
class carb.windowing.CursorMode

Members:

NORMAL

HIDDEN

DISABLED

DISABLED = <CursorMode.DISABLED: 2>
HIDDEN = <CursorMode.HIDDEN: 1>
NORMAL = <CursorMode.NORMAL: 0>
property name
property value
class carb.windowing.CursorStandardShape

Members:

ARROW

IBEAM

CROSSHAIR

HAND

HORIZONTAL_RESIZE

VERTICAL_RESIZE

ARROW = <CursorStandardShape.ARROW: 0>
CROSSHAIR = <CursorStandardShape.CROSSHAIR: 2>
HAND = <CursorStandardShape.HAND: 3>
HORIZONTAL_RESIZE = <CursorStandardShape.HORIZONTAL_RESIZE: 4>
IBEAM = <CursorStandardShape.IBEAM: 1>
VERTICAL_RESIZE = <CursorStandardShape.VERTICAL_RESIZE: 5>
property name
property value
class carb.windowing.GLContext
class carb.windowing.IGLContext
create_context_opengl(self: carb.windowing.IGLContext, width: int, height: int) carb.windowing.GLContext
create_context_opengles(self: carb.windowing.IGLContext, width: int, height: int) carb.windowing.GLContext
destroy_context(self: carb.windowing.IGLContext, arg0: carb.windowing.GLContext) None
make_context_current(self: carb.windowing.IGLContext, arg0: carb.windowing.GLContext) None
class carb.windowing.IWindowing
create_cursor(self: carb.windowing.IWindowing, arg0: carb.windowing.Image, arg1: int, arg2: int) carb.windowing.Cursor
create_cursor_standard(self: carb.windowing.IWindowing, arg0: carb.windowing.CursorStandardShape) carb.windowing.Cursor
create_window(self: carb.windowing.IWindowing, width: int, height: int, title: str, fullscreen: bool, hints: int = 0) carb.windowing.Window
destroy_cursor(self: carb.windowing.IWindowing, arg0: carb.windowing.Cursor) None
destroy_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
focus_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
get_clipboard(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) str
get_cursor_mode(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) carb.windowing.CursorMode
get_cursor_position(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) carb._carb.Int2
get_input_mode(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: carb.windowing.InputMode) bool
get_keyboard(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) carb.input.Keyboard
get_monitor_position(self: carb.windowing.IWindowing, arg0: carb.windowing.Monitor) carb._carb.Int2
get_monitor_work_area(self: carb.windowing.IWindowing, arg0: carb.windowing.Monitor) tuple
get_monitors(self: carb.windowing.IWindowing) tuple
get_mouse(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) carb.input.Mouse
get_native_display(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) capsule
get_native_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) capsule
get_window_height(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) int
get_window_opacity(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) float
get_window_position(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) carb._carb.Int2
get_window_user_pointer(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) capsule
get_window_width(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) int
hide_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
is_window_focused(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) bool
is_window_fullscreen(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) bool
is_window_maximized(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) bool
is_window_minimized(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) bool
maximize_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
minimize_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
poll_events(self: carb.windowing.IWindowing) None
resize_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: int, arg2: int) None
restore_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
set_clipboard(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: str) None
set_cursor(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: carb.windowing.Cursor) None
set_cursor_mode(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: carb.windowing.CursorMode) None
set_cursor_position(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: carb._carb.Int2) None
set_input_mode(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: carb.windowing.InputMode, arg2: bool) None
set_window_content_scale(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) carb._carb.Float2
set_window_fullscreen(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: bool) None
set_window_opacity(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: float) None
set_window_position(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: carb._carb.Int2) None
set_window_should_close(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: bool) None
set_window_title(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: str) None
set_window_user_pointer(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: capsule) None
should_window_close(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) bool
show_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window) None
update_input_devices(self: carb.windowing.IWindowing) None
wait_events(self: carb.windowing.IWindowing) None
class carb.windowing.Image
class carb.windowing.InputMode

Members:

STICKY_KEYS

STICKY_MOUSE_BUTTONS

LOCK_KEY_MODS

RAW_MOUSE_MOTION

LOCK_KEY_MODS = <InputMode.LOCK_KEY_MODS: 2>
RAW_MOUSE_MOTION = <InputMode.RAW_MOUSE_MOTION: 3>
STICKY_KEYS = <InputMode.STICKY_KEYS: 0>
STICKY_MOUSE_BUTTONS = <InputMode.STICKY_MOUSE_BUTTONS: 1>
property name
property value
class carb.windowing.Monitor
class carb.windowing.Window
carb.windowing.acquire_gl_context_interface(plugin_name: str = None, library_path: str = None) carb.windowing.IGLContext
carb.windowing.acquire_windowing_interface(plugin_name: str = None, library_path: str = None) carb.windowing.IWindowing

carb.datasource

carb.datasource.get_datasource_interface(impl='carb.datasource-file.plugin') carb.datasource._datasource.IDataSource

Returns cached carb.datasource.IDatasource interface