Convert your old WinDom applications From WinDom version 1.00 (November 2000) From WinDom June 1999
Programming guideline of WinDom

From WinDom version March 2000

Data attach

Up to WinDom version March 2000, WinDom could handle two differents data per window (using the fields data and data2 of the WINDOW structure). WinDom uses now a new method to attach data to window. The number of data is illimited. The field data is the root item of a list of data. The field data2 is obsolet and has been removed. Data attachment is handled using the functions DataAttach(), DataSearch() and DataDelete(). All data are identified by a magic number (as cookies). Get an example :

/* Here our data */
typedef
struct _mydata {
	int i;
	char c;
	float f;
} MYDATA;

{
	WINDOW *win;
	MYDATA *data = malloc(sizeof(MYDATA));

	/* Attach a Data to a window */

	/* old way	*/				/* New way */
	win->data = data;			DataAttach( win, 'DAT1', data);
	win->data2= data;			DataAttach( win, 'DAT2', data);

	/* Get Data */

	/* old way */				/* New way */
	display( win->data);		display( DataSearch( win, 'DAT1'));
	display( win->data2);		display( DataSearch( win, 'DAT2'));
}
The field type, which identify a window, is kept for backward compatiblity. It is just a user variable, not used by WinDom.

Timer parameters The variable evnt.lo_timer and evnt.hi_timer are now replaced by the variable evnt.timer:

	long timer;

	evnt.lo_timer = (int)timer;
	evnt.hi_timer = (int)(timer>>16);
is replaced by :

	long timer;

	evnt.lo_timer = timer;