Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File8.9.7 wind_get TOS Name: »Get window« - Obtains various properties of a window. Opcode: 104 Syntax: int16_t wind_get ( int16_t wi_ghandle, int16_t wi_gfield, int16_t *wi_gw1, int16_t *wi_gw2, int16_t *wi_gw3, int16_t *wi_gw3 ); Description: Depending on the parameters passed, the call wind_get returns information about various properties of the window with the ID wi_ghandle. The following apply for wi_gfield: Summary of all subfunctions; numbers in brackets represent the wi_gfield mode: WF_BEVENT (24) This mode inquires the state of the bit-vector that was set by wind_set (..., WF_BEVENT, ...), and writes it into the parameter wi_gw1. Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). WF_BOTTOM (25) This mode inquires the handle of the window that is currently at the bottom of the window list, and writes this into the parameter wi_gw1. Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). WF_CURRXYWH (05) This mode calculates the total size of the window, and writes its coordinates into the further parameters wi_gw1, wi_gw2, wi_gw3 and wi_gw4. WF_DCOLOR (19) This mode returns the default colours of a newly created window, as follows: wi_gw1 = Window component wi_gw2 = Colour with window active wi_gw3 = Colour with window inactive Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). Achtung: Das Vorhandensein dieses Features sollte per appl_getinfo (Opcode 11) ermittelt werden. As of MagiC 4 and XaAES v 0.943 one can also inquire for each individual window component the state of the 3D-flags. The call for this is: wind_get (0, WF_DCOLOR, ...). The following apply: wi_gw1 = Window component wi_gw2 = Colour in active state wi_gw3 = Colour in inactive state wi_gw4 = 3D-flags These 3D-flags are described as bit-vectors. The following apply: Bit-0 = '3D in foreground' effect Bit-1 = '3D in background' effect Bit-2 = 'Selectable in foreground' effect Bit-3 = 'Selectable in background' effect Bit-8+n = Mask bit for bit 'n' The presence of this feature can not be obtained with appl_getinfo at present. WF_DDELAY (22362) This mode returns the delay values: wi_gw1 = Start delay at a click on a scroll arrow wi_gw2 = Continuing delay at a click on a scroll arrow wi_gw3 = Continuing delay at a click on the 'Closer' widget wi_gw4 = Continuing delay at a click on the 'Fuller' widget All values are returned in milliseconds. Warning: The presence of this feature should be checked for with appl_getinfo (opcode 22360). WF_FIRSTXYWH (11) This mode calculates the coordinates of the first rectangle in the rectangle list, and writes them into the further parameters wi_gw1, wi_gw2, wi_gw3 and wi_gw4. WF_FTOOLBAR (31) This mode obtains the first rectangle from the rectangle list of a toolbar. The following apply: wi_gw1 = X-coordinate, and wi_gw2 = Y-coordinate of top L corner, wi_gw3 = Width, and wi_gw4 = Height of the rectangle WF_FULLXYWH (07) This mode calculates the maximum total size of the window, and writes this into the further parameters wi_gw1, wi_gw2, wi_gw3 and wi_gw4. WF_HSLIDE (08) This mode calculates the position of the horizontal slider, and writes this into the further parameter wi_gw1 (0=far left to 1000=far right). WF_HSLSIZE (15) This mode calculates the size of the horizontal slider relative to the total width of the window, and writes this into the further parameter wi_gw1 (-1=smallest size, 1=small to 1000=total width). WF_ICONIFY (26) This mode returns the following values: wi_gw1 = Window is iconified (1) or not (0) wi_gw2 = Window width wi_gw3 = Window height Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). WF_INFO (3) This mode obtains the current text of the window's info-line with the ID wi_ghandle and copies this into the buffer whose address was passed in intin[2] (high-WORD) and intin[3] (low-WORD). If the window has no info-line then the return value of the function is 0; the passed buffer remains unchanged. As an info-line can have at most 128 (N.AES) or 200 (XaAES) characters, the passed buffer should offer sufficient space to accomodate a string of this length. This call is available only under N.AES and XaAES. WF_INFOXYWH (104) This mode obtains the position of the INFO window component. Available as of MagiC 6.10. WF_KIND (1) This mode obtains the current components of the window, and writes them into the parameter wi_gw1. WF_MENU (33) This mode returns the address of the OBJECT structure of the menu bar in the window. Here wi_gw1 contains the high-WORD, and wi_gw2 the low-WORD of the address, or NULL. WF_MINXYWH (103) This mode inquires the minimum size of the window. Available as of MagiC 6. WF_NAME (2) This mode obtains the current window title of the window with the ID wi_ghandle and copies this into the buffer whose address was passed in intin[2] (high-WORD) and intin[3] (low-WORD). If the window has no title, then the return value of the function is 0; the passed buffer remains unchanged. As a window title can have at most 128 (N.AES) or 200 (XaAES) characters, the passed buffer should offer sufficient space to accomodate a string of this length. This call is available only under MagiC (as of Version 6.0), N.AES and XaAES. WF_NEWDESK (14) This mode returns the following values: wi_gw1 = High-WORD of the desktop address wi_gw2 = Low-WORD of the desktop address wi_gw3 = Index of the first object Note: The desktop address is to be understood as the address of the active desktop back- ground tree. The output in wi_gw3 is available only under MagiC and as of AES Version 4.0. Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). It is also present in KAOS 1.4.2 and as of MagiC 1. WF_NEXTXYWH (12) This mode calculates the coordinates of the next rectangle in the rectangle list, and writes them into the further parameters wi_gw1, wi_gw2, wi_gw3 and wi_gw4. WF_NTOOLBAR (32) This mode obtains the next rectangle from the rectangle list of a toolbar. The following apply: wi_gw1 = X-coordinate, and wi_gw2 = Y-coordinate of top L corner, wi_gw3 = Width, and wi_gw4 = Height of the rectangle WF_OPTS (41) This mode returns the value that was set with wind_set ( WF_OPTS ). The presence of this feature should be checked for using appl_getinfo (opcode 11). WF_M_OWNER (101) This mode returns the following values: wi_gw1 = Application ID of the owner Present only as of KAOS 1.4.2 (where it was still called WF_OWNER) and in MagiC. WF_OWNER (20) This mode returns the following values: wi_gw1 = Application ID of the owner wi_gw2 = Window is open (1) or closed (0) wi_gw3 = ID of the window directly above wi_gw4 = ID of the window directly below (in the window order list) Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). WF_PREVXYWH (06) This mode calculates the total size of the previous window, and writes them into the further paramters wi_gw1, wi_gw2, wi_gw3 and wi_gw4. WF_SCREEN (17) This mode returns the address and length of the internal buffer in which the AES has stored the background of drop-down menus and alert boxes, and writes these into the further parameters wi_gw1 = high-WORD of the address, wi_gw2 = low-WORD of the address, wi_gw3 = high-WORD of the length and wi_gw4 = low-WORD of the length. With TOS 1.02, 0 is returned for the length (though the buffer holds 8000 bytes). WF_SHADE (22365) This mode returns the shading state of the window. wi_gw1 = Current shading state: 1: Collapsed 0: Flipped open Warning: The presence of this feature should be checked for with appl_getinfo (opcode 22360). WF_TOOLBAR (30) lThis mode returns the address of the OBJECT structure of the toolbar. For this, wi_gw1 contains the high-WORD and wi_gw2 the low-WORD of the address. WF_TOP (10) This mode returns the following values: wi_gw1 = ID of the topped window As of AES 3.3 wi_gw2 = AES ID of the owner wi_gw3 = Handle from the window below wi_gw4 = Special case for MagiC 2.0 If no window is open, wi_gw1 contains the value 0. Warning: MagiC 2.0 must return a negative number (-2) for the top window handle if it belongs to the program of another application, else a string of old programs will not run. In MagiC 2.0 the actual handle is returned in wi_gw4. As of MagiC 3 this no longer occurs, i.e. the handle will be passed as usual in wi_gw1. XaAES return the AES ID in wi_gw4 of the app that owns the window below. WF_UNICONIFY (27) This mode obtains the original dimensions of an iconified window. wi_gw1 = X-position, and wi_gw2 = Y-position of top L corner, wi_gw3 = Width and wi_gw4 = Height of the window Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). WF_VSLIDE (09) This mode calculates the position of the vertical slider, and writes this into the further parameter wi_gw1 (0=very top to 1000=very bottom). WF_VSLSIZE (16) This mode calculates the height of the vertical slider relative to the total window height, and writes this into the further para- meters wi_gw1 (-1=smallest height, 1=small to 1000=whole height). WF_WIDGETS (200) This mode obtains the current positions of the slider objects (W_UPARROW, W_DNARROW, etc.) of the window with the ID wi_ghandle. Written in the parameters wi_gw1 and wi_gw2 are the vertical components of the type rightwidgets, in the parameters wi_gw3and wi_gw4 the horizontal components of the type bottomwidgets. wi_gw1 is the top-most component, wi_gw2 the lowest component of the vertical slider. wi_gw3 is the left-most component and wi_gw4 the right-most component of the horizontal slider. Warning: The presence of this feature should be checked for with appl_getinfo (opcode 11). WF_M_WINDLIST (102) This mode returns in wi_gw1 (high-WORD) and wi_gw2 (low-WORD) a pointer to a NULL-terminated table of the opened windows (first element = top window), i.e. to a list of their handles as integer values. Negative handles belong to frozen applications. In no case may a write-access be made to the pointer! Only present in KAOS as of 1.4.2 (WF_WINDLIST) and MagiC. WF_WINX (22360) This mode returns information about an installed WINX version (as of WINX 2.1). wi_gw1 = Version Bit [15..12] Beta indicator Bit [11.. 8] Major version number (currently 2) Bit [ 7.. 4] Minor version number (actually 3) Bit [ 3.. 0] Internal identifier wi_gw2 = Creation date, GEMDOS format wi_gw3 = Pointer (low-WORD) of the WINX externals, (or NULL) wi_gw4 = Pointer (high-WORD) of the WINX externals, (or NULL) WF_WINXCFG (22361) This mode returns the application- specific configuration switches of the currently running application. wi_gw1 = Mask of the GLOBAL switches which are supported by the currently installed version of WINX wi_gw2 = The current setting of the GLOBAL switches; applicable are only those switches which are set in the mask (bit 0 = switch 1) wi_gw3 = Mask of the LOCAL switches, which are supported by the currently installed version of WINX wi_gw4 = The current setting of the LOCAL switches; applicable are only those switches which are set in the mask (bit 0 = switch 1) Normally applications should forgo the inquiry of this information. Warning: The presence of this feature should be checked for with appl_getinfo (opcode 22360). WF_WORKXYWH (04) This mode calculates the coordinates of the working area of the window, and writes these into the further parameters wi_gw1, wi_gw2, wi_gw3 and wi_gw4. XA (0x5841) If the return value of this call is 'XA' (0x5841) then XaAES is installed. In wi_gw1 is the version (0x0964 for version V0.964). wi_ghandle must be zero. Note: The parameters wi_gw1, wi_gw2, wi_gw3 and wi_gw4 here are pure output parameters. Return value: An error has arisen only if the value 0 is returned. Availability: All AES versions. Group: Window library See Also: Binding wind_set Subfunctions overview