annotate src/aosd/ghosd.h @ 810:4174d2783be5 trunk

[svn] - delete a lot of stuff
author nenolod
date Mon, 12 Mar 2007 11:37:35 -0700
parents ff62f5530a36
children 16e51fb5908e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
1 /* ghosd -- OSD with fake transparency, cairo, and pango.
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
2 * Copyright (C) 2006 Evan Martin <martine@danga.com>
590
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
3 *
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
4 * With further development by Giacomo Lozito <james@develia.org>
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
5 * for the ghosd-based Audacious OSD
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
6 */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
7
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
8 #ifndef __GHOSD_H__
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
9 #define __GHOSD_H__
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
10
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
11 #include <cairo/cairo.h>
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
12
734
ff62f5530a36 [svn] - freebsd portability fixes from "The_Paya". Closes #814.
nenolod
parents: 590
diff changeset
13 #include <limits.h> /* INT_MAX */
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
14 #include <sys/time.h> /* timeval */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
15
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
16 typedef struct _Ghosd Ghosd;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
17
590
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
18 /* minimal struct to handle button events */
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
19 typedef struct
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
20 {
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
21 int x, y;
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
22 int send_event;
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
23 int x_root, y_root;
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
24 unsigned int button;
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
25 unsigned long time;
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
26 }
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
27 GhosdEventButton;
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
28
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
29 typedef void (*GhosdRenderFunc)(Ghosd *ghosd, cairo_t *cr, void *user_data);
590
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
30 typedef void (*GhosdEventButtonCb)(Ghosd *ghosd, GhosdEventButton *event, void *user_data);
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
31
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
32 Ghosd *ghosd_new(void);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
33 void ghosd_destroy(Ghosd* ghosd);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
34
734
ff62f5530a36 [svn] - freebsd portability fixes from "The_Paya". Closes #814.
nenolod
parents: 590
diff changeset
35 #define GHOSD_COORD_CENTER INT_MAX
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
36 void ghosd_set_transparent(Ghosd *ghosd, int transparent);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
37 void ghosd_set_position(Ghosd *ghosd, int x, int y, int width, int height);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
38 void ghosd_set_render(Ghosd *ghosd, GhosdRenderFunc render_func,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
39 void* user_data, void (*user_data_d)(void*));
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
40
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
41 void ghosd_render(Ghosd *ghosd);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
42 void ghosd_show(Ghosd *ghosd);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
43 void ghosd_hide(Ghosd *ghosd);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
44
590
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
45 void ghosd_set_event_button_cb(Ghosd *ghosd, GhosdEventButtonCb cb, void *user_data );
6584e697e6da [svn] - aosd: extended ghosd source with ghosd_set_event_button_cb to capture and handle button events in osd
giacomo
parents: 569
diff changeset
46
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
47 void ghosd_main_iterations(Ghosd *ghosd);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
48 void ghosd_main_until(Ghosd *ghosd, struct timeval *until);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
49 void ghosd_flash(Ghosd *ghosd, int fade_ms, int total_display_ms);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
50
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
51 int ghosd_get_socket(Ghosd *ghosd);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
52
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
53 #endif /* __GHOSD_H__ */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
54
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
55 /* vim: set ts=2 sw=2 et cino=(0 : */