/[svn]/linuxsampler/trunk/src/EventListeners.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/EventListeners.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1541 by iliev, Tue Dec 4 18:09:26 2007 UTC revision 1761 by iliev, Fri Aug 29 15:42:06 2008 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2007 Grigor Iliev                                       *   *   Copyright (C) 2007, 2008 Grigor Iliev                                 *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 26  Line 26 
26    
27  namespace LinuxSampler {  namespace LinuxSampler {
28    
29        // just symbol prototyping
30        class SamplerChannel;
31        class MidiInputDevice;
32        class MidiInputPort;
33    
34      template<class L>      template<class L>
35      class ListenerList {      class ListenerList {
36          public:          public:
# Line 87  namespace LinuxSampler { Line 92  namespace LinuxSampler {
92               * @param NewCount The new number of sampler channels.               * @param NewCount The new number of sampler channels.
93               */               */
94              virtual void ChannelCountChanged(int NewCount) = 0;              virtual void ChannelCountChanged(int NewCount) = 0;
95                virtual void ChannelAdded(SamplerChannel* pChannel) = 0;
96                virtual void ChannelToBeRemoved(SamplerChannel* pChannel) = 0;
97        };
98    
99        /**
100         * This class exists as convenience for creating listener objects.
101         * The methods in this class are empty.
102         */
103        class ChannelCountAdapter : public ChannelCountListener {
104            public:
105                virtual void ChannelCountChanged(int NewCount) { };
106                virtual void ChannelAdded(SamplerChannel* pChannel) { };
107                virtual void ChannelToBeRemoved(SamplerChannel* pChannel) { };
108      };      };
109    
110      /**      /**
# Line 113  namespace LinuxSampler { Line 131  namespace LinuxSampler {
131               * @param NewCount The new number of MIDI input devices.               * @param NewCount The new number of MIDI input devices.
132               */               */
133              virtual void MidiDeviceCountChanged(int NewCount) = 0;              virtual void MidiDeviceCountChanged(int NewCount) = 0;
134    
135                /**
136                 * Invoked right before the supplied MIDI input device is going
137                 * to be destroyed.
138                 * @param pDevice MidiInputDevice to be deleted
139                 */
140                virtual void MidiDeviceToBeDestroyed(MidiInputDevice* pDevice) = 0;
141    
142                /**
143                 * Invoked to inform that a new MidiInputDevice has just been
144                 * created.
145                 * @param pDevice newly created MidiInputDevice
146                 */
147                virtual void MidiDeviceCreated(MidiInputDevice* pDevice) = 0;
148        };
149    
150        /**
151         * This class is used as a listener, which is notified
152         * when the number of MIDI input ports is changed.
153         */
154        class MidiPortCountListener {
155            public:
156                /**
157                 * Invoked when the number of MIDI input ports has changed.
158                 * @param NewCount The new number of MIDI input ports.
159                 */
160                virtual void MidiPortCountChanged(int NewCount) = 0;
161    
162                /**
163                 * Invoked right before the supplied MIDI input port is going
164                 * to be destroyed.
165                 * @param pPort MidiInputPort to be deleted
166                 */
167                virtual void MidiPortToBeRemoved(MidiInputPort* pPort) = 0;
168    
169                /**
170                 * Invoked to inform that a new MidiInputPort has just been
171                 * added.
172                 * @param pPort newly created MidiInputPort
173                 */
174                virtual void MidiPortAdded(MidiInputPort* pPort) = 0;
175      };      };
176    
177      /**      /**
# Line 263  namespace LinuxSampler { Line 322  namespace LinuxSampler {
322      class EngineChangeListener {      class EngineChangeListener {
323          public:          public:
324              /**              /**
325                 * Invoked when the engine type of the specified sampler channel
326                 * is going to be changed soon.
327                 * @param ChannelId The numerical ID of the sampler channel
328                 */
329                virtual void EngineToBeChanged(int ChannelId) = 0;
330    
331                /**
332               * Invoked when the engine type of the               * Invoked when the engine type of the
333               * specified sampler channel is changed.               * specified sampler channel was changed.
334               * @param ChannelId The numerical ID of the sampler               * @param ChannelId The numerical ID of the sampler
335               * channel, which engine type has been changed.               * channel, which engine type has been changed.
336               */               */

Legend:
Removed from v.1541  
changed lines
  Added in v.1761

  ViewVC Help
Powered by ViewVC