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 Flags Flags for the window
29 * \return malloc()'d window structure, or NULL on error
30 * \note \a Flags is provided for convinience, the caller will
31 * set the copy in the window structure.
33 tWindow *(*CreateWindow)(int Arg);
36 * \brief Clean up any stored info
37 * \param Window Window being destroyed
39 void (*DestroyWindow)(tWindow *Window);
42 * \brief Redraw a window on the screen
43 * \param Window Window to render
45 * Called when a window needs to be re-rendered, e.g. when it is uncovered or
48 * \todo List all conditions for Redraw
50 void (*Redraw)(tWindow *Window);
53 * \brief Handle a message sent to the window using WM_SendMessage
54 * \param Window Target window
55 * \param MessageID Implementation defined message ID (usually the command)
56 * \param Length Length of the buffer \a Data
57 * \param Data Implementation defined data buffer
58 * \return Boolean failure (0: Handled, 1: Unhandled)
60 int (*HandleMessage)(tWindow *Window, int MessageID, int Length, const void *Data);
65 * \brief IPC Message handler
67 int (*IPCHandlers[])(tWindow *Window, size_t Length, const void *Data);
70 extern void WM_RegisterRenderer(tWMRenderer *Renderer);
71 extern tWindow *WM_CreateWindowStruct(size_t ExtraBytes);
72 extern int WM_SendIPCReply(tWindow *Window, int Message, size_t Length, const void *Data);