mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-01 21:13:10 +01:00
add Application::windowSize()
This commit is contained in:
@@ -118,6 +118,12 @@ public:
|
||||
PRIO_SYSTEM = 100
|
||||
};
|
||||
|
||||
struct WindowSize
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
Application();
|
||||
/// Creates the Application.
|
||||
|
||||
@@ -294,6 +300,15 @@ public:
|
||||
/// help information has been encountered and no other things
|
||||
/// besides displaying help shall be done.
|
||||
|
||||
static WindowSize windowSize();
|
||||
/// Returns the current window size of the console window,
|
||||
/// if available.
|
||||
///
|
||||
/// Currently implemented for POSIX platforms (via TIOCGWINSZ ioctl())
|
||||
/// and Windows (GetConsoleScreenBufferInfo()).
|
||||
///
|
||||
/// Returns zero width and height if the window size cannot be determined.
|
||||
|
||||
const char* name() const;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user