From: Matt Birkholz Date: Tue, 5 Feb 2013 20:47:22 +0000 (-0700) Subject: gtk: Added pango-layout-set-markup. Caught up documentation. X-Git-Tag: mit-scheme-pucked-9.2.12~534 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f09586b958390dfea8d1d95ece243a42bfb5a582;p=mit-scheme.git gtk: Added pango-layout-set-markup. Caught up documentation. --- diff --git a/doc/gtk/gtk.texinfo b/doc/gtk/gtk.texinfo index 2b4df1124..b5cfc6bd6 100644 --- a/doc/gtk/gtk.texinfo +++ b/doc/gtk/gtk.texinfo @@ -1614,6 +1614,15 @@ observed by substituting @code{gtk-paned-new} and Demo}. @end deffn +@deffn Procedure gtk-paned-view? object +Type predicate. +@end deffn + +@deffn Procedure gtk-paned-view-new orientation +A new gtk-paned-view instance. @var{Orientation} should be one of the +symbols @code{horizontal} or @code{vertical}. +@end deffn + @node Gtk Scrolled Window, Scheme Widget, Gtk Paned, API Reference @section Gtk Scrolled Window @@ -1668,6 +1677,15 @@ be observed by substituting @code{gtk-scrolled-view-new} and Demo}. @end deffn +@deffn Procedure gtk-scrolled-view? object +Type predicate. +@end deffn + +@deffn Procedure gtk-scrolled-view-new orientation +A new gtk-paned-view instance. @var{Orientation} should be one of the +symbols @code{horizontal} or @code{vertical}. +@end deffn + @node Scheme Widget, Fix Layout, Gtk Scrolled Window, API Reference @section Scheme Widget diff --git a/src/gtk/Includes/pango-layout.cdecl b/src/gtk/Includes/pango-layout.cdecl index 823e80135..43f7a9ae3 100644 --- a/src/gtk/Includes/pango-layout.cdecl +++ b/src/gtk/Includes/pango-layout.cdecl @@ -18,6 +18,11 @@ pango-1.0/pango/pango-layout.h |# (text (* (const char))) (length int)) +(extern void pango_layout_set_markup + (layout (* PangoLayout)) + (markup (* (const char))) + (length int)) + (extern void pango_layout_set_font_description (layout (* PangoLayout)) (desc (* (const PangoFontDescription)))) diff --git a/src/gtk/gtk.pkg b/src/gtk/gtk.pkg index a2e690e39..da32ea10d 100644 --- a/src/gtk/gtk.pkg +++ b/src/gtk/gtk.pkg @@ -110,6 +110,7 @@ USA. pango-layout-get-font-description pango-layout-set-font-description pango-layout-set-text + pango-layout-set-markup pango-layout-get-pixel-extents pango-layout-index-to-pos pango-font-description-from-string @@ -209,8 +210,7 @@ USA. gtk-scrolled-window? guarantee-gtk-scrolled-window gtk-scrolled-window-new gtk-scrolled-window-set-policy gtk-scrolled-window-set-placement - gtk-scrolled-view? - guarantee-gtk-scrolled-view gtk-scrolled-view-new + gtk-scrolled-view? gtk-scrolled-view-new gtk-paned? gtk-paned-new gtk-paned-pack1 gtk-paned-pack2 gtk-paned-get-child1 gtk-paned-get-child2 diff --git a/src/gtk/pango.scm b/src/gtk/pango.scm index ff4967cb7..fd10b967c 100644 --- a/src/gtk/pango.scm +++ b/src/gtk/pango.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -Copyright (C) 2009, 2010, 2011, 2012 Matthew Birkholz +Copyright (C) 2009, 2010, 2011, 2012, 2013 Matthew Birkholz This file is part of an extension to MIT/GNU Scheme. @@ -61,6 +61,12 @@ USA. (C-call "pango_layout_set_text" (gobject-alien layout) text (string-length text))) +(define (pango-layout-set-markup layout markup) + (guarantee-pango-layout layout 'pango-layout-set-markup) + (guarantee-string markup 'pango-layout-set-markup) + (C-call "pango_layout_set_markup" (gobject-alien layout) + markup (string-length markup))) + (define (pango-layout-get-pixel-extents layout receiver) (guarantee-pango-layout layout 'pango-layout-set-text) (guarantee-procedure-of-arity receiver 2 'pango-layout-set-text)