Application Library
[Reference documentation]

Group of functions devoted to parametrize the GEM application. More...

Data Structures

struct  _appvar
struct  APPvar
 the application descriptor structure. More...

Typedefs

typedef _appvar APPvar

Functions

APPvarmt_ApplInit (void)
 AES and WinDom initialization.
int mt_ApplExit (APPvar *app)
 Terminate a WinDom and AES session.
int mt_ApplGet (APPvar *app, int mode, short *v1, short *v2, short *v3, short *v4)
 Get application parameters.
int mt_ApplSet (APPvar *app, int mode, short v1, short v2, short v3, short v4)
 Set application parameters.
int mt_ApplName (APPvar *app, char *name, int handle)
 Identify the name of a GEM process.
int mt_ApplWrite (APPvar *app, int to, int msg, int b3, int b4, int b5, int b6, int b7)
 Send a message to a GEM process.
int mt_ApplControl (APPvar *app, int ap_cid, int ap_cwhat, void *ap_cout)
 Control of GEM process.
int ApplInit (void)
 see mt_ApplInit()
int ApplExit (void)
 see mt_ApplExit()

Detailed Description

Group of functions devoted to parametrize the GEM application.


Typedef Documentation

typedef struct _appvar APPvar
 


Function Documentation

int ApplExit void   ) 
 

see mt_ApplExit()

Returns:
0 or a negative code error.
This function is the version single threaded of mt_ApplExit().

See also:
ApplInit(), mt_ApplExit()

int ApplInit void   ) 
 

see mt_ApplInit()

Returns:
AES application descriptor.
This function is the version single threaded of mt_ApplInit().

See also:
ApplExit(), mt_ApplInit()

int mt_ApplControl APPvar app,
int  ap_cid,
int  ap_cwhat,
void *  ap_cout
 

Control of GEM process.

Parameters:
app application descriptor,
ap_cid identifier of application targetted,
ap_cwhat action to perform.
ap_cout pointer for the return value if any.
Returns:
same as AES function mt_appl_control()
Refer to the documentation of the AES function mt_appl_control() for details about these parameters.

If the AES supports mt_appl_control(), then mt_appl_control with the given parameters is invoked.

If Magic is detected, as Magic doesn't support mt_appl_control(), we try to emulate this function thanks to the Magic specific message SM_M_SPECIAL. At the moment, only the following actions (parameter ap_cwhat) are emulated :

  • APC_HIDE: mask the application,
  • APC_SHOW: show the application,

int mt_ApplExit APPvar app  ) 
 

Terminate a WinDom and AES session.

Parameters:
app application descriptor.
Returns:
0 or code error.
See also:
mt_ApplInit()

int mt_ApplGet APPvar app,
int  mode,
short *  v1,
short *  v2,
short *  v3,
short *  v4
 

Get application parameters.

Parameters:
app application descriptor,
mode,v1,v2,v3,v4 similar to mt_ApplSet().
Returns:
0 if no error.
mt_ApplGet() returns global application parameters. mt_ApplGet() performs the inverse action of mt_ApplSet().

Usage of v1, v2, v3 and v4 depends on mode value. For details about this mode, read manual of _config.

The NULL value can be used if a parameter has not to be read

See also:
mt_ApplSet()
Todo:
names between windom configuration variable, constant for mode parameter and internal variable should be harmonized.

APPvar* mt_ApplInit void   ) 
 

AES and WinDom initialization.

Returns:
an application descriptor. This variable is always the first parameter of all others WinDom functions.
This function replaces the appl_init() AES function and should be the first call of WinDom library. The AES and WinDom environements are iniatilized. The windom configuration file is read in order to setup the global windom variables.

See also:
my_ApplExit()

int mt_ApplName APPvar app,
char *  name,
int  id
 

Identify the name of a GEM process.

Parameters:
app application descriptor,
name name of the process (a 8-byte buffer, AES formatted)
id AES handle of the process,
Returns:
1 if process is found, 0 otherwise.
This function gets the name of a GEM process using its AES process handle. This function uses the appl_search() function. If this function is not available, ApplName() returns always 0. In this case the AES4_APPSEARCH bit of the app->aes4 is 0.

See also:
appl_search()

appl_find()

int mt_ApplSet APPvar app,
int  mode,
short  v1,
short  v2,
short  v3,
short  v4
 

Set application parameters.

Parameters:
app application descriptor
mode,v1,v2,v3,v4 see below.
Returns:
0 if no error.
mt_ApplSet() sets global application parameters. When mt_ApplInit() is called, the WinDom configuration is read. However, the developper can set its own settings using mt_ApplSet().

Refer to the documentation of the _config private stucture for details about the configuration and possible values of mode, v1, v2, v3 and v4.

The special DEFVAL value does not change the value. For example :

// Set only the color of string objects
mt_ApplSet( app, APS_STRSTYLE, DEFVAL, DEFVAL, RED); 

See also:
mt_ApplGet()

Configuration Library

int mt_ApplWrite APPvar app,
int  to,
int  msg,
int  b3,
int  b4,
int  b5,
int  b6,
int  b7
 

Send a message to a GEM process.

Parameters:
app application descriptor,
to AES id of the targeted process,
msg message number to send,
b3,b4,b5,b6,b7 5 parameters filling words 3 to 7 of the AES message pipe.
Returns:
the value returned by appl_write().
This function is just a more practical call to the appl_write() AES function. It replaces the obsolet mt_snd_msg() WinDom function. Some AES message needs long args representing a pointer value. In this case, use the macro function ADR() to transform an one long argument into two short arguments.

Example:

void ex_vastart( APPvar *app) {
  ApplWrite( id_target, VA_START, ADR(strcpy(app->pipe,"C:\\NEWDESK.INF")), 0, 0);
} 

Note:
the implementation with variable arguments has been removed.


Generated on Thu Jun 22 11:45:28 2006 for WinDom by  doxygen 1.4.6