X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Finclude%2Fwm_renderer.h;h=b734348f8366b507489281db4c9ccaf71fd87003;hb=e20b7220513e6010d883ae76ca1cf2c8f0ec26af;hp=ba8ce04d4a250f3a18d02ac7439be6a0d0685bb8;hpb=502dcca4366b381b9ce07f41961fbb8754260b2b;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/include/wm_renderer.h b/Usermode/Applications/axwin3_src/WM/include/wm_renderer.h index ba8ce04d..b734348f 100644 --- a/Usermode/Applications/axwin3_src/WM/include/wm_renderer.h +++ b/Usermode/Applications/axwin3_src/WM/include/wm_renderer.h @@ -1,14 +1,17 @@ /* -* Acess2 Window Manager v3 (axwin3) -* - By John Hodge (thePowersGang) -* -* include/wm_renderer.h -* - Window renderer API -*/ + * Acess2 Window Manager v3 (axwin3) + * - By John Hodge (thePowersGang) + * + * include/wm_renderer.h + * - Window renderer API + */ #ifndef _WM_RENDERER_H_ #define _WM_RENDERER_H_ -typedef struct sWMRenderer +#include +#include + +struct sWMRenderer { /** * \brief Internal pointer to next loaded renderer @@ -22,14 +25,12 @@ typedef struct sWMRenderer /** * \brief Initialise a window structure for the renderer - * \param W Width of the new window - * \param H Height of the new window * \param Flags Flags for the window * \return malloc()'d window structure, or NULL on error - * \note Only the fields \a W and \a H need be filled in the window - * structure, the rest will be filled by the caller. + * \note \a Flags is provided for convinience, the caller will + * set the copy in the window structure. */ - tWindow (*InitWindow)(int W, int H, int Flags); + tWindow *(*CreateWindow)(int Arg); /** * \brief Redraw a window on the screen @@ -48,8 +49,12 @@ typedef struct sWMRenderer * \param MessageID Implementation defined message ID (usually the command) * \param Length Length of the buffer \a Data * \param Data Implementation defined data buffer + * \return Boolean failure (0: Handled, 1: Unhandled) */ - int (*SendMessage)(tWindow *Window, int MessageID, int Length, void *Data); -} tWMRenderer; + int (*HandleMessage)(tWindow *Window, int MessageID, int Length, void *Data); +}; + +extern void WM_RegisterRenderer(tWMRenderer *Renderer); +extern tWindow *WM_CreateWindowStruct(size_t ExtraBytes); #endif