[gtk+] Deprecate GtkCurve and GtkGammaCurve



commit 7c6823373aa82b6b2749c01bfa6fcdedac963412
Author: Christian Dywan <christian twotoasts de>
Date:   Wed Oct 21 18:15:52 2009 +0200

    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 850575f..c2e2b40 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
 
 <!-- ##### SECTION Long_Description ##### -->
-<note>
-<para>
- 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.
-</para>
-</note>
 <para>
 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.
 </para>
+<para>
+As of GTK+ 2.20, #GtkCurve has been deprecated since it is too specialized.
+</para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
@@ -92,6 +84,7 @@ Creates a new #GtkCurve.
 </para>
 
 @Returns: a new #GtkCurve.
+ Deprecated: 2.20: Don't use this widget anymore.
 
 
 <!-- ##### FUNCTION gtk_curve_reset ##### -->
@@ -102,6 +95,7 @@ The curve type is not changed.
 </para>
 
 @curve: a #GtkCurve.
+ Deprecated: 2.20: Don't use this widget anymore.
 
 
 <!-- ##### FUNCTION gtk_curve_set_gamma ##### -->
@@ -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.
 
 
 <!-- ##### FUNCTION gtk_curve_set_range ##### -->
@@ -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.
 
 
 <!-- ##### FUNCTION gtk_curve_get_vector ##### -->
@@ -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.
 
 
 <!-- ##### FUNCTION gtk_curve_set_vector ##### -->
@@ -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.
 
 
 <!-- ##### FUNCTION gtk_curve_set_curve_type ##### -->
@@ -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 35719a7..29d0900 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
 
 <!-- ##### SECTION Long_Description ##### -->
-<note>
-<para>
- 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.
-</para>
-</note>
 <para>
 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.
 </para>
+<para>
+As of GTK+ 2.20, #GtkGammaCurve has been deprecated since it is too specialized.
+</para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
@@ -50,5 +42,6 @@ Creates a new #GtkGammaCurve.
 </para>
 
 @Returns: a new #GtkGammaCurve.
+ Deprecated: 2.20: Don't use this widget anymore.
 
 
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d35170a..966cf11 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 22c8ada..ed8d798 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -72,7 +72,6 @@
 #include <gtk/gtkcombobox.h>
 #include <gtk/gtkcomboboxentry.h>
 #include <gtk/gtkcontainer.h>
-#include <gtk/gtkcurve.h>
 #include <gtk/gtkdebug.h>
 #include <gtk/gtkdialog.h>
 #include <gtk/gtkdnd.h>
@@ -93,7 +92,6 @@
 #include <gtk/gtkfontbutton.h>
 #include <gtk/gtkfontsel.h>
 #include <gtk/gtkframe.h>
-#include <gtk/gtkgamma.h>
 #include <gtk/gtkgc.h>
 #include <gtk/gtkhandlebox.h>
 #include <gtk/gtkhbbox.h>
@@ -225,7 +223,9 @@
 #include <gtk/gtkclist.h>
 #include <gtk/gtkcombo.h>
 #include <gtk/gtkctree.h>
+#include <gtk/gtkcurve.h>
 #include <gtk/gtkfilesel.h>
+#include <gtk/gtkgamma.h>
 #include <gtk/gtkinputdialog.h>
 #include <gtk/gtkitemfactory.h>
 #include <gtk/gtklist.h>
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index a1b1b04..a32855e 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 d996a2d..e49e5ff 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 <stdlib.h>
 #include <string.h>
diff --git a/gtk/gtkcurve.h b/gtk/gtkcurve.h
index 5edd59d..68ee716 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 <gtk/gtk.h> 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 fd03f85..5485ded 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 <string.h>
 #include <stdlib.h>
diff --git a/gtk/gtkgamma.h b/gtk/gtkgamma.h
index bde3d88..0173f96 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 <gtk/gtk.h> 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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]