BEAST - Free Software Audio Synthesizer and Tracker  0.10.0
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 // == G++ attributes ==
10 #define __unused __attribute__ ((unused))
11 
12 G_BEGIN_DECLS
13 
14 /* --- generic constants --- */
15 typedef enum {
16  BST_QUANTIZE_NONE = 0,
17  BST_QUANTIZE_NOTE_1 = 1,
18  BST_QUANTIZE_NOTE_2 = 2,
19  BST_QUANTIZE_NOTE_4 = 4,
20  BST_QUANTIZE_NOTE_8 = 8,
21  BST_QUANTIZE_NOTE_16 = 16,
22  BST_QUANTIZE_NOTE_32 = 32,
23  BST_QUANTIZE_NOTE_64 = 64,
24  BST_QUANTIZE_NOTE_128 = 128,
25  BST_QUANTIZE_TACT = 65535
26 } BstQuantizationType;
27 
28 typedef struct _BstKeyBinding BstKeyBinding;
29 
30 /* choose IDs that are unlikely to clash with category IDs */
31 #define BST_COMMON_ROLL_TOOL_FIRST (G_MAXINT - 100000)
32 
33 typedef enum /*< skip >*/
34 {
35  BST_COMMON_ROLL_TOOL_NONE,
36  BST_COMMON_ROLL_TOOL_INSERT = BST_COMMON_ROLL_TOOL_FIRST,
37  BST_COMMON_ROLL_TOOL_RESIZE,
38  BST_COMMON_ROLL_TOOL_LINK,
39  BST_COMMON_ROLL_TOOL_RENAME,
40  BST_COMMON_ROLL_TOOL_ALIGN,
41  BST_COMMON_ROLL_TOOL_MOVE,
42  BST_COMMON_ROLL_TOOL_DELETE,
43  BST_COMMON_ROLL_TOOL_SELECT,
44  BST_COMMON_ROLL_TOOL_VSELECT,
45  BST_COMMON_ROLL_TOOL_EDITOR,
46  BST_COMMON_ROLL_TOOL_MOVE_TICK_POINTER,
47  BST_COMMON_ROLL_TOOL_MOVE_TICK_LEFT,
48  BST_COMMON_ROLL_TOOL_MOVE_TICK_RIGHT,
49  BST_COMMON_ROLL_TOOL_LAST
50 } BstCommonRollTool;
51 
52 /* --- constants & defines --- */
53 #define BST_TAG_DIAMETER (20)
54 #define BST_STRDUP_RC_FILE() (g_strconcat (g_get_home_dir (), "/.beast/beastrc", NULL))
55 #define BST_STRDUP_SKIN_PATH() (g_strconcat ("~/.beast/skins/:~/.beast/skins/*/:", \
56  Bse::installpath (Bse::INSTALLPATH_DATADIR_SKINS).c_str(), NULL))
57 
58 /* --- configuration candidates --- */
59 /* mouse button numbers and masks for drag operations */
60 #define BST_DRAG_BUTTON_COPY (1)
61 #define BST_DRAG_BUTTON_COPY_MASK (GDK_BUTTON1_MASK)
62 #define BST_DRAG_BUTTON_MOVE (2)
63 #define BST_DRAG_BUTTON_MOVE_MASK (GDK_BUTTON2_MASK)
64 #define BST_DRAG_BUTTON_CONTEXT (3) /* delete, clone, linkdup */
65 
66 /* --- miscellaneous --- */
67 #define BST_DVL_HINTS (bst_developer_hints != FALSE)
68 #define BST_DBG_EXT (bst_debug_extensions != FALSE)
69 #define GNOME_CANVAS_NOTIFY(object) G_STMT_START { \
70  if (GTK_IS_OBJECT (object)) \
71  g_signal_emit_by_name (object, "notify::generic-change", NULL); \
72 } G_STMT_END
73 
74 /* --- i18n and gettext helpers --- */
75 #define BEAST_GETTEXT_DOMAIN (NULL)
76 #define _(str) dgettext (BEAST_GETTEXT_DOMAIN, str)
77 #define N_(str) (str)
78 
79 /* --- internal stuff --- */
80 void beast_show_about_box (void);
81 void bst_main_loop_wakeup ();
82 extern gboolean bst_developer_hints;
83 extern gboolean bst_debug_extensions;
84 
85 G_END_DECLS
86 
87 #endif /* __BST_DEFS_H__ */
Definition: bstkeybindings.hh:35
void bst_main_loop_wakeup()
wake up the main context used by the Beast main event looop.
Definition: bstmain.cc:607