Displaying 13 results from an estimated 13 matches for "mouse_x".
2007 Jun 21
0
Branch 'as' - 5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_connection.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...--git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 8aaebbc..fe4f415 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -437,7 +437,6 @@ swfdec_player_update_mouse_cursor (Swfde
static void
swfdec_player_update_drag_movie (SwfdecPlayer *player)
{
- double mouse_x, mouse_y;
double x, y;
SwfdecMovie *movie;
@@ -446,23 +445,23 @@ swfdec_player_update_drag_movie (SwfdecP
movie = player->mouse_drag;
g_assert (movie->cache_state == SWFDEC_MOVIE_UP_TO_DATE);
- mouse_x = player->mouse_x;
- mouse_y = player->mouse_y;
- swfdec_movie_glo...
2007 Aug 22
0
8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_sprite_movie_as.c vivified/core
...player->scale_x;
- *y *= player->scale_y;
}
if (movie->cache_state >= SWFDEC_MOVIE_INVALID_MATRIX)
swfdec_movie_update (movie);
@@ -539,6 +526,7 @@ swfdec_movie_get_mouse (SwfdecMovie *mov
player = SWFDEC_PLAYER (SWFDEC_AS_OBJECT (movie)->context);
*x = player->mouse_x;
*y = player->mouse_y;
+ swfdec_player_stage_to_global (player, x, y);
swfdec_movie_global_to_local (movie, x, y);
}
@@ -563,6 +551,18 @@ swfdec_movie_send_mouse_change (SwfdecMo
klass->mouse_change (movie, x, y, mouse_in, button);
}
+/**
+ * swfdec_movie_get_movie_at:
+ * @mo...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...;MovieClip;
swfdec_as_object_set_constructor (SWFDEC_AS_OBJECT (movie), constructor);
}
@@ -675,8 +677,8 @@ swfdec_movie_get_mouse (SwfdecMovie *movie, double *x, double *y)
g_return_if_fail (y != NULL);
player = SWFDEC_PLAYER (SWFDEC_AS_OBJECT (movie)->context);
- *x = player->mouse_x;
- *y = player->mouse_y;
+ *x = player->priv->mouse_x;
+ *y = player->priv->mouse_y;
swfdec_player_stage_to_global (player, x, y);
swfdec_movie_global_to_local (movie, x, y);
}
@@ -1076,7 +1078,7 @@ swfdec_movie_get_by_name (SwfdecMovie *movie, const char *name, gboolean un...
2007 Oct 22
0
2 commits - doc/swfdec-sections.txt libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h
...+1059,9 @@ static gboolean
swfdec_player_do_handle_mouse (SwfdecPlayer *player,
double x, double y, int button)
{
- swfdec_player_lock (player);
+ if (!swfdec_player_lock (player))
+ return FALSE;
+
SWFDEC_LOG ("handling mouse at %g %g %d", x, y, button);
if (player->mouse_x != x || player->mouse_y != y) {
player->mouse_x = x;
@@ -1159,7 +1162,9 @@ swfdec_player_do_advance (SwfdecPlayer *player, gulong msecs, guint audio_sample
SwfdecTick target_time;
guint frames_now;
- swfdec_player_lock (player);
+ if (!swfdec_player_lock (player))
+ return...
2007 Aug 17
0
3 commits - libswfdec/swfdec_sprite_movie_as.c test/trace
...t = movie->original_extents;
+ while (movie->parent) {
+ swfdec_rect_transform (&movie_rect, &movie_rect, &movie->matrix);
+ movie = movie->parent;
+ }
+
+ SWFDEC_AS_VALUE_SET_BOOLEAN (rval, swfdec_rect_contains (&movie_rect,
+ SWFDEC_PLAYER (cx)->mouse_x, SWFDEC_PLAYER (cx)->mouse_y));
} else {
- SWFDEC_ERROR ("hitTest for x, y coordinate not implemented");
+ SWFDEC_FIXME ("hitText with 0 parameters, what to do?");
}
}
diff-tree 76e35412ea974749804920a47678db8c1242487b (from db0818e50daf6422c947fba7a38aaccef6d6...
2007 Nov 28
0
59 commits - libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_button.c libswfdec/swfdec_button.h libswfdec/swfdec_button_movie.c libswfdec/swfdec_button_movie.h libswfdec/swfdec_event.c
...goto error;
}
j = scanner->value.v_int;
- swfdec_command_append_mouse (inter, i, j, inter->mouse_button);
+ swfdec_command_append_mouse (inter, SWFDEC_COMMAND_MOVE, i, j, inter->mouse_button);
break;
case SWFDEC_COMMAND_DOWN:
- swfdec_command_append_mouse (inter, inter->mouse_x, inter->mouse_y, 1);
+ swfdec_command_append_mouse (inter, SWFDEC_COMMAND_DOWN, inter->mouse_x, inter->mouse_y, 1);
break;
case SWFDEC_COMMAND_UP:
- swfdec_command_append_mouse (inter, inter->mouse_x, inter->mouse_y, 0);
+ swfdec_command_append_mouse (inter, SWFDEC_COMMAND_U...
2007 Jul 21
0
12 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/jpeg libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...- y *= SWFDEC_TWIPS_SCALE_FACTOR;
+ x -= player->offset_x;
+ y -= player->offset_y;
+ x = x * SWFDEC_TWIPS_SCALE_FACTOR / player->scale_x;
+ y = y * SWFDEC_TWIPS_SCALE_FACTOR / player->scale_y;
SWFDEC_LOG ("handling mouse at %g %g %d", x, y, button);
if (player->mouse_x != x || player->mouse_y != y) {
player->mouse_x = x;
@@ -1486,19 +1559,25 @@ swfdec_player_render (SwfdecPlayer *play
return;
if (width == 0.0)
- width = player->width;
+ width = player->stage_width;
if (height == 0.0)
- height = player->height;
- real.x0...
2007 Aug 05
0
7 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_object.c libswfdec/swfdec.h libswfdec/swfdec_key.h libswfdec/swfdec_marshal.list libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...dd_symbol (scanner, 0, "release", GINT_TO_POINTER (SWFDEC_COMMAND_RELEASE));
g_scanner_input_text (scanner, data, length);
/* setup inter */
@@ -146,6 +158,22 @@ swfdec_interaction_new (const char *data
case SWFDEC_COMMAND_UP:
swfdec_command_append_mouse (inter, inter->mouse_x, inter->mouse_y, 0);
break;
+ case SWFDEC_COMMAND_PRESS:
+ token = g_scanner_get_next_token (scanner);
+ if (token != G_TOKEN_INT) {
+ g_scanner_unexp_token (scanner, G_TOKEN_INT, NULL, NULL, NULL, NULL, TRUE);
+ goto error;
+ }
+ swfdec_command_append_key (inter, scanner->value.v_...
2007 Aug 07
0
5 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_keys.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie_as.c player/swfdebug.c player/swfdec_debug_movies.c player/swfdec_debug_movies.h test/trace
...mmand;
command.command = type;
- command.args.key = key;
+ command.args.key.code = code;
+ command.args.key.ascii = ascii;
g_array_append_val (inter->commands, command);
}
@@ -159,20 +160,25 @@ swfdec_interaction_new (const char *data
swfdec_command_append_mouse (inter, inter->mouse_x, inter->mouse_y, 0);
break;
case SWFDEC_COMMAND_PRESS:
+ case SWFDEC_COMMAND_RELEASE:
+ j = token;
token = g_scanner_get_next_token (scanner);
if (token != G_TOKEN_INT) {
g_scanner_unexp_token (scanner, G_TOKEN_INT, NULL, NULL, NULL, NULL, TRUE);
goto error;
}
- swfde...
2007 Dec 10
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_color_as.c libswfdec/swfdec_graphic_movie.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_movie_as_drawing.c
...- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -961,9 +961,9 @@ swfdec_player_update_drag_movie (SwfdecPlayer *player)
y = CLAMP (y, player->mouse_drag_rect.y0, player->mouse_drag_rect.y1);
SWFDEC_LOG ("mouse is at %g %g, originally (%g %g)", x, y, player->mouse_x, player->mouse_y);
if (x != movie->matrix.x0 || y != movie->matrix.y0) {
+ swfdec_movie_queue_update (movie, SWFDEC_MOVIE_INVALID_MATRIX);
movie->matrix.x0 = x;
movie->matrix.y0 = y;
- swfdec_movie_queue_update (movie, SWFDEC_MOVIE_INVALID_MATRIX);
}
}
@@ -13...
2008 Jan 08
0
9 commits - configure.ac test/custom test/Makefile.am test/swfdec_test_initialize.as test/swfdec_test_initialize.h test/swfdec_test_test.c test/trace
...FALSE,
- 0
-};
-
-void
-swfdec_interaction_free (SwfdecInteraction *inter)
-{
- g_return_if_fail (inter != NULL);
-
- g_array_free (inter->commands, TRUE);
- g_free (inter);
-}
-
-void
-swfdec_interaction_reset (SwfdecInteraction *inter)
-{
- g_return_if_fail (inter != NULL);
-
- inter->mouse_x = 0;
- inter->mouse_y = 0;
- inter->mouse_button = 0;
- inter->cur_idx = 0;
- inter->time_elapsed = 0;
-}
-
-static void
-swfdec_interaction_scanner_message (GScanner *scanner, gchar *message, gboolean error)
-{
- if (!error)
- g_printerr ("warning: %s\n", message);
-...
2007 Jun 05
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_scope.h
...ndition));
return TRUE;
@@ -557,7 +558,7 @@ swfdec_movie_get_mouse (SwfdecMovie *mov
g_return_if_fail (x != NULL);
g_return_if_fail (y != NULL);
- player = SWFDEC_ROOT_MOVIE (movie->root)->player;
+ player = SWFDEC_PLAYER (SWFDEC_AS_OBJECT (movie)->context);
*x = player->mouse_x;
*y = player->mouse_y;
swfdec_movie_global_to_local (movie, x, y);
@@ -577,7 +578,7 @@ swfdec_movie_send_mouse_change (SwfdecMo
button = 0;
} else {
mouse_in = swfdec_movie_mouse_in (movie, x, y);
- button = SWFDEC_ROOT_MOVIE (movie->root)->player->mouse_button;
+...
2007 Aug 20
0
Branch 'vivi' - 60 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c
...t = movie->original_extents;
+ while (movie->parent) {
+ swfdec_rect_transform (&movie_rect, &movie_rect, &movie->matrix);
+ movie = movie->parent;
+ }
+
+ SWFDEC_AS_VALUE_SET_BOOLEAN (rval, swfdec_rect_contains (&movie_rect,
+ SWFDEC_PLAYER (cx)->mouse_x, SWFDEC_PLAYER (cx)->mouse_y));
} else {
- SWFDEC_ERROR ("hitTest for x, y coordinate not implemented");
+ SWFDEC_FIXME ("hitText with 0 parameters, what to do?");
}
}
diff-tree 76e35412ea974749804920a47678db8c1242487b (from db0818e50daf6422c947fba7a38aaccef6d6...