![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "nilorea/n_common.h"#include "nilorea/n_gui.h"#include "nilorea/n_log.h"Go to the source code of this file.
Macros | |
| #define | ALLEGRO_UNSTABLE 1 |
Functions | |
| static void | expect_true (const char *label, int cond) |
| Assert a condition, logging which check failed. | |
| static ALLEGRO_EVENT | key_event (int keycode, unsigned int modifiers) |
Build a key event for keycode with modifiers. | |
| int | main (void) |
| static ALLEGRO_EVENT | mouse_event (int type, int x, int y) |
Build a left-button mouse event at (x, y). | |
| static void | on_select (int widget_id, int row, void *user_data) |
| Record a row selection, to prove the keyboard path fires the same callback a click does. | |
Variables | |
| static int | failures = 0 |
| Count of failed assertions. | |
| static int | nb_selected_seen = 0 |
| How many entries of selected_seen are used. | |
| static int | selected_seen [64] |
| Rows reported by the grid's on_select callback, in order. | |
| #define ALLEGRO_UNSTABLE 1 |
Definition at line 38 of file ex_gui_datagrid_keys.c.
|
static |
|
static |
Build a key event for keycode with modifiers.
| keycode | An ALLEGRO_KEY_* code. |
| modifiers | An ALLEGRO_KEYMOD_* mask. |
Definition at line 89 of file ex_gui_datagrid_keys.c.
Referenced by char_event(), and main().
| int main | ( | void | ) |
Definition at line 115 of file ex_gui_datagrid_keys.c.
References expect_true(), failures, font, gui, key_event(), LOG_ERR, LOG_NOTICE, mouse_event(), n_gui_add_datagrid(), n_gui_add_window(), n_gui_datagrid_add_column(), n_gui_datagrid_add_row(), n_gui_datagrid_clear_rows(), n_gui_datagrid_get_scroll_offset(), n_gui_datagrid_get_selected(), n_gui_datagrid_get_selected_rows(), n_gui_datagrid_set_multiselect(), n_gui_datagrid_set_selected(), n_gui_destroy_ctx(), n_gui_new_ctx(), n_gui_open_window(), n_gui_process_event(), n_gui_set_display_size(), N_GUI_WIN_FRAMELESS, n_gui_window_set_flags(), n_log, nb_selected_seen, on_select(), row(), selected_seen, and set_log_level().
|
static |
Build a left-button mouse event at (x, y).
| type | The ALLEGRO_EVENT_MOUSE_* type. |
| x | Cursor x. |
| y | Cursor y. |
Definition at line 105 of file ex_gui_datagrid_keys.c.
References type().
|
static |
Record a row selection, to prove the keyboard path fires the same callback a click does.
| widget_id | Unused. |
| row | The selected row. |
| user_data | Unused. |
Definition at line 76 of file ex_gui_datagrid_keys.c.
References nb_selected_seen, row(), and selected_seen.
Referenced by main(), n_gui_add_combobox(), n_gui_add_datagrid(), n_gui_add_listbox(), n_gui_add_radiolist(), and n_gui_tree_create().
|
static |
Count of failed assertions.
Definition at line 49 of file ex_gui_datagrid_keys.c.
|
static |
How many entries of selected_seen are used.
Definition at line 53 of file ex_gui_datagrid_keys.c.
Referenced by main(), and on_select().
|
static |
Rows reported by the grid's on_select callback, in order.
Definition at line 51 of file ex_gui_datagrid_keys.c.
Referenced by main(), and on_select().