Classes | |
struct | umd_cover_t |
struct | umd_chapter_t |
Defines | |
#define | UMD_LOG(f) ((void (*) (void *, const char *, ...)) f) |
Typedefs | |
typedef void(* | umd_log )(void *, const char *,...) |
typedef struct umd_s | umd_t |
typedef struct umd_page_s | umd_page_t |
Enumerations | |
enum | umd_type_t { UMD_TEXT, UMD_IMAGE } |
Functions | |
umd_t * | umd_new () |
new a umd struct | |
void | umd_free (umd_t *umd) |
free the umd struct resources, but not free ths struct | |
void | umd_destroy (umd_t *umd) |
destroy a umd struct. This will free the umd struct | |
umd_t * | umd_new_from_file (const char *file) |
new a umd from a input file | |
int | umd_parser_file (umd_t *umd, const char *file) |
parser a umd file to umd struct | |
void | umd_set_log (umd_t *umd, int loglevel, umd_log log, void *arg) |
set umd log callback | |
void | umd_set_font_face (umd_t *umd, const char *face, int italic, int bold) |
set render font face | |
char * | umd_get_title (umd_t *umd) |
get book title | |
char * | umd_get_author (umd_t *umd) |
get book author | |
char * | umd_get_year (umd_t *umd) |
get book year | |
char * | umd_get_month (umd_t *umd) |
get book month | |
char * | umd_get_day (umd_t *umd) |
get book day | |
char * | umd_get_type (umd_t *umd) |
get book type | |
char * | umd_get_publisher (umd_t *umd) |
get book publisher | |
char * | umd_get_vendor (umd_t *umd) |
get book vendor | |
char * | umd_get_content (umd_t *umd, size_t *lenp) |
get book content | |
int | umd_get_chapter_n (umd_t *umd) |
get chapter count of a umd struct | |
umd_chapter_t * | umd_get_nth_chapter (umd_t *umd, size_t id) |
get chapter of a umd struct | |
umd_cover_t * | umd_get_cover (umd_t *umd) |
get cover of a umd struct | |
int * | umd_write_file (umd_t *umd, const char *file) |
write a umd_t to a file | |
int * | umd_write_fp (umd_t *umd, FILE *fp) |
write a umd_t to a file descriptor | |
void | umd_fprintf (umd_t *umd, FILE *fp) |
printf umd struct for debug | |
int | umd_get_page_n (umd_t *umd) |
get page count of a umd struct | |
umd_page_t * | umd_get_nth_page (umd_t *umd, size_t id) |
get page of a umd struct | |
int | umd_page_get_content (umd_page_t *page, char *buf, size_t size) |
get page content | |
void | umd_page_free (umd_page_t *page) |
free a page | |
int | umd_page_get_size (umd_page_t *page, int *px, int *py) |
get page size | |
int | umd_page_render (umd_page_t *page, int fromx, int fromy, int tox, int toy, double zm, int rot, unsigned char *buffer, size_t size) |
render umd page to a gdk-pixbuf |
#define UMD_LOG | ( | f | ) | ((void (*) (void *, const char *, ...)) f) |
UMD log callback
typedef void(* umd_log)(void *, const char *,...) |
UMD log callback function
typedef struct umd_page_s umd_page_t |
UMD book page
typedef struct umd_s umd_t |
UMD book type
enum umd_type_t |
void umd_destroy | ( | umd_t * | umd | ) |
destroy a umd struct. This will free the umd struct
umd | umd struct pointer |
void umd_fprintf | ( | umd_t * | umd, | |
FILE * | fp | |||
) |
printf umd struct for debug
umd | umd struct | |
fp | file pointer |
void umd_free | ( | umd_t * | umd | ) |
free the umd struct resources, but not free ths struct
umd | umd struct |
char* umd_get_author | ( | umd_t * | umd | ) |
get book author
umd | umd struct |
int umd_get_chapter_n | ( | umd_t * | umd | ) |
get chapter count of a umd struct
umd | umd struct |
new allocated char string. Warning: need freed by user.
char* umd_get_content | ( | umd_t * | umd, | |
size_t * | lenp | |||
) |
get book content
umd | umd struct | |
lenp | size_t pointer for save the string length |
umd_cover_t* umd_get_cover | ( | umd_t * | umd | ) |
char* umd_get_day | ( | umd_t * | umd | ) |
get book day
umd | umd struct |
char* umd_get_month | ( | umd_t * | umd | ) |
get book month
umd | umd struct |
umd_chapter_t* umd_get_nth_chapter | ( | umd_t * | umd, | |
size_t | id | |||
) |
umd_page_t* umd_get_nth_page | ( | umd_t * | umd, | |
size_t | id | |||
) |
get page of a umd struct
umd | umd struct | |
id | page id |
int umd_get_page_n | ( | umd_t * | umd | ) |
get page count of a umd struct
umd | umd struct |
char* umd_get_publisher | ( | umd_t * | umd | ) |
get book publisher
umd | umd struct |
char* umd_get_title | ( | umd_t * | umd | ) |
get book title
umd | umd struct |
char* umd_get_type | ( | umd_t * | umd | ) |
get book type
umd | umd struct |
char* umd_get_vendor | ( | umd_t * | umd | ) |
get book vendor
umd | umd struct |
char* umd_get_year | ( | umd_t * | umd | ) |
get book year
umd | umd struct |
umd_t* umd_new | ( | ) |
new a umd struct
umd_t* umd_new_from_file | ( | const char * | file | ) |
new a umd from a input file
file | input file |
void umd_page_free | ( | umd_page_t * | page | ) |
free a page
page | umd page struct |
int umd_page_get_content | ( | umd_page_t * | page, | |
char * | buf, | |||
size_t | size | |||
) |
get page content
page | umd page struct | |
buf | output buffer | |
size | output buffer size |
int umd_page_get_size | ( | umd_page_t * | page, | |
int * | px, | |||
int * | py | |||
) |
get page size
page | umd_page_t struct | |
px | width pointer | |
py | height pointer |
int umd_page_render | ( | umd_page_t * | page, | |
int | fromx, | |||
int | fromy, | |||
int | tox, | |||
int | toy, | |||
double | zm, | |||
int | rot, | |||
unsigned char * | buffer, | |||
size_t | size | |||
) |
render umd page to a gdk-pixbuf
page | umd_page_t struct | |
fromx | from x | |
fromy | from y | |
tox | to x | |
toy | to y | |
zm | zoom rate | |
rot | weather rotation | |
buffer | output buffer | |
size | buffer size |
int umd_parser_file | ( | umd_t * | umd, | |
const char * | file | |||
) |
parser a umd file to umd struct
umd | umd struct | |
file | umd file name |
void umd_set_font_face | ( | umd_t * | umd, | |
const char * | face, | |||
int | italic, | |||
int | bold | |||
) |
set render font face
umd | umd struct | |
face | font family, like 'Sans', 'serif', ... | |
italic | weather font is italic | |
bold | weather font is bold |
set umd log callback
umd | umd struct | |
loglevel | log level: 0, 1, or 2 | |
log | log callback function | |
arg | user argument |
int* umd_write_file | ( | umd_t * | umd, | |
const char * | file | |||
) |
write a umd_t to a file
umd | umd struct | |
file | output file name |
int* umd_write_fp | ( | umd_t * | umd, | |
FILE * | fp | |||
) |
write a umd_t to a file descriptor
umd | umd struct | |
fp | output file descriptor |