1*d3dc729fSAxel Dörfler /* 2*d3dc729fSAxel Dörfler * Copyright (c) 2003-4 Kian Duffy <myob@users.sourceforge.net> 3*d3dc729fSAxel Dörfler * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai. 4*d3dc729fSAxel Dörfler * 5*d3dc729fSAxel Dörfler * Permission is hereby granted, free of charge, to any person obtaining 6*d3dc729fSAxel Dörfler * a copy of this software and associated documentation files or portions 7*d3dc729fSAxel Dörfler * thereof (the "Software"), to deal in the Software without restriction, 8*d3dc729fSAxel Dörfler * including without limitation the rights to use, copy, modify, merge, 9*d3dc729fSAxel Dörfler * publish, distribute, sublicense, and/or sell copies of the Software, 10*d3dc729fSAxel Dörfler * and to permit persons to whom the Software is furnished to do so, subject 11*d3dc729fSAxel Dörfler * to the following conditions: 12*d3dc729fSAxel Dörfler * 13*d3dc729fSAxel Dörfler * * Redistributions of source code must retain the above copyright notice, 14*d3dc729fSAxel Dörfler * this list of conditions and the following disclaimer. 15*d3dc729fSAxel Dörfler * 16*d3dc729fSAxel Dörfler * * Redistributions in binary form must reproduce the above copyright notice 17*d3dc729fSAxel Dörfler * in the binary, as well as this list of conditions and the following 18*d3dc729fSAxel Dörfler * disclaimer in the documentation and/or other materials provided with 19*d3dc729fSAxel Dörfler * the distribution. 20*d3dc729fSAxel Dörfler * 21*d3dc729fSAxel Dörfler * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22*d3dc729fSAxel Dörfler * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23*d3dc729fSAxel Dörfler * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 24*d3dc729fSAxel Dörfler * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25*d3dc729fSAxel Dörfler * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26*d3dc729fSAxel Dörfler * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27*d3dc729fSAxel Dörfler * THE SOFTWARE. 28*d3dc729fSAxel Dörfler * 29*d3dc729fSAxel Dörfler */ 30*d3dc729fSAxel Dörfler 31*d3dc729fSAxel Dörfler #ifndef TERMAPP_H 32*d3dc729fSAxel Dörfler #define TERMAPP_H 33*d3dc729fSAxel Dörfler 34*d3dc729fSAxel Dörfler #include <app/Application.h> 35*d3dc729fSAxel Dörfler #include <String.h> 36*d3dc729fSAxel Dörfler 37*d3dc729fSAxel Dörfler extern int pfd; 38*d3dc729fSAxel Dörfler extern char *ptyname; 39*d3dc729fSAxel Dörfler 40*d3dc729fSAxel Dörfler class TermWindow; 41*d3dc729fSAxel Dörfler class TermParse; 42*d3dc729fSAxel Dörfler class BRect; 43*d3dc729fSAxel Dörfler class AboutDlg; 44*d3dc729fSAxel Dörfler 45*d3dc729fSAxel Dörfler class TermApp : public BApplication 46*d3dc729fSAxel Dörfler { 47*d3dc729fSAxel Dörfler public: 48*d3dc729fSAxel Dörfler TermApp (void); 49*d3dc729fSAxel Dörfler ~TermApp (void); 50*d3dc729fSAxel Dörfler 51*d3dc729fSAxel Dörfler private: 52*d3dc729fSAxel Dörfler /* 53*d3dc729fSAxel Dörfler * Hook functions 54*d3dc729fSAxel Dörfler */ 55*d3dc729fSAxel Dörfler void ReadyToRun (void); 56*d3dc729fSAxel Dörfler void Quit (void); 57*d3dc729fSAxel Dörfler void MessageReceived (BMessage* msg); 58*d3dc729fSAxel Dörfler void RefsReceived(BMessage *message); 59*d3dc729fSAxel Dörfler void ArgvReceived(int32 argc, char **argv); 60*d3dc729fSAxel Dörfler 61*d3dc729fSAxel Dörfler /* 62*d3dc729fSAxel Dörfler * Public Member functions. 63*d3dc729fSAxel Dörfler */ 64*d3dc729fSAxel Dörfler void MakeTermWindow (BRect &frame); 65*d3dc729fSAxel Dörfler void RunNewTerm (void); 66*d3dc729fSAxel Dörfler void SwitchTerm(void); 67*d3dc729fSAxel Dörfler void ActivateTermWindow(team_id id); 68*d3dc729fSAxel Dörfler 69*d3dc729fSAxel Dörfler void Usage(char *name); 70*d3dc729fSAxel Dörfler 71*d3dc729fSAxel Dörfler private: 72*d3dc729fSAxel Dörfler bool IsMinimize (team_id); 73*d3dc729fSAxel Dörfler 74*d3dc729fSAxel Dörfler int fRows, fCols, fXpos, fYpos; 75*d3dc729fSAxel Dörfler int fWindowNumber; 76*d3dc729fSAxel Dörfler rgb_color fFg, fBg, fCurFg, fCurBg, fSelFg, fSelbg; 77*d3dc729fSAxel Dörfler rgb_color fImfg, fImbg, fImSel; 78*d3dc729fSAxel Dörfler 79*d3dc729fSAxel Dörfler TermWindow *fTermWindow; 80*d3dc729fSAxel Dörfler TermParse *fTermParse; 81*d3dc729fSAxel Dörfler BRect fTermFrame; 82*d3dc729fSAxel Dörfler AboutDlg *fAboutPanel; 83*d3dc729fSAxel Dörfler 84*d3dc729fSAxel Dörfler BString CommandLine; 85*d3dc729fSAxel Dörfler 86*d3dc729fSAxel Dörfler }; 87*d3dc729fSAxel Dörfler 88*d3dc729fSAxel Dörfler #endif 89*d3dc729fSAxel Dörfler 90