Whats coming in GTK+ 2.12
[Posted June 11, 2007 by cook]
From: |
| "Matthias Clasen" <matthias.clasen-AT-gmail.com> |
To: |
| devel-announce-list-AT-gnome.org |
Subject: |
| Whats coming in GTK+ 2.12 |
Date: |
| Thu, 7 Jun 2007 14:39:45 -0400 |
(this was the first part of my mini-series about 2.12; resending to
devel-announce-list to have the complete series there)
I thought it might be a good idea to anticipate the release announcement for
GTK+ 2.12 by writing a series of mails about some of the new features that will
appear in the next stable release. I hope that this inspires some
people to play
with the new stuff, so that we can
- find api holes and problems before they get frozen in the stable release
- get some feedback on the quality (or lack thereof) of the api docs
- inspire people to write examples or gtk-demo additions that show new stuff
I'll start with GDK:
gdk_threads_add_idle
gdk_threads_add_idle_full
gdk_threads_add_timeout
gdk_threads_add_timeout_full
Better support for thread-safe handling of idles and timeouts. This set
of functions avoids race conditions in the handling of user data passed
to a callback that is run in a different thread. All uses of callbacks in
GTK+ have been converted to these functions.
gdk_display_supports_composite
gdk_window_set_composited
gdk_window_set_opacity
Support for translucent toplevel windows and for compositing of subwindows.
The latter needs changes to cairo and the X Composite extension that are
still pending (hi keithp!). The motivation for the subwindow compositing
is the new panel applet api, but there are certainly other interesting
things that can be done with it.
gdk_x11_display_broadcast_startup_message
gdk_x11_display_get_startup_notification_id
gdk_notify_startup_complete_with_id
These functions expose more of the startup notification mechanism;
applications should normally have no need for them, they are added in
preparation for new high-level apis that are not there yet: session-management,
unique-application, desktop-file-execute, etc.
gdk_window_beep
Like gdk_display_beep, but specific to a window. XKB allows very general
configuration of this, it is e.g. possible to have the window frame blink
instead of an audible bell. GTK+ has become a lot more beep-happy recently,
since failed keynav now causes beeps.
gdk_pango_attr_emboss_color_new
The GDK pango renderer can now emboss text using a different color instead
of the previously hardcoded white. This is controlled by pango attributes.
--
devel-announce-list mailing list
devel-announce-list@gnome.org
http://mail.gnome.org/mailman/listinfo/devel-announce-list
Subject: Whats coming in GTK+ 2.12, continued
The second mail in this series is about new widget-level features
in GTK+ 2.12.
GtkScaleButton is a simple new widget, a button that
pops up a slider. GtkVolumeButton is a concrete subclass that
configures GtkScaleButton with icons and tooltips suitable for
a volume control, as used in many multimedia applications.
GtkRecentAction is an action that represent a recent-files list.
It can be used to populate a menu or a menutoolbutton.
The GtkRange family of widgets supports the display of
"fill levels" now. This feature is sometimes used to indicate
pre-buffering, e.g. when playing media streams over a slow
connection. This feature is controlled by the properties
GtkRange:fill-level, GtkRange:restrict-to-fill-level and
GtkRange:show-fill-level.
The progress cell renderer draws its progress bar using
the theme now, so they appear the same as in the progress
bar widget. It also supports "activity mode" (controlled
by the GtkCellRendererProgress:pulse property) and
can position the text non-centered, using the
GtkCellRendererProgress:text-xalign and
GtkCellRendererProgress:text-yalign properties.
GtkTextView can now accumulate margins that are specified
in tags (via GtkTextTag:accumulative-margins, and those
margins can be negative.
GtkTextMarks can be created without reference to a text
buffer, and can be added to and removed from buffers at
a later time. This makes it possible to derive and use
custom mark classes. See gtk_text_mark_new(),
gtk_text_buffer_add_mark().
The GtkNotebook API additions in 2.10 for tab DND have
been critizised for not being flexible enough; the numeric
GtkNotebook:group-id property has been superseded by
GtkNotebook:group, and the global
gtk_notebook_set_window_creation_hook() has been superseded
by a GtkNotebook::create-window signal. The DND code has also
been made more flexible to allow applications to e.g. accept
files being dropped on tabs, while still supporting tab DND.
The GtkEntry completion supports a new "inline-selection" mode
that is closer to what one expects in a browser location field.
It allows to cycle through the possible completions inside the
entry. See GtkEntryCompletion:inline-selection property.
GtkEntry can also be set up to scroll a containing widget
automatically if the cursor moves out of the visible area,
by means of gtk_entry_set_cursor_hadjustment().
GtkTreeView has two new properties, GtkTreeView:show-expanders
and GtkTreeView:level-indentation that allow to realize some
treeview styles that were not possible before.
--
devel-announce-list mailing list
devel-announce-list@gnome.org
http://mail.gnome.org/mailman/listinfo/devel-announce-list
Subject: Whats coming in GTK+ 2.12, part 3
Changes related to keyboard navigation and Drag-and-Drop:
Keyboard navigation has seen quite a bit of work this cycle;
with an eye towards consistent handling of keynav failures and
better support for platforms with no or very poor keyboards,
like the Maemo platform, or phones. Since much of this is
about adapting GTK+ to the platform it runs on, you'll see
a lot of settings in the following.
The display of accelerators and mnemonics can be turned
off using the gtk-enable-accels and gtk-enable-mnemonics
settings.
The gtk-keynav-cursor-only setting should be turned on
in environments without the Tab or Shift keys. If it is set,
GTK+ works hard to make everything reachable with just
the arrow keys.
The gtk-keynav-wrap-around controls the wrapping behaviour
of keynav in a number of widgets, e.g. menus and notebooks.
Stopping the cursor blinking in entries (e.g on the login
screen !) and text views during long periods of inactivity
helps to avoid context switches and save power. GTK+ has
had a gtk-cursor-blink setting which simply turns off blinking
for a long time. With 2.12, gtk-cursor-blink-timeout lets
you control how long the text cursor blinks.
Failed keyboard navigation and input errors (e.g. if the user
presses an invalid key) are handled consistently now, by
causing a beep. This can be controlled by the gtk-error-bell
setting. Widget implementations should use the functions
gtk_widget_error_bell() and gtk_widget_keynav_failed() to
participate in the consistent handling of keyboard navigation
and input errors.
When a Drag-and-Drop operation fails for some reason, GTK+
displays an animation moving the drag cursor back to the source
of the drag. In some situations (e.g. with notebook tab DND)
this animation is not appropriate, and the ::drag-failed
signal has been added to GtkWidget to allow handling failed
drags differently.
--
devel-announce-list mailing list
devel-announce-list@gnome.org
http://mail.gnome.org/mailman/listinfo/devel-announce-list
Subject: Whats coming in GTK+ 2.12, the end
I have certainly forgotten the one or other new feature,
but I'll stop for now. As I said in the beginning, please play
with this stuff, and tell us what you think !
Theming
There are a number of new style properties, mostly to allow
better emulation of the native look on Win32. Some of these
might be interesting to theme authors.
The GtkComboBox:arrow-size and GtkComboBox:shadow-type style
properties allow themes to control the size of the arrow
and the shadow around the box.
GtkScrolledWindow can place the scrollbars optionally inside
the bevels. This is controlled by the scrollbars-within-bevels
style property.
The gtk-alternative-sort-arrows setting controls if the down
arrow in a treeview sort column corresponds to the A-Z or
Z-A ordering. The Windows convention is different from the
GTK+ one for this.
For applications, it is sometimes preferable to pick an
alternative icon from the current icon theme, rather than the
original icon from an inherited icon theme. This can avoid
inconsistent looks when icons from different icon themes appear
next to each other. The GtkIconTheme API supports this now,
with the GTK_ICON_LOOKUP_GENERIC_FALLBACK lookup flag and
with the more general gtk_icon_theme_choose_icon() function.
New tooltips
2.12 brings a completely new tooltip implementation which
allows many things that were not possible before. Tooltips
can be placed on insensitive widgets and on treeviews.
They can contain rich markup, or even arbitrary widgets.
The API for this is surprisingly simple, it consists mostly
of the GtkWidget:tooltip-markup property (for simple
text-only tooltips) and the gtk_widget_set_tooltip_window()
function for more complex tooltips.
Miscellaneous other features
Toplevel windows can be made translucent (on a composited
desktop) by setting the GtkWindow:opacity property.
Page setups and print settings can be serialized to a file
and passed to the preview application.
--
devel-announce-list mailing list
devel-announce-list@gnome.org
http://mail.gnome.org/mailman/listinfo/devel-announce-list