C-Menu
0.2.9
A User Interface Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_layout.h
Go to the documentation of this file.
1
#
pragma
once
2
#
ifdef
__cplusplus
3
extern
"C"
{
4
#
endif
5
6
/** @file
7
@brief UI layout management.
8
@ingroup ui_backend
9
10
This module provides functions for creating and managing framed surfaces, which consist of an outer surface (the frame) and an inner surface (the content area).
11
*/
12
13
#
include
"ui_backend.h"
14
15
/** @struct UiFramedSurface
16
@ingroup ui_backend
17
Represents a framed surface, consisting of an outer surface (the frame) and
18
an inner surface (the content area).
19
*/
20
typedef
struct
{
21
UiSurface *
outer
;
22
UiSurface *
inner
;
23
} UiFramedSurface;
24
25
/** @brief Creates a new framed surface with the specified parent and rectangle.
26
@ingroup ui_backend
27
@param ui The UI runtime context.
28
@param parent The parent surface to which the framed surface will be attached.
29
@param rect The rectangle defining the position and size of the framed surface.
30
@return A new UiFramedSurface instance, or NULL on failure.
31
*/
32
UiFramedSurface
ui_framed_surface_new
(UiSurface *parent, UiRect rect);
33
/** @brief Destroys a framed surface and releases its resources.
34
@ingroup ui_backend
35
@param fs The UiFramedSurface to destroy.
36
*/
37
void
ui_framed_surface_destroy
(UiFramedSurface *fs);
38
39
#
ifdef
__cplusplus
40
}
41
#
endif
ui_init
UiRuntime * ui_init(const UiConfig *config, SIO *sio)
Initialize the UI runtime with the given configuration and SIO.
Definition
ui_ncurses.c:129
ui_render
void ui_render()
Render the UI by updating panels and refreshing the display.
Definition
ui_ncurses.c:884
ui_draw_text
int ui_draw_text(UiSurface *s, ss_t w, uint y, uint x, const char *text)
on specified window, move to y, x, add string
Definition
ui_ncurses_draw.c:74
ui_surface_destroy
void ui_surface_destroy(UiSurface *s)
Destroy a UiSurface, cleaning up its windows and panels.
Definition
ui_ncurses.c:468
ui_get_screen_size
void ui_get_screen_size(uint *lines, uint *cols)
Get the current screen size (number of lines and columns).
Definition
ui_ncurses.c:722
ui_shutdown
void ui_shutdown()
Shutdown the UI runtime, cleaning up resources and freeing memory.
Definition
ui_ncurses.c:418
ui_surface_new
UiSurface * ui_surface_new(ss_t w, UiSurface *parent, uint p, uint lines, uint cols, uint y, uint x)
Create a new UI surface with the specified parameters.
Definition
ui_ncurses.c:229
UiStyle
uint16_t UiStyle
Definition
ui_backend.h:158
ui_get_caps
void ui_get_caps(UiCaps *caps)
Get the UI backend capabilities.
Definition
ui_ncurses.c:62
UI_BACKEND_NCURSES
@ UI_BACKEND_NCURSES
Definition
ui_backend.h:452
UI_BACKEND_NOTCURSES
@ UI_BACKEND_NOTCURSES
Definition
ui_backend.h:453
WA_NORMAL
#define WA_NORMAL
Definition
ui_notcurses_internal.h:141
main
int main(int argc, char **argv)
Capture the current terminal settings for later restoration.
Definition
amort.c:41
ui_framed_surface_new
UiFramedSurface ui_framed_surface_new(UiSurface *parent, UiRect rect)
Creates a new framed surface with the specified parent and rectangle.
Definition
ui_layout.c:26
ui_framed_surface_destroy
void ui_framed_surface_destroy(UiFramedSurface *fs)
Destroys a framed surface and releases its resources.
Definition
ui_layout.c:54
ui_get_backend
UiBackend ui_get_backend()
Get the UI backend type.
Definition
ui_ncurses.c:55
UiRect::y
int y
Definition
ui_backend.h:183
UiRect::x
int x
Definition
ui_backend.h:184
UiRect::cols
int cols
Definition
ui_backend.h:186
UiRect::lines
int lines
Definition
ui_backend.h:185
UiCaps::palette256
bool palette256
Definition
ui_backend.h:458
UiCaps::mouse
bool mouse
Definition
ui_backend.h:459
UiCaps::color_pairs
int color_pairs
Definition
ui_backend.h:462
UiCaps::truecolor
bool truecolor
Definition
ui_backend.h:457
UiCaps::unicode
bool unicode
Definition
ui_backend.h:460
UiCaps::resize
bool resize
Definition
ui_backend.h:461
UiFramedSurface::inner
UiSurface * inner
Definition
ui_layout.h:22
UiFramedSurface::outer
UiSurface * outer
Definition
ui_layout.h:21
ui
ui_layout.h
Generated by
1.17.0