[librsvg] rsvg-private.h: Move the structs/enums to rsvg-handle.c
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] rsvg-private.h: Move the structs/enums to rsvg-handle.c
- Date: Tue, 18 Dec 2018 00:32:39 +0000 (UTC)
commit 311d3f151abf38f768c5da223f9946a576b03b4c
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Dec 17 18:31:24 2018 -0600
rsvg-private.h: Move the structs/enums to rsvg-handle.c
librsvg/rsvg-handle.c | 52 ++++++++++++++++++++++++++++++++++
librsvg/rsvg-private.h | 75 --------------------------------------------------
2 files changed, 52 insertions(+), 75 deletions(-)
---
diff --git a/librsvg/rsvg-handle.c b/librsvg/rsvg-handle.c
index e15e9aa6..8ba6dd6a 100644
--- a/librsvg/rsvg-handle.c
+++ b/librsvg/rsvg-handle.c
@@ -127,6 +127,37 @@
#include <glib/gprintf.h>
#include "rsvg-private.h"
+/* Defined in rsvg_internals/src/load.rs */
+typedef struct RsvgLoad RsvgLoad;
+
+/* Defined in rsvg_internals/src/handle.rs */
+typedef struct RsvgHandleRust RsvgHandleRust;
+
+/* Implemented in rsvg_internals/src/xml.rs */
+typedef struct RsvgXmlState RsvgXmlState;
+
+/* Reading state for an RsvgHandle */
+typedef enum {
+ RSVG_HANDLE_STATE_START,
+ RSVG_HANDLE_STATE_LOADING,
+ RSVG_HANDLE_STATE_CLOSED_OK,
+ RSVG_HANDLE_STATE_CLOSED_ERROR
+} RsvgHandleState;
+
+/* Implemented in rsvg_internals/src/xml.rs */
+extern RsvgXmlState *rsvg_xml_state_new (RsvgHandle *handle);
+extern void rsvg_xml_state_error(RsvgXmlState *xml, const char *msg);
+
+/* Implemented in rsvg_internals/src/xml2_load.rs */
+extern gboolean rsvg_xml_state_load_from_possibly_compressed_stream (RsvgXmlState *xml,
+ guint flags,
+ GInputStream *stream,
+ GCancellable *cancellable,
+ GError **error);
+
+G_GNUC_INTERNAL
+RsvgHandleRust *rsvg_handle_get_rust (RsvgHandle *handle);
+
/* Implemented in rsvg_internals/src/handle.rs */
extern RsvgHandleRust *rsvg_handle_rust_new (void);
extern void rsvg_handle_rust_free (RsvgHandleRust *raw_handle);
@@ -181,6 +212,27 @@ extern void rsvg_drawing_ctx_get_geometry (RsvgDrawingCtx *ctx,
RsvgRectangle *ink_rect,
RsvgRectangle *logical_rect);
+struct RsvgHandlePrivate {
+ RsvgLoad *load;
+
+ RsvgSizeFunc size_func;
+ gpointer user_data;
+ GDestroyNotify user_data_destroy;
+
+ gchar *base_uri; // Keep this here; since rsvg_handle_get_base_uri() returns a const char *
+
+ gboolean in_loop; /* see get_dimension() */
+
+ gboolean is_testing; /* Are we being run from the test suite? */
+
+#ifdef HAVE_PANGOFT2
+ FcConfig *font_config_for_testing;
+ PangoFontMap *font_map_for_testing;
+#endif
+
+ RsvgHandleRust *rust_handle;
+};
+
enum {
PROP_0,
PROP_FLAGS,
diff --git a/librsvg/rsvg-private.h b/librsvg/rsvg-private.h
index 9d9ed259..78e8c743 100644
--- a/librsvg/rsvg-private.h
+++ b/librsvg/rsvg-private.h
@@ -49,16 +49,9 @@
G_BEGIN_DECLS
-typedef struct RsvgSaxHandler RsvgSaxHandler;
-typedef struct _RsvgCairoRender RsvgCairoRender;
typedef struct RsvgDrawingCtx RsvgDrawingCtx;
-/* Opaque; defined in rsvg_internals/src/state.rs */
-typedef struct RsvgState RsvgState;
-
-typedef void *RsvgPropertyBag;
typedef struct _RsvgNode RsvgNode;
-typedef struct _RsvgFilter RsvgFilter;
/* prepare for gettext */
#ifndef _
@@ -75,58 +68,6 @@ double rsvg_get_default_dpi_x (void);
G_GNUC_INTERNAL
double rsvg_get_default_dpi_y (void);
-/* Reading state for an RsvgHandle */
-typedef enum {
- RSVG_HANDLE_STATE_START,
- RSVG_HANDLE_STATE_LOADING,
- RSVG_HANDLE_STATE_CLOSED_OK,
- RSVG_HANDLE_STATE_CLOSED_ERROR
-} RsvgHandleState;
-
-typedef struct RsvgLoad RsvgLoad;
-
-/* Defined in rsvg_internals/src/handle.rs */
-typedef struct RsvgHandleRust RsvgHandleRust;
-
-struct RsvgHandlePrivate {
- RsvgLoad *load;
-
- RsvgSizeFunc size_func;
- gpointer user_data;
- GDestroyNotify user_data_destroy;
-
- gchar *base_uri; // Keep this here; since rsvg_handle_get_base_uri() returns a const char *
-
- gboolean in_loop; /* see get_dimension() */
-
- gboolean is_testing; /* Are we being run from the test suite? */
-
-#ifdef HAVE_PANGOFT2
- FcConfig *font_config_for_testing;
- PangoFontMap *font_map_for_testing;
-#endif
-
- RsvgHandleRust *rust_handle;
-};
-
-/* Implemented in rsvg_internals/src/xml.rs */
-typedef struct RsvgXmlState RsvgXmlState;
-
-/* Implemented in rsvg_internals/src/xml.rs */
-G_GNUC_INTERNAL
-RsvgXmlState *rsvg_xml_state_new (RsvgHandle *handle);
-
-G_GNUC_INTERNAL
-void rsvg_xml_state_error(RsvgXmlState *xml, const char *msg);
-
-/* Implemented in rsvg_internals/src/xml2_load.rs */
-G_GNUC_INTERNAL
-gboolean rsvg_xml_state_load_from_possibly_compressed_stream (RsvgXmlState *xml,
- guint flags,
- GInputStream *stream,
- GCancellable *cancellable,
- GError **error);
-
G_GNUC_INTERNAL
GdkPixbuf *rsvg_cairo_surface_to_pixbuf (cairo_surface_t *surface);
@@ -134,22 +75,6 @@ G_GNUC_INTERNAL
void rsvg_return_if_fail_warning (const char *pretty_function,
const char *expression, GError ** error);
-G_GNUC_INTERNAL
-RsvgHandleRust *rsvg_handle_get_rust (RsvgHandle *handle);
-
-/* Implemented in rsvg_internals/src/handle.rs */
-G_GNUC_INTERNAL
-char *rsvg_handle_acquire_data (RsvgHandle *handle,
- const char *href,
- gsize *len,
- GError **error);
-
-/* Implemented in rsvg_internals/src/handle.rs */
-G_GNUC_INTERNAL
-GInputStream *rsvg_handle_acquire_stream (RsvgHandle *handle,
- const char *href,
- GError **error);
-
#define rsvg_return_if_fail(expr, error) G_STMT_START{ \
if G_LIKELY(expr) { } else \
{ \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]