Version Information

Version Information — Variables and functions to check the Libxfce4ui version.

Functions

Types and Values

extern const guint libxfce4ui_major_version
extern const guint libxfce4ui_minor_version
extern const guint libxfce4ui_micro_version

Includes

#include <libxfce4ui/libxfce4ui.h>

Description

Libxfce4ui provides version information, primarily useful in configure checks for builds that have a configure script. Applications will not typically use the features described here.

Functions

libxfce4ui_check_version ()

const gchar *
libxfce4ui_check_version (guint required_major,
                          guint required_minor,
                          guint required_micro);

Checks that the libxfce4ui library in use is compatible with the given version. Generally you would pass in the constants LIBXFCE4UI_MAJOR_VERSION, LIBXFCE4UI_MINOR_VERSION and LIBXFCE4UI_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of

libxfce4ui the extension was

compiled against.

Example 1. Checking the runtime version of the Libxfce4ui library

const gchar *mismatch;
mismatch = libxfce4ui_check_version (LIBXFCE4UI_MAJOR_VERSION,
                                     LIBXFCE4UI_MINOR_VERSION,
                                     LIBXFCE4UI_MICRO_VERSION);
if (G_UNLIKELY (mismatch != NULL))
  g_error ("Version mismatch: %s", mismatch);

Parameters

required_major

the required major version.

 

required_minor

the required minor version.

 

required_micro

the required micro version.

 

Returns

NULL if the library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by the library and must not be freed or modified by the caller.


LIBXFCE4UI_MAJOR_VERSION

#define LIBXFCE4UI_MAJOR_VERSION (4)

Like libxfce4ui_major_version, but from the headers used at application compile time, rather than from the library linked against at application run time.


LIBXFCE4UI_MINOR_VERSION

#define LIBXFCE4UI_MINOR_VERSION (12)

Like libxfce4ui_minor_version, but from the headers used at application compile time, rather than from the library linked against at application run time.


LIBXFCE4UI_MICRO_VERSION

#define LIBXFCE4UI_MICRO_VERSION (1)

Like libxfce4ui_micro_version, but from the headers used at application compile time, rather than from the library linked against at application run time.


LIBXFCE4UI_CHECK_VERSION()

#define             LIBXFCE4UI_CHECK_VERSION(major,minor,micro)

Returns TRUE if the version of the Libxfce4ui header files is the same as or newer than the passed-in version.

Parameters

major

major version (e.g. 1 for version 1.2.3)

 

minor

minor version (e.g. 2 for version 1.2.3)

 

micro

micro version (e.g. 3 for version 1.2.3)

 

Types and Values

libxfce4ui_major_version

extern const guint libxfce4ui_major_version;

The major version number of the Libxfce4ui library (e.g. in version 1.2.3 this is 1).

This variable is in the library, so represents the Libxfce4ui library you have linked against. Contrast with the LIBXFCE4UI_MAJOR_VERSION macro, which represents the major version of the Libxfce4ui headers you have included.


libxfce4ui_minor_version

extern const guint libxfce4ui_minor_version;

The minor version number of the Libxfce4ui library (e.g. in version 1.2.3 this is 2).

This variable is in the library, so represents the Libxfce4ui library you have linked against. Contrast with the LIBXFCE4UI_MINOR_VERSION macro, which represents the minor version of the Libxfce4ui headers you have included.


libxfce4ui_micro_version

extern const guint libxfce4ui_micro_version;

The micro version number of the Libxfce4ui library (e.g. in version 1.2.3 this is 3).

This variable is in the library, so represents the Libxfce4ui library you have linked against. Contrast with the LIBXFCE4UI_MICRO_VERSION macro, which represents the micro version of the Libxfce4ui headers you have included.