BEAST - Free Software Audio Synthesizer and Tracker  0.9.2
gxkglobals.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __GXK_GLOBALS_H__
3 #define __GXK_GLOBALS_H__
4 
5 #include <sfi/glib-extra.hh>
6 #include <gtk/gtk.h>
7 
8 G_BEGIN_DECLS
9 
10 /* --- i18n and gettext helpers --- */
11 #ifdef GXK_COMPILATION
12 # define GXK_I18N_DOMAIN NULL
13 # define _(str) dgettext (GXK_I18N_DOMAIN, str)
14 # define T_(str) dgettext (GXK_I18N_DOMAIN, str)
15 # define N_(str) (str)
16 #endif
17 
18 
19 /* --- macros --- */
20 #define GXK_TOOLTIPS (gxk_globals->tooltips)
21 
22 
23 /* --- typedefs & structures --- */
24 typedef void (*GxkFreeFunc) (gpointer data);
25 typedef struct
26 {
27  GtkTooltips *tooltips;
28 } GxkGlobals;
29 
30 
31 /* --- spacing/padding --- */
32 #define GXK_OUTER_BORDER (5) /* outer dialog border-width */
33 #define GXK_INNER_SPACING (3) /* spacing/padding between h/v boxes */
34 #define GXK_BUTTON_PADDING (3) /* padding between adjacent buttons */
35 
36 
37 /* --- convenience --- */
38 gulong gxk_nullify_in_object (gpointer object,
39  gpointer location);
40 
41 
42 /* --- variables --- */
43 extern const GxkGlobals* gxk_globals;
44 
45 
46 /* --- functions --- */
47 void gxk_init (void);
48 
49 
50 /* --- internal --- */
51 void gxk_init_utils (void);
52 void gxk_init_params (void);
53 void gxk_init_stock (void);
54 void gxk_init_actions (void);
55 void gxk_init_assortments (void);
56 void gxk_init_radget_types (void);
57 
58 
59 G_END_DECLS
60 
61 // == Flags Enumeration Operators in C++ ==
62 #ifdef __cplusplus
63 constexpr GdkEventMask operator& (GdkEventMask s1, GdkEventMask s2) { return GdkEventMask (s1 & (long long unsigned) s2); }
64 inline GdkEventMask& operator&= (GdkEventMask &s1, GdkEventMask s2) { s1 = s1 & s2; return s1; }
65 constexpr GdkEventMask operator| (GdkEventMask s1, GdkEventMask s2) { return GdkEventMask (s1 | (long long unsigned) s2); }
66 inline GdkEventMask& operator|= (GdkEventMask &s1, GdkEventMask s2) { s1 = s1 | s2; return s1; }
67 constexpr GdkEventMask operator~ (GdkEventMask s1) { return GdkEventMask (~(long long unsigned) s1); }
68 constexpr GdkModifierType operator& (GdkModifierType s1, GdkModifierType s2) { return GdkModifierType (s1 & (long long unsigned) s2); }
69 inline GdkModifierType& operator&= (GdkModifierType &s1, GdkModifierType s2) { s1 = s1 & s2; return s1; }
70 constexpr GdkModifierType operator| (GdkModifierType s1, GdkModifierType s2) { return GdkModifierType (s1 | (long long unsigned) s2); }
71 inline GdkModifierType& operator|= (GdkModifierType &s1, GdkModifierType s2) { s1 = s1 | s2; return s1; }
72 constexpr GdkModifierType operator~ (GdkModifierType s1) { return GdkModifierType (~(long long unsigned) s1); }
73 constexpr GdkWindowHints operator& (GdkWindowHints s1, GdkWindowHints s2) { return GdkWindowHints (s1 & (long long unsigned) s2); }
74 inline GdkWindowHints& operator&= (GdkWindowHints &s1, GdkWindowHints s2) { s1 = s1 & s2; return s1; }
75 constexpr GdkWindowHints operator| (GdkWindowHints s1, GdkWindowHints s2) { return GdkWindowHints (s1 | (long long unsigned) s2); }
76 inline GdkWindowHints& operator|= (GdkWindowHints &s1, GdkWindowHints s2) { s1 = s1 | s2; return s1; }
77 constexpr GdkWindowHints operator~ (GdkWindowHints s1) { return GdkWindowHints (~(long long unsigned) s1); }
78 constexpr GtkAttachOptions operator& (GtkAttachOptions s1, GtkAttachOptions s2) { return GtkAttachOptions (s1 & (long long unsigned) s2); }
79 inline GtkAttachOptions& operator&= (GtkAttachOptions &s1, GtkAttachOptions s2) { s1 = s1 & s2; return s1; }
80 constexpr GtkAttachOptions operator| (GtkAttachOptions s1, GtkAttachOptions s2) { return GtkAttachOptions (s1 | (long long unsigned) s2); }
81 inline GtkAttachOptions& operator|= (GtkAttachOptions &s1, GtkAttachOptions s2) { s1 = s1 | s2; return s1; }
82 constexpr GtkAttachOptions operator~ (GtkAttachOptions s1) { return GtkAttachOptions (~(long long unsigned) s1); }
83 #endif // __cplusplus
84 #endif /* __GXK_GLOBALS_H__ */
Definition: gxkglobals.hh:25