Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstdefs.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 __BST_DEFS_H__
3 #define __BST_DEFS_H__
4 #include <gxk/gxk.hh>
5 #include <libintl.h>
6 #include "bstzoomedwindow.hh"
7 #include "bse/bse.hh"
8 
9 // == using Bse types ==
10 using Bse::Any;
11 using Bse::String;
12 using Bse::printout;
13 using Bse::printerr;
14 using Bse::string_format;
15 
16 /* --- generic constants --- */
17 typedef enum {
18  BST_QUANTIZE_NONE = 0,
19  BST_QUANTIZE_NOTE_1 = 1,
20  BST_QUANTIZE_NOTE_2 = 2,
21  BST_QUANTIZE_NOTE_4 = 4,
22  BST_QUANTIZE_NOTE_8 = 8,
23  BST_QUANTIZE_NOTE_16 = 16,
24  BST_QUANTIZE_NOTE_32 = 32,
25  BST_QUANTIZE_NOTE_64 = 64,
26  BST_QUANTIZE_NOTE_128 = 128,
27  BST_QUANTIZE_TACT = 65535
28 } BstQuantizationType;
29 
30 typedef struct _BstKeyBinding BstKeyBinding;
31 
32 /* choose IDs that are unlikely to clash with category IDs */
33 #define BST_COMMON_ROLL_TOOL_FIRST (G_MAXINT - 100000)
34 
35 typedef enum /*< skip >*/
36 {
37  BST_COMMON_ROLL_TOOL_NONE,
38  BST_COMMON_ROLL_TOOL_INSERT = BST_COMMON_ROLL_TOOL_FIRST,
39  BST_COMMON_ROLL_TOOL_RESIZE,
40  BST_COMMON_ROLL_TOOL_LINK,
41  BST_COMMON_ROLL_TOOL_RENAME,
42  BST_COMMON_ROLL_TOOL_ALIGN,
43  BST_COMMON_ROLL_TOOL_MOVE,
44  BST_COMMON_ROLL_TOOL_DELETE,
45  BST_COMMON_ROLL_TOOL_SELECT,
46  BST_COMMON_ROLL_TOOL_VSELECT,
47  BST_COMMON_ROLL_TOOL_EDITOR,
48  BST_COMMON_ROLL_TOOL_MOVE_TICK_POINTER,
49  BST_COMMON_ROLL_TOOL_MOVE_TICK_LEFT,
50  BST_COMMON_ROLL_TOOL_MOVE_TICK_RIGHT,
51  BST_COMMON_ROLL_TOOL_LAST
52 } BstCommonRollTool;
53 
54 /* --- constants & defines --- */
55 #define BST_TAG_DIAMETER (20)
56 #define BST_STRDUP_RC_FILE() (g_strconcat (g_get_home_dir (), "/.beast/beastrc", NULL))
57 #define BST_STRDUP_SKIN_PATH() (g_strconcat ("~/.beast/skins/:~/.beast/skins/*/:", \
58  Bse::installpath (Bse::INSTALLPATH_DATADIR_SKINS).c_str(), NULL))
59 
60 /* --- configuration candidates --- */
61 /* mouse button numbers and masks for drag operations */
62 #define BST_DRAG_BUTTON_COPY (1)
63 #define BST_DRAG_BUTTON_COPY_MASK (GDK_BUTTON1_MASK)
64 #define BST_DRAG_BUTTON_MOVE (2)
65 #define BST_DRAG_BUTTON_MOVE_MASK (GDK_BUTTON2_MASK)
66 #define BST_DRAG_BUTTON_CONTEXT (3) /* delete, clone, linkdup */
67 
68 /* --- miscellaneous --- */
69 #define BST_DVL_HINTS (bst_developer_hints != FALSE)
70 #define BST_DBG_EXT (bst_debug_extensions != FALSE)
71 #define GNOME_CANVAS_NOTIFY(object) G_STMT_START { \
72  if (GTK_IS_OBJECT (object)) \
73  g_signal_emit_by_name (object, "notify::generic-change", NULL); \
74 } G_STMT_END
75 
76 /* --- i18n and gettext helpers --- */
77 // Atm, Beast and libbse share the same text domain
78 #define _(str) ::Bse::_ (str)
79 #define N_(str) (str)
80 inline const char* bst_gettext_domain () { return ::Bse::bse_gettext_domain(); }
81 
82 /* --- internal stuff --- */
83 void beast_show_about_box (void);
84 void bst_main_loop_wakeup ();
85 extern gboolean bst_developer_hints;
86 extern gboolean bst_debug_extensions;
87 
88 #endif /* __BST_DEFS_H__ */
const char * bse_gettext_domain()
The gettext domain used by libbse.
Definition: glib-extra.cc:1091
STL class.
Definition: bstkeybindings.hh:33