Usermode/AxWin3 - Adding widget mouse input handlers
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / include / renderer_widget.h
1 /*
2  * Acess2 Window Manager v3
3  * - By John Hodge (thePowersGang)
4  *
5  * render_widget.h
6  * - AxWin2 Widget port
7  */
8 #ifndef _RENDERER_WIDGET_H_
9 #define _RENDERER_WIDGET_H_
10
11 #include <wm_renderer.h>
12 #include <axwin3/widget.h>
13
14 #include <widget_messages.h>
15
16 // === TYPES ===
17 typedef struct sWidgetWin       tWidgetWin;
18 typedef struct sAxWin_Element   tElement;
19
20 // === STRUCTURES ===
21 struct sAxWin_Element
22 {
23         enum eElementTypes      Type;
24
25         tWindow         *Window;
26         uint32_t        ID;     //!< Application provided ID number
27         tElement        *ListNext;      //!< Next element in bucket
28         
29         // Element Tree
30         tElement        *Parent;
31         tElement        *FirstChild;
32         tElement        *LastChild;
33         tElement        *NextSibling;
34         
35         // User modifiable attributes   
36         short   PaddingL, PaddingR;
37         short   PaddingT, PaddingB;
38         short   GapSize;
39         
40         uint32_t        Flags;
41         
42         short   FixedWith;      //!< Fixed lengthways Size attribute (height)
43         short   FixedCross;     //!< Fixed Cross Size attribute (width)
44         
45         tColour BackgroundColour;
46
47         char    *Text;
48         
49         // -- Attributes maitained by the element code
50         // Not touched by the user
51         short   MinWith;        //!< Minimum long size
52         short   MinCross;       //!< Minimum cross size
53         void    *Data;  //!< Per-type data
54         
55         // -- Render Cache
56         short   CachedX, CachedY;
57         short   CachedW, CachedH;
58 };
59 struct sWidgetWin
60 {
61         tElement        RootElement;
62         
63          int    TableSize;      //!< Number of entries, anything over will wrap
64         tElement        *ElementTable[];        //!< Hash table essentially
65 };
66
67 // === FUNCTIONS === 
68 extern void     Widget_Decorator_RenderWidget(tWindow *Window, tElement *Element);
69
70 #endif
71

UCC git Repository :: git.ucc.asn.au