Win.h – Handling native windows on all platforms

From all the possibilities, and from what we need (controllable windows) it seems the best to us to instantiate a win through our Win**.h instance (just a bare OS quad) and run our own Web.h inside which loads a local page from vendors that runs warp.js engine.

This way most advance logic for windows is in JS so its crossplatform compatible (and most of it already done).

This Web instance runs warp.js engine, wich loads 2 *.layouts, one of wich is Native.layout, in wich apps for the window GUI are stored : TitleBar and Address, and they are run when engine is instantiated to form the visible GUI of the window

When a browser tab (also a Web.h instance) is created with warp::api::webs::create(webId, url, winId) it gets added to Win.h instance at full width of the window but from its height we substract TitleBar and Address apps GUI height -90px and position its y to 90px .

Win instance architecture

┌────────────────────────────────────────────────────────┐
│                     warp::Win                          │
│                 (Declared in Win.h)                    │
├────────────────────────────────────────────────────────┤
│                                                        │
│ +----------------------------------------------------+ │
│ | warp::Web (width and height fill Win rect)         | │
│ | (Declared in Web.h)                                | │
│ | Purpose: Win.h gui and engine.js instance          | │
│ |                                                    | │
│ | ┌────────────────────────────────────────────────┐ | │
│ | | warp::Web                                      | | │
│ | | width fills Win, width-90px, y = 90px          | | │
│ | | (Also from Web.h)                              | | │
│ | | Purpose: Render a Navigated Page Content       | | │
│ | |  , a browser "Tab"                             | | │
│ | |                                                | │ │
│ | |                                                | │ │
│ | └────────────────────────────────────────────────┘ | │ 
│ +----------------------------------------------------+ │
└────────────────────────────────────────────────────────┘

Window State table, lets follow this on all platforms

NameValueDescription
Normal / Restored0The window is restored.
Minimized1The window is minimized.
Maximized2The window is maximized.