From c0fa0ad3afd5193a33bf06fd1dc090d889376c0a Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 11 Feb 2019 17:07:57 +0800 Subject: Cogl-Path: Mark public symbols for export This way we can use compiler directives to export public symbols, so that we do not need to kepp cogl-path.symbols around anymore, reducing maintenance efforts. --- cogl-path/cogl-path-enum-types.h.in | 3 +++ cogl-path/cogl1-path-functions.h | 50 ++++++++++++++++++------------------- cogl-path/cogl2-path-functions.h | 45 +++++++++++++++++---------------- 3 files changed, 51 insertions(+), 47 deletions(-) diff --git a/cogl-path/cogl-path-enum-types.h.in b/cogl-path/cogl-path-enum-types.h.in index 071686ac..43e89fd9 100644 --- a/cogl-path/cogl-path-enum-types.h.in +++ b/cogl-path/cogl-path-enum-types.h.in @@ -4,6 +4,8 @@ #include +#include + G_BEGIN_DECLS /*** END file-header ***/ @@ -19,6 +21,7 @@ G_END_DECLS /*** END file-tail ***/ /*** BEGIN value-header ***/ +COGL_API GType @enum_name@_get_type (void) G_GNUC_CONST; #define COGL_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) diff --git a/cogl-path/cogl1-path-functions.h b/cogl-path/cogl1-path-functions.h index 18315ab8..c6c2faed 100644 --- a/cogl-path/cogl1-path-functions.h +++ b/cogl-path/cogl1-path-functions.h @@ -52,7 +52,7 @@ COGL_BEGIN_DECLS * Return value: %TRUE if the handle references a #CoglPath, * %FALSE otherwise */ -CoglBool +COGL_API CoglBool cogl_is_path (CoglHandle handle); /** @@ -67,7 +67,7 @@ cogl_is_path (CoglHandle handle); * * Since: 1.4 */ -void +COGL_API void cogl_path_set_fill_rule (CoglPathFillRule fill_rule); /** @@ -79,7 +79,7 @@ cogl_path_set_fill_rule (CoglPathFillRule fill_rule); * * Since: 1.4 */ -CoglPathFillRule +COGL_API CoglPathFillRule cogl_path_get_fill_rule (void); /** @@ -92,7 +92,7 @@ cogl_path_get_fill_rule (void); * The interior of the shape is determined using the fill rule of the * path. See %CoglPathFillRule for details. **/ -void +COGL_API void cogl_path_fill (void); /** @@ -105,7 +105,7 @@ cogl_path_fill (void); * * Since: 1.0 **/ -void +COGL_API void cogl_path_fill_preserve (void); /** @@ -116,7 +116,7 @@ cogl_path_fill_preserve (void); * matrix). To current path is then cleared. To use the path again, * call cogl_path_stroke_preserve() instead. **/ -void +COGL_API void cogl_path_stroke (void); /** @@ -127,7 +127,7 @@ cogl_path_stroke (void); * * Since: 1.0 **/ -void +COGL_API void cogl_path_stroke_preserve (void); /** @@ -139,7 +139,7 @@ cogl_path_stroke_preserve (void); * * Since: 1.0 */ -void +COGL_API void cogl_path_new (void); /** @@ -150,7 +150,7 @@ cogl_path_new (void); * Moves the pen to the given location. If there is an existing path * this will start a new disjoint subpath. **/ -void +COGL_API void cogl_path_move_to (float x, float y); @@ -164,7 +164,7 @@ cogl_path_move_to (float x, * location. If there is an existing path this will start a new * disjoint subpath. **/ -void +COGL_API void cogl_path_rel_move_to (float x, float y); @@ -176,7 +176,7 @@ cogl_path_rel_move_to (float x, * Adds a straight line segment to the current path that ends at the * given coordinates. **/ -void +COGL_API void cogl_path_line_to (float x, float y); @@ -188,7 +188,7 @@ cogl_path_line_to (float x, * Adds a straight line segment to the current path that ends at the * given coordinates relative to the current pen location. **/ -void +COGL_API void cogl_path_rel_line_to (float x, float y); @@ -213,7 +213,7 @@ cogl_path_rel_line_to (float x, * @angle_2 (so if @angle_2 is less than @angle_1 it will decrease, * otherwise it will increase). **/ -void +COGL_API void cogl_path_arc (float center_x, float center_y, float radius_x, @@ -234,7 +234,7 @@ cogl_path_arc (float center_x, * second, third and fourth control points and using current pen location * as the first control point. **/ -void +COGL_API void cogl_path_curve_to (float x_1, float y_1, float x_2, @@ -256,7 +256,7 @@ cogl_path_curve_to (float x_1, * as the first control point. The given coordinates are relative to the * current pen location. */ -void +COGL_API void cogl_path_rel_curve_to (float x_1, float y_1, float x_2, @@ -270,7 +270,7 @@ cogl_path_rel_curve_to (float x_1, * Closes the path being constructed by adding a straight line segment * to it that ends at the first vertex of the path. **/ -void +COGL_API void cogl_path_close (void); /** @@ -284,7 +284,7 @@ cogl_path_close (void); * coordinates. If there is an existing path this will start a new * disjoint sub-path. **/ -void +COGL_API void cogl_path_line (float x_1, float y_1, float x_2, @@ -308,7 +308,7 @@ cogl_path_line (float x_1, * fashion for the rest of the vertices. (num_points - 1) segments will * be constructed. **/ -void +COGL_API void cogl_path_polyline (const float *coords, int num_points); @@ -327,7 +327,7 @@ cogl_path_polyline (const float *coords, * represents the Y coordinate of the first vertex, continuing in the same * fashion for the rest of the vertices. **/ -void +COGL_API void cogl_path_polygon (const float *coords, int num_points); @@ -342,7 +342,7 @@ cogl_path_polygon (const float *coords, * Constructs a rectangular shape at the given coordinates. If there * is an existing path this will start a new disjoint sub-path. **/ -void +COGL_API void cogl_path_rectangle (float x_1, float y_1, float x_2, @@ -358,7 +358,7 @@ cogl_path_rectangle (float x_1, * Constructs an ellipse shape. If there is an existing path this will * start a new disjoint sub-path. **/ -void +COGL_API void cogl_path_ellipse (float center_x, float center_y, float radius_x, @@ -377,7 +377,7 @@ cogl_path_ellipse (float center_x, * Constructs a rectangular shape with rounded corners. If there is an * existing path this will start a new disjoint sub-path. **/ -void +COGL_API void cogl_path_round_rectangle (float x_1, float y_1, float x_2, @@ -399,7 +399,7 @@ cogl_path_round_rectangle (float x_1, * * Since: 1.4 */ -CoglPath * +COGL_API CoglPath * cogl_get_path (void); /** @@ -412,7 +412,7 @@ cogl_get_path (void); * * Since: 1.4 */ -void +COGL_API void cogl_set_path (CoglPath *path); /** @@ -428,7 +428,7 @@ cogl_set_path (CoglPath *path); * * Return value: (transfer full): a copy of the path in @path. */ -CoglPath * +COGL_API CoglPath * cogl_path_copy (CoglPath *path); /** diff --git a/cogl-path/cogl2-path-functions.h b/cogl-path/cogl2-path-functions.h index 72c1fc84..56a83383 100644 --- a/cogl-path/cogl2-path-functions.h +++ b/cogl-path/cogl2-path-functions.h @@ -53,6 +53,7 @@ COGL_BEGIN_DECLS * * Returns: a #GType that can be used with the GLib type system. */ +COGL_API GType cogl_path_get_gtype (void); #endif @@ -68,7 +69,7 @@ GType cogl_path_get_gtype (void); * * Since: 2.0 */ -CoglPath * +COGL_API CoglPath * cogl_path_new (void); /** @@ -86,7 +87,7 @@ cogl_path_new (void); * * Since: 2.0 */ -CoglPath * +COGL_API CoglPath * cogl_path_copy (CoglPath *path); /** @@ -100,7 +101,7 @@ cogl_path_copy (CoglPath *path); * * Since: 2.0 */ -CoglBool +COGL_API CoglBool cogl_is_path (void *object); #define cogl_path_move_to cogl2_path_move_to @@ -114,7 +115,7 @@ cogl_is_path (void *object); * * Since: 2.0 */ -void +COGL_API void cogl_path_move_to (CoglPath *path, float x, float y); @@ -131,7 +132,7 @@ cogl_path_move_to (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_rel_move_to (CoglPath *path, float x, float y); @@ -147,7 +148,7 @@ cogl_path_rel_move_to (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_line_to (CoglPath *path, float x, float y); @@ -163,7 +164,7 @@ cogl_path_line_to (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_rel_line_to (CoglPath *path, float x, float y); @@ -191,7 +192,7 @@ cogl_path_rel_line_to (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_arc (CoglPath *path, float center_x, float center_y, @@ -216,7 +217,7 @@ cogl_path_arc (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_curve_to (CoglPath *path, float x_1, float y_1, @@ -242,7 +243,7 @@ cogl_path_curve_to (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_rel_curve_to (CoglPath *path, float x_1, float y_1, @@ -260,7 +261,7 @@ cogl_path_rel_curve_to (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_close (CoglPath *path); #define cogl_path_line cogl2_path_line @@ -277,7 +278,7 @@ cogl_path_close (CoglPath *path); * * Since: 2.0 */ -void +COGL_API void cogl_path_line (CoglPath *path, float x_1, float y_1, @@ -305,7 +306,7 @@ cogl_path_line (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_polyline (CoglPath *path, const float *coords, int num_points); @@ -327,7 +328,7 @@ cogl_path_polyline (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_polygon (CoglPath *path, const float *coords, int num_points); @@ -345,7 +346,7 @@ cogl_path_polygon (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_rectangle (CoglPath *path, float x_1, float y_1, @@ -365,7 +366,7 @@ cogl_path_rectangle (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_ellipse (CoglPath *path, float center_x, float center_y, @@ -388,7 +389,7 @@ cogl_path_ellipse (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_round_rectangle (CoglPath *path, float x_1, float y_1, @@ -410,7 +411,7 @@ cogl_path_round_rectangle (CoglPath *path, * * Since: 2.0 */ -void +COGL_API void cogl_path_set_fill_rule (CoglPath *path, CoglPathFillRule fill_rule); #define cogl_path_get_fill_rule cogl2_path_get_fill_rule @@ -423,7 +424,7 @@ cogl_path_set_fill_rule (CoglPath *path, CoglPathFillRule fill_rule); * * Since: 2.0 */ -CoglPathFillRule +COGL_API CoglPathFillRule cogl_path_get_fill_rule (CoglPath *path); #define cogl_path_fill cogl2_path_fill @@ -443,7 +444,7 @@ cogl_path_get_fill_rule (CoglPath *path); * * Since: 2.0 */ -void +COGL_API void cogl_path_fill (CoglPath *path); /** @@ -482,7 +483,7 @@ cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer, * * Since: 2.0 */ -void +COGL_API void cogl_path_stroke (CoglPath *path); /** @@ -517,7 +518,7 @@ cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer, * Since: 1.0 * Stability: unstable */ -void +COGL_API void cogl_framebuffer_push_path_clip (CoglFramebuffer *framebuffer, CoglPath *path); -- cgit v1.2.1