LMMS
Loading...
Searching...
No Matches
juce_MessageListener.cpp
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
28
30{
31 if (auto* r = recipient.get())
32 r->handleMessage (*this);
33}
34
36{
37 // Are you trying to create a messagelistener before or after juce has been initialised??
39}
40
45
47{
48 message->recipient = const_cast<MessageListener*> (this);
49 message->post();
50}
51
52} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
static void message(int level, const char *fmt,...)
Definition adplugdb.cpp:120
Definition juce_Message.h:44
Message() noexcept
Definition juce_MessageListener.cpp:26
WeakReference< MessageListener > recipient
Definition juce_Message.h:56
void messageCallback() override
Definition juce_MessageListener.cpp:29
~Message() override
Definition juce_MessageListener.cpp:27
virtual ~MessageListener()
Definition juce_MessageListener.cpp:41
WeakReference< MessageListener >::Master masterReference
Definition juce_MessageListener.h:66
MessageListener() noexcept
Definition juce_MessageListener.cpp:35
void postMessage(Message *message) const
Definition juce_MessageListener.cpp:46
#define JUCE_ASSERT_MESSAGE_MANAGER_EXISTS
Definition juce_MessageManager.h:479
Definition carla_juce.cpp:31
int r
Definition crypt.c:458