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
ENABLED = PluginHotReload.ENABLED
property name

handle) -> str

Type

(self

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
OVERRIDE = LogSettingBehavior.OVERRIDE
property name

handle) -> str

Type

(self

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
FILE = DirectoryItemType.FILE
property name

handle) -> str

Type

(self

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
KEYBOARD = DeviceType.KEYBOARD
MOUSE = DeviceType.MOUSE
property name

handle) -> str

Type

(self

class carb.input.EventType

Members:

UNKNOWN

UNKNOWN = EventType.UNKNOWN
property name

handle) -> str

Type

(self

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
CREATED = GamepadConnectionEventType.CREATED
DESTROYED = GamepadConnectionEventType.DESTROYED
DISCONNECTED = GamepadConnectionEventType.DISCONNECTED
property name

handle) -> str

Type

(self

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
B = GamepadInput.B
COUNT = GamepadInput.COUNT
DPAD_DOWN = GamepadInput.DPAD_DOWN
DPAD_LEFT = GamepadInput.DPAD_LEFT
DPAD_RIGHT = GamepadInput.DPAD_RIGHT
DPAD_UP = GamepadInput.DPAD_UP
LEFT_SHOULDER = GamepadInput.LEFT_SHOULDER
LEFT_STICK = GamepadInput.LEFT_STICK
LEFT_STICK_DOWN = GamepadInput.LEFT_STICK_DOWN
LEFT_STICK_LEFT = GamepadInput.LEFT_STICK_LEFT
LEFT_STICK_RIGHT = GamepadInput.LEFT_STICK_RIGHT
LEFT_STICK_UP = GamepadInput.LEFT_STICK_UP
LEFT_TRIGGER = GamepadInput.LEFT_TRIGGER
MENU1 = GamepadInput.MENU1
MENU2 = GamepadInput.MENU2
RIGHT_SHOULDER = GamepadInput.RIGHT_SHOULDER
RIGHT_STICK = GamepadInput.RIGHT_STICK
RIGHT_STICK_DOWN = GamepadInput.RIGHT_STICK_DOWN
RIGHT_STICK_LEFT = GamepadInput.RIGHT_STICK_LEFT
RIGHT_STICK_RIGHT = GamepadInput.RIGHT_STICK_RIGHT
RIGHT_STICK_UP = GamepadInput.RIGHT_STICK_UP
RIGHT_TRIGGER = GamepadInput.RIGHT_TRIGGER
X = GamepadInput.X
Y = GamepadInput.Y
property name

handle) -> str

Type

(self

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_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_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
KEY_PRESS = KeyboardEventType.KEY_PRESS
KEY_RELEASE = KeyboardEventType.KEY_RELEASE
KEY_REPEAT = KeyboardEventType.KEY_REPEAT
property name

handle) -> str

Type

(self

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
APOSTROPHE = KeyboardInput.APOSTROPHE
B = KeyboardInput.B
BACKSLASH = KeyboardInput.BACKSLASH
BACKSPACE = KeyboardInput.BACKSPACE
C = KeyboardInput.C
CAPS_LOCK = KeyboardInput.CAPS_LOCK
COMMA = KeyboardInput.COMMA
COUNT = KeyboardInput.COUNT
D = KeyboardInput.D
DEL = KeyboardInput.DEL
DOWN = KeyboardInput.DOWN
E = KeyboardInput.E
END = KeyboardInput.END
ENTER = KeyboardInput.ENTER
EQUAL = KeyboardInput.EQUAL
ESCAPE = KeyboardInput.ESCAPE
F = KeyboardInput.F
F1 = KeyboardInput.F1
F10 = KeyboardInput.F10
F11 = KeyboardInput.F11
F12 = KeyboardInput.F12
F2 = KeyboardInput.F2
F3 = KeyboardInput.F3
F4 = KeyboardInput.F4
F5 = KeyboardInput.F5
F6 = KeyboardInput.F6
F7 = KeyboardInput.F7
F8 = KeyboardInput.F8
F9 = KeyboardInput.F9
G = KeyboardInput.G
GRAVE_ACCENT = KeyboardInput.GRAVE_ACCENT
H = KeyboardInput.H
HOME = KeyboardInput.HOME
I = KeyboardInput.I
INSERT = KeyboardInput.INSERT
J = KeyboardInput.J
K = KeyboardInput.K
KEY_0 = KeyboardInput.KEY_0
KEY_1 = KeyboardInput.KEY_1
KEY_2 = KeyboardInput.KEY_2
KEY_3 = KeyboardInput.KEY_3
KEY_4 = KeyboardInput.KEY_4
KEY_5 = KeyboardInput.KEY_5
KEY_6 = KeyboardInput.KEY_6
KEY_7 = KeyboardInput.KEY_7
KEY_8 = KeyboardInput.KEY_8
KEY_9 = KeyboardInput.KEY_9
L = KeyboardInput.L
LEFT = KeyboardInput.LEFT
LEFT_ALT = KeyboardInput.LEFT_ALT
LEFT_BRACKET = KeyboardInput.LEFT_BRACKET
LEFT_CONTROL = KeyboardInput.LEFT_CONTROL
LEFT_SHIFT = KeyboardInput.LEFT_SHIFT
LEFT_SUPER = KeyboardInput.LEFT_SUPER
M = KeyboardInput.M
MENU = KeyboardInput.MENU
MINUS = KeyboardInput.MINUS
N = KeyboardInput.N
NUMPAD_0 = KeyboardInput.NUMPAD_0
NUMPAD_1 = KeyboardInput.NUMPAD_1
NUMPAD_2 = KeyboardInput.NUMPAD_2
NUMPAD_3 = KeyboardInput.NUMPAD_3
NUMPAD_4 = KeyboardInput.NUMPAD_4
NUMPAD_5 = KeyboardInput.NUMPAD_5
NUMPAD_6 = KeyboardInput.NUMPAD_6
NUMPAD_7 = KeyboardInput.NUMPAD_7
NUMPAD_8 = KeyboardInput.NUMPAD_8
NUMPAD_9 = KeyboardInput.NUMPAD_9
NUMPAD_ADD = KeyboardInput.NUMPAD_ADD
NUMPAD_DEL = KeyboardInput.NUMPAD_DEL
NUMPAD_DIVIDE = KeyboardInput.NUMPAD_DIVIDE
NUMPAD_ENTER = KeyboardInput.NUMPAD_ENTER
NUMPAD_EQUAL = KeyboardInput.NUMPAD_EQUAL
NUMPAD_MULTIPLY = KeyboardInput.NUMPAD_MULTIPLY
NUMPAD_SUBTRACT = KeyboardInput.NUMPAD_SUBTRACT
NUM_LOCK = KeyboardInput.NUM_LOCK
O = KeyboardInput.O
P = KeyboardInput.P
PAGE_DOWN = KeyboardInput.PAGE_DOWN
PAGE_UP = KeyboardInput.PAGE_UP
PAUSE = KeyboardInput.PAUSE
PERIOD = KeyboardInput.PERIOD
PRINT_SCREEN = KeyboardInput.PRINT_SCREEN
Q = KeyboardInput.Q
R = KeyboardInput.R
RIGHT = KeyboardInput.RIGHT
RIGHT_ALT = KeyboardInput.RIGHT_ALT
RIGHT_BRACKET = KeyboardInput.RIGHT_BRACKET
RIGHT_CONTROL = KeyboardInput.RIGHT_CONTROL
RIGHT_SHIFT = KeyboardInput.RIGHT_SHIFT
RIGHT_SUPER = KeyboardInput.RIGHT_SUPER
S = KeyboardInput.S
SCROLL_LOCK = KeyboardInput.SCROLL_LOCK
SEMICOLON = KeyboardInput.SEMICOLON
SLASH = KeyboardInput.SLASH
SPACE = KeyboardInput.SPACE
T = KeyboardInput.T
TAB = KeyboardInput.TAB
U = KeyboardInput.U
UNKNOWN = KeyboardInput.UNKNOWN
UP = KeyboardInput.UP
V = KeyboardInput.V
W = KeyboardInput.W
X = KeyboardInput.X
Y = KeyboardInput.Y
Z = KeyboardInput.Z
property name

handle) -> str

