OpenShot Library | libopenshot-audio
0.2.0
juce_MessageListener.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
//==============================================================================
31
/**
32
MessageListener subclasses can post and receive Message objects.
33
34
@see Message, MessageManager, ActionListener, ChangeListener
35
36
@tags{Events}
37
*/
38
class
JUCE_API
MessageListener
39
{
40
public
:
41
//==============================================================================
42
MessageListener
() noexcept;
43
44
/** Destructor. */
45
virtual
~
MessageListener
();
46
47
//==============================================================================
48
/** This is the callback method that receives incoming messages.
49
50
This is called by the MessageManager from its dispatch loop.
51
52
@see postMessage
53
*/
54
virtual
void
handleMessage (
const
Message
& message) = 0;
55
56
//==============================================================================
57
/** Sends a message to the message queue, for asynchronous delivery to this listener
58
later on.
59
60
This method can be called safely by any thread.
61
62
@param message the message object to send - this will be deleted
63
automatically by the message queue, so make sure it's
64
allocated on the heap, not the stack!
65
@see handleMessage
66
*/
67
void
postMessage (
Message
* message)
const
;
68
69
private
:
70
WeakReference<MessageListener>::Master
masterReference;
71
friend
class
WeakReference
<
MessageListener
>;
72
};
73
74
}
// namespace juce
75
76
/** @}*/
juce::Message
The base class for objects that can be sent to a MessageListener.
Definition:
juce_Message.h:47
JUCE_API
#define JUCE_API
This macro is added to all JUCE public class declarations.
Definition:
juce_StandardHeader.h:143
juce::MessageListener
MessageListener subclasses can post and receive Message objects.
Definition:
juce_MessageListener.h:38
juce::WeakReference
This class acts as a pointer which will automatically become null if the object to which it points is...
Definition:
juce_WeakReference.h:81
juce::WeakReference::Master
This class is embedded inside an object to which you want to attach WeakReference pointers.
Definition:
juce_WeakReference.h:156
juce_events
messages
juce_MessageListener.h
Generated on Wed Jun 24 2020 20:19:20 for OpenShot Library | libopenshot-audio by
1.8.17