diff --git a/darwin/opentype.m b/darwin/opentype.m new file mode 100644 index 00000000..4273b80f --- /dev/null +++ b/darwin/opentype.m @@ -0,0 +1,52 @@ +// 11 may 2017 +#include "uipriv_windows.hpp" + +struct uiOpenTypeFeatures { + xxxx; +}; + +uiOpenTypeFeatures *uiNewOpenTypeFeatures(void) +{ + uiOpenTypeFeatures *otf; + + otf = uiNew(uiOpenTypeFeatures); + xxxx; + return otf; +} + +void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf) +{ + xxxxxx; + uiFree(otf); +} + +uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf) +{ + uiOpenTypeFeatures *out; + + out = uiNew(uiOpenTypeFeatures); + xxxxxx; + return out; +} + +void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value) +{ +} + +void uiOpenTypeFeaturesRemove(uiOpenTypeFeatures *otf, char a, char b, char c, char d) +{ +} + +int uiOpenTypeFeaturesGet(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t *value) +{ +} + +void uiOpenTypeFeaturesForEach(uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEachFunc f, void *data) +{ +} + +int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b) +{ +} + +// TODO put the internal function to produce a backend object from one here diff --git a/ui_attrstr.h b/ui_attrstr.h index 0077b6ee..f7c03b03 100644 --- a/ui_attrstr.h +++ b/ui_attrstr.h @@ -220,13 +220,19 @@ _UI_ENUM(uiAttributeCapForm) { // TODO rename? typedef struct uiOpenTypeFeatures uiOpenTypeFeatures; +// TODO pass the feature set? +typedef int (*uiOpenTypeFeaturesForEachFunc)(char a, char b, char c, char d, uint32_t value, void *data); // TODO detailed constructor? _UI_EXTERN uiOpenTypeFeatures *uiNewOpenTypeFeatures(void); _UI_EXTERN void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf); +// TODO put above Free? +// TODO Copy instead of Clone? _UI_EXTERN uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf); _UI_EXTERN void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value); -// TODO remove, query, enumerate -// TODO make the compare function public? +_UI_EXTERN void uiOpenTypeFeaturesRemove(uiOpenTypeFeatures *otf, char a, char b, char c, char d); +_UI_EXTERN int uiOpenTypeFeaturesGet(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t *value); +_UI_EXTERN void uiOpenTypeFeaturesForEach(uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEachFunc f, void *data); +_UI_EXTERN int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b); typedef struct uiAttributeSpec uiAttributeSpec; @@ -240,6 +246,7 @@ struct uiAttributeSpec { double A; }; +// TODO name the foreach return values typedef int (*uiAttributedStringForEachAttributeFunc)(uiAttributedString *s, uiAttributeSpec *spec, size_t start, size_t end, void *data); // @role uiAttributedString constructor diff --git a/unix/opentype.c b/unix/opentype.c new file mode 100644 index 00000000..4273b80f --- /dev/null +++ b/unix/opentype.c @@ -0,0 +1,52 @@ +// 11 may 2017 +#include "uipriv_windows.hpp" + +struct uiOpenTypeFeatures { + xxxx; +}; + +uiOpenTypeFeatures *uiNewOpenTypeFeatures(void) +{ + uiOpenTypeFeatures *otf; + + otf = uiNew(uiOpenTypeFeatures); + xxxx; + return otf; +} + +void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf) +{ + xxxxxx; + uiFree(otf); +} + +uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf) +{ + uiOpenTypeFeatures *out; + + out = uiNew(uiOpenTypeFeatures); + xxxxxx; + return out; +} + +void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value) +{ +} + +void uiOpenTypeFeaturesRemove(uiOpenTypeFeatures *otf, char a, char b, char c, char d) +{ +} + +int uiOpenTypeFeaturesGet(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t *value) +{ +} + +void uiOpenTypeFeaturesForEach(uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEachFunc f, void *data) +{ +} + +int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b) +{ +} + +// TODO put the internal function to produce a backend object from one here diff --git a/windows/opentype.cpp b/windows/opentype.cpp new file mode 100644 index 00000000..4273b80f --- /dev/null +++ b/windows/opentype.cpp @@ -0,0 +1,52 @@ +// 11 may 2017 +#include "uipriv_windows.hpp" + +struct uiOpenTypeFeatures { + xxxx; +}; + +uiOpenTypeFeatures *uiNewOpenTypeFeatures(void) +{ + uiOpenTypeFeatures *otf; + + otf = uiNew(uiOpenTypeFeatures); + xxxx; + return otf; +} + +void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf) +{ + xxxxxx; + uiFree(otf); +} + +uiOpenTypeFeatures *uiOpenTypeFeaturesClone(uiOpenTypeFeatures *otf) +{ + uiOpenTypeFeatures *out; + + out = uiNew(uiOpenTypeFeatures); + xxxxxx; + return out; +} + +void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value) +{ +} + +void uiOpenTypeFeaturesRemove(uiOpenTypeFeatures *otf, char a, char b, char c, char d) +{ +} + +int uiOpenTypeFeaturesGet(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t *value) +{ +} + +void uiOpenTypeFeaturesForEach(uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEachFunc f, void *data) +{ +} + +int uiOpenTypeFeaturesEqual(uiOpenTypeFeatures *a, uiOpenTypeFeatures *b) +{ +} + +// TODO put the internal function to produce a backend object from one here