1 #ifndef ASIMAGEXML_HEADER_FILE_INCLUDED 2 #define ASIMAGEXML_HEADER_FILE_INCLUDED 3 4 #include "asimage.h" 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 /* We don't trust the math library to actually provide this number.*/ 11 #undef PI 12 #define PI 180 13 14 15 #define ASIM_XML_ENABLE_SAVE (0x01<<0) 16 #define ASIM_XML_ENABLE_SHOW (0x01<<1) 17 18 19 struct ASImageManager ; 20 struct ASFontManager ; 21 struct xml_elem_t; 22 23 void set_xml_image_manager( struct ASImageManager *imman ); 24 void set_xml_font_manager( struct ASFontManager *fontman ); 25 struct ASImageManager *create_generic_imageman(const char *path); 26 struct ASFontManager *create_generic_fontman(Display *dpy, const char *path); 27 28 29 ASImage * 30 compose_asimage_xml(ASVisual *asv, 31 struct ASImageManager *imman, 32 struct ASFontManager *fontman, 33 char *doc_str, ASFlagType flags, 34 int verbose, Window display_win, 35 const char *path); 36 37 38 #define ASXMLVAR_TargetWidth "target.width" 39 #define ASXMLVAR_TargetHeight "target.height" 40 41 42 ASImage * 43 compose_asimage_xml_at_size(ASVisual *asv, 44 struct ASImageManager *imman, 45 struct ASFontManager *fontman, 46 char *doc_str, 47 ASFlagType flags, 48 int verbose, 49 Window display_win, 50 const char *path, 51 int target_width, 52 int target_height); 53 54 ASImage * 55 compose_asimage_xml_from_doc(ASVisual *asv, 56 struct ASImageManager *imman, 57 struct ASFontManager *fontman, 58 struct xml_elem_t* doc, 59 ASFlagType flags, 60 int verbose, 61 Window display_win, 62 const char *path, 63 int target_width, int target_height); 64 65 void show_asimage(ASVisual *asv, ASImage* im, Window w, long delay); 66 ASImage* build_image_from_xml( ASVisual *asv, 67 struct ASImageManager *imman, 68 struct ASFontManager *fontman, 69 struct xml_elem_t* doc, struct xml_elem_t** rparm, 70 ASFlagType flags, int verbose, Window display_win); 71 Bool save_asimage_to_file(const char* file2bsaved, ASImage *im, 72 const char* strtype, 73 const char *compress, 74 const char *opacity, 75 int delay, int replace); 76 77 78 #ifdef __cplusplus 79 } 80 #endif 81 82 #endif /*#ifndef ASIMAGEXML_HEADER_FILE_INCLUDED*/ 83 84 85