diff options
author | David Robillard <d@drobilla.net> | 2007-06-06 02:51:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-06 02:51:08 +0000 |
commit | 5a2358e39602607757fedd08a7355bede3cb8739 (patch) | |
tree | 97e7c12667966a8bbc4e9d29a8eceb52fca18fb2 /src/PatchageCanvas.h | |
parent | a62edb3f48133352c085e58c970cd77790d47df2 (diff) | |
download | patchage-5a2358e39602607757fedd08a7355bede3cb8739.tar.gz patchage-5a2358e39602607757fedd08a7355bede3cb8739.tar.bz2 patchage-5a2358e39602607757fedd08a7355bede3cb8739.zip |
Nicer Flowcanvas naming.
git-svn-id: http://svn.drobilla.net/lad/patchage@529 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageCanvas.h')
-rw-r--r-- | src/PatchageCanvas.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/PatchageCanvas.h b/src/PatchageCanvas.h new file mode 100644 index 0000000..ab9b92e --- /dev/null +++ b/src/PatchageCanvas.h @@ -0,0 +1,58 @@ +/* This file is part of Patchage. + * Copyright (C) 2007 Dave Robillard <http://drobilla.net> + * + * Patchage is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef PATCHAGECANVAS_H +#define PATCHAGECANVAS_H + +#include <string> +#ifdef HAVE_ALSA +#include <alsa/asoundlib.h> +#endif +#include <flowcanvas/Canvas.h> +#include "StateManager.h" + +class Patchage; +class PatchageModule; +class PatchagePort; + +using std::string; +using namespace FlowCanvas; + +class PatchageCanvas : public Canvas +{ +public: + PatchageCanvas(Patchage* _app, int width, int height); + + boost::shared_ptr<PatchageModule> find_module(const string& name, ModuleType type); +#ifdef HAVE_ALSA + boost::shared_ptr<PatchagePort> find_port(const snd_seq_addr_t* alsa_addr); +#endif + void connect(boost::shared_ptr<Connectable> port1, boost::shared_ptr<Connectable> port2); + void disconnect(boost::shared_ptr<Connectable> port1, boost::shared_ptr<Connectable> port2); + + void status_message(const string& msg); + + boost::shared_ptr<Item> get_item(const string& name); + boost::shared_ptr<Port> get_port(const string& module_name, + const string& port_name); + +private: + Patchage* _app; +}; + + +#endif // PATCHAGECANVAS_H |