index.html
Main Page
classes.html
Alphabetical List
annotated.html
Data Structures
files.html
File List
functions.html
Data Fields
globals.html
Globals
bbuf.c File Reference
Functions
types_8h.html#a5
wmf_error_t
bbuf_8c.html#a0
wmf_bbuf_input
(
types_8h.html#a22
wmfAPI
*API,
types_8h.html#a8
wmfRead
fp_read,
types_8h.html#a9
wmfSeek
fp_seek,
types_8h.html#a10
wmfTell
fp_tell, void *user_data)
types_8h.html#a5
wmf_error_t
bbuf_8c.html#a1
wmf_file_open
(
types_8h.html#a22
wmfAPI
*API, const char *file)
types_8h.html#a5
wmf_error_t
bbuf_8c.html#a2
wmf_file_close
(
types_8h.html#a22
wmfAPI
*API)
int
bbuf_8c.html#a3
wmf_file_read
(void *user_data)
int
bbuf_8c.html#a4
wmf_file_seek
(void *user_data, long pos)
long
bbuf_8c.html#a5
wmf_file_tell
(void *user_data)
types_8h.html#a5
wmf_error_t
bbuf_8c.html#a6
wmf_mem_open
(
types_8h.html#a22
wmfAPI
*API, unsigned char *mem, long length)
types_8h.html#a5
wmf_error_t
bbuf_8c.html#a7
wmf_mem_close
(
types_8h.html#a22
wmfAPI
*API)
int
bbuf_8c.html#a8
wmf_mem_read
(void *user_data)
int
bbuf_8c.html#a9
wmf_mem_seek
(void *user_data, long pos)
long
bbuf_8c.html#a10
wmf_mem_tell
(void *user_data)
Function Documentation
types_8h.html#a5
wmf_error_t
wmf_bbuf_input
(
types_8h.html#a22
wmfAPI
*
API
,
types_8h.html#a8
wmfRead
fp_read
,
types_8h.html#a9
wmfSeek
fp_seek
,
types_8h.html#a10
wmfTell
fp_tell
,
void *
user_data
)
Set custom metafile input-stream handler functions.
Parameters:
API
the API handle
fp_read
function to read a byte
fp_seek
function to set position
fp_tell
function to get position
user_data
handle for user data
libwmf
has simple methods for reading either from file or from memory, but many applications will want to use customized variants of these.
bbuf_8c.html#a0
wmf_bbuf_input()
enables this.
typedef int  (*wmfRead) (void* user_data);
typedef int  (*wmfSeek) (void* user_data,long position);
typedef long (*wmfTell) (void* user_data);
types_8h.html#a8
wmfRead
returns unsigned char cast to int, or EOF (cf. fgetc())
types_8h.html#a9
wmfSeek
returns (-1) on error, otherwise 0 (cf. fseek())
types_8h.html#a10
wmfTell
returns (-1) on error, otherwise current position (cf. ftell())
Returns:
Returns the library error state (
wmf_E_None
on success). Possible library error state of
wmf_E_Glitch
, if any of the three functions is zero.
types_8h.html#a5
wmf_error_t
wmf_file_close
(
types_8h.html#a22
wmfAPI
*
API
)
Close metafile input file stream.
Parameters:
API
the API handle
Returns:
Returns the library error state (
wmf_E_None
on success). Possible library error state of
wmf_E_Glitch
.
types_8h.html#a5
wmf_error_t
wmf_file_open
(
types_8h.html#a22
wmfAPI
*
API
,
const char *
file
)
Open file as metafile.
Parameters:
API
the API handle
file
file name
Simple method for reading from file.
Returns:
Returns the library error state (
wmf_E_None
on success). Possible library error states of
wmf_E_Glitch
or
wmf_E_BadFile
.
int wmf_file_read
(
void *
)
file input (wmf_file_open): fgetc()
int wmf_file_seek
(
void *
,
long
)
file input (wmf_file_open): fseek()
long wmf_file_tell
(
void *
)
file input (wmf_file_open): ftell()
types_8h.html#a5
wmf_error_t
wmf_mem_close
(
types_8h.html#a22
wmfAPI
*
API
)
Close metafile input memory stream.
Parameters:
API
the API handle
Returns:
Returns the library error state (
wmf_E_None
on success).
types_8h.html#a5
wmf_error_t
wmf_mem_open
(
types_8h.html#a22
wmfAPI
*
API
,
unsigned char *
mem
,
long
length
)
Open metafile in memory.
Parameters:
API
the API handle
mem
the metafile in memory
length
the length in bytes of metafile data
Simple method for reading from memory as array of unsigned char.
Returns:
Returns the library error state (
wmf_E_None
on success). Possible library error state of
wmf_E_Glitch
.
int wmf_mem_read
(
void *
)
memory input (wmf_mem_open): fgetc() equiv.
int wmf_mem_seek
(
void *
,
long
)
memory input (wmf_mem_open): fseek() equiv.
long wmf_mem_tell
(
void *
)
memory input (wmf_mem_open): ftell() equiv.
Generated on Tue Dec 10 19:53:47 2002 for libwmf by
http://www.doxygen.org/index.html
doxygen
1.2.18
