Mercurial > audlegacy-plugins
diff src/aosd/ghosd.h @ 590:6584e697e6da trunk
[svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
author | giacomo |
---|---|
date | Wed, 31 Jan 2007 11:50:36 -0800 |
parents | d401f87f89f7 |
children | ff62f5530a36 |
line wrap: on
line diff
--- a/src/aosd/ghosd.h Wed Jan 31 09:39:22 2007 -0800 +++ b/src/aosd/ghosd.h Wed Jan 31 11:50:36 2007 -0800 @@ -1,5 +1,8 @@ /* ghosd -- OSD with fake transparency, cairo, and pango. * Copyright (C) 2006 Evan Martin <martine@danga.com> + * + * With further development by Giacomo Lozito <james@develia.org> + * for the ghosd-based Audacious OSD */ #ifndef __GHOSD_H__ @@ -12,7 +15,19 @@ typedef struct _Ghosd Ghosd; +/* minimal struct to handle button events */ +typedef struct +{ + int x, y; + int send_event; + int x_root, y_root; + unsigned int button; + unsigned long time; +} +GhosdEventButton; + typedef void (*GhosdRenderFunc)(Ghosd *ghosd, cairo_t *cr, void *user_data); +typedef void (*GhosdEventButtonCb)(Ghosd *ghosd, GhosdEventButton *event, void *user_data); Ghosd *ghosd_new(void); void ghosd_destroy(Ghosd* ghosd); @@ -27,6 +42,8 @@ void ghosd_show(Ghosd *ghosd); void ghosd_hide(Ghosd *ghosd); +void ghosd_set_event_button_cb(Ghosd *ghosd, GhosdEventButtonCb cb, void *user_data ); + void ghosd_main_iterations(Ghosd *ghosd); void ghosd_main_until(Ghosd *ghosd, struct timeval *until); void ghosd_flash(Ghosd *ghosd, int fade_ms, int total_display_ms);