Čo je nové pre vývojárov

Nasledujúce zmeny sú dôležité pre vývojárov používajúcich Vývojársku platformu GNOME 3.2. Ak vás zmeny pre vývojárov nazaujímajú, prejdite ďalej na Section 5 ― Internacionalizácia.

GNOME 3.2 obsahuje najnovšie vydanie Vývojárskej platformy GNOME. Táto pozostáva z množiny knižníc so stabilným API a ABI, dostupných pod licenciou GNU LGPL, ktoré môžu byť použité na vývoj multiplatformových aplikácií.

Pre informácie o vývoji s GNOME navštívte, prosím, Vývojárske centrum GNOME.

4.1. GLib 2.30

GLib, nízkoúrovňová úžitková softvérová knižnica GNOME, zaznamenala rozmanité zdokonalenia:

  • GApplication teraz môžete použiť pre nejednoznačné aplikácie.
  • GLib teraz inštaluje oddelený hlavičkový súbor pre API špecifické pre UNIX: glib-unix.h. Medzi inými tento poskytuje zdroj Unixových signálov pre hlavnú programovú slučku.
  • GDBus podporuje vzor 'object manager' s množstvom nových rozhraní.
  • GDBus teraz má generátor kódu: gdbus-codegen.
  • Atomické operácie boli prepísané, takže využívajú zabudovania gcc; volania s explicitnými pretypovaniami môžu robiť problémy.
  • Pridané boli atomické operácie s ukazovateľmi, vrátane uzamykania bitov na umiestneniach veľkosti ukazovateľov.
  • Politika jednotiek sa zmenila a teraz uprednostňuje SI jednotky; g_format_size_for_display je zastaraná v prospech g_format_size.
  • Pridaná bola podpora pre digesty HMAC: GHmac.
  • An interface for certificate and key lookup has been added: GTlsDatabase. An implementation is provided by glib-networking.

4.2. GTK+ 3.2

GTK+ 3.2 is the latest release of the GTK+ toolkit, which is at the heart of GNOME. GTK+ 3.2 includes new features for developers, as well as extensive bug fixes.

  • Entries can now contain hints. See gtk_entry_set_placeholder_text.
  • Many more widgets support height-for-width geometry management. It is important to set reasonable sizes on labels and check window sizes.
  • New widgets:
    • GtkLockButton for privileged operations, as seen in some control-center panels.
    • GtkOverlay for floating controls over a content area, as seen in web browsers.
    • GtkFontChooserDialog, a new font selection dialog.
  • Much improved CSS theming support, including style classes for primary and inline toolbars.
  • The HTML backend Broadway, which renders in a browser by using websockets, has been improved but is still experimental. This potentially allows you to either run your own apps on your server and access it from anywhere, or to put it on a public server that spawns a new instance of the application for every user. Note that this requires compiling GTK+ with --enable-x11-backend --enable-broadway-backend and environment variable GDK_BACKEND at runtime.
  • Support for reftests has been added to make it easier to write test cases.
  • Udiali sa rôzne zlepšenia výkonu GTK+ v oblasti kešovania požiadaviek na veľkosť, čítania informácií o štýloch CSS a počítania veľkosti ovládacích prvkov.

4.3. Clutter 1.8

Grafická knižnica GNOME pre hardvérovo akcelerované používateľské rozhrania Clutter poskytuje nasledujúce vylepšenia:

  • New actions, such as ClutterGestureAction for writing gesture recognizers, ClutterSwipeAction for detecting swipe gestures, ClutterDropAction for making actors drop targets when using ClutterDragAction, and long-press support for ClutterClickAction.
  • Prechody ClutterState môžu byť viazané na signály objektu pri vytváraní scény v ClutterScript.
  • Vylepšená integrácia vykresľovania Cairo.
  • Cogl, rozhranie programovania GPU používané v Clutter, je vystavené ako samostatná knižnica.

4.4. Použitie zastaraných knižníc

Bol zaznamenaný ďalší pokrok v neustálej práci nahradzovania prežitých technológií schopnejšími náhradami.

  • GConf teraz predvolene používa D-Bus, a tak už nevyžaduje ORBit2. Následkom toho je, že zastarané knižnice ORBit2 a libIDL boli z GNOME odstránené.
  • GNOME core modules now only depend on introspection-based Python bindings (pygobject-3) and hence pygtk, gnome-python and gnome-python-desktop are not required anymore.
  • Several applications (for example Accerciser, Dasher, GHex, the graphical debugger Nemiver, and the passwords and encryption keys management tool Seahorse) now use GSettings as storage backend instead of GConf.
  • Several packages, such as the Epiphany web browser, have been converted from using dbus-glib to GDBus and from libunique to G(tk)Application.

4.5. Jednoduchšie zostavenie GNOME pomocou JHBuild

GNOME's build tool JHBuild does not build a module anymore if the version installed on your system is recent enough. This is controlled by the configuration option partial_build and it is enabled by default. The command jhbuild sysdeps lists which system modules have been found as well as the modules that are going to be build.

Ak začnete zostavovať GNOME od základu pomocou súčasnej distribúcie, môže to znamenať vypustenie viac ako 50 modulov zo zoznamu na kompiláciu.

4.6. Rôzne vývojárske aktualizácie

Ostatné vylepšenia GNOME platformy v GNOME 3.2 zahŕňajú:

  • The classic (static) Python bindings were removed for PyGObject 3.0 and only dynamic Python bindings are provided (via introspection). PyGObject 2 and 3 are parallel-installable as introspection is turned off by default in the PyGObject 2 packages. Information on how to port applications from PyGObject 2 to PyGObject 3 is available.
  • Tracker version 0.12 provides support for Firefox ≥ 4.0, Thunderbird ≥ 5.0, MeeGoTouch, several additional SPARQL parameters, extracting information from EPub files, and local XDG directories for desktop files.
  • NetworkManager version 0.9 provides introspection support and a simplified D-Bus API. Information how to port applications from NetworkManager 0.8 to 0.9 is available.
  • As part of the aforementioned effort to use and promote PKCS#11 as glue between encryption libraries, various parts of gnome-keyring have been split into desktop-independent libraries.
  • GtkSourceView now supports syntax highlighting of Markdown and Standard ML files.
  • Evolution-Data-Server received many introspection support fixes.
  • libfolks now includes an Evolution-Data-Server backend, which is used by the new Contacts application.
  • Among the tools used for documentation processing, gnome-doc-utils and xml2po are slowly being replaced by yelp-tools and itstool. yelp-xsl includes a few experimental Mallard extensions, such as conditional processing and dynamic glossaries.