W_INIT
Initialize the windowing system
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall W_INIT(arg_1, channel, max_windows[, #rows, #cols][, init_size])
Arguments
arg_1
A numeric expression that serves as a placeholder. (Previously. this argument contained the number of bytes of memory allocated for window processing. Because the windowing subroutines no longer require a window memory pool, this argument is no longer used, but must still be passed.) (n)
channel
An expression that contains the channel you have opened for terminal output. If the channel is not open or has a value of 0, the default TT: runtime internal channel is used. On .NET this argument is ignored. (n)
max_windows
An expression that contains the maximum number of windows that can be active simultaneously. This argument has no upper limit. It causes four bytes to be reserved in memory for each window. For example, if the maximum number of windows is 15, 60 bytes is reserved in memory. (n)
#rows
(optional) An expression specifying the initial number of rows in the display screen. (n)
#cols
(optional) An expression specifying the initial number of columns in the display screen. (n)
init_size
(optional) An expression that is returned with a value of zero if the windowing system has not been previously initialized or with arg_1 if the windowing system has already been initialized. (n)
W_INIT initializes the windowing system. It must call it before any other window processing occurs.
In a bound program, you don’t need to initialize the windowing system more than once, but the same channel must be open to the terminal in each program. If init_size is passed and the windowing system has already been initialized, the windowing system is not reinitialized.
If #rows and #cols are not specified, the screen size equals the default for the specific window environment.
W_INIT interprets the DBL_CHRSET environment variable, if it exists, to set an alternate language character set.
If a program using windowing subroutines chains to another program using windowing subroutines that call W_INIT again, the window set-up is lost. You must set up your windowing system in each program. |
In the example below, we declare WNDCHNL and MAXWINS as constants with the .DEFINE statement. The channel argument (WNDCHNL) in the W_INIT call must be the same as the channel opened to the terminal in the OPEN statement. The program tests whether the windowing system has been initialized, and if it hasn’t, the program creates its windows.
.define MAXWINS, 5 .define WNDCHNL, 1 .include "WND:windows.def" record init ,d5 proc open(WNDCHNL, o, "tt:") xcall flags(7004020, 1) xcall w_init(1, WNDCHNL, MAXWINS,,,init) if (.not.init) xcall create_wnds . . .