summaryrefslogtreecommitdiff
path: root/pkgui.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2018-08-26 17:17:03 -0400
committerPietro Gagliardi <[email protected]>2018-08-26 17:17:03 -0400
commit246950deed73be2c2c6175496b1e72b96f8f4d46 (patch)
tree2c7a3a4e736dac3f335197c72d07ba9c44652c18 /pkgui.c
parent247cdf8d6ff13697dcead9908d97146e0d5171c4 (diff)
Migrated drawtext.go and fontbutton.go.
Diffstat (limited to 'pkgui.c')
-rw-r--r--pkgui.c43
1 files changed, 35 insertions, 8 deletions
diff --git a/pkgui.c b/pkgui.c
index 5d0d55d..081c956 100644
--- a/pkgui.c
+++ b/pkgui.c
@@ -42,14 +42,6 @@ void pkguiColorButtonOnChanged(uiColorButton *c)
uiColorButtonOnChanged(c, pkguiDoColorButtonOnChanged, NULL);
}
-typedef struct pkguiColorDoubles pkguiColorDoubles;
-struct pkguiColorDoubles {
- double *r;
- double *g;
- double *b;
- double *a;
-};
-
pkguiColorDoubles pkguiAllocColorDoubles(void)
{
pkguiColorDoubles c;
@@ -96,6 +88,11 @@ void pkguiEntryOnChanged(uiEntry *e)
uiEntryOnChanged(e, pkguiDoEntryOnChanged, NULL);
}
+void pkguiFontButtonOnChanged(uiFontButton *b)
+{
+ uiFontButtonOnChanged(b, pkguiDoFontButtonOnChanged, NULL);
+}
+
void pkguiMultilineEntryOnChanged(uiMultilineEntry *e)
{
uiMultilineEntryOnChanged(e, pkguiDoMultilineEntryOnChanged, NULL);
@@ -179,3 +176,33 @@ void pkguiFreeMatrix(uiDrawMatrix *m)
{
free(m);
}
+
+uiUnderlineColor *pkguiNewUnderlineColor(void)
+{
+ return (uiUnderlineColor *) pkguiAlloc(sizeof (uiUnderlineColor));
+}
+
+void pkguiFreeUnderlineColor(uiUnderlineColor *c)
+{
+ free(c);
+}
+
+uiFontDescriptor *pkguiNewFontDescriptor(void)
+{
+ return (uiFontDescriptor *) pkguiAlloc(sizeof (uiFontDescriptor));
+}
+
+void pkguiFreeFontDescriptor(uiFontDescriptor *fd)
+{
+ free(fd);
+}
+
+uiDrawTextLayoutParams *pkguiNewDrawTextLayoutParams(void)
+{
+ return (uiDrawTextLayoutParams *) pkguiAlloc(sizeof (uiDrawTextLayoutParams));
+}
+
+void pkguiFreeDrawTextLayoutParams(uiDrawTextLayoutParams *p)
+{
+ free(p);
+}