diff dw.h @ 2204:b86ae2abb3b3

GTK: Added GTK2 support for GResource embedded images. Removed the App ID from the resource namespace. I assume the namespace is per process and this should be sufficient, but can revisit adding the application name or application ID to the resource namespace later.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 29 Nov 2020 05:29:11 +0000
parents 12fb7f32f3a9
children a43a3f80ed32
line wrap: on
line diff
--- a/dw.h	Sun Nov 29 04:17:58 2020 +0000
+++ b/dw.h	Sun Nov 29 05:29:11 2020 +0000
@@ -1341,11 +1341,6 @@
 typedef void *HSHM;
 typedef void *HICN;
 
-typedef struct _resource_struct {
-   long resource_max, *resource_id;
-   char **resource_data;
-} DWResources;
-
 /* As of Dynamic Windows 3.1 GResource is default if supported.
  * Using --with-deprecated at configure time will include
  * support for our old home brewed resource system.
@@ -1354,13 +1349,18 @@
  * Test for GResource using: dwindows-config --gresource
  */
 #ifndef DW_INCLUDE_DEPRECATED_RESOURCES
-#if defined(DW_INCLUDE_DEPRECATED) || GTK_MAJOR_VERSION < 3 || !GLIB_CHECK_VERSION(2,32,0)
+#if defined(DW_INCLUDE_DEPRECATED) || GTK_MAJOR_VERSION < 2 || !GLIB_CHECK_VERSION(2,32,0)
 #define DW_INCLUDE_DEPRECATED_RESOURCES 1
 #endif
 #endif
 
 /* Only reference our old style resources if required. */
 #ifdef DW_INCLUDE_DEPRECATED_RESOURCES
+typedef struct _resource_struct {
+   long resource_max, *resource_id;
+   char **resource_data;
+} DWResources;
+
 #if !defined(DW_RESOURCES) || defined(BUILD_DLL)
 static DWResources DW_UNUSED(_resources) = { 0, 0, 0 };
 #else