blender/intern/ghost/GHOST_IEventConsumer.hh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
C++
Raw Normal View History

/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
2011-02-25 11:28:33 +00:00
/** \file
* \ingroup GHOST
* Declaration of GHOST_IEventConsumer interface class.
2002-10-12 11:37:38 +00:00
*/
#pragma once
2002-10-12 11:37:38 +00:00
#include "GHOST_IEvent.hh"
2002-10-12 11:37:38 +00:00
/**
* Interface class for objects interested in receiving events.
* Objects interested in events should inherit this class and implement the
* processEvent() method. They should then be registered with the system that
* they want to receive events. The system will call the processEvent() method
* for every installed event consumer to pass events.
* \see GHOST_ISystem#addEventConsumer
2002-10-12 11:37:38 +00:00
*/
class GHOST_IEventConsumer {
public:
/**
* Destructor.
*/
virtual ~GHOST_IEventConsumer() {}
2002-10-12 11:37:38 +00:00
/**
* This method is called by the system when it has events to dispatch.
* \see GHOST_ISystem#dispatchEvents
* \param event: The event that can be handled or ignored.
* \return Indication as to whether the event was handled.
2002-10-12 11:37:38 +00:00
*/
virtual bool processEvent(const GHOST_IEvent *event) = 0;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IEventConsumer")
#endif
2002-10-12 11:37:38 +00:00
};