42#define IDUNN_CURSOR_ARROW 0
43#define IDUNN_CURSOR_TEXT 1
44#define IDUNN_CURSOR_HAND 2
47#define IDUNN_MOD_SHIFT 0x01
48#define IDUNN_MOD_CTRL 0x02
49#define IDUNN_MOD_ALT 0x04
52#define IDUNN_KEY_ESCAPE 1
53#define IDUNN_KEY_BACKSPACE 14
54#define IDUNN_KEY_TAB 15
55#define IDUNN_KEY_ENTER 28
60#define IDUNN_KEY_SPACE 57
61#define IDUNN_KEY_HOME 102
62#define IDUNN_KEY_UP 103
63#define IDUNN_KEY_PAGEUP 104
64#define IDUNN_KEY_LEFT 105
65#define IDUNN_KEY_RIGHT 106
66#define IDUNN_KEY_END 107
67#define IDUNN_KEY_DOWN 108
68#define IDUNN_KEY_PAGEDOWN 109
69#define IDUNN_KEY_DELETE 111
100#define IDUNN_WATCH_MAX 4
183 const char *text,
void *
data);
515#define IDUNN_PROGRESS_MAX 1000
729 const char *icon_pack);
const idunn_theme_t * idunn_app_theme(const idunn_app_t *app)
Definition app.c:182
idunn_window_t * idunn_window_new(idunn_app_t *app, const char *title, int32_t width, int32_t height)
a window with a title bar; it shows when the app runs.
Definition app.c:283
void idunn_app_on_event(idunn_app_t *app, void(*on_event)(idunn_app_t *app, const heim_msg_t *msg, void *data), void *data)
get the events that are about no window of the app (the shell's HEIM_EV_WINDOW, HEIM_EV_WINDOW_APP,...
Definition app.c:102
void idunn_window_close(idunn_window_t *win)
close and free the window (and its widgets).
Definition app.c:336
void idunn_window_on_close(idunn_window_t *win, bool(*on_close)(idunn_window_t *win, void *data), void *data)
the close button (or the shell's Close): on_close returns true to let the window close,...
Definition app.c:552
heim_conn_t * idunn_app_conn(const idunn_app_t *app)
the connection to the window server, for calls idunn does not wrap (the shell's heim_shell_start,...
Definition app.c:97
void idunn_app_every(idunn_app_t *app, uint32_t period, void(*every)(void *data), void *data)
call every(data) each period ms while the app runs (a clock).
Definition app.c:110
idunn_window_t * idunn_screen_window_new(idunn_app_t *app, const gfx_buffer_t *backdrop)
a window as large as the screen with no title bar (a login screen).
Definition app.c:294
idunn_app_t * idunn_app_new(const char *name)
connect to the window server and read the theme.
Definition app.c:70
idunn_window_t * idunn_panel_new(idunn_app_t *app, int32_t height)
a panel of the desktop shell: no title bar, at the bottom of the screen, as wide as the screen,...
Definition app.c:306
void idunn_window_set_title(idunn_window_t *win, const char *title)
a new title in the window's title bar (and the shell's window list).
Definition app.c:176
bool idunn_app_save_theme(idunn_app_t *app, const char *key, const char *value)
change a theme setting (mode, accent, radius, font_size, scale, motion) in the user's theme file.
Definition app.c:217
int idunn_app_run(idunn_app_t *app)
run until the last window is closed or idunn_app_quit.
Definition app.c:407
void idunn_app_watch(idunn_app_t *app, int fd, void(*ready)(int fd, void *data), void *data)
call ready(fd, data) when fd can be read (or has hung up) while the app runs: a pty,...
Definition app.c:118
void idunn_app_paste(idunn_app_t *app, void(*got)(const char *text, size_t length, void *data), void *data)
ask for the clipboard's text for the program itself (not a widget): got gets it when it comes ("" whe...
Definition app.c:543
void idunn_app_set_theme(idunn_app_t *app, const idunn_theme_t *theme)
use another theme in all windows of the app (they are drawn again).
Definition app.c:197
void idunn_app_quit(idunn_app_t *app)
Definition app.c:92
idunn_widget_t * idunn_badge(const char *text, idunn_badge_t variant)
a badge: a short word in a small pill
Definition badge.c:80
void idunn_canvas_wake(idunn_widget_t *canvas, uint32_t ms)
an IDUNN_INPUT_TIMER in ms (one at a time; a new call moves it)
Definition canvas.c:190
idunn_widget_t * idunn_canvas(const idunn_canvas_hooks_t *hooks, void *data)
a widget the program draws itself: a terminal, a game.
Definition canvas.c:129
void idunn_canvas_set_cursor(idunn_widget_t *canvas, uint32_t shape)
the pointer shape over the canvas (IDUNN_CURSOR_)
Definition canvas.c:196
void idunn_canvas_paste(idunn_widget_t *canvas)
Definition canvas.c:184
void idunn_canvas_move(idunn_widget_t *canvas, gfx_rect_t area, int32_t dy)
in the frame hook: move the pixels of area up (dy < 0) or down; the strip that comes into view is dam...
Definition canvas.c:170
void idunn_canvas_damage(idunn_widget_t *canvas, gfx_rect_t r)
draw a rect of the canvas again (canvas coordinates)
Definition canvas.c:154
void idunn_canvas_update(idunn_widget_t *canvas)
a frame soon, so the frame hook runs (new data came)
Definition canvas.c:164
void idunn_canvas_copy(idunn_widget_t *canvas, const char *text, size_t length)
put text on the clipboard; ask for its text (an IDUNN_INPUT_PASTE comes)
Definition canvas.c:178
void idunn_check_box_set_state(idunn_widget_t *box, idunn_check_t state)
Definition check.c:121
idunn_widget_t * idunn_check_box(const char *label, bool checked, idunn_callback_t on_change, void *data)
a check box with a label to its right (a click on the label clicks it).
Definition check.c:91
idunn_check_t idunn_check_box_state(const idunn_widget_t *box)
Definition check.c:115
idunn_context_t * idunn_context_new(const idunn_theme_t *theme, const char *font_dir, const char *icon_pack)
fonts and icons for a theme.
Definition context.c:48
void idunn_context_set_theme(idunn_context_t *ctx, const idunn_theme_t *theme)
Definition context.c:90
void idunn_context_free(idunn_context_t *ctx)
Definition context.c:75
idunn_widget_t * idunn_empty_state(const char *icon, const char *title, const char *text)
an empty state: an icon on a muted square, a title and a muted line (or NULL), in the middle of its s...
Definition empty.c:91
idunn_widget_t * idunn_icon_view(const char *name, int32_t size, idunn_color_t color)
a Lucide icon on its own, size points, in a colour token
Definition empty.c:86
idunn_widget_t * idunn_field(const char *label, idunn_widget_t *control, const char *help)
a form row: a label above the control and help text below it (or NULL).
Definition field.c:74
void idunn_field_set_error(idunn_widget_t *field, const char *message)
show an error: the message in red under the control, and the control's border and ring red.
Definition field.c:94
void idunn_file_dialog(idunn_widget_t *owner, idunn_file_mode_t mode, const char *title, const char *path, idunn_file_done_t done, void *data)
a dialog to choose a file: the folder's items as a list, a button to the folder above,...
Definition file_dialog.c:289
idunn_widget_t * idunn_dialog(const char *title, const char *description)
a dialog: a card with a title and a description (or NULL), in the middle of the window over the overl...
Definition floating.c:165
idunn_widget_t * idunn_dialog_add_button(idunn_widget_t *dialog, const char *text, idunn_variant_t variant, idunn_callback_t on_click, void *data)
a button at the bottom right: Cancel as outline, the action primary or destructive
Definition floating.c:201
void idunn_popover(idunn_widget_t *owner, idunn_widget_t *content)
a popover: content in a card under owner; a press outside it or Escape closes it.
Definition floating.c:84
void idunn_dialog_open(idunn_widget_t *owner, idunn_widget_t *dialog)
show a dialog over the window of owner; the window owns it then
Definition floating.c:224
void idunn_dialog_close(idunn_widget_t *dialog)
Definition floating.c:267
idunn_widget_t * idunn_dialog_content(idunn_widget_t *dialog)
Definition floating.c:182
void idunn_popover_close(idunn_widget_t *inside)
close the popover a widget is in
Definition floating.c:111
libgfx: drawing into pixel buffers in memory.
struct heim_conn heim_conn_t
Definition heimdall.h:28
the messages between heimdalld (the window server) and its clients.
void idunn_widget_free(idunn_widget_t *w)
take a widget out of its parent and free it and its children.
Definition widget.c:111
gfx_rect_t idunn_window_draw(idunn_window_t *win)
lay out and draw what changed.
Definition window.c:319
void idunn_window_resize(idunn_window_t *win, int32_t width, int32_t height)
a new size for the window's buffer (the window lays out again).
Definition window.c:69
void(*) idunn_callback_t(idunn_widget_t *widget, void *data)
Definition idunn.h:39
idunn_widget_t * idunn_label(const char *text, idunn_text_t style)
text in a style; it ends with "..." when it is too wide, or wraps.
Definition label.c:92
int idunn_list_view_count(const idunn_widget_t *list)
Definition list.c:880
bool idunn_list_view_edit(idunn_widget_t *list, int item, size_t start, size_t end, idunn_edit_done_t done, void *data)
edit an item's text in place (a rename): a text field over it with the bytes start to end selected ((...
Definition list.c:985
int idunn_list_view_current(const idunn_widget_t *list)
the item with the keyboard, or -1
Definition list.c:932
void idunn_set_tooltip(idunn_widget_t *w, const char *text)
a tooltip: shown over the widget after 600 ms under the pointer (NULL: none)
Definition widget.c:83
void idunn_tabs_set_active(idunn_widget_t *tabs, int active)
Definition tabs.c:259
idunn_variant_t
Definition idunn.h:340
@ IDUNN_LINK
Definition idunn.h:346
@ IDUNN_SECONDARY
Definition idunn.h:342
@ IDUNN_DESTRUCTIVE
Definition idunn.h:345
@ IDUNN_GHOST
Definition idunn.h:344
@ IDUNN_OUTLINE
Definition idunn.h:343
@ IDUNN_PRIMARY
Definition idunn.h:341
int idunn_menu_add_sub(idunn_menu_t *menu, const char *icon, const char *text, idunn_menu_t *sub)
an item that opens a sub-menu (the menu owns it)
Definition menu.c:142
void idunn_set_size(idunn_widget_t *w, int32_t width, int32_t height)
a size a widget must have, in design pixels (0: its own size).
Definition widget.c:155
int idunn_menu_add_check(idunn_menu_t *menu, const char *text, bool checked, idunn_callback_t on_choose, void *data)
an item with a check that a choice turns on and off
Definition menu.c:125
idunn_widget_t * idunn_list_view(void)
a list view: rows with a Lucide icon (or NULL), text and a muted second text on the right (or NULL).
Definition list.c:755
int32_t idunn_text_field_text_width(idunn_widget_t *field)
the width of the field's text in pixels (0 before it is in a window)
Definition text_field.c:486
void idunn_text_area_set_text(idunn_widget_t *area, const char *text)
Definition text_area.c:441
int idunn_list_view_columns(const idunn_widget_t *list)
the items in a line (1 for a list, more for a grid)
Definition list.c:927
idunn_widget_t * idunn_row(int gap, int padding)
a box that puts its children in a row (left to right) or a column (top to bottom),...
Definition layout.c:263
void idunn_window_key(idunn_window_t *win, uint16_t code, uint32_t mods, const char *text)
a key press (or repeat).
Definition window.c:747
void idunn_menu_popup_at_pointer(idunn_menu_t *menu, idunn_widget_t *owner)
open the menu where the last right click was (a context menu)
Definition menu.c:567
idunn_widget_t * idunn_text_area(const char *placeholder, int rows)
a text area: lines that wrap, Enter for a new line; it scrolls.
Definition text_area.c:407
struct idunn_app idunn_app_t
Definition idunn.h:34
void idunn_label_set_color(idunn_widget_t *label, idunn_color_t color)
Definition label.c:136
void idunn_text_field_on_submit(idunn_widget_t *field, idunn_callback_t on_submit, void *data)
Definition text_field.c:512
void idunn_menu_set_checked(idunn_menu_t *menu, int item, bool checked)
Definition menu.c:165
void idunn_menu_popup(idunn_menu_t *menu, idunn_widget_t *owner)
open the menu under a widget (a button's on_click does it)
Definition menu.c:550
void idunn_list_view_set_multiple(idunn_widget_t *list, bool multiple)
many items can be selected (Ctrl, Shift, Ctrl+A)
Definition list.c:886
idunn_widget_t * idunn_card(int gap)
a card: a column on the card colour with a border, the large radius and a small shadow,...
Definition layout.c:334
void idunn_list_view_set_columns(idunn_widget_t *list, const int32_t *widths, int count)
columns at the right of the rows: an item's detail is split at tabs, and each part is drawn at the ri...
Definition list.c:1013
idunn_widget_t * idunn_progress(void)
a progress bar across its box; value 0 to IDUNN_PROGRESS_MAX
Definition progress.c:55
void idunn_window_pointer(idunn_window_t *win, idunn_pointer_t kind, int32_t x, int32_t y, uint32_t mods)
the pointer moved, or the left button went down or up, at (x, y), with these modifier keys held (Shif...
Definition window.c:612
const char * idunn_text_area_text(const idunn_widget_t *area)
Definition text_area.c:435
int idunn_menu_add(idunn_menu_t *menu, const char *icon, const char *text, const char *shortcut, idunn_callback_t on_choose, void *data)
an item: a Lucide icon (or NULL), text and a shortcut to show (or NULL).
Definition menu.c:113
const char * idunn_text_field_text(const idunn_widget_t *field)
the text (UTF-8); valid until the text changes
Definition text_field.c:433
void idunn_menu_set_disabled(idunn_menu_t *menu, int item, bool disabled)
Definition menu.c:154
void idunn_text_area_on_change(idunn_widget_t *area, idunn_callback_t on_change, void *data)
Definition text_area.c:452
idunn_menu_t * idunn_menu_new(void)
Definition menu.c:70
void idunn_list_view_set_columns_left(idunn_widget_t *list, uint32_t mask)
draw some columns at their left, for text (a date, a type); the others stay at their right,...
Definition list.c:1053
uint32_t idunn_window_cursor(const idunn_window_t *win)
the pointer shape for where the pointer is (IDUNN_CURSOR_).
Definition window.c:429
void idunn_set_disabled(idunn_widget_t *w, bool disabled)
a disabled widget is drawn at half opacity and gets no input.
Definition widget.c:162
idunn_widget_t * idunn_add(idunn_widget_t *parent, idunn_widget_t *child)
add child at the end of parent.
Definition widget.c:23
void idunn_list_view_on_menu(idunn_widget_t *list, idunn_callback_t on_menu, void *data)
on_menu on a right click: on an item that is not selected, it selects only that item first; on no ite...
Definition list.c:969
void idunn_scroll_view_scroll_to(idunn_widget_t *view, int32_t offset)
Definition scroll.c:315
void idunn_text_field_set_text(idunn_widget_t *field, const char *text)
Definition text_field.c:439
const char * idunn_list_view_text(const idunn_widget_t *list, int item)
Definition list.c:938
void idunn_switch_set_on(idunn_widget_t *sw, bool on)
Definition switch.c:140
void idunn_window_paste(idunn_window_t *win, const char *text, size_t length)
the clipboard text a widget asked for came (from the window server).
Definition window.c:419
int idunn_list_view_item_at(const idunn_widget_t *list, int32_t x, int32_t y)
the item at a point of the window, or -1
Definition list.c:978
void idunn_text_field_select(idunn_widget_t *field, size_t start, size_t end)
Definition text_field.c:521
idunn_widget_t * idunn_text_field(const char *placeholder)
a one-line text field, 32 pixels high.
Definition text_field.c:406
void idunn_list_view_on_select(idunn_widget_t *list, idunn_callback_t on_select, void *data)
on_select after the selection changes; on_activate on a double click or Enter
Definition list.c:944
void idunn_window_on_key(idunn_window_t *win, idunn_key_hook_t on_key, void *data)
Definition window.c:710
struct idunn_menu idunn_menu_t
a menu: items the app adds, shown in a popup by idunn_menu_popup
Definition idunn.h:623
gfx_buffer_t * idunn_window_buffer(const idunn_window_t *win)
Definition window.c:78
idunn_input_type_t
Definition idunn.h:812
@ IDUNN_INPUT_PRESS
Definition idunn.h:814
@ IDUNN_INPUT_BLUR
Definition idunn.h:821
@ IDUNN_INPUT_FOCUS
Definition idunn.h:820
@ IDUNN_INPUT_SCROLL
Definition idunn.h:818
@ IDUNN_INPUT_PASTE
Definition idunn.h:819
@ IDUNN_INPUT_KEY
Definition idunn.h:813
@ IDUNN_INPUT_TIMER
Definition idunn.h:822
@ IDUNN_INPUT_DRAG
Definition idunn.h:815
@ IDUNN_INPUT_RELEASE
Definition idunn.h:816
@ IDUNN_INPUT_MOTION
Definition idunn.h:817
void idunn_box_set_background(idunn_widget_t *box, idunn_color_t color)
a background for a box, a colour token (by default it has none).
Definition layout.c:314
void idunn_label_set_text(idunn_widget_t *label, const char *text)
Definition label.c:114
void idunn_free_later(idunn_widget_t *w)
free w (and its children) after the event that is running: for a widget that may be in its own callba...
Definition widget.c:91
void(*) idunn_edit_done_t(idunn_widget_t *list, int item, const char *text, void *data)
what an edit in place gives: the new text, or NULL when it was taken back (Escape).
Definition idunn.h:571
void idunn_select_choose(idunn_widget_t *select, int chosen)
Definition select.c:179
void idunn_text_field_set_secret(idunn_widget_t *field, bool secret)
a password field: a bullet for each character, and no Copy or Cut
Definition text_field.c:477
void idunn_window_scroll(idunn_window_t *win, int32_t x, int32_t y, int32_t steps)
the wheel turned over (x, y): steps, up is positive.
Definition window.c:808
void idunn_card_header(idunn_widget_t *card, const char *title, const char *description)
a title and a muted description (or NULL) at the top of a card.
Definition layout.c:339
void idunn_list_view_set_count(idunn_widget_t *list, int count)
keep only the first count items (a smaller count than now)
Definition list.c:858
void idunn_on_middle_click(idunn_widget_t *w, idunn_callback_t on_middle, void *data)
on_middle on a press of the middle button on the widget or in it (the nearest widget that has one): a...
Definition widget.c:358
void idunn_list_view_select(idunn_widget_t *list, int item, bool selected)
Definition list.c:908
void idunn_text_field_on_change(idunn_widget_t *field, idunn_callback_t on_change, void *data)
on_change after every change of the text; on_submit on Enter
Definition text_field.c:494
idunn_widget_t * idunn_window_focus(const idunn_window_t *win)
the widget with the keyboard focus, or NULL.
Definition window.c:434
idunn_check_t
Definition idunn.h:454
@ IDUNN_UNCHECKED
Definition idunn.h:455
@ IDUNN_CHECKED
Definition idunn.h:456
@ IDUNN_MIXED
Definition idunn.h:457
idunn_widget_t * idunn_tabs_add(idunn_widget_t *tabs, const char *name, idunn_widget_t *page)
add a tab with its page (the tabs own it); the first one is active
Definition tabs.c:222
void idunn_list_view_clear(idunn_widget_t *list)
Definition list.c:812
bool(*) idunn_key_hook_t(idunn_window_t *win, uint16_t code, uint32_t mods, const char *text, void *data)
keys that no widget used (the focused one and its parents): the window's own shortcuts.
Definition idunn.h:182
int idunn_list_heads_clicked(const idunn_widget_t *heads)
the head that was clicked: 0 for the names, 1 and on for the columns
Definition list_heads.c:208
int idunn_tabs_active(const idunn_widget_t *tabs)
Definition tabs.c:253
void idunn_list_view_on_activate(idunn_widget_t *list, idunn_callback_t on_activate, void *data)
Definition list.c:953
void idunn_text_field_set_pill(idunn_widget_t *field, bool pill)
a pill: round ends, see-through (over a picture, as on a login screen), no border,...
Definition text_field.c:467
void idunn_box_set_align(idunn_widget_t *box, idunn_align_t align, idunn_align_t justify)
how a box places its children: align across it (default: stretch) and justify along it (default: star...
Definition layout.c:284
idunn_widget_t * idunn_list_heads(idunn_widget_t *list, const char *const *names, int count, idunn_callback_t on_click, void *data)
heads over the columns of a list view, which line up with it.
Definition list_heads.c:177
idunn_widget_t * idunn_scroll_view(idunn_widget_t *child)
a scroll view: the child can be taller than the view.
Definition scroll.c:294
int idunn_select_chosen(const idunn_widget_t *select)
Definition select.c:173
void idunn_text_field_set_plain(idunn_widget_t *field, bool plain)
select bytes start to end (the caret at end); typing replaces them.
Definition text_field.c:458
void idunn_window_invalidate(idunn_window_t *win)
the whole window must be drawn again (after a theme change).
Definition window.c:83
idunn_widget_t * idunn_grid_view(void)
a grid view: the same, as tiles of a 48 point Tela icon (a file or folder icon name) with the name be...
Definition list.c:770
idunn_widget_t * idunn_column(int gap, int padding)
Definition layout.c:268
uint32_t idunn_window_next_wake(const idunn_window_t *win)
the next time (ms) the window must be ticked for a timer, or 0 for none.
Definition window.c:351
idunn_widget_t * idunn_spacer(void)
empty space that grows (put it between children to push them apart).
Definition layout.c:353
void idunn_set_error(idunn_widget_t *w, bool error)
a control with a wrong value: its border and ring are red (a field sets this on its control with idun...
Definition widget.c:181
idunn_badge_t
Definition idunn.h:496
@ IDUNN_BADGE_DESTRUCTIVE
Definition idunn.h:500
@ IDUNN_BADGE_DEFAULT
Definition idunn.h:497
@ IDUNN_BADGE_SECONDARY
Definition idunn.h:498
@ IDUNN_BADGE_OUTLINE
Definition idunn.h:499
int32_t idunn_slider_value(const idunn_widget_t *slider)
Definition slider.c:174
idunn_widget_t * idunn_slider(int32_t min, int32_t max, int32_t step, int32_t value, idunn_callback_t on_change, void *data)
a slider from min to max in steps (the arrows move it by one step).
Definition slider.c:151
idunn_widget_t * idunn_switch(const char *label, bool on, idunn_callback_t on_change, void *data)
a switch with a label to its right; it slides when it changes.
Definition switch.c:110
idunn_file_mode_t
Definition idunn.h:674
@ IDUNN_FILE_SAVE
Definition idunn.h:676
@ IDUNN_FILE_OPEN
Definition idunn.h:675
void idunn_set_hidden(idunn_widget_t *w, bool hidden)
a hidden widget is not drawn, takes no room in its box and gets no input.
Definition widget.c:258
idunn_widget_t * idunn_grow(idunn_widget_t *w, int weight)
let a widget take a share of the free space along its box.
Definition widget.c:145
void idunn_on_key(idunn_widget_t *w, idunn_widget_key_t on_key, void *data)
Definition widget.c:366
bool idunn_list_view_editing(const idunn_widget_t *list)
true while an item is edited in place
Definition list.c:1069
bool idunn_switch_on(const idunn_widget_t *sw)
Definition switch.c:134
void idunn_list_view_set_item(idunn_widget_t *list, int item, const char *icon, const char *text, const char *detail)
change an item; only its row is drawn again, and only when something differs (a list that is filled a...
Definition list.c:844
idunn_size_t
Definition idunn.h:350
@ IDUNN_SIZE_SMALL
Definition idunn.h:352
@ IDUNN_SIZE_DEFAULT
Definition idunn.h:351
@ IDUNN_SIZE_LARGE
Definition idunn.h:353
void idunn_box_set_padding(idunn_widget_t *box, int vertical, int horizontal)
other paddings for the sides of a box, in units: across and along.
Definition layout.c:294
void idunn_list_view_go_to(idunn_widget_t *list, int item)
make an item the current one and select only it, as the arrow keys do
Definition list.c:921
int idunn_list_view_add(idunn_widget_t *list, const char *icon, const char *text, const char *detail)
Definition list.c:788
void idunn_label_set_wrap(idunn_widget_t *label, bool wrap)
Definition label.c:145
void idunn_card_set_glass(idunn_widget_t *card, bool glass)
frosted glass: the card is see-through, lighter than what is under it, with a thin light edge and a l...
Definition layout.c:304
idunn_widget_t * idunn_radio_group(const char *const *labels, int count, int chosen, idunn_callback_t on_change, void *data)
a group of choices with round buttons, one chosen; one Tab stop, the arrows move the choice.
Definition radio.c:183
int idunn_radio_group_chosen(const idunn_widget_t *group)
Definition radio.c:210
void idunn_list_heads_set_order(idunn_widget_t *heads, int head, bool descending)
show the order on a head (an arrow), or on none with head -1
Definition list_heads.c:214
void idunn_list_view_set_single_click(idunn_widget_t *list, bool single)
one click activates an item (a launcher); the arrow keys only move
Definition list.c:962
idunn_window_t * idunn_window_offscreen(idunn_context_t *ctx, int32_t width, int32_t height)
a window that draws into its own buffer, of that many pixels.
Definition window.c:17
void idunn_list_view_set_framed(idunn_widget_t *list, bool framed)
a border, the large radius and the card colour around the items
Definition list.c:893
void idunn_window_set_root(idunn_window_t *win, idunn_widget_t *root)
the widget that fills the window (a row or a column, usually).
Definition window.c:47
void idunn_on_menu(idunn_widget_t *w, idunn_callback_t on_menu, void *data)
on_menu on a right click on the widget or in it, when no widget in it used the click (a list view use...
Definition widget.c:374
struct idunn_widget idunn_widget_t
Definition idunn.h:37
void(*) idunn_file_done_t(const char *path, void *data)
the path chosen in a file dialog (the dialog is closed already)
Definition idunn.h:680
gfx_rect_t idunn_widget_rect(const idunn_widget_t *w)
where a widget is in its window, after layout.
Definition widget.c:190
int32_t idunn_scroll_view_offset(const idunn_widget_t *view)
Definition scroll.c:310
void idunn_progress_set(idunn_widget_t *progress, int32_t value)
Definition progress.c:66
struct idunn_window idunn_window_t
Definition idunn.h:36
idunn_align_t
Definition idunn.h:207
@ IDUNN_STRETCH
Definition idunn.h:211
@ IDUNN_END
Definition idunn.h:210
@ IDUNN_START
Definition idunn.h:208
@ IDUNN_SPACE_BETWEEN
Definition idunn.h:212
@ IDUNN_CENTER
Definition idunn.h:209
void idunn_menu_add_separator(idunn_menu_t *menu)
Definition menu.c:137
void idunn_menu_free(idunn_menu_t *menu)
free a menu (not while it is open) and its sub-menus
Definition menu.c:78
struct idunn_context idunn_context_t
Definition idunn.h:35
idunn_widget_t * idunn_tabs(idunn_callback_t on_change, void *data)
tabs: a strip of names and the page of the active one below it.
Definition tabs.c:201
bool idunn_menu_checked(const idunn_menu_t *menu, int item)
Definition menu.c:160
void idunn_text_field_set_icon(idunn_widget_t *field, const char *icon)
an icon (a Lucide name) at the start, as in a search field
Definition text_field.c:448
bool idunn_window_tick(idunn_window_t *win, uint32_t now)
the time now in ms, for transitions.
Definition window.c:329
void idunn_slider_set_value(idunn_widget_t *slider, int32_t value)
Definition slider.c:180
void idunn_text_field_on_blur(idunn_widget_t *field, idunn_callback_t on_blur, void *data)
on_blur when the field loses the keyboard
Definition text_field.c:503
void idunn_box_set_keep_end(idunn_widget_t *box, bool keep_end)
a row that is too short for its children shows the last ones: the first go out of view on the left,...
Definition layout.c:361
void idunn_menu_set_min_width(idunn_menu_t *menu, int32_t width)
the least width of the menu, in design pixels (160 by default)
Definition menu.c:171
void idunn_radio_group_choose(idunn_widget_t *group, int chosen)
Definition radio.c:216
idunn_widget_t * idunn_select(const char *const *choices, int count, int chosen, idunn_callback_t on_change, void *data)
a select: a field with the chosen value; it opens a menu of the choices.
Definition select.c:146
bool idunn_list_view_selected(const idunn_widget_t *list, int item)
Definition list.c:902
void idunn_set_focus(idunn_widget_t *w)
give the keyboard to a widget in a window (a canvas at the start).
Definition window.c:781
idunn_widget_t * idunn_separator(void)
a 1 pixel line: across a column, or down a row.
Definition separator.c:30
void idunn_radio_group_set_row(idunn_widget_t *group, bool row)
Definition radio.c:225
void idunn_select_set_placeholder(idunn_widget_t *select, const char *text)
Definition select.c:188
bool(*) idunn_widget_key_t(idunn_widget_t *w, uint16_t code, uint32_t mods, void *data)
keys for a widget (when it or a child has the keyboard) before the widget gets them.
Definition idunn.h:174
void idunn_list_view_set_pictures(idunn_widget_t *list, bool pictures)
rows with a Tela icon (a file or folder icon name) in colour, not a Lucide one
Definition list.c:1075
idunn_pointer_t
Definition idunn.h:757
@ IDUNN_POINTER_MOTION
Definition idunn.h:758
@ IDUNN_POINTER_MIDDLE
Definition idunn.h:763
@ IDUNN_POINTER_PRESS
Definition idunn.h:759
@ IDUNN_POINTER_MENU
Definition idunn.h:762
@ IDUNN_POINTER_LEAVE
Definition idunn.h:761
@ IDUNN_POINTER_RELEASE
Definition idunn.h:760
idunn: the design tokens (colours, sizes, text styles, shadows).
idunn_color_t
Definition idunn_theme.h:33
idunn_text_t
Definition idunn_theme.h:63
uint32_t error
Definition isr.h:3
unsigned int uint32_t
Definition fb.h:17
integer types of fixed width.
unsigned short uint16_t
Definition stdint.h:13
int int32_t
Definition stdint.h:14
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
wait until a descriptor in one of the sets is ready.
#define bool
Definition stdbool.h:8
Definition heimdall_proto.h:149
what a canvas does; each hook can be NULL.
Definition idunn.h:845
void(*) draw(idunn_widget_t *canvas, gfx_buffer_t *buf, gfx_rect_t rect, void *data)
draw the canvas, which is at rect in the window.
Definition idunn.h:850
void(*) frame(idunn_widget_t *canvas, void *data)
before a frame is drawn, while the window still holds the last frame: move pixels (idunn_canvas_move)...
Definition idunn.h:859
bool(*) input(idunn_widget_t *canvas, const idunn_input_t *in, void *data)
Definition idunn.h:852
void(*) resize(idunn_widget_t *canvas, int32_t width, int32_t height, void *data)
the canvas has a new size (also the first time it is laid out)
Definition idunn.h:854
Definition idunn_internal.h:149
Definition idunn_theme.h:96
Definition idunn_internal.h:165