File: terminal.h

package info (click to toggle)
jp2a 1.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,076 kB
  • sloc: ansic: 2,244; sh: 159; makefile: 51
file content (32 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*! \file
 * \noop Copyright 2020 Christoph Raitzig
 * 
 * \brief Functions for querying terminal features.
 *
 * \author Christoph Raitzig
 * \copyright Distributed under the GNU General Public License (GPL) v2.
 */

#ifndef INC_JP2A_TERMINAL_H
#define INC_JP2A_TERMINAL_H

/*!
 * \brief Get the terminal dimensions.
 *
 * \param width_,height_ stores the dimensions
 * \param error stores an error (if one occurs)
 * \return 1  success\n
 *         0  terminal type not defined\n
 *         -1  termcap database inaccessible\n
 *         -2  environment variable TERM not set\n
 */
int get_termsize(int* width_, int* height_, char** error);

/*!
 * \brief Checks whether the terminal supports true color.
 *
 * \return true if the terminal supports true color, false otherwise
 */
int supports_true_color();

#endif