# HG changeset patch
# Node ID 6a187f026d99
# Parent  468acf3b4723
diff --git a/gplugin-gtk4/gplugin-gtk-plugin-closures.h b/gplugin-gtk4/gplugin-gtk-plugin-closures.h
--- a/gplugin-gtk4/gplugin-gtk-plugin-closures.h
+++ b/gplugin-gtk4/gplugin-gtk-plugin-closures.h
@@ -29,6 +29,8 @@
 
 #include <gplugin.h>
 
+#include "gplugin-gtk-version.h"
+
 G_BEGIN_DECLS
 
 G_GNUC_INTERNAL
diff --git a/gplugin-gtk4/gplugin-gtk-plugin-page.h b/gplugin-gtk4/gplugin-gtk-plugin-page.h
--- a/gplugin-gtk4/gplugin-gtk-plugin-page.h
+++ b/gplugin-gtk4/gplugin-gtk-plugin-page.h
@@ -30,11 +30,13 @@
 
 #include <gplugin.h>
 
+#include "gplugin-gtk-version.h"
+
 G_BEGIN_DECLS
 
 #define GPLUGIN_GTK_TYPE_PLUGIN_PAGE (gplugin_gtk_plugin_page_get_type())
 
-GPLUGIN_AVAILABLE_IN_0_39
+GPLUGIN_GTK_AVAILABLE_IN_0_39
 G_DECLARE_FINAL_TYPE(
 	GPluginGtkPluginPage,
 	gplugin_gtk_plugin_page,
@@ -42,21 +44,21 @@
 	PLUGIN_PAGE,
 	GtkBox)
 
-GPLUGIN_AVAILABLE_IN_0_39
+GPLUGIN_GTK_AVAILABLE_IN_0_39
 GtkWidget *gplugin_gtk_plugin_page_new(void);
 
-GPLUGIN_AVAILABLE_IN_0_39
+GPLUGIN_GTK_AVAILABLE_IN_0_39
 void gplugin_gtk_plugin_page_set_plugin(
 	GPluginGtkPluginPage *page,
 	GPluginPlugin *plugin);
-GPLUGIN_AVAILABLE_IN_0_39
+GPLUGIN_GTK_AVAILABLE_IN_0_39
 GPluginPlugin *gplugin_gtk_plugin_page_get_plugin(GPluginGtkPluginPage *page);
 
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 void gplugin_gtk_plugin_page_set_settings_backend(
 	GPluginGtkPluginPage *page,
 	gpointer backend);
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 gpointer gplugin_gtk_plugin_page_get_settings_backend(
 	GPluginGtkPluginPage *page);
 
diff --git a/gplugin-gtk4/gplugin-gtk-plugin-row.h b/gplugin-gtk4/gplugin-gtk-plugin-row.h
--- a/gplugin-gtk4/gplugin-gtk-plugin-row.h
+++ b/gplugin-gtk4/gplugin-gtk-plugin-row.h
@@ -30,11 +30,13 @@
 
 #include <gplugin.h>
 
+#include "gplugin-gtk-version.h"
+
 G_BEGIN_DECLS
 
 #define GPLUGIN_GTK_TYPE_PLUGIN_ROW (gplugin_gtk_plugin_row_get_type())
 
-GPLUGIN_AVAILABLE_IN_0_38
+GPLUGIN_GTK_AVAILABLE_IN_0_38
 G_DECLARE_FINAL_TYPE(
 	GPluginGtkPluginRow,
 	gplugin_gtk_plugin_row,
@@ -42,18 +44,18 @@
 	PLUGIN_ROW,
 	GtkListBoxRow)
 
-GPLUGIN_AVAILABLE_IN_0_38
+GPLUGIN_GTK_AVAILABLE_IN_0_38
 GtkWidget *gplugin_gtk_plugin_row_new(void);
 
-GPLUGIN_AVAILABLE_IN_0_38
+GPLUGIN_GTK_AVAILABLE_IN_0_38
 void gplugin_gtk_plugin_row_set_plugin(
 	GPluginGtkPluginRow *row,
 	GPluginPlugin *plugin);
-GPLUGIN_AVAILABLE_IN_0_38
+GPLUGIN_GTK_AVAILABLE_IN_0_38
 GPluginPlugin *gplugin_gtk_plugin_row_get_plugin(GPluginGtkPluginRow *row);
-GPLUGIN_AVAILABLE_IN_0_38
+GPLUGIN_GTK_AVAILABLE_IN_0_38
 gchar *gplugin_gtk_plugin_row_get_sort_key(GPluginGtkPluginRow *row);
-GPLUGIN_AVAILABLE_IN_0_38
+GPLUGIN_GTK_AVAILABLE_IN_0_38
 gboolean gplugin_gtk_plugin_row_matches_search(
 	GPluginGtkPluginRow *row,
 	const gchar *text);
diff --git a/gplugin-gtk4/gplugin-gtk-plugin-settings-list.h b/gplugin-gtk4/gplugin-gtk-plugin-settings-list.h
--- a/gplugin-gtk4/gplugin-gtk-plugin-settings-list.h
+++ b/gplugin-gtk4/gplugin-gtk-plugin-settings-list.h
@@ -30,12 +30,14 @@
 
 #include <gplugin.h>
 
+#include "gplugin-gtk-version.h"
+
 G_BEGIN_DECLS
 
 #define GPLUGIN_GTK_TYPE_PLUGIN_SETTINGS_LIST \
 	(gplugin_gtk_plugin_settings_list_get_type())
 
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 G_DECLARE_FINAL_TYPE(
 	GPluginGtkPluginSettingsList,
 	gplugin_gtk_plugin_settings_list,
@@ -43,14 +45,14 @@
 	PLUGIN_SETTINGS_LIST,
 	GtkBox)
 
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 GtkWidget *gplugin_gtk_plugin_settings_list_new(void);
 
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 void gplugin_gtk_plugin_settings_list_set_settings(
 	GPluginGtkPluginSettingsList *list,
 	GSettings *settings);
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 GSettings *gplugin_gtk_plugin_settings_list_get_settings(
 	GPluginGtkPluginSettingsList *list);
 
