mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-29 11:56:15 +02:00
eeshow/gui/over.h, over.c: remove dragging support (now input.c)
The crazy detour through aoi.c and over.c is no longer needed.
This commit is contained in:
parent
fc1fbece43
commit
d78caddaf9
@ -44,7 +44,6 @@ struct overlay {
|
|||||||
struct aoi **aois;
|
struct aoi **aois;
|
||||||
bool (*hover)(void *user, bool on);
|
bool (*hover)(void *user, bool on);
|
||||||
void (*click)(void *user);
|
void (*click)(void *user);
|
||||||
void (*drag)(void *user, int dx, int dy);
|
|
||||||
void *user;
|
void *user;
|
||||||
|
|
||||||
struct aoi *aoi;
|
struct aoi *aoi;
|
||||||
@ -146,7 +145,7 @@ fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->
|
|||||||
cairo_reset_clip(cr);
|
cairo_reset_clip(cr);
|
||||||
g_object_unref(layout);
|
g_object_unref(layout);
|
||||||
|
|
||||||
if (over->hover || over->click || over->drag) {
|
if (over->hover || over->click) {
|
||||||
struct aoi aoi_cfg = {
|
struct aoi aoi_cfg = {
|
||||||
.x = x,
|
.x = x,
|
||||||
.y = y,
|
.y = y,
|
||||||
@ -154,7 +153,6 @@ fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->
|
|||||||
.h = h,
|
.h = h,
|
||||||
.hover = over->hover,
|
.hover = over->hover,
|
||||||
.click = over->click,
|
.click = over->click,
|
||||||
.drag = over->drag,
|
|
||||||
.user = over->user,
|
.user = over->user,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -248,13 +246,6 @@ void overlay_style(struct overlay *over, const struct overlay_style *style)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void overlay_draggable(struct overlay *over,
|
|
||||||
void (*drag)(void *user, int dx, int dy))
|
|
||||||
{
|
|
||||||
over->drag = drag;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void overlay_text_raw(struct overlay *over, const char *s)
|
void overlay_text_raw(struct overlay *over, const char *s)
|
||||||
{
|
{
|
||||||
free((char *) over->s);
|
free((char *) over->s);
|
||||||
|
@ -50,8 +50,6 @@ struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois,
|
|||||||
void overlay_text_raw(struct overlay *over, const char *s);
|
void overlay_text_raw(struct overlay *over, const char *s);
|
||||||
void overlay_text(struct overlay *over, const char *fmt, ...);
|
void overlay_text(struct overlay *over, const char *fmt, ...);
|
||||||
void overlay_style(struct overlay *over, const struct overlay_style *style);
|
void overlay_style(struct overlay *over, const struct overlay_style *style);
|
||||||
void overlay_draggable(struct overlay *over,
|
|
||||||
void (*drag)(void *user, int dx, int dy));
|
|
||||||
void overlay_remove(struct overlay **overlays, struct overlay *over);
|
void overlay_remove(struct overlay **overlays, struct overlay *over);
|
||||||
void overlay_remove_all(struct overlay **overlays);
|
void overlay_remove_all(struct overlay **overlays);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user