And applied the test changes to the other platforms. Back to focusing on Windows now.
This commit is contained in:
parent
c241e8676a
commit
d80f0e4812
|
@ -398,7 +398,7 @@ static void connectChild(struct windowImplData *wi)
|
|||
// TODO
|
||||
}
|
||||
|
||||
static void disconnectChild(struct winodwImplData *wi)
|
||||
static void disconnectChild(struct windowImplData *wi)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
// 31 may 2020
|
||||
#include "uipriv_haiku.hpp"
|
||||
|
||||
uiControl *uiprivSysWindowChild(uiWindow *w)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
void uiprivSysWindowSetChild(uiWindow *w, uiControl *child)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
struct windowImplData {
|
||||
BWindow *window;
|
||||
char *title;
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
// 10 june 2019
|
||||
#import "test_darwin.h"
|
||||
|
||||
static id osVtableNopHandle(uiControl *c, void *implData)
|
||||
static id testControlHandle(uiControl *c, void *implData)
|
||||
{
|
||||
struct testControlImplData *ti = (struct testControlImplData *) implData;
|
||||
|
||||
if (ti->realOSVtable != NULL && ti->realOSVtable->Handle != NULL)
|
||||
return (*(ti->realOSVtable->Handle))(c, ti->realImplData);
|
||||
return nil;
|
||||
}
|
||||
|
||||
static const uiControlOSVtable osVtable = {
|
||||
.Size = sizeof (uiControlOSVtable),
|
||||
.Handle = osVtableNopHandle,
|
||||
.Handle = testControlHandle,
|
||||
};
|
||||
|
||||
const uiControlOSVtable *testOSVtable(void)
|
||||
const uiControlOSVtable *testControlOSVtable(void)
|
||||
{
|
||||
return &osVtable;
|
||||
}
|
||||
|
||||
Test(WrongControlOSVtableSizeIsProgrammerError)
|
||||
{
|
||||
uiControlVtable vtable;
|
||||
uiControlOSVtable osvt;
|
||||
void *ctx;
|
||||
|
||||
testControlLoadNopVtable(&vtable);
|
||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
||||
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
||||
osvt.Size = 1;
|
||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
||||
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||
endCheckProgrammerError(ctx);
|
||||
}
|
||||
|
||||
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
||||
{
|
||||
uiControlVtable vtable;
|
||||
uiControlOSVtable osvt;
|
||||
void *ctx;
|
||||
|
||||
testControlLoadNopVtable(&vtable);
|
||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
||||
osvt = osVtable;
|
||||
osvt.Handle = NULL;
|
||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
||||
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||
endCheckProgrammerError(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
// 18 january 2020
|
||||
#include "test_haiku.hpp"
|
||||
|
||||
static void *osVtableNopHandle(uiControl *c, void *implData)
|
||||
static void *testControlHandle(uiControl *c, void *implData)
|
||||
{
|
||||
struct testControlImplData *ti = (struct testControlImplData *) implData;
|
||||
|
||||
if (ti->realOSVtable != NULL && ti->realOSVtable->Handle != NULL)
|
||||
return (*(ti->realOSVtable->Handle))(c, ti->realImplData);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -11,40 +15,36 @@ static const uiControlOSVtable osVtable = [](void) {
|
|||
|
||||
memset(&vt, 0, sizeof (uiControlOSVtable));
|
||||
vt.Size = sizeof (uiControlOSVtable);
|
||||
vt.Handle = osVtableNopHandle;
|
||||
vt.Handle = testControlHandle;
|
||||
return vt;
|
||||
}();
|
||||
|
||||
const uiControlOSVtable *testOSVtable(void)
|
||||
const uiControlOSVtable *testControlOSVtable(void)
|
||||
{
|
||||
return &osVtable;
|
||||
}
|
||||
|
||||
Test(WrongControlOSVtableSizeIsProgrammerError)
|
||||
{
|
||||
uiControlVtable vtable;
|
||||
uiControlOSVtable osvt;
|
||||
void *ctx;
|
||||
|
||||
testControlLoadNopVtable(&vtable);
|
||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
||||
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
||||
osvt.Size = 1;
|
||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
||||
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||
endCheckProgrammerError(ctx);
|
||||
}
|
||||
|
||||
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
||||
{
|
||||
uiControlVtable vtable;
|
||||
uiControlOSVtable osvt;
|
||||
void *ctx;
|
||||
|
||||
testControlLoadNopVtable(&vtable);
|
||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
||||
osvt = osVtable;
|
||||
osvt.Handle = NULL;
|
||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
||||
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||
endCheckProgrammerError(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
// 10 june 2019
|
||||
#include "test_unix.h"
|
||||
|
||||
static GtkWidget *osVtableNopHandle(uiControl *c, void *implData)
|
||||
static GtkWidget *testControlHandle(uiControl *c, void *implData)
|
||||
{
|
||||
struct testControlImplData *ti = (struct testControlImplData *) implData;
|
||||
|
||||
if (ti->realOSVtable != NULL && ti->realOSVtable->Handle != NULL)
|
||||
return (*(ti->realOSVtable->Handle))(c, ti->realImplData);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const uiControlOSVtable osVtable = {
|
||||
.Size = sizeof (uiControlOSVtable),
|
||||
.Handle = osVtableNopHandle,
|
||||
.Handle = testControlHandle,
|
||||
};
|
||||
|
||||
const uiControlOSVtable *testOSVtable(void)
|
||||
const uiControlOSVtable *testControlOSVtable(void)
|
||||
{
|
||||
return &osVtable;
|
||||
}
|
||||
|
||||
Test(WrongControlOSVtableSizeIsProgrammerError)
|
||||
{
|
||||
uiControlVtable vtable;
|
||||
uiControlOSVtable osvt;
|
||||
void *ctx;
|
||||
|
||||
testControlLoadNopVtable(&vtable);
|
||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
||||
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
||||
osvt.Size = 1;
|
||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
||||
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||
endCheckProgrammerError(ctx);
|
||||
}
|
||||
|
||||
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
||||
{
|
||||
uiControlVtable vtable;
|
||||
uiControlOSVtable osvt;
|
||||
void *ctx;
|
||||
|
||||
testControlLoadNopVtable(&vtable);
|
||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
||||
osvt = osVtable;
|
||||
osvt.Handle = NULL;
|
||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
||||
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||
endCheckProgrammerError(ctx);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
// 11 june 2015
|
||||
#include "uipriv_unix.h"
|
||||
|
||||
uiControl *uiprivSysWindowChild(uiWindow *w)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
void uiprivSysWindowSetChild(uiWindow *w, uiControl *child)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
struct windowImplData {
|
||||
GtkWidget *widget;
|
||||
GtkContainer *container;
|
||||
|
|
Loading…
Reference in New Issue