]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkvscrollbar.c
Replace GArray with GSequence in GtkTreeModelSort
[~andy/gtk] / gtk / gtkvscrollbar.c
index eaa4417fb74420596ea6373fdb09b80005adc5c0..f8443e37d1f30bf1c961e95cbd2b903ec86daf4d 100644 (file)
  * 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/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#include <config.h>
+#include "config.h"
+
+#include "gtkorientable.h"
+#include "gtkscrollbar.h"
+#undef GTK_DISABLE_DEPRECATED
 #include "gtkvscrollbar.h"
-#include "gdk/gdkkeysyms.h"
 #include "gtkintl.h"
-#include "gtkalias.h"
+
+
+/**
+ * SECTION:gtkvscrollbar
+ * @Short_description: A vertical scrollbar
+ * @Title: GtkVScrollbar
+ * @See_also:#GtkScrollbar, #GtkScrolledWindow
+ *
+ * The #GtkVScrollbar widget is a widget arranged vertically creating a
+ * scrollbar. See #GtkScrollbar for details on
+ * scrollbars. #GtkAdjustment pointers may be added to handle the
+ * adjustment of the scrollbar or it may be left %NULL in which case one
+ * will be created for you. See #GtkScrollbar for a description of what the
+ * fields in an adjustment represent for a scrollbar.
+ *
+ * GtkVScrollbar has been deprecated, use #GtkScrollbar instead.
+ */
 
 G_DEFINE_TYPE (GtkVScrollbar, gtk_vscrollbar, GTK_TYPE_SCROLLBAR)
 
@@ -42,24 +61,27 @@ gtk_vscrollbar_class_init (GtkVScrollbarClass *class)
 static void
 gtk_vscrollbar_init (GtkVScrollbar *vscrollbar)
 {
-  GtkRange *range;
-
-  range = GTK_RANGE (vscrollbar);
-
-  range->orientation = GTK_ORIENTATION_VERTICAL;
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (vscrollbar),
+                                  GTK_ORIENTATION_VERTICAL);
 }
 
-GtkWidget*
+/**
+ * gtk_vscrollbar_new:
+ * @adjustment: (allow-none): the #GtkAdjustment to use, or %NULL to create a new adjustment
+ *
+ * Creates a new vertical scrollbar.
+ *
+ * Returns: the new #GtkVScrollbar
+ *
+ * Deprecated: 3.2: Use gtk_scrollbar_new() with %GTK_ORIENTATION_VERTICAL instead
+ */
+GtkWidget *
 gtk_vscrollbar_new (GtkAdjustment *adjustment)
 {
-  GtkWidget *vscrollbar;
-  
-  vscrollbar = g_object_new (GTK_TYPE_VSCROLLBAR,
-                            "adjustment", adjustment,
-                            NULL);
-  
-  return vscrollbar;
-}
+  g_return_val_if_fail (adjustment == NULL || GTK_IS_ADJUSTMENT (adjustment),
+                        NULL);
 
-#define __GTK_VSCROLLBAR_C__
-#include "gtkaliasdef.c"
+  return g_object_new (GTK_TYPE_VSCROLLBAR,
+                       "adjustment", adjustment,
+                       NULL);
+}