summaryrefslogtreecommitdiff
path: root/gui/over.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-18 14:05:22 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-18 14:05:22 -0300
commit10b93cfc5c839937ca79a78724a955039ec6dff2 (patch)
treee5af7a22520e2553b7243844751537eade4c32a9 /gui/over.c
parentd5d513c076819a5a499e9410174d085593041ee7 (diff)
downloadeeshow-10b93cfc5c839937ca79a78724a955039ec6dff2.tar.gz
eeshow-10b93cfc5c839937ca79a78724a955039ec6dff2.tar.bz2
eeshow-10b93cfc5c839937ca79a78724a955039ec6dff2.zip
eeshow/gui/over.c; add section comments
Diffstat (limited to 'gui/over.c')
-rw-r--r--gui/over.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gui/over.c b/gui/over.c
index 9583b81..1d2c039 100644
--- a/gui/over.c
+++ b/gui/over.c
@@ -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)