C-Menu
0.2.9
A User Interface Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_ncurses_compat.h
Go to the documentation of this file.
1
#
pragma
once
2
#
ifdef
__cplusplus
3
extern
"C"
{
4
#
endif
5
6
/** @file ui_ncurses_compat.h
7
@ingroup ui_ncurses
8
@brief Non-portable escape hatch for the NCurses backend.
9
10
@warning Including this header couples application code to the NCurses
11
backend. Use only when NCurses-specific functionality is required and
12
portability to other backends (e.g., NotCurses) is not needed. These
13
functions are intentionally not declared in ui_backend.h.
14
*/
15
16
#
include
"ui_backend.h"
17
#
include
<
ncursesw
/
ncurses
.
h
>
18
#
include
<
ncursesw
/
panel
.
h
>
19
20
// Either of the following two structs can be used to represent a character with
21
// attributes and color information. The ui_cchar struct is compatible with the
22
// NCurses cchar_t type, while the ui_xchar struct is a custom implementation
23
// that uses 4-byte integers for attributes and color information.
24
25
// UiCchar ui_cchar_str[4096];
26
// UiXchar ui_xchar_str[4096];
27
28
/** @brief Return the raw NCurses @c WINDOW* underlying a surface.
29
@param s The UiSurface to inspect.
30
@return The WINDOW pointer, or NULL if @p s is NULL.
31
*/
32
WINDOW *
ui_ncurses_surface_get_win
(
const
UiSurface *s, ss_t w);
33
34
/** @brief Return the raw NCurses @c PANEL* underlying a surface.
35
@param s The UiSurface to inspect.
36
@param w UiSurface window
37
@return The PANEL pointer, or NULL if @p s is NULL.
38
*/
39
PANEL *
ui_ncurses_surface_get_panel
(
const
UiSurface *s, ss_t w);
40
41
#
ifdef
__cplusplus
42
}
43
#
endif
ui_ncurses_surface_get_win
WINDOW * ui_ncurses_surface_get_win(const UiSurface *s, ss_t w)
Get the current FILE pointer for the TTY used by the UI.
Definition
ui_ncurses.c:1204
ui_ncurses_surface_get_panel
PANEL * ui_ncurses_surface_get_panel(const UiSurface *s, ss_t w)
Get the current PANEL pointer for a specific window within a UiSurface.
Definition
ui_ncurses.c:1215
ui
ui_ncurses_compat.h
Generated by
1.17.0