Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bseproject.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 __BSE_PROJECT_H__
3 #define __BSE_PROJECT_H__
4 
5 #include <bse/bsecontainer.hh>
6 
7 
8 /* --- object type macros --- */
9 #define BSE_TYPE_PROJECT (BSE_TYPE_ID (BseProject))
10 #define BSE_PROJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BSE_TYPE_PROJECT, BseProject))
11 #define BSE_PROJECT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), BSE_TYPE_PROJECT, BseProjectClass))
12 #define BSE_IS_PROJECT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BSE_TYPE_PROJECT))
13 #define BSE_IS_PROJECT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), BSE_TYPE_PROJECT))
14 #define BSE_PROJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_PROJECT, BseProjectClass))
15 
16 
18  GSList *supers;
19  GSList *items;
20  guint in_undo : 1;
21  guint in_redo : 1;
22  BseUndoStack *undo_stack;
23  BseUndoStack *redo_stack;
24  Bse::ProjectState state;
25  guint deactivate_timer;
26  gint64 deactivate_usecs;
27  guint64 deactivate_min_tick;
28  BseMidiReceiver *midi_receiver;
29 };
31 {};
32 
33 Bse::Error bse_project_activate (BseProject *project);
34 void bse_project_start_playback (BseProject *project);
35 void bse_project_stop_playback (BseProject *project);
36 void bse_project_check_auto_stop (BseProject *project);
37 void bse_project_deactivate (BseProject *project);
38 void bse_project_set_auto_deactivate (BseProject *project,
39  gint64 usecs);
40 void bse_project_keep_activated (BseProject *project,
41  guint64 min_tick);
42 void bse_project_state_changed (BseProject *project,
43  Bse::ProjectState state);
44 Bse::Error bse_project_restore (BseProject *project,
45  BseStorage *storage);
46 Bse::Error bse_project_store_bse (BseProject *project,
47  BseSuper *super,
48  const gchar *bse_file,
49  gboolean self_contained);
50 BseObject* bse_project_upath_resolver (gpointer project /* func_data */,
51  GType required_type,
52  const gchar *upath,
53  gchar **error_p);
54 BseItem* bse_project_lookup_typed_item (BseProject *project,
55  GType item_type,
56  const gchar *uname);
57 BseWaveRepo* bse_project_get_wave_repo (BseProject *project);
58 BseSoundFontRepo* bse_project_get_sound_font_repo (BseProject *project);
59 BseSong* bse_project_get_song (BseProject *project);
60 BseSNet* bse_project_create_intern_synth (BseProject *project,
61  const gchar *synth_name,
62  GType check_type);
63 BseCSynth* bse_project_create_intern_csynth(BseProject *project,
64  const char *base_name);
65 BseMidiNotifier*bse_project_get_midi_notifier (BseProject *project);
66 void bse_project_clear_undo (BseProject *project);
67 void bse_project_clean_dirty (BseProject *project);
68 void bse_project_push_undo_silent_deactivate (BseProject *self);
69 
70 namespace Bse {
71 
72 class ProjectImpl : public ContainerImpl, public virtual ProjectIface {
73 protected:
74  virtual ~ProjectImpl ();
75 public:
76  explicit ProjectImpl (BseObject*);
77  virtual void change_name (const String &name) override;
78  virtual Error play () override;
79  virtual Error activate () override;
80  virtual bool can_play () override;
81  virtual bool is_playing () override;
82  virtual bool is_active () override;
83  virtual void start_playback () override;
84  virtual void stop_playback () override;
85  virtual void deactivate () override;
86  virtual void stop () override;
87  virtual void auto_deactivate (int msec_delay) override;
88  virtual int undo_depth () override;
89  virtual void undo () override;
90  virtual int redo_depth () override;
91  virtual void redo () override;
92  virtual void clear_undo () override;
93  virtual void clean_dirty () override;
94  virtual bool is_dirty () override;
95  virtual void inject_midi_control (int midi_channel, int midi_control, double control_value) override;
96  virtual Error import_midi_file (const String &file_name) override;
97  virtual Error restore_from_file (const String &file_name) override;
98  virtual ProjectState get_state () override;
99  virtual SuperSeq get_supers () override;
100  virtual Error store_bse (SuperIface &super, const String &file_name, bool self_contained) override;
101  virtual SongIfaceP create_song (const String &name) override;
102  virtual WaveRepoIfaceP get_wave_repo () override;
103  virtual SoundFontRepoIfaceP get_sound_font_repo () override;
104  virtual CSynthIfaceP create_csynth (const String &name) override;
105  virtual MidiSynthIfaceP create_midi_synth (const String &name) override;
106  virtual MidiNotifierIfaceP get_midi_notifier () override;
107  virtual void remove_snet (SNetIface &snet) override;
108 };
109 
110 } // Bse
111 
112 #endif /* __BSE_PROJECT_H__ */
Definition: bsecsynth.hh:15
Definition: bsecontainer.hh:24
The Bse namespace contains all functions of the synthesis engine.
Definition: bstbseutils.cc:91
A list of Super type objects.
Definition: bseapi.idl:631
Definition: bsesnet.hh:34
Definition: bsesuper.hh:23
STL class.
Definition: bsecontainer.hh:27
Definition: bseproject.hh:30
Definition: bseobject.hh:57
Definition: bsesong.hh:23
Definition: bsestorage.hh:45
Definition: bsemidinotifier.hh:17
Definition: bsewaverepo.hh:17
Definition: bseproject.hh:17
ProjectState
Enumeration describing the current activation and playback state of a project.
Definition: bseapi.idl:833
Definition: bseproject.hh:72
Definition: bseitem.hh:32
Definition: bsesoundfontrepo.hh:28
uname