![]() |
![]() |
![]() |
xmlroff Reference Manual | |
---|---|---|---|---|
#define LIBFO_VERSION_MAJOR #define LIBFO_VERSION_MINOR #define LIBFO_VERSION_MICRO #define LIBFO_VERSION_STRING #define LIBFO_VERSION_EXTRA #define LIBFO_PIXELS_PER_INCH #define LIBFO_VERSION_ENCODE (major, minor, micro) #define LIBFO_VERSION #define LIBFO_VERSION_CHECK (major,minor,micro) int libfo_version (void); const char* libfo_version_string (void); const char* libfo_version_check (int required_major, int required_minor, int required_micro); int libfo_pixels_per_inch (void); enum LibfoModuleEnum; LibfoVersionInfo; const LibfoVersionInfo** libfo_version_get_info (void);
The capital-letter macros defined here can be used to check the version of libfo at compile-time, and to encode libfo versions into integers. The functions can be used to check the version of the linked libfo library at run-time.
#define LIBFO_VERSION_MAJOR 0
The major component of the version of libfo available at compile-time.
#define LIBFO_VERSION_MINOR 6
The minor component of the version of libfo available at compile-time.
#define LIBFO_VERSION_MICRO 2
The micro component of the version of libfo available at compile-time.
#define LIBFO_VERSION_STRING "0.6.2"
A string literal containing the version of libfo available at compile-time.
#define LIBFO_VERSION_EXTRA "-SVN541"
Extra compile-time version information string literal containing, e.g., the Subversion changeset number.
#define LIBFO_PIXELS_PER_INCH 96
Pixels per inch for use with graphics without intrinsic size.
#define LIBFO_VERSION_ENCODE(major, minor, micro)
This macro encodes the given libfo version into an integer. The
numbers returned by LIBFO_VERSION and libfo_version()
are encoded
using this macro. Two encoded version numbers can be compared as
integers.
|
the major component of the version number |
|
the minor component of the version number |
|
the micro component of the version number |
#define LIBFO_VERSION
The version of libfo available at compile-time, encoded using
LIBFO_VERSION_ENCODE()
.
#define LIBFO_VERSION_CHECK(major,minor,micro)
Checks that the version of libfo available at compile-time is not older than the provided version number.
|
the major component of the version number |
|
the minor component of the version number |
|
the micro component of the version number |
int libfo_version (void);
This is similar to the macro LIBFO_VERSION
except that it returns
the encoded version of libfo available at run-time, as opposed
to the version available at compile-time.
A version number can be encoded into an integer using
LIBFO_VERSION_ENCODE()
.
Returns : |
value: The encoded version of libfo library available at run time. |
const char* libfo_version_string (void);
This is similar to the macro LIBFO_VERSION_STRING
except that it
returns the version of libfo available at run-time, as opposed
to the version available at compile-time.
Returns : |
value: A string containing the version of libfo library available at run time. The returned string is owned by libfo and should not be modified or freed. |
const char* libfo_version_check (int required_major, int required_minor, int required_micro);
Checks that the libfo library in use is compatible with the
given version. Generally you would pass in the constants
LIBFO_VERSION_MAJOR
, LIBFO_VERSION_MINOR
, LIBFO_VERSION_MICRO
as the
three arguments to this function; that produces a check that the
library in use at run-time is compatible with the version of
libfo the application or module was compiled against.
Compatibility is defined by two things: first the version
of the running library is newer than the version
required_major.required_minor
.required_micro
. Second
the running library must be binary compatible with the
version required_major.required_minor
.required_micro
(same major version.)
For compile-time version checking use LIBFO_VERSION_CHECK()
.
|
the required major version. |
|
the required minor version. |
|
the required major version. |
Returns : |
NULL if the libfo library is compatible with the
given version, or a string describing the version mismatch. The
returned string is owned by libfo and should not be modified
or freed.
|
int libfo_pixels_per_inch (void);
This is similar to the macro LIBFO_PIXELS_PER_INCH
except that it
returns the encoded pixels per inch of libfo available at run-time,
as opposed to the pixels per inch available at compile-time.
Returns : |
value: The encoded pixels per inch of libfo library available at run time. |
typedef enum { LIBFO_MODULE_INVALID, LIBFO_MODULE_XSL_FORMATTER, LIBFO_MODULE_XSLT_PROCESSOR, LIBFO_MODULE_XML_DOC, LIBFO_MODULE_BACKEND, LIBFO_MODULE_PANGO } LibfoModuleEnum;
The type of a module of libfo.
typedef struct { LibfoModuleEnum module; const gchar *nick; const gchar *name; gint compiled; const gchar *compiled_string; gint runtime; const gchar *runtime_string; } LibfoVersionInfo;
Collected version information about a component of libfo.
Other than nick
, one or more of the parts of the LibfoVersionInfo
may be 0 or NULL
if the component is unable to report that
information.
LibfoModuleEnum |
Type of the module |
const gchar * |
Nickname |
const gchar * |
FoObject type name, e.g., FoDocCairo |
gint |
Compiled version number |
const gchar * |
Compiled version number string |
gint |
Runtime version number |
const gchar * |
Runtime version number string |
const LibfoVersionInfo** libfo_version_get_info (void);
Gets the LibfoVersionInfo of libfo components.
Returns : |
Array of pointers to LibfoVersionInfo. The last item is NULL .
|