[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] wind_xget()



AB> BTW, we can keep this value for WF_FIRSTAREAXYWH (13).

I think no.

AB> Applications should first make sure that AES supports this value (by
AB> calling appl_getinfo)

The problem at this time (Jun 1995) was to find out is the mode 
WF_OWNER present. This mode is available since AES 3.3, but 
appl_getinfo(11) since AES 4.1. You can not use the AES version 
because MagiX set this to 3.99, and do not have this function, in 1995.

So you can do this to test if an wind_get/set mode is supported:

returnValueOfWindGetSetIsOK = wind_get( 0, 13, &ign, &ign, &ign, &ign) 
== 0;

New wind_get/set returns 0 for an error, and true if everthing is all 
right. Older AES version (before 3.31) returns always true.

int WindGetOwnerID( int windowID )
{
  int ownerID, i;

  if (!returnValueOfWindGetSetIsOK)
      return -1;
  if (wind_get( windowID, WF_OWNER, &ownerID, &i, &i, &i) == 0)
      return -1;
  return ownerID;
}

He wrote you shoud use mode 13, because it is use in some old AES 
version and nobody will use this mode for new wind_get/set function.

AB> That way, applications will work fine on any AES.

That's true, if you use modern programs. But what will be happens if an older
program use this test?

Gerhard