Commit 3b8adaa7 authored by Evan Nemerson's avatar Evan Nemerson

Deprecate including headers other than rsvg.h

parent a4a7c412
......@@ -84,6 +84,7 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_CPPFLAGS = \
$(AM_CPPFLAGS)
librsvg_@RSVG_API_MAJOR_VERSION@_la_CFLAGS = \
-DRSVG_COMPILATION \
$(LIBRSVG_CFLAGS) \
$(AM_CFLAGS)
......@@ -183,7 +184,7 @@ librsvg-enum-types.h: s-enum-types-h
s-enum-types-h: $(headers) Makefile
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#ifndef __LIBRSVG_ENUM_TYPES_H__\n#define __LIBRSVG_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fhead "#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION)\n#warning \"Including <librsvg/librsvg-enum-types.h> directly is deprecated.\"\n#endif\n\n#ifndef __LIBRSVG_ENUM_TYPES_H__\n#define __LIBRSVG_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define RSVG_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __LIBRSVG_ENUM_TYPES_H__ */" \
......@@ -197,7 +198,7 @@ librsvg-enum-types.c: s-enum-types-c librsvg-enum-types.h
s-enum-types-c: $(headers) Makefile
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#include \"librsvg-enum-types.h\"\n#include \"rsvg.h\"" \
--fhead "#include \"rsvg.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
......@@ -235,7 +236,7 @@ Rsvg_@RSVG_API_VERSION_U@_gir_PACKAGES = \
pango \
libxml-2.0 \
$(NULL)
Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir)
Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) -DRSVG_COMPILATION
Rsvg_@RSVG_API_VERSION_U@_gir_LIBS = librsvg-@RSVG_API_MAJOR_VERSION@.la
girdir = $(datadir)/gir-1.0
......
#include "librsvg-features.h"
#include "rsvg.h"
/* General initialization hooks */
const unsigned int librsvg_major_version = LIBRSVG_MAJOR_VERSION,
......
#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION)
#warning "Including <librsvg/librsvg-features.h> directly is deprecated."
#endif
#ifndef LIBRSVG_FEATURES_H
#define LIBRSVG_FEATURES_H 1
......
......@@ -23,6 +23,10 @@
Author: Carl Worth <cworth@cworth.org>
*/
#if !defined (__RSVG_RSVG_H_INSIDE__) && !defined (RSVG_COMPILATION)
#warning "Including <librsvg/rsvg-cairo.h> directly is deprecated."
#endif
#ifndef RSVG_CAIRO_H
#define RSVG_CAIRO_H
......
......@@ -37,7 +37,6 @@
#include "rsvg-css.h"
#include "rsvg.h"
#include "rsvg-cairo.h"
#include "rsvg-private.h"
#include "rsvg-size-callback.h"
......
......@@ -39,7 +39,7 @@
#include "rsvg-private.h"
#include "rsvg-defs.h"
#include "librsvg-enum-types.h"
#include "rsvg.h"
enum {
PROP_0,
......
......@@ -26,6 +26,8 @@
#ifndef RSVG_H
#define RSVG_H
#define __RSVG_RSVG_H_INSIDE__
#include <glib-object.h>
#include <gio/gio.h>
......@@ -238,4 +240,10 @@ const char *rsvg_handle_get_metadata (RsvgHandle * handle);
G_END_DECLS
#include "librsvg-enum-types.h"
#include "librsvg-features.h"
#include "rsvg-cairo.h"
#undef __RSVG_RSVG_H_INSIDE__
#endif /* RSVG_H */
......@@ -19,7 +19,6 @@
#include "config.h"
#include "rsvg.h"
#include "rsvg-cairo.h"
#include "rsvg-private.h"
#include "rsvg-size-callback.h"
......
......@@ -30,7 +30,6 @@
#include <stdlib.h>
#include "rsvg.h"
#include "rsvg-cairo.h"
#include "rsvg-private.h"
#include "rsvg-tools-main.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment