BEAST - Free Software Audio Synthesizer and Tracker  0.9.2
sfitypes.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 __SFI_TYPES_H__
3 #define __SFI_TYPES_H__
4 
5 #include <sfi/glib-extra.hh>
6 #include <sfi/sfiwrapper.hh>
7 
8 G_BEGIN_DECLS
9 
10 /* --- Sfi typedefs --- */
11 typedef bool SfiBool;
12 typedef gint SfiInt;
13 #define SFI_MAXINT (+2147483647)
14 #define SFI_MININT (-SFI_MAXINT - 1)
15 typedef long long int SfiNum;
16 static_assert (sizeof (SfiNum) == 8, "SfiNum");
17 #define SFI_MAXNUM ((SfiNum) +9223372036854775807LL)
18 #define SFI_MINNUM (-SFI_MAXNUM - 1)
19 typedef long long int SfiTime;
20 static_assert (sizeof (SfiTime) == 8, "SfiTime");
21 typedef SfiInt SfiNote;
22 typedef double SfiReal;
23 #define SFI_MINREAL (2.2250738585072014e-308) /* IEEE754 double */
24 #define SFI_MAXREAL (1.7976931348623157e+308) /* IEEE754 double */
25 typedef const gchar* SfiChoice;
26 typedef struct _SfiBBlock SfiBBlock;
27 typedef struct _SfiFBlock SfiFBlock;
28 typedef struct _SfiSeq SfiSeq;
29 typedef struct _SfiRec SfiRec;
30 typedef GType /* pointer */ SfiProxy;
31 struct SfiRecFields {
32  guint n_fields;
33  GParamSpec **fields;
34  SfiRecFields (guint n = 0, GParamSpec **f = NULL) : n_fields (n), fields (f) {}
35 };
36 typedef struct _SfiUStore SfiUStore;
37 typedef struct _SfiUPool SfiUPool;
38 typedef struct _SfiPPool SfiPPool;
39 
40 /* --- FIXME: hacks! --- */
41 gboolean sfi_choice_match_detailed (const gchar *choice_val1,
42  const gchar *choice_val2,
43  gboolean l1_ge_l2);
44 gboolean sfi_choice_match (const gchar *choice_val1,
45  const gchar *choice_val2);
46 gchar* sfi_strdup_canon (const gchar *identifier);
47 
48 typedef struct {
49  const gchar *name;
50  guint name_length;
51  guint index;
52 } SfiConstants;
53 
54 guint sfi_constants_get_index (guint n_consts,
55  const SfiConstants *rsorted_consts,
56  const gchar *constant);
57 const gchar* sfi_constants_get_name (guint n_consts,
58  const SfiConstants *consts,
59  guint index);
60 gint sfi_constants_rcmp (const gchar *canon_identifier1,
61  const gchar *canon_identifier2);
62 const char* sfi_category_concat (const char *prefix,
63  const char *trunk);
64 
65 /* --- idl macro magic --- */
66 #define SFI_START_ARGS() (
67 #define SFI_END_ARGS() )
68 #define SFI_END_ARGS1(a) a)
69 #define SFI_END_ARGS2(a,b) a , b)
70 #define SFI_END_ARGS3(a,b,c) a , b , c)
71 
72 
73 G_END_DECLS
74 
75 #endif /* __SFI_TYPES_H__ */
76 
77 /* vim:set ts=8 sts=2 sw=2: */
Definition: sfiprimitives.hh:11
Definition: sfiprimitives.hh:34
Definition: sfitypes.hh:31
Definition: sfiprimitives.hh:139
Definition: sfiprimitives.hh:61
Definition: sfitypes.hh:48