summaryrefslogtreecommitdiff
path: root/src/testWidget.c
diff options
context:
space:
mode:
authorguillaume <guillaume>2007-01-29 02:46:37 +0000
committerguillaume <guillaume>2007-01-29 02:46:37 +0000
commit623e9ea41083fe2cd3f90e059f1d82e492fa2a93 (patch)
tree7e0a0561833c06f26a40fac2c3ce5e7a85a6ba9d /src/testWidget.c
parent7b9475d05b6135601b9d19fc1f7769a95460fb4d (diff)
downloadberyl-desktop-manager-623e9ea41083fe2cd3f90e059f1d82e492fa2a93.tar.gz
beryl-desktop-manager-623e9ea41083fe2cd3f90e059f1d82e492fa2a93.tar.bz2
bdm: add test text widget
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;