messages sent to info/warning/error/fatal should end with endmsg, not endl
[ardour.git] / libs / clearlooks-newer / general-support.h
1
2 #include <gmodule.h>
3 #include <glib.h>
4
5 /* macros to make sure that things are sane ... */
6
7 #define CHECK_DETAIL(detail, value) ((detail) && (!strcmp(value, detail)))
8
9 #define CHECK_ARGS                                      \
10   g_return_if_fail (window != NULL);                    \
11   g_return_if_fail (style != NULL);
12
13 #define SANITIZE_SIZE                                   \
14   g_return_if_fail (width  >= -1);                      \
15   g_return_if_fail (height >= -1);                      \
16                                                         \
17   if ((width == -1) && (height == -1))                  \
18     gdk_drawable_get_size (window, &width, &height);    \
19   else if (width == -1)                                 \
20     gdk_drawable_get_size (window, &width, NULL);       \
21   else if (height == -1)                                \
22     gdk_drawable_get_size (window, NULL, &height);
23
24 #define GE_EXPORT       G_MODULE_EXPORT
25 #define GE_INTERNAL     G_GNUC_INTERNAL
26
27 /* explicitly export with ggc, G_MODULE_EXPORT does not do this, this should
28  * make it possible to compile with -fvisibility=hidden */
29 #ifdef G_HAVE_GNUC_VISIBILITY
30 # undef GE_EXPORT
31 # define GE_EXPORT      __attribute__((__visibility__("default")))
32 #endif
33
34 #if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
35 # undef GE_EXPORT
36 # undef GE_INTERNAL
37 # define GE_EXPORT      __global
38 # define GE_INTERNAL    __hidden
39 #endif