1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-17 22:25:20 +02:00

eeshow/gui/over.c; add section comments

This commit is contained in:
Werner Almesberger 2016-08-18 14:05:22 -03:00
parent 55647987b5
commit 2f65506cdd

View File

@ -52,6 +52,9 @@ struct overlay {
}; };
/* ----- Drawing core ------------------------------------------------------ */
static void rrect(cairo_t *cr, int x, int y, int w, int h, int r) static void rrect(cairo_t *cr, int x, int y, int w, int h, int r)
{ {
const double deg = M_PI / 180.0; const double deg = M_PI / 180.0;
@ -166,6 +169,9 @@ fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->
} }
/* ----- Drawing interfaces ------------------------------------------------ */
void overlay_draw_all_d(struct overlay *overlays, cairo_t *cr, void overlay_draw_all_d(struct overlay *overlays, cairo_t *cr,
unsigned x, unsigned y, int dx, int dy) unsigned x, unsigned y, int dx, int dy)
{ {
@ -213,6 +219,9 @@ void overlay_draw_all(struct overlay *overlays, cairo_t *cr, int x, int y)
} }
/* ----- Creation ---------------------------------------------------------- */
struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois, struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois,
bool (*hover)(void *user, bool on), void (*click)(void *user), void *user) bool (*hover)(void *user, bool on), void (*click)(void *user), void *user)
{ {
@ -240,6 +249,9 @@ struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois,
} }
/* ----- Configuration ----------------------------------------------------- */
void overlay_style(struct overlay *over, const struct overlay_style *style) void overlay_style(struct overlay *over, const struct overlay_style *style)
{ {
over->style = *style; over->style = *style;
@ -263,6 +275,9 @@ void overlay_text(struct overlay *over, const char *fmt, ...)
} }
/* ----- Removal ----------------------------------------------------------- */
static void overlay_free(struct overlay *over) static void overlay_free(struct overlay *over)
{ {
if (over->aoi) if (over->aoi)