Imported Upstream version 1.9.8
[platform/upstream/doxygen.git] / deps / libmscgen / mscgen_api.h
1 #ifndef MSCGEN_API_H
2 #define MSCGEN_API_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define MSCGEN_OK                   ( 0)
9 #define MSCGEN_FILE_ERROR           (-1)
10 #define MSCGEN_INPUT_FORMAT_ERROR   (-2)
11 #define MSCGEN_OUTPUT_CONTEXT_ERROR (-3)
12
13 /** The supported image formats */
14 typedef enum
15 {
16   mscgen_format_png, /**< PNG bitmap image file */
17   mscgen_format_eps, /**< Encapsulated PostScript file */
18   mscgen_format_svg, /**< Scalable Vector Graphics file */
19   mscgen_format_pngmap, /**< Image map for a bitmap file */
20   mscgen_format_svgmap  /**< Image map for a SVG file */
21 } mscgen_format_t;
22
23 /** generate an image file for a given .msc file.
24  *  @param inputFile the name of the MSC file to process.
25  *  @param outputFile the name of the image file to generate.
26  *  @param format the format of the image file to generate.
27  *  @return 0 on success, a non zero error code on failure.
28  */
29 int mscgen_generate(const char *inputFile,
30                     const char *outputFile,
31                     mscgen_format_t format
32                    );
33
34 /** Translates the error code returned by mscgen_generate into a string */
35 const char *mscgen_error2str(int code);
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif // MSCGEN_API_H