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

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

#include "../include/ui_backend.h"
#include <notcurses/notcurses.h>
Include dependency graph for ui_notcurses_compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct notcurses * ui_notcurses_get_nc ()
 Return the raw struct notcurses* for the NotCurses session.
struct ncplane * ui_notcurses_surface_get_plane (const UiSurface *s, uint w)
 Return the raw struct ncplane* underlying a surface.

Detailed Description

Non-portable escape hatch for the NotCurses backend.

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

Definition in file ui_notcurses_compat.h.

Function Documentation

◆ ui_notcurses_get_nc()

struct notcurses * ui_notcurses_get_nc ( )

Return the raw struct notcurses* for the NotCurses session.

Parameters
uiThe UiRuntime returned by ui_init().
Returns
The NotCurses context pointer, or NULL if ui is NULL.

Definition at line 921 of file ui_notcurses.c.

921 {
922 if (!ui)
923 return NULL;
924 return ui->nc;
925}
UiRuntime * ui

References UiRuntime::nc, and ui.

◆ ui_notcurses_surface_get_plane()

struct ncplane * ui_notcurses_surface_get_plane ( const UiSurface * s,
uint w )

Return the raw struct ncplane* underlying a surface.

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

Definition at line 927 of file ui_notcurses.c.

927 {
928 (void)w;
929 if (!s)
930 return NULL;
931 return s->mplane[w];
932}
struct ncplane * mplane[SUB_SFC_MAX]