summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-10-28 17:08:25 -0400
committerMatthias Clasen <mclasen@redhat.com>2016-10-28 17:10:06 -0400
commitb082e578748129f33c65bae72de1017f47d3eb8e (patch)
treed19fd95aa2b1a69c540d010500b43d88339eaeb7
parenta5a4fdb0832f2126f7c869f236600f352c68d905 (diff)
downloadgtk+-wip/matthiasc/text-attributes.tar.gz
It is deprecated and no longer used.
-rw-r--r--docs/reference/gdk/gdk-docs.sgml1
-rw-r--r--docs/reference/gdk/gdk4-sections.txt18
-rw-r--r--gdk/Makefile.am10
-rw-r--r--gdk/deprecated/gdkcolor.c202
-rw-r--r--gdk/deprecated/gdkcolor.h87
-rw-r--r--gdk/gdk.h4
-rw-r--r--gdk/gdkcairo.h1
-rw-r--r--gdk/gdktypes.h1
8 files changed, 1 insertions, 323 deletions
diff --git a/docs/reference/gdk/gdk-docs.sgml b/docs/reference/gdk/gdk-docs.sgml
index 19125711c1..f671c8fd5e 100644
--- a/docs/reference/gdk/gdk-docs.sgml
+++ b/docs/reference/gdk/gdk-docs.sgml
@@ -53,7 +53,6 @@
<reference>
<title>Deprecated</title>
- <xi:include href="xml/colors.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
</reference>
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index ff940cdafa..daa0d1f7f5 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -220,24 +220,6 @@ gdk_pixbuf_get_from_surface
</SECTION>
<SECTION>
-<TITLE>Colors</TITLE>
-<FILE>colors</FILE>
-GdkColor
-gdk_color_copy
-gdk_color_free
-gdk_color_parse
-gdk_color_equal
-gdk_color_hash
-gdk_color_to_string
-
-<SUBSECTION Standard>
-GDK_TYPE_COLOR
-
-<SUBSECTION Private>
-gdk_color_get_type
-</SECTION>
-
-<SECTION>
<TITLE>RGBA Colors</TITLE>
<FILE>rgba_colors</FILE>
GdkRGBA
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index e17047c101..52fc1674e4 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -92,12 +92,8 @@ gdk_public_h_sources = \
gdkvisual.h \
gdkwindow.h
-deprecated_h_sources = \
- deprecated/gdkcolor.h
-
gdk_h_sources = \
- $(gdk_public_h_sources) \
- $(deprecated_h_sources)
+ $(gdk_public_h_sources)
gdk_private_headers = \
gdk-private.h \
@@ -124,11 +120,7 @@ gdk_private_headers = \
gdkvisualprivate.h \
gdkx.h
-deprecated_c_sources = \
- deprecated/gdkcolor.c
-
gdk_c_sources = \
- $(deprecated_c_sources) \
gdk-private.c \
gdk.c \
gdkapplaunchcontext.c \
diff --git a/gdk/deprecated/gdkcolor.c b/gdk/deprecated/gdkcolor.c
deleted file mode 100644
index fb45a87706..0000000000
--- a/gdk/deprecated/gdkcolor.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#include "config.h"
-
-#include "gdkcolor.h"
-
-#include "gdkscreen.h"
-#include "gdkinternals.h"
-
-#include <time.h>
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-/**
- * SECTION:colors
- * @Short_description: Manipulation of colors
- * @Title: Colors
- *
- * A #GdkColor represents a color.
- *
- * When working with cairo, it is often more convenient
- * to use a #GdkRGBA instead, and #GdkColor has been
- * deprecated in favor of #GdkRGBA.
- */
-
-
-/**
- * gdk_color_copy:
- * @color: a #GdkColor
- *
- * Makes a copy of a #GdkColor.
- *
- * The result must be freed using gdk_color_free().
- *
- * Returns: a copy of @color
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-GdkColor*
-gdk_color_copy (const GdkColor *color)
-{
- GdkColor *new_color;
-
- g_return_val_if_fail (color != NULL, NULL);
-
- new_color = g_slice_new (GdkColor);
- *new_color = *color;
- return new_color;
-}
-
-/**
- * gdk_color_free:
- * @color: a #GdkColor
- *
- * Frees a #GdkColor created with gdk_color_copy().
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-void
-gdk_color_free (GdkColor *color)
-{
- g_return_if_fail (color != NULL);
-
- g_slice_free (GdkColor, color);
-}
-
-/**
- * gdk_color_hash:
- * @color: a #GdkColor
- *
- * A hash function suitable for using for a hash
- * table that stores #GdkColors.
- *
- * Returns: The hash function applied to @color
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-guint
-gdk_color_hash (const GdkColor *color)
-{
- return ((color->red) +
- (color->green << 11) +
- (color->blue << 22) +
- (color->blue >> 6));
-}
-
-/**
- * gdk_color_equal:
- * @colora: a #GdkColor
- * @colorb: another #GdkColor
- *
- * Compares two colors.
- *
- * Returns: %TRUE if the two colors compare equal
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-gboolean
-gdk_color_equal (const GdkColor *colora,
- const GdkColor *colorb)
-{
- g_return_val_if_fail (colora != NULL, FALSE);
- g_return_val_if_fail (colorb != NULL, FALSE);
-
- return ((colora->red == colorb->red) &&
- (colora->green == colorb->green) &&
- (colora->blue == colorb->blue));
-}
-
-G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
- gdk_color_copy,
- gdk_color_free)
-
-/**
- * gdk_color_parse:
- * @spec: the string specifying the color
- * @color: (out): the #GdkColor to fill in
- *
- * Parses a textual specification of a color and fill in the
- * @red, @green, and @blue fields of a #GdkColor.
- *
- * The string can either one of a large set of standard names
- * (taken from the X11 `rgb.txt` file), or it can be a hexadecimal
- * value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or
- * “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of
- * the red, green, and blue components of the color, respectively.
- * (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff”
- * and “\#ffffffffffff”).
- *
- * Returns: %TRUE if the parsing succeeded
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-gboolean
-gdk_color_parse (const gchar *spec,
- GdkColor *color)
-{
- PangoColor pango_color;
-
- if (pango_color_parse (&pango_color, spec))
- {
- color->red = pango_color.red;
- color->green = pango_color.green;
- color->blue = pango_color.blue;
-
- return TRUE;
- }
- else
- return FALSE;
-}
-
-/**
- * gdk_color_to_string:
- * @color: a #GdkColor
- *
- * Returns a textual specification of @color in the hexadecimal
- * form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits
- * representing the red, green and blue components respectively.
- *
- * The returned string can be parsed by gdk_color_parse().
- *
- * Returns: a newly-allocated text string
- *
- * Since: 2.12
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-gchar *
-gdk_color_to_string (const GdkColor *color)
-{
- PangoColor pango_color;
-
- g_return_val_if_fail (color != NULL, NULL);
-
- pango_color.red = color->red;
- pango_color.green = color->green;
- pango_color.blue = color->blue;
-
- return pango_color_to_string (&pango_color);
-}
diff --git a/gdk/deprecated/gdkcolor.h b/gdk/deprecated/gdkcolor.h
deleted file mode 100644
index 1ffccbe81b..0000000000
--- a/gdk/deprecated/gdkcolor.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GDK_COLOR_H__
-#define __GDK_COLOR_H__
-
-#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
-#error "Only <gdk/gdk.h> can be included directly."
-#endif
-
-#include <cairo.h>
-#include <gdk/gdktypes.h>
-#include <gdk/gdkversionmacros.h>
-
-G_BEGIN_DECLS
-
-
-/**
- * GdkColor:
- * @pixel: For allocated colors, the pixel value used to
- * draw this color on the screen. Not used anymore.
- * @red: The red component of the color. This is
- * a value between 0 and 65535, with 65535 indicating
- * full intensity
- * @green: The green component of the color
- * @blue: The blue component of the color
- *
- * A #GdkColor is used to describe a color,
- * similar to the XColor struct used in the X11 drawing API.
- *
- * Deprecated: 3.14: Use #GdkRGBA
- */
-struct _GdkColor
-{
- guint32 pixel;
- guint16 red;
- guint16 green;
- guint16 blue;
-};
-
-#define GDK_TYPE_COLOR (gdk_color_get_type ())
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_get_type)
-GType gdk_color_get_type (void) G_GNUC_CONST;
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_copy)
-GdkColor *gdk_color_copy (const GdkColor *color);
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_free)
-void gdk_color_free (GdkColor *color);
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_hash)
-guint gdk_color_hash (const GdkColor *color);
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_equal)
-gboolean gdk_color_equal (const GdkColor *colora,
- const GdkColor *colorb);
-
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_parse)
-gboolean gdk_color_parse (const gchar *spec,
- GdkColor *color);
-GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_to_string)
-gchar * gdk_color_to_string (const GdkColor *color);
-
-
-G_END_DECLS
-
-#endif /* __GDK_COLOR_H__ */
diff --git a/gdk/gdk.h b/gdk/gdk.h
index 3878f10820..4a3b9201ea 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -63,10 +63,6 @@
#include <gdk/gdkvisual.h>
#include <gdk/gdkwindow.h>
-#ifndef GDK_DISABLE_DEPRECATED
-#include <gdk/deprecated/gdkcolor.h>
-#endif
-
#include <gdk/gdk-autocleanup.h>
#undef __GDK_H_INSIDE__
diff --git a/gdk/gdkcairo.h b/gdk/gdkcairo.h
index ec7b5f5b41..1b3b961d35 100644
--- a/gdk/gdkcairo.h
+++ b/gdk/gdkcairo.h
@@ -23,7 +23,6 @@
#endif
#include <gdk/gdkversionmacros.h>
-#include <gdk/deprecated/gdkcolor.h>
#include <gdk/gdkrgba.h>
#include <gdk/gdkdrawingcontext.h>
#include <gdk/gdkpixbuf.h>
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index 0dac77419a..a4ce12ba08 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -129,7 +129,6 @@ typedef struct _GdkAtom *GdkAtom;
#define GDK_NONE _GDK_MAKE_ATOM (0)
/* Forward declarations of commonly used types */
-typedef struct _GdkColor GdkColor;
typedef struct _GdkRGBA GdkRGBA;
typedef struct _GdkCursor GdkCursor;
typedef struct _GdkVisual GdkVisual;