Add extra information to docs

This commit is contained in:
buffet 2020-01-09 13:53:23 +00:00
parent 4ab7adb1bc
commit 775fe9a5ad

View file

@ -81,11 +81,17 @@ Returns the view at the cursor position, or `nil` if there is none.
A mouse button got pressed. A mouse button got pressed.
Callback receives the ID of the button (i.e. LMB is 1, RMB is 2, ...). Callback receives the ID of the button (i.e. LMB is 1, RMB is 2, ...).
The callback is supposed to return `true` if the event was handled.
The compositor will not forward it to the view under the cursor.
#### button_up #### button_up
A mouse button got released. A mouse button got released.
Callback receives the ID of the button (i.e. LMB is 1, RMB is 2, ...). Callback receives the ID of the button (i.e. LMB is 1, RMB is 2, ...).
The callback is supposed to return `true` if the event was handled.
The compositor will not forward it to the view under the cursor.
#### motion #### motion
The cursor got moved. The cursor got moved.
@ -113,11 +119,17 @@ Used to register event listeners.
A key got pressed. A key got pressed.
Callback receives a table containing the `key` and the `keyboard`). Callback receives a table containing the `key` and the `keyboard`).
The callback is supposed to return `true` if the event was handled.
The compositor will not forward it to the focused view in that case.
#### key_up #### key_up
A key got released. A key got released.
Callback receives a table containing the `key` and the `keyboard`). Callback receives a table containing the `key` and the `keyboard`).
The callback is supposed to return `true` if the event was handled.
The compositor will not forward it to the focused view in that case.
## kiwmi_lua_callback ## kiwmi_lua_callback
A handle to a registered callback. A handle to a registered callback.
@ -219,6 +231,8 @@ Unhides the view.
Returns the size of the view. Returns the size of the view.
**NOTE**: Used directly after `view:resize()`, this still returns the old size.
#### view:tiled(edges) #### view:tiled(edges)
Takes a table containing all edges that are tiled, or a bool to indicate all 4 edges. Takes a table containing all edges that are tiled, or a bool to indicate all 4 edges.