GTK for OLPC: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 32: Line 32:
</ul>
</ul>


A (nearly final) version of the patch (both for GtkEntry and GtkTreeView) is available [here http://www.manucornet.net/pub/olpc/cursor_blink_lifetime.diff].
A (nearly final) version of the patch (both for GtkEntry and GtkTreeView) is available [here http://www.manucornet.net/pub/olpc/enhancements/cursor_blink_lifetime.diff].


== Simulation Tools ==
== Simulation Tools ==

Revision as of 12:01, 9 July 2006

This is the wiki page for the "GTK+ for OLPC" project, as a "Summer of Code" project. The student is Manu Cornet, mentor is Federico Mena-Quintero. You can find the initial goals of the project on the OLPC Google Summer of Code page.

GTK theme/engine torturer and crash tester

This "gtk-theme-torturer" is an application to detect performance issues in GTK themes/engines. It does two things:

  • For each of the most common widget types (I'll add more very soon), it packs an instance of it in a container, and resizes/redraws it many, many times. You can set a "pain level" to determine the number of times widgets will get redrawn while scaling.
  • It takes each one of the gtk_paint_* functions (implemented by the engines themselves) and tries all possible parameters configurations, including unusual values to see if the engine crashes.

The current version of gtk-theme-torturer is [here http://www.manucornet.net/pub/olpc/gtk-theme-torturer/]. The first part (widget torturer) works fine. The second part works fine also, but not all the functions are tested yet, and I need to generate a detailed log to see what happened before the crash, if any.

Plans are to merge this app with Federico Mena Quintero's Widget Profiler in order to get a detailed analysis of the time that was necessary to allocate/map/redraw/etc. widgets.

Screenshots :

Torture screenshot.png

Torture screenshot2.png

Various enhancements

Cursor blinking

I began with this (probably quite simple to do). The purpose is to let the cursor blink for a few seconds, then just stay on and stop blinking (affects GtkEntry and GtkTextView).

This is done by :

  • Adding an XSetting called "gtk-cursor-blink-lifetime", which defaults to 5 seconds.
  • Adding a timeout with the corresponding lifetime each time the code asks the cursor to begin blinking. When the timeout is over, the cursor stays on.

A (nearly final) version of the patch (both for GtkEntry and GtkTreeView) is available [here http://www.manucornet.net/pub/olpc/enhancements/cursor_blink_lifetime.diff].

Simulation Tools

Right now : making tests with "Xephyr" to simulate the laptop's display.

GTK+ theme engine

Right now: learning how to write a GTK engine/theme. I'll probably begin by searching whether there's an existing theme close to what we want, and I can start from there. It seems that some people at RedHat are already working on a special theme for OLPC, I'll need to coordinate with them as soon as the "torturer" part is finished.