diff --git a/gplugin-gtk4/gplugin-gtk-view.h b/gplugin-gtk4/gplugin-gtk-view.h
--- a/gplugin-gtk4/gplugin-gtk-view.h
+++ b/gplugin-gtk4/gplugin-gtk-view.h
@@ -30,11 +30,13 @@
 
 #include <gplugin.h>
 
+#include "gplugin-gtk-version.h"
+
 G_BEGIN_DECLS
 
 #define GPLUGIN_GTK_TYPE_VIEW (gplugin_gtk_view_get_type())
 
-GPLUGIN_AVAILABLE_IN_ALL
+GPLUGIN_GTK_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE(
 	GPluginGtkView,
 	gplugin_gtk_view,
@@ -42,33 +44,33 @@
 	VIEW,
 	GtkBox)
 
-GPLUGIN_AVAILABLE_IN_ALL
+GPLUGIN_GTK_AVAILABLE_IN_ALL
 GtkWidget *gplugin_gtk_view_new(void);
 
-GPLUGIN_AVAILABLE_IN_ALL
+GPLUGIN_GTK_AVAILABLE_IN_ALL
 void gplugin_gtk_view_set_manager(
 	GPluginGtkView *view,
 	GPluginManager *manager);
-GPLUGIN_AVAILABLE_IN_ALL
+GPLUGIN_GTK_AVAILABLE_IN_ALL
 GPluginManager *gplugin_gtk_view_get_manager(GPluginGtkView *view);
 
-GPLUGIN_AVAILABLE_IN_ALL
+GPLUGIN_GTK_AVAILABLE_IN_ALL
 void gplugin_gtk_view_set_show_internal(
 	GPluginGtkView *view,
 	gboolean show_internal);
-GPLUGIN_AVAILABLE_IN_ALL
+GPLUGIN_GTK_AVAILABLE_IN_ALL
 gboolean gplugin_gtk_view_get_show_internal(GPluginGtkView *view);
 
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 void gplugin_gtk_view_set_settings_backend(
 	GPluginGtkView *view,
 	gpointer backend);
-GPLUGIN_AVAILABLE_IN_0_40
+GPLUGIN_GTK_AVAILABLE_IN_0_40
 gpointer gplugin_gtk_view_get_settings_backend(GPluginGtkView *view);
 
-GPLUGIN_AVAILABLE_IN_0_39
+GPLUGIN_GTK_AVAILABLE_IN_0_39
 void gplugin_gtk_view_show_overview(GPluginGtkView *view);
-GPLUGIN_AVAILABLE_IN_0_39
+GPLUGIN_GTK_AVAILABLE_IN_0_39
 void gplugin_gtk_view_show_plugin(GPluginGtkView *view, GPluginPlugin *plugin);
 
 G_END_DECLS
diff --git a/gplugin-gtk4/meson.build b/gplugin-gtk4/meson.build
--- a/gplugin-gtk4/meson.build
+++ b/gplugin-gtk4/meson.build
@@ -6,13 +6,21 @@
 ###############################################################################
 # Build Info
 ###############################################################################
+GPLUGIN_GTK4_LIBRARY_VERSION = '0.1.0'
 
-GPLUGIN_GTK4_LIBRARY_VERSION = '0.1.0'
+gtk_version_conf = configuration_data()
+gtk_version_conf.set('GPLUGIN_GTK_MAJOR_VERSION', GPLUGIN_MAJOR_VERSION)
+gtk_version_conf.set('GPLUGIN_GTK_MINOR_VERSION', GPLUGIN_MINOR_VERSION)
+gtk_version_conf.set('GPLUGIN_GTK_MICRO_VERSION', GPLUGIN_MICRO_VERSION)
+gtk_version_conf.set('GPLUGIN_GTK_EXTRA_VERSION', GPLUGIN_EXTRA_VERSION)
+gtk_version_conf.set('GPLUGIN_GTK_VERSION', meson.project_version())
+
 
 GPLUGIN_GTK4_SOURCES = [
 	'gplugin-gtk-plugin-page.c',
 	'gplugin-gtk-plugin-row.c',
 	'gplugin-gtk-plugin-settings-list.c',
+	'gplugin-gtk-version.c',
 	'gplugin-gtk-view.c',
 ]
 
@@ -20,6 +28,7 @@
 	'gplugin-gtk-plugin-page.h',
 	'gplugin-gtk-plugin-row.h',
 	'gplugin-gtk-plugin-settings-list.h',
+	'gplugin-gtk-version.h',
 	'gplugin-gtk-view.h',
 ]
 
@@ -43,8 +52,17 @@
 ###############################################################################
 # Configure Files
 ###############################################################################
+gplugin_gtk4_version_h = configure_file(
+	input : 'gplugin-gtk-version-defs.h.in',
+	output : 'gplugin-gtk-version-defs.h',
+	configuration : gtk_version_conf,
+	install : true,
+	install_dir : get_option('includedir') / 'gplugin-gtk4-1.0' / 'gplugin-gtk4'
+)
+GPLUGIN_GTK4_PUBLIC_BUILT_HEADERS += [gplugin_gtk4_version_h]
+
 GPLUGIN_GTK4_H_INCLUDES = []
-foreach header : GPLUGIN_GTK4_HEADERS
+foreach header : GPLUGIN_GTK4_HEADERS + ['gplugin-gtk-version-defs.h']
 	GPLUGIN_GTK4_H_INCLUDES += f'#include <gplugin-gtk4/@header@>'
 endforeach
 
@@ -69,6 +87,8 @@
 ###############################################################################
 # Library Target
 ###############################################################################
