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 * main.c - Library Initialisation
22 int AxWin_Register(const char *Name)
27 int len = strlen(Name);
29 req.ID = MSG_SREQ_REGISTER;
30 req.Size = 1 + (len+1)/4;
31 strcpy(req.Data, Name);
33 AxWin_SendMessage(&req);
37 msg = AxWin_WaitForMessage();
39 if(msg->ID == MSG_SREQ_ADDTAB)
41 ret = (void*) &msg->Data[0];
42 if( ret->ReqID == MSG_SREQ_REGISTER )
46 AxWin_HandleMessage(msg);
53 tAxWin_Handle AxWin_AddTab(const char *Title)
58 int len = strlen(Title);
60 req.ID = MSG_SREQ_ADDTAB;
61 req.Size = 1 + (len+1)/4;
62 strcpy(req.Data, Title);
66 msg = AxWin_WaitForMessage();
68 if(msg->ID == MSG_SRSP_RETURN)
70 ret = (void*) &msg->Data[0];
71 if( ret->ReqID == MSG_SREQ_ADDTAB )
75 AxWin_HandleMessage(msg);
79 return (tAxWin_Handle) ret->Handle;