search for: g_object_new

Displaying 20 results from an estimated 107 matches for "g_object_new".

2007 Aug 02
0
4 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_file_loader.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader.h player/swfdec_slow_loader.c
...class)->load (loader, parent, request, data, data_len); } else { SwfdecGtkLoader *gtk = SWFDEC_GTK_LOADER (loader); SwfdecGtkLoaderClass *klass = SWFDEC_GTK_LOADER_GET_CLASS (gtk); @@ -179,6 +179,6 @@ swfdec_gtk_loader_new (const char *uri) url = swfdec_url_new (uri); loader = g_object_new (SWFDEC_TYPE_GTK_LOADER, "url", url, NULL); swfdec_url_free (url); - swfdec_gtk_loader_load (loader, SWFDEC_LOADER_REQUEST_DEFAULT, NULL, 0); + swfdec_gtk_loader_load (loader, NULL, SWFDEC_LOADER_REQUEST_DEFAULT, NULL, 0); return loader; } diff --git a/libswfdec/swfdec_file_loade...
2007 May 28
0
[ wxruby-Bugs-11183 ] GLib errors cause crash
...: GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function (process:26965): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function (process:26965): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)'' failed (process:26965): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function (process:26965): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_ty...
2007 Nov 08
0
8 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_player.c test/trace
...ec_player_new (SwfdecAsDebugger *debugger) { + static const GTimeVal the_beginning = { 1035840244, 0 }; SwfdecPlayer *player; g_return_val_if_fail (debugger == NULL || SWFDEC_IS_AS_DEBUGGER (debugger), NULL); @@ -2003,6 +2004,8 @@ swfdec_player_new (SwfdecAsDebugger *debugger) player = g_object_new (SWFDEC_TYPE_PLAYER, "random-seed", 0, "max-runtime", 0, "debugger", debugger, NULL); + /* FIXME: make this a property or something and don't set it here */ + SWFDEC_AS_CONTEXT (player)->start_time = the_beginning; return player; } commit...
2007 Jul 31
0
10 commits - doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_buffer.c libswfdec/swfdec_debugger.c libswfdec/swfdec.h
...); swfdec_loader_error (loader, err); g_free (err); @@ -155,20 +157,6 @@ swfdec_gtk_loader_open_cb (GnomeVFSAsync swfdec_gtk_loader_start_read (gtk); } -static SwfdecLoader * -swfdec_gtk_loader_new_from_uri (GnomeVFSURI *uri) -{ - SwfdecGtkLoader *gtk; - - g_assert (uri); - gtk = g_object_new (SWFDEC_TYPE_GTK_LOADER, NULL); - gtk->guri = uri; - gnome_vfs_async_open_uri (&gtk->handle, uri, GNOME_VFS_OPEN_READ, - GNOME_VFS_PRIORITY_DEFAULT, swfdec_gtk_loader_open_cb, gtk); - SWFDEC_LOADER (gtk)->url = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_PASSWORD); - ret...
2007 Apr 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_font.c libswfdec/swfdec_loadertarget.c libswfdec/swfdec_movie.h libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_player.c
...e->start_width, line->start_color); } else { return g_strdup_printf ("%s", G_OBJECT_TYPE_NAME (pattern)); } } -SwfdecPattern * -swfdec_pattern_parse_stroke (SwfdecSwfDecoder *dec, gboolean rgba) -{ - SwfdecBits *bits = &dec->b; - SwfdecStrokePattern *pattern = g_object_new (SWFDEC_TYPE_STROKE_PATTERN, NULL); - - pattern->start_width = swfdec_bits_get_u16 (bits); - pattern->end_width = pattern->start_width; - if (rgba) { - pattern->start_color = swfdec_bits_get_rgba (bits); - } else { - pattern->start_color = swfdec_bits_get_color (bits); - }...
2006 Nov 12
0
[ wxruby-Bugs-6633 ] Serious (but harmless?) GTK warnings on Linux
...: GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:11017): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:11017): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)'' failed (process:11017): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_type_init() prior to this function (process:11017): GLib-GObject-CRITICAL **: gtype.c:2240: initialization assertion failed, use IA__g_ty...
2007 May 18
0
Branch 'as' - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_native_function.h
...ction))) + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + g_return_val_if_fail (g_type_is_a (type, SWFDEC_TYPE_AS_FUNCTION), NULL); + g_return_val_if_fail (size >= sizeof (SwfdecAsFunction), NULL); + + if (!swfdec_as_context_use_mem (context, size)) return NULL; - fun = g_object_new (SWFDEC_TYPE_AS_FUNCTION, NULL); - swfdec_as_object_add (SWFDEC_AS_OBJECT (fun), context, sizeof (SwfdecAsFunction)); - swfdec_as_object_root (fun); + fun = g_object_new (type, NULL); + swfdec_as_object_add (SWFDEC_AS_OBJECT (fun), context, size); if (context->Function) { SWFDEC_AS_V...
2007 Jan 03
12
instalation problem
Hi Im testing wxRuby. I have a problem when ruby try to load the load wx. Im newbie to ruby, maybe a make a simple mistake : Best regards. Install wxRuby-------------------------------------------------------------- pedro@la-vaca-azul:~$ sudo gem install wxruby2-preview Need to update 2 gems from http://gems.rubyforge.org .. complete Select which gem to install for your platform (i486-linux)
2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...>glyphs, SwfdecFontEntry, glyph).shape; } @@ -154,44 +167,67 @@ tag_func_define_font_info (SwfdecSwfDeco return SWFDEC_STATUS_OK; } +static void +swfdec_font_parse_shape (SwfdecSwfDecoder *s, SwfdecFontEntry *entry, guint size) +{ + SwfdecBits save_bits = s->b; + SwfdecShape *shape = g_object_new (SWFDEC_TYPE_SHAPE, NULL); + entry->shape = shape; + + g_ptr_array_add (shape->fills, swfdec_pattern_new_color (0xFFFFFFFF)); + g_ptr_array_add (shape->lines, swfdec_pattern_new_stroke (20, 0xFFFFFFFF)); + + shape->n_fill_bits = swfdec_bits_getbits (&s->b, 4); + SWFDEC_LOG (...
2007 Oct 22
0
6 commits - doc/Makefile.am doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_player.c libswfdec/swfdec_player.h
...k diff --git a/libswfdec-gtk/swfdec_gtk_player.c b/libswfdec-gtk/swfdec_gtk_player.c index 55db10a..60e7ded 100644 --- a/libswfdec-gtk/swfdec_gtk_player.c +++ b/libswfdec-gtk/swfdec_gtk_player.c @@ -174,7 +174,7 @@ swfdec_gtk_player_new (SwfdecAsDebugger *debugger) swfdec_init (); player = g_object_new (SWFDEC_TYPE_GTK_PLAYER, "debugger", debugger, - "max-runtime", 10 * 1000, NULL); + "max-runtime", (gulong) 10 * 1000, NULL); return player; } diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c index 3ed0d5a..749ee31 100644 --- a/libswf...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
..._IS_AS_OBJECT (ref)); + g_return_if_fail (SWFDEC_IS_AS_OBJECT (thisp)); + g_return_if_fail (ref == NULL || SWFDEC_IS_AS_OBJECT (ref)); if (frame->super != NULL) return; @@ -165,12 +164,11 @@ swfdec_as_super_new (SwfdecAsFrame *frame, SwfdecAsObject *ref, gboolean callabl super = g_object_new (SWFDEC_TYPE_AS_SUPER, NULL); frame->super = SWFDEC_AS_OBJECT (super); swfdec_as_object_add (SWFDEC_AS_OBJECT (super), context, sizeof (SwfdecAsSuper)); - super->thisp = ref; - super->callable = callable; + super->thisp = thisp; if (context->version <= 5) { super-...
2007 Apr 16
0
7 commits - libswfdec/swfdec_codec_gst.c libswfdec/swfdec_font.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_shape.c libswfdec/swfdec_shape.h libswfdec/swfdec_sprite.c
...(" color %08x", SWFDEC_COLOR_PATTERN (pattern)->start_color); - } else if (paint_style_type == 0x10 || paint_style_type == 0x12) { + } else if (paint_style_type == 0x10 || paint_style_type == 0x12 || paint_style_type == 0x13) { + SwfdecGradientPattern *gradient; pattern = g_object_new (SWFDEC_TYPE_GRADIENT_PATTERN, NULL); + gradient = SWFDEC_GRADIENT_PATTERN (pattern); swfdec_bits_get_matrix (bits, &pattern->start_transform, NULL); pattern->end_transform = pattern->start_transform; if (rgba) { - SWFDEC_GRADIENT_PATTERN (pattern)->gradient =...
2007 Aug 09
0
Branch 'vivi' - 12 commits - libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec/Makefile.am libswfdec/swfdec_as_array.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_debugger.c
...d (GTK_CONTAINER (command_line), entry); - g_signal_connect (entry, "activate", G_CALLBACK (command_line_entry_activate_cb), command_line); + gtk_widget_show_all (box); } GtkWidget * vivi_command_line_new (ViviApplication *app) { - GtkWidget *cl; + ViviCommandLine *cl; cl = g_object_new (VIVI_TYPE_COMMAND_LINE, "title", "Command Line", NULL); - return cl; + cl->app = app; + g_signal_connect (cl->app, "message", G_CALLBACK (vivi_command_line_append_message), cl->view); + return GTK_WIDGET (cl); } diff --git a/vivified/ui/vivi_commandlin...
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
...init (SwfdecDebugMovies *token) +swfdec_debug_movies_init (SwfdecDebugMovies *movies) { + movies->root = g_node_new (NULL); + movies->nodes = g_hash_table_new (g_direct_hash, g_direct_equal); } SwfdecDebugMovies * @@ -359,7 +372,7 @@ swfdec_debug_movies_new (SwfdecPlayer *p movies = g_object_new (SWFDEC_TYPE_DEBUG_MOVIES, NULL); movies->player = player; g_object_ref (player); - if (SWFDEC_IS_DEBUGGER (player) && FALSE) { + if (SWFDEC_IS_DEBUGGER (player)) { g_signal_connect (player, "movie-added", G_CALLBACK (swfdec_debug_movies_added), movies); g_sig...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...LL); + if (preallocated_items > 1024) { + SWFDEC_INFO ("%u items is a lot, better only preallocate 1024", preallocated_items); + preallocated_items = 1024; + } + + size = sizeof (SwfdecAsArray); + if (!swfdec_as_context_use_mem (context, size)) + return NULL; + object = g_object_new (SWFDEC_TYPE_AS_ARRAY, NULL); + swfdec_as_object_add (object, context, size); + if (preallocated_items) { + g_array_set_size (SWFDEC_AS_ARRAY (object)->values, preallocated_items); + g_array_set_size (SWFDEC_AS_ARRAY (object)->values, 0); + } + return object; +} + diff --git a/libsw...
2007 May 22
0
Branch 'as' - 9 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c
...SwfdecAsObject *ret; - g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); + g_return_val_if_fail (SWFDEC_IS_AS_FRAME (frame), NULL); + context = SWFDEC_AS_OBJECT (frame)->context; if (!swfdec_as_context_use_mem (context, sizeof (SwfdecAsSuper))) return NULL; ret = g_object_new (SWFDEC_TYPE_AS_SUPER, NULL); + super = SWFDEC_AS_SUPER (ret); + if (frame->thisp) { + SwfdecAsValue val; + super->object = frame->thisp; + swfdec_as_object_get_variable (frame->thisp, SWFDEC_AS_STR_constructor, &val); + if (SWFDEC_AS_VALUE_IS_OBJECT (&val)) { +...
2007 Aug 19
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_super.c libswfdec/swfdec_as_with.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie.c
...uctor() It was FALSE every time diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index 9d245c3..a64b165 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -400,7 +400,7 @@ swfdec_as_array_new (SwfdecAsContext *co return FALSE; ret = g_object_new (SWFDEC_TYPE_AS_ARRAY, NULL); swfdec_as_object_add (ret, context, sizeof (SwfdecAsArray)); - swfdec_as_object_set_constructor (ret, context->Array, FALSE); + swfdec_as_object_set_constructor (ret, context->Array); return ret; } @@ -1052,8 +1052,7 @@ swfdec_as_array_construct (Swfde...
2007 Nov 07
0
7 commits - doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_decoder.c libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c
...ibswfdec/swfdec_decoder.c index 6a98981..b17cb98 100644 --- a/libswfdec/swfdec_decoder.c +++ b/libswfdec/swfdec_decoder.c @@ -58,10 +58,12 @@ swfdec_decoder_new (SwfdecPlayer *player, const SwfdecBuffer *buffer) data[1] == 'W' && data[2] == 'S') { retval = g_object_new (SWFDEC_TYPE_SWF_DECODER, NULL); +#if 0 } else if (data[0] == 'F' && data[1] == 'L' && data[2] == 'V') { retval = g_object_new (SWFDEC_TYPE_FLV_DECODER, NULL); +#endif } else { retval = NULL; } diff --git a/libswfdec/swfdec_fl...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...g_return_val_if_fail (SWFDEC_AS_IS_CONTEXT (context), NULL); + g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), NULL); g_return_val_if_fail (string != NULL, NULL); ret = g_hash_table_lookup (context->strings, string); @@ -277,3 +279,111 @@ swfdec_as_context_new (void) { return g_object_new (SWFDEC_TYPE_AS_CONTEXT, NULL); } + +/* defines minimum and maximum versions for which we have seperate scripts */ +#define MINSCRIPTVERSION 3 +#define MAXSCRIPTVERSION 7 +#define EXTRACT_VERSION(v) MIN ((v) - MINSCRIPTVERSION, MAXSCRIPTVERSION - MINSCRIPTVERSION) + +typedef JSBool (* SwfdecAction...
2007 Nov 12
0
libswfdec/swfdec_resource.c
...swfdec_resource_do_unload, resource, g_object_unref); + if (movie) { + resource = g_object_ref (SWFDEC_MOVIE (movie)->resource); + swfdec_player_request_unload (player, path, swfdec_resource_do_unload, resource, g_object_unref); + } g_free (path); } else { resource = g_object_new (SWFDEC_TYPE_RESOURCE, NULL);