blender/intern/ghost/GHOST_IEventConsumer.h

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

40 lines
1.1 KiB
C
Raw Normal View History

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2001-2002 NaN Holding BV. All rights reserved. */
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.h"
/**
* 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
*/
2012-05-19 09:23:08 +00:00
virtual bool processEvent(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
};