OpenShot Library | OpenShotAudio  0.2.2
juce_Message.h
1 
2 /** @weakgroup juce_events-messages
3  * @{
4  */
5 /*
6  ==============================================================================
7 
8  This file is part of the JUCE library.
9  Copyright (c) 2017 - ROLI Ltd.
10 
11  JUCE is an open source library subject to commercial or open-source
12  licensing.
13 
14  The code included in this file is provided under the terms of the ISC license
15  http://www.isc.org/downloads/software-support-policy/isc-license. Permission
16  To use, copy, modify, and/or distribute this software for any purpose with or
17  without fee is hereby granted provided that the above copyright notice and
18  this permission notice appear in all copies.
19 
20  JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21  EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22  DISCLAIMED.
23 
24  ==============================================================================
25 */
26 
27 namespace juce
28 {
29 
30 class MessageListener;
31 
32 
33 //==============================================================================
34 /** The base class for objects that can be sent to a MessageListener.
35 
36  If you want to send a message that carries some kind of custom data, just
37  create a subclass of Message with some appropriate member variables to hold
38  your data.
39 
40  Always create a new instance of a Message object on the heap, as it will be
41  deleted automatically after the message has been delivered.
42 
43  @see MessageListener, MessageManager, ActionListener, ChangeListener
44 
45  @tags{Events}
46 */
48 {
49 public:
50  //==============================================================================
51  /** Creates an uninitialised message. */
52  Message() noexcept;
53  ~Message() override;
54 
56 
57  //==============================================================================
58 private:
59  friend class MessageListener;
61  void messageCallback() override;
62 
63  // Avoid the leak-detector because for plugins, the host can unload our DLL with undelivered
64  // messages still in the system event queue. These aren't harmful, but can cause annoying assertions.
65  JUCE_DECLARE_NON_COPYABLE (Message)
66 };
67 
68 } // namespace juce
69 
70 /** @}*/
MessageListener subclasses can post and receive Message objects.
Internal class used as the base class for all message objects.
The base class for objects that can be sent to a MessageListener.
Definition: juce_Message.h:48
A smart-pointer class which points to a reference-counted object.
This class acts as a pointer which will automatically become null if the object to which it points is...
#define JUCE_API
This macro is added to all JUCE public class declarations.