Functions

check_version (required_major, required_minor, required_micro)

Details

Libxfce4windowingui.check_version(required_major, required_minor, required_micro)
Parameters:
  • required_major (int) – the required major version.

  • required_minor (int) – the required minor version.

  • required_micro (int) – the required micro version.

Returns:

None 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.

Return type:

str or None

Checks that the libxfce4windowingui library in use is compatible with the given version. Generally you would pass in the constants Libxfce4windowingui.MAJOR_VERSION, Libxfce4windowingui.MINOR_VERSION and Libxfce4windowingui.MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of libxfce4windowingui the extension was compiled against.

const gchar *mismatch;
mismatch = libxfce4windowingui_check_version(LIBXFCE4WINDOWINGUI_MAJOR_VERSION,
                                             LIBXFCE4WINDOWINGUI_MINOR_VERSION,
                                             LIBXFCE4WINDOWINGUI_MICRO_VERSION);
if (G_UNLIKELY(mismatch != NULL)) {
  g_error("Version mismatch: %s", mismatch);
}