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
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disconnectChild(struct winodwImplData *wi)
|
static void disconnectChild(struct windowImplData *wi)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
// 31 may 2020
|
// 31 may 2020
|
||||||
#include "uipriv_haiku.hpp"
|
#include "uipriv_haiku.hpp"
|
||||||
|
|
||||||
|
uiControl *uiprivSysWindowChild(uiWindow *w)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
void uiprivSysWindowSetChild(uiWindow *w, uiControl *child)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
struct windowImplData {
|
struct windowImplData {
|
||||||
BWindow *window;
|
BWindow *window;
|
||||||
char *title;
|
char *title;
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
// 10 june 2019
|
// 10 june 2019
|
||||||
#import "test_darwin.h"
|
#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;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uiControlOSVtable osVtable = {
|
static const uiControlOSVtable osVtable = {
|
||||||
.Size = sizeof (uiControlOSVtable),
|
.Size = sizeof (uiControlOSVtable),
|
||||||
.Handle = osVtableNopHandle,
|
.Handle = testControlHandle,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uiControlOSVtable *testOSVtable(void)
|
const uiControlOSVtable *testControlOSVtable(void)
|
||||||
{
|
{
|
||||||
return &osVtable;
|
return &osVtable;
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(WrongControlOSVtableSizeIsProgrammerError)
|
Test(WrongControlOSVtableSizeIsProgrammerError)
|
||||||
{
|
{
|
||||||
uiControlVtable vtable;
|
|
||||||
uiControlOSVtable osvt;
|
uiControlOSVtable osvt;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
|
||||||
testControlLoadNopVtable(&vtable);
|
|
||||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
||||||
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
||||||
osvt.Size = 1;
|
osvt.Size = 1;
|
||||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||||
endCheckProgrammerError(ctx);
|
endCheckProgrammerError(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
||||||
{
|
{
|
||||||
uiControlVtable vtable;
|
|
||||||
uiControlOSVtable osvt;
|
uiControlOSVtable osvt;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
|
||||||
testControlLoadNopVtable(&vtable);
|
|
||||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
||||||
osvt = osVtable;
|
osvt = osVtable;
|
||||||
osvt.Handle = NULL;
|
osvt.Handle = NULL;
|
||||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||||
endCheckProgrammerError(ctx);
|
endCheckProgrammerError(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
// 18 january 2020
|
// 18 january 2020
|
||||||
#include "test_haiku.hpp"
|
#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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,40 +15,36 @@ static const uiControlOSVtable osVtable = [](void) {
|
||||||
|
|
||||||
memset(&vt, 0, sizeof (uiControlOSVtable));
|
memset(&vt, 0, sizeof (uiControlOSVtable));
|
||||||
vt.Size = sizeof (uiControlOSVtable);
|
vt.Size = sizeof (uiControlOSVtable);
|
||||||
vt.Handle = osVtableNopHandle;
|
vt.Handle = testControlHandle;
|
||||||
return vt;
|
return vt;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
const uiControlOSVtable *testOSVtable(void)
|
const uiControlOSVtable *testControlOSVtable(void)
|
||||||
{
|
{
|
||||||
return &osVtable;
|
return &osVtable;
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(WrongControlOSVtableSizeIsProgrammerError)
|
Test(WrongControlOSVtableSizeIsProgrammerError)
|
||||||
{
|
{
|
||||||
uiControlVtable vtable;
|
|
||||||
uiControlOSVtable osvt;
|
uiControlOSVtable osvt;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
|
||||||
testControlLoadNopVtable(&vtable);
|
|
||||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
||||||
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
||||||
osvt.Size = 1;
|
osvt.Size = 1;
|
||||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||||
endCheckProgrammerError(ctx);
|
endCheckProgrammerError(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
||||||
{
|
{
|
||||||
uiControlVtable vtable;
|
|
||||||
uiControlOSVtable osvt;
|
uiControlOSVtable osvt;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
|
||||||
testControlLoadNopVtable(&vtable);
|
|
||||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
||||||
osvt = osVtable;
|
osvt = osVtable;
|
||||||
osvt.Handle = NULL;
|
osvt.Handle = NULL;
|
||||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||||
endCheckProgrammerError(ctx);
|
endCheckProgrammerError(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
// 10 june 2019
|
// 10 june 2019
|
||||||
#include "test_unix.h"
|
#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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uiControlOSVtable osVtable = {
|
static const uiControlOSVtable osVtable = {
|
||||||
.Size = sizeof (uiControlOSVtable),
|
.Size = sizeof (uiControlOSVtable),
|
||||||
.Handle = osVtableNopHandle,
|
.Handle = testControlHandle,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uiControlOSVtable *testOSVtable(void)
|
const uiControlOSVtable *testControlOSVtable(void)
|
||||||
{
|
{
|
||||||
return &osVtable;
|
return &osVtable;
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(WrongControlOSVtableSizeIsProgrammerError)
|
Test(WrongControlOSVtableSizeIsProgrammerError)
|
||||||
{
|
{
|
||||||
uiControlVtable vtable;
|
|
||||||
uiControlOSVtable osvt;
|
uiControlOSVtable osvt;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
|
||||||
testControlLoadNopVtable(&vtable);
|
|
||||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): wrong size 1 for uiControlOSVtable");
|
||||||
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
memset(&osvt, 0, sizeof (uiControlOSVtable));
|
||||||
osvt.Size = 1;
|
osvt.Size = 1;
|
||||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||||
endCheckProgrammerError(ctx);
|
endCheckProgrammerError(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
Test(ControlOSVtableWithMissingHandleMethodIsProgrammerError)
|
||||||
{
|
{
|
||||||
uiControlVtable vtable;
|
|
||||||
uiControlOSVtable osvt;
|
uiControlOSVtable osvt;
|
||||||
void *ctx;
|
void *ctx;
|
||||||
|
|
||||||
testControlLoadNopVtable(&vtable);
|
|
||||||
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
ctx = beginCheckProgrammerError("uiRegisterControlType(): required uiControlOSVtable method Handle() missing for uiControl type name");
|
||||||
osvt = osVtable;
|
osvt = osVtable;
|
||||||
osvt.Handle = NULL;
|
osvt.Handle = NULL;
|
||||||
uiRegisterControlType("name", &vtable, &osvt, 0);
|
uiRegisterControlType("name", testControlVtable(), &osvt, 0);
|
||||||
endCheckProgrammerError(ctx);
|
endCheckProgrammerError(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
// 11 june 2015
|
// 11 june 2015
|
||||||
#include "uipriv_unix.h"
|
#include "uipriv_unix.h"
|
||||||
|
|
||||||
|
uiControl *uiprivSysWindowChild(uiWindow *w)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
void uiprivSysWindowSetChild(uiWindow *w, uiControl *child)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
struct windowImplData {
|
struct windowImplData {
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkContainer *container;
|
GtkContainer *container;
|
||||||
|
|
Loading…
Reference in New Issue