diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-12-12 14:43:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-12-12 14:43:24 +0000 |
commit | bc89fe0147c04b67141936d109c00dfd4d69cc4b (patch) | |
tree | 544ff450c40fe1f43853a8420228a26f27f1eafb /libs/clearlooks-newer/general-support.h | |
parent | 30daaebaa2d90d6b0e8673143ccc3cacd7bd1753 (diff) |
most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet
git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/clearlooks-newer/general-support.h')
-rw-r--r-- | libs/clearlooks-newer/general-support.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libs/clearlooks-newer/general-support.h b/libs/clearlooks-newer/general-support.h new file mode 100644 index 0000000000..25999e2d31 --- /dev/null +++ b/libs/clearlooks-newer/general-support.h @@ -0,0 +1,39 @@ + +#include <gmodule.h> +#include <glib.h> + +/* macros to make sure that things are sane ... */ + +#define CHECK_DETAIL(detail, value) ((detail) && (!strcmp(value, detail))) + +#define CHECK_ARGS \ + g_return_if_fail (window != NULL); \ + g_return_if_fail (style != NULL); + +#define SANITIZE_SIZE \ + g_return_if_fail (width >= -1); \ + g_return_if_fail (height >= -1); \ + \ + if ((width == -1) && (height == -1)) \ + gdk_drawable_get_size (window, &width, &height); \ + else if (width == -1) \ + gdk_drawable_get_size (window, &width, NULL); \ + else if (height == -1) \ + gdk_drawable_get_size (window, NULL, &height); + +#define GE_EXPORT G_MODULE_EXPORT +#define GE_INTERNAL G_GNUC_INTERNAL + +/* explicitly export with ggc, G_MODULE_EXPORT does not do this, this should + * make it possible to compile with -fvisibility=hidden */ +#ifdef G_HAVE_GNUC_VISIBILITY +# undef GE_EXPORT +# define GE_EXPORT __attribute__((__visibility__("default"))) +#endif + +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +# undef GE_EXPORT +# undef GE_INTERNAL +# define GE_EXPORT __global +# define GE_INTERNAL __hidden +#endif |