From: Matt Birkholz Date: Sat, 2 Feb 2013 17:28:49 +0000 (-0700) Subject: gtk: Added gtk-paned-get-position, gtk-paned-set-position. X-Git-Tag: mit-scheme-pucked-9.2.12~537 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=040afe0bfc4e23d7250a78fed4fcfcbd2ed221f8;p=mit-scheme.git gtk: Added gtk-paned-get-position, gtk-paned-set-position. --- diff --git a/doc/gtk/gtk.texinfo b/doc/gtk/gtk.texinfo index 9d122721b..2b4df1124 100644 --- a/doc/gtk/gtk.texinfo +++ b/doc/gtk/gtk.texinfo @@ -12,7 +12,7 @@ @copying This manual documents @acronym{Gtk} @value{VERSION}. -Copyright @copyright{} 2008, 2009, 2010, 2011, 2012 Matthew Birkholz +Copyright @copyright{} 2008, 2009, 2010, 2011, 2012, 2013 Matthew Birkholz @quotation Permission is granted to copy, distribute and/or modify this document @@ -1576,6 +1576,17 @@ Returns @var{paned}'s first child, or @code{#f} if there is none. Returns @var{paned}'s second child, or @code{#f} if there is none. @end deffn +@deffn {Generic Procedure} gtk-paned-get-position paned +Returns the position of the divider between the two panes---the pixel +size of child1. +@end deffn + +@deffn {Generic Procedure} gtk-paned-set-position paned position +Sets the position of the divider between the two panes, forcing +child1's allocation to be @var{position} pixels. A negative size +causes the position to be unset. +@end deffn + @deffn Class A direct subclass of gtk-scrolled-view representing a reference to a GtkPanedView. This is an extension to the Gtks, a specialization of diff --git a/src/gtk/Includes/gtkpaned.cdecl b/src/gtk/Includes/gtkpaned.cdecl index b67011e18..846444ae5 100644 --- a/src/gtk/Includes/gtkpaned.cdecl +++ b/src/gtk/Includes/gtkpaned.cdecl @@ -18,4 +18,13 @@ gtk-3.0/gtk/gtkpaned.h |# (paned (* GtkPaned)) (child (* GtkWidget)) (resize gboolean) - (shrink gboolean)) \ No newline at end of file + (shrink gboolean)) + +(extern gint + gtk_paned_get_position + (paned (* GtkPaned))) + +(extern void + gtk_paned_set_position + (paned (* GtkPaned)) + (position gint)) \ No newline at end of file diff --git a/src/gtk/gtk-widget.scm b/src/gtk/gtk-widget.scm index 90647d5da..bdb776285 100644 --- a/src/gtk/gtk-widget.scm +++ b/src/gtk/gtk-widget.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Matthew Birkholz +Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Matthew Birkholz This file is part of an extension to MIT/GNU Scheme. @@ -768,6 +768,12 @@ USA. (C-call "gtk_paned_pack2" (gobject-alien paned) (gobject-alien child2) (if resize? 1 0) (if shrink? 1 0))) +(define (gtk-paned-get-position paned) + (C-call "gtk_paned_get_position" (gobject-alien paned))) + +(define (gtk-paned-set-position paned child1-size) + (C-call "gtk_paned_set_position" (gobject-alien paned) child1-size)) + (define-class ( (constructor ())) ()) diff --git a/src/gtk/gtk.pkg b/src/gtk/gtk.pkg index c3aa43dcd..a2e690e39 100644 --- a/src/gtk/gtk.pkg +++ b/src/gtk/gtk.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Matthew Birkholz +Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Matthew Birkholz This file is part of an extension to MIT/GNU Scheme. @@ -214,6 +214,7 @@ USA. gtk-paned? gtk-paned-new gtk-paned-pack1 gtk-paned-pack2 gtk-paned-get-child1 gtk-paned-get-child2 + gtk-paned-get-position gtk-paned-set-position gtk-paned-view? gtk-paned-view-new) (import (gtk pango) make-pango-layout guarantee-pango-font-description))