Data Structures | |
struct | UDLIB_CONFIG |
standard windom configuration data see windom _config:: documentation for details More... | |
struct | UDLIB_FIXCICON |
structure to access windom CICON subroutine from a userdef library More... | |
struct | APPENV |
environment data set as paramter to all functions of the userdef library More... | |
Functions | |
long __CDECL | xobjc_libinit (APPENV *) |
initialisation of the library | |
void __CDECL | xobjc_udconfig (UDLIB_CONFIG *, APPENV *) |
this function update the configuration | |
void __CDECL | xobjc_libexit (APPENV *) |
exit the library | |
long __CDECL | xobjc_extended (OBJECT *, long, long, APPENV *) |
request for transformation of userdef objects | |
void __CDECL | xobjc_extfree (OBJECT *, long, APPENV *) |
set a userdef object back to its original aspect. | |
char *__CDECL | xobjc_string (OBJECT *, long, char *, APPENV *) |
read/set the string pointer of a userdefined object. | |
long __CDECL | xobjc_char (OBJECT *, long, long, APPENV *) |
read/set the character of a userdefined object. | |
long __CDECL | xobjc_edit (OBJECT *, long, long, short *, long, long, GRECT *, APPENV *) |
similar to objc_edit(tree, ob, the_char, index, kind) | |
long __CDECL | xobjc_get_edpos (OBJECT *, long, long, long, APPENV *) |
return the character of the editable object at (mouse) position x,y. | |
long __CDECL | xobjc_get_unextended (OBJECT *, long, APPENV *) |
utility for ObjcDup() |
ADD THERE some explanations about what is userdef.ldg and recommandations like support of all extended objects type defined by windom (TODO)
long __CDECL xobjc_char | ( | OBJECT * | tree, | |
long | object, | |||
long | the_char, | |||
APPENV * | env | |||
) |
read/set the character of a userdefined object.
tree | the address of the formular | |
object | the object of the formular | |
the_char | a character (from 0 to 255) or -1L | |
env | the context of this application provided by windom |
If "the_char" is a valid character (value from 0 to 255), this value will be the new value of the character of this userdef object.
this function is optionnal, but highly recommanded if any of the userdefined object transformed by this library may contain character.
long __CDECL xobjc_edit | ( | OBJECT * | tree, | |
long | object, | |||
long | the_char, | |||
short * | index, | |||
long | kind, | |||
long | nclip, | |||
GRECT * | gclip, | |||
APPENV * | env | |||
) |
similar to objc_edit(tree, ob, the_char, index, kind)
tree | the address of the formular | |
object | the object of the formular | |
the_char | a character (from 0 to 255) | |
index | ||
kind | ||
nclip | ||
gclip | ||
env | the context of this application provided by windom |
gclip is a array of GRECT. If this function has to draw something to the screen ( a cursor for example), then the list of rectangles given in gclip shall be used as clipping area. nclip is the number of element in the gclip array.
This function is mandatory if the library may create an editable userdefined object.
long __CDECL xobjc_extended | ( | OBJECT * | tree, | |
long | ob, | |||
long | type, | |||
APPENV * | env | |||
) |
request for transformation of userdef objects
tree | the address of the formular | |
ob | the object of the formular | |
type | kind of transformation requested by the user (see mt_RsrcXtype()) | |
env | the context of this application provided by windom |
1L | if the library has transformed this object to a userdef object | |
0L | if the library has not changed this object | |
-1L | if an error has occured. |
If tree[ob] should be transformed to a userdefined object, then the library have to do the transformation: change the ob_type of this object to G_USERDEF, and maybe change some other stuff (ob_spec, ob_x, ob_y, ob_flags...). Nota: the extended ob_type (ob_type & 0xFF00) is free - the library may use this extended ob_type to store informations about the object. Nota: Remember that the transformation OBJECT->userdef must be reversible. So the library must be able to restore all the modified data (original ob_type and ob_spec for example).
The VDI handle given in env->vdih is the handle of the virtual workstation opened by the windom application that must be used by the userdef subroutine to draw on the screen.
The APPENV parameter may be stored in the userblk structure, if the userdef subroutine needs to access to malloc function, or to the udlib_data pointer. this structure (APPENV) will be allocated by windom before calling xobjc_libinit(), and free-ed after xobjc_libexit(), and the same ENVAPP pointer will be given to all the xobjc_xxx functions.
this function is mandatory
void __CDECL xobjc_extfree | ( | OBJECT * | tree, | |
long | object, | |||
APPENV * | env | |||
) |
set a userdef object back to its original aspect.
tree | the address of the formular | |
object | the object of the formular | |
env | the context of this application provided by windom |
this function is mandatory
long __CDECL xobjc_get_edpos | ( | OBJECT * | tree, | |
long | object, | |||
long | x, | |||
long | y, | |||
APPENV * | env | |||
) |
return the character of the editable object at (mouse) position x,y.
tree | the address of the formular | |
object | the object of the formular | |
x | x-position of the mouse, relative to the left border of the object | |
y | y-position of the mouse, relative to the top border of the object | |
env | the context of this application provided by windom |
This function is optional.
long __CDECL xobjc_get_unextended | ( | OBJECT * | tree, | |
long | object, | |||
APPENV * | env | |||
) |
utility for ObjcDup()
tree | the address of the formular | |
object | the object of the formular | |
env | the context of this application provided by windom |
this function will copy in the org structure the original aspect of tree[ob]. In other words, org will be tree[ob] after xobjc_extfree(), but without freeing the userdef tree[ob].
This function is mandatory
void __CDECL xobjc_libexit | ( | APPENV * | env | ) |
exit the library
env | the context of this application provided by windom |
This function shall free all the data allocated by this library.
This function is optional
long __CDECL xobjc_libinit | ( | APPENV * | env | ) |
initialisation of the library
env | the context of this application provided by windom |
<0 | any negative value in case of error, | |
1 | if this library uses the "SIMPLE" interface (not yet specified -- don't use !) | |
2 | if this library uses the "FREEDOM" interface |
The env data provides a user data field (udlib_data) that the library may use for its own needs. This data may be use to store the configuration of the library for example. This env data will be provided to the library in each function of the interface, so that the private data stored in udlib_data will be available in all interface function.
this function is mandatory.
char* __CDECL xobjc_string | ( | OBJECT * | tree, | |
long | object, | |||
char * | string, | |||
APPENV * | env | |||
) |
read/set the string pointer of a userdefined object.
tree | the address of the formular | |
object | the object of the formular | |
string | a pointer to the new string or NULL | |
env | the context of this application provided by windom |
If "string" is not NULL, this value will be the new value of the text pointer of this userdef object. Nota: the pointer shall be changed. A simple strcpy() is not ok !
For SELECTABLE objects, if the string contains the '[' character, then the following character will be used as shortcut to select this object. When the user presses a key, windom will use this function to find if the key pressed is a shortcut to select this object.
tree[ob] has been transformed to userdef object by this library. The userlib doesn't have to check this.
this function is optionnal, but highly recommanded if any of the userdefined object transformed by this library may contain some text.
void __CDECL xobjc_udconfig | ( | UDLIB_CONFIG * | config, | |
APPENV * | env | |||
) |
this function update the configuration
config | the configuration of windom that contains options relative to userdef objects. | |
env | the context of this application provided by windom |
The config data contain all the option of windom that define the aspect of userdefined objects.
The library may use these parameters (or some of them) to adjust the rendering the userdef objects.
This function is optional