ba8ce04d4a250f3a18d02ac7439be6a0d0685bb8
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / include / wm_renderer.h
1 /*
2 * Acess2 Window Manager v3 (axwin3)
3 * - By John Hodge (thePowersGang)
4 *
5 * include/wm_renderer.h
6 * - Window renderer API
7 */
8 #ifndef _WM_RENDERER_H_
9 #define _WM_RENDERER_H_
10
11 typedef struct sWMRenderer
12 {
13         /**
14          * \brief Internal pointer to next loaded renderer
15          */
16         struct sWMRenderer      *Next;
17
18         /**
19          * \brief Renderer name / identifier
20          */
21         const char      *Name;
22
23         /**
24          * \brief Initialise a window structure for the renderer
25          * \param W     Width of the new window
26          * \param H     Height of the new window
27          * \param Flags Flags for the window
28          * \return malloc()'d window structure, or NULL on error
29          * \note Only the fields \a W and \a H need be filled in the window
30          *       structure, the rest will be filled by the caller.
31          */
32         tWindow (*InitWindow)(int W, int H, int Flags);
33
34         /**
35          * \brief Redraw a window on the screen
36          * \param Window        Window to render
37          * 
38          * Called when a window needs to be re-rendered, e.g. when it is uncovered or
39          * repositioned.
40          *
41          * \todo List all conditions for Redraw
42          */
43         void    (*Redraw)(tWindow *Window);
44         
45         /**
46          * \brief Handle a message sent to the window using WM_SendMessage
47          * \param Window        Target window
48          * \param MessageID     Implementation defined message ID (usually the command)
49          * \param Length        Length of the buffer \a Data
50          * \param Data          Implementation defined data buffer
51          */
52          int    (*SendMessage)(tWindow *Window, int MessageID, int Length, void *Data);
53 }       tWMRenderer;
54
55 #endif

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