Started layout out the uiControl stuff. I forgot to write tests for uiFreeEvent() errors :|
This commit is contained in:
parent
12c01d0d42
commit
d040bca07e
|
@ -8,10 +8,16 @@ TODO
|
|||
|
||||
## Reference
|
||||
|
||||
### `xxx`
|
||||
### `uiControl`
|
||||
|
||||
```c
|
||||
TODO
|
||||
typedef struct uiControl uiControl;
|
||||
uint32_t uiControlType(void);
|
||||
#define uiControl(obj) ((uiControl *) uiCheckControlType((obj), uiControlType()))
|
||||
```
|
||||
|
||||
TODO
|
||||
`uiControl` is an opaque type that describes a control.
|
||||
|
||||
`uiControl()` is a conversion macro for casting a pointer of a specific control type (or a `void *`) to `uiControl` while also checking for errors.
|
||||
|
||||
`uiControlType()` is the type identifier of a `uiControl` as passed to `uiControlCheckType()`. You rarely need to call this directly; the `uiControl()` conversion macro does this for you.
|
||||
|
|
5
ui.h
5
ui.h
|
@ -61,6 +61,11 @@ uiprivExtern void uiEventFire(uiEvent *e, void *sender, void *args);
|
|||
uiprivExtern bool uiEventHandlerBlocked(const uiEvent *e, int id);
|
||||
uiprivExtern void uiEventSetHandlerBlocked(uiEvent *e, int id, bool blocked);
|
||||
|
||||
typedef struct uiControl uiControl;
|
||||
|
||||
uiprivExtern uint32_t uiControlType(void);
|
||||
#define uiControl(obj) ((uiControl *) uiCheckControlType((obj), uiControlType()))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue