mirror of
https://github.com/hexedtech/codemp.git
synced 2025-03-24 04:01:33 +01:00
Merge pull request #88 from hexedtech/fix/py/add-missing-workspace-event-class
properly export the event object to the python glue
This commit is contained in:
commit
83e386e136
2 changed files with 28 additions and 3 deletions
28
dist/py/src/codemp/codemp.pyi
vendored
28
dist/py/src/codemp/codemp.pyi
vendored
|
@ -1,4 +1,4 @@
|
|||
from typing import Tuple, Optional, Callable
|
||||
from typing import Optional, Callable
|
||||
|
||||
def version() -> str: ...
|
||||
|
||||
|
@ -61,8 +61,32 @@ class Client:
|
|||
def current_user(self) -> User: ...
|
||||
def refresh(self) -> Promise[None]: ...
|
||||
|
||||
class FileTreeUpdated:
|
||||
"""
|
||||
Fired when the file tree changes.
|
||||
Contains the modified buffer path (deleted, created or renamed)
|
||||
"""
|
||||
path: str
|
||||
|
||||
class UserJoin:
|
||||
"""
|
||||
Fired when a user joins the workspace
|
||||
"""
|
||||
name: str
|
||||
|
||||
class UserLeave:
|
||||
"""
|
||||
Fired when a user leaves the workspace
|
||||
"""
|
||||
name: str
|
||||
|
||||
class Event:
|
||||
pass
|
||||
"""
|
||||
Workspace events to notify users of changes happening in the workspace.
|
||||
"""
|
||||
FileTreeUpdated: FileTreeUpdated
|
||||
UserJoin: UserJoin
|
||||
UserLeave: UserLeave
|
||||
|
||||
class Workspace:
|
||||
"""
|
||||
|
|
|
@ -3,7 +3,7 @@ pub mod controllers;
|
|||
pub mod workspace;
|
||||
|
||||
use crate::{
|
||||
api::{BufferUpdate, Config, Cursor, Selection, TextChange, User},
|
||||
api::{BufferUpdate, Config, Cursor, Event, Selection, TextChange, User},
|
||||
buffer::Controller as BufferController,
|
||||
cursor::Controller as CursorController,
|
||||
Client, Workspace,
|
||||
|
@ -391,6 +391,7 @@ fn codemp(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|||
m.add_class::<User>()?;
|
||||
|
||||
m.add_class::<Workspace>()?;
|
||||
m.add_class::<Event>()?;
|
||||
m.add_class::<Client>()?;
|
||||
m.add_class::<Config>()?;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue