<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jan Arne Petersen&#039;s Blog &#187; GTK+</title>
	<atom:link href="http://blog.jpetersen.org/tag/gtk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jpetersen.org</link>
	<description></description>
	<lastBuildDate>Wed, 25 Jan 2012 14:28:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Openismus, Clutter Tutorial and Tool Palette</title>
		<link>http://blog.jpetersen.org/2008/06/01/openismus-clutter-tutorial-and-tool-palette/</link>
		<comments>http://blog.jpetersen.org/2008/06/01/openismus-clutter-tutorial-and-tool-palette/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 18:11:28 +0000</pubDate>
		<dc:creator>jpetersen</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Clutter]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Openismus]]></category>
		<category><![CDATA[ToolPalette]]></category>

		<guid isPermaLink="false">http://blog.jpetersen.org/?p=14</guid>
		<description><![CDATA[As announced by Murray I have started working at Openismus. Two of the tasks I did in the first week: Clutter Tutorial I updated the source code examples of the Clutter tutorial written by Murray to make them run with &#8230; <a href="http://blog.jpetersen.org/2008/06/01/openismus-clutter-tutorial-and-tool-palette/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://www.murrayc.com/blog/permalink/2008/05/21/jan-arne-petersen/">announced by Murray</a> I have started working at <a href="http://www.openismus.com">Openismus</a>. Two of the tasks I did in the first week:</p>
<p><strong>Clutter Tutorial</strong></p>
<p>I updated the source code examples of the <a href="http://www.openismus.com/misc/clutter_tutorial/docs/tutorial/html/index.html">Clutter tutorial</a> written by Murray to make them run with the current unstable development version of <a href="http://clutter-project.org/">Clutter</a>. I never used Clutter before but it is a really nice library and the tutorial helps a lot to understand Clutter concepts like <a href="http://www.openismus.com/misc/clutter_tutorial/docs/tutorial/html/ch05.html">Timelines</a> and <a href="http://www.openismus.com/misc/clutter_tutorial/docs/tutorial/html/ch07.html">Behaviours</a>. (<a href="http://bugzilla.o-hand.com/show_bug.cgi?id=934">Patch</a> to update the examples).</p>
<p><strong>Tool Palette</strong></p>
<p>There is a generic tool palette container developed by Openismus. I continued <a href="http://taschenorakel.de/mathias/">Mathias&#8217;</a> work by adding new features such as support for scroll to group (show as much items of a group as possible when expanding) or RTL language support:</p>
<p><a href="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-ltr11.png"><img class="alignnone size-medium wp-image-16" title="Horizonal Tool Palette (LTR)" src="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-ltr1-300x169.png" alt="" width="300" height="169" /></a></p>
<p><a href="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-rtl11.png"><img class="alignnone size-medium wp-image-17" title="Horizonal Tool Palette (RTL)" src="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-rtl1-300x181.png" alt="" width="300" height="181" /></a></p>
<p>There is a <a href="http://bugzilla.gnome.org/show_bug.cgi?id=535090">bug</a> open in GTK+ which allows to use some additional layout options for tool items. It would allow something like an enhanced BOTH_HORIZ style:</p>
<p><a href="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-both-horiz11.png"><img class="alignnone size-medium wp-image-18" title="Horizontal Tool Palette, BOTH_HORIZ style (enhanced)" src="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-both-horiz1-300x146.png" alt="" width="300" height="146" /></a></p>
<p>or vertical, aligned text in the TEXT style:</p>
<p><a href="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-text-rtl11.png"><img class="alignnone size-medium wp-image-19" title="Horizontal Tool Palette, TEXT style (enhanced, RTL)" src="http://www.jpetersen.org/blog/wp-content/uploads/2008/06/toolpalette-horizontal-text-rtl1-300x179.png" alt="" width="300" height="179" /></a></p>
<p>The EggToolPalette is already usable. The source code is avaiable: svn co <a href="http://svn.gnome.org/viewvc/libegg/trunk/">http://svn.gnome.org/svn/libegg/trunk</a> libegg</p>
<p>Viewvc: <a href="http://svn.gnome.org/viewvc/libegg/trunk/libegg/toolpalette/">http://svn.gnome.org/viewvc/libegg/trunk/libegg/toolpalette/</a></p>
<p>Use</p>
<ul>
<li><em>egg_tool_palette_new ()</em> to create a new tool palette</li>
<li><em>egg_tool_item_group_new (&#8220;Name&#8221;)</em> to create a named item group</li>
<li><em>gtk_container_add (GTK_CONTAINER (palette), group) </em>to insert the item group into the palette</li>
<li>and <em>egg_tool_item_group_insert (EGG_TOOL_ITEM_GROUP (group), item, -1)</em> to insert a <em>GtkToolItem</em> into the item group</li>
</ul>
<p>The <a href="http://svn.gnome.org/svn/libegg/trunk/libegg/toolpalette/testtoolpalette.c">testtoolpalette.c</a> example shows some more features (like drag and drop support).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jpetersen.org/2008/06/01/openismus-clutter-tutorial-and-tool-palette/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Default GtkWindow with Menu and Toolbars</title>
		<link>http://blog.jpetersen.org/2008/05/14/a-default-gtkwindow-with-menu-and-toolbars/</link>
		<comments>http://blog.jpetersen.org/2008/05/14/a-default-gtkwindow-with-menu-and-toolbars/#comments</comments>
		<pubDate>Tue, 13 May 2008 22:57:15 +0000</pubDate>
		<dc:creator>jpetersen</dc:creator>
				<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GTK+]]></category>

		<guid isPermaLink="false">http://blog.jpetersen.org/?p=11</guid>
		<description><![CDATA[I don&#8217;t like such applications on my N810: The application could be ported to use a HildonWindow if compiled for the maemo platform. But it would be much easier if there were an abstract GTK+ widget which would allow it &#8230; <a href="http://blog.jpetersen.org/2008/05/14/a-default-gtkwindow-with-menu-and-toolbars/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like such applications on my N810:</p>
<p><a href="http://www.jpetersen.org/blog/wp-content/uploads/2008/05/labyrinth-maemo-screenshot-111.png"><img class="alignnone size-medium wp-image-10" title="Labyrinth on Maemo" src="http://www.jpetersen.org/blog/wp-content/uploads/2008/05/labyrinth-maemo-screenshot-11-300x180.png" alt="" width="300" height="180" /></a></p>
<p>The application could be ported to use a <a href="http://maemo.org/api_refs/4.0/hildon/HildonWindow.html">HildonWindow</a> if compiled for the maemo platform. But it would be much easier if there were an abstract GTK+ widget which would allow it to add a menu and toolbars to a window in a (platform specific) default layout.</p>
<p>I imagine something like:</p>
<p><a href="http://www.jpetersen.org/blog/wp-content/uploads/2008/05/abstract-factorydiagram_1210680273477_211.png"><img class="alignnone size-medium wp-image-12" title="MainWindow Class Diagram" src="http://www.jpetersen.org/blog/wp-content/uploads/2008/05/abstract-factorydiagram_1210680273477_21-281x300.png" alt="" width="281" height="300" /></a></p>
<p>With this proposal, it would also be possible to implement a <a href="http://bugzilla.gnome.org/show_bug.cgi?id=353076">Mac-style MenuBar</a> without a GtkMenuBar hack.</p>
<p>See <a href="http://bugzilla.gnome.org/show_bug.cgi?id=533003">Bug 533003</a>.</p>
<p>p.s. I don&#8217;t like the name GtkMainWindow. Maybe something like GtkDefaultWindow or GtkSimpleWindow would be better.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jpetersen.org/2008/05/14/a-default-gtkwindow-with-menu-and-toolbars/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Another Pseudo Interface in GTK+</title>
		<link>http://blog.jpetersen.org/2008/05/13/another-pseudo-interface-in-gtk/</link>
		<comments>http://blog.jpetersen.org/2008/05/13/another-pseudo-interface-in-gtk/#comments</comments>
		<pubDate>Tue, 13 May 2008 21:46:03 +0000</pubDate>
		<dc:creator>jpetersen</dc:creator>
				<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GTK+]]></category>

		<guid isPermaLink="false">http://blog.jpetersen.org/?p=9</guid>
		<description><![CDATA[Beside the hidden scrollable interface there is another interface hidden in GtkWidgetClass::activate_signal. See Bug 532795 for an implementation of an explicit Activatable interface to replace this class variable.]]></description>
			<content:encoded><![CDATA[<p>Beside the hidden <a href="http://blog.jpetersen.org/2008/05/07/scrollable-widgets-in-gtk/">scrollable</a> interface there is another interface hidden in <a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#GtkWidgetClass">GtkWidgetClass::activate_signal</a>.</p>
<p>See <a href="http://bugzilla.gnome.org/show_bug.cgi?id=532795">Bug 532795</a> for an implementation of an explicit Activatable interface to replace this class variable.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jpetersen.org/2008/05/13/another-pseudo-interface-in-gtk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrollable widgets in GTK+</title>
		<link>http://blog.jpetersen.org/2008/05/07/scrollable-widgets-in-gtk/</link>
		<comments>http://blog.jpetersen.org/2008/05/07/scrollable-widgets-in-gtk/#comments</comments>
		<pubDate>Wed, 07 May 2008 14:44:29 +0000</pubDate>
		<dc:creator>jpetersen</dc:creator>
				<category><![CDATA[GNOME]]></category>
		<category><![CDATA[GTK+]]></category>

		<guid isPermaLink="false">http://blog.jpetersen.org/?p=5</guid>
		<description><![CDATA[In GTK+ 2 there are scrollable widgets like GtkTreeView, GtkTextView or GtkViewport but no GtkScrollable interface. Instead a scrollable widget is defined by a &#8220;set_scroll_adjustments&#8221; signal, which id is written to the GtkWidgetClass::set_scroll_adjustments_signal class variable. If a scrollable widget is &#8230; <a href="http://blog.jpetersen.org/2008/05/07/scrollable-widgets-in-gtk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In GTK+ 2 there are scrollable widgets like <a href="http://library.gnome.org/devel/gtk/unstable/GtkTreeView.html">GtkTreeView</a>, <a href="http://library.gnome.org/devel/gtk/unstable/GtkTextView.html">GtkTextView</a> or <a href="http://library.gnome.org/devel/gtk/unstable/GtkViewport.html">GtkViewport</a> but no GtkScrollable interface. Instead a scrollable widget is defined by a &#8220;set_scroll_adjustments&#8221; signal, which id is written to the <a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#GtkWidgetClass">GtkWidgetClass::set_scroll_adjustments_signal</a> class variable.</p>
<p>If a scrollable widget is added to a <a href="http://library.gnome.org/devel/gtk/unstable/GtkScrolledWindow.html">GtkScrolledWindow</a> the set_scroll_adjustments_signal is called and the hadjustment and vadjustment from the GtkScrolledWindow are passed as parameters to the scrollable widget. The scrollable widget than replaces its own adjustments with the ones it got from the GtkScrolledWindow. If the scrollable widget is removed from the GtkScrolledWindow it recreates its own adjustments.</p>
<p>This model seems to be simple, but all scrollable widgets need (and set) specific values for <a href="http://library.gnome.org/devel/gtk/unstable/GtkAdjustment.html">GtkAdjustment</a>::lower, ::upper, ::page_increment and ::page_size and the adjustments are required by the size-allocate function. So the adjustments should actually be owned by the scrollable widget and not by the GtkScrolledWindow.</p>
<p>For GTK+ 3 I propose a simple GtkScrollable interface with a readable hadjustment and vadjustment property. If a widget which implements GtkScrollable is added to a GtkScrolledWindow the GtkScrolledWindow should use its adjustments.</p>
<p>See <a title="Redo scrollable widgets and adjustments for gtk+ 3" href="http://bugzilla.gnome.org/show_bug.cgi?id=468689">Bug 468689</a> and the attached patch.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jpetersen.org/2008/05/07/scrollable-widgets-in-gtk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

