Usermode/libc - Fix strchr and strrchr behavior
[tpg/acess2.git] / Usermode / Libraries / libaxwin3.so_src / include_exp / 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 #include <stddef.h>     // size_t
12 #include <unistd.h>
13
14 // === CONSTANTS ===
15
16 // === TYPES ===
17 typedef struct sAxWin3_Window   *tHWND;
18 typedef unsigned int    tAxWin3_Colour; // TODO: Actual 32-bit
19
20 typedef void    (*tAxWin3_MessageCallback)(int SourceTID, int Length);
21 typedef void    (*tAxWin3_HotkeyCallback)(void);
22
23 typedef int     (*tAxWin3_WindowMessageHandler)(tHWND Window, int Message, int Length, void *Data);
24
25 // --- Connection management
26 extern void     AxWin3_Connect(const char *ServerDesc);
27 extern tAxWin3_MessageCallback  AxWin3_SetMessageCallback(tAxWin3_MessageCallback Callback);
28 extern int      AxWin3_MainLoop(void);
29 extern void     AxWin3_StopMainLoop(int Reason);
30 extern void     AxWin3_MessageSelect(int nFD, fd_set *FDs);
31
32 // --- Non-Window based functions
33 extern int      AxWin3_GetDisplayCount(void);
34 extern int      AxWin3_GetDisplayDims(int Display, int *X, int *Y, int *Width, int *Height);
35
36 // --- Window creation/deletion
37 /**
38  * \brief Create a new window (with the required client structures)
39  * \param Parent        Parent window handle
40  * \param Renderer      Symbolic name of the renderer to use
41  * \param RendererArg   Argument to pass to the renderer's initialisation
42  * \param DataBytes     Number of bytes to allocate for the caller's use
43  * \param MessageHandler        Function to call when a message arrives for the window
44  * \return New window handle
45  * \note Usually wrapped by renderer-specific functions
46  */
47 extern tHWND    AxWin3_CreateWindow(
48         tHWND Parent,
49         const char *Renderer, int RendererArg,
50         int DataBytes,
51         tAxWin3_WindowMessageHandler MessageHandler
52         );
53 /**
54  * \brief Destroy a window
55  * \param Window        Handle to a window to destroy
56  */
57 extern void     AxWin3_DestroyWindow(tHWND Window);
58 extern int      AxWin3_RegisterAction(tHWND Window, const char *Action, tAxWin3_HotkeyCallback cb);
59
60 // --- Core window management functions
61 extern void     AxWin3_SendMessage(tHWND Window, tHWND Dest, int Message, int Length, void *Data);
62 extern void     *AxWin3_WaitMessage(tHWND Window, int MessageID, size_t *Length);
63 extern void     AxWin3_SetWindowTitle(tHWND Window, const char *Title);
64 extern void     AxWin3_FocusWindow(tHWND Window);
65 extern void     AxWin3_ShowWindow(tHWND Window, int bShow);
66 extern void     AxWin3_DecorateWindow(tHWND Window, int bDecorate);
67 extern void     AxWin3_SetWindowPos(tHWND Window, short X, short Y, short W, short H);
68 extern void     AxWin3_MoveWindow(tHWND Window, short X, short Y);
69 extern void     AxWin3_ResizeWindow(tHWND Window, short W, short H);
70
71 #endif
72

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