Appy FvwmIconMan sticyicon fix.
[fvwm.git] / libs / Fsvg.h
blobe6b44b467a1f0ce74e9614049a866256d3a88fd7
1 #ifndef FSVG_H
2 #define FSVG_H
4 #ifdef HAVE_RSVG
5 #define USE_SVG 1
6 #else
7 #define USE_SVG 0
8 #endif
10 #include "PictureBase.h"
12 #ifndef M_PI
13 #define M_PI 3.14159265358979323846
14 #endif
16 #if USE_SVG
17 # include <librsvg/rsvg.h>
18 # include <librsvg/rsvg-cairo.h>
20 typedef RsvgDimensionData FRsvgDimensionData;
21 typedef RsvgHandle FRsvgHandle;
22 typedef cairo_surface_t Fcairo_surface_t;
23 typedef cairo_t Fcairo_t;
25 # define FCAIRO_FORMAT_ARGB32 CAIRO_FORMAT_ARGB32
26 # define FCAIRO_STATUS_SUCCESS CAIRO_STATUS_SUCCESS
28 # define FG_OBJECT(a) G_OBJECT(a)
29 # define Fg_object_unref(a) g_object_unref(a)
30 # define Frsvg_handle_get_dimensions(a, b) \
31 rsvg_handle_get_dimensions(a, b)
32 # define Frsvg_handle_new_from_file(a, b) rsvg_handle_new_from_file(a, b)
33 # define Frsvg_handle_render_cairo(a, b) rsvg_handle_render_cairo(a, b)
34 # define Frsvg_init() rsvg_init()
36 # define Fcairo_create(a) cairo_create(a)
37 # define Fcairo_destroy(a) cairo_destroy(a)
38 # define Fcairo_image_surface_create_for_data(a,b,c,d,e) \
39 cairo_image_surface_create_for_data(a,b,c,d,e)
40 # define Fcairo_rotate(a, b) cairo_rotate(a, b)
41 # define Fcairo_scale(a, b, c) cairo_scale(a, b, c)
42 # define Fcairo_status(a) cairo_status(a)
43 # define Fcairo_surface_destroy(a) cairo_surface_destroy(a)
44 # define Fcairo_surface_status(a) cairo_surface_status(a)
45 # define Fcairo_translate(a, b, c) cairo_translate(a, b, c)
46 #else
47 typedef struct {
48 int width;
49 int height;
50 double em;
51 double ex;
52 } FRsvgDimensionData;
53 typedef void FRsvgHandle;
54 typedef void Fcairo_surface_t;
55 typedef void Fcairo_t;
57 # define FCAIRO_FORMAT_ARGB32 0
58 # define FCAIRO_STATUS_SUCCESS 0
60 # define FG_OBJECT(a)
61 # define Fg_object_unref(a)
62 # define Frsvg_handle_get_dimensions(a, b)
63 # define Frsvg_handle_new_from_file(a, b) 0
64 # define Frsvg_handle_render_cairo(a, b)
65 # define Frsvg_init()
67 # define Fcairo_create(a) 0
68 # define Fcairo_destroy(a)
69 # define Fcairo_image_surface_create_for_data(a,b,c,d,e) 0
70 # define Fcairo_rotate(a, b)
71 # define Fcairo_scale(a, b, c)
72 # define Fcairo_status(a) 0
73 # define Fcairo_surface_destroy(a)
74 # define Fcairo_surface_status(a) 0
75 # define Fcairo_translate(a, b, c)
76 #endif
78 #endif /* FSVG_H */