--- /dev/null
+Layers:
+
+IPC / Client management
+
+Renderers
+Window Management
+> "WM_CreateWindow(Parent, Class, Name)"
+Window Drawing
+> "WD_Fill"
+> "WD_Blit"
+> "WD_LockSurface"
+> "WD_UnlockSurface"
+Decorations
+> ".InitWindow"
+> ".Render"
++ "WM_SetBorder"
+Compositing
+> Dirty rectangling, use 2DCmd to selectively blit
+> Request kernel/server buffers if possible
+
+
+Server-side rendering primitives:
+ # Apply to regions, rendered in fixed order, each has an ID
+> Auto-scaling bitmaps
+ - Control backed by an image with three five regions per axis
+ Edge Fixed, Fill, Center Fixed, Fill, Edge Fixed
+ - Definition is via two pixel counts (edge width, fill width), rest is derived
+ - Command to switch backing image to another already provided
+> Tiling bitmaps + filled rects
+> Text (single line)
+> Canvas (Takes drawing commands, draws to internal buffer)
+> Shared buffer (of an unspecified pixel format)
+
+=== Config options ===
+- Root App
+- Display device (- = stdout)
+- Keyboard device (- = stdin)
+- Mouse device
+- Pipe suffix, port number, etc.
+- Key bindings
+
--- /dev/null
+/*
+ *
+ */
+#include <IWindow.hpp>
+
+namespace AxWin {
+
+
+IWindow::IWindow(const std::string &name):
+ m_name(name)
+{
+}
+
+} // namespace AxWin
+
--- /dev/null
+
+include ../../Makefile.cfg
+
+CPPFLAGS := -Iinclude/
+OBJ := IWindow.o
+BIN := AxWinServer
+
+include ../../Makefile.tpl
--- /dev/null
+/*
+ * Acess2 GUI v4
+ * - By John Hodge (thePowersGang)
+ *
+ * IRegion.hpp
+ * - Representation of a primitive region in a window (part of the window render list)
+ */
+#ifndef _IREGION_HPP_
+#define _IREGION_HPP_
+
+#include <string>
+#include <vector>
+#include "CRect.hpp"
+
+namespace AxWin {
+
+class IRegion
+{
+protected:
+ CWindow& m_parentWindow;
+public:
+ virtual IRegion(CWindow& parent, const ::AxWin::Rect& position);
+ virtual ~IRegion();
+
+ virtual void Redraw(const ::AxWin::Rect& area) = 0;
+ virtual bool SetAttr(unsigned int Index, const IPCAttrib& Value) = 0;
+};
+
+};
+
+#endif
+
--- /dev/null
+/*
+ * Acess2 GUI v4
+ * - By John Hodge (thePowersGang)
+ *
+ * IVideo.hpp
+ * - Graphics backend abstraction
+ */
+#ifndef _IVIDEO_HPP_
+#define _IVIDEO_HPP_
+
+namespace AxWin {
+
+class IVideo
+{
+public:
+ virtual ~IVideo();
+
+ // Allocate a new hardware surface
+ IHWSurface& AllocateHWSurface(uint16_t Width, uint16_t Height);
+
+ // Request redraw of backbuffer
+ void Flip();
+};
+
+};
+
+#endif
+
--- /dev/null
+/*
+ * Acess2 GUI v4
+ * - By John Hodge (thePowersGang)
+ *
+ * IWindow.hpp
+ * - Window abstract base class
+ */
+#ifndef _IWINDOW_HPP_
+#define _IWINDOW_HPP_
+
+#include <string>
+#include <vector>
+#include "CRect.hpp"
+
+namespace AxWin {
+
+class IWindow
+{
+public:
+ virtual IWindow(const ::std::string &name);
+ virtual ~IWindow();
+
+ virtual void Repaint() = 0;
+
+ virtual void MouseButton(int ButtonID, int X, int Y, bool Down);
+ virtual void MouseMove(int NewX, int NewY);
+ virtual void KeyEvent(uint32_t Scancode, const ::std::string &Translated, bool Down);
+protected:
+ const ::std::string m_name;
+};
+
+} // namespace AxWin
+
+#endif
+
--- /dev/null
+/*
+ */
+#include <ipc.hpp>
+#include <input.hpp>
+#include <timing.hpp>
+
+using namespace AxWin;
+
+// === CODE ===
+int main(int argc, char *argv[])
+{
+ // - Load configuration (from file and argv)
+ // - Open graphics
+ Graphics::Open(/*config.m_displayDevice*/);
+ // - Open input
+ // - Initialise compositor structures
+ // - Prepare global hotkeys
+ // - Bind IPC channels
+ // - Start root child process (from config)
+
+ // - Event loop
+ for( ;; )
+ {
+ int nfd = 0;
+ fd_set rfds;
+
+ Input::FillSelect(&nfd, &rfds);
+ IPC::FillSelect(&nfd, &rfds);
+
+ // TODO: Timer events
+ int64_t timeout = Timing::GetTimeToNextEvent();
+ int rv = ::_SysSelect(nfd, &rfds, NULL, &rfds, NULL, 0);
+
+ Timing::CheckEvents();
+
+ Input::HandleSelect(&rfds);
+ IPC::HandleSelect(&rfds);
+ }
+ return 0;
+}
+