--- /dev/null
+# Project: Acess2 GUI v3 Interface
+
+-include ../../Makefile.cfg
+
+CPPFLAGS += -I include/
+
+DIR := Apps/AxWin/3.0
+BIN := AxWinUI
+OBJ := main.o
+
+LDFLAGS += -laxwin3
+
+-include ../../Makefile.tpl
+
--- /dev/null
+/*
+ * Acess2 GUI v3 User Interface
+ * - By John Hodge (thePowersGang)
+ *
+ * main.c
+ * - Interface core
+ */
+#include <stdlib.h>
+#include <axwin3/axwin.h>
+
+// === GLOBALS ===
+tHWND gSidebar;
+
+// === CODE ===
+int main(int argc, char *argv[])
+{
+ // Connect to AxWin3 Server
+ AxWin3_Connect(NULL);
+
+ // Create sidebar
+ // TODO: Use the widget library instead
+ gSidebar = AxWin3_CreateWindow(NULL, "widget", 0, 0, NULL);
+
+ // Idle loop
+ AxWin3_MainLoop();
+
+ return 0;
+}
+
#ifndef _IPCMESSAGES_H_
#define _IPCMESSAGES_H_
+#include <stdint.h>
+
typedef struct sAxWin_IPCMessage tAxWin_IPCMessage;
typedef struct sIPCMsg_Return tIPCMsg_Return;
typedef struct sIPCMsg_CreateWin tIPCMsg_CreateWin;
extern tAxWin_IPCMessage *AxWin3_int_AllocateIPCMessage(tHWND Window, int Message, int Flags, int ExtraBytes);
extern void AxWin3_int_SendIPCMessage(tAxWin_IPCMessage *Msg);
+extern tAxWin_IPCMessage *AxWin3_int_GetIPCMessage(void);
#endif
* - Entrypoint and setup
*/
#include <axwin3/axwin.h>
+#include "include/ipc.h"
// === CODE ===
int SoMain(void *Base, int argc, const char *argv[], const char **envp)
return 0;
}
+void AxWin3_MainLoop(void)
+{
+ tAxWin_IPCMessage *msg;
+ int bExit = 0;
+
+ while(!bExit)
+ {
+ msg = AxWin3_int_GetIPCMessage();
+
+ // TODO: Handle message
+ }
+}
+
#include <string.h>
#include <stdlib.h>
#include "include/ipc.h"
+#include "include/internal.h"
// === CONSTANTS ===
enum eConnectionType
ret = malloc( sizeof(tAxWin_IPCMessage) + ExtraBytes );
ret->Flags = Flags;
ret->ID = Message;
- ret->Window = Window;
+ if(Window)
+ ret->Window = Window->ServerID;
+ else
+ ret->Window = -1;
ret->Size = ExtraBytes;
return ret;
}
extern void AxWin3_Connect(const char *ServerDesc);
extern tAxWin3_MessageCallback AxWin3_SetMessageCallback(tAxWin3_MessageCallback Callback);
+extern void AxWin3_MainLoop(void);
extern tHWND AxWin3_CreateWindow(tHWND Parent, const char *Renderer, int Flags, int DataBytes, void **DataPtr);
extern void AxWin3_DestroyWindow(tHWND Window);