| 1 | /*
|
|---|
| 2 | * synergy -- mouse and keyboard sharing utility
|
|---|
| 3 | * Copyright (C) 2002 Chris Schoeneman
|
|---|
| 4 | *
|
|---|
| 5 | * This package is free software; you can redistribute it and/or
|
|---|
| 6 | * modify it under the terms of the GNU General Public License
|
|---|
| 7 | * found in the file COPYING that should have accompanied this file.
|
|---|
| 8 | *
|
|---|
| 9 | * This package is distributed in the hope that it will be useful,
|
|---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | * GNU General Public License for more details.
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | #ifndef IARCHCONSOLE_H
|
|---|
| 16 | #define IARCHCONSOLE_H
|
|---|
| 17 |
|
|---|
| 18 | #include "IInterface.h"
|
|---|
| 19 |
|
|---|
| 20 | //! Interface for architecture dependent console output
|
|---|
| 21 | /*!
|
|---|
| 22 | This interface defines the console operations required by
|
|---|
| 23 | synergy. Each architecture must implement this interface.
|
|---|
| 24 | */
|
|---|
| 25 | class IArchConsole : public IInterface {
|
|---|
| 26 | public:
|
|---|
| 27 | //! @name manipulators
|
|---|
| 28 | //@{
|
|---|
| 29 |
|
|---|
| 30 | //! Open the console
|
|---|
| 31 | /*!
|
|---|
| 32 | Opens the console for writing. The console is opened automatically
|
|---|
| 33 | on the first write so calling this method is optional. Uses \c title
|
|---|
| 34 | for the console's title if appropriate for the architecture. Calling
|
|---|
| 35 | this method on an already open console must have no effect.
|
|---|
| 36 | */
|
|---|
| 37 | virtual void openConsole(const char* title) = 0;
|
|---|
| 38 |
|
|---|
| 39 | //! Close the console
|
|---|
| 40 | /*!
|
|---|
| 41 | Close the console. Calling this method on an already closed console
|
|---|
| 42 | must have no effect.
|
|---|
| 43 | */
|
|---|
| 44 | virtual void closeConsole() = 0;
|
|---|
| 45 |
|
|---|
| 46 | //! Show the console
|
|---|
| 47 | /*!
|
|---|
| 48 | Causes the console to become visible. This generally only makes sense
|
|---|
| 49 | for a console in a graphical user interface. Other implementations
|
|---|
| 50 | will do nothing. Iff \p showIfEmpty is \c false then the implementation
|
|---|
| 51 | may optionally only show the console if it's not empty.
|
|---|
| 52 | */
|
|---|
| 53 | virtual void showConsole(bool showIfEmpty) = 0;
|
|---|
| 54 |
|
|---|
| 55 | //! Write to the console
|
|---|
| 56 | /*!
|
|---|
| 57 | Writes the given string to the console, opening it if necessary.
|
|---|
| 58 | */
|
|---|
| 59 | virtual void writeConsole(const char*) = 0;
|
|---|
| 60 |
|
|---|
| 61 | //! Returns the newline sequence for the console
|
|---|
| 62 | /*!
|
|---|
| 63 | Different consoles use different character sequences for newlines.
|
|---|
| 64 | This method returns the appropriate newline sequence for the console.
|
|---|
| 65 | */
|
|---|
| 66 | virtual const char* getNewlineForConsole() = 0;
|
|---|
| 67 |
|
|---|
| 68 | //@}
|
|---|
| 69 | };
|
|---|
| 70 |
|
|---|
| 71 | #endif
|
|---|