Userland/wget - Starting on a wget clone
[tpg/acess2.git] / Usermode / include / axwin / messages.h
index e4ed1fe..4d53ab5 100644 (file)
@@ -9,6 +9,13 @@
 #include <stdint.h>
 
 typedef struct sAxWin_Message  tAxWin_Message;
+typedef struct sAxWin_RetMsg   tAxWin_RetMsg;
+
+// Higherarchy:
+// - HANDLE
+//  + ELEMENT
+//   > DIALOG
+//   > TAB
 
 /**
  * \brief Message IDs
@@ -18,10 +25,23 @@ enum eAxWin_Messages
        // Server Requests
        MSG_SREQ_PING,
        // - Windows
-       MSG_SREQ_NEWWINDOW,     // (short x, y, w, h, uint32_t flags)
-       MSG_SREQ_GETFLAGS,      MSG_SREQ_SETFLAGS,
-       MSG_SREQ_GETRECT,       MSG_SREQ_SETRECT,
+       MSG_SREQ_REGISTER,      // bool (char[] Name) - Registers this PID with the Window Manager
+       
+       MSG_SREQ_ADDTAB,        // TAB (char[] Name) - Adds a tab to the window
+       MSG_SREQ_DELTAB,        // void (TAB Tab)       - Closes a tab
+       
+       MSG_SREQ_NEWDIALOG,     // DIALOG (TAB Parent, char[] Name)     - Creates a dialog
+       MSG_SREQ_DELDIALOG,     // void (DIALOG Dialog) - Closes a dialog
+       
+       MSG_SREQ_SETNAME,       // void (ELEMENT Element, char[] Name)
+       MSG_SREQ_GETNAME,       // char[] (ELEMENT Element)
+       
+       // - Builtin Elements
+       MSG_SREQ_INSERT,        // void (ELEMENT Parent, eAxWin_Controls Type, u32 Flags)
+       
        // - Drawing
+       //  All drawing functions take an ELEMENT as their first parameter.
+       //  This must be either a Tab, Dialog or Canvas control
        MSG_SREQ_SETCOL,
        MSG_SREQ_PSET,
        MSG_SREQ_LINE,  MSG_SREQ_CURVE,
@@ -30,9 +50,8 @@ enum eAxWin_Messages
        MSG_SREQ_SETFONT,       MSG_SREQ_PUTTEXT,
        
        // Server Responses
-       MSG_SRSP_PONG,
-       MSG_SRSP_WINDOW,        // Returns the new window ID
-       MSG_SRSP_IMG,   // Returns the image ID
+       MSG_SRSP_VERSION,
+       MSG_SRSP_RETURN,        // {int RequestID, void[] Return Value} - Returns a value from a server request
        
        NUM_MSG
 };
@@ -61,7 +80,7 @@ struct sAxWin_SReq_NewWindow
  * \brief Server Response - Pong
  * \see eAxWin_Messages.MSG_SRSP_PONG
  */
-struct sAxWin_SRsp_Pong
+struct sAxWin_SRsp_Version
 {
        uint8_t Major;
        uint8_t Minor;
@@ -87,14 +106,18 @@ struct sAxWin_Message
 {
        uint16_t        ID;
        uint16_t        Size;   //!< Size in DWORDS
+       char    Data[];
+};
+
+struct sAxWin_RetMsg
+{
+       uint16_t        ReqID;
+       uint16_t        Rsvd;
        union
        {
-               struct sAxWin_SReq_Ping SReq_Pong;
-               struct sAxWin_SReq_NewWindow    SReq_NewWindow;
-               
-               // Server Responses
-               struct sAxWin_SRsp_Pong SRsp_Pong;
-               struct sAxWin_SRsp_NewWindow    SRsp_Window;
+                uint8_t        Bool;
+               uint32_t        Handle;
+                int    Integer;
        };
 };
 

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