2020-05-22 20:11:59 +00:00
|
|
|
#ifndef __NCPP_UTILITIES_HH
|
|
|
|
#define __NCPP_UTILITIES_HH
|
|
|
|
|
|
|
|
#include <notcurses/notcurses.h>
|
|
|
|
|
|
|
|
#include "_helpers.hh"
|
|
|
|
|
|
|
|
namespace ncpp
|
|
|
|
{
|
2020-05-24 12:41:18 +00:00
|
|
|
class NotCurses;
|
2020-05-22 20:11:59 +00:00
|
|
|
class Plane;
|
2020-05-24 12:41:18 +00:00
|
|
|
class Root;
|
2020-05-22 20:11:59 +00:00
|
|
|
|
|
|
|
class NCPP_API_EXPORT Utilities
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static ncplane* to_ncplane (const Plane *plane) noexcept;
|
|
|
|
|
|
|
|
static ncplane* to_ncplane (const Plane &plane) noexcept
|
|
|
|
{
|
|
|
|
return to_ncplane (&plane);
|
|
|
|
}
|
2020-05-24 12:41:18 +00:00
|
|
|
|
|
|
|
static NotCurses* get_notcurses_cpp (const Root *o) noexcept;
|
|
|
|
|
|
|
|
static NotCurses* get_notcurses_cpp (const Root &o) noexcept
|
|
|
|
{
|
|
|
|
return get_notcurses_cpp (&o);
|
|
|
|
}
|
|
|
|
|
|
|
|
static NotCurses* get_notcurses_cpp (const Plane *plane) noexcept;
|
|
|
|
|
|
|
|
static NotCurses* get_notcurses_cpp (const Plane &plane) noexcept
|
|
|
|
{
|
|
|
|
return get_notcurses_cpp (&plane);
|
|
|
|
}
|
2020-05-22 20:11:59 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|