notcurses/include/ncpp/Root.hh
Nick Black e6637e81cc
Prep for serious rusting #101 (#354)
* CMake: add USE_PANDOC, USE_DOXYGEN options #101
* README: mention rust
* start integrating rust into build #101
* CMake: add USE_NETWORK option for cargo
* Debian: build-dep on doxygen
* rust: colloquy checks in Cargo.lock
* extract NCKEY defines into their own include
* colloquy: use clap to parse CLI args
* CMake: unify option namespace
* Python: update include path
* Rust: fix up --frozen workings for -DUSE_NETWORK=off
* CMake: abstract out colloquy a little
* Sync direct.hh to the New Way
2020-02-18 12:36:16 -05:00

26 lines
782 B
C++

#ifndef __NCPP_ROOT_HH
#define __NCPP_ROOT_HH
#include <notcurses/notcurses.h>
#include "_helpers.hh"
#include "_exceptions.hh"
namespace ncpp {
class NCPP_API_EXPORT Root
{
protected:
static constexpr char ncpp_invalid_state_message[] = "notcurses++ is in an invalid state (already stopped?)";
protected:
notcurses* get_notcurses () const;
// All the objects which need to destroy notcurses entities (planes, panelreel etc etc) **have to** call this
// function before calling to notcurses from their destructor. This is to prevent a segfault when
// NotCurses::stop has been called and the app uses smart pointers holding NotCurses objects which may be
// destructed **after** notcurses is stopped.
bool is_notcurses_stopped () const noexcept;
};
}
#endif