X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Finclude%2Fwm.h;h=d35a46242b123d6438984adc46b951e8def1a2dd;hb=cee7338738f1a68c7eb7b956cab8d9fb83f95714;hp=a5a779fcbbd4520405c1272d58b92091b02ff7f1;hpb=fbe3dc8eed612e18263f96fe59ccf79ab587ce0b;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/include/wm.h b/Usermode/Applications/axwin3_src/WM/include/wm.h index a5a779fc..d35a4624 100644 --- a/Usermode/Applications/axwin3_src/WM/include/wm.h +++ b/Usermode/Applications/axwin3_src/WM/include/wm.h @@ -8,12 +8,27 @@ #ifndef _WM_H_ #define _WM_H_ +#include +#include + +#include "image.h" + // === CONSTANTS === /** * \brief Window Flags * \{ */ +//! Render the window #define WINFLAG_SHOW 0x00000001 +//! Don't decoratate even if root +#define WINFLAG_NODECORATE 0x00000002 +//! Window takes up all of screen +#define WINFLAG_MAXIMIZED 0x00000005 +//! Window contents are valid +#define WINFLAG_CLEAN 0x00000040 +//! All child windows are un-changed +#define WINFLAG_CHILDCLEAN 0x00000080 + #define WINFLAG_RENDER_MASK 0x00FFFF00 #define WINFLAG_USR_MASK 0xFF000000 /** @@ -24,15 +39,28 @@ typedef struct sWindow tWindow; typedef struct sWMRenderer tWMRenderer; typedef uint32_t tColour; +typedef struct sFont tFont; +typedef struct sIPC_Client tIPC_Client; // === FUNCTIONS === // --- Management -extern tWindow *WM_CreateWindow(tWindow *Parent, int Flags, const char *Renderer); -extern int WM_Reposition(tWindow *Window, int X, int Y, int W, int H); -extern int WM_SetFlags(tWindow *Window, int Flags); -extern int WM_SendMessage(tWindow *Window, int MessageID, int Length, void *Data); +extern tWindow *WM_CreateWindow(tWindow *Parent, tIPC_Client *Client, uint32_t ID, int Flags, const char *Renderer); +extern void WM_Invalidate(tWindow *Window); +extern void WM_SetWindowTitle(tWindow *Window, const char *Title); +extern void WM_FocusWindow(tWindow *Destination); +extern void WM_RaiseWindow(tWindow *Window); +extern void WM_ShowWindow(tWindow *Window, int bShow); +extern void WM_DecorateWindow(tWindow *Window, int bDecorate); +extern int WM_ResizeWindow(tWindow *Window, int W, int H); +extern int WM_MoveWindow(tWindow *Window, int X, int Y); +extern int WM_SendMessage(tWindow *Source, tWindow *Dest, int MessageID, int Length, void *Data); // --- Rendering -extern void WM_Render_FilledRect(tWindow *Window, tColour Colour, int X, int Y, int W, int H); - +extern void WM_Render_FillRect(tWindow *Window, int X, int Y, int W, int H, tColour Colour); +extern void WM_Render_DrawRect(tWindow *Window, int X, int Y, int W, int H, tColour Colour); +extern int WM_Render_DrawText(tWindow *Window, int X, int Y, int W, int H, tFont *Font, tColour Colour, const char *Text); +extern void WM_Render_GetTextDims(tFont *Font, const char *Text, int *W, int *H); +extern void WM_Render_DrawImage(tWindow *Window, int X, int Y, int W, int H, tImage *Image); +// NOTE: Should really be elsewhere +extern tColour Video_AlphaBlend(tColour _orig, tColour _new, uint8_t _alpha); #endif