<?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>Carlos Garnacho &#187; General</title>
	<atom:link href="http://blogs.gnome.org/carlosg/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/carlosg</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Fri, 20 Jan 2012 13:13:59 +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>Multitouch is near&#8230;</title>
		<link>http://blogs.gnome.org/carlosg/2012/01/20/multitouch-is-near/</link>
		<comments>http://blogs.gnome.org/carlosg/2012/01/20/multitouch-is-near/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 13:13:59 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=216</guid>
		<description><![CDATA[So, after a few strives during the last year, the multitouch Xorg patches were posted and merged to master last month, making multitouch available in the upcoming Xorg release. This turns the multitouch GTK+ branch into a suitable candidate for GTK+ 3.4, which obviously deserves a video demoing what&#8217;s up there: Hopefully soon in master, [...]]]></description>
			<content:encoded><![CDATA[<p>So, after a few strives during the last year, the multitouch Xorg patches <a href="http://who-t.blogspot.com/2011/12/multitouch-patches-posted.html">were posted</a> and merged to master last month, making multitouch available in the upcoming Xorg release. This turns the <a href="http://git.gnome.org/browse/gtk+/?h=multitouch">multitouch GTK+ branch</a> into a suitable candidate for GTK+ 3.4, which obviously deserves a video demoing what&#8217;s up there:</p>
<p><a href="http://gnome.org/~carlosg/oggs/multitouch.ogg"><br />
  <img src="http://gnome.org/~carlosg/oggs/multitouch.png" /><br />
</a></p>
<p>Hopefully soon in master, very soon&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2012/01/20/multitouch-is-near/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
<enclosure url="http://gnome.org/~carlosg/oggs/multitouch.ogg" length="0" type="audio/ogg" />
		</item>
		<item>
		<title>Introducing Cossa, a GTK+ theme previewer for gedit</title>
		<link>http://blogs.gnome.org/carlosg/2011/05/28/introducing-cossa-a-gtk-theme-previewer-for-gedit/</link>
		<comments>http://blogs.gnome.org/carlosg/2011/05/28/introducing-cossa-a-gtk-theme-previewer-for-gedit/#comments</comments>
		<pubDate>Sat, 28 May 2011 11:05:25 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=209</guid>
		<description><![CDATA[Earlier today I&#8217;ve pushed gedit-cossa, a plugin for gedit to help writing CSS for GTK+ themes, it is able to display a number of samples, loaded from GtkBuilder files. Here&#8217;s a video demonstrating how it works: Cossa is still in pretty early development stages, immediate plans include: Hooking CSS parsing errors to the gedit view [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today I&#8217;ve pushed <a href="http://git.gnome.org/browse/gedit-cossa">gedit-cossa</a>, a plugin for gedit to help writing CSS for GTK+ themes, it is able to display a number of samples, loaded from GtkBuilder files.</p>
<p>Here&#8217;s a video demonstrating how it works:</p>
<p><a href="http://lanedo.com/~carlos/gedit-cossa-demo.webm"><img class="aligncenter size-full wp-image-210" src="http://blogs.gnome.org/carlosg/files/2011/05/gedit-cossa-demo.png" alt="" width="256" height="160" /></a></p>
<p>Cossa is still in pretty early development stages, immediate plans include:</p>
<ul>
<li>Hooking CSS parsing errors to the gedit view</li>
<li>Adding a lot more samples, these should range from simple examples (basic widgets in different states) to complex (basic main window sample, preferences dialogs, &#8230;)</li>
</ul>
<p>Anyone is welcome to help, specially in the second point, as it is fairly straightforward to <a href="http://git.gnome.org/browse/gedit-cossa/tree/README.samples">add new samples</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2011/05/28/introducing-cossa-a-gtk-theme-previewer-for-gedit/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Multifoobar</title>
		<link>http://blogs.gnome.org/carlosg/2011/03/12/multifoobar/</link>
		<comments>http://blogs.gnome.org/carlosg/2011/03/12/multifoobar/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 15:05:56 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=196</guid>
		<description><![CDATA[Along the last days/weeks, I&#8217;ve gave myself the oportunity to tinker with XInput 2.1 in GTK+, now that the core concept of the involved changes seem settled (although corner cases are still being discussed). Thanks to the previous port to XInput 2.0, handling multitouch events has been fairly easy, by enabling GDK_TOUCH_MASK events on your [...]]]></description>
			<content:encoded><![CDATA[<p>Along the last days/weeks, I&#8217;ve gave myself the oportunity to tinker with XInput 2.1 in GTK+, now that the core concept of the involved changes seem settled (although corner cases are still being discussed).</p>
<p>Thanks to the previous port to XInput 2.0, handling multitouch events has been fairly easy, by enabling <code>GDK_TOUCH_MASK</code> events on your widget you can receive <code>GDK_TOUCH_PRESS/MOTION/RELEASE</code> events containing a touch ID, which is unique at that time for a touch event stream, so enabling that you can effectively receive events from simultaneous touches.</p>
<p>In addition, one can create <a href="http://git.gnome.org/browse/gtk+/tree/gdk/gdktouchcluster.c?h=xi21#n25"><code>GdkTouchClusters</code></a> (related to a GdkWindow) and add touch IDs to it. from that point on, any update on these touch IDs stops sending individual GDK_TOUCH_MOTION events, instead sending <a href="http://git.gnome.org/browse/gtk+/tree/gdk/gdkevents.h?h=xi21#n537"><code>GdkEventMultiTouch</code></a> events, containing all latest events for the touch IDs in a <code>GdkTouchCluster</code>.</p>
<p>I&#8217;m pretty happy with the resulting API, althought there are some internal details left to improve, my main gripe currently is that implicit grabs in CSW still happen per device, this means no multi-widget multitouch yet within an app (also posing interesting problems with keyboard events redirection and explicit grabs). Another big item is looking into integrating this with <a href="http://git.gnome.org/browse/gtk+/commit/?h=gestures&#038;id=a82167eb2166977934e61bd8ee5d86526a9b725c">gestures</a>, as direct manipulation and gesturing need to go hand in hand, so that branch could be discontinued in favor of this one.</p>
<p>As I&#8217;m pretty lazy, and the results would be strikingly similar to what <a href="http://blogs.gnome.org/carlosg/2010/06/09/getting-multitouch-to-just-work/">I previously posted</a>, I won&#8217;t post any video, so you&#8217;ll have to settle for a screenshot:</p>
<p><img src="http://blogs.gnome.org/carlosg/files/2011/03/Multitouch-demo.png" /></p>
<p>This is sitting now in the <a href="http://git.gnome.org/browse/gtk+/log/?h=xi21">xi21 branch</a>. If you just compile this you won&#8217;t see much working though, the demo only reacts to touch events, which are only sent if XInput 2.1 is there, which requires compiling <a href="http://cgit.freedesktop.org/~daniels/inputproto/log/?h=multitouch-v5">certain</a> <a href="http://cgit.freedesktop.org/~daniels/xserver/log/?h=multitouch-v5">Xorg</a> <a href="http://cgit.freedesktop.org/~daniels/libXi/log/?h=multitouch-v5">modules</a> <a href="http://cgit.freedesktop.org/~daniels/xf86-input-evdev/log/?h=multitouch-v5">branches</a>, and having a multitouch device at hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2011/03/12/multifoobar/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>updates updates</title>
		<link>http://blogs.gnome.org/carlosg/2011/01/17/updates-updates/</link>
		<comments>http://blogs.gnome.org/carlosg/2011/01/17/updates-updates/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 11:16:32 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=181</guid>
		<description><![CDATA[Fixing the default GNOME3 theme Now that most of GTK+ widgets are using GtkStyleContext, I finally got onto improving the default gnome3 theme/engine, I finally chose to rip off the tiny clearlooks engine bits I needed to demonstrate how minimal engines can complement and extend the current CSS theming features. So things are getting closer [...]]]></description>
			<content:encoded><![CDATA[<p><b>Fixing the default GNOME3 theme</b></p>
<p>Now that most of GTK+ widgets are using GtkStyleContext, I finally got onto improving the default gnome3 theme/engine, I finally chose to rip off the tiny clearlooks engine bits I needed to demonstrate how minimal engines can complement and extend the current CSS theming features. So things are getting closer to the mockups:</p>
<p><a href="http://www.lanedo.com/~carlos/Screenshot-Print.png"><img src="http://www.lanedo.com/~carlos/Screenshot-Print.png" /></a></p>
<p>There are some things that still need to be improved, column headers and expanders most namely, but things should be mostly there pretty quickly. Even though, hands and eyes are most welcome on both the <a href="http://git.gnome.org/browse/gnome-themes-standard/tree/themes/Adwaita/gtk-3.0/gtk.css">CSS file</a> and the <a href="http://git.gnome.org/browse/gtk-theme-engine-clearlooks/tree/src/adwaita_engine.c">engine</a>.</p>
<p><b>A gestures interpreter for GTK+</b><br />
Despite what some might think, my day to day work carries me quite far from theming land, during the last week I got the oportunity to start development on a gestures interpreter for GTK+, a pretty interesting (read: wacky <img src='http://blogs.gnome.org/carlosg/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' />  ) piece of dynamic programming, that seems to work pretty well for its builtin gestures (<a href="http://lanedo.com/~carlos/GTK+-Gestures.ogg"><b>Video here</b></a>, at the moment it handles swiping in the 4 directions, plus circular swipe in both directions)</p>
<p>This code lives at the moment in <a href="http://git.gnome.org/browse/gtk+/log/?h=gestures">a GTK+ branch</a>, including <a href="http://git.gnome.org/browse/gtk+/plain/tests/testgestures.c?h=gestures">a testcase</a>. The gestures interpreter at the moment handles individual pointer movements separatedly, although it may be improved over time to handle multiple input pointers, as the interpreter itself is private and widgets just get an enum for the gesture type. </p>
<p>As the stock gestures could be stored in terms of coordinates or vectors, future plans include having these stored in a mmap()-able format, plus having an editor to create new gestures.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2011/01/17/updates-updates/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>gtk-style-context landed in GTK+ master</title>
		<link>http://blogs.gnome.org/carlosg/2010/12/06/gtk-style-context-landed-in-gtk-master/</link>
		<comments>http://blogs.gnome.org/carlosg/2010/12/06/gtk-style-context-landed-in-gtk-master/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 21:39:46 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=174</guid>
		<description><![CDATA[For those building gnome3 frequently from git or paying attention to gtk-devel, this might be old news, but still worth mentioning&#8230; The gtk-style-context branch has landed in GTK+ master, which will quickly unveil a powerful theming system, powered by CSS files. Although some apps (mostly these implementing widgets themselves) might undergo some work to adapt [...]]]></description>
			<content:encoded><![CDATA[<p>For those building gnome3 frequently from git or paying attention to gtk-devel, this might be old news, but still worth mentioning&#8230; The gtk-style-context branch <a href="http://mail.gnome.org/archives/gtk-devel-list/2010-December/msg00010.html">has landed</a> in GTK+ master, which will quickly unveil a powerful theming system, powered by CSS files.</p>
<div id="attachment_175" class="wp-caption aligncenter" style="width: 310px"><a href="http://blogs.gnome.org/carlosg/files/2010/12/Screenshot.png"><img src="http://blogs.gnome.org/carlosg/files/2010/12/Screenshot-300x187.png" alt="" title="Screenshot" width="300" height="187" class="size-medium wp-image-175" /></a><p class="wp-caption-text">Boring by default, yet versatile</p></div>
<p>Although some apps (mostly these implementing widgets themselves) might undergo some work to adapt to this, there are <a href="http://www.lanedo.com/~carlos/gtk3-doc/theming.html">API docs</a> and <a href="http://www.lanedo.com/~carlos/gtk3-doc/gtk-migrating-GtkStyleContext.html">migration documents</a> (mostly courtesy of <a href="http://blogs.fedoraproject.org/wp/mclasen">Matthias</a>, who&#8217;s done an excellent work) that should ease the task.</p>
<p>Besides the GTK+ work, there is also both a gnome3 <a href="http://git.gnome.org/browse/gnome-themes-standard/">theme</a> and <a href="http://git.gnome.org/browse/gtk-theme-engine-clearlooks/">engine</a> using the new stuff. Things are still ongoing here, as many things can be leveraged into CSS, which would leave the engine very little things to do. <a href="http://www.andreasn.se/blog">Andreas</a> started looking at some point into the branch, so he might have some things ready in that field <img src='http://blogs.gnome.org/carlosg/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' /> .</p>
<p>But not only that! <a href="http://carlosgc.linups.org/">Carlos Garcia Campos</a> (KaL) has been doing good progress on webkit-gtk so no backing widgets creation is needed, and <a href="http://blogs.gnome.org/pbor">Paolo Borelli</a> has ported GtkSourceView as well, awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2010/12/06/gtk-style-context-landed-in-gtk-master/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GTK+ Hackfest sum up</title>
		<link>http://blogs.gnome.org/carlosg/2010/10/25/gtk-hackfest-sum-up/</link>
		<comments>http://blogs.gnome.org/carlosg/2010/10/25/gtk-hackfest-sum-up/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 13:33:05 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=160</guid>
		<description><![CDATA[On this weekend I&#8217;ve returned from the GTK+ Hackfest in A Coruña. All in all, it&#8217;s been a really intensive event, so much that apparently many of us have been to exhausted to blog , there have been lots of ideas and interesting topics to discuss about, and lots of goodness have landed in git [...]]]></description>
			<content:encoded><![CDATA[<p>On this weekend I&#8217;ve returned from the <a href="http://live.gnome.org/Hackfests/GTK2010">GTK+ Hackfest in A Coruña</a>. All in all, it&#8217;s been a really intensive event, so much that apparently many of us have been to exhausted to blog <img src='http://blogs.gnome.org/carlosg/wp-content/mu-plugins/tango-smilies/tango/face-raspberry.png' alt=':P' class='wp-smiley' /> , there have been lots of ideas and interesting topics to discuss about, and lots of goodness have landed in git (GPeriodic, GtkGrid, input/output windows removal, GdkRGBA, &#8230;). Most importantly, <a href="http://live.gnome.org/Hackfests/GTK2010/RoadmapDiscussion">a roadmap</a> is taking shape!</p>
<p>Personally, I&#8217;ve been working during the past week on the <a href="http://git.gnome.org/browse/gtk+/log/?h=gtk-style-context">gtk-style-context branch</a>, adding some missing features and improving how things render in general. In that branch, you could see something somewhat boring, as we are accustomed to:</p>
<p align="center"><img src="http://lanedo.com/~carlos/testgtk.png" /></p>
<p>But then with this CSS in ~/.gtk-2.0.css:<br />
<code></p>
<pre>
.background {
    background-color: rgba (0.2, 0.2, 0.2, 0.9);
}

.button {
    border-radius: 5;
    border-width: 1;
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@bg_color, 1.3)),
                                     color-stop (0.55, shade (@bg_color, 1.1)),
                                     color-stop (0.55, shade (@bg_color, 0.9)),
                                     to (@bg_color));
}

GtkButton:hover {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (@selected_bg_color, 1.3)),
                                     color-stop (0.5, shade (@selected_bg_color, 1.1)),
                                     color-stop (0.5, shade (@selected_bg_color, 0.7)),
                                     to (@selected_bg_color));
    transition: 200ms ease-in-out;
}

GtkBox > GtkBox > GtkButton {
    background-image: -gtk-gradient (linear, left top, left bottom,
                                     from (shade (rgba (0.2, 0.2, 0.2, 0.8), 1.3)),
                                     color-stop (0.55, rgba (0.4, 0.2, 0.2, 0.8)),
                                     color-stop (0.55, rgba (0.6, 0.2, 0.2, 0.8)),
                                     to (rgba (0.3, 0.3, 0.3, 0.8)));
}

GtkScrolledWindow {
    background-color: rgba (0.3, 0.3, 0.3, 0.7);
}

.trough,
.slider {
    border-radius: 3;
    border-width: 1;
}

GtkBox > GtkLabel {
    font: Sans 15;
    foreground-color: #f00;
}
</pre>
<p></code></p>
<p>Turns into something uglier yet exotic (<b>note:</b>provided the GtkWindow has an RGBA visual, I&#8217;ll leave that as an exercise for the reader):</p>
<p align="center"><img src="http://lanedo.com/~carlos/testgtk-on-css.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2010/10/25/gtk-hackfest-sum-up/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CSS-like styling for GTK+</title>
		<link>http://blogs.gnome.org/carlosg/2010/08/23/css-like-styling-for-gtk/</link>
		<comments>http://blogs.gnome.org/carlosg/2010/08/23/css-like-styling-for-gtk/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 17:47:40 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=136</guid>
		<description><![CDATA[Lately, I&#8217;ve been intermitently working on the gtk-style-context branch, which is meant to supersede GtkStyle and get rid of all its limitations in creating contemporary UIs, to name a few: Cairo as a first class citizen: This means elements may be rendered on any surface, not only on X resources. No more widget peeping: There [...]]]></description>
			<content:encoded><![CDATA[<p>Lately, I&#8217;ve been intermitently working on the <a href="http://git.gnome.org/browse/gtk+/?h=gtk-style-context">gtk-style-context</a> branch, which is meant to supersede GtkStyle and get rid of all its limitations in creating contemporary UIs, to name a few:</p>
<ul>
<li>Cairo as a first class citizen: This means elements may be rendered on any surface, not only on X resources.</li>
<li>No more widget peeping: There is now a GtkWidgetPath abstraction, which fully defines the widget in a styling point of view.</li>
<li>Widget is no longer a plain area: Widgets may define named regions, which can be styled independently.</li>
<li>Animation support: Theming engines no longer have to hack their way to animate some UI element, there is built in support for animations on state changes.</li>
<li>No more detail string: GtkStyleContext may contain several classes, which can be checked by the theming engine.</li>
</ul>
<p>As a consequence, the GtkRC parser has been replaced as well by a CSS-like parser, the property names aren&#8217;t currently fully following the CSS spec (Selectors do), and there are some semantics that don&#8217;t apply, but OTOH there is support for symbolic colors. The format is enough for people into web development to get the gist of it:</p>
<p><code><br />
@named-color: #01a4f9;</p>
<p>/* Set background on GtkCheckButton<br />
 * and other types inheriting from<br />
 * it<br />
 */<br />
GtkCheckButton {<br />
&nbsp;&nbsp;background-color: #14a414;<br />
}</p>
<p>/* Theme buttons inside a table,<br />
 * not necessarily a direct child<br />
 */<br />
GtkTable GtkButton {<br />
&nbsp;&nbsp;foreground-color: #f01df4;<br />
&nbsp;&nbsp;text-color: #f01df4;<br />
}</p>
<p>/* Theme scale widgets that are<br />
 * direct children of a GtkTable<br />
 */<br />
GtkTable > GtkScale {<br />
&nbsp;&nbsp;foreground-color: #01ab39;<br />
}</p>
<p>/* Widget states may be defined */<br />
GtkButton:active {<br />
&nbsp;&nbsp;background-color: #f01;<br />
}</p>
<p>/* Generic classes may be used as well */<br />
.button:prelight {<br />
&nbsp;&nbsp;background-color: #10f;<br />
}</p>
<p>/* any widget with this name will be themed */<br />
*#some-widget-name {<br />
&nbsp;&nbsp;font-color: #e0a;<br />
}</p>
<p>/* This will apply if both states happen on the<br />
 * widget, such as a pressed checkbox button with<br />
 * the pointer on it.<br />
 */<br />
GtkButton:active:prelight {<br />
&nbsp;&nbsp;background-color: shade (#f01, 1.3);<br />
}</p>
<p>/* Set bg color on odd rows */<br />
GtkTreeView row:nth-child(even) {<br />
&nbsp;&nbsp;background-color: #f00f10;<br />
}</p>
<p>/* Theme first notebook tab differently */<br />
GtkNotebook tab:nth-child(first) {<br />
&nbsp;&nbsp;background-color: @named-color;<br />
}</p>
<p>/* And paint a bit darker if active */<br />
GtkNotebook tab:nth-child(first):active {<br />
&nbsp;&nbsp;background-color: shade (@named-color, 0.7);<br />
}</p>
<p>/* Animate checkbutton transitions */<br />
GtkCheckButton:active {<br />
&nbsp;&nbsp;transition: 200ms ease-in-out;<br />
}<br />
</code></p>
<p>If you compile the gtk-style-context branch and put this into ~/.gtk-2.0.css, you should see something like this:<br />
<b>(Disclaimer: this is the default engine, I know it&#8217;s ugly, let&#8217;s leave art for artists)</b></p>
<p><a href="http://blogs.gnome.org/carlosg/files/2010/08/gtk-style-context-screenshot.png"><img src="http://blogs.gnome.org/carlosg/files/2010/08/gtk-style-context-screenshot.png" alt="" title="Style context in action" width="662" height="593" class="aligncenter size-full wp-image-145" /></a></p>
<p>At the moment, widgets have been roughly ported to this new code indirectly through making GtkStyle rely on GtkStyleContext, so they could be a lot more talkative about the elements they render and contain. If you&#8217;re a theme engine developer try out the <a href="http://git.gnome.org/browse/gtk+/tree/gtk/gtkthemingengine.h?h=gtk-style-context">GtkThemingEngine API</a>, this is what theming engines must implement and use in order to render UI elements, constructive feedback is most welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2010/08/23/css-like-styling-for-gtk/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Getting multitouch to just work</title>
		<link>http://blogs.gnome.org/carlosg/2010/06/09/getting-multitouch-to-just-work/</link>
		<comments>http://blogs.gnome.org/carlosg/2010/06/09/getting-multitouch-to-just-work/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 15:00:28 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=124</guid>
		<description><![CDATA[There are many things going on in this field, from the recent merge of the xi2 branch into GTK+ master (yay!) to the ongoing effort in Xorg to support multitouch devices. I&#8217;ve worked myself in a proposal to the evdev driver so it deals with multitouch devices as a set of XI2 devices (in GTK+ [...]]]></description>
			<content:encoded><![CDATA[<p>There are many things going on in this field, from the recent merge of the xi2 branch into GTK+ master (yay!) to the ongoing effort in Xorg to support multitouch devices.</p>
<p>I&#8217;ve worked myself in a proposal to the evdev driver so it deals with multitouch devices as a set of XI2 devices (in GTK+ world, this means each  finger would be represented by a GdkDevice), only one finger is able to send core events, while the others only get to send XI2 events, this seems pretty much in line with <a href="http://who-t.blogspot.com/">Peter&#8217;s</a> thoughts on <a href="http://lists.x.org/archives/xorg-devel/2010-June/009757.html">multitouch support</a></p>
<p>I also have a few patches in the <a href="http://git.gnome.org/browse/gtk+/?h=xi2-playground">xi2-playground branch</a> that understand these semantics and basically make multitouch work out of the box.</p>
<p>So, if you have a multitouch device that&#8217;s understood by the linux kernel, these are the ingredients:</p>
<ul>
<li>Xorg 7.5 (Recent Fedora and Ubuntu have this)
<li>My <a href="http://cgit.freedesktop.org/~carlosg/xf86-input-evdev/?h=multitouch-subdevs">evdev driver branch</a>
<li>For N-Trig devices:
<ul>
<li>hid-ntrig driver from Linus&#8217; tree (seemingly included in Ubuntu Lucid)
<li>This <a href="http://gnome.org/~carlosg/stuff/15-ntrig.conf">xorg.conf.d file</a> (a similar file might be needed on different hardware)
  </ul>
<li>GTK+ from the <a href="http://git.gnome.org/browse/gtk+/?h=xi2-playground">xi2-playground branch</a>
</ul>
<p>Voilá! xinput list should tell something like:</p>
<p><code><br />
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]<br />
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]<br />
⎜   ↳ N-Trig MultiTouch                       	id=12	[slave  pointer  (2)]<br />
⎜   ...<br />
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]<br />
     ...<br />
∼ N-Trig MultiTouch touchpoint 0          	id=13	[floating slave]<br />
∼ N-Trig MultiTouch touchpoint 1          	id=14	[floating slave]<br />
∼ N-Trig MultiTouch touchpoint 2          	id=15	[floating slave]<br />
∼ N-Trig MultiTouch touchpoint 3          	id=16	[floating slave]<br />
</code></p>
<p>And the GTK+ tests in tests/multidevice/ should just work, providing at the same time a single-touch device feeling to applications unaware of XI2 or multiple devices.</p>
<p><b>Guadec</b><br />
If you find this subject interesting, don&#8217;t miss my guadec talk! where I&#8217;ll be talking about multitouch in GTK+ and what applications can do to support it.</p>
<p><img src="http://guadec.org/img/guadec-oranje.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2010/06/09/getting-multitouch-to-just-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multi-touch support in Linux/Xorg/GTK+</title>
		<link>http://blogs.gnome.org/carlosg/2010/01/29/multi-touch-support-in-linuxxorggtk/</link>
		<comments>http://blogs.gnome.org/carlosg/2010/01/29/multi-touch-support-in-linuxxorggtk/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 00:47:30 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=104</guid>
		<description><![CDATA[So, for the first time ever (to my knowledge), the full multi-touch stack working on Linux: This video features: Linux 2.6.31 with the N-Trig driver (Plus some modifications of mine to have multitouch enabled with my touchscreen firmware) Xorg 7.5 xf86-input-evdev-multitouch (By the ENAC people, plus some patch of mine to cope with devices that [...]]]></description>
			<content:encoded><![CDATA[<p>So, for the first time ever (to my knowledge), the full multi-touch stack working on Linux:</p>
<p><a href="http://vimeo.com/9043676"><img src="http://blogs.gnome.org/carlosg/files/2010/01/MT-Linux-Xorg-GTK-thumb.png" alt="Wee, multi-touch" title="Wee, multi-touch" width="300" height="193" class="aligncenter size-full wp-image-105" /></a></p>
<p>This video features:</p>
<ul>
<li>Linux 2.6.31 with the N-Trig driver (Plus <a href="http://www.lanedo.com/~carlos/patches/ntrig-enable-multitouch.diff">some modifications of mine</a> to have multitouch enabled with my touchscreen firmware)</li>
<li><a href="http://www.x.org/wiki/Releases/7.5">Xorg 7.5</a></li>
<li><a href="http://lii-enac.fr/en/projects/shareit/xorg.html">xf86-input-evdev-multitouch</a> (By the ENAC people, plus <a href="http://www.lanedo.com/~carlos/patches/evdev-cope-with-no-tracking-ids.diff">some patch of mine</a> to cope with devices that don&#8217;t provide tracking IDs for each tracking point)</li>
<li>GTK+ from the <a href="http://git.gnome.org/browse/gtk+/?h=xi2">xi2 branch</a></li>
<li>Eye of GNOME (plus a <a href="http://www.lanedo.com/~carlos/patches/eog-multidevice.diff">small patch</a> to handle multidevice events)</li>
<li>Valen, the turtle</li>
</ul>
<p>In my opinion, this is a quite important milestone, which reflects much work done lately in this camp, and from now on things can only get better!</p>
<p>And of course,<br />
<a href="http://fosdem.org/"><img src="http://www.fosdem.org/2010/promo/going-to" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2010/01/29/multi-touch-support-in-linuxxorggtk/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>HP stands for &#8220;hijo de puta&#8221;</title>
		<link>http://blogs.gnome.org/carlosg/2009/10/09/hp-stands-for-hijo-de-puta/</link>
		<comments>http://blogs.gnome.org/carlosg/2009/10/09/hp-stands-for-hijo-de-puta/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 16:05:17 +0000</pubDate>
		<dc:creator>carlosg</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/carlosg/?p=88</guid>
		<description><![CDATA[Ok, next blog post was supposed to be about multitouch and such as I promised, but that will have to wait a bit, let&#8217;s see why: Today&#8217;s history is about N-trig, HP, and lots of idiotic behavior around. In order to have a better insight about multitouch, and seeing that the Thinkpad was aging, I [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, next blog post was supposed to be about multitouch and such as I promised, but that will have to wait a bit, let&#8217;s see why:</p>
<p>Today&#8217;s history is about N-trig, HP, and lots of idiotic behavior around. In order to have a better insight about multitouch, and seeing that the Thinkpad was aging, I decided to get a HP Touchsmart TX2 tablet. All in all, a nice computer, quite better than the old one, and there has been work lately on getting the N-Trig multitouch+stylus device working on linux, all fine! but wait&#8230;</p>
<p><strong>WTF #1 (<a href='http://www.n-trig.com/'>N-Trig</a>)</strong><br />
After I started experimenting with the Linux multitouch input interface, I promptly realized I wasn&#8217;t getting multitouch events at all, why? turns out the N-Trig device had a firmware meant for Vista, and that I should install Windows 7 drivers in order to get the newer firmware that would allow multitouch events. </p>
<p>Yes, right, drivers and firmware are bundled in a single installer, so when you install such thing you must plug your laptop, remove it from the expansion base and cross your fingers (away from the screen of course), could something go wrong? of course, and it did for me, leaving me with a &#8220;N-Trig hardware not detected&#8221; message whenever I try to reinstall or uninstall the driver, so no reflashing will happen, leaving the touchscreen completely unusable under any OS.</p>
<p>In conclusion: Hardware manufacturers should stay away from hardware unless they hold a soldering iron, seriously, leave software to others.</p>
<p><strong>WTF #2 (<a href='http://hp.com'>HP</a>)</strong><br />
After this, the only feeling of relief I had was due to the laptop being under warranty, easy, ain&#8217;t it? It isn&#8217;t. After several long calls to their customer service, they still insist that I must purchase a recovery kit DVD set (I wiped the recovery partition out, no DVDs were shipped with the laptop) for 40€, so they can check remotely themselves (eek) that it&#8217;s actually a hardware issue. There are several problems with this:</p>
<ul>
<li>According to <a href='http://boe.es/boe/dias/2003/07/11/pdfs/A27160-27164.pdf'>Spanish law</a>, enjoying any product warranty must imply no cost at all to the customer. I told them so and they dared me to sue them, I&#8217;m already looking into doing that.
<li>They stated that they can only support a computer warranty with the pre-installed OS. However, in the booklet shipped with the laptop, it is mentioned that they don&#8217;t guarantee at all any shipped software. They&#8217;re just supposed to offer limited technical support the first 90 days (which already expired).
</ul>
<p>I&#8217;m currently trying to bypass phone customer service with the e-mail one, they at least seem more indifferent to me having other OSs, let&#8217;s see if I succeed.</p>
<p>In conclusion: looks like HP customer service&#8217;s only target is to cause grief and frustration, you don&#8217;t only deserve being sued, you deserve to die young, in pain and alone.</p>
<p>&lt;/rant&gt;</p>
<p><b>XInput2 GTK+</b><br />
Sadly the only thing preventing me from sending a preliminar patch is polishing XInput 1 support, it was mostly readapted to GdkDeviceManager and the event handling refactor, but there are some glitches here and there. All this is now stalled by having the tablet functionality broken, if anyone wants to pick this up, please tell me (garnacho at #gtk+, etc) and I&#8217;ll try to help you through <a href='http://git.gnome.org/cgit/gtk+/?h=xi2'>the code</a>.</p>
<p>Likewise, non-X11 backends are completely untamed land, these need readapting to GdkDeviceManager and _gdk_windowing_* API changes, contributions there are more than welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/carlosg/2009/10/09/hp-stands-for-hijo-de-puta/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/carlosg/category/general/feed/ ) in 1.56073 seconds, on Feb 11th, 2012 at 1:13 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 11th, 2012 at 2:13 am UTC -->
