summaryrefslogtreecommitdiff
path: root/src/testWidget.c
blob: 0f7da4dc596de261d84ed931f8ad39b548367a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "bdm-widget.h"
#include <cairo/cairo.h>

BDMImage * images;
BDMText * texts;
BDMWidget * mywidget;
int init (BDMWidget * widget)
{
	images = malloc(sizeof(BDMImage));
	texts = NULL;
	mywidget = widget;

	images->attrib = malloc(sizeof(BDMPaintAttribs));

	images->attrib->x = 500;
	images->attrib->y = 500;
	images->attrib->alpha = 1.0f;
	images->attrib->width = 100;
	images->attrib->height = 100;
	images->attrib->needsPainting = 1;
	images->attrib->cairoOperator = CAIRO_OPERATOR_OVER;
	images->attrib->updateFont = 0;

	images->next = 0;
	images->prev = 0;
	images->widget = 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);
	widget->attrib->needsPainting = 1;
	return 1;
	
	// Initialize images and texts
}

int fini (void)
{
	// STUFF
	return 1;
}

int update (void)
{
	// BLA
	images->attrib->x+=1;
	return 1;
}

BDMImage * getImages(void)
{
	return images;
}

BDMText * getTexts(void)
{
	return texts;
}

int handleEvent(BDMEvent * event)
{
	return 1;
}