+gplugin_gtk4_inc = include_directories('.')
+
 gplugin_gtk4 = library('gplugin-gtk4',
 	GPLUGIN_GTK4_SOURCES,
 	GPLUGIN_GTK4_HEADERS,
@@ -78,14 +98,12 @@
 	GPLUGIN_GTK4_PUBLIC_BUILT_HEADERS,
 	gplugin_gtk4_resources,
 	c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-Gtk"'],
-	include_directories : toplevel_inc,
+	include_directories : [toplevel_inc, gplugin_gtk4_inc],
 	dependencies : [gplugin_dep, GTK4],
 	version : GPLUGIN_GTK4_LIBRARY_VERSION,
 	install : true
 )
 
-gplugin_gtk4_inc = include_directories('.')
-
 pkgconfig.generate(
 	gplugin_gtk4,
 	name : 'gplugin-gtk4',
diff --git a/gplugin/gplugin-version-defs.h.in b/gplugin-gtk4/gplugin-gtk-version-defs.h.in
copy from gplugin/gplugin-version-defs.h.in
copy to gplugin-gtk4/gplugin-gtk-version-defs.h.in
--- a/gplugin/gplugin-version-defs.h.in
+++ b/gplugin-gtk4/gplugin-gtk-version-defs.h.in
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
+ * Copyright (C) 2011-2023 Gary Kramlich <grim@reaperworld.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,18 +15,18 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
-#error "only <gplugin.h> may be included directly"
+#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_GTK_COMPILATION)
+#error "only <gplugin-gtk.h> may be included directly"
 #endif
 
-#ifndef GPLUGIN_VERSION_DEFS_H
-#define GPLUGIN_VERSION_DEFS_H
+#ifndef GPLUGIN_GTK_VERSION_DEFS_H
+#define GPLUGIN_GTK_VERSION_DEFS_H
 
-#define GPLUGIN_MAJOR_VERSION (@GPLUGIN_MAJOR_VERSION@)
-#define GPLUGIN_MINOR_VERSION (@GPLUGIN_MINOR_VERSION@)
-#define GPLUGIN_MICRO_VERSION (@GPLUGIN_MICRO_VERSION@)
-#define GPLUGIN_EXTRA_VERSION "@GPLUGIN_EXTRA_VERSION@"
+#define GPLUGIN_GTK_MAJOR_VERSION (@GPLUGIN_GTK_MAJOR_VERSION@)
+#define GPLUGIN_GTK_MINOR_VERSION (@GPLUGIN_GTK_MINOR_VERSION@)
+#define GPLUGIN_GTK_MICRO_VERSION (@GPLUGIN_GTK_MICRO_VERSION@)
+#define GPLUGIN_GTK_EXTRA_VERSION "@GPLUGIN_GTK_EXTRA_VERSION@"
 
-#define GPLUGIN_VERSION       "@GPLUGIN_VERSION@"
+#define GPLUGIN_GTK_VERSION "@GPLUGIN_GTK_VERSION@"
 
-#endif /* GPLUGIN_VERSION_DEFS_H */
+#endif /* GPLUGIN_GTK_VERSION_DEFS_H */
diff --git a/gplugin/gplugin-version.h b/gplugin-gtk4/gplugin-gtk-version.h
copy from gplugin/gplugin-version.h
copy to gplugin-gtk4/gplugin-gtk-version.h
--- a/gplugin/gplugin-version.h
+++ b/gplugin-gtk4/gplugin-gtk-version.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
+ * Copyright (C) 2011-2023 Gary Kramlich <grim@reaperworld.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,16 +15,16 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#if !defined(GPLUGIN_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_COMPILATION)
-#error "only <gplugin.h> may be included directly"
+#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && !defined(GPLUGIN_GTK_COMPILATION)
+#error "only <gplugin-gtk.h> may be included directly"
 #endif
 
-#ifndef GPLUGIN_VERSION_H
-#define GPLUGIN_VERSION_H
+#ifndef GPLUGIN_GTK_VERSION_H
+#define GPLUGIN_GTK_VERSION_H
 
 #include <glib.h>
 
-#include <gplugin/gplugin-version-defs.h>
+#include "gplugin-gtk-version-defs.h"
 
 /* clang-format tries to remove the space after 'if', which confuses
  * gobject-introspection, so turn it off temporarily. */
@@ -32,282 +32,279 @@
 #if (defined(_WIN32) || defined(__CYGWIN__)) && \
 	!defined(GPLUGIN_STATIC_COMPILATION)
 /* clang-format on */
-#define _GPLUGIN_EXPORT __declspec(dllexport)
-#define _GPLUGIN_IMPORT __declspec(dllimport)
+#define _GPLUGIN_GTK_EXPORT __declspec(dllexport)
+#define _GPLUGIN_GTK_IMPORT __declspec(dllimport)
 #elif __GNUC__ >= 4
-#define _GPLUGIN_EXPORT __attribute__((visibility("default")))
-#define _GPLUGIN_IMPORT
+#define _GPLUGIN_GTK_EXPORT __attribute__((visibility("default")))
+#define _GPLUGIN_GTK_IMPORT
 #else
-#define _GPLUGIN_EXPORT
-#define _GPLUGIN_IMPORT
+#define _GPLUGIN_GTK_EXPORT
+#define _GPLUGIN_GTK_IMPORT
 #endif
-#ifdef GPLUGIN_COMPILATION
-#define _GPLUGIN_API _GPLUGIN_EXPORT
+#ifdef GPLUGIN_GTK_COMPILATION
+#define _GPLUGIN_GTK_API _GPLUGIN_GTK_EXPORT
 #else
-#define _GPLUGIN_API _GPLUGIN_IMPORT
+#define _GPLUGIN_GTK_API _GPLUGIN_GTK_IMPORT
 #endif
 
-#define _GPLUGIN_EXTERN _GPLUGIN_API extern
+#define _GPLUGIN_GTK_EXTERN _GPLUGIN_GTK_API extern
 
-#ifdef GPLUGIN_DISABLE_DEPRECATION_WARNINGS
-#define GPLUGIN_DEPRECATED _GPLUGIN_EXTERN
-#define GPLUGIN_DEPRECATED_FOR(f) _GPLUGIN_EXTERN
-#define GPLUGIN_UNAVAILABLE(maj, min) _GPLUGIN_EXTERN
-#define GPLUGIN_UNAVAILABLE_STATIC_INLINE(maj, min)
-#define GPLUGIN_UNAVAILABLE_TYPE(maj, min)
+#ifdef GPLUGIN_GTK_DISABLE_DEPRECATION_WARNINGS
+#define GPLUGIN_GTK_DEPRECATED _GPLUGIN_GTK_EXTERN
+#define GPLUGIN_GTK_DEPRECATED_FOR(f) _GPLUGIN_GTK_EXTERN
+#define GPLUGIN_GTK_UNAVAILABLE(maj, min) _GPLUGIN_GTK_EXTERN
+#define GPLUGIN_GTK_UNAVAILABLE_STATIC_INLINE(maj, min)
+#define GPLUGIN_GTK_UNAVAILABLE_TYPE(maj, min)
 #else
-#define GPLUGIN_DEPRECATED G_DEPRECATED _GPLUGIN_EXTERN
-#define GPLUGIN_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GPLUGIN_EXTERN
-#define GPLUGIN_UNAVAILABLE(maj, min) G_UNAVAILABLE(maj, min) _GPLUGIN_EXTERN
-#define GPLUGIN_UNAVAILABLE_STATIC_INLINE(maj, min) G_UNAVAILABLE(maj, min)
-#define GPLUGIN_UNAVAILABLE_TYPE(maj, min) G_UNAVAILABLE(maj, min)
+#define GPLUGIN_GTK_DEPRECATED G_DEPRECATED _GPLUGIN_GTK_EXTERN
+#define GPLUGIN_GTK_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GPLUGIN_GTK_EXTERN
+#define GPLUGIN_GTK_UNAVAILABLE(maj, min) G_UNAVAILABLE(maj, min) _GPLUGIN_GTK_EXTERN
+#define GPLUGIN_GTK_UNAVAILABLE_STATIC_INLINE(maj, min) G_UNAVAILABLE(maj, min)
+#define GPLUGIN_GTK_UNAVAILABLE_TYPE(maj, min) G_UNAVAILABLE(maj, min)
 #endif
 
 /**
- * GPLUGIN_VERSION_CUR_STABLE:
+ * GPLUGIN_GTK_VERSION_CUR_STABLE:
  *
- * A macro that evaluates to the current stable version of GPlugin, in a format
- * that can be used by the C pre-processor.
+ * A macro that evaluates to the current stable version of GPlugin-Gtk, in a
+ * format that can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_CUR_STABLE \
-	(G_ENCODE_VERSION(GPLUGIN_MAJOR_VERSION, GPLUGIN_MINOR_VERSION))
+#define GPLUGIN_GTK_VERSION_CUR_STABLE \
+	(G_ENCODE_VERSION(GPLUGIN_GTK_MAJOR_VERSION, GPLUGIN_GTK_MINOR_VERSION))
 
-/* If the package sets GPLUGIN_VERSION_MIN_REQUIRED to some future
- * GPLUGIN_VERSION_X_Y value that we don't know about, it will compare as 0 in
+/* If the package sets GPLUGIN_GTK_VERSION_MIN_REQUIRED to some future
+ * GPLUGIN_GTK_VERSION_X_Y value that we don't know about, it will compare as 0 in
  * preprocessor tests.
  */
-#ifndef GPLUGIN_VERSION_MIN_REQUIRED
-#define GPLUGIN_VERSION_MIN_REQUIRED (GPLUGIN_VERSION_CUR_STABLE)
-#elif GPLUGIN_VERSION_MIN_REQUIRED == 0
-#undef GPLUGIN_VERSION_MIN_REQUIRED
-#define GPLUGIN_VERSION_MIN_REQUIRED (GPLUGIN_VERSION_CUR_STABLE + 1)
-#endif /* GPLUGIN_VERSION_MIN_REQUIRED */
+#ifndef GPLUGIN_GTK_VERSION_MIN_REQUIRED
+#define GPLUGIN_GTK_VERSION_MIN_REQUIRED (GPLUGIN_GTK_VERSION_CUR_STABLE)
+#elif GPLUGIN_GTK_VERSION_MIN_REQUIRED == 0
+#undef GPLUGIN_GTK_VERSION_MIN_REQUIRED
+#define GPLUGIN_GTK_VERSION_MIN_REQUIRED (GPLUGIN_GTK_VERSION_CUR_STABLE + 1)
+#endif /* GPLUGIN_GTK_VERSION_MIN_REQUIRED */
 
-#if !defined(GPLUGIN_VERSION_MAX_ALLOWED) || (GPLUGIN_VERSION_MAX_ALLOWED == 0)
-#undef GPLUGIN_VERSION_MAX_ALLOWED
-#define GPLUGIN_VERSION_MAX_ALLOWED (GPLUGIN_VERSION_CUR_STABLE)
-#endif /* GPLUGIN_VERSION_MAX_ALLOWED */
+#if !defined(GPLUGIN_GTK_VERSION_MAX_ALLOWED) || (GPLUGIN_GTK_VERSION_MAX_ALLOWED == 0)
+#undef GPLUGIN_GTK_VERSION_MAX_ALLOWED
+#define GPLUGIN_GTK_VERSION_MAX_ALLOWED (GPLUGIN_GTK_VERSION_CUR_STABLE)
+#endif /* GPLUGIN_GTK_VERSION_MAX_ALLOWED */
 
 /* sanity checks */
-#if GPLUGIN_VERSION_MIN_REQUIRED > GPLUGIN_VERSION_CUR_STABLE
-#error "GPLUGIN_VERSION_MIN_REQUIRED must be <= GPLUGIN_VERSION_CUR_STABLE"
+#if GPLUGIN_GTK_VERSION_MIN_REQUIRED > GPLUGIN_GTK_VERSION_CUR_STABLE
+#error "GPLUGIN_GTK_VERSION_MIN_REQUIRED must be <= GPLUGIN_GTK_VERSION_CUR_STABLE"
 #endif
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_MIN_REQUIRED
-#error "GPLUGIN_VERSION_MAX_ALLOWED must be >= GPLUGIN_VERSION_MIN_REQUIRED"
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_MIN_REQUIRED
+#error "GPLUGIN_GTK_VERSION_MAX_ALLOWED must be >= GPLUGIN_GTK_VERSION_MIN_REQUIRED"
 #endif
-#if GPLUGIN_VERSION_MIN_REQUIRED < G_ENCODE_VERSION(0, 38)
-#error "GPLUGIN_VERSION_MIN_REQUIRED must be >= GPLUGIN_VERSION_0_38"
+#if GPLUGIN_GTK_VERSION_MIN_REQUIRED < G_ENCODE_VERSION(0, 38)
+#error "GPLUGIN_GTK_VERSION_MIN_REQUIRED must be >= GPLUGIN_GTK_VERSION_0_38"
 #endif
 
-#define GPLUGIN_AVAILABLE_IN_ALL _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_ALL _GPLUGIN_GTK_EXTERN
 
 /**
- * GPLUGIN_VERSION_0_31:
+ * GPLUGIN_GTK_VERSION_0_31:
  *
- * A macro that evaluates to the 0.31 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.31 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_31 (G_ENCODE_VERSION(0, 31))
+#define GPLUGIN_GTK_VERSION_0_31 (G_ENCODE_VERSION(0, 31))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_31
-#define GPLUGIN_AVAILABLE_MACRO_IN_0_31 GPLUGIN_UNAVAILABLE_MACRO(0, 31)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_31
+#define GPLUGIN_GTK_AVAILABLE_MACRO_IN_0_31 GPLUGIN_GTK_UNAVAILABLE_MACRO(0, 31)
 #else
-#define GPLUGIN_AVAILABLE_MACRO_IN_0_31
+#define GPLUGIN_GTK_AVAILABLE_MACRO_IN_0_31
 #endif
 
 /**
- * GPLUGIN_VERSION_0_32:
+ * GPLUGIN_GTK_VERSION_0_32:
  *
- * A macro that evaluates to the 0.32 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.32 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_32 (G_ENCODE_VERSION(0, 32))
+#define GPLUGIN_GTK_VERSION_0_32 (G_ENCODE_VERSION(0, 32))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_32
-#define GPLUGIN_AVAILABLE_IN_0_32 GPLUGIN_UNAVAILABLE(0, 32)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_32
+#define GPLUGIN_GTK_AVAILABLE_IN_0_32 GPLUGIN_GTK_UNAVAILABLE(0, 32)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_32 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_32 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_33:
+ * GPLUGIN_GTK_VERSION_0_33:
  *
- * A macro that evaluates to the 0.33 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.33 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_33 (G_ENCODE_VERSION(0, 33))
+#define GPLUGIN_GTK_VERSION_0_33 (G_ENCODE_VERSION(0, 33))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_33
-#define GPLUGIN_AVAILABLE_IN_0_33 GPLUGIN_UNAVAILABLE(0, 33)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_33
+#define GPLUGIN_GTK_AVAILABLE_IN_0_33 GPLUGIN_GTK_UNAVAILABLE(0, 33)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_33 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_33 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_34:
+ * GPLUGIN_GTK_VERSION_0_34:
  *
- * A macro that evaluates to the 0.34 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.34 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_34 (G_ENCODE_VERSION(0, 34))
+#define GPLUGIN_GTK_VERSION_0_34 (G_ENCODE_VERSION(0, 34))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_34
-#define GPLUGIN_AVAILABLE_IN_0_34 GPLUGIN_UNAVAILABLE(0, 34)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_34
+#define GPLUGIN_GTK_AVAILABLE_IN_0_34 GPLUGIN_GTK_UNAVAILABLE(0, 34)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_34 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_34 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_35:
+ * GPLUGIN_GTK_VERSION_0_35:
  *
- * A macro that evaluates to the 0.35 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.35 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_35 (G_ENCODE_VERSION(0, 35))
+#define GPLUGIN_GTK_VERSION_0_35 (G_ENCODE_VERSION(0, 35))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_35
-#define GPLUGIN_AVAILABLE_IN_0_35 GPLUGIN_UNAVAILABLE(0, 35)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_35
+#define GPLUGIN_GTK_AVAILABLE_IN_0_35 GPLUGIN_GTK_UNAVAILABLE(0, 35)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_35 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_35 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_36:
+ * GPLUGIN_GTK_VERSION_0_36:
  *
- * A macro that evaluates to the 0.36 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.36 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_36 (G_ENCODE_VERSION(0, 36))
+#define GPLUGIN_GTK_VERSION_0_36 (G_ENCODE_VERSION(0, 36))
 
 /**
- * GPLUGIN_VERSION_0_37:
+ * GPLUGIN_GTK_VERSION_0_37:
  *
- * A macro that evaluates to the 0.37 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.37 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_37 (G_ENCODE_VERSION(0, 37))
+#define GPLUGIN_GTK_VERSION_0_37 (G_ENCODE_VERSION(0, 37))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_37
-#define GPLUGIN_AVAILABLE_IN_0_37 GPLUGIN_UNAVAILABLE(0, 37)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_37
+#define GPLUGIN_GTK_AVAILABLE_IN_0_37 GPLUGIN_GTK_UNAVAILABLE(0, 37)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_37 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_37 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_38:
+ * GPLUGIN_GTK_VERSION_0_38:
  *
- * A macro that evaluates to the 0.38 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.38 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_38 (G_ENCODE_VERSION(0, 38))
+#define GPLUGIN_GTK_VERSION_0_38 (G_ENCODE_VERSION(0, 38))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_38
-#define GPLUGIN_AVAILABLE_IN_0_38 GPLUGIN_UNAVAILABLE(0, 38)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_38
+#define GPLUGIN_GTK_AVAILABLE_IN_0_38 GPLUGIN_GTK_UNAVAILABLE(0, 38)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_38 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_38 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_39:
+ * GPLUGIN_GTK_VERSION_0_39:
  *
- * A macro that evaluates to the 0.39 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.39 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_39 (G_ENCODE_VERSION(0, 39))
+#define GPLUGIN_GTK_VERSION_0_39 (G_ENCODE_VERSION(0, 39))
 
-#if GPLUGIN_VERSION_MIN_REQUIRED >= GPLUGIN_VERSION_0_39
-#define GPLUGIN_DEPRECATED_IN_0_39_FOR(f) GPLUGIN_DEPRECATED_FOR(f)
+#if GPLUGIN_GTK_VERSION_MIN_REQUIRED >= GPLUGIN_GTK_VERSION_0_39
+#define GPLUGIN_GTK_DEPRECATED_IN_0_39_FOR(f) GPLUGIN_GTK_DEPRECATED_FOR(f)
 #else
-#define GPLUGIN_DEPRECATED_IN_0_39_FOR(f) _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_DEPRECATED_IN_0_39_FOR(f) _GPLUGIN_GTK_EXTERN
 #endif
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_39
-#define GPLUGIN_AVAILABLE_IN_0_39 GPLUGIN_UNAVAILABLE(0, 39)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_39
+#define GPLUGIN_GTK_AVAILABLE_IN_0_39 GPLUGIN_GTK_UNAVAILABLE(0, 39)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_39 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_39 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_40:
+ * GPLUGIN_GTK_VERSION_0_40:
  *
- * A macro that evaluates to the 0.40 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.40 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_40 (G_ENCODE_VERSION(0, 40))
+#define GPLUGIN_GTK_VERSION_0_40 (G_ENCODE_VERSION(0, 40))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_40
-#define GPLUGIN_AVAILABLE_IN_0_40 GPLUGIN_UNAVAILABLE(0, 40)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_40
+#define GPLUGIN_GTK_AVAILABLE_IN_0_40 GPLUGIN_GTK_UNAVAILABLE(0, 40)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_40 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_40 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_41:
+ * GPLUGIN_GTK_VERSION_0_41:
  *
- * A macro that evaluates to the 0.41 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.41 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_41 (G_ENCODE_VERSION(0, 41))
+#define GPLUGIN_GTK_VERSION_0_41 (G_ENCODE_VERSION(0, 41))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_41
-#define GPLUGIN_AVAILABLE_IN_0_41 GPLUGIN_UNAVAILABLE(0, 41)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_41
+#define GPLUGIN_GTK_AVAILABLE_IN_0_41 GPLUGIN_GTK_UNAVAILABLE(0, 41)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_41 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_41 _GPLUGIN_GTK_EXTERN
 #endif
 
 /**
- * GPLUGIN_VERSION_0_42:
+ * GPLUGIN_GTK_VERSION_0_42:
  *
- * A macro that evaluates to the 0.42 version of GPlugin, in a format that can
- * be used by the C pre-processor.
+ * A macro that evaluates to the 0.42 version of GPlugin-Gtk, in a format that
+ * can be used by the C pre-processor.
  *
  * Since: 0.42.0
  */
-#define GPLUGIN_VERSION_0_42 (G_ENCODE_VERSION(0, 42))
+#define GPLUGIN_GTK_VERSION_0_42 (G_ENCODE_VERSION(0, 42))
 
-#if GPLUGIN_VERSION_MAX_ALLOWED < GPLUGIN_VERSION_0_42
-#define GPLUGIN_AVAILABLE_IN_0_42 GPLUGIN_UNAVAILABLE(0, 42)
+#if GPLUGIN_GTK_VERSION_MAX_ALLOWED < GPLUGIN_GTK_VERSION_0_42
+#define GPLUGIN_GTK_AVAILABLE_IN_0_42 GPLUGIN_GTK_UNAVAILABLE(0, 42)
 #else
-#define GPLUGIN_AVAILABLE_IN_0_42 _GPLUGIN_EXTERN
+#define GPLUGIN_GTK_AVAILABLE_IN_0_42 _GPLUGIN_GTK_EXTERN
 #endif
 
-#define GPLUGIN_VERSION_CHECK(major, minor, micro) \
-	((major) == GPLUGIN_MAJOR_VERSION && \
-	 ((minor) < GPLUGIN_MINOR_VERSION || \
-	  ((minor) == GPLUGIN_MINOR_VERSION && (micro) <= GPLUGIN_MICRO_VERSION)))
+#define GPLUGIN_GTK_VERSION_CHECK(major, minor, micro) \
+	((major) == GPLUGIN_GTK_MAJOR_VERSION && \
+	 ((minor) < GPLUGIN_GTK_MINOR_VERSION || \
+	  ((minor) == GPLUGIN_GTK_MINOR_VERSION && (micro) <= GPLUGIN_GTK_MICRO_VERSION)))
 
 G_BEGIN_DECLS
 
-GPLUGIN_AVAILABLE_IN_ALL
-const gchar *gplugin_version_check(guint major, guint minor, guint micro);
-
-GPLUGIN_AVAILABLE_IN_ALL
-gint gplugin_version_compare(const gchar *v1, const gchar *v2);
+GPLUGIN_GTK_AVAILABLE_IN_ALL
+const gchar *gplugin_gtk_version_check(guint major, guint minor, guint micro);
 
 G_END_DECLS
 
-#endif /* GPLUGIN_VERSION_H */
+#endif /* GPLUGIN_GTK_VERSION_H */
diff --git a/gplugin/gplugin-version.c b/gplugin-gtk4/gplugin-gtk-version.c
copy from gplugin/gplugin-version.c
copy to gplugin-gtk4/gplugin-gtk-version.c
--- a/gplugin/gplugin-version.c
+++ b/gplugin-gtk4/gplugin-gtk-version.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
+ * Copyright (C) 2011-2023 Gary Kramlich <grim@reaperworld.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -15,259 +15,98 @@
  * License along with this library; if not, see <https://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-
-#include <glib/gi18n-lib.h>
-
-#include <gplugin/gplugin-core.h>
-#include <gplugin/gplugin-version.h>
-
-/******************************************************************************
- * Globals
- *****************************************************************************/
-GRegex *regex = NULL;
-
-static const gchar *version_pattern = "^(?P<major>\\d+)(\\."
-									  "(?P<minor>\\d+)"
-									  "(\\.(?P<micro>\\d+)(?P<extra>.*))?)?$";
+#include "gplugin-gtk-version.h"
 
 /******************************************************************************
- * Helpers
- *****************************************************************************/
-static void
-gplugin_version_lazy_init(void)
-{
-	static gsize init = 0;
-
-	if(g_once_init_enter(&init)) {
-		GError *error = NULL;
-
-		regex =
-			g_regex_new(version_pattern, G_REGEX_NO_AUTO_CAPTURE, 0, &error);
-
-		if(error) {
-			g_warning(
-				_("Failed to initialize the version regex: %s"),
-				(error->message) ? error->message : _("unknown"));
-			g_error_free(error);
-		}
-
-		g_once_init_leave(&init, 1);
-	}
-}
-
-/*< private >
- * gplugin_version_parser:
- * @version: The string version to parse.
- * @major: (out) (nullable): A return gint pointer for the major version.
- * @minor: (out) (nullable): A return gint pointer for the minor version.
- * @micro: (out) (nullable): A return gint pointer for the micro version.
- * @extra: (out) (nullable): A return gchar * pointer for any extra version
- *         info.
- *
- * Attempts to parse a version string into its @major, @minor, @micro, and
- * @extra parts.  If @version doesn't match a semantic version string, @major
- * will be set to %-1, @minor will be set to %0, and @micro will be set to %0.
- */
-static void
-gplugin_version_parser(
-	const gchar *version,
-	gint *major,
-	gint *minor,
-	gint *micro,
-	gchar **extra)
-{
-	GMatchInfo *info = NULL;
-	gboolean matches = FALSE;
-	gchar *temp = NULL;
-
-	/* initialize everything to our failed state */
-	if(major != NULL) {
-		*major = -1;
-	}
-
-	if(minor != NULL) {
-		*minor = 0;
-	}
-
-	if(micro != NULL) {
-		*micro = 0;
-	}
-
-	if(version == NULL) {
-		/* if a version was not provided, return our failed values */
-		return;
-	}
-
-	matches = g_regex_match(regex, version, 0, &info);
-	if(!matches) {
-		/* If we failed to match the regex, free info and return our failed
-		 * values.
-		 */
-		g_match_info_unref(info);
-
-		return;
-	}
-
-	/* grab the major version */
-	if(major) {
-		temp = g_match_info_fetch_named(info, "major");
-		*major = (temp) ? atoi(temp) : 0;
-		g_free(temp);
-	}
-
-	/* grab the minor version */
-	if(minor) {
-		temp = g_match_info_fetch_named(info, "minor");
-		*minor = (temp) ? atoi(temp) : 0;
-		g_free(temp);
-	}
-
-	/* grab the micro version */
-	if(micro) {
-		temp = g_match_info_fetch_named(info, "micro");
-		*micro = (temp) ? atoi(temp) : 0;
-		g_free(temp);
-	}
-
-	/* grab the extra version */
-	if(extra) {
-		*extra = g_match_info_fetch_named(info, "extra");
-	}
-
-	g_match_info_unref(info);
-}
-
-/******************************************************************************
- * GPluginVersion API
+ * GPluginGtkVersion API
  *****************************************************************************/
 
 /**
- * GPLUGIN_MAJOR_VERSION:
+ * GPLUGIN_GTK_MAJOR_VERSION:
  *
- * This is the major version number of GPlugin that was compiled against.
+ * This is the major version number of GPluginGtk that was compiled against.
  */
 
 /**
- * GPLUGIN_MINOR_VERSION:
+ * GPLUGIN_GTK_MINOR_VERSION:
  *
- * This is the minor version number of GPlugin that was compiled against.
+ * This is the minor version number of GPluginGtk that was compiled against.
  */
 
 /**
- * GPLUGIN_MICRO_VERSION:
+ * GPLUGIN_GTK_MICRO_VERSION:
  *
- * This is the micro version number of GPlugin that was compiled against.
+ * This is the micro version number of GPluginGtk that was compiled against.
  */
 
 /**
- * GPLUGIN_EXTRA_VERSION:
+ * GPLUGIN_GTK_EXTRA_VERSION:
  *
- * This is the extra version string of GPlugin that was compiled against.
+ * This is the extra version string of GPluginGtk that was compiled against.
  */
 
 /**
- * GPLUGIN_VERSION:
+ * GPLUGIN_GTK_VERSION:
  *
- * This is the string version number of GPlugin that was compiled against.
+ * This is the string version number of GPluginGtk that was compiled against.
  */
 
 /**
- * GPLUGIN_VERSION_CHECK:
+ * GPLUGIN_GTK_VERSION_CHECK:
  * @major: The major version to compare for.
  * @minor: The minor version to compare for.
  * @micro: The micro version to compare for.
  *
- * Checks the version of the GPlugin library that is being compiled
+ * Checks the version of the GPluginGtk library that is being compiled
  * against.
  *
- * Returns: %TRUE if the version of the GPlugin header files
- * is the same as or newer than the passed-in version.
+ * Returns: %TRUE if the version of the GPluginGtk header files is the same as
+ *          or newer than the passed-in version.
  */
 
 /**
- * gplugin_version_check:
+ * gplugin_gtk_version_check:
  * @major: The required major version.
  * @minor: The required minor version.
  * @micro: The required micro version.
  *
- * Checks that the GPlugin library in use is compatible with the given version.
+ * Checks that the GPluginGtk library in use is compatible with the given
+ * version.
  *
- * Generally you would pass in the constants [const@GPlugin.MAJOR_VERSION],
- * [const@GPlugin.MINOR_VERSION], [const@GPlugin.MICRO_VERSION] as the three
- * arguments to this function; that produces a check that the library in use is
- * compatible with the version of GPlugin the application or module was
- * compiled against.
+ * Generally you would pass in the constants [const@MAJOR_VERSION],
+ * [const@MINOR_VERSION], [const@MICRO_VERSION] as the three arguments to this
+ * function; that produces a check that the library in use is compatible with
+ * the version of GPluginGtk 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 @major.@minor.@micro. Second the running
  * library must be binary compatible with the version @major.@minor.@micro
  * (same major version).
  *
- * Returns: %NULL if the GPlugin library is compatible with the given version,
- *          or a string describing the version mismatch. The returned string
- *          is owned by GPlugin and must not be modified or freed.
+ * Returns: %NULL if the GPluginGtk library is compatible with the given
+ *          version, or a string describing the version mismatch. The returned
+ *          string is owned by GPluginGtk and must not be modified or freed.
  */
 const gchar *
 gplugin_version_check(guint major, guint minor, guint micro)
 {
-	if(major > GPLUGIN_MAJOR_VERSION) {
+	if(major > GPLUGIN_GTK_MAJOR_VERSION) {
 		return "gplugin version too old (major mismatch)";
 	}
 
-#if GPLUGIN_VERSION_CHECK(1, 0, 0)
-	if(major < GPLUGIN_MAJOR_VERSION) {
+#if GPLUGIN_GTK_VERSION_CHECK(1, 0, 0)
+	if(major < GPLUGIN_GTK_MAJOR_VERSION) {
 		return "gplugin version too new (major mismatch)";
 	}
 #endif
 
-	if(minor > GPLUGIN_MINOR_VERSION) {
+	if(minor > GPLUGIN_GTK_MINOR_VERSION) {
 		return "gplugin version too old (minor mismatch)";
 	}
 
-	if(minor == GPLUGIN_MINOR_VERSION && micro > GPLUGIN_MICRO_VERSION) {
+	if(minor == GPLUGIN_GTK_MINOR_VERSION && micro > GPLUGIN_GTK_MICRO_VERSION) {
 		return "gplugin version too old (micro mismatch)";
 	}
 
 	return NULL;
 }
-
-/**
- * gplugin_version_compare:
- * @v1: The first version to compare.
- * @v2: The second version to compare.
- *
- * A semantic version checker which ignores any characters after the micro
- * version.
- *
- * Returns: less than 0 if @v1 is less than @v2, 0 if @v1 is equal to @v1, and
- *          greater than 0 if @v1 is greater than @v2.
- */
-gint
-gplugin_version_compare(const gchar *v1, const gchar *v2)
-{
-	gint v1_maj = 0, v1_min = 0, v1_mic = 0;
-	gint v2_maj = 0, v2_min = 0, v2_mic = 0;
-	gint t = 0;
-
-	if(regex == NULL) {
-		gplugin_version_lazy_init();
-	}
-
-	/* parse v1 */
-	gplugin_version_parser(v1, &v1_maj, &v1_min, &v1_mic, NULL);
-
-	/* parse v2 */
-	gplugin_version_parser(v2, &v2_maj, &v2_min, &v2_mic, NULL);
-
-	/* now figure out if they match */
-	t = v1_maj - v2_maj;
-	if(t != 0)
-		return t;
-
-	t = v1_min - v2_min;
-	if(t != 0)
-		return t;
-
-	return v1_mic - v2_mic;
-}
diff --git a/meson.build b/meson.build
--- a/meson.build
+++ b/meson.build
@@ -16,13 +16,17 @@
 
 parts = parts[0].split('.')
 GPLUGIN_MAJOR_VERSION = parts[0]
+GPLUGIN_MINOR_VERSION = parts[1]
+GPLUGIN_MICRO_VERSION = parts[2]
+GPLUGIN_EXTRA_VERSION = extra
+GPLUGIN_VERSION = meson.project_version()
 
 version_conf = configuration_data()
 version_conf.set('GPLUGIN_MAJOR_VERSION', GPLUGIN_MAJOR_VERSION)
-version_conf.set('GPLUGIN_MINOR_VERSION', parts[1])
-version_conf.set('GPLUGIN_MICRO_VERSION', parts[2])
-version_conf.set('GPLUGIN_EXTRA_VERSION', extra)
-version_conf.set('GPLUGIN_VERSION', meson.project_version())
+version_conf.set('GPLUGIN_MINOR_VERSION', GPLUGIN_MINOR_VERSION)
+version_conf.set('GPLUGIN_MICRO_VERSION', GPLUGIN_MICRO_VERSION)
+version_conf.set('GPLUGIN_EXTRA_VERSION', GPLUGIN_EXTRA_VERSION)
+version_conf.set('GPLUGIN_VERSION', GPLUGIN_VERSION)
 
 ###############################################################################
 # Dependencies
