![]() |
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"#include <allegro5/allegro_primitives.h>Go to the source code of this file.
Macros | |
| #define | ALLEGRO_UNSTABLE 1 |
Functions | |
| static int | corner_is_colour (ALLEGRO_BITMAP *bmp, int x0, int y0, int x1, int y1, unsigned char r, unsigned char g, unsigned char b) |
| whether the top-left corner of a colour's bounding box (searched in a region) is that colour: 1 square, 0 rounded, -1 colour absent | |
| static void | expect_true (const char *what, int ok) |
| record one check | |
| static N_GUI_THEME | flat (unsigned char r, unsigned char g, unsigned char b) |
| a flat theme in one colour: fill and border alike, so a shape is one colour and its bounding box is the shape | |
| static int | is_rgb (ALLEGRO_BITMAP *bmp, int x, int y, unsigned char r, unsigned char g, unsigned char b) |
| is pixel (x, y) exactly this colour? | |
| int | main (int argc, char **argv) |
| static int | process_args (int argc, char **argv) |
| parse -V LOG_LEVEL | |
| static void | run (ALLEGRO_FONT *font, int mode, const char *name) |
| draw one frameless window holding a text area and a checkbox, in the given shape mode, and check each shape's corner | |
Variables | |
| static int | failures = 0 |
| static int | log_level = 3 |
| #define ALLEGRO_UNSTABLE 1 |
Definition at line 23 of file ex_gui_round.c.
|
static |
whether the top-left corner of a colour's bounding box (searched in a region) is that colour: 1 square, 0 rounded, -1 colour absent
Definition at line 79 of file ex_gui_round.c.
References is_rgb().
Referenced by run().
|
static |
|
static |
a flat theme in one colour: fill and border alike, so a shape is one colour and its bounding box is the shape
Definition at line 65 of file ex_gui_round.c.
References n_gui_make_theme().
|
static |
is pixel (x, y) exactly this colour?
Definition at line 71 of file ex_gui_round.c.
Referenced by corner_is_colour().
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 149 of file ex_gui_round.c.
References failures, font, LOG_ERR, log_level, N_GUI_SHAPE_RECT, N_GUI_SHAPE_ROUNDED, n_log, process_args(), run, and set_log_level().
|
static |
|
static |
draw one frameless window holding a text area and a checkbox, in the given shape mode, and check each shape's corner
Definition at line 97 of file ex_gui_round.c.
References corner_is_colour(), expect_true(), flat(), font, gui, mode, n_gui_add_checkbox(), n_gui_add_textarea(), n_gui_add_window(), n_gui_destroy_ctx(), n_gui_draw(), n_gui_new_ctx(), n_gui_set_default_theme(), n_gui_set_display_size(), n_gui_set_shape_mode(), n_gui_set_widget_theme(), N_GUI_SHAPE_ROUNDED, N_GUI_WIN_FIXED_POSITION, N_GUI_WIN_FRAMELESS, and n_gui_window_set_flags().
|
static |
Definition at line 37 of file ex_gui_round.c.
|
static |
Definition at line 36 of file ex_gui_round.c.