fltk.core.fltk_version

FLTK Version Detection Module

This module provides functionality to detect and work with FLTK library version information. It can parse version data from the abi-version.h header file or fall back to querying fltk-config.

The FLTK ABI version format is 1xxyy where:

  • 1 is the major version
  • xx is the minor version (zero-padded)
  • yy is the patch version (zero-padded)

For example, FLTK 1.3.11 has ABI version 10311.

Authors

Dejan Lekić

License

BSD-3-Clause

Types 2

Enumeration of version detection sources.

ABI_HEADERVersion detected from abi-version.h header file
FLTK_CONFIGVersion detected from fltk-config command
UNKNOWNVersion could not be detected
structVersion

Holds detected FLTK version and ABI information.

This struct contains the parsed version components (major, minor, patch), the encoded ABI version number, and information about how the version was detected.

Fields
int majorMajor version number (e.g., 1 for FLTK 1.3.x)
int minorMinor version number (e.g., 3 for FLTK 1.3.x)
int patchPatch version number (e.g., 11 for FLTK 1.3.11)
int abiVersionEncoded ABI version in format 1xxyy.
VersionSource sourceSource from which the version was detected
Methods
string toString() constReturns a human-readable version string.
bool isValid() constChecks if the version was successfully detected.

Functions 7

fnint encodeVersion(int major, int minor, int patch)Encodes version components into FLTK ABI version format.
fnbool decodeVersion(int abiVersion, out int major, out int minor, out int patch)Decodes FLTK ABI version into version components.
fnbool tryParseAbiVersion(string content, out int abiVersion)Attempts to parse FLABIVERSION from header file content.
fnbool tryParseVersionString(string versionStr, out int major, out int minor, out int patch)Attempts to parse version string from fltk-config output.
fnVersion detectFltkVersion(string[] customHeaderPaths = [])Detects FLTK version from available sources.
fnint compareVersions(Version a, Version b)Compares two FLTK versions.
fnbool meetsMinimumVersion(Version ver, int minMajor, int minMinor, int minPatch)Checks if the detected FLTK version meets minimum requirements.

Variables 1

varstring[] DEFAULT_ABI_HEADER_PATHS

Default paths to search for abi-version.h header file.