From 7c6823373aa82b6b2749c01bfa6fcdedac963412 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 21 Oct 2009 18:15:52 +0200 Subject: [PATCH] Deprecate GtkCurve and GtkGammaCurve https://bugzilla.gnome.org/show_bug.cgi?id=556263 --- docs/reference/gtk/tmpl/gtkcurve.sgml | 21 ++++++++++----------- docs/reference/gtk/tmpl/gtkgamma.sgml | 15 ++++----------- gtk/Makefile.am | 8 ++++---- gtk/gtk.h | 4 ++-- gtk/gtk.symbols | 4 ++++ gtk/gtkcurve.c | 2 ++ gtk/gtkcurve.h | 16 +++------------- gtk/gtkgamma.c | 2 ++ gtk/gtkgamma.h | 16 +++------------- 9 files changed, 34 insertions(+), 54 deletions(-) diff --git a/docs/reference/gtk/tmpl/gtkcurve.sgml b/docs/reference/gtk/tmpl/gtkcurve.sgml index 850575f605..c2e2b407d1 100644 --- a/docs/reference/gtk/tmpl/gtkcurve.sgml +++ b/docs/reference/gtk/tmpl/gtkcurve.sgml @@ -5,17 +5,6 @@ GtkCurve Allows direct editing of a curve - - - This widget is considered too specialized/little-used for - GTK+, and will in the future be moved to some other package. If - your application needs this widget, feel free to use it, as the - widget does work and is useful in some applications; it's just not - of general interest. However, we are not accepting new features for - the widget, and it will eventually move out of the GTK+ - distribution. - - The #GtkCurve widget allows the user to edit a curve covering a range of values. It is typically used to fine-tune color balances in graphics @@ -28,6 +17,9 @@ connected together into a smooth curve. In linear mode the user places points on the curve which are connected by straight lines. In free mode the user can draw the points of the curve freely, and they are not connected at all. + +As of GTK+ 2.20, #GtkCurve has been deprecated since it is too specialized. + @@ -92,6 +84,7 @@ Creates a new #GtkCurve. @Returns: a new #GtkCurve. +@Deprecated: 2.20: Don't use this widget anymore. @@ -102,6 +95,7 @@ The curve type is not changed. @curve: a #GtkCurve. +@Deprecated: 2.20: Don't use this widget anymore. @@ -115,6 +109,7 @@ FIXME: Needs a more precise definition of gamma. @curve: a #GtkCurve. @gamma_: the gamma value. +@Deprecated: 2.20: Don't use this widget anymore. @@ -128,6 +123,7 @@ The curve is also reset with a call to gtk_curve_reset(). @max_x: the maximum x value. @min_y: the minimum y value. @max_y: the maximum y value. +@Deprecated: 2.20: Don't use this widget anymore. @@ -138,6 +134,7 @@ Returns a vector of points representing the curve. @curve: a #GtkCurve. @veclen: the number of points to calculate. @vector: returns the points. +@Deprecated: 2.20: Don't use this widget anymore. @@ -149,6 +146,7 @@ The curve type is set to %GTK_CURVE_TYPE_FREE. @curve: a #GtkCurve. @veclen: the number of points. @vector: the points on the curve. +@Deprecated: 2.20: Don't use this widget anymore. @@ -160,5 +158,6 @@ curve will be changed as little as possible. @curve: a #GtkCurve. @type: the type of the curve. +@Deprecated: 2.20: Don't use this widget anymore. diff --git a/docs/reference/gtk/tmpl/gtkgamma.sgml b/docs/reference/gtk/tmpl/gtkgamma.sgml index 35719a719a..29d0900e2b 100644 --- a/docs/reference/gtk/tmpl/gtkgamma.sgml +++ b/docs/reference/gtk/tmpl/gtkgamma.sgml @@ -5,17 +5,6 @@ GtkGammaCurve A subclass of GtkCurve for editing gamma curves - - - This widget is considered too specialized/little-used for - GTK+, and will in the future be moved to some other package. If - your application needs this widget, feel free to use it, as the - widget does work and is useful in some applications; it's just not - of general interest. However, we are not accepting new features for - the widget, and it will eventually move out of the GTK+ - distribution. - - The #GtkGammaCurve widget is a variant of #GtkCurve specifically for editing gamma curves, which are used in graphics applications such as the @@ -28,6 +17,9 @@ mouse just like a #GtkCurve widget. On the right of the curve it also displays free), and the other 2 set the curve to a particular gamma value, or reset it to a straight line. + +As of GTK+ 2.20, #GtkGammaCurve has been deprecated since it is too specialized. + @@ -50,5 +42,6 @@ Creates a new #GtkGammaCurve. @Returns: a new #GtkGammaCurve. +@Deprecated: 2.20: Don't use this widget anymore. diff --git a/gtk/Makefile.am b/gtk/Makefile.am index d35170a9d3..966cf11909 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -191,7 +191,6 @@ gtk_public_h_sources = \ gtkcombobox.h \ gtkcomboboxentry.h \ gtkcontainer.h \ - gtkcurve.h \ gtkdebug.h \ gtkdialog.h \ gtkdnd.h \ @@ -212,7 +211,6 @@ gtk_public_h_sources = \ gtkfontbutton.h \ gtkfontsel.h \ gtkframe.h \ - gtkgamma.h \ gtkgc.h \ gtkhandlebox.h \ gtkhbbox.h \ @@ -446,7 +444,6 @@ gtk_base_c_sources = \ gtkcombobox.c \ gtkcomboboxentry.c \ gtkcontainer.c \ - gtkcurve.c \ gtkdialog.c \ gtkdrawingarea.c \ gtkeditable.c \ @@ -471,7 +468,6 @@ gtk_base_c_sources = \ gtkfontbutton.c \ gtkfontsel.c \ gtkframe.c \ - gtkgamma.c \ gtkgc.c \ gtkhandlebox.c \ gtkhbbox.c \ @@ -633,7 +629,9 @@ gtk_public_h_sources += \ gtkclist.h \ gtkcombo.h \ gtkctree.h \ + gtkcurve.h \ gtkfilesel.h \ + gtkgamma.h \ gtkinputdialog.h \ gtkitemfactory.h \ gtklist.h \ @@ -650,7 +648,9 @@ gtk_base_c_sources += \ gtkclist.c \ gtkcombo.c \ gtkctree.c \ + gtkcurve.c \ gtkfilesel.c \ + gtkgamma.c \ gtkitemfactory.c \ gtklist.c \ gtklistitem.c \ diff --git a/gtk/gtk.h b/gtk/gtk.h index 22c8ada248..ed8d7982ec 100644 --- a/gtk/gtk.h +++ b/gtk/gtk.h @@ -72,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -93,7 +92,6 @@ #include #include #include -#include #include #include #include @@ -225,7 +223,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index a1b1b044fe..a32855e5e4 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -1105,6 +1105,7 @@ gtk_ctree_unselect_recursive #if IN_HEADER(__GTK_CURVE_H__) #if IN_FILE(__GTK_CURVE_C__) +#ifndef GTK_DISABLE_DEPRECATED gtk_curve_get_type G_GNUC_CONST gtk_curve_get_vector gtk_curve_new @@ -1115,6 +1116,7 @@ gtk_curve_set_range gtk_curve_set_vector #endif #endif +#endif #if IN_HEADER(__GTK_WINDOW_DECORATE_H__) #if IN_FILE(__GTK_WINDOW_DECORATE_C__) @@ -1773,10 +1775,12 @@ gtk_frame_set_shadow_type #if IN_HEADER(__GTK_GAMMA_CURVE_H__) #if IN_FILE(__GTK_GAMMA_CURVE_C__) +#ifndef GTK_DISABLE_DEPRECATED gtk_gamma_curve_get_type G_GNUC_CONST gtk_gamma_curve_new #endif #endif +#endif #if IN_HEADER(__GTK_GC_H__) #if IN_FILE(__GTK_GC_C__) diff --git a/gtk/gtkcurve.c b/gtk/gtkcurve.c index d996a2d9a0..e49e5ff8c9 100644 --- a/gtk/gtkcurve.c +++ b/gtk/gtkcurve.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GTK_DISABLE_DEPRECATED + #include "config.h" #include #include diff --git a/gtk/gtkcurve.h b/gtk/gtkcurve.h index 5edd59db0a..68ee716edb 100644 --- a/gtk/gtkcurve.h +++ b/gtk/gtkcurve.h @@ -24,19 +24,7 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ -/* - * NOTE this widget is considered too specialized/little-used for - * GTK+, and will in the future be moved to some other package. If - * your application needs this widget, feel free to use it, as the - * widget does work and is useful in some applications; it's just not - * of general interest. However, we are not accepting new features for - * the widget, and it will eventually move out of the GTK+ - * distribution. - */ - -#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) -#error "Only can be included directly." -#endif +#ifndef GTK_DISABLE_DEPRECATED #ifndef __GTK_CURVE_H__ #define __GTK_CURVE_H__ @@ -114,3 +102,5 @@ void gtk_curve_set_curve_type (GtkCurve *curve, GtkCurveType type); G_END_DECLS #endif /* __GTK_CURVE_H__ */ + +#endif /* GTK_DISABLE_DEPRECATED */ diff --git a/gtk/gtkgamma.c b/gtk/gtkgamma.c index fd03f857ef..5485dede0f 100644 --- a/gtk/gtkgamma.c +++ b/gtk/gtkgamma.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#undef GTK_DISABLE_DEPRECATED + #include "config.h" #include #include diff --git a/gtk/gtkgamma.h b/gtk/gtkgamma.h index bde3d88df4..0173f960ac 100644 --- a/gtk/gtkgamma.h +++ b/gtk/gtkgamma.h @@ -24,19 +24,7 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ -/* - * NOTE this widget is considered too specialized/little-used for - * GTK+, and will in the future be moved to some other package. If - * your application needs this widget, feel free to use it, as the - * widget does work and is useful in some applications; it's just not - * of general interest. However, we are not accepting new features for - * the widget, and it will eventually move out of the GTK+ - * distribution. - */ - -#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) -#error "Only can be included directly." -#endif +#ifndef GTK_DISABLE_DEPRECATED #ifndef __GTK_GAMMA_CURVE_H__ #define __GTK_GAMMA_CURVE_H__ @@ -90,3 +78,5 @@ GtkWidget* gtk_gamma_curve_new (void); G_END_DECLS #endif /* __GTK_GAMMA_CURVE_H__ */ + +#endif /* GTK_DISABLE_DEPRECATED */