2016-08-04 02:55:51 +03:00
|
|
|
/*
|
|
|
|
* gui-over.h - GUI: overlays
|
|
|
|
*
|
|
|
|
* Written 2016 by Werner Almesberger
|
|
|
|
* Copyright 2016 by Werner Almesberger
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUI_OVER_H
|
|
|
|
#define GUI_OVER_H
|
|
|
|
|
2016-08-04 13:53:25 +03:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2016-08-04 02:55:51 +03:00
|
|
|
#include <cairo/cairo.h>
|
|
|
|
|
2016-08-04 13:53:25 +03:00
|
|
|
#include "gui-aoi.h"
|
|
|
|
|
2016-08-04 02:55:51 +03:00
|
|
|
|
|
|
|
struct overlay;
|
|
|
|
|
|
|
|
|
2016-08-05 02:35:41 +03:00
|
|
|
struct overlay *overlay_draw(struct overlay *over, cairo_t *cr, int *x, int *y);
|
2016-08-04 13:53:25 +03:00
|
|
|
void overlay_draw_all(struct overlay *overlays, cairo_t *cr);
|
2016-08-07 01:14:31 +03:00
|
|
|
struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois,
|
2016-08-04 13:53:25 +03:00
|
|
|
bool (*hover)(void *user, bool on), void (*click)(void *user), void *user);
|
2016-08-07 01:14:31 +03:00
|
|
|
void overlay_text(struct overlay *over, const char *fmt, ...);
|
2016-08-04 02:55:51 +03:00
|
|
|
void overlay_remove(struct overlay **overlays, struct overlay *over);
|
|
|
|
void overlay_remove_all(struct overlay **overlays);
|
|
|
|
|
|
|
|
#endif /* !GUI_OVER_H */
|