1/* 2 * Copyright 1999-2009 Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Jeremy Friesner 7 */ 8#ifndef _SHORTCUTS_SERVER_FILTER_H 9#define _SHORTCUTS_SERVER_FILTER_H 10 11 12#include <stdio.h> 13 14 15#include <Messenger.h> 16#include <Message.h> 17#include <List.h> 18#include <InputServerFilter.h> 19 20#ifdef __POWERPC__ 21#pragma export on 22#endif 23 24 25// export this for the input_server 26extern "C" _EXPORT BInputServerFilter* instantiate_input_filter(); 27 28 29class KeyCommandMap; 30class CommandExecutor; 31 32class ShortcutsServerFilter : public BInputServerFilter { 33public: 34 ShortcutsServerFilter(); 35 virtual ~ShortcutsServerFilter(); 36 37 virtual status_t InitCheck(); 38 virtual filter_result Filter(BMessage* message, BList* outList); 39 40private: 41 // Tells us what command goes with a given key 42 KeyCommandMap* fMap; 43 44 // Executes the given commands 45 CommandExecutor* fExecutor; 46 47 // Points to fExecutor:declaration order is important! 48 BMessenger fMessenger; 49}; 50 51 52#ifdef __POWERPC__ 53#pragma export reset 54#endif 55 56#endif // _SHORTCUTS_SERVER_FILTER_H 57