2 * AxWin Window Manager Interface Library
3 * By John Hodge (thePowersGang)
4 * This file is published under the terms of the Acess Licence. See the
5 * file COPYING for details.
7 * window.c - Window Control
11 // === TYPES & STRUCTURES ===
14 struct sAxWin_Window *Next;
16 tAxWin_MessageCallback *Callback;
20 tAxWin_Window *AxWin_CreateWindow(
21 int16_t X, int16_t Y, int16_t W, int16_t H,
22 uint32_t Flags, tAxWin_MessageCallback *Callback
26 //mutex_t glProcessWindows;
27 tAxWin_Window *gProcessWindows;
30 tAxWin_Window *AxWin_CreateWindow(
33 uint32_t Flags, tAxWin_MessageCallback *Callback)
39 req.ID = MSG_SREQ_NEWWINDOW;
40 req.Size = 1 + sizeof(struct sAxWin_SReq_NewWindow)/4;
41 req.SReq_NewWindow.X = X;
42 req.SReq_NewWindow.Y = Y;
43 req.SReq_NewWindow.W = W;
44 req.SReq_NewWindow.H = H;
45 req.SReq_NewWindow.Flags = Flags;
47 AxWin_SendMessage(&msg);
51 msg = AxWin_WaitForMessage();
53 if(msg.ID == MSG_SRSP_WINDOW)
56 AxWin_HandleMessage(msg);
60 win = malloc(sizeof(tAxWin_Window));
61 win->WmHandle = msg->SRsp_Window.Handle;
62 win->Callback = Callback;
64 //mutex_acquire(glProcessWindows);
65 win->Next = gProcessWindows;
66 gProcessWindows = win;
67 //mutex_release(glProcessWindows);