| | |
- builtins.ValueError(builtins.Exception)
-
- PluginError
- ProtocolError
- builtins.object
-
- Command
-
- CommandCameraConnected
- CommandCameraDisconnected
- CommandFrame
- CommandGrabbed
- CommandInit
- CommandKeyDown
- CommandKeyUp
- CommandMouseDown
- CommandMouseScroll
- CommandMouseUp
- CommandPhoto
- CommandPhotoError
- CommandPhotoOk
- CommandQuit
- CommandSetting
- CommandVideoStart
- CommandVideoStarted
- CommandVideoStop
- Plugin
- Shader
class Command(builtins.object) |
| |
Command(raw_arguments: dict[str, str]) -> None
A command sent to the plug-in by camlet.
The plug-in can send a response by calling the methods on this. |
| |
Methods defined here:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- __annotations__ = {'raw_arguments': dict[str, str], 'response': dict[str, str], 'type': <class 'str'>}
|
class CommandCameraConnected(Command) |
| |
CommandCameraConnected(raw_arguments: dict[str, str]) -> None
_camera_connected command.
Sent when a new camera is connected. |
| |
- Method resolution order:
- CommandCameraConnected
- Command
- builtins.object
Methods defined here:
- device_path(self) → str
- Device path for this camera.
May change if the camera is disconnected and reconnected, but if two cameras
are connected at the same time, they will certainly have different device paths.
- hardware_id(self) → str
- Opaque identifier for this physical camera.
Stays the same even when it's unplugged and reconnected, etc.
However, it's possible, though very unlikely, for two cameras
to have the same ID (e.g. if manufacturer does not give a serial number,
and the names and supported formats of the devices are the same, etc.).
- name(self) → str
- Human-readable name of this camera, which may not be unique.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandCameraDisconnected(Command) |
| |
CommandCameraDisconnected(raw_arguments: dict[str, str]) -> None
_camera_disconnected command.
Sent when a camera was disconnected.
For more information about the camera, refer to the CommandCameraConnected
that was sent with the same device path. |
| |
- Method resolution order:
- CommandCameraDisconnected
- Command
- builtins.object
Methods defined here:
- device_path(self) → str
- Device file of the camera.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandFrame(Command) |
| |
CommandFrame(raw_arguments: dict[str, str]) -> None
The frame command.
This is sent every frame camlet runs. |
| |
- Method resolution order:
- CommandFrame
- Command
- builtins.object
Methods defined here:
- active_camera(self) → Optional[str]
- Returns the device path of the current camera, or None if there is no camera selected.
- camera_height(self) → int
- Returns the height of the image produced by the camera in pixels.
- camera_width(self) → int
- Returns the width of the image produced by the camera in pixels.
- cancel_timer(self) → None
- Cancel the photo countdown timer.
- download_texture(
self,
texture: int,
fmt: Literal['jpg', 'png', 'raw'],
path: str,
quality: int = 90
) → None
- Download a texture to a file.
- grab_camera(self) → None
- Request an OpenGL texture of the camera feed for this frame.
- grab_processed(self) → None
- Request an OpenGL texture of the camera feed for this frame,
after camera shaders are applied.
- is_photo_mode(self) → bool
- Is camlet in photo mode?
- is_video_mode(self) → bool
- Is camlet in video mode?
- menu_open(self) → bool
- Returns true if there is a menu open.
- new_camera_frame(self) → bool
- Returns true if the camera has captured a new frame since the last frame command.
- photo_mode(self) → None
- Puts camlet into photo mode.
- picture_height(self) → int
- Returns the height of the video feed (NOT including letterboxing) in pixels.
- picture_mouse_x(self) → int
- x position of mouse relative to the top-left of the displayed camera feed.
- picture_mouse_y(self) → int
- y position of mouse relative to the top-left of the displayed camera feed.
- picture_width(self) → int
- Returns the width of the video feed (NOT including letterboxing) in pixels.
- release(self, *textures: int) → None
- Release one or more textures.
- render_text(self, text: str) → None
- Render text to a texture.
- set_camera_shader(self, shader: Optional[camlet.Shader]) → None
- Set the camera shader for this plug-in to `shader` (use `None` to clear the current shader).
Note that this function makes a copy of all of `shader`'s data, i.e.
any changes made to `shader` after calling this method will NOT
apply to the response sent to camlet.
- set_overlay_shader(self, shader: Optional[camlet.Shader]) → None
- Set the overlay shader for this plug-in to `shader` (use `None` to clear the current shader).
Note that this function makes a copy of all of `shader`'s data, i.e.
any changes made to `shader` after calling this method will NOT
apply to the response sent to camlet.
- start_video(self) → None
- Start a video recording.
- stop_video(self) → None
- Stop the current video recording.
- switch_camera(self, new_camera_device_path: str) → None
- Switch to a new camera, using its CommandCameraConnected.device_path().
- take_photo(self) → None
- Takes a photo.
- timer(self) → Optional[float]
- Number of seconds remaining for photo countdown timer.
- upload_texture(self, path: str) → None
- Upload a texture from a file.
- video_mode(self) → None
- Puts camlet into video mode.
- window_height(self) → int
- Returns the height of the window (including letterboxing) in pixels.
- window_mouse_x(self) → int
- x position of mouse relative to the top-left of the window.
- window_mouse_y(self) → int
- y position of mouse relative to the top-left of the window.
- window_width(self) → int
- Returns the width of the window (including letterboxing) in pixels.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandGrabbed(Command) |
| |
CommandGrabbed(raw_arguments: dict[str, str]) -> None
_grabbed command.
Sent after frame/photo was requested via grab_camera/grab_processed. |
| |
- Method resolution order:
- CommandGrabbed
- Command
- builtins.object
Methods defined here:
- source(self) → str
- Get source of grabbed texture.
Currently this can return either "camera", "processed", or "upload".
- text_dimensions(self) → list[tuple[float, float, float, float]]
- Get dimensions of text.
Returns (x, y, width, height) in 0-1 texture coordinates for each line of text that was rendered.
Always returns an empty list if source() != "text".
- texture(self) → int
- Get grabbed texture.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandInit(Command) |
| |
CommandInit(raw_arguments: dict[str, str]) -> None
The init command.
This is sent when the plug-in starts up. |
| |
- Method resolution order:
- CommandInit
- Command
- builtins.object
Methods defined here:
- define_directory_setting(
self,
identifier: str,
name: str,
default_value: str = ''
) → None
- Define a directory setting.
The identifier is a unique string which allows for renaming it without resetting the value
- define_file_setting(self, identifier: str, name: str, default_value: str = '') → None
- Define a file setting.
The identifier is a unique string which allows for renaming it without resetting the value
- define_keyboard_setting(
self,
identifier: str,
name: str,
default_value: str = ''
) → None
- Define a keyboard shortcut setting.
The identifier is a unique string which allows for renaming it without resetting the value
- define_number_setting(
self,
identifier: str,
name: str,
minimum: float,
maximum: float,
step: float,
default_value: float
) → None
- Define a number setting.
The identifier is a unique string which allows for renaming it without resetting the value
- define_select_setting(
self,
identifier: str,
name: str,
options: list[str],
default_value: Optional[str] = None
) → None
- Define a "select" setting (allows user to select from a fixed list of options).
The identifier is a unique string which allows for renaming it without resetting the value.
If no default value is provided, the first one in the options list will be used.
- error(self, message: str) → None
- Indicate that the plug-in failed, or cannot work with this camlet version.
A human-readable error message should be provided.
- ok(self) → None
- Indicate that the plug-in started up successfully and can work with this camlet version.
- version_major(self) → int
- Major version of camlet.
- version_minor(self) → int
- Minor version of camlet.
- version_patch(self) → int
- Patch version of camlet.
In most cases, this should not be relevant, since new plug-in
commands/arguments are not added in patch versions.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandKeyDown(Command) |
| |
CommandKeyDown(raw_arguments: dict[str, str]) -> None
_key_down command.
Sent when a key was pressed. |
| |
- Method resolution order:
- CommandKeyDown
- Command
- builtins.object
Methods defined here:
- combo(self) → str
- String identifying the key combination that was pressed.
This can be compared against the value of keyboard settings.
- key(self) → int
- Number identifying the key.
See https://wiki.libsdl.org/SDL3/SDL_Keycode for a list of numbers.
- modifiers(self) → str
- String identifying which modifier keys are held down.
This contains some letters out of acgsACGS, where
Lowercase = left, uppercase = right, a/A = Alt, c/C = Ctrl,
g/G = GUI (“Windows®” key), s/S = Shift.
- name(self) → str
- Human-readable name of the key.
- repeat(self) → bool
- True if this was a repeated key press (from holding the key down).
- scancode(self) → int
- Number identifying the physical location of the key.
In almost all cases, you want `key()` instead.
See https://wiki.libsdl.org/SDL3/SDL_Scancode for a list of numbers.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandKeyUp(Command) |
| |
CommandKeyUp(raw_arguments: dict[str, str]) -> None
_key_up command.
Sent when a key was released. |
| |
- Method resolution order:
- CommandKeyUp
- Command
- builtins.object
Methods defined here:
- key(self) → int
- Number identifying the key.
See https://wiki.libsdl.org/SDL3/SDL_Keycode for a list of numbers.
- name(self) → str
- Human-readable name of the key.
- scancode(self) → int
- Number identifying the physical location of the key.
In almost all cases, you want `key()` instead.
See https://wiki.libsdl.org/SDL3/SDL_Scancode for a list of numbers.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandMouseDown(Command) |
| |
CommandMouseDown(raw_arguments: dict[str, str]) -> None
_mouse_down command.
Sent when a mouse button was pressed. |
| |
- Method resolution order:
- CommandMouseDown
- Command
- builtins.object
Methods defined here:
- button(self) → str
- Character identifying mouse button.
L = left, M = middle, R = right, X = X1, Y = X2
- clicks(self) → int
- Number of clicks (1 = single-click, 2 = double-click, etc.)
- picture_x(self) → int
- x position of mouse relative to the top-left of the displayed camera feed.
- picture_y(self) → int
- y position of mouse relative to the top-left of the displayed camera feed.
- window_x(self) → int
- x position of mouse relative to the top-left of the window.
- window_y(self) → int
- y position of mouse relative to the top-left of the window.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandMouseScroll(Command) |
| |
CommandMouseScroll(raw_arguments: dict[str, str]) -> None
_mouse_scroll command.
Sent when the mouse is scrolled. |
| |
- Method resolution order:
- CommandMouseScroll
- Command
- builtins.object
Methods defined here:
- logical_x(self) → int
- Horizontal scroll amount, positive = scroll content rightwards,
negative = scroll content leftwards.
For "natural"/"flipped" scrolling this is the negative of physical_x,
otherwise it is equal to physical_x.
- logical_y(self) → int
- Horizontal scroll amount, positive = scroll content downwards,
negative = scroll content upwards.
For "natural"/"flipped" scrolling this is the negative of physical_y,
otherwise it is equal to physical_y.
- physical_x(self) → int
- Horizontal scroll amount, positive = rightwards, negative = leftwards.
Ignores whether user likes "flipped"/"natural" scrolling.
- physical_y(self) → int
- Horizontal scroll amount, positive = downwards, negative = upwards.
Ignores whether user likes "flipped"/"natural" scrolling.
- picture_x(self) → int
- x position of mouse relative to the top-left of the displayed camera feed.
- picture_y(self) → int
- y position of mouse relative to the top-left of the displayed camera feed.
- window_x(self) → int
- x position of mouse relative to the top-left of the window.
- window_y(self) → int
- y position of mouse relative to the top-left of the window.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandMouseUp(Command) |
| |
CommandMouseUp(raw_arguments: dict[str, str]) -> None
_mouse_up command.
Sent when a mouse button was released. |
| |
- Method resolution order:
- CommandMouseUp
- Command
- builtins.object
Methods defined here:
- button(self) → str
- Character identifying mouse button.
L = left, M = middle, R = right, X = X1, Y = X2
- picture_x(self) → int
- x position of mouse relative to the top-left of the displayed camera feed.
- picture_y(self) → int
- y position of mouse relative to the top-left of the displayed camera feed.
- window_x(self) → int
- x position of mouse relative to the top-left of the window.
- window_y(self) → int
- y position of mouse relative to the top-left of the window.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandPhoto(Command) |
| |
CommandPhoto(raw_arguments: dict[str, str]) -> None
The photo command.
This is sent whenever the user requests a photo to be taken. |
| |
- Method resolution order:
- CommandPhoto
- Command
- builtins.object
Methods defined here:
- cancel(self) → None
- Cancel taking the photo.
- disable_flash(self) → None
- Disable the flash indicating that the photo was taken.
- format(self) → str
- Get the file format for the image.
Currently this is one of jpg or png, but more may be added in the future.
- grab_camera(self) → None
- Grab the photo as taken by the camera as a texture.
- grab_processed(self) → None
- Grab the photo after passing through camera shaders as a texture.
- height(self) → int
- Get height of the image file that is to be saved.
- path(self) → str
- Get the path where the image will be saved.
- quality(self) → Optional[int]
- Get the quality of the image file.
- set_camera_shader(self, shader: Optional[camlet.Shader]) → None
- Set the camera shader for this plug-in to `shader` (use `None` to clear the current shader).
Note that this function makes a copy of all of `shader`'s data, i.e.
any changes made to `shader` after calling this method will NOT
apply to the response sent to camlet.
- width(self) → int
- Get width of the image file that is to be saved.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandPhotoError(Command) |
| |
CommandPhotoError(raw_arguments: dict[str, str]) -> None
_photo_error command.
Sent if a photo was cancelled or if capturing or saving the image failed. |
| |
- Method resolution order:
- CommandPhotoError
- Command
- builtins.object
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandPhotoOk(Command) |
| |
CommandPhotoOk(raw_arguments: dict[str, str]) -> None
_photo_ok command.
Sent when a photo was successfully taken. |
| |
- Method resolution order:
- CommandPhotoOk
- Command
- builtins.object
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandQuit(Command) |
| |
CommandQuit(raw_arguments: dict[str, str]) -> None
The quit command.
This is sent once when camlet is quitting. |
| |
- Method resolution order:
- CommandQuit
- Command
- builtins.object
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandSetting(Command) |
| |
CommandSetting(raw_arguments: dict[str, str]) -> None
_setting command.
Sent once for each setting upon initialization, then again
whenever the user changes a setting. |
| |
- Method resolution order:
- CommandSetting
- Command
- builtins.object
Methods defined here:
- done(self) → bool
- If true, this is the last setting.
This is only ever true during initialization,
not when the user changes a setting through the menu.
- id(self) → str
- Identifier of the setting.
- value(self) → str
- New value for the setting.
- value_number(self) → float
- New numerical value for the setting.
Raises a value error if the setting is not numerical.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandVideoStart(Command) |
| |
CommandVideoStart(raw_arguments: dict[str, str]) -> None
video_start command.
Sent when a video recording is about to start (but may still be cancelled by a plug-in). |
| |
- Method resolution order:
- CommandVideoStart
- Command
- builtins.object
Methods defined here:
- cancel(self) → None
- Cancel the video recording.
- framerate(self) → float
- Get framerate of video.
- height(self) → int
- Get vertical resolution of video.
- path(self) → str
- Get path where video will be saved.
- quality(self) → int
- Get quality of video, from 1-100.
- width(self) → int
- Get horizontal resolution of video.
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandVideoStarted(Command) |
| |
CommandVideoStarted(raw_arguments: dict[str, str]) -> None
_video_started command.
Sent when a video was successfully started. |
| |
- Method resolution order:
- CommandVideoStarted
- Command
- builtins.object
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class CommandVideoStop(Command) |
| |
CommandVideoStop(raw_arguments: dict[str, str]) -> None
_video_stop command.
Sent when a video was stopped. |
| |
- Method resolution order:
- CommandVideoStop
- Command
- builtins.object
Data and other attributes defined here:
- __annotations__ = {}
Methods inherited from Command:
- __init__(self, raw_arguments: dict[str, str]) → None
- Initialize Command. Should not be called by plug-ins.
- __repr__(self) → str
- Convert Command to a readable string representation.
- get(self, name: str, default: Optional[str] = None) → Optional[str]
- Returns the value of argument `name`, or `default` if it was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_float(self, name: str, default: Optional[float] = None) → Optional[float]
- Returns the floating-point value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_int(self, name: str, default: Optional[int] = None) → Optional[int]
- Returns the integer value of the argument `name`, or `default` if it was not provided.
Throws a ProtocolError if the argument value is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required(self, name: str) → str
- Returns the value of the argument `name`.
Throws a ProtocolError if the argument value was not provided.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_float(self, name: str) → float
- Returns the floating-point value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- get_required_int(self, name: str) → int
- Returns the integer value of the argument `name`.
Throws a ProtocolError if the argument value was not provided or is not an integer.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
- has(self, name: str) → bool
- Returns true if the command includes the argument `name`.
Generally, it's better to use the methods on the subclasses instead of calling this directly.
Data descriptors inherited from Command:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class Plugin(builtins.object) |
| |
Plugin(command: camlet.CommandInit) -> None
Superclass for camlet plug-ins. |
| |
Methods defined here:
- __init__(self, command: camlet.CommandInit) → None
- Initialize self.
- handle_all(self, command: camlet.Command) → None
- This is called for every command sent to the plug-in.
In most cases, you should instead use one or more of the more specific methods.
- handle_camera_connected(self, command: camlet.CommandCameraConnected) → None
- This is called when a _camera_connected command is sent to the plug-in.
See CommandCameraConnected documentation for more information.
- handle_camera_disconnected(self, command: camlet.CommandCameraDisconnected) → None
- This is called when a _camera_disconnected command is sent to the plug-in.
See CommandCameraConnected documentation for more information.
- handle_frame(self, command: camlet.CommandFrame) → None
- This is called when a frame command is sent to the plug-in.
See CommandFrame documentation for more information.
- handle_grabbed(self, command: camlet.CommandGrabbed) → None
- This is called when a _grabbed command is sent to the plug-in.
See CommandGrabbed documentation for more information.
- handle_key_down(self, command: camlet.CommandKeyDown) → None
- This is called when a _key_down command is sent to the plug-in.
See CommandKeyDown documentation for more information.
- handle_key_up(self, command: camlet.CommandKeyUp) → None
- This is called when a _key_up command is sent to the plug-in.
See CommandKeyUp documentation for more information.
- handle_mouse_down(self, command: camlet.CommandMouseDown) → None
- This is called when a _mouse_down command is sent to the plug-in.
See CommandMouseDown documentation for more information.
- handle_mouse_scroll(self, command: camlet.CommandMouseScroll) → None
- This is called when a _mouse_scroll command is sent to the plug-in.
See CommandMouseScroll documentation for more information.
- handle_mouse_up(self, command: camlet.CommandMouseUp) → None
- This is called when a _mouse_up command is sent to the plug-in.
See CommandMouseUp documentation for more information.
- handle_photo(self, command: camlet.CommandPhoto) → None
- This is called when a photo command is sent to the plug-in.
See CommandPhoto documentation for more information.
- handle_photo_error(self, command: camlet.CommandPhotoError) → None
- This is called when a _photo_error command is sent to the plug-in.
See CommandPhotoError documentation for more information.
- handle_photo_ok(self, command: camlet.CommandPhotoOk) → None
- This is called when a _photo_ok command is sent to the plug-in.
See CommandPhotoOk documentation for more information.
- handle_quit(self, command: camlet.CommandQuit) → None
- This is called when a _quit command is sent to the plug-in.
See CommandQuit documentation for more information.
- handle_setting(self, command: camlet.CommandSetting) → None
- This is called when a _setting command is sent to the plug-in.
See CommandSetting documentation for more information.
- handle_video_start(self, command: camlet.CommandVideoStart) → None
- This is called when a video_start command is sent to the plug-in.
See CommandVideoStart documentation for more information.
- handle_video_started(self, command: camlet.CommandVideoStarted) → None
- This is called when a _video_started command is sent to the plug-in.
See CommandVideoStarted documentation for more information.
- handle_video_stop(self, command: camlet.CommandVideoStop) → None
- This is called when a _video_stop command is sent to the plug-in.
See CommandVideoStop documentation for more information.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
|
class PluginError(builtins.ValueError) |
| |
The plug-in provided invalid response data. |
| |
- Method resolution order:
- PluginError
- builtins.ValueError
- builtins.Exception
- builtins.BaseException
- builtins.object
Data descriptors defined here:
- __weakref__
- list of weak references to the object
Methods inherited from builtins.ValueError:
- __init__(self, /, *args, **kwargs)
- Initialize self.
Static methods inherited from builtins.ValueError:
- __new__(*args, **kwargs) class method of builtins.ValueError
- Create and return a new object. See help(type) for accurate signature.
Methods inherited from builtins.BaseException:
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __reduce__(self, /)
- Helper for pickle.
- __repr__(self, /)
- Return repr(self).
- __setstate__(self, object, /)
- __str__(self, /)
- Return str(self).
- add_note(self, object, /)
- Exception.add_note(note) --
add a note to the exception
- with_traceback(self, object, /)
- Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.
Data descriptors inherited from builtins.BaseException:
- __cause__
- exception cause
- __context__
- exception context
- __dict__
- __suppress_context__
- __traceback__
- args
|
class ProtocolError(builtins.ValueError) |
| |
Camlet provided incorrect data to the plug-in.
In theory, this should never happen with a valid camlet installation,
unless you are getting arguments directly with Command.get_int(), etc. |
| |
- Method resolution order:
- ProtocolError
- builtins.ValueError
- builtins.Exception
- builtins.BaseException
- builtins.object
Data descriptors defined here:
- __weakref__
- list of weak references to the object
Methods inherited from builtins.ValueError:
- __init__(self, /, *args, **kwargs)
- Initialize self.
Static methods inherited from builtins.ValueError:
- __new__(*args, **kwargs) class method of builtins.ValueError
- Create and return a new object. See help(type) for accurate signature.
Methods inherited from builtins.BaseException:
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __reduce__(self, /)
- Helper for pickle.
- __repr__(self, /)
- Return repr(self).
- __setstate__(self, object, /)
- __str__(self, /)
- Return str(self).
- add_note(self, object, /)
- Exception.add_note(note) --
add a note to the exception
- with_traceback(self, object, /)
- Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.
Data descriptors inherited from builtins.BaseException:
- __cause__
- exception cause
- __context__
- exception context
- __dict__
- __suppress_context__
- __traceback__
- args
|
class Shader(builtins.object) |
| |
Shader(code: str) -> None
Represents a shader for camlet. |
| |
Methods defined here:
- __init__(self, code: str) → None
- Create a shader with the given GLSL code.
- bind_textures(self, textures: dict[int, int]) → 'Shader'
- Bind textures to texture slots. This clears any previously-bound textures.
- set_uniform_float(
self,
name: str,
value: Union[Iterable[float | int], Iterable[Iterable[float | int]], float, int]
) → 'Shader'
- Set an float, vecN, or matrix uniform value.
For matrices, use an array of columns, not an array of rows (this is for consistency with GLSL).
- set_uniform_float_array(
self,
name: str,
value: Iterable[Union[Iterable[float | int], Iterable[Iterable[float | int]], float, int]]
) → 'Shader'
- Set an float/vecN/matrix array uniform value.
For matrices, use an array of columns, not an array of rows (this is for consistency with GLSL).
- set_uniform_int(
self,
name: str,
value: Union[Iterable[int], Iterable[Iterable[int]], int]
) → 'Shader'
- Set a int or ivecN uniform value.
- set_uniform_int_array(
self,
name: str,
value: Iterable[Union[Iterable[int], Iterable[Iterable[int]], int]]
) → 'Shader'
- Set a int or ivecN array uniform value.
- set_uniform_uint(
self,
name: str,
value: Union[Iterable[int], Iterable[Iterable[int]], int]
) → 'Shader'
- Set a uint or uvecN uniform value.
- set_uniform_uint_array(
self,
name: str,
value: Iterable[Union[Iterable[int], Iterable[Iterable[int]], int]]
) → 'Shader'
- Set a uint or uvecN array uniform value.
Static methods defined here:
- from_file(path: str) → 'Shader'
- Create shader with code from the file at the given path.
Data descriptors defined here:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
Data and other attributes defined here:
- __annotations__ = {'_bound_textures': list[tuple[int, int]], '_code': <class 'str'>, '_uniforms': list[str]}
| |