![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "nilorea/n_common.h"#include "nilorea/n_log.h"#include "nilorea/n_gui.h"Go to the source code of this file.
Macros | |
| #define | ALLEGRO_UNSTABLE 1 |
Functions | |
| static void | destroy_state (void *state) |
| the owned state's destructor | |
| static void | expect_true (const char *what, int ok) |
| record one check | |
| static int | feed (N_GUI_CTX *gui, int type, int x, int y, int button, int dz) |
| feed one mouse event | |
| int | main (int argc, char **argv) |
| static int | on_mouse (int widget_id, const N_GUI_MOUSE_EVENT *ev, void *user_data) |
| the widget's mouse callback | |
| static int | process_args (int argc, char **argv) |
| read -V LOGLEVEL | |
| static int | was (int type, int button, float x, float y) |
| was the last thing told this | |
Variables | |
| static int | destroyed = 0 |
| how many times the owned state was destroyed | |
| static int | failures = 0 |
| static N_GUI_MOUSE_EVENT | last |
| the last event the widget was told of, and how many | |
| static int | log_level = 3 |
| static int | told = 0 |
| static int | wheel_answer = 1 |
| what the widget answers to a wheel | |
| #define ALLEGRO_UNSTABLE 1 |
Definition at line 16 of file ex_gui_custom_mouse.c.
|
static |
the owned state's destructor
Definition at line 72 of file ex_gui_custom_mouse.c.
References destroyed.
Referenced by main().
|
static |
|
static |
feed one mouse event
Definition at line 78 of file ex_gui_custom_mouse.c.
References gui, n_gui_process_event(), and type().
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 96 of file ex_gui_custom_mouse.c.
References destroy_state(), destroyed, expect_true(), failures, feed(), font, gui, last, LOG_ERR, log_level, n_gui_add_button(), n_gui_add_custom(), n_gui_add_window(), n_gui_custom_set_destroy(), n_gui_custom_set_mouse(), n_gui_destroy_ctx(), N_GUI_MOUSE_DOWN, N_GUI_MOUSE_DRAG, N_GUI_MOUSE_MOVE, N_GUI_MOUSE_UP, N_GUI_MOUSE_WHEEL, n_gui_new_ctx(), n_gui_open_window(), n_gui_set_display_size(), N_GUI_SHAPE_RECT, N_GUI_WIN_FRAMELESS, n_gui_window_set_flags(), n_log, on_mouse(), process_args(), set_log_level(), told, was(), and wheel_answer.
|
static |
the widget's mouse callback
Definition at line 63 of file ex_gui_custom_mouse.c.
References last, N_GUI_MOUSE_WHEEL, told, N_GUI_MOUSE_EVENT::type, and wheel_answer.
Referenced by main(), and n_gui_custom_set_mouse().
|
static |
|
static |
was the last thing told this
Definition at line 92 of file ex_gui_custom_mouse.c.
Referenced by main().
|
static |
how many times the owned state was destroyed
Definition at line 36 of file ex_gui_custom_mouse.c.
Referenced by destroy_state(), and main().
|
static |
Definition at line 28 of file ex_gui_custom_mouse.c.
|
static |
the last event the widget was told of, and how many
Definition at line 31 of file ex_gui_custom_mouse.c.
Referenced by _grid_draw(), _wrap_words_emit(), collect(), main(), md_emit_line(), n_diff_to_unified(), n_gui_process_event(), n_path_join(), on_mouse(), visible(), was(), wildmat(), wildmatcase(), wrap_hit_line(), and wrap_span_line().
|
static |
Definition at line 27 of file ex_gui_custom_mouse.c.
|
static |
Definition at line 32 of file ex_gui_custom_mouse.c.
Referenced by main(), and on_mouse().
|
static |
what the widget answers to a wheel
Definition at line 34 of file ex_gui_custom_mouse.c.
Referenced by main(), and on_mouse().