[[php_dhtml:extension_api]]
 
Table of Contents

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 HWND1) of the current window.

object dhtml_get_desktop_size()

Return an object containing the destop size (sx & sy members).

<?
$obj= dhtml_get_desktop_size();
var_export($obj);
?>
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’.

You can then use receive new events types :

The value is set to the id of the tray icon.

Note : You need to create a window

1) window’s OS id
 
  php_dhtml/extension_api.txt · Last modified: 2005/02/13 18:59
 
Recent changes RSS feed Powered by PHP Driven by DokuWiki