[Gtk-sharp-list] patches that add setters to Adjustment.PageSize, Adjustment.PageIncrement

Cesar Octavio Lopez Nataren cesar@ciencias.unam.mx
08 Nov 2002 01:22:56 -0600


--=-rnPILos2n0hfM3pOa8sI
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Hello, because I was needing to set this values I thougth about adding
the setters properties to adjustments. I don't know what's the policy
about object's fields but I did it :)

Please, comment on this (it's my first patch to gtk-sharp).

Found no Changelog file.

Greetings.
Great job gtk# team!!

--=20
c=E9sar


--=-rnPILos2n0hfM3pOa8sI
Content-Disposition: attachment; filename=AdjustmentCustom.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=AdjustmentCustom.diff; charset=ISO-8859-15

Index: Adjustment.custom
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/gtk-sharp/gtk/Adjustment.custom,v
retrieving revision 1.2
diff -u -r1.2 Adjustment.custom
--- Adjustment.custom	9 Oct 2002 20:04:50 -0000	1.2
+++ Adjustment.custom	8 Nov 2002 07:21:31 -0000
@@ -44,17 +44,29 @@
=20
 [DllImport ("gtksharpglue")]
 static extern double gtksharp_gtk_adjustment_get_page_increment (IntPtr i)=
;
+[DllImport ("gtksharpglue")]
+static extern void gtksharp_gtk_adjustment_set_page_increment (IntPtr i, d=
ouble page_increment);
 public double PageIncrement {
 	get {
 		return gtksharp_gtk_adjustment_get_page_increment (this.Handle);
+	}=09
+=09
+	set {
+		gtksharp_gtk_adjustment_set_page_increment (Handle, value);
 	}
 }
=20
 [DllImport ("gtksharpglue")]
 static extern double gtksharp_gtk_adjustment_get_page_size (IntPtr i);
+[DllImport ("gtksharpglue")]
+static extern void gtksharp_gtk_adjustment_set_page_size (IntPtr i, double=
 page_size);
 public double PageSize {
 	get {
 		return gtksharp_gtk_adjustment_get_page_size (this.Handle);
+	}
+
+	set {
+		gtksharp_gtk_adjustment_set_page_size (Handle, value);
 	}
 }
=20

--=-rnPILos2n0hfM3pOa8sI
Content-Disposition: attachment; filename=adjustment.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=adjustment.diff; charset=ISO-8859-15

Index: adjustment.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/gtk-sharp/glue/adjustment.c,v
retrieving revision 1.2
diff -u -r1.2 adjustment.c
--- adjustment.c	9 Oct 2002 20:04:50 -0000	1.2
+++ adjustment.c	8 Nov 2002 07:20:31 -0000
@@ -45,9 +45,24 @@
 	return adj->page_increment;
 }
=20
+void
+gtksharp_gtk_adjustment_set_page_increment (GtkAdjustment *adj, gdouble pa=
ge_increment)
+{
+	adj->page_increment =3D page_increment;
+=09
+	gtk_adjustment_changed (adj);
+}
+
 gdouble
 gtksharp_gtk_adjustment_get_page_size (GtkAdjustment *adj)
 {
 	return adj->page_size;
 }
=20
+void
+gtksharp_gtk_adjustment_set_page_size (GtkAdjustment *adj, gdouble page_si=
ze)
+{
+	adj->page_size =3D page_size;
+
+	gtk_adjustment_changed (adj);
+}

--=-rnPILos2n0hfM3pOa8sI--