2 * Acess2 Window Manager v3
3 * - By John Hodge (thePowersGang)
9 #include <wm_renderer.h>
10 #include <renderer_widget.h>
13 typedef struct sWidgetWin tWidgetWin;
14 typedef struct sAxWin_Element tElement;
19 enum eElementTypes Type;
25 tElement *NextSibling;
28 tApplication *Owner; //!< Owning application
29 uint16_t ApplicationID; //!< Index into sApplication::EleIndex
31 // User modifiable attributes
32 short PaddingL, PaddingR;
33 short PaddingT, PaddingB;
38 short FixedWith; //!< Fixed lengthways Size attribute (height)
39 short FixedCross; //!< Fixed Cross Size attribute (width)
43 // -- Attributes maitained by the element code
44 // Not touched by the user
45 short MinWith; //!< Minimum long size
46 short MinCross; //!< Minimum cross size
47 void *Data; //!< Per-type data
50 short CachedX, CachedY;
51 short CachedW, CachedH;
61 tWindow *Renderer_Widget_Create(int Width, int Height, int Flags);
62 void Renderer_Widget_Redraw(tWindow *Window);
63 int Renderer_Widget_HandleMessage(tWindow *Target, int Msg, int Len, void *Data);
66 tWMRenderer gRenderer_Widget = {
68 .CreateWindow = Renderer_Widget_Create,
69 .Redraw = Renderer_Widget_Redraw,
70 .HandleMessage = Renderer_Widget_HandleMessage
74 int Renderer_Widget_Init(void)
76 WM_RegisterRenderer(&gRenderer_Widget);
81 tWindow *Renderer_Widget_Create(int Width, int Height, int Flags)
84 return WM_CreateWindowStruct( sizeof(tWidgetWin) );
87 void Renderer_Widget_Redraw(tWindow *Window)
91 int Renderer_Widget_HandleMessage(tWindow *Target, int Msg, int Len, void *Data)
93 tWidgetWin *info = Target->RendererInfo;
97 return 1; // Unhandled