summaryrefslogtreecommitdiff
path: root/src/testWidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testWidget.c')
-rw-r--r--src/testWidget.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/testWidget.c b/src/testWidget.c
index 0f7da4d..d55c3d6 100644
--- a/src/testWidget.c
+++ b/src/testWidget.c
@@ -7,7 +7,7 @@ BDMWidget * mywidget;
int init (BDMWidget * widget)
{
images = malloc(sizeof(BDMImage));
- texts = NULL;
+ texts = malloc(sizeof(BDMText));
mywidget = widget;
images->attrib = malloc(sizeof(BDMPaintAttribs));
@@ -17,6 +17,7 @@ int init (BDMWidget * widget)
images->attrib->alpha = 1.0f;
images->attrib->width = 100;
images->attrib->height = 100;
+ images->attrib->xrot = 0;
images->attrib->needsPainting = 1;
images->attrib->cairoOperator = CAIRO_OPERATOR_OVER;
images->attrib->updateFont = 0;
@@ -28,6 +29,34 @@ int init (BDMWidget * widget)
images->pixbuf = gdk_pixbuf_new_from_file("./babytux.png",NULL);
images->pixW = gdk_pixbuf_get_width(images->pixbuf);
images->pixH = gdk_pixbuf_get_height(images->pixbuf);
+
+ texts->attrib = malloc(sizeof(BDMPaintAttribs));
+
+ texts->attrib->x = 100;
+ texts->attrib->y = 100;
+ texts->attrib->alpha = 1.0f;
+ texts->attrib->width = 100;
+ texts->attrib->height = 100;
+ texts->attrib->xrot = 0;
+ texts->attrib->needsPainting = 1;
+ texts->attrib->cairoOperator = CAIRO_OPERATOR_OVER;
+ texts->attrib->updateFont = 1;
+
+ texts->next = 0;
+ texts->prev = 0;
+ texts->widget = widget;
+
+ texts->font = NULL;
+ texts->text = "Beryl? Sexy stuff!";
+ texts->family = "Sans";
+ texts->size = 20;
+ texts->color[0] = 0x0;
+ texts->color[1] = 0x0;
+ texts->color[2] = 0x0;
+ texts->color[3] = 0xffff;
+ texts->style = 0;
+ texts->ellipsize = 0;
+
widget->attrib->needsPainting = 1;
return 1;