Add `void *user` into `struct uiControl`

This pointer dedicated to user program, libui should not touch it in any way.
If available, user program (or language binder) can avoid many ugly and dirty tricks.
8 bytes for each control is small cost for that flexibility.
This commit is contained in:
Mike Sinkovsky 2018-06-13 17:58:30 +05:00
parent cda991b7e2
commit db53ca5d5f
1 changed files with 1 additions and 0 deletions

1
ui.h
View File

@ -80,6 +80,7 @@ struct uiControl {
uint32_t Signature;
uint32_t OSSignature;
uint32_t TypeSignature;
void *user;
void (*Destroy)(uiControl *);
uintptr_t (*Handle)(uiControl *);
uiControl *(*Parent)(uiControl *);