And implemented the bare bones of uiControlOSVtable on GTK+.

This commit is contained in:
Pietro Gagliardi 2019-06-18 20:19:32 -04:00
parent 4649e7d632
commit 80ada0a06b
5 changed files with 29 additions and 0 deletions

View File

@ -23,6 +23,7 @@ elif libui_OS == 'darwin'
else
libui_test_sources += [
'controls_unix.c',
'controls_unix_errors.cpp',
]
endif

3
test/test_unix.h Normal file
View File

@ -0,0 +1,3 @@
// 10 june 2019
#define libuiOSHeader "../ui_unix.h"
#include "test.h"

View File

@ -11,6 +11,10 @@ This file assumes that you have included <gtk/gtk.h> and "ui.h" beforehand. It p
extern "C" {
#endif
struct uiControlOSVtable {
size_t Size;
};
#ifdef __cplusplus
}
#endif

20
unix/controls.c Normal file
View File

@ -0,0 +1,20 @@
// 8 june 2019
#include "uipriv_unix.h"
bool uiprivOSVtableValid(const uiControlOSVtable *osVtable, const char *func)
{
if (osVtable->Size != sizeof (uiControlOSVtable)) {
uiprivProgrammerErrorWrongStructSize(osVtable->Size, "uiControlOSVtable", func);
return false;
}
return true;
}
uiControlOSVtable *uiprivCloneOSVtable(const uiControlOSVtable *osVtable)
{
uiControlOSVtable *v2;
v2 = uiprivNew(uiControlOSVtable);
*v2 = *osVtable;
return v2;
}

View File

@ -1,6 +1,7 @@
# 23 march 2019
libui_sources += [
'unix/controls.c',
'unix/main.c',
]