updated Readme
This commit is contained in:
parent
a37cdb60f1
commit
047e542f36
10
Readme.md
10
Readme.md
@ -36,7 +36,7 @@ Summary: It is only responsible for the actual user interface
|
|||||||
## Example
|
## Example
|
||||||
```c
|
```c
|
||||||
/* allocate memory to hold the draw commands */
|
/* allocate memory to hold the draw commands */
|
||||||
gui_command_buffer buffer;
|
struct gui_command_buffer buffer;
|
||||||
void *memory = malloc(MEMORY_SIZE)
|
void *memory = malloc(MEMORY_SIZE)
|
||||||
gui_command_buffer_init_fixed(buffer, memory, MEMORY_SIZE);
|
gui_command_buffer_init_fixed(buffer, memory, MEMORY_SIZE);
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ alloc.alloc = your_allocation_callback;
|
|||||||
alloc.relloac = your_reallocation_callback;
|
alloc.relloac = your_reallocation_callback;
|
||||||
alloc.free = your_free_callback;
|
alloc.free = your_free_callback;
|
||||||
|
|
||||||
gui_command_buffer buffer;
|
struct gui_command_buffer buffer;
|
||||||
const gui_size initial_size = 4*1024;
|
const gui_size initial_size = 4*1024;
|
||||||
const gui_float grow_factor = 2.0f;
|
const gui_float grow_factor = 2.0f;
|
||||||
gui_command_buffer_init(&buffer, &alloc, initial_size, grow_factor);
|
gui_command_buffer_init(&buffer, &alloc, initial_size, grow_factor);
|
||||||
@ -211,7 +211,7 @@ and returns the from the user input modified state of the widget.
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
|
|
||||||
gui_command_buffer buffer;
|
struct gui_command_buffer buffer;
|
||||||
void *memory = malloc(MEMORY_SIZE)
|
void *memory = malloc(MEMORY_SIZE)
|
||||||
gui_buffer_init_fixed(buffer, memory, MEMORY_SIZE);
|
gui_buffer_init_fixed(buffer, memory, MEMORY_SIZE);
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ have to be drawn in a certain order.
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
/* allocate buffer to hold output */
|
/* allocate buffer to hold output */
|
||||||
gui_command_buffer buffer;
|
struct gui_command_buffer buffer;
|
||||||
gui_buffer_init_fixed(buffer, memory, size);
|
gui_buffer_init_fixed(buffer, memory, size);
|
||||||
|
|
||||||
/* setup configuration data */
|
/* setup configuration data */
|
||||||
@ -313,7 +313,7 @@ horizontally or vertically. The combination of slots, ratio and multiple panels
|
|||||||
per slots support a rich set of vertical, horizontal and mixed layouts.
|
per slots support a rich set of vertical, horizontal and mixed layouts.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
gui_command_buffer buffer;
|
struct gui_command_buffer buffer;
|
||||||
gui_buffer_init_fixed(buffer, memory, size);
|
gui_buffer_init_fixed(buffer, memory, size);
|
||||||
|
|
||||||
struct gui_config config;
|
struct gui_config config;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user