Skip to content

Commit 0f6ac26

Browse files
committed
Update plugin api
1 parent 60b2041 commit 0f6ac26

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/generated/plugin_api_host.nim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ type
1515
Cursor* = object
1616
line*: int32
1717
column*: int32
18+
## The column of 'last' is exclusive.
1819
Selection* = object
1920
first*: Cursor
2021
last*: Cursor
2122
Vec2f* = object
2223
x*: float32
2324
y*: float32
25+
Rect* = object
26+
pos*: Vec2f
27+
size*: Vec2f
2428
## Shared reference to a rope. The rope data is stored in the editor, not in the plugin, so ropes
2529
## can be used to efficiently access any document content or share a string with another plugin.
2630
## Ropes are reference counted internally, and this resource also affects that reference count.

wit/v0/api.wit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ interface types {
88
column: s32,
99
}
1010

11+
/// The column of 'last' is exclusive.
1112
record selection {
1213
first: cursor,
1314
last: cursor,
@@ -18,6 +19,11 @@ interface types {
1819
y: f32,
1920
}
2021

22+
record rect {
23+
pos: vec2f,
24+
size: vec2f,
25+
}
26+
2127
/// Shared reference to a rope. The rope data is stored in the editor, not in the plugin, so ropes
2228
/// can be used to efficiently access any document content or share a string with another plugin.
2329
/// Ropes are reference counted internally, and this resource also affects that reference count.

0 commit comments

Comments
 (0)