Version Information

Version Information — Information about the garcon version in use.

Functions

#define GARCON_CHECK_VERSION()
const gchar * garcon_check_version ()
gchar * garcon_config_lookup ()
gchar ** garcon_config_build_paths ()

Types and Values

#define GARCON_MAJOR_VERSION
#define GARCON_MINOR_VERSION
#define GARCON_MICRO_VERSION
extern const guint garcon_major_version
extern const guint garcon_minor_version
extern const guint garcon_micro_version

Includes

#include <garcon/garcon.h>

Description

The garcon library provides version information, which could be used by developers to handle new API.

Functions

GARCON_CHECK_VERSION()

#define             GARCON_CHECK_VERSION(major, minor, micro)

Checks the version of the garcon library.

Parameters

major

the major version number.

 

minor

the minor version number.

 

micro

the micro version number.

 

Returns

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


garcon_check_version ()

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

Checks that the garcon library in use is compatible with the given version. Generally you would pass in the constants GARCON_MAJOR_VERSION, GARCON_MINOR_VERSION and GARCON_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of

garcon the application was

compiled against.

Example 1. Checking the runtime version of the garcon library

1
2
3
4
5
6
const gchar *mismatch;
mismatch = garcon_check_version (GARCON_VERSION_MAJOR,
                                 GARCON_VERSION_MINOR,
                                 GARCON_VERSION_MICRO);
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.


garcon_config_lookup ()

gchar *
garcon_config_lookup (const gchar *filename);

Looks for the filename in the users' config directory and then the system config directories.

Parameters

filename

relative filename of the config resource.

 

Returns

the absolute path to the first file in the search path, that matches filename or NULL if no such file or directory could be found.


garcon_config_build_paths ()

gchar **
garcon_config_build_paths (const gchar *filename);

Parameters

filename

name of .desktop file

 

Returns

.

[transfer full]

Types and Values

GARCON_MAJOR_VERSION

#define GARCON_MAJOR_VERSION 4

The major version number of the garcon library. Like garcon_major_version, but from the headers used at application compile time, rather than from the library linked against at application run time.


GARCON_MINOR_VERSION

#define GARCON_MINOR_VERSION 19

The minor version number of the garcon library. Like garcon_minor_version, but from the headers used at application compile time, rather than from the library linked against at application run time.


GARCON_MICRO_VERSION

#define GARCON_MICRO_VERSION 2

The micro version number of the garcon library. Like garcon_micro_version, but from the headers used at application compile time, rather than from the library linked against at application run time.


garcon_major_version

extern const guint garcon_major_version;

The major version number of the garcon library (e.g. in version 4.8.0 this is 4).

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


garcon_minor_version

extern const guint garcon_minor_version;

The minor version number of the garcon library (e.g. in version 4.8.0 this is 8).

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


garcon_micro_version

extern const guint garcon_micro_version;

The micro version number of the garcon library (e.g. in version 4.8.0 this is 0).

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