Beta functions

Weak functions under developement. Use at your own risk ! More...


Defines

#define dfrm_new_xcicon(d, i, du)   mt_dfrm_new_xcicon(gl_appvar,d,i,du)
 Create a WinDom color icon , see mt_dfrm_new_xcicon().
#define dfrm_new_image(d, i, du)   mt_dfrm_new_image(gl_appvar,d,i,du)
 Creates an object displaying an image, see mt_dfrm_new_image().
#define dfrm_new_texture(d, i, w, h)   mt_dfrm_new_texture(gl_appvar,d,i,w,h)
 Creates an object displaying a texture, see mt_dfrm_new_texture().

Functions

int mt_dfrm_new_xcicon (APPvar *ap, void *dfrm, CICONBLK *icon, int dup)
 Create an icon color from WinDom extended color icon type (XCICON - 0xD).
int mt_dfrm_new_image (APPvar *ap, void *dfrm, MFDB *img, int dup)
 Creates an object displaying an image.
int mt_dfrm_new_texture (APPvar *ap, void *dfrm, MFDB *img, int w, int h)
 Creates an object displaying a texture.


Detailed Description

Weak functions under developement. Use at your own risk !

Define Documentation

#define dfrm_new_image ( d,
i,
du   )     mt_dfrm_new_image(gl_appvar,d,i,du)

Creates an object displaying an image, see mt_dfrm_new_image().

#define dfrm_new_texture ( d,
i,
w,
 )     mt_dfrm_new_texture(gl_appvar,d,i,w,h)

Creates an object displaying a texture, see mt_dfrm_new_texture().

#define dfrm_new_xcicon ( d,
i,
du   )     mt_dfrm_new_xcicon(gl_appvar,d,i,du)

Create a WinDom color icon , see mt_dfrm_new_xcicon().


Function Documentation

int mt_dfrm_new_image ( APPvar *  app,
void *  dfrm,
MFDB *  mfdb,
int  dup 
)

Creates an object displaying an image.

Parameters:
app application descriptor,
dfrm form descriptor,
mfdb pointer to a image data in MFDB format,
dup if TRUE, data image will be memory-duplicated,
Returns:
index of the created object.
This function creates an object displaying an image. The image should have the same number of plan than current screen resolution.

Notice than SCREEN (see http://ldg.free.fr/screen/) may adpated very easily any image format to the current resolution. The demonstration program of DFRM depicts the usage of SCREEN.

The image is displayed using the UserDraw WinDom extended type (see RsrcUserDraw() for details) and the link will be effective only after a dfrm_win_attach() call.

If dup parameter is set to FALSE, the object uses data from image buffer given as parameter. These data should always available as long as the object is displayed. Otherwise, you can duplicate memory (dup parameter set to TRUE), in this case image object will be totally independant from image buffer data.

References __malloc_obspec(), dfrm_new_box(), dfrm_tree(), mfdb_handle::handle, and mfdb_handle::mfdb.

Referenced by mt_dfrm_new_texture().

int mt_dfrm_new_texture ( APPvar *  app,
void *  dfrm,
MFDB *  mfdb,
int  w,
int  h 
)

Creates an object displaying a texture.

Parameters:
app application descriptor,
dfrm form descriptor,
mfdb pointer to a image data in MFDB format,
w,h object dimension,
Returns:
index of the created object.
A texture is just a pattern of a same image repeated until the area to paint is filled. For details, see mt_dfrm_new_image().

References dfrm_seth(), dfrm_setstate(), dfrm_setw(), mt_dfrm_new_image(), and STATE8.

int mt_dfrm_new_xcicon ( APPvar *  app,
void *  dfrm,
CICONBLK *  icon,
int  dup 
)

Create an icon color from WinDom extended color icon type (XCICON - 0xD).

Parameters:
app application descriptor,
dfrm form pointer,
icon pointer to AES cicon data,
dup if TRUE icon data will be memory duplicated.
When WinDom uses internal resource or RsrcXload() function, it uses it own format of icon (advantage is color icons are available on any TOS version, and XCICON have some additional display control) These icons must be fixed with RsrcFixCicon() (that is the case with RsrcXload().

Rem : the WinDom macro GET_CICONBLK returns the CICONBLK structure of an object, a XCICON object has a ob_type value of 0xD18.

Todo:
There are some change in WinDom 2 about this.

References __malloc_obspec(), dfrm_init_obj(), and dfrm_tree().


Generated on Thu Dec 23 18:55:34 2010 for Dynamic Forms by  doxygen 1.5.8