Added the documentation for macOS uiControl, or what little of it currently exists.
This commit is contained in:
parent
7e3d6d2b1c
commit
89f64eb067
|
@ -4,3 +4,5 @@
|
||||||
* [Initialization and the Main Loop](init-main.md)
|
* [Initialization and the Main Loop](init-main.md)
|
||||||
* [Event Handling](events.md)
|
* [Event Handling](events.md)
|
||||||
* [Controls](controls.md)
|
* [Controls](controls.md)
|
||||||
|
* macOS
|
||||||
|
** [Controls](darwin-controls.md)
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<!-- 10 june 2019 -->
|
||||||
|
|
||||||
|
# Controls on macOS
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
## Reference
|
||||||
|
|
||||||
|
### `uiControlOSVtable`
|
||||||
|
|
||||||
|
```c
|
||||||
|
typedef struct uiControlOSVtable uiControlOSVtable;
|
||||||
|
struct uiControlOSVtable {
|
||||||
|
size_t Size;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
`uiControlOSVtable` describes the set of functions that control implementations on macOS need to implement. When registering your control type, you pass this in as a parameter to `uiRegisterControlType()`. Each method here is required.
|
||||||
|
|
||||||
|
You are responsible for allocating and initializing this struct. To do so, you simply zero the memory for this struct and set its `Size` field to `sizeof (uiControlOSVtable)`. (TODO put this in a common place)
|
||||||
|
|
||||||
|
Each method takes at least two parameters. The first, `c`, is the `uiControl` itself. The second, `implData`, is the implementation data pointer; it is the same as the pointer returned by `uiControlImplData(c)`, and is provided here as a convenience.
|
||||||
|
|
||||||
|
Each method is named for the `uiDarwinControl` function that it implements. As such, details on how to implement these methods are documented alongside those functions. For instance, instructions on implementing `TODO()` are given under the documentation for `TOOD()`.
|
Loading…
Reference in New Issue