vfs: check userland buffers before reading them.
[haiku.git] / src / tests / apps / miniterminal / MiniView.h
blob9d8c6072ebb02818e558f59998200623fb9d7ea9
1 #ifndef _MINI_TERMINAL_H_
2 #define _MINI_TERMINAL_H_
4 #include <MessageFilter.h>
6 #include "ViewBuffer.h"
7 #include "Console.h"
9 class Arguments;
11 class MiniView : public ViewBuffer {
12 public:
13 MiniView(const Arguments &args);
14 virtual ~MiniView();
16 void Start();
17 status_t OpenTTY();
18 status_t SpawnThreads();
20 virtual void FrameResized(float width, float height);
21 virtual void KeyDown(const char *bytes, int32 numBytes);
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);
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;
37 #endif