2023-12-25 16:26:13 +00:00
|
|
|
#ifndef TERML_TERML_LINUX_H
|
|
|
|
#define TERML_TERML_LINUX_H
|
|
|
|
|
|
|
|
#include "terml_private.h"
|
|
|
|
|
|
|
|
#ifndef _WIN32
|
|
|
|
|
|
|
|
#include <termios.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
class terml_linux : public terml
|
|
|
|
{
|
|
|
|
protected:
|
2024-03-08 20:44:27 +00:00
|
|
|
virtual void set_console_settings_impl() override;
|
|
|
|
virtual void reset_console_settings_impl() override;
|
2023-12-25 16:26:13 +00:00
|
|
|
virtual void read_stdin(char* buffer, unsigned int buffer_size) override;
|
|
|
|
virtual unsigned long long timer() override;
|
|
|
|
virtual unsigned long long timer_frequency() override;
|
|
|
|
virtual void process_events() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
termios old_input_settings;
|
|
|
|
termios old_output_settings;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif//_WIN32
|
|
|
|
|
|
|
|
#endif//TERML_TERML_LINUX_H
|