Type

(self

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
LEFT_BUTTON_UP = MouseEventType.LEFT_BUTTON_UP
MIDDLE_BUTTON_DOWN = MouseEventType.MIDDLE_BUTTON_DOWN
MIDDLE_BUTTON_UP = MouseEventType.MIDDLE_BUTTON_UP
MOVE = MouseEventType.MOVE
RIGHT_BUTTON_DOWN = MouseEventType.RIGHT_BUTTON_DOWN
RIGHT_BUTTON_UP = MouseEventType.RIGHT_BUTTON_UP
SCROLL = MouseEventType.SCROLL
property name

handle) -> str

Type

(self

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
COUNT = MouseInput.COUNT
FORWARD_BUTTON = MouseInput.FORWARD_BUTTON
LEFT_BUTTON = MouseInput.LEFT_BUTTON
MIDDLE_BUTTON = MouseInput.MIDDLE_BUTTON
MOVE_DOWN = MouseInput.MOVE_DOWN
MOVE_LEFT = MouseInput.MOVE_LEFT
MOVE_RIGHT = MouseInput.MOVE_RIGHT
MOVE_UP = MouseInput.MOVE_UP
RIGHT_BUTTON = MouseInput.RIGHT_BUTTON
SCROLL_DOWN = MouseInput.SCROLL_DOWN
SCROLL_LEFT = MouseInput.SCROLL_LEFT
SCROLL_RIGHT = MouseInput.SCROLL_RIGHT
SCROLL_UP = MouseInput.SCROLL_UP
property name

handle) -> str

Type

(self

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
HIDDEN = CursorMode.HIDDEN
NORMAL = CursorMode.NORMAL
property name

handle) -> str

Type

(self

class carb.windowing.CursorStandardShape

Members:

ARROW

IBEAM

CROSSHAIR

HAND

HORIZONTAL_RESIZE

VERTICAL_RESIZE

ARROW = CursorStandardShape.ARROW
CROSSHAIR = CursorStandardShape.CROSSHAIR
HAND = CursorStandardShape.HAND
HORIZONTAL_RESIZE = CursorStandardShape.HORIZONTAL_RESIZE
IBEAM = CursorStandardShape.IBEAM
VERTICAL_RESIZE = CursorStandardShape.VERTICAL_RESIZE
property name

handle) -> str

Type

(self

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_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_minimized(self: carb.windowing.IWindowing, arg0: carb.windowing.Window)bool
poll_events(self: carb.windowing.IWindowing)None
resize_window(self: carb.windowing.IWindowing, arg0: carb.windowing.Window, arg1: int, arg2: int)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
RAW_MOUSE_MOTION = InputMode.RAW_MOUSE_MOTION
STICKY_KEYS = InputMode.STICKY_KEYS
STICKY_MOUSE_BUTTONS = InputMode.STICKY_MOUSE_BUTTONS
property name

handle) -> str

Type

(self

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