1 #ifndef _MINI_TERMINAL_H_ 2 #define _MINI_TERMINAL_H_ 3 4 #include <MessageFilter.h> 5 6 #include "ViewBuffer.h" 7 #include "Console.h" 8 9 class Arguments; 10 11 class MiniView : public ViewBuffer { 12 public: 13 MiniView(const Arguments &args); 14 virtual ~MiniView(); 15 16 void Start(); 17 status_t OpenTTY(); 18 status_t SpawnThreads(); 19 20 virtual void FrameResized(float width, float height); 21 virtual void KeyDown(const char *bytes, int32 numBytes); 22 23 private: 24 static int32 ConsoleWriter(void *arg); 25 static int32 ExecuteShell(void *arg); 26 static filter_result MessageFilter(BMessage *message, BHandler **target, BMessageFilter *filter); 27 28 const Arguments &fArguments; 29 Console *fConsole; 30 int fMasterFD; 31 int fSlaveFD; 32 thread_id fShellExecutor; 33 thread_id fShellProcess; 34 thread_id fConsoleWriter; 35 }; 36 37 #endif 38