2 * Acess2 Window Manager v3 (axwin3)
3 * - By John Hodge (thePowersGang)
5 * include/wm_renderer.h
6 * - Window renderer API
8 #ifndef _WM_RENDERER_H_
9 #define _WM_RENDERER_H_
12 #include <wm_internals.h>
17 * \brief Internal pointer to next loaded renderer
19 struct sWMRenderer *Next;
22 * \brief Renderer name / identifier
27 * \brief Initialise a window structure for the renderer
28 * \param W Width of the new window
29 * \param H Height of the new window
30 * \param Flags Flags for the window
31 * \return malloc()'d window structure, or NULL on error
32 * \note Only the fields \a W and \a H need be filled in the window
33 * structure, the rest will be filled by the caller.
35 tWindow *(*CreateWindow)(int W, int H, int Flags);
38 * \brief Redraw a window on the screen
39 * \param Window Window to render
41 * Called when a window needs to be re-rendered, e.g. when it is uncovered or
44 * \todo List all conditions for Redraw
46 void (*Redraw)(tWindow *Window);
49 * \brief Handle a message sent to the window using WM_SendMessage
50 * \param Window Target window
51 * \param MessageID Implementation defined message ID (usually the command)
52 * \param Length Length of the buffer \a Data
53 * \param Data Implementation defined data buffer
54 * \return Boolean failure (0: Handled, 1: Unhandled)
56 int (*HandleMessage)(tWindow *Window, int MessageID, int Length, void *Data);
59 extern void WM_RegisterRenderer(tWMRenderer *Renderer);
60 extern tWindow *WM_CreateWindowStruct(size_t ExtraBytes);