Module livekit.browser.proto
Functions
def copy_paint_data(acq: AcquirePaintData,
old_width: int,
old_height: int,
source: memoryview,
dest: memoryview)-
Expand source code
def copy_paint_data( acq: AcquirePaintData, old_width: int, old_height: int, source: memoryview, dest: memoryview, ): # Validate frame dimensions fit in SHM buffer if acq.width > SHM_MAX_WIDTH or acq.height > SHM_MAX_HEIGHT: raise ValueError( f"Frame size {acq.width}x{acq.height} exceeds max {SHM_MAX_WIDTH}x{SHM_MAX_HEIGHT}" ) dirty_rects = acq.dirty_rects source_arr = np.ndarray( (acq.height, acq.width), dtype=np.uint32, buffer=source, ) dest_arr = np.ndarray( (acq.height, acq.width), dtype=np.uint32, buffer=dest, ) has_fullscreen_rect = len(dirty_rects) == 1 and dirty_rects[0] == ( 0, 0, acq.width, acq.height, ) if old_width != acq.width or old_height != acq.height or has_fullscreen_rect: np.copyto(dest_arr, source_arr) else: for rect in dirty_rects: x, y, w, h = rect dest_arr[y : y + h, x : x + w] = source_arr[y : y + h, x : x + w]
Classes
class AcquireAudioData (page_id: int = -1,
sample_rate: int = 0,
channels: int = 0,
frames: int = 0,
pts: int = 0,
data: bytes = b'')-
Expand source code
@dataclass class AcquireAudioData: MSG_ID: ClassVar[int] = 10 page_id: int = -1 sample_rate: int = 0 channels: int = 0 frames: int = 0 pts: int = 0 data: bytes = b"" def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.sample_rate) channel.write_int(b, self.channels) channel.write_int(b, self.frames) channel.write_long(b, self.pts) channel.write_bytes(b, self.data) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.sample_rate = channel.read_int(b) self.channels = channel.read_int(b) self.frames = channel.read_int(b) self.pts = channel.read_long(b) self.data = channel.read_bytes(b)AcquireAudioData(page_id: int = -1, sample_rate: int = 0, channels: int = 0, frames: int = 0, pts: int = 0, data: bytes = b'')
Instance variables
var MSG_ID : ClassVar[int]var channels : intvar data : bytesvar frames : intvar page_id : intvar pts : intvar sample_rate : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.sample_rate = channel.read_int(b) self.channels = channel.read_int(b) self.frames = channel.read_int(b) self.pts = channel.read_long(b) self.data = channel.read_bytes(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.sample_rate) channel.write_int(b, self.channels) channel.write_int(b, self.frames) channel.write_long(b, self.pts) channel.write_bytes(b, self.data)
class AcquirePaintData (page_id: int = -1,
buffer_id: int = 0,
width: int = 0,
height: int = 0,
dirty_rects: list[tuple[int, int, int, int]] = <factory>)-
Expand source code
@dataclass class AcquirePaintData: MSG_ID: ClassVar[int] = 4 page_id: int = -1 buffer_id: int = 0 width: int = 0 height: int = 0 dirty_rects: list[tuple[int, int, int, int]] = field(default_factory=list) def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.buffer_id) channel.write_int(b, self.width) channel.write_int(b, self.height) channel.write_int(b, len(self.dirty_rects)) for rect in self.dirty_rects: channel.write_int(b, rect[0]) channel.write_int(b, rect[1]) channel.write_int(b, rect[2]) channel.write_int(b, rect[3]) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.buffer_id = channel.read_int(b) self.width = channel.read_int(b) self.height = channel.read_int(b) num_rects = channel.read_int(b) self.dirty_rects = [] for _ in range(num_rects): x = channel.read_int(b) y = channel.read_int(b) width = channel.read_int(b) height = channel.read_int(b) self.dirty_rects.append((x, y, width, height))AcquirePaintData(page_id: int = -1, buffer_id: int = 0, width: int = 0, height: int = 0, dirty_rects: list[tuple[int, int, int, int]] =
) Instance variables
var MSG_ID : ClassVar[int]var buffer_id : intvar dirty_rects : list[tuple[int, int, int, int]]var height : intvar page_id : intvar width : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.buffer_id = channel.read_int(b) self.width = channel.read_int(b) self.height = channel.read_int(b) num_rects = channel.read_int(b) self.dirty_rects = [] for _ in range(num_rects): x = channel.read_int(b) y = channel.read_int(b) width = channel.read_int(b) height = channel.read_int(b) self.dirty_rects.append((x, y, width, height)) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.buffer_id) channel.write_int(b, self.width) channel.write_int(b, self.height) channel.write_int(b, len(self.dirty_rects)) for rect in self.dirty_rects: channel.write_int(b, rect[0]) channel.write_int(b, rect[1]) channel.write_int(b, rect[2]) channel.write_int(b, rect[3])
class AudioStreamStarted (page_id: int = -1,
sample_rate: int = 0,
channels: int = 0,
frames_per_buffer: int = 0)-
Expand source code
@dataclass class AudioStreamStarted: MSG_ID: ClassVar[int] = 8 page_id: int = -1 sample_rate: int = 0 channels: int = 0 frames_per_buffer: int = 0 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.sample_rate) channel.write_int(b, self.channels) channel.write_int(b, self.frames_per_buffer) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.sample_rate = channel.read_int(b) self.channels = channel.read_int(b) self.frames_per_buffer = channel.read_int(b)AudioStreamStarted(page_id: int = -1, sample_rate: int = 0, channels: int = 0, frames_per_buffer: int = 0)
Instance variables
var MSG_ID : ClassVar[int]var channels : intvar frames_per_buffer : intvar page_id : intvar sample_rate : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.sample_rate = channel.read_int(b) self.channels = channel.read_int(b) self.frames_per_buffer = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.sample_rate) channel.write_int(b, self.channels) channel.write_int(b, self.frames_per_buffer)
class AudioStreamStopped (page_id: int = -1)-
Expand source code
@dataclass class AudioStreamStopped: MSG_ID: ClassVar[int] = 9 page_id: int = -1 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b)AudioStreamStopped(page_id: int = -1)
Instance variables
var MSG_ID : ClassVar[int]var page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id)
class BrowserClosed (page_id: int = -1)-
Expand source code
@dataclass class BrowserClosed: MSG_ID: ClassVar[int] = 7 page_id: int = -1 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b)BrowserClosed(page_id: int = -1)
Instance variables
var MSG_ID : ClassVar[int]var page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id)
class CloseBrowserRequest (page_id: int = -1)-
Expand source code
@dataclass class CloseBrowserRequest: MSG_ID: ClassVar[int] = 6 page_id: int = -1 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b)CloseBrowserRequest(page_id: int = -1)
Instance variables
var MSG_ID : ClassVar[int]var page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id)
class ContextInitializedResponse-
Expand source code
@dataclass class ContextInitializedResponse: MSG_ID: ClassVar[int] = 1ContextInitializedResponse()
Instance variables
var MSG_ID : ClassVar[int]
class CreateBrowserRequest (page_id: int = -1,
url: str = '',
framerate: int = 0,
width: int = 0,
height: int = 0,
shm_names: list[str] = <factory>)-
Expand source code
@dataclass class CreateBrowserRequest: MSG_ID: ClassVar[int] = 2 page_id: int = -1 url: str = "" framerate: int = 0 width: int = 0 height: int = 0 shm_names: list[str] = field(default_factory=list) def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_string(b, self.url) channel.write_int(b, self.framerate) channel.write_int(b, self.width) channel.write_int(b, self.height) channel.write_int(b, len(self.shm_names)) for name in self.shm_names: channel.write_string(b, name) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.url = channel.read_string(b) self.framerate = channel.read_int(b) self.width = channel.read_int(b) self.height = channel.read_int(b) num_shm = channel.read_int(b) self.shm_names = [] for _ in range(num_shm): self.shm_names.append(channel.read_string(b))CreateBrowserRequest(page_id: int = -1, url: str = '', framerate: int = 0, width: int = 0, height: int = 0, shm_names: list[str] =
) Instance variables
var MSG_ID : ClassVar[int]var framerate : intvar height : intvar page_id : intvar shm_names : list[str]var url : strvar width : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.url = channel.read_string(b) self.framerate = channel.read_int(b) self.width = channel.read_int(b) self.height = channel.read_int(b) num_shm = channel.read_int(b) self.shm_names = [] for _ in range(num_shm): self.shm_names.append(channel.read_string(b)) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_string(b, self.url) channel.write_int(b, self.framerate) channel.write_int(b, self.width) channel.write_int(b, self.height) channel.write_int(b, len(self.shm_names)) for name in self.shm_names: channel.write_string(b, name)
class CreateBrowserResponse (page_id: int = -1, browser_id: int = 0)-
Expand source code
@dataclass class CreateBrowserResponse: """ This is going to wait for the created_callback to be called. (The create_browser function will be async) """ MSG_ID: ClassVar[int] = 3 page_id: int = -1 browser_id: int = 0 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.browser_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.browser_id = channel.read_int(b)This is going to wait for the created_callback to be called. (The create_browser function will be async)
Instance variables
var MSG_ID : ClassVar[int]var browser_id : intvar page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.browser_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.browser_id)
class CursorChanged (page_id: int = -1, cursor_type: int = 0)-
Expand source code
@dataclass class CursorChanged: MSG_ID: ClassVar[int] = 16 page_id: int = -1 cursor_type: int = 0 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.cursor_type) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.cursor_type = channel.read_int(b)CursorChanged(page_id: int = -1, cursor_type: int = 0)
Instance variables
var MSG_ID : ClassVar[int]var cursor_type : intvar page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.cursor_type = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.cursor_type)
class GoBackRequest (page_id: int = -1)-
Expand source code
@dataclass class GoBackRequest: MSG_ID: ClassVar[int] = 18 page_id: int = -1 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b)GoBackRequest(page_id: int = -1)
Instance variables
var MSG_ID : ClassVar[int]var page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id)
class GoForwardRequest (page_id: int = -1)-
Expand source code
@dataclass class GoForwardRequest: MSG_ID: ClassVar[int] = 19 page_id: int = -1 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b)GoForwardRequest(page_id: int = -1)
Instance variables
var MSG_ID : ClassVar[int]var page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id)
class InitializeContextRequest (dev_mode: bool = False,
remote_debugging_port: int = 0,
root_cache_path: str = '')-
Expand source code
@dataclass class InitializeContextRequest: MSG_ID: ClassVar[int] = 0 dev_mode: bool = False remote_debugging_port: int = 0 root_cache_path: str = "" def write(self, b: io.BytesIO) -> None: channel.write_bool(b, self.dev_mode) channel.write_int(b, self.remote_debugging_port) channel.write_string(b, self.root_cache_path) def read(self, b: io.BytesIO) -> None: self.dev_mode = channel.read_bool(b) self.remote_debugging_port = channel.read_int(b) self.root_cache_path = channel.read_string(b)InitializeContextRequest(dev_mode: bool = False, remote_debugging_port: int = 0, root_cache_path: str = '')
Instance variables
var MSG_ID : ClassVar[int]var dev_mode : boolvar remote_debugging_port : intvar root_cache_path : str
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.dev_mode = channel.read_bool(b) self.remote_debugging_port = channel.read_int(b) self.root_cache_path = channel.read_string(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_bool(b, self.dev_mode) channel.write_int(b, self.remote_debugging_port) channel.write_string(b, self.root_cache_path)
-
Expand source code
@dataclass class NavigateRequest: MSG_ID: ClassVar[int] = 17 page_id: int = -1 url: str = "" def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_string(b, self.url) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.url = channel.read_string(b)NavigateRequest(page_id: int = -1, url: str = '')
Instance variables
Methods
-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.url = channel.read_string(b) -
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_string(b, self.url)
class ReleasePaintData (page_id: int = -1, buffer_id: int = 0)-
Expand source code
@dataclass class ReleasePaintData: MSG_ID: ClassVar[int] = 5 page_id: int = -1 buffer_id: int = 0 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.buffer_id) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.buffer_id = channel.read_int(b)ReleasePaintData(page_id: int = -1, buffer_id: int = 0)
Instance variables
var MSG_ID : ClassVar[int]var buffer_id : intvar page_id : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.buffer_id = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.buffer_id)
class SendFocusEvent (page_id: int = -1, set_focus: bool = True)-
Expand source code
@dataclass class SendFocusEvent: MSG_ID: ClassVar[int] = 15 page_id: int = -1 set_focus: bool = True def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_bool(b, self.set_focus) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.set_focus = channel.read_bool(b)SendFocusEvent(page_id: int = -1, set_focus: bool = True)
Instance variables
var MSG_ID : ClassVar[int]var page_id : intvar set_focus : bool
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.set_focus = channel.read_bool(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_bool(b, self.set_focus)
class SendKeyEvent (page_id: int = -1,
type: int = 0,
modifiers: int = 0,
windows_key_code: int = 0,
native_key_code: int = 0,
character: int = 0)-
Expand source code
@dataclass class SendKeyEvent: MSG_ID: ClassVar[int] = 14 page_id: int = -1 type: int = 0 modifiers: int = 0 windows_key_code: int = 0 native_key_code: int = 0 character: int = 0 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.type) channel.write_int(b, self.modifiers) channel.write_int(b, self.windows_key_code) channel.write_int(b, self.native_key_code) channel.write_int(b, self.character) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.type = channel.read_int(b) self.modifiers = channel.read_int(b) self.windows_key_code = channel.read_int(b) self.native_key_code = channel.read_int(b) self.character = channel.read_int(b)SendKeyEvent(page_id: int = -1, type: int = 0, modifiers: int = 0, windows_key_code: int = 0, native_key_code: int = 0, character: int = 0)
Instance variables
var MSG_ID : ClassVar[int]var character : intvar modifiers : intvar native_key_code : intvar page_id : intvar type : intvar windows_key_code : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.type = channel.read_int(b) self.modifiers = channel.read_int(b) self.windows_key_code = channel.read_int(b) self.native_key_code = channel.read_int(b) self.character = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.type) channel.write_int(b, self.modifiers) channel.write_int(b, self.windows_key_code) channel.write_int(b, self.native_key_code) channel.write_int(b, self.character)
class SendMouseClickEvent (page_id: int = -1,
x: int = 0,
y: int = 0,
button_type: int = 0,
mouse_up: bool = False,
click_count: int = 1)-
Expand source code
@dataclass class SendMouseClickEvent: MSG_ID: ClassVar[int] = 12 page_id: int = -1 x: int = 0 y: int = 0 button_type: int = 0 mouse_up: bool = False click_count: int = 1 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.x) channel.write_int(b, self.y) channel.write_int(b, self.button_type) channel.write_bool(b, self.mouse_up) channel.write_int(b, self.click_count) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.x = channel.read_int(b) self.y = channel.read_int(b) self.button_type = channel.read_int(b) self.mouse_up = channel.read_bool(b) self.click_count = channel.read_int(b)SendMouseClickEvent(page_id: int = -1, x: int = 0, y: int = 0, button_type: int = 0, mouse_up: bool = False, click_count: int = 1)
Instance variables
var MSG_ID : ClassVar[int]var click_count : intvar mouse_up : boolvar page_id : intvar x : intvar y : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.x = channel.read_int(b) self.y = channel.read_int(b) self.button_type = channel.read_int(b) self.mouse_up = channel.read_bool(b) self.click_count = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.x) channel.write_int(b, self.y) channel.write_int(b, self.button_type) channel.write_bool(b, self.mouse_up) channel.write_int(b, self.click_count)
class SendMouseMoveEvent (page_id: int = -1, x: int = 0, y: int = 0, mouse_leave: bool = False)-
Expand source code
@dataclass class SendMouseMoveEvent: MSG_ID: ClassVar[int] = 11 page_id: int = -1 x: int = 0 y: int = 0 mouse_leave: bool = False def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.x) channel.write_int(b, self.y) channel.write_bool(b, self.mouse_leave) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.x = channel.read_int(b) self.y = channel.read_int(b) self.mouse_leave = channel.read_bool(b)SendMouseMoveEvent(page_id: int = -1, x: int = 0, y: int = 0, mouse_leave: bool = False)
Instance variables
var MSG_ID : ClassVar[int]var mouse_leave : boolvar page_id : intvar x : intvar y : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.x = channel.read_int(b) self.y = channel.read_int(b) self.mouse_leave = channel.read_bool(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.x) channel.write_int(b, self.y) channel.write_bool(b, self.mouse_leave)
class SendMouseWheelEvent (page_id: int = -1, x: int = 0, y: int = 0, delta_x: int = 0, delta_y: int = 0)-
Expand source code
@dataclass class SendMouseWheelEvent: MSG_ID: ClassVar[int] = 13 page_id: int = -1 x: int = 0 y: int = 0 delta_x: int = 0 delta_y: int = 0 def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.x) channel.write_int(b, self.y) channel.write_int(b, self.delta_x) channel.write_int(b, self.delta_y) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.x = channel.read_int(b) self.y = channel.read_int(b) self.delta_x = channel.read_int(b) self.delta_y = channel.read_int(b)SendMouseWheelEvent(page_id: int = -1, x: int = 0, y: int = 0, delta_x: int = 0, delta_y: int = 0)
Instance variables
var MSG_ID : ClassVar[int]var delta_x : intvar delta_y : intvar page_id : intvar x : intvar y : int
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.x = channel.read_int(b) self.y = channel.read_int(b) self.delta_x = channel.read_int(b) self.delta_y = channel.read_int(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_int(b, self.x) channel.write_int(b, self.y) channel.write_int(b, self.delta_x) channel.write_int(b, self.delta_y)
class UrlChanged (page_id: int = -1, url: str = '')-
Expand source code
@dataclass class UrlChanged: MSG_ID: ClassVar[int] = 20 page_id: int = -1 url: str = "" def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_string(b, self.url) def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.url = channel.read_string(b)UrlChanged(page_id: int = -1, url: str = '')
Instance variables
var MSG_ID : ClassVar[int]var page_id : intvar url : str
Methods
def read(self, b: _io.BytesIO) ‑> None-
Expand source code
def read(self, b: io.BytesIO) -> None: self.page_id = channel.read_int(b) self.url = channel.read_string(b) def write(self, b: _io.BytesIO) ‑> None-
Expand source code
def write(self, b: io.BytesIO) -> None: channel.write_int(b, self.page_id) channel.write_string(b, self.url)