From 43b72f304340e9d237f1742243db1290e468197e Mon Sep 17 00:00:00 2001 From: Dany LE Date: Fri, 26 Nov 2021 00:04:00 +0100 Subject: [PATCH] update core API to sdk --- libantosdk/core/ts/antos.d.ts | 112 ++++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 11 deletions(-) diff --git a/libantosdk/core/ts/antos.d.ts b/libantosdk/core/ts/antos.d.ts index 5b16697..02b393b 100644 --- a/libantosdk/core/ts/antos.d.ts +++ b/libantosdk/core/ts/antos.d.ts @@ -710,6 +710,20 @@ declare namespace OS { * @param {boolean} force force to clear the system theme before applying the new one */ function loadTheme(name: string, force: boolean): void; + /** + * Get the system dock tag + * + * @export + * @return {*} {GUI.tag.AppDockTag} + */ + function systemDock(): GUI.tag.AppDockTag; + /** + * Get the current virtual desktop + * + * @export + * @return {*} {GUI.tag.DesktopTag} + */ + function desktop(): GUI.tag.DesktopTag; /** * Open a system dialog. * @@ -3225,12 +3239,11 @@ declare namespace OS { * Update the application local from the system * locale or application specific locale configuration * - * @private * @param {string} name locale name e.g. `en_GB` * @returns {void} * @memberof BaseApplication */ - protected updateLocale(name: string): void; + updateLocale(name: string): void; /** * Execute the callback subscribed to a * keyboard shortcut @@ -4464,10 +4477,10 @@ declare namespace OS { * The HTML element ID of the virtual desktop * * @protected - * @type {string} + * @type {HTMLElement} * @memberof BaseModel */ - protected host: string; + protected host: HTMLElement; /** * The process number of the current model. * For sub-window this number is the number @@ -4559,11 +4572,10 @@ declare namespace OS { /** * Update the model locale * - * @protected * @param {string} name * @memberof BaseModel */ - protected updateLocale(name: string): void; + updateLocale(name: string): void; /** * Render the model's UI * @@ -4704,7 +4716,6 @@ declare namespace OS { /** * trigger a local event * - * @protected * @param {string} e event name * @param {*} [d] event data * @returns {void} @@ -5528,6 +5539,89 @@ declare namespace OS { } } } +declare namespace OS { + namespace GUI { + namespace tag { + /** + * Meta tag that represents the virtual desktop environment. + * In near future, we may have multiple virtual desktop environments. + * Each desktop environment has a simple file manager and a window + * manager that render the window in a specific order. + * + * @export + * @class DesktopTag + * @extends {FloatListTag} + */ + class DesktopTag extends FloatListTag { + /** + * internal handle to the desktop file location + * + * @private + * @type {API.VFS.BaseFileHandle} + * @memberof DesktopTag + */ + private file; + /** + * local observer that detect if a new child element is + * added or removed + * + * @private + * @type {MutationObserver} + * @memberof DesktopTag + */ + private observer; + /** + * Internal list of the current opened window + * + * @private + * @type {Set} + * @memberof DesktopTag + */ + private window_list; + /** + * Creates an instance of DesktopTag. + * @memberof DesktopTag + */ + constructor(); + /** + * Mount the virtual desktop to the DOM tree + * + * @protected + * @memberof DesktopTag + */ + protected mount(): void; + /** + * Display all files and folders in the specific desktop location + * + * @return {*} {Promise} + * @memberof DesktopTag + */ + refresh(): Promise; + /** + * Remove this element from its parent + * + * @memberof DesktopTag + */ + remove(): void; + /** + * Active a window above all other windows + * + * @private + * @param {WindowTag} win + * @memberof DesktopTag + */ + private selectWindow; + /** + * Render all windows in order from bottom to top + * + * @private + * @memberof DesktopTag + */ + private render; + } + } + } +} declare namespace OS { namespace GUI { namespace tag { @@ -7990,10 +8084,6 @@ declare namespace OS { * Tag event callback type */ type TagEventCallback = (e: TagEventType) => void; - /** - * Top most element z index value, start by 10 - */ - var zindex: number; /** * Base abstract class for tag implementation, any AFX tag should be * subclass of this class