mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-17 20:04:05 +02:00
eeshow/gui/over.c; add section comments
This commit is contained in:
parent
55647987b5
commit
2f65506cdd
@ -52,6 +52,9 @@ struct overlay {
|
||||
};
|
||||
|
||||
|
||||
/* ----- Drawing core ------------------------------------------------------ */
|
||||
|
||||
|
||||
static void rrect(cairo_t *cr, int x, int y, int w, int h, int r)
|
||||
{
|
||||
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,
|
||||
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,
|
||||
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)
|
||||
{
|
||||
over->style = *style;
|
||||
@ -263,6 +275,9 @@ void overlay_text(struct overlay *over, const char *fmt, ...)
|
||||
}
|
||||
|
||||
|
||||
/* ----- Removal ----------------------------------------------------------- */
|
||||
|
||||
|
||||
static void overlay_free(struct overlay *over)
|
||||
{
|
||||
if (over->aoi)
|
||||
|
Loading…
Reference in New Issue
Block a user