Import into DevLib.
[bertos.git] / dt / dwidget.c
1 /*!
2  * \file
3  * <!--
4  * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
5  * -->
6  *
7  * \version $Id$
8  *
9  * \brief Widget (implementation).
10  * A widget is typically a graphic object on a device.
11  * Its proproperties are the position, the size and a context on which the widget is drawn.
12  *
13  * \version $Id$
14  * \author Bernardo Innocenti <bernie@develer.com>
15  * \author Francesco Sacchi <batt@ðeveler.com>
16  */
17
18 /*#*
19  *#* $Log$
20  *#* Revision 1.1  2005/11/04 18:26:38  bernie
21  *#* Import into DevLib.
22  *#*
23  *#* Revision 1.3  2005/06/06 11:04:12  batt
24  *#* Add some comments.
25  *#*
26  *#* Revision 1.2  2005/05/26 14:44:10  batt
27  *#* Abstract widget from layer: use context.
28  *#*
29  *#* Revision 1.1  2005/05/26 08:32:53  batt
30  *#* Add new Develer widget system :)
31  *#*
32  *#*/
33
34 #include <dt/dwidget.h>
35 #include <dt/dnotifier.h>
36
37 /*!
38  * Init the widget of \a pos and \a size on the drawing \a context.
39  */
40 void widget_init(DWidget *w, dpos_t pos, dpos_t size, dcontext_t *context)
41 {
42         // Init superclass
43         notifier_init(&w->notifier);
44
45         // Init instance
46         w->pos = pos;
47         w->size = size;
48         w->context = context;
49 }