===== Extension API ===== The extension API consists of a few function. For conveniance and further compatibility you should consider using the [[dhtml class]], it is self documented and that's the only API that's not likely to change. Additionnaly it adds a few functionnality that you will need. You can find some examples in the wiki to get you started. ====resource dhtml_create()==== Create a DHTML window. It is initialy hidden. ====int dhtml_get_id(resource $wnd)==== Get the id of the DHTML window. That's the id in the object returned by dhtml_get_event. ====int dhtml_set(resource $wnd, string $what, string $value, string $extra)==== "Set" a property on a window. For the complete list see the table below ====int dhtml_get(resource $wnd, string $what, string $value)==== "Get" a property from the window. ====object dhtml_get_event(int $wait)==== Return an object representing an event. Base of a run loop. If $wait=1 wait (sleep) until an event occurs. If $wait=0 returns false if no pending event since the last call. ====long dhtml_get_hwnd()==== Return the HWND((window's OS id)) of the current window. ====object dhtml_get_desktop_size()==== Return an object containing the destop size (sx & sy members). class stdClass { public $sx = 1400; public $sy = 1050; } ====bool dhtml_tray_icon(resource $wnd, long $id, int $action, string $icon_file, string $tip)==== Add an icon in the 'Windows Notification Area' also called 'The Tray'. * $id is the id of the tray (user defined) * $tip is the ToolTip text * $icon_file is an icon file * $action can be : * DHTML_TRAY_ADD to add a tray icon * DHTML_TRAY_UPDATE to update (modify) it * DHTML_TRAY_REMOVE to remove it You can then use receive new events types : * LBUTTONDOWN * LBUTTONUP * LBUTTONDBLCLK * RBUTTONDOWN * RBUTTONUP * RBUTTONDBLCLK * MBUTTONDOWN * MBUTTONUP * MBUTTONDBLCLK The value is set to the id of the tray icon. ** Note : ** You need to create a window