libvtemm Reference Documentation |
Public Member Functions | |
void | close () |
Close a pty. | |
int | get_pty () const |
Gets descriptor for the master side of the PTY pair. | |
Size | get_size () const |
Attempts to read the pseudo terminal's window size. | |
Master (int d=-1) | |
Sets descriptor for the master side of PTY pair to d. | |
Glib::Pid | open (const std::string& command=std::string(), const StdStringArrayHandle& argv=StdStringArrayHandle(0, Glib::OWNERSHIP_NONE), const StdStringArrayHandle& env_add=StdStringArrayHandle(0, Glib::OWNERSHIP_NONE), const std::string& directory=std::string(), int columns=0, int rows=0, bool lastlog=false, bool utmp=false, bool wtmp=false) |
Start up the given binary (exact path, not interpreted at all) in a pseudo-terminal of its own, returning the child's PID and logging the session to the specified files. | |
bool | set_size (int columns, int rows) |
Attempts to resize the pseudo terminal's window size. | |
void | set_utf8 (bool utf8=true) |
Try to let the kernel know that the terminal is or is not UTF-8. | |
~Master () | |
If master side of PTY pair is not equal to -1, it calls close(). |
Gnome::Vte::Pty::Master::Master | ( | int | d = -1 |
) |
Sets descriptor for the master side of PTY pair to d.
Use other than default value at your own risk. Otherwise use open() to set a descriptor.
d | Descriptor for the master side of PTY pair. -1 by default. |
Gnome::Vte::Pty::Master::~Master | ( | ) |
If master side of PTY pair is not equal to -1, it calls close().
Otherwise it do nothing.
void Gnome::Vte::Pty::Master::close | ( | ) |
Close a pty.
This is also called in destructor.
int Gnome::Vte::Pty::Master::get_pty | ( | ) | const |
Gets descriptor for the master side of the PTY pair.
Size Gnome::Vte::Pty::Master::get_size | ( | ) | const |
Attempts to read the pseudo terminal's window size.
If something goes wrong, Gnome::Vte::Pty::Size::is_ok() will return false
and errno
will be set.
Glib::Pid Gnome::Vte::Pty::Master::open | ( | const std::string & | command = std::string() , |
|
const StdStringArrayHandle& | argv = StdStringArrayHandle(0, Glib::OWNERSHIP_NONE) , |
|||
const StdStringArrayHandle& | env_add = StdStringArrayHandle(0, Glib::OWNERSHIP_NONE) , |
|||
const std::string & | directory = std::string() , |
|||
int | columns = 0 , |
|||
int | rows = 0 , |
|||
bool | lastlog = false , |
|||
bool | utmp = false , |
|||
bool | wtmp = false | |||
) |
Start up the given binary (exact path, not interpreted at all) in a pseudo-terminal of its own, returning the child's PID and logging the session to the specified files.
command | Command to be executed (not interpreted at all). If empty, fork will be executed. | |
argv | Empty string terminated list of arguments given to executed binary (argv[0] should be a binary name). See Gnome::Vte::Terminal::fork_command() for description about format of this parameter. | |
env_add | Empty string terminated list of environment variables to be added before executing a command. See Gnome::Vte::Terminal::fork_command() for description about format of this parameter. | |
directory | Path where command have to be executed. If empty, path will be inherited from parent. | |
columns | Number of columns of pty. If set to 0, compiled-in defaults will be used. | |
rows | Number of rows of pty. If set to 0, compiled-in defaults will be used. | |
lastlog | true if the session should be logged to the lastlog. | |
utmp | true if the session should be logged to the utmp/utmpx log. | |
wtmp | true if the session should be logged to the wtmp/wtmpx log. |
bool Gnome::Vte::Pty::Master::set_size | ( | int | columns, | |
int | rows | |||
) |
Attempts to resize the pseudo terminal's window size.
If successful, the OS kernel will send SIGWINCH
to the child process group, otherwise false
will be returned and errno
will be set.
columns | The desired number of columns. | |
rows | The desired number of rows. |
false
if there was an error, otherwise true
. void Gnome::Vte::Pty::Master::set_utf8 | ( | bool | utf8 = true |
) |
Try to let the kernel know that the terminal is or is not UTF-8.
utf8 | true if the terminal is UTF-8. |