summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-07 23:11:44 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-02-07 23:11:44 +0200
commit3c566b2cb01ea3703aea216959f870b0269a6878 (patch)
tree3e1ab58757c9b3e94784d096823f2e432558266f
parent77afc21abd2ef32f8af1278a58f815a9afd4b6fe (diff)
downloadmetacity-3c566b2cb01ea3703aea216959f870b0269a6878.tar.gz
libmetacity: don't expose MetaGradientSpec
-rw-r--r--libmetacity/Makefile.am5
-rw-r--r--libmetacity/meta-draw-op-private.h2
-rw-r--r--libmetacity/meta-gradient-private.h18
-rw-r--r--libmetacity/meta-gradient-spec-private.h (renamed from libmetacity/meta-gradient-spec.h)19
-rw-r--r--libmetacity/meta-gradient-spec.c2
-rw-r--r--libmetacity/meta-gradient.h44
-rw-r--r--src/ui/testgradient.c1
7 files changed, 35 insertions, 56 deletions
diff --git a/libmetacity/Makefile.am b/libmetacity/Makefile.am
index de818eea..8975d233 100644
--- a/libmetacity/Makefile.am
+++ b/libmetacity/Makefile.am
@@ -25,10 +25,9 @@ libmetacity_la_SOURCES = \
meta-frame-style.c \
meta-frame-style.h \
meta-gradient.c \
- meta-gradient.h \
meta-gradient-private.h \
meta-gradient-spec.c \
- meta-gradient-spec.h \
+ meta-gradient-spec-private.h \
meta-hsla.c \
meta-hsla-private.h \
meta-style-info.c \
@@ -78,8 +77,6 @@ libmetacity_include_HEADERS = \
meta-frame-enums.h \
meta-frame-layout.h \
meta-frame-style.h \
- meta-gradient.h \
- meta-gradient-spec.h \
meta-theme.h \
$(NULL)
diff --git a/libmetacity/meta-draw-op-private.h b/libmetacity/meta-draw-op-private.h
index 2cc4f1ab..ad3260d8 100644
--- a/libmetacity/meta-draw-op-private.h
+++ b/libmetacity/meta-draw-op-private.h
@@ -24,7 +24,7 @@
#include "meta-color-spec.h"
#include "meta-draw-spec.h"
#include "meta-frame-borders.h"
-#include "meta-gradient-spec.h"
+#include "meta-gradient-spec-private.h"
G_BEGIN_DECLS
diff --git a/libmetacity/meta-gradient-private.h b/libmetacity/meta-gradient-private.h
index e460bdd1..99ee64e5 100644
--- a/libmetacity/meta-gradient-private.h
+++ b/libmetacity/meta-gradient-private.h
@@ -22,10 +22,24 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
-#include "meta-gradient.h"
-
G_BEGIN_DECLS
+/**
+ * MetaGradientType:
+ * @META_GRADIENT_VERTICAL: Vertical gradient
+ * @META_GRADIENT_HORIZONTAL: Horizontal gradient
+ * @META_GRADIENT_DIAGONAL: Diagonal gradient
+ * @META_GRADIENT_LAST: Marks the end of the #MetaGradientType enumeration
+ *
+ */
+typedef enum
+{
+ META_GRADIENT_VERTICAL,
+ META_GRADIENT_HORIZONTAL,
+ META_GRADIENT_DIAGONAL,
+ META_GRADIENT_LAST
+} MetaGradientType;
+
G_GNUC_INTERNAL
GdkPixbuf *meta_gradient_create_simple (int width,
int height,
diff --git a/libmetacity/meta-gradient-spec.h b/libmetacity/meta-gradient-spec-private.h
index bae2d7e5..e131214d 100644
--- a/libmetacity/meta-gradient-spec.h
+++ b/libmetacity/meta-gradient-spec-private.h
@@ -16,50 +16,63 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef META_GRADIENT_SPEC_H
-#define META_GRADIENT_SPEC_H
+#ifndef META_GRADIENT_SPEC_PRIVATE_H
+#define META_GRADIENT_SPEC_PRIVATE_H
#include <gtk/gtk.h>
-#include <libmetacity/meta-gradient.h>
+
+#include "meta-gradient-private.h"
G_BEGIN_DECLS
typedef struct _MetaAlphaGradientSpec MetaAlphaGradientSpec;
typedef struct _MetaGradientSpec MetaGradientSpec;
+G_GNUC_INTERNAL
MetaGradientSpec *meta_gradient_spec_new (MetaGradientType type);
+G_GNUC_INTERNAL
void meta_gradient_spec_free (MetaGradientSpec *spec);
+G_GNUC_INTERNAL
void meta_gradient_spec_add_color_spec (MetaGradientSpec *spec,
MetaColorSpec *color_spec);
+G_GNUC_INTERNAL
GdkPixbuf *meta_gradient_spec_render (const MetaGradientSpec *spec,
GtkStyleContext *context,
gint width,
gint height);
+G_GNUC_INTERNAL
gboolean meta_gradient_spec_validate (MetaGradientSpec *spec,
GError **error);
+G_GNUC_INTERNAL
MetaAlphaGradientSpec *meta_alpha_gradient_spec_new (MetaGradientType type,
gint n_alphas);
+G_GNUC_INTERNAL
void meta_alpha_gradient_spec_free (MetaAlphaGradientSpec *spec);
+G_GNUC_INTERNAL
void meta_alpha_gradient_spec_add_alpha (MetaAlphaGradientSpec *spec,
gint n_alpha,
gdouble alpha);
+G_GNUC_INTERNAL
guchar meta_alpha_gradient_spec_get_alpha (MetaAlphaGradientSpec *spec,
gint n_alpha);
+G_GNUC_INTERNAL
gboolean meta_alpha_gradient_spec_needs_alpha (MetaAlphaGradientSpec *spec);
+G_GNUC_INTERNAL
GdkPixbuf *meta_alpha_gradient_spec_apply_alpha (MetaAlphaGradientSpec *spec,
GdkPixbuf *pixbuf,
gboolean force_copy);
+G_GNUC_INTERNAL
GdkPixbuf *meta_alpha_gradient_spec_render (MetaAlphaGradientSpec *spec,
gint width,
gint height,
diff --git a/libmetacity/meta-gradient-spec.c b/libmetacity/meta-gradient-spec.c
index dcf974ff..76c6ccd6 100644
--- a/libmetacity/meta-gradient-spec.c
+++ b/libmetacity/meta-gradient-spec.c
@@ -22,7 +22,7 @@
#include "meta-color-spec.h"
#include "meta-gradient-private.h"
-#include "meta-gradient-spec.h"
+#include "meta-gradient-spec-private.h"
#include "meta-theme.h"
struct _MetaGradientSpec
diff --git a/libmetacity/meta-gradient.h b/libmetacity/meta-gradient.h
deleted file mode 100644
index a0af8fdc..00000000
--- a/libmetacity/meta-gradient.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2001 Havoc Pennington, 99% copied from wrlib in
- * WindowMaker, Copyright (C) 1997-2000 Dan Pascu and Alfredo Kojima
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef META_GRADIENT_H
-#define META_GRADIENT_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-/**
- * MetaGradientType:
- * @META_GRADIENT_VERTICAL: Vertical gradient
- * @META_GRADIENT_HORIZONTAL: Horizontal gradient
- * @META_GRADIENT_DIAGONAL: Diagonal gradient
- * @META_GRADIENT_LAST: Marks the end of the #MetaGradientType enumeration
- *
- */
-typedef enum
-{
- META_GRADIENT_VERTICAL,
- META_GRADIENT_HORIZONTAL,
- META_GRADIENT_DIAGONAL,
- META_GRADIENT_LAST
-} MetaGradientType;
-
-G_END_DECLS
-
-#endif
diff --git a/src/ui/testgradient.c b/src/ui/testgradient.c
index 759775a0..f2a6a6a1 100644
--- a/src/ui/testgradient.c
+++ b/src/ui/testgradient.c
@@ -19,7 +19,6 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <gtk/gtk.h>
-#include <libmetacity/meta-gradient.h>
#include <libmetacity/meta-gradient-private.h>
typedef void (* RenderGradientFunc) (cairo_t *cr,