GEMLIB
0.44.0
|
window frame interface More...
Functions | |
short | mt_wind_calc (short Type, short Parts, short InX, short InY, short InW, short InH, short *OutX, short *OutY, short *OutW, short *OutH, short *global_aes) |
short | mt_wind_close (short WindowHandle, short *global_aes) |
short | mt_wind_create (short Parts, short Wx, short Wy, short Ww, short Wh, short *global_aes) |
short | mt_wind_xcreate (short Parts, short Wx, short Wy, short Ww, short Wh, short *OutX, short *OutY, short *OutW, short *OutH, short *global_aes) |
short | mt_wind_delete (short WindowHandle, short *global_aes) |
short | mt_wind_draw (short WindowHandle, short startob, short *global_aes) |
short | mt_wind_find (short X, short Y, short *global_aes) |
short | mt_wind_get (short WindowHandle, short What, short *W1, short *W2, short *W3, short *W4, short *global_aes) |
short | mt_wind_new (short *global_aes) |
short | mt_wind_open (short WindowHandle, short Wx, short Wy, short Ww, short Wh, short *global_aes) |
short | mt_wind_set (short WindowHandle, short What, short W1, short W2, short W3, short W4, short *global_aes) |
short | mt_wind_update (short Code, short *global_aes) |
short | mt_wind_calc_grect (short Type, short Parts, const GRECT *In, GRECT *Out, short *global_aes) |
short | mt_wind_create_grect (short Parts, const GRECT *r, short *global_aes) |
short | mt_wind_xcreate_grect (short Parts, const GRECT *r, GRECT *ret, short *global_aes) |
short | mt_wind_get_grect (short WindowHandle, short What, GRECT *r, short *global_aes) |
short | mt_wind_xget_grect (short WindowHandle, short What, const GRECT *clip, GRECT *r, short *global_aes) |
short | mt_wind_open_grect (short WindowHandle, const GRECT *r, short *global_aes) |
short | mt_wind_set_grect (short WindowHandle, short What, const GRECT *r, short *global_aes) |
short | mt_wind_xset_grect (short WindowHandle, short What, const GRECT *s, GRECT *r, short *global_aes) |
short | mt_wind_set_str (short WindowHandle, short What, const char *str, short *global_aes) |
window frame interface
The Window Library is responsible for the displaying and maintenance of AES windows.
#define wind_calc | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g, | |||
h, | |||
i, | |||
j | |||
) | mt_wind_calc(a,b,c,d,e,f,g,h,i,j,aes_global) |
single-thread version of mt_wind_calc()
#define wind_calc_grect | ( | a, | |
b, | |||
c, | |||
d | |||
) | mt_wind_calc_grect(a,b,c,d,aes_global) |
single-thread version of mt_wind_calc_grect()
#define wind_close | ( | a | ) | mt_wind_close(a,aes_global) |
single-thread version of mt_wind_close()
#define wind_create | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) | mt_wind_create(a,b,c,d,e,aes_global) |
single-thread version of mt_wind_create()
#define wind_create_grect | ( | a, | |
b | |||
) | mt_wind_create_grect(a,b,aes_global) |
single-thread version of mt_wind_create_grect()
#define wind_delete | ( | a | ) | mt_wind_delete(a,aes_global) |
single-thread version of mt_wind_delete()
#define wind_draw | ( | a, | |
b | |||
) | mt_wind_draw(a,b,aes_global) |
single-thread version of mt_wind_draw()
#define wind_find | ( | a, | |
b | |||
) | mt_wind_find(a,b,aes_global) |
single-thread version of mt_wind_find()
#define wind_get | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f | |||
) | mt_wind_get(a,b,c,d,e,f,aes_global) |
single-thread version of mt_wind_get()
#define wind_get_grect | ( | a, | |
b, | |||
c | |||
) | mt_wind_get_grect(a,b,c,aes_global) |
single-thread version of mt_wind_get_grect()
#define wind_new | ( | ) | mt_wind_new(aes_global) |
single-thread version of mt_wind_new()
#define wind_open | ( | a, | |
b, | |||
c, | |||
d, | |||
e | |||
) | mt_wind_open(a,b,c,d,e,aes_global) |
single-thread version of mt_wind_open()
#define wind_open_grect | ( | a, | |
b | |||
) | mt_wind_open_grect(a,b,aes_global) |
single-thread version of mt_wind_open_grect()
#define wind_set | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f | |||
) | mt_wind_set(a,b,c,d,e,f,aes_global) |
single-thread version of mt_wind_set()
#define wind_set_grect | ( | a, | |
b, | |||
c | |||
) | mt_wind_set_grect(a,b,c,aes_global) |
single-thread version of mt_wind_set_grect()
#define wind_set_str | ( | a, | |
b, | |||
c | |||
) | mt_wind_set_str(a,b,c,aes_global) |
single-thread version of mt_wind_set_str()
#define wind_update | ( | a | ) | mt_wind_update(a,aes_global) |
single-thread version of mt_wind_update()
#define wind_xcreate_grect | ( | a, | |
b, | |||
c | |||
) | mt_wind_xcreate_grect(a,b,c,aes_global) |
single-thread version of mt_wind_xcreate_grect()
#define wind_xget_grect | ( | a, | |
b, | |||
c, | |||
d | |||
) | mt_wind_xget_grect(a,b,c,d,aes_global) |
single-thread version of mt_wind_xget_grect()
#define wind_xset_grect | ( | a, | |
b, | |||
c, | |||
d | |||
) | mt_wind_xset_grect(a,b,c,d,aes_global) |
single-thread version of mt_wind_xset_grect()
short mt_wind_calc | ( | short | Type, |
short | Parts, | ||
short | InX, | ||
short | InY, | ||
short | InW, | ||
short | InH, | ||
short * | OutX, | ||
short * | OutY, | ||
short * | OutW, | ||
short * | OutH, | ||
short * | global_aes | ||
) |
returns size information for a specific window.
Type | specifies the mode of this call. |
Parts | is a bit mask of window 'widgets' present with the window. For a detailed listing of these elements see mt_wind_create(). |
InX | X-position of the input area |
InY | Y-position of the input area |
InW | Width of the input area |
InH | Height of the input area |
OutX | X-position of the output area [option CHECK_NULLPTR] OutX may be NULL |
OutY | Y-position of the output area [option CHECK_NULLPTR] OutY may be NULL |
OutW | Width of the output area [option CHECK_NULLPTR] OutW may be NULL |
OutH | Height of the output area [option CHECK_NULLPTR] OutH may be NULL |
global_aes | global AES array |
If Type is WC_BORDER (0), InX, InY, InW, and InH specify the work area of a window of type Parts. The call then fills in the WORDs pointed to by OutX, OutY, OutW, and OutH with the full extent of the window.
If Type is WC_WORK (1), InX, InY, InW, and InH specify the full extent of a window of type Parts. The call fills in the WORDs pointed to by OutX, OutY, OutW, and OutH with the work area of the window.
mt_wind_calc() is unable to calculate correct values when a toolbar is attached to a window. This can be corrected, though, by adjusting the values output by this function with the height of the toolbar.
short mt_wind_calc_grect | ( | short | Type, |
short | Parts, | ||
const GRECT * | In, | ||
GRECT * | Out, | ||
short * | global_aes | ||
) |
returns size information for a specific window.
Type | specifies the mode of this call. |
Parts | is a bit mask of window 'widgets' present with the window. For a detailed listing of these elements see mt_wind_create(). |
In | the input area |
Out | the output area |
global_aes | global AES array |
see mt_wind_calc() documentation for more details
short mt_wind_close | ( | short | WindowHandle, |
short * | global_aes | ||
) |
removes a window from the display screen.
WindowHandle | specifies the window handle of the window to close. |
global_aes | global AES array |
Upon calling mt_wind_close() a redraw message for the portion of the screen changed will be sent to all applications. Calling mt_wind_close() does not release the memory allocated to the window structure. mt_wind_delete() must be called to permanently destroy the window and free any memory allocated by the AES for the window. Until mt_wind_delete() is called, the window may be re-opened at any time with mt_wind_open().
short mt_wind_create | ( | short | Parts, |
short | Wx, | ||
short | Wy, | ||
short | Ww, | ||
short | Wh, | ||
short * | global_aes | ||
) |
initializes a new window structure and allocates any necessary memory.
Parts | is a bit array whose elements determine the presence of any 'widgets' on the window as follows:
|
Wx | X-position of the maximum extents of the window. |
Wy | Y-position of the maximum extents of the window. |
Ww | Width of the maximum extents of the window. |
Wh | Height of the maximum extents of the window. Normally this is the entire screen area minus the menu bar (to find this area use mt_wind_get() with a parameter of WF_WORKXYWH ). The area may be smaller to bound the window to a particular size and location. |
global_aes | global AES array |
The SMALLER gadget is only available as of AES version 4.1.
The BORDER gadget is only available in XaAES kernel module versions compiled after November 8, 2004.
A window is not actually displayed on screen with this call, you need to call mt_wind_open() to do that.
The desktop was limited to four windows. The AES actually allowed seven windows. As of MultiTOS the number of open windows is limited only by memory and the capabilities of an application. You should ensure that your application calls a mt_wind_delete() for each mt_wind_create(), otherwise memory may not be deallocated when your application exits.
short mt_wind_create_grect | ( | short | Parts, |
const GRECT * | r, | ||
short * | global_aes | ||
) |
initializes a new window structure and allocates any necessary memory.
Parts | is a bit array whose elements determine the presence of any 'widgets' on the window. |
r | specify the maximum extents of the window. |
global_aes | global AES array |
see mt_wind_create() documentation for more details
short mt_wind_delete | ( | short | WindowHandle, |
short * | global_aes | ||
) |
destroys the specified window and releases any memory allocated for it.
WindowHandle | specifies the window handle of the window to destroy. |
global_aes | global AES array |
A window should by closed with mt_wind_close() before deleting it.
short mt_wind_draw | ( | short | whandle, |
short | startob, | ||
short * | global_aes | ||
) |
Draws the Non-Client-Area (window widgets) of a window and checks the list of rectangles of the window specified.
whandle | specifies the handle of the window to redraw |
startob | index of the start object |
global_aes | global AES array |
short mt_wind_find | ( | short | X, |
short | Y, | ||
short * | global_aes | ||
) |
returns the handle of the window found at the given coordinates.
X | specify the X-coordinate to search for a window at. |
Y | specify the Y-coordinate to search for a window at. |
global_aes | global AES array |
This function is useful for tracking the mouse pointer and changing its shape depending upon what window it falls over.
short mt_wind_get | ( | short | WindowHandle, |
short | What, | ||
short * | W1, | ||
short * | W2, | ||
short * | W3, | ||
short * | W4, | ||
short * | global_aes | ||
) |
returns various information about a window.
WindowHandle | specifies the handle of the window to return information about (0 is the desktop window) |
What | specifies the information to return and the values placed into the WORDs pointed to by W1 to W4. |
W1 | 1st returned value [option CHECK_NULLPTR] W1 may be NULL |
W2 | 2nd returned value [option CHECK_NULLPTR] W2 may be NULL |
W3 | 3rd returned value [option CHECK_NULLPTR] W3 may be NULL |
W4 | 4th returned value [option CHECK_NULLPTR] W4 may be NULL |
global_aes | global AES array |
Name | Value | Meaning |
WF_KIND | 1 | Gets the actual window elements
|
WF_NAME | 2 | Gets the actual title of the window
If the window has no title, the return value of the function equals 0, the buffer remains unchanged. Since a title may have a length of 128 chars, the buffer must be large enough! |
WF_INFO | 3 | Gets the actual infoline of the window
If the window has no infoline, the return value of the function equals 0, the buffer remains unchanged. Since an infoline may have a length of 128 chars, the buffer must be large enough! |
WF_WORKXYWH | 4 | Gets the work area coordinates of the window
|
WF_CURRXYWH | 5 | Gets the coordinates of the window (external area)
|
WF_PREVXYWH | 6 | Gets the previous coordinates of the window
|
WF_FULLXYWH | 7 | Gets the coordinates of the window when "fulled" the screen
|
WF_HSLIDE | 8 | Gets the current position of the horizontal slider
|
WF_VSLIDE | 9 | Gets the current position of the vertical slider
|
WF_TOP | 10 | Gets the handle of the top window
W2 and W3 are only filled by the AES since AES version 4.0, and when mt_appl_getinfo() with mode AES_WINDOW indicates the availability of this feature. |
WF_FIRSTXYWH | 11 | Gets the first rectangle in the list of rectangles for this window
If W3 and W4 are both 0, the window is completely covered. |
WF_NEXTXYWH | 12 | Gets the next rectangle in the list of rectangles for this window
|
WF_NEWDESK | 14 | Gets the OBJECT tree installed as desktop
Available as of AES versions 4.0, and when mt_appl_getinfo() with mode AES_WINDOW indicates. |
WF_HSLSIZE | 15 | Gets the size of the horizontal slider
|
WF_VSLSIZE | 16 | Gets the size of the vertical slider
|
WF_SCREEN | 17 | Gets current AES menu/alert buffer and its size
Note that GEM 1.2 returns 0 in W3 and W4 by mistake. The menu/alert buffer is used by the AES to save the screen area hidden by menus and alert boxes. It is not recommended that applications use this area as its usage is not guaranteed in future versions of the OS. |
WF_COLOR | 18 | Gets current color of widget
This mode is only valid as of AES version 0x0300. From AES versions 4.0 and above, mt_appl_getinfo() with mode AES_WINDOW should be used to determine if this mode is supported. |
WF_DCOLOR | 19 | This mode gets the default color of newly created windows as with WF_COLOR above. This mode only works as of AES version 0x0300. |
WF_OWNER | 20 | Gets the owner of the window
This mode is only available as of AES version 4.0 (and when indicated by mt_appl_getinfo() with mode AES_WINDOW). |
WF_BEVENT | 24 | Gets window feature on mouse button event
This mode is only available as of AES version 4.0 (and when indicated by mt_appl_getinfo() with mode AES_WINDOW). |
WF_BOTTOM | 25 | Gets bottom window
This mode is only available as of AES version 4.0 (and when indicated by mt_appl_getinfo() with mode AES_WINDOW). |
WF_ICONIFY | 26 | Gets iconification of the window
This mode is only available as of AES version 4.1 (and when indicated by mt_appl_getinfo() with mode AES_WINDOW). |
WF_UNICONIFY | 27 | Gets un-iconification of the window
This mode is only available as of AES version 4.1 (and when indicated by mt_appl_getinfo() with mode AES_WINDOW). |
WF_TOOLBAR | 30 | Gets tool bar attached to a window
This mode is only available as of AES version 4.1. |
WF_FTOOLBAR | 31 | Gets the first rectangle of the toolbar area
If W3 and W4 are 0, the toolbar is completely covered. This mode is only available as of AES version 4.1. |
WF_NTOOLBAR | 32 | Gets the next rectangle of the toolbar area
This mode should be repeated to reveal subsequent rectangles until W3 and W4 are found to be 0. This mode is only available as of AES version 4.1. |
WF_WIDGETS | 200 | Gets the actual positions of the slider widgets (W_UPARROW, W_DNARROW, and so on)
|
WF_USER_POINTER | 230 | Get the user value of the window
MyAES feature |
WF_WIND_ATTACH | 231 | Get if a window is attach to the requested window
MyAES feature |
WF_BITMAP | 233 | Get bitmap content of the window if MyAES "windows_backup" option is set to true, any windows of any application can be read TODO MyAES 0.96 feature |
References AESPB::addrin, AESPB::addrout, AES_ADDRINMAX, AES_ADDROUTMAX, AES_CTRLMAX, AES_INTINMAX, AES_INTOUTMAX, AESPB::control, AESPB::global, AESPB::intin, AESPB::intout, WF_COLOR, WF_DCOLOR, WF_INFO, and WF_NAME.
short mt_wind_get_grect | ( | short | WindowHandle, |
short | What, | ||
GRECT * | r, | ||
short * | global_aes | ||
) |
returns various information about a window.
WindowHandle | specifies the handle of the window to return information about (0 is the desktop window) |
What | specifies the information to return and the values placed into r. |
r | |
global_aes | global AES array |
see mt_wind_get() documentation for more details.
short mt_wind_new | ( | short * | global_aes | ) |
closes and deletes all of the application's windows. In addition, the state of mt_wind_update(), and the mouse pointer hide count is reset.
global_aes | global AES array |
This function should not be relied upon to clean up after an application. It was designed for parent processes that wish to ensure that a poorly written child process has properly cleaned up after itself.
short mt_wind_open | ( | short | WindowHandle, |
short | Wx, | ||
short | Wy, | ||
short | Ww, | ||
short | Wh, | ||
short * | global_aes | ||
) |
opens the window specified.
WindowHandle | specifies the handle of the window to open as returned by mt_wind_create() |
Wx | x-position of the rectangle |
Wy | y-position of the rectangle |
Ww | width of the rectangle |
Wh | height of the rectangle into which the rectangle should be displayed. |
global_aes | global AES array |
This call will also trigger a WM_REDRAW message which encompasses the work area of the window so applications should not initially render the work area, rather, wait for the message.
short mt_wind_open_grect | ( | short | WindowHandle, |
const GRECT * | r, | ||
short * | global_aes | ||
) |
opens the window specified.
WindowHandle | specifies the handle of the window to open as returned by mt_wind_create() |
r | the rectangle into which the rectangle should be displayed. |
global_aes | global AES array |
see mt_wind_open() documentation for more details.
short mt_wind_set | ( | short | WindowHandle, |
short | What, | ||
short | W1, | ||
short | W2, | ||
short | W3, | ||
short | W4, | ||
short * | global_aes | ||
) |
sets various window attributes.
WindowHandle | specifies the window handle of the window to modify. |
What | specifies the attribute to change and the meanings of parameters W1 to W4 |
W1 | see hereafter |
W2 | see hereafter |
W3 | see hereafter |
W4 | see hereafter |
global_aes | global AES array |
Name | Value | Meaning |
WF_NAME | 2 | This mode passes a pointer to a character string containing the new title of the window.
|
WF_INFO | 3 | This mode passes a pointer to a character string containing the new information line of the window.
|
WF_CURRXYWH | 5 | returns the global dimensions (external area) of the window)
|
WF_HSLIDE | 8 | Sets the position of the horizontal slider
|
WF_VSLIDE | 9 | Sets the position of the vertical slider
|
WF_TOP | 10 | Tops a window
Note that if multiple calls of mt_wind_set() with WF_TOP, are made without releasing control to the AES (which allows the window to actually be topped), only the most recent window specified will actually change position. |
WF_NEWDESK | 14 | This mode allows to install or uninstall a desktop tree. This OBJECT tree whill be redrawn automatically by the AES as the background.
To reset (uninstall) the desktop background to the default, specify W1 and W2 as 0 (that is OBJECT = NULL). |
WF_HSLSIZE | 15 | Sets the size of the horizontal slider
|
WF_VSLSIZE | 16 | Sets the size of the vertical slider
|
WF_COLOR | 18 | Sets the current color of window widgets
This mode is only valid as of AES version 0x0300. |
WF_DCOLOR | 19 | This mode sets the default color of newly created windows as with WF_COLOR above. This mode only works as of AES version 0x0300. As of AES version 4.1, this mode causes all currently displayed windows which have not had their color explicitly set with WF_COLOR to be changed. |
WF_BEVENT | 24 | Sets/unsets window features on mouse button event
|
WF_BOTTOM | 25 | This mode will place the specified window at the bottom of the window list (if there is more than one window) and top the new window on the top of the list. This mode is only available as of AES version 4.0. |
WF_ICONIFY | 26 | This mode iconifies the specified window.
Normally, this happens as the result of receiving a WM_ICONIFY message. This mode is only available as of AES version 4.1. |
WF_UNICONIFY | 27 | This mode uniconifies the window specified
Normally, this happens as the result of receiving a WM_UNICONIFY message. This mode is only available as of AES version 4.1. |
WF_UNICONIFYXYWH | 28 | This mode sets the coordinates to be transmitted to the window with the next WM_UNICONIFY message that targets it. This call is used when a window is opened in an iconified state to give the OS a method of positioning it when it is uniconified.
This mode is only available as of AES version 4.1. |
WF_TOOLBAR | 30 | This mode attaches a toolbar to the specified window.
Set W1 and W2 to 0 to remove a toolbar. This mode is available as of AES 4.10. |
WF_WHEEL | 40 | This mode allows to configure the feature of window on mouse wheel events
Please note that it's not mandatory to explicitly set the WO0_WHEEL bit of WF_OPTS to enable this mouse wheel feature. A simple mt_wind_set(WF_WHEEL) is enought. XaAES supports these 3 values of W1. MyAES (xmas 2005 edition) only support WHEEL_MESAG value. So if you want your application to support the mouse wheel with both MyAES and XaAES, you should use WHEEL_MESAG. mt_appl_getinfo() with parameter AES_WINDOW returns the availability of this mode. |
WF_OPTS | 41 | This mode allows to configure the feature of window on mouse wheel events
mt_appl_getinfo() with parameter AES_WINDOW returns the availability of this mode. mt_appl_getinfo() with parameter AES_WOPTS returns the support of WOx_xxx feature . |
WF_WIDGETS | 200 | Sets the actual positions of the slider widgets (W_UPARROW, W_DNARROW, and so on)
|
WF_USER_POINTER | 230 | Link a user value to the windows
MyAES feature |
WF_WIND_ATTACH | 231 | attach a window to another, using it if you close the mother window other windows linked will be closed
MyAES feature |
WF_TOPMOST | 232 | Sets the actual window at topmost level (details below).
Topmost windows always 'float' ontop of classical windows. One key feature of windows in any WF_TOPMOST state is that they do not disturb current keyboard focus, and can be used to issue important messages, status raports, etc., without demanding user interaction. As consequence, topmost window never get keyboard focus, and they never get WM_TOPPED or WM_UNTOPPED AES messages Mode 1 of topmost windows fits well for task bar applications for example (window displayed whatever the active application) Mode 2 of topmost windows fits well for toolbox windows: the visibility of the window is linked to the application that has the focus. That is, when owner is untopped the toolbox window disappears, when owner regains focus, the window automatically reappears (no action required by the application, opening and closing of the window is performed by the AES). MyAES feature |
WF_OPTIONS | 234 | Change window behavior
MyAES feature |
WF_FULLSCREEN | 235 | Switch fullscreen - normal window mode. The fullscreen mode is without any widget. Hit the key ESC escape from fullscreen mode MyAES 0.96 feature |
short mt_wind_set_grect | ( | short | WindowHandle, |
short | What, | ||
const GRECT * | r, | ||
short * | global_aes | ||
) |
sets various window attributes.
WindowHandle | specifies the window handle of the window to modify. |
What | specifies the attribute to change |
r | a rectangle |
global_aes | global AES array |
see mt_wind_set() documentation for more details
the fields x, y, w and h of r are respectively sent in place of the parameters w1, w2, w3 and w4 of mt_wind_set().
short mt_wind_set_str | ( | short | WindowHandle, |
short | What, | ||
const char * | str, | ||
short * | global_aes | ||
) |
sets various window attributes.
WindowHandle | specifies the window handle of the window to modify. |
What | specifies the attribute to change |
str | a string |
global_aes | global AES array |
see mt_wind_set() documentation for more details.
the str pointer (32 bits) is sent in place of the two first parameters w1 (most significant word of str) and w2 (less significant word of str) of mt_wind_set(). Parameters w3 and w4 of mt_wind_set() are undefined.
short mt_wind_update | ( | short | Code, |
short * | global_aes | ||
) |
manages the screen drawing semaphore.
Code | specifies an action as follows:
|
global_aes | global AES array |
As of AES version 4.0, you may logically OR a mask of NO_BLOCK (0x0100) to either BEG_UPDATE or BEG_MCTRL. This mask will prevent the application from blocking if another application currently has control of the screen semaphore. Instead, if another application has control, the function will immediately return with an error value of 0. This method should only be used by timing-sensitive applications such as terminal programs in which a long redraw by another application could cause a timeout.
All mt_wind_update() modes nest. For instance, to release the screen semaphore, the same number of END_UPDATE calls must be received as were BEG_UPDATE calls. It it recommended that you design your application in a manner that avoids nesting these calls. Both the BEG_UPDATE and BEG_MCTRL modes should be used prior to displaying a form or popup to prevent them from being overwritten or clicks to them being sent to other applications. Always wait until after the BEG_UPDATE call to turn off the mouse cursor when updating the screen to be sure you have gained control of the screen. Applications such as slide-show viewers which require the whole screen area (and may need to change screen modes) may call mt_wind_update() with parameters of both BEG_UPDATE and BEG_MCTRL to completely lock out the screen from other applications. The application would still be responsible for saving the screen area, manipulating video modes as necessary, restoring the screen when done, and returning control of the screen to other applications with END_UPDATE and END_MCTRL.
short mt_wind_xcreate | ( | short | Parts, |
short | Wx, | ||
short | Wy, | ||
short | Ww, | ||
short | Wh, | ||
short * | OutX, | ||
short * | OutY, | ||
short * | OutW, | ||
short * | OutH, | ||
short * | global_aes | ||
) |
initializes a new window structure and allocates any necessary memory.
Parts | is a bit array whose elements determine the presence of any 'widgets' on the window as follows:
|
Wx | X-position of the maximum extents of the window. |
Wy | Y-position of the maximum extents of the window. |
Ww | Width of the maximum extents of the window. |
Wh | Height of the maximum extents of the window. Normally this is the entire screen area minus the menu bar (to find this area use mt_wind_get() with a parameter of WF_WORKXYWH ). The area may be smaller to bound the window to a particular size and location. |
OutX | X-coordinate of the maximum (if Wx exceeded it) extent of the window. |
OutY | Y-coordinate of the maximum (if Wy exceeded it) extent of the window. |
OutW | X-coordinate of the maximum (if Ww exceeded it) extent of the window. |
OutH | X-coordinate of the maximum (if Wh exceeded it) extent of the window. wind_xcreate() is only of use when the AES operates in WCOWORK mode, in which case the Outx parameters are 'clipped' to the maximum work area if input extent exceeded it. |
global_aes | global AES array |
The SMALLER gadget is only available as of AES version 4.1.
The BORDER gadget is only available in XaAES kernel module versions compiled after November 8, 2004.
A window is not actually displayed on screen with this call, you need to call mt_wind_open() to do that.
The desktop was limited to four windows. The AES actually allowed seven windows. As of MultiTOS the number of open windows is limited only by memory and the capabilities of an application. You should ensure that your application calls a mt_wind_delete() for each mt_wind_create(), otherwise memory may not be deallocated when your application exits.
initializes a new window structure and allocates any necessary memory.
Parts | is a bit array whose elements determine the presence of any 'widgets' on the window. |
r | specify the maximum extents of the window. |
OutR | Corrected maximum extents of window, if 'r' exceeded it. |
global_aes | global AES array |
see mt_wind_xcreate() documentation for more details
short mt_wind_xget_grect | ( | short | WindowHandle, |
short | What, | ||
const GRECT * | clip, | ||
GRECT * | r, | ||
short * | global_aes | ||
) |
returns various information about a window.
WindowHandle | specifies the handle of the window to return information about (0 is the desktop window) |
What | specifies the information to return and the values placed into r. |
clip | additional information about the request. For now, this information is only taken into account for command WF_FIRSTAREAXYWH. In that case, clip is a clipping area, and the AES may optimize the list of rectangles returned by WF_FIRSTAREAXYWH and WF_NEXTXYWH. |
r | value returned, see mt_wind_get() |
global_aes | global AES array |
see mt_wind_get() documentation for more details.
short mt_wind_xset_grect | ( | short | WindowHandle, |
short | What, | ||
const GRECT * | s, | ||
GRECT * | r, | ||
short * | global_aes | ||
) |
returns various information about a window.
WindowHandle | specifies the handle of the window to return information about (0 is the desktop window) |
What | specifies the information to return and the values placed into r. |
s | is a rectangle containing coordinates for WF_CURRXYWH, WF_PREVXYWH, and WF_FULLXYWH modes. wind_xset_grect(handle, WF_CURRXYWH, (const GRECT *)s, (GRECT *)r); will set the coordinates of the window, just like wind_set_grect(handle, WF_CURRXYWH, (const GRECT *)r); but will return the coordinates actually set in 'r'. This eliminates the need to do wind_get_grect(..) to fetch the newly set coordinates. Refer to the XaAES documentation for more information about the extended wind_set() modes |
r | actual coordinates returned |
global_aes | global AES array |
see mt_wind_set() documentation for more details.