1 /* 2 * Copyright 2011, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef SWITCHER_H 6 #define SWITCHER_H 7 8 9 #include <Application.h> 10 11 12 class BMessage; 13 14 15 enum { 16 kNowhere = 0, 17 kTopEdge = 0x01, 18 kBottomEdge = 0x02, 19 kLeftEdge = 0x04, 20 kRightEdge = 0x08, 21 // TODO: not yet supported 22 kTopLeftCorner = 0x10, 23 kTopRightCorner = 0x20, 24 kBottomLeftCorner = 0x40, 25 kBottomRightCorner = 0x80 26 }; 27 28 enum { 29 kShowApplications, 30 kShowApplicationWindows, 31 kShowWorkspaceWindows, 32 kShowAllWindows, 33 kShowWorkspaces, 34 kShowShelf, 35 kShowFavorites, 36 kShowRecentFiles, 37 kShowFilesClipboard, 38 kShowFolder, 39 kShowQuery 40 }; 41 42 43 static const uint32 kMsgLocationTrigger = 'LoTr'; 44 static const uint32 kMsgLocationFree = 'LoFr'; 45 static const uint32 kMsgHideWhenMouseMovedOut = 'HwMo'; 46 47 48 class Switcher : public BApplication { 49 public: 50 Switcher(); 51 virtual ~Switcher(); 52 53 virtual void ReadyToRun(); 54 55 virtual void MessageReceived(BMessage* message); 56 57 private: 58 BMessenger fCaptureMessenger; 59 uint32 fOccupiedLocations; 60 }; 61 62 63 extern const char* kSignature; 64 65 66 #endif // SWITCHER_H 67