49fc4df310a5265f49a2a43f62284abaebb717a8
[tpg/acess2.git] / Usermode / include / axwin3 / axwin.h
1 /*
2  * Acess2 GUI Version 3 (AxWin3)
3  * - By John Hodge (thePowersGang)
4  *
5  * axwin.h
6  * - Core API Header
7  */
8 #ifndef _AXWIN3_AXWIN_H_
9 #define _AXWIN3_AXWIN_H_
10
11 typedef struct sAxWin3_Window   *tHWND;
12
13 typedef void    (*tAxWin3_MessageCallback)(int SourceTID, int Length);
14
15 typedef int     (*tAxWin3_WindowMessageHandler)(tHWND Window, int Length, void *Data);
16
17 // --- Connection management
18 extern void     AxWin3_Connect(const char *ServerDesc);
19 extern tAxWin3_MessageCallback  AxWin3_SetMessageCallback(tAxWin3_MessageCallback Callback);
20 extern void     AxWin3_MainLoop(void);
21
22 // --- Window creation/deletion
23 /**
24  * \brief Create a new window (with the required client structures)
25  * \param Parent        Parent window handle
26  * \param Renderer      Symbolic name of the renderer to use
27  * \param RendererArg   Argument to pass to the renderer's initialisation
28  * \param DataBytes     Number of bytes to allocate for the caller's use
29  * \param MessageHandler        Function to call when a message arrives for the window
30  * \return New window handle
31  * \note Usually wrapped by renderer-specific functions
32  */
33 extern tHWND    AxWin3_CreateWindow(
34         tHWND Parent,
35         const char *Renderer, int RendererArg,
36         int DataBytes,
37         tAxWin3_WindowMessageHandler MessageHandler
38         );
39 /**
40  * \brief Destroy a window
41  * \param Window        Handle to a window to destroy
42  */
43 extern void     AxWin3_DestroyWindow(tHWND Window);
44
45 // --- Core window management functions
46 extern void     AxWin3_SendMessage(tHWND Window, int Length, void *Data);
47 extern void     AxWin3_ShowWindow(tHWND Window, int bShow);
48 extern void     AxWin3_SetWindowPos(tHWND Window, short X, short Y, short W, short H);
49 extern void     AxWin3_MoveWindow(tHWND Window, short X, short Y);
50 extern void     AxWin3_ResizeWindow(tHWND Window, short W, short H);
51
52 #endif
53

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