Started re-adding the uiInit functions, with a new method of returning errors.
This commit is contained in:
parent
db9be102e6
commit
4c46a25154
|
@ -1,3 +1,4 @@
|
|||
<!-- 8 april 2019 -->
|
||||
|
||||
* [Using libui](using-libui.md)
|
||||
* [Initialization and the Main Loop](init-main.md)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<!-- 12 april 2019 -->
|
||||
|
||||
# Initialization and the Main Loop
|
||||
|
||||
## Reference
|
||||
|
||||
### `uiInit()`
|
||||
|
||||
```c
|
||||
int uiInit(void *options, uiInitError *err);
|
||||
```
|
||||
|
||||
### `uiUninit()`
|
||||
|
||||
```c
|
||||
void uiUninit(void);
|
||||
```
|
||||
|
||||
### `uiInitError`
|
||||
|
||||
```c
|
||||
typedef struct uiInitError uiInitError;
|
||||
struct uiInitError {
|
||||
size_t Size;
|
||||
char Message[256];
|
||||
};
|
||||
```
|
10
ui.h
10
ui.h
|
@ -30,6 +30,16 @@ extern "C" {
|
|||
// This has the advantage of being ABI-able should we ever need an ABI...
|
||||
#define uiprivEnum(s) typedef unsigned int s; enum
|
||||
|
||||
typedef struct uiInitError uiInitError;
|
||||
|
||||
struct uiInitError {
|
||||
size_t Size;
|
||||
char Message[256];
|
||||
};
|
||||
|
||||
uiprivExtern int uiInit(void *options, uiInitError *err);
|
||||
uiprivExtern void uiUninit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue