S or /

SourceClass RawInput

from egui import RawInput
class RawInput:

What the integrations provides to egui at the start of each frame.

Set the values that make sense, leave the rest at their Default.default().

You can check if egui is using the inputs using egui.Context.egui_wants_pointer_input and egui.Context.egui_wants_keyboard_input.

All coordinates are in points (logical pixels) with origin (0, 0) in the top left .corner.

Ii "points" can be calculated from native physical pixels using pixels_per_point = egui.Context.zoom_factor * native_pixels_per_point;

Properties§

@property def focused(self, /) -> bool§
@focused.setter def focused(self, /, focused: bool) -> None§
@property def max_texture_side(self, /) -> int |None§
@max_texture_side.setter def max_texture_side(self, /, max_texture_side: int |None) -> None§
@property def modifiers(self, /) -> Modifiers§
@modifiers.setter def modifiers(self, /, modifiers: Modifiers) -> None§
@property def predicted_dt(self, /) -> float§
@predicted_dt.setter def predicted_dt(self, /, predicted_dt: float) -> None§
@property def safe_area_insets(self, /) -> SafeAreaInsets |None§
@safe_area_insets.setter def safe_area_insets(self, /, safe_area_insets: SafeAreaInsets |None) -> None§
@property def screen_rect(self, /) -> Rect |None§
@screen_rect.setter def screen_rect(self, /, screen_rect: Rect |None) -> None§
@property def system_theme(self, /) -> Theme |None§
@system_theme.setter def system_theme(self, /, system_theme: Theme |None) -> None§
@property def time(self, /) -> float |None§
@time.setter def time(self, /, time: float |None) -> None§
@property def viewport_id(self, /) -> ViewportId§
@viewport_id.setter def viewport_id(self, /, viewport_id: ViewportId) -> None§

Methods§

Sourcedef append(self, /, newer: RawInput) -> None§

Add on new input.

@staticmethod def default() -> RawInput§
def dropped_files(self, /) -> list[DroppedFile]§
def dropped_files_len(self, /) -> int§
def events(self, /) -> list[Event]§
def events_len(self, /) -> int§
def hovered_files(self, /) -> list[HoveredFile]§
def hovered_files_len(self, /) -> int§
def push_event(self, /, event: Event) -> None§
def set_dropped_files(self, /, dropped_files: Sequence[DroppedFile]) -> None§
def set_events(self, /, events: Sequence[Event]) -> None§
def set_hovered_files(self, /, hovered_files: Sequence[HoveredFile]) -> None§
Sourcedef take(self, /) -> RawInput§

Helper: move volatile (deltas and events), clone the rest.

Sourcedef ui(self, /, ui: Ui) -> None§
Sourcedef viewport(self, /) -> ViewportInfo§

Info about the active viewport

def viewport_count(self, /) -> int§
def viewports(self, /) -> list[tuple[ViewportId, ViewportInfo]]§