Xfce Wiki

Sub domains
 

Vala Bindings

Xfce4 Vala provides bindings for the Xfce framework.

Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.

The automatic generated VAPI files are available in the vapi subdirectory, those are usually self-explanatory.

libxfce4util

The generated VAPI file covers these headers:

libxfce4util-config.h
xfce-generics.h
xfce-i18n.h
xfce-license.h
xfce-miscutils.h
xfce-posix-signal-handler.h
xfce-rc.h
xfce-resource.h
xfce-utf8.h

RC

  • Xfce.Rc: constructable class
    • new: xfce_rc_simple_open()
    • new_from_resource: xfce_rc_config_open()
    • destroy: xfce_rc_close()

Resource

xfce-resource.h excluded, custom VAPI.

  • Xfce.Resource: class with static methods
    • deprecate XfceMatchFunc, match_custom, pop_path, push_path
  • Xfce.ResourceType.*: XFCE_RESOURCE_TYPE_* enum

Signal Handling

xfce-posix-signal-handler.h excluded, custom VAPI.

  • Xfce.PosixSignalHandler: class with static methods
    • Xfce.PosixSignalHandler.Callback: callback for set_handler function

i18n

xfce-i18n.h excluded, custom VAPI.

  • Xfce.textdomain: xfce_textdomain
    • convenience function on top of the bindtextdomain and textdomain functions, all other related functions to libxfce4util/xfce-i18n.h are deprecated

Deprecated

  • Debug (xfce-debug.h)
    • Use GLib.debug instead, it prints the line number of the Vala source file
  • File Utilities (xfce-fileutils.h)
    • Xfce.mkdirhier: use GLib.mkdir_with_parents instead
  • Kiosk Mode (xfce-kiosk.h)
    • Xfconf provides possibility to lock capabilities (see perchannel-xml.txt)
    • Use Xfconf.Channel.is_property_locked instead

garcon

The generated VAPI file covers these headers:

garcon-config.h
garcon-environment.h
garcon-marshal.h
garcon-menu-directory.h
garcon-menu-element.h
garcon-menu.h
garcon-menu-item-cache.h
garcon-menu-item.h
garcon-menu-item-pool.h
garcon-menu-merger.h
garcon-menu-node.h
garcon-menu-parser.h
garcon-menu-separator.h
garcon-menu-tree-provider.h

Hide two methods requires_terminal() and supports_startup_notification(), they are handled as get/set properties and conflict with the getter method name.

xfconf

The generated VAPI file covers these headers:

xfconf-binding.h
xfconf-channel.h
xfconf-errors.h
xfconf.h

  • Custom VAPI for Xfconf.init in order to throw Xfconf.Error instead of GLib.Error
  • Xfconf.Property: class with static methods (bind, unbind)
  • Drop functions that take a va_list
  • Drop functions that take or return a GPtrArray
  • int16 GType is not implemented (source xfconf-types.h excluded)

libxfce4ui

The generated VAPI file covers these headers:

libxfce4ui-config.h
libxfce4ui-enum-types.h
xfce-dialogs.h
xfce-gdk-extensions.h
xfce-gtk-extensions.h
xfce-sm-client.h
xfce-spawn.h
xfce-titled-dialog.h

exo

The generated VAPI file covers these headers:

exo-binding.h
exo-cell-renderer-ellipsized-text.h
exo-cell-renderer-icon.h
exo-config.h
exo-enum-types.h
exo-execute.h
exo-gdk-pixbuf-extensions.h
exo-gobject-extensions.h
exo-gtk-extensions.h
exo-icon-bar.h
exo-icon-chooser-dialog.h
exo-icon-view.h
exo-job.h
exo-simple-job.h
exo-string.h
exo-toolbars-editor-dialog.h
exo-toolbars-editor.h
exo-toolbars-model.h
exo-toolbars-view.h
exo-tree-view.h
exo-wrap-table.h
exo-xsession-client.h

Static Classes

exo-gobject-extensions.h exo-gdk-pixbuf-extensions.h exo-gtk-extensions.h excluded, custom VAPI.

  • Exo.Extensions: class with static methods (exo_g_value_*, exo_gdk_pixbuf_*, exo_gtk_*)
    • Moved all related functions to extensions provided by exo (gobject, gdk-pixbuf, gtk) into this class

exo-execute.h excluded, custom VAPI.

  • Exo.Execute: class with static methods (exo_execute_*)

exo-string.h excluded, custom VAPI.

  • Exo.String: class with static methods (exo_str*)

Name Conflicts

  • Rename signal names duplicated with method names
    • exo_icon_view_item_activated() ⇒ exo_icon_view_activate_item()
    • ExoIconView::select_all ⇒ all_selected
    • ExoIconView::unselect_all ⇒ all_unselected
    • ExoToolbarsModel::get_item_data ⇒ item_data
    • ExoToolbarsModel::get_item_id ⇒ item_id
    • ExoToolbarsModel::get_item_type ⇒ item_type

Excluded

  • Utils (exo-utils.h)

libxfce4panel

The generated VAPI file covers these headers:

libxfce4panel-config.h
libxfce4panel-enums.h
libxfce4panel-enum-types.h
xfce-arrow-button.h
xfce-hvbox.h
xfce-panel-convenience.h
xfce-panel-image.h
xfce-panel-macros.h
xfce-panel-plugin.h
xfce-panel-plugin-provider.h

Excluded

  • Xfce 4.6 macros (xfce-panel-macros-46.h)