...

Chasys Draw IES Help:

SDK - Callback Suites - pi_MetaMarkup


SDK - Callback Suites - pi_MetaMarkup
 

Callback Overview

This callback suite provides the plug-in with a suite of functions for manipulating mark-up metadata. It is recommended that plug-ins use this suite instead of writing mark-up data directly; the reason for this is that it transfers the burden of standards conformance to the host and thus makes your plug-in more future-proof.

 

Callback Interface Description

This interface is used for working with MARK metadata.

//pi_MetaMarkup

//-----------------------------------------------------------------------------

#define PI_METAMARKUP_VERSION                         0x00010001

 

struct pi_METAMARKUP

{

      unsigned long version;

      unsigned long unused_1;

//8

      int (__cdecl* append)(char* markup,int size,char* fragment);

      int (__cdecl* unused)(char* markup,char* tag);

      int (__cdecl* get_tag)(char* markup,char* tag,char* value,int size);

      int (__cdecl* set_tag)(char* markup,int size,char* tag,char* value);

      int (__cdecl* bpp_get)(char* markup,int* bpp);

      int (__cdecl* bpp_set)(char* markup,int size,int bpp);

      int (__cdecl* ppi_get)(char* markup,double* x,double* y);

      int (__cdecl* ppi_set)(char* markup,int size,double x,double y);

      int (__cdecl* hotspot_get)(char* markup,int* x,int* y);

      int (__cdecl* hotspot_set)(char* markup,int size,int x,int y);

      int (__cdecl* exif_get)(char* markup,void** exif,int* sz_exif);

      int (__cdecl* exif_set)(char* markup,int sz_mk,void* exif,int sz_ex);

//56

      unsigned char     reserved_x[1024-56];//do not touch

};

 

append() adds the mark-up fragment to the main markup data. It's useful for cases in which the mark-up data has been compiled in pieces. The size argument is the size of the buffer holding the mark-up data.

unused() is currently not implemented and will be null.

get_tag() and set_tag() retrieve and modify (respectively) the value of the specified tag. If “value” is null when calling the set function, the refrenced tag will be removed from the mark-up.

bpp_get() and bpp_set() retrieve and modify (respectively) the value of the image.bpp (bits per pixel) tag.

ppi_get() and ppi_set() retrieve and modify (respectively) the value of the image.ppi (pixels per inch) tag.

hotspot_get() and hotspot_set() retrieve and modify (respectively) the value of the image.hotspot (hotspot position) tag.

exif_get() and exif_set() retrieve and modify (respectively) the exif.* group of tags (EXIF metadata). The exif data is passed in and out in binary format as per the EXIF standard; host is responsible for converting this data to and from the textual representation used by the MARK attachment. This saves the plug-in the burden of implementing an EXIF conversion library. When you call exif_get(), the host dereferences exif and sz_exif and checks if they point to valid exif data. If so, the host will attempt to initialize the EXIF object with that data before inserting values from markup. The host will then return the new data and its size without attempting to free the original buffer; doing that is the caller's responsibility.

The internal implementation of pi_MetaMarkup is neither defined nor fixed, and are purely host dependent. Do not attempt to access the reserved portion of the object.

 

 

Copyright © John Paul Chacha, 2001-2017

The information herein is subject to change without any notice. The author makes no guarantees as to the completeness of this documentation.