2 * Acess2 GUI Version 3 (AxWin3)
3 * - By John Hodge (thePowersGang)
8 #ifndef _AXWIN3_AXWIN_H_
9 #define _AXWIN3_AXWIN_H_
11 typedef struct sAxWin3_Window *tHWND;
12 typedef unsigned int tAxWin3_Colour; // TODO: Actual 32-bit
14 typedef void (*tAxWin3_MessageCallback)(int SourceTID, int Length);
16 typedef int (*tAxWin3_WindowMessageHandler)(tHWND Window, int Length, void *Data);
18 // --- Connection management
19 extern void AxWin3_Connect(const char *ServerDesc);
20 extern tAxWin3_MessageCallback AxWin3_SetMessageCallback(tAxWin3_MessageCallback Callback);
21 extern void AxWin3_MainLoop(void);
23 // --- Window creation/deletion
25 * \brief Create a new window (with the required client structures)
26 * \param Parent Parent window handle
27 * \param Renderer Symbolic name of the renderer to use
28 * \param RendererArg Argument to pass to the renderer's initialisation
29 * \param DataBytes Number of bytes to allocate for the caller's use
30 * \param MessageHandler Function to call when a message arrives for the window
31 * \return New window handle
32 * \note Usually wrapped by renderer-specific functions
34 extern tHWND AxWin3_CreateWindow(
36 const char *Renderer, int RendererArg,
38 tAxWin3_WindowMessageHandler MessageHandler
41 * \brief Destroy a window
42 * \param Window Handle to a window to destroy
44 extern void AxWin3_DestroyWindow(tHWND Window);
46 // --- Core window management functions
47 extern void AxWin3_SendMessage(tHWND Window, int Length, void *Data);
48 extern void AxWin3_ShowWindow(tHWND Window, int bShow);
49 extern void AxWin3_SetWindowPos(tHWND Window, short X, short Y, short W, short H);
50 extern void AxWin3_MoveWindow(tHWND Window, short X, short Y);
51 extern void AxWin3_ResizeWindow(tHWND Window, short W, short H);