Usermode/AxWin4 - Add very basic start on a UI program
authorJohn Hodge <[email protected]>
Sun, 8 Jun 2014 06:23:50 +0000 (14:23 +0800)
committerJohn Hodge <[email protected]>
Sun, 8 Jun 2014 06:23:50 +0000 (14:23 +0800)
Usermode/Applications/axwin4_src/Makefile [new file with mode: 0644]
Usermode/Applications/axwin4_src/UI/Makefile [new file with mode: 0644]
Usermode/Applications/axwin4_src/UI/main.c [new file with mode: 0644]

diff --git a/Usermode/Applications/axwin4_src/Makefile b/Usermode/Applications/axwin4_src/Makefile
new file mode 100644 (file)
index 0000000..28fb532
--- /dev/null
@@ -0,0 +1,5 @@
+%:
+       @echo --- AxWin4 Server
+       @make -C Server/ $*
+       @echo --- AxWin4 UI
+       @make -C UI/ $*
diff --git a/Usermode/Applications/axwin4_src/UI/Makefile b/Usermode/Applications/axwin4_src/UI/Makefile
new file mode 100644 (file)
index 0000000..096cd9c
--- /dev/null
@@ -0,0 +1,12 @@
+
+include ../../Makefile.cfg
+
+DIR := Apps/AxWin/4.0
+
+OBJ := main.o
+
+BIN := AxWinUI
+
+LDFLAGS += -laxwin4
+
+include ../../Makefile.tpl
diff --git a/Usermode/Applications/axwin4_src/UI/main.c b/Usermode/Applications/axwin4_src/UI/main.c
new file mode 100644 (file)
index 0000000..e599cb9
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * AxWin4 GUI - UI Core
+ * - By John Hodge (thePowersGang)
+ *
+ * main.c
+ * - Program core
+ */
+#include <axwin4/axwin.h>
+#include <assert.h>
+
+// === CODE ===
+int main(int argc, const char *argv[])
+{
+       assert( AxWin4_Connect("ipcpipe:///Devices/ipcpipe/axwin4") );
+       
+       tAxWin4_Window  *bgwin = AxWin4_CreateWindow("background");
+       
+       AxWin4_MoveWindow(bgwin, 0,0);
+       AxWin4_ResizeWindow(bgwin, 640,480);
+       //AxWin4_SetWindowFlags(bgwin, AXWIN4_WNDFLAG_NODECORATE|AXWIN4_WNDFLAG_KEEPBELOW);
+       
+       // Load image
+       char *image = malloc(640*480*4);
+       AxWin4_DrawBitmap(bgwin, 0, 0, 640, 480, image);
+
+       _SysDebug("Beginning queue");
+       
+       while( AxWin4_WaitEventQueue(0) )
+               ;
+       _SysDebug("Clean exit");
+       
+       return 0;
+}

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