[Swfdec] libswfdec/swfdec_movie.h libswfdec/swfdec_player.c
Benjamin Otte
company at kemper.freedesktop.org
Wed Nov 28 07:58:11 PST 2007
libswfdec/swfdec_movie.h | 1 +
libswfdec/swfdec_player.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 67d7565ce6d9d2f2c99eeb64bf22fa2577372502
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Nov 28 16:53:54 2007 +0100
add a vfunc for getting the mouse cursor
This change makes a click cursor work for normal movies now, too.
diff --git a/libswfdec/swfdec_movie.h b/libswfdec/swfdec_movie.h
index 4e43342..6ecc285 100644
--- a/libswfdec/swfdec_movie.h
+++ b/libswfdec/swfdec_movie.h
@@ -165,6 +165,7 @@ struct _SwfdecMovieClass {
gboolean events);
/* mouse handling */
gboolean (* mouse_events) (SwfdecMovie * movie);
+ SwfdecMouseCursor (* mouse_cursor) (SwfdecMovie * movie);
void (* mouse_in) (SwfdecMovie * movie);
void (* mouse_out) (SwfdecMovie * movie);
void (* mouse_press) (SwfdecMovie * movie,
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index f6f89b9..231fe8c 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -920,11 +920,11 @@ swfdec_player_update_mouse_cursor (SwfdecPlayer *player)
if (!player->mouse_visible) {
new = SWFDEC_MOUSE_CURSOR_NONE;
} else if (player->mouse_grab != NULL) {
- /* FIXME: this needs to be more sophisticated, since SwfdecEditText may
- * want to have different mouse cursors depending on location (it supports
- * links in theory)
- */
- if (SWFDEC_IS_BUTTON_MOVIE (player->mouse_grab))
+ SwfdecMovieClass *klass = SWFDEC_MOVIE_GET_CLASS (player->mouse_grab);
+
+ if (klass->mouse_cursor)
+ new = klass->mouse_cursor (player->mouse_grab);
+ else
new = SWFDEC_MOUSE_CURSOR_CLICK;
}
More information about the Swfdec
mailing list