2 * Acess2 GUI Version 3 (AxWin3)
3 * - By John Hodge (thePowersGang)
8 #ifndef _AXWIN3_AXWIN_H_
9 #define _AXWIN3_AXWIN_H_
14 typedef struct sAxWin3_Window *tHWND;
15 typedef unsigned int tAxWin3_Colour; // TODO: Actual 32-bit
17 typedef void (*tAxWin3_MessageCallback)(int SourceTID, int Length);
19 typedef int (*tAxWin3_WindowMessageHandler)(tHWND Window, int Message, int Length, void *Data);
21 // --- Connection management
22 extern void AxWin3_Connect(const char *ServerDesc);
23 extern tAxWin3_MessageCallback AxWin3_SetMessageCallback(tAxWin3_MessageCallback Callback);
24 extern void AxWin3_MainLoop(void);
26 // --- Non-Window based functions
27 extern int AxWin3_GetDisplayCount(void);
28 extern int AxWin3_GetDisplayDims(int Display, int *X, int *Y, int *Width, int *Height);
30 // --- Window creation/deletion
32 * \brief Create a new window (with the required client structures)
33 * \param Parent Parent window handle
34 * \param Renderer Symbolic name of the renderer to use
35 * \param RendererArg Argument to pass to the renderer's initialisation
36 * \param DataBytes Number of bytes to allocate for the caller's use
37 * \param MessageHandler Function to call when a message arrives for the window
38 * \return New window handle
39 * \note Usually wrapped by renderer-specific functions
41 extern tHWND AxWin3_CreateWindow(
43 const char *Renderer, int RendererArg,
45 tAxWin3_WindowMessageHandler MessageHandler
48 * \brief Destroy a window
49 * \param Window Handle to a window to destroy
51 extern void AxWin3_DestroyWindow(tHWND Window);
53 // --- Core window management functions
54 extern void AxWin3_SendMessage(tHWND Window, tHWND Dest, int Message, int Length, void *Data);
55 extern void AxWin3_SetWindowTitle(tHWND Window, const char *Title);
56 extern void AxWin3_FocusWindow(tHWND Window);
57 extern void AxWin3_ShowWindow(tHWND Window, int bShow);
58 extern void AxWin3_DecorateWindow(tHWND Window, int bDecorate);
59 extern void AxWin3_SetWindowPos(tHWND Window, short X, short Y, short W, short H);
60 extern void AxWin3_MoveWindow(tHWND Window, short X, short Y);
61 extern void AxWin3_ResizeWindow(tHWND Window, short W, short H);