Add wlr_version_get_{major,minor,micro}()

Can be used to detect wlroots version at runtime rather than
compile-time.
This commit is contained in:
tokyo4j 2025-07-07 04:36:56 +09:00 committed by Simon Ser
parent 0e9c6ddefa
commit ba931024a5
3 changed files with 19 additions and 0 deletions

View file

@ -9,4 +9,9 @@
#define WLR_VERSION_NUM ((WLR_VERSION_MAJOR << 16) | (WLR_VERSION_MINOR << 8) | WLR_VERSION_MICRO)
/* For runtime version detection */
int wlr_version_get_major(void);
int wlr_version_get_minor(void);
int wlr_version_get_micro(void);
#endif