Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official. http://bugzilla.gnome.org/show_bug.cgi?id=636695
This commit is contained in:
@ -62,11 +62,11 @@ LDADD = \
|
||||
#
|
||||
# GDK header files for public installation (non-generated)
|
||||
#
|
||||
#
|
||||
gdk_public_h_sources = \
|
||||
gdk.h \
|
||||
gdkapplaunchcontext.h \
|
||||
gdkcairo.h \
|
||||
gdkcolor.h \
|
||||
gdkcursor.h \
|
||||
gdkdevice.h \
|
||||
gdkdevicemanager.h \
|
||||
@ -94,6 +94,13 @@ 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_private_headers = \
|
||||
gdkapplaunchcontextprivate.h \
|
||||
gdkcursorprivate.h \
|
||||
@ -111,11 +118,14 @@ gdk_private_headers = \
|
||||
gdkvisualprivate.h \
|
||||
gdkx.h
|
||||
|
||||
deprecated_c_sources = \
|
||||
deprecated/gdkcolor.c
|
||||
|
||||
gdk_c_sources = \
|
||||
$(deprecated_c_sources) \
|
||||
gdk.c \
|
||||
gdkapplaunchcontext.c \
|
||||
gdkcairo.c \
|
||||
gdkcolor.c \
|
||||
gdkcursor.c \
|
||||
gdkdeprecated.c \
|
||||
gdkdevice.c \
|
||||
@ -157,6 +167,9 @@ gdkincludedir = $(includedir)/gtk-3.0/gdk
|
||||
gdkinclude_HEADERS = $(gdk_public_h_sources) gdkenumtypes.h gdkversionmacros.h
|
||||
nodist_gdkinclude_HEADERS = gdkconfig.h
|
||||
|
||||
deprecatedincludedir = $(includedir)/gtk-3.0/gdk/deprecated
|
||||
deprecatedinclude_HEADERS = $(deprecated_h_sources)
|
||||
|
||||
common_sources = \
|
||||
$(gdk_private_headers) \
|
||||
$(gdk_c_sources) \
|
||||
@ -196,7 +209,7 @@ endif
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
introspection_files = \
|
||||
$(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources)) \
|
||||
$(filter-out gdkkeysyms-compat.h, $(gdk_h_sources)) \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkenumtypes.h
|
||||
@ -378,15 +391,15 @@ BUILT_SOURCES = \
|
||||
|
||||
gdkenumtypes.h: stamp-gdkenumtypes.h
|
||||
@true
|
||||
stamp-gdkenumtypes.h: $(gdk_public_h_sources) gdkenumtypes.h.template
|
||||
stamp-gdkenumtypes.h: $(gdk_h_sources) gdkenumtypes.h.template
|
||||
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
|
||||
$(gdk_public_h_sources) ) >> xgen-geth \
|
||||
$(gdk_h_sources) ) >> xgen-geth \
|
||||
&& (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
|
||||
&& rm -f xgen-geth \
|
||||
&& echo timestamp > $(@F)
|
||||
gdkenumtypes.c: $(gdk_public_h_sources) gdkenumtypes.c.template
|
||||
gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
|
||||
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
|
||||
$(gdk_public_h_sources) ) > xgen-getc \
|
||||
$(gdk_h_sources) ) > xgen-getc \
|
||||
&& cp xgen-getc gdkenumtypes.c \
|
||||
&& rm -f xgen-getc
|
||||
|
||||
|
||||
@ -31,6 +31,8 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* SECTION:colors
|
||||
* @Short_description: Manipulation of colors
|
||||
@ -39,7 +41,8 @@
|
||||
* A #GdkColor represents a color.
|
||||
*
|
||||
* When working with cairo, it is often more convenient
|
||||
* to use a #GdkRGBA instead.
|
||||
* to use a #GdkRGBA instead, and #GdkColor has been
|
||||
* deprecated in favor of #GdkRGBA.
|
||||
*/
|
||||
|
||||
|
||||
@ -52,6 +55,8 @@
|
||||
* 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)
|
||||
@ -70,6 +75,8 @@ gdk_color_copy (const GdkColor *color)
|
||||
* @color: a #GdkColor
|
||||
*
|
||||
* Frees a #GdkColor created with gdk_color_copy().
|
||||
*
|
||||
* Deprecated: 3.14: Use #GdkRGBA
|
||||
*/
|
||||
void
|
||||
gdk_color_free (GdkColor *color)
|
||||
@ -87,6 +94,8 @@ gdk_color_free (GdkColor *color)
|
||||
* table that stores #GdkColors.
|
||||
*
|
||||
* Returns: The hash function applied to @color
|
||||
*
|
||||
* Deprecated: 3.14: Use #GdkRGBA
|
||||
*/
|
||||
guint
|
||||
gdk_color_hash (const GdkColor *color)
|
||||
@ -105,6 +114,8 @@ gdk_color_hash (const GdkColor *color)
|
||||
* Compares two colors.
|
||||
*
|
||||
* Returns: %TRUE if the two colors compare equal
|
||||
*
|
||||
* Deprecated: 3.14: Use #GdkRGBA
|
||||
*/
|
||||
gboolean
|
||||
gdk_color_equal (const GdkColor *colora,
|
||||
@ -139,6 +150,8 @@ G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
|
||||
* and “\#ffffffffffff”).
|
||||
*
|
||||
* Returns: %TRUE if the parsing succeeded
|
||||
*
|
||||
* Deprecated: 3.14: Use #GdkRGBA
|
||||
*/
|
||||
gboolean
|
||||
gdk_color_parse (const gchar *spec,
|
||||
@ -171,6 +184,8 @@ gdk_color_parse (const gchar *spec,
|
||||
* Returns: a newly-allocated text string
|
||||
*
|
||||
* Since: 2.12
|
||||
*
|
||||
* Deprecated: 3.14: Use #GdkRGBA
|
||||
*/
|
||||
gchar *
|
||||
gdk_color_to_string (const GdkColor *color)
|
||||
@ -59,24 +59,24 @@ struct _GdkColor
|
||||
|
||||
#define GDK_TYPE_COLOR (gdk_color_get_type ())
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GType gdk_color_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GdkColor *gdk_color_copy (const GdkColor *color);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gdk_color_free (GdkColor *color);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
guint gdk_color_hash (const GdkColor *color);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
gboolean gdk_color_equal (const GdkColor *colora,
|
||||
const GdkColor *colorb);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
gboolean gdk_color_parse (const gchar *spec,
|
||||
GdkColor *color);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
gchar * gdk_color_to_string (const GdkColor *color);
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
#include <gdk/gdkversionmacros.h>
|
||||
#include <gdk/gdkapplaunchcontext.h>
|
||||
#include <gdk/gdkcairo.h>
|
||||
#include <gdk/gdkcolor.h>
|
||||
#include <gdk/gdkcursor.h>
|
||||
#include <gdk/gdkdevice.h>
|
||||
#include <gdk/gdkdevicemanager.h>
|
||||
@ -58,6 +57,10 @@
|
||||
#include <gdk/gdkvisual.h>
|
||||
#include <gdk/gdkwindow.h>
|
||||
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
#include <gdk/deprecated/gdkcolor.h>
|
||||
#endif
|
||||
|
||||
#undef __GDK_H_INSIDE__
|
||||
|
||||
#endif /* __GDK_H__ */
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkversionmacros.h>
|
||||
#include <gdk/gdkcolor.h>
|
||||
#include <gdk/deprecated/gdkcolor.h>
|
||||
#include <gdk/gdkrgba.h>
|
||||
#include <gdk/gdkpixbuf.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkversionmacros.h>
|
||||
#include <gdk/gdkcolor.h>
|
||||
#include <gdk/gdktypes.h>
|
||||
#include <gdk/gdkdnd.h>
|
||||
#include <gdk/gdkdevice.h>
|
||||
|
||||
Reference in New Issue
Block a user