C-Menu 0.2.9
A User Interface Toolkit
Loading...
Searching...
No Matches
ui_layout.h
Go to the documentation of this file.
1#ifndef UI_LAYOUT_H
2#define UI_LAYOUT_H 1
3
4/** @file
5 @brief UI layout management.
6 @ingroup ui_backend
7
8 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).
9 */
10
11#include "ui_backend.h"
12
13/** @struct UiFramedSurface
14 @ingroup ui_backend
15 Represents a framed surface, consisting of an outer surface (the frame) and
16 an inner surface (the content area).
17 */
18typedef struct {
19 UiSurface *outer;
20 UiSurface *inner;
21} UiFramedSurface;
22
23/**
24 @brief Creates a new framed surface with the specified parent and rectangle.
25 @ingroup ui_backend
26 @param ui The UI runtime context.
27 @param parent The parent surface to which the framed surface will be attached.
28 @param rect The rectangle defining the position and size of the framed surface.
29 @return A new UiFramedSurface instance, or NULL on failure.
30 */
31UiFramedSurface ui_framed_surface_new(UiRuntime *ui, UiSurface *parent, UiRect rect);
32/**
33 @brief Destroys a framed surface and releases its resources.
34 @ingroup ui_backend
35 @param fs The UiFramedSurface to destroy.
36 */
37void ui_framed_surface_destroy(UiFramedSurface *fs);
38
39#endif
UiFramedSurface ui_framed_surface_new(UiRuntime *ui, UiSurface *parent, UiRect rect)
Creates a new framed surface with the specified parent and rectangle.
void ui_framed_surface_destroy(UiFramedSurface *fs)
Destroys a framed surface and releases its resources.
UiSurface * inner
Definition ui_layout.h:20
UiSurface * outer
Definition ui_layout.h:19