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