comparison 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
comparison
equal deleted inserted replaced
2203:12fb7f32f3a9 2204:b86ae2abb3b3
1339 typedef GtkWidget *HMENUI; 1339 typedef GtkWidget *HMENUI;
1340 typedef void *HTREEITEM; 1340 typedef void *HTREEITEM;
1341 typedef void *HSHM; 1341 typedef void *HSHM;
1342 typedef void *HICN; 1342 typedef void *HICN;
1343 1343
1344 typedef struct _resource_struct {
1345 long resource_max, *resource_id;
1346 char **resource_data;
1347 } DWResources;
1348
1349 /* As of Dynamic Windows 3.1 GResource is default if supported. 1344 /* As of Dynamic Windows 3.1 GResource is default if supported.
1350 * Using --with-deprecated at configure time will include 1345 * Using --with-deprecated at configure time will include
1351 * support for our old home brewed resource system. 1346 * support for our old home brewed resource system.
1352 * GLib 2.32 is required for GResource, so we automatically 1347 * GLib 2.32 is required for GResource, so we automatically
1353 * enable our old system if using an old Glib. 1348 * enable our old system if using an old Glib.
1354 * Test for GResource using: dwindows-config --gresource 1349 * Test for GResource using: dwindows-config --gresource
1355 */ 1350 */
1356 #ifndef DW_INCLUDE_DEPRECATED_RESOURCES 1351 #ifndef DW_INCLUDE_DEPRECATED_RESOURCES
1357 #if defined(DW_INCLUDE_DEPRECATED) || GTK_MAJOR_VERSION < 3 || !GLIB_CHECK_VERSION(2,32,0) 1352 #if defined(DW_INCLUDE_DEPRECATED) || GTK_MAJOR_VERSION < 2 || !GLIB_CHECK_VERSION(2,32,0)
1358 #define DW_INCLUDE_DEPRECATED_RESOURCES 1 1353 #define DW_INCLUDE_DEPRECATED_RESOURCES 1
1359 #endif 1354 #endif
1360 #endif 1355 #endif
1361 1356
1362 /* Only reference our old style resources if required. */ 1357 /* Only reference our old style resources if required. */
1363 #ifdef DW_INCLUDE_DEPRECATED_RESOURCES 1358 #ifdef DW_INCLUDE_DEPRECATED_RESOURCES
1359 typedef struct _resource_struct {
1360 long resource_max, *resource_id;
1361 char **resource_data;
1362 } DWResources;
1363
1364 #if !defined(DW_RESOURCES) || defined(BUILD_DLL) 1364 #if !defined(DW_RESOURCES) || defined(BUILD_DLL)
1365 static DWResources DW_UNUSED(_resources) = { 0, 0, 0 }; 1365 static DWResources DW_UNUSED(_resources) = { 0, 0, 0 };
1366 #else 1366 #else
1367 extern DWResources _resources; 1367 extern DWResources _resources;
1368 #endif 1368 #endif