C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
ui_ncurses_compat.h File Reference

Non-portable escape hatch for the NCurses backend. More...

#include "ui_backend.h"
#include <ncursesw/ncurses.h>
#include <ncursesw/panel.h>
Include dependency graph for ui_ncurses_compat.h:

Go to the source code of this file.

Functions

PANEL * ui_ncurses_surface_get_panel (const UiSurface *s, uint w)
 Return the raw NCurses PANEL* underlying a surface.
WINDOW * ui_ncurses_surface_get_win (const UiSurface *s, uint w)
 Return the raw NCurses WINDOW* underlying a surface.

Detailed Description

Non-portable escape hatch for the NCurses backend.

Warning
Including this header couples application code to the NCurses backend. Use only when NCurses-specific functionality is required and portability to other backends (e.g., NotCurses) is not needed. These functions are intentionally not declared in ui_backend.h.

Definition in file ui_ncurses_compat.h.

Function Documentation

◆ ui_ncurses_surface_get_panel()

PANEL * ui_ncurses_surface_get_panel ( const UiSurface * s,
uint w )

Return the raw NCurses PANEL* underlying a surface.

Parameters
sThe UiSurface to inspect.
wUiSurface window
Returns
The PANEL pointer, or NULL if s is NULL.

Definition at line 833 of file ui_ncurses.c.

833 {
834 if (!s)
835 return NULL;
836 return s->mpan[w];
837}
PANEL * mpan[SUB_SFC_MAX]

◆ ui_ncurses_surface_get_win()

WINDOW * ui_ncurses_surface_get_win ( const UiSurface * s,
uint w )

Return the raw NCurses WINDOW* underlying a surface.

Parameters
sThe UiSurface to inspect.
Returns
The WINDOW pointer, or NULL if s is NULL.

Definition at line 827 of file ui_ncurses.c.

827 {
828 if (!s)
829 return NULL;
830 return s->mwin[w];
831}
WINDOW * mwin[SUB_SFC_MAX]