[clutter] Clutter based iOS Applications - Are we ready
This is great news for those of us wanting to develop iPhone apps using other toolkits such as clutter... http://www.macrumors.com/2010/09/09/apple-opens-app-store-to-third-party-development-tools-publishes-review-guidelines/
Re: [clutter] clutter-gtk CSW work
Excellent work! What is the long term plan for Clutter-Gtk? Will we see Gtk depending on clutter in the near future? On Tue, Aug 25, 2009 at 7:51 PM, Davyd Madeley davyd.made...@collabora.co.uk wrote: Hey all, In case you didn't see my blog post, I've been doing some work on extending alexl's clutter-gtk CSW branch. http://davyd.livejournal.com/280866.html http://git.collabora.co.uk/?p=user/davyd/clutter-gtk-davyd.git;a=shortlog;h=refs/heads/client-side-windows-additions The important additions here are GtkClutterWindow, which is a GtkWidget that looks like a regular GtkWindow, but transparently places actors onto a GtkClutterEmbed stage and GtkClutterStandin, which is a widget that accepts a ClutterActor and makes room within a GTK+ packing tree for that actor. The work also includes a bunch of test cases to check ref-counting, reparenting and a bunch of other things work correctly. It also includes some demos of intermixing Clutter work with GTK+ (some of these are quite hacky). Performance is ok, but some transient updates (like short button presses) can be lost if the widget tree is large (looking into this). Feedback greatly appreciated. --d -- Davyd Madeley Collabora Ltd., Melbourne, Australia http://www.collabora.co.uk/ -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.comclutter%2bunsubscr...@o-hand.com
[clutter] Keyboard events when using GtkClutterEmbed
If I attach a signal to the stage using clutter embed, should I be seeing keyboard events?
[clutter] clutter_texture_set_from_rgb_data
Hi All, I'm trying to understand what values I need to enter for the function clutter_texture_set_from_rgb_data, see below: rowstride : Distance in bytes between row starts. bpp : bytes per pixel (Currently only 3 and 4 supported, depending on has_alpha) Thanks
Re: [clutter] clutter_texture_set_from_rgb_data
Thanks for that. I'm assuming my RGB data is 24bit, I'm using standard SVG files. On Tue, Jul 7, 2009 at 2:44 AM, Uday Verma uday.ka...@gmail.com wrote: I think it would depend on what kind of RGB (24-bit, 3 bytes per pixel) data you have, whether it has alpha channel along with the RGB channel (RGBA) (32-bit, 4 bytes per pixel). so if you have just plain 24-bit per pixel RGB data, you need to pass 3 for bytes per pixel, otherwise its going to be 4. The rowstride would be a little more tricky. I thing it will be width * (3 or 4, depending on the kind of data, or bytes per pixel) rounded up to a multiple of 4. so for a 640x480 image, with RGB, the the rowstride would be 640*3 (it is divisible by 4), for an image like 201x100 with RGB data it would 201*3 = 603 rounded up to a multiple of 4 = 604 (divisble by four). I think this is how it works. Somebody, please correct me if I am wrong. A simple bit operation can always give you the correct result: rowstride = ((width * bpp) + 3) (~0x3) Hope this makes sense. On Mon, Jul 6, 2009 at 6:34 AM, Saul Lethbridge saul.lethbri...@gmail.com wrote: Hi All, I'm trying to understand what values I need to enter for the function clutter_texture_set_from_rgb_data, see below: rowstride : Distance in bytes between row starts. bpp : bytes per pixel (Currently only 3 and 4 supported, depending on has_alpha) Thanks -- Uday http://soundc.de/
[clutter] clutter_set_motion_events_ frequency
It seems the function *clutter_set_motion_events_ frequency*http://www.google.com.au/search?hl=enclient=firefox-arls=com.ubuntu:en-US:unofficialhs=esuei=u9UySpn0JtOIkQWXi42NCgsa=Xoi=spellresnum=0ct=resultcd=1q=clutter_set_motion_events_+frequencyspell=1 has been removed recently. Has it been replaced by another function?
[clutter] Can someone assist with this error?
I'm getting this error after obtaining the latest trunk of clutter-gtk when executing my app. Any idea's? GLib-GObject-WARNING **: specified class size for type `GtkClutterViewport' is smaller than the parent type's `ClutterActor' class size
Re: [clutter] Color management
This sounds like it would be a useful addition. On Thu, Jun 11, 2009 at 5:13 PM, Vladimir Nadvornik nadvor...@suse.czwrote: Hi, I have found this method of fast applying a color profile. The transformation is stored in 3D texture and applied with a shader. Details are here: http://www.mail-archive.com/lcms-u...@lists.sourceforge.net/msg02326.html Is it possible to do something similar with clutter API? Vladimir -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.comclutter%2bunsubscr...@o-hand.com
Re: [clutter] Capturing image data from stage save as video file.
I'm thinking it might be easier to simply offscreen the stage and do a gdk_pixbuf_get_from_drawable for each frame, then send that frame on for encoding to video. Has anybody tried this? On Fri, Jun 5, 2009 at 2:46 PM, Mustafizur Rahaman mustafizur.raha...@azingo.com wrote: Hi, You can use glReadPixels, but the problem is glReadPixels reads the data assuming origin at *lower left corner* of the screen, where your video data may be shown in a window where the origin is *top left corner. *So the image data you get here is actually vertically flipped, so you have to manually manipulate the data (in s/w) i guess before you can use them. and to do that for each frame, is quite expensive operation. My purpose was at some time depending on certain scenario, i had to take snapshot of the current framebuffer/GL surface data and then dump it on to the frame buffer later on when reqd.I followed the above mechanism.Because for me, it was at certain scenario and not in every frame, i am fine with the s/w manipulation of the image data captured.. May be this will give you certain hints.. Regs, Rahaman Saul Lethbridge wrote: Would I be able to use glReadBuffer glReadPixels to get the image data? Am I on the right track? http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html On Thu, Jun 4, 2009 at 6:59 AM, Florent fthi...@gmail.com wrote: Hello, I'm wanting an efficient way of capturing image data on the stage. I'd like to be able to take video of the stage and save it to a file. So being able to grab image data, frame by frame, from an animation. Has anybody attempted this or have any idea where I should start looking? See http://lists.o-hand.com/clutter/0175.html http://lists.o-hand.com/clutter/2163.html I recall pippin to have some patch for rendering video using ffmpeg, but in short there is nothing like that in the main code (yet?). There are ongoing experiments around gst-gl with clutter, might be your best chance. Or simply try general purpose screen capture software. I guess the best way would be for clutter-gst to offer this kind of feature. clutter-gst just displays video frames to an actor. Florent
[clutter] Execute an animation on completion of another
I'm trying to execute a second animation on completion of the first. I can't get this to work though (compiles but the second animation is not executed). I've altered the example animation to demonstrate what I'm trying to do. Using Git. see on_animation_complete function #include stdlib.h #include gmodule.h #include clutter/clutter.h static gboolean is_expanded = FALSE; void on_animation_complete_two (ClutterAnimation *animation, ClutterActor *actor) { g_print (Border Test Two: %i\n, clutter_rectangle_get_border_width (actor)); } static void on_animation_complete (ClutterAnimation *animation, ClutterActor *actor) { is_expanded = !is_expanded; g_print (Animation complete\n); g_print (Border: %i\n, clutter_rectangle_get_border_width (actor)); animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_EXPO, 7000, border-width, 3, NULL); g_signal_connect (animation, completed, G_CALLBACK (on_animation_complete_two), actor); clutter_actor_set_reactive (actor, TRUE); } static gboolean on_button_press (ClutterActor *actor, ClutterButtonEvent *event, gpointerdummy) { ClutterAnimation *animation; gint old_x, old_y, new_x, new_y; guint old_width, old_height, new_width, new_height; gdouble new_angle; ClutterVertex vertex = { 0, }; ClutterColor new_color = { 0, }; clutter_actor_get_position (actor, old_x, old_y); clutter_actor_get_size (actor, old_width, old_height); /* determine the final state of the animation depending on * the state of the actor */ if (!is_expanded) { new_x = old_x - 100; new_y = old_y - 100; new_width = old_width + 200; new_height = old_height + 200; new_angle = 360.0; new_color.red = 0xdd; new_color.green = 0x44; new_color.blue = 0xdd; new_color.alpha = 0xff; } else { new_x = old_x + 100; new_y = old_y + 100; new_width = old_width - 200; new_height = old_height - 200; new_angle = 0.0; new_color.red = 0x44; new_color.green = 0xdd; new_color.blue = 0x44; new_color.alpha = 0x88; } vertex.x = CLUTTER_UNITS_FROM_FLOAT ((float) new_width / 2); vertex.y = CLUTTER_UNITS_FROM_FLOAT ((float) new_height / 2); animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_EXPO, 2000, x, new_x, y, new_y, width, new_width, height, new_height, color, new_color, rotation-angle-z, new_angle, fixed::rotation-center-z, vertex, fixed::reactive, FALSE, NULL); g_signal_connect (animation, completed, G_CALLBACK (on_animation_complete), actor); return TRUE; } G_MODULE_EXPORT int test_animation_main (int argc, char *argv[]) { ClutterActor *stage, *rect; ClutterColor stage_color = { 0x66, 0x66, 0xdd, 0xff }; ClutterColor rect_color = { 0x44, 0xdd, 0x44, 0xff }; ClutterColor bord_color = { 0x00, 0xdd, 0x00, 0xff }; clutter_init (argc, argv); stage = clutter_stage_get_default (); clutter_stage_set_color (CLUTTER_STAGE (stage), stage_color); rect = clutter_rectangle_new_with_color (rect_color); clutter_rectangle_set_border_color (rect, bord_color); clutter_rectangle_set_border_width (rect, 10); clutter_container_add_actor (CLUTTER_CONTAINER (stage), rect); clutter_actor_set_size (rect, 50, 50); clutter_actor_set_anchor_point (rect, 25, 25); clutter_actor_set_position (rect, clutter_actor_get_width (stage) / 2, clutter_actor_get_height (stage) / 2); clutter_actor_set_opacity (rect, 0x88); clutter_actor_set_reactive (rect, TRUE); g_signal_connect (rect, button-press-event, G_CALLBACK (on_button_press), NULL); clutter_actor_show (stage); clutter_main (); return EXIT_SUCCESS; }
[clutter] ClutterMotionEvent and moving clutter actor
I'm trying to allow the user to move my actors around by using the ClutterMotionEvent and clutter_actor_set_position. It works, but if I move the mouse too quickly the actor is 'left behind' so to speak. If I move the mouse back of the actor then slowly move the mouse then I can continue to move the actor without having to re-click the mouse button. Could the issue be that I am calling the clutter_actor_set_position on each callback? I wouldn't have thought this would have that much overhead that it would cause this issue. Any idea's?
Re: [clutter] GtkClutterViewport
Doesn't appear to work! #include gtk/gtk.h #include clutter/clutter.h #include clutter-gtk/clutter-gtk.h int main (int argc, char *argv[]) { ClutterTimeline *timeline; ClutterActor*stage, *viewport, *tex, *tex2, *group; ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff }; GtkWidget *window, *embed; GtkWidget *table, *scrollbar; GtkAdjustment *h_adjustment, *v_adjustment; gint i; ClutterColor col2 = { 0, }; if (gtk_clutter_init (argc, argv) != CLUTTER_INIT_SUCCESS) g_error (Unable to initialize GtkClutter); group = clutter_group_new; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (window, destroy, G_CALLBACK (gtk_main_quit), NULL); table = gtk_table_new (2, 2, FALSE); gtk_container_add (GTK_CONTAINER (window), table); gtk_widget_show (table); embed = gtk_clutter_embed_new (); gtk_table_attach (GTK_TABLE (table), embed, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_widget_set_size_request (embed, 320, 240); gtk_widget_show (embed); stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (embed)); clutter_stage_set_color (CLUTTER_STAGE (stage), stage_color); viewport = gtk_clutter_viewport_new (NULL, NULL); clutter_actor_set_size (viewport, 100, 100); clutter_container_add_actor (CLUTTER_CONTAINER (stage), viewport); clutter_container_add_actor (CLUTTER_CONTAINER (viewport), group); if (argc 1) tex = gtk_clutter_texture_new_from_stock (embed, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); else { GError *error = NULL; tex = clutter_texture_new_from_file (argv[1], error); if (error) { g_warning (Unable to open `%s': %s, argv[1], error-message); g_error_free (error); } } tex2 = clutter_texture_new_from_file (tex2.png, NULL); clutter_container_add_actor (CLUTTER_CONTAINER (group), tex2); clutter_actor_set_position (tex2, 40, 40); clutter_container_add_actor (CLUTTER_CONTAINER (group), tex); gtk_clutter_scrollable_get_adjustments (GTK_CLUTTER_SCROLLABLE (viewport), h_adjustment, v_adjustment); scrollbar = gtk_vscrollbar_new (v_adjustment); gtk_table_attach (GTK_TABLE (table), scrollbar, 1, 2, 0, 1, 0, GTK_EXPAND | GTK_FILL, 0, 0); gtk_widget_show (scrollbar); scrollbar = gtk_hscrollbar_new (h_adjustment); gtk_table_attach (GTK_TABLE (table), scrollbar, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0); gtk_widget_show (scrollbar); gtk_widget_show (window); gtk_main(); return 0; } On Thu, Nov 13, 2008 at 7:35 AM, Pierre-Luc Beaudoin [EMAIL PROTECTED] wrote: On Thu, 2008-11-13 at 06:47 +1000, Saul Lethbridge wrote: Are there any plans to have something similar to GtkClutterViewport but that can contain multiple actors - like embedding the stage in the viewport and applying a size limit? The limit of a single actor makes GtkClutterViewport reasonably useless. I didn't try it, but you probably can have a ClutterGroup as the actor in GtkClutterViewport. Then you are free to add as many actors to that group. Try that, and let us know! :) -- Pierre-Luc Beaudoin
Re: [clutter] GtkClutterViewport
Once again...thank you. On Thu, Nov 13, 2008 at 10:23 PM, Emmanuele Bassi [EMAIL PROTECTED]wrote: On Thu, 2008-11-13 at 20:46 +1000, Saul Lethbridge wrote: Doesn't appear to work! you code, no. once I fixed it, it does. compile with: gcc -Wall \ `pkg-config --cflags clutter-0.9 clutter-gtk-0.9` \ -o test-viewport \ `pkg-config --libs clutter-0.9 clutter-gtk-0.9` \ test-viewport.c and run with: test-viewport /path/to/image1 /path/to/image2 you have to set the size of the stage and the viewport, as they are (as I already told you) limitless containers. as a side note: GtkClutterViewport is not the end-all, be-all of Clutter containers. it's a proof-of-concept turned useful kind of actor. the logic it provides is easily re-implementable into your own containers. ciao, Emmanuele. -- Emmanuele Bassi, Intel Open Source Technology Center
[clutter] GtkClutterViewport
Are there any plans to have something similar to GtkClutterViewport but that can contain multiple actors - like embedding the stage in the viewport and applying a size limit? The limit of a single actor makes GtkClutterViewport reasonably useless.
[clutter] Combination Events
Can somebody give me an example of capturing the following: - a left click - a left click with the control key held down - a left click with the shift key held down Thanks
[clutter] GtkClutterViewport
It's great to see this in Clutter, but I'm not sure it behaves as expected. I've attached a couple of images to show 'what I would expect'. The two images are of a standard 320 X 240 window and the same window maximized. It appears that it is irrelevant whether the window is maximized or not, the scrollable area is always the same. This makes little sense to me, I would have expected a maximized window to no longer 'need', or be able to be scrolled. using clutter-gtk (trunk) attachment: Maximized.pngattachment: Normal Size.png
[clutter] clutter_stage_read_pixels using clutter-gtk
I'm having some interesting outcomes from clutter_stage_read_pixels and gdk_pixbuf_save If I attempt to read the stage (which is embedded gtk) BEFORE the gtk widget is shown, I can read it successfully and the screenshot is successful. If I try to read it AFTER the clutter-gtk widget has been shown I get nothing but black in the saved image. Look here for the example code shown below (taken from http://github.com/bpeel/tractordodge/tree/master/tractordodge.c): int width = clutter_actor_get_width (stage); int height = clutter_actor_get_height (stage); guchar *data = clutter_stage_read_pixels (CLUTTER_STAGE (stage), 0, 0, width, height); guchar *p; GdkPixbuf *pb; for (p = data + width * height * 4; p data; p -= 3) *(--p) = 255; pb = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * 4, (GdkPixbufDestroyNotify) g_free, NULL); gdk_pixbuf_save (pb, screenie.png, png, NULL, NULL); g_object_unref (pb);
[clutter] Re: clutter_stage_read_pixels using clutter-gtk
), stage_color); gtk_widget_set_size_request (widget, 640, 480); g_signal_connect (app-stage, captured-event, G_CALLBACK (on_stage_capture), NULL); /* Create the main texture that the spin buttons manipulate */ pixbuf = gdk_pixbuf_new_from_file (redhand.png, NULL); if (pixbuf == NULL) g_error (Unable to load pixbuf\n); actor = gtk_clutter_texture_new_from_pixbuf (pixbuf); app-hand = actor; clutter_group_add (CLUTTER_GROUP (app-stage), actor); clutter_actor_get_size (actor, width, height); clutter_actor_set_position (actor, (CLUTTER_STAGE_WIDTH ()/2) - (width/2), (CLUTTER_STAGE_HEIGHT ()/2) - (height/2)); clutter_actor_set_reactive (actor, TRUE); g_signal_connect (actor, button-press-event, G_CALLBACK (on_hand_button_press), NULL); /* Setup the clutter entry */ actor = clutter_entry_new_full (Sans 10, , text_color); app-clutter_entry = actor; clutter_group_add (CLUTTER_GROUP (app-stage), actor); clutter_actor_set_position (actor, 0, 0); clutter_actor_set_size (actor, 500, 20); /* Create our adjustment widgets */ vbox = gtk_vbox_new (FALSE, 6); gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); box = gtk_hbox_new (TRUE, 6); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, TRUE, 0); label = gtk_label_new (Rotate x-axis); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); button = gtk_spin_button_new_with_range (0, 360, 1); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_signal_connect (button, value-changed, G_CALLBACK (on_x_changed), app); box = gtk_hbox_new (TRUE, 6); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, TRUE, 0); label = gtk_label_new (Rotate y-axis); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); button = gtk_spin_button_new_with_range (0, 360, 1); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_signal_connect (button, value-changed, G_CALLBACK (on_y_changed), app); box = gtk_hbox_new (TRUE, 6); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, TRUE, 0); label = gtk_label_new (Rotate z-axis); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); button = gtk_spin_button_new_with_range (0, 360, 1); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_signal_connect (button, value-changed, G_CALLBACK (on_z_changed), app); box = gtk_hbox_new (TRUE, 6); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, TRUE, 0); label = gtk_label_new (Adjust opacity); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); button = gtk_spin_button_new_with_range (0, 255, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (button), 255); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_signal_connect (button, value-changed, G_CALLBACK (on_opacity_changed), app); gtk_widget_show_all (app-window); /* Only show/show_all the stage after parent show. widget_show will call * show on the stage. */ clutter_actor_show_all (app-stage); funcScreenshot (); gtk_main (); return 0; } On Thu, Oct 30, 2008 at 9:36 PM, Saul Lethbridge [EMAIL PROTECTED]wrote: I'm having some interesting outcomes from clutter_stage_read_pixels and gdk_pixbuf_save If I attempt to read the stage (which is embedded gtk) BEFORE the gtk widget is shown, I can read it successfully and the screenshot is successful. If I try to read it AFTER the clutter-gtk widget has been shown I get nothing but black in the saved image. Look here for the example code shown below (taken from http://github.com/bpeel/tractordodge/tree/master/tractordodge.c): int width = clutter_actor_get_width (stage); int height = clutter_actor_get_height (stage); guchar *data = clutter_stage_read_pixels (CLUTTER_STAGE (stage), 0, 0, width, height); guchar *p; GdkPixbuf *pb; for (p = data + width * height * 4; p data; p -= 3) *(--p) = 255; pb = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * 4, (GdkPixbufDestroyNotify) g_free, NULL); gdk_pixbuf_save (pb, screenie.png, png, NULL, NULL); g_object_unref (pb);
Re: [clutter] [ANNOUNCE] Clutter-GTK 0.8.2 released (stable)
Thanks guys, great job. This was one of the things I've been waiting for (bug: 1114). Now just waiting for the ability to apply force to my clutter-box2d actors (bug:1146)!!! Thanks again... On Wed, Oct 15, 2008 at 11:13 PM, Emmanuele Bassi [EMAIL PROTECTED]wrote: hi everyone; Clutter-GTK 0.8.2, the new stable version of the GTK+ integration library for Clutter, has just been released. Download is available at: http://www.clutter-project.org/sources/clutter-gtk/0.8/ MD5 checksums: d6d5ebcdaa64e0f4c41cb391e55c8737 clutter-gtk-0.8.2.tar.gz fd8fe6ff8bdba349e393975cde80fec5 clutter-gtk-0.8.2.tar.bz2 Clutter-GTK is a library providing facilities to integrate Clutter into GTK+ applications. It provides a GTK+ widget, GtkClutterEmbed, for embedding a ClutterStage into any GtkContainer; it also provides utility functions for extracting style colors from any GtkWidget directly into ClutterColor structures and for using GdkPixbuf instances, stock icons and named icons with any ClutterTexture. Requirements: - clutter = 0.8.0 - gtk+ = 2.12 Release notes: - Fix the GdkPixbuf loading for images without an alpha channel. - Update the layout of the stage when getting an allocation from GtkClutterEmbed. - Fix bug #1114 - Mouse wheel events ignored in GtkClutterEmbed [Pierre-Luc Beaudoin] - Add more API for extracting the style colors from a GtkWidget ciao, Emmanuele. -- Emmanuele Bassi, Intel Open Source Technology Center -- To unsubscribe send a mail to [EMAIL PROTECTED][EMAIL PROTECTED]
Re: [clutter] Clutter on iPhone
Yes I agree...it would be great if this was an officially supported platform with binaries and documentation. On Wed, Sep 24, 2008 at 12:46 AM, Pedro Casagrande de Campos [EMAIL PROTECTED] wrote: Hi, We are interested on porting some applications written on clutter to the iPhone. Is there any guide on how to do this deployment? Do anyone knows if its is possible to deploy it as an official Apple signed application or it depends on a jailbroken iPhone. Thanks in advance, Pedro Casagrande de Campos Oniria Software -- To unsubscribe send a mail to [EMAIL PROTECTED][EMAIL PROTECTED]
Re: [clutter] clutter_actor_move_by and clutterbox2d
Alternatively, could I set the actor as 'manipulatable' - some how prevent the stage from receiving input and send synthetic drag signals to the actors? Seems to me that it would be easier and more logical to not set actors as manipulatable and simply move them around using clutter functions (I did try this by the way but it seems if I don't set an actor's mode, it's not visible at all). Looking forward to hearing back. Thanks and great work. On Sat, Aug 23, 2008 at 12:03 PM, Saul Lethbridge [EMAIL PROTECTED] wrote: I've made some changes to the example provided with clutter-box2d to illustrate my issue. You'll notice that you can see the left most hand 'attempt' to move but doesn't (or can't). ** scene-table.c (I also changed util.c [add_hand function] to name the actors) ** #include clutter/clutter.h #include clutter-box2d.h #include blockbox.h ClutterActor *move; gboolean moveactor(void) { printf(TIMEOUT\n); gint x,y; clutter_actor_get_position (move, x, y); printf (X: %i Y:%i\n, x, y); clutter_actor_set_position (move, x + 1, y - 1); return TRUE; } void scene_table (Scene *scene) { ClutterActor *stage; ClutterActor *group; ClutterVertex gravity = {0,0}; gint i = 10; stage = clutter_stage_get_default (); group = clutter_box2d_new (); add_cage (group, TRUE); scene-group = group; clutter_group_add (CLUTTER_GROUP (stage), group); clutter_box2d_set_simulating (CLUTTER_BOX2D (group), simulating); g_object_set (group, gravity, gravity, NULL); while (i--) { gint x, y; x = clutter_actor_get_width (clutter_stage_get_default ()) / 2; y = clutter_actor_get_height (clutter_stage_get_default ()) * 0.8; clutter_container_child_set (CLUTTER_CONTAINER (scene-group), add_hand (scene-group, x, y), manipulatable, TRUE, mode, CLUTTER_BOX2D_DYNAMIC, NULL); } move = clutter_container_find_child_by_name (CLUTTER_GROUP (stage), hand); g_timeout_add (1000, moveactor, NULL); } On Fri, Aug 22, 2008 at 8:17 PM, Øyvind Kolås [EMAIL PROTECTED] wrote: On Fri, Aug 22, 2008 at 1:40 AM, Saul Lethbridge [EMAIL PROTECTED] wrote: Hi, Should I be able to control my actors with standard clutter commands when simulating them? I can' manipulate my actors with the mouse (which I want to prevent), but I can't move them using standard clutter functions. Can anybody shed any light? a. How do I move my actors around (and still simulate) You should be able to set the position and rotation of the actors using clutter_actor_set_position, clutter_actor_set_rotation like normal. ClutterBox2D doesn't mirror the complete set of transformations possible using the ClutterActor properties, for now only position and rotation is honored. b. How do I prevent users from manually grabbing actors and moving them around. This only happens when the ClutterBox2d-container child property manipulatable is set. /Øyvind K. -- «The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/
Re: [clutter] clutter_actor_move_by and clutterbox2d
I've made some changes to the example provided with clutter-box2d to illustrate my issue. You'll notice that you can see the left most hand 'attempt' to move but doesn't (or can't). ** scene-table.c (I also changed util.c [add_hand function] to name the actors) ** #include clutter/clutter.h #include clutter-box2d.h #include blockbox.h ClutterActor *move; gboolean moveactor(void) { printf(TIMEOUT\n); gint x,y; clutter_actor_get_position (move, x, y); printf (X: %i Y:%i\n, x, y); clutter_actor_set_position (move, x + 1, y - 1); return TRUE; } void scene_table (Scene *scene) { ClutterActor *stage; ClutterActor *group; ClutterVertex gravity = {0,0}; gint i = 10; stage = clutter_stage_get_default (); group = clutter_box2d_new (); add_cage (group, TRUE); scene-group = group; clutter_group_add (CLUTTER_GROUP (stage), group); clutter_box2d_set_simulating (CLUTTER_BOX2D (group), simulating); g_object_set (group, gravity, gravity, NULL); while (i--) { gint x, y; x = clutter_actor_get_width (clutter_stage_get_default ()) / 2; y = clutter_actor_get_height (clutter_stage_get_default ()) * 0.8; clutter_container_child_set (CLUTTER_CONTAINER (scene-group), add_hand (scene-group, x, y), manipulatable, TRUE, mode, CLUTTER_BOX2D_DYNAMIC, NULL); } move = clutter_container_find_child_by_name (CLUTTER_GROUP (stage), hand); g_timeout_add (1000, moveactor, NULL); } On Fri, Aug 22, 2008 at 8:17 PM, Øyvind Kolås [EMAIL PROTECTED] wrote: On Fri, Aug 22, 2008 at 1:40 AM, Saul Lethbridge [EMAIL PROTECTED] wrote: Hi, Should I be able to control my actors with standard clutter commands when simulating them? I can' manipulate my actors with the mouse (which I want to prevent), but I can't move them using standard clutter functions. Can anybody shed any light? a. How do I move my actors around (and still simulate) You should be able to set the position and rotation of the actors using clutter_actor_set_position, clutter_actor_set_rotation like normal. ClutterBox2D doesn't mirror the complete set of transformations possible using the ClutterActor properties, for now only position and rotation is honored. b. How do I prevent users from manually grabbing actors and moving them around. This only happens when the ClutterBox2d-container child property manipulatable is set. /Øyvind K. -- «The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/
[clutter] clutter_actor_move_by and clutterbox2d
Hi, Should I be able to control my actors with standard clutter commands when simulating them? I can' manipulate my actors with the mouse (which I want to prevent), but I can't move them using standard clutter functions. Can anybody shed any light? a. How do I move my actors around (and still simulate) b. How do I prevent users from manually grabbing actors and moving them around. Thanks
[clutter] Stage size
Hi, What relevance does the size of the stage have to actors contained in it? I can create a stage with a width of 640 pixels yet can place actors at 800 - why is this?
[clutter] Zoom of sorts
Hi all, I'm wanting the user to be able to zoom in and out of my stage (using the scroll button on the mouse), what would be the best and most efficient way of doing this?
Re: [clutter] Clutter-box2d
Great work. Will the HTML documentation be updated? On Wed, Aug 6, 2008 at 9:55 AM, Øyvind Kolås [EMAIL PROTECTED] wrote: On Wed, Aug 6, 2008 at 12:37 AM, Saul Lethbridge [EMAIL PROTECTED] wrote: This is really good. Is there any reason this is not released as an official package along with cairo, gtk, etc? A proper release announcement has not been made yet, but an initial tarball is available from the same location as other Clutter integration libraries at http://www.clutter-project.org/sources/ For some more examples of what can be done using clutter-box2d you could also have a look at: http://moblin.org/playground/?q=node/76 /Øyvind K. -- «The future is already here. It's just not very evenly distributed» -- William Gibson http://pippin.gimp.org/ http://ffii.org/
[clutter] Clutter-box2d
This is really good. Is there any reason this is not released as an official package along with cairo, gtk, etc?
[clutter] Templates and Effects
Hi, I've setup a template and have applied it along with effects to an actor. However, in some situations I need to be able to stop it (template/timeline) mid execution on a particular actor. How do I accomplish this?
[clutter] Create array of ClutterActor
Hi, My application will be using an unknown number of clutter actors at build time. I'm wanting to create a struct of arrays that I can later realloc when required. struct cNode { int numNodes; ClutterActor *clutterArray[1]; cairo_t*cr[1]; }; Is this the correct way to go about this? Is there a better way?
[clutter] Building clutter-gtk errors
I'm getting the following error when trying to build (make) clutter-gtk (ubuntu 8.04) gtk-clutter-embed.c:48:34: error: clutter/clutter-main.h: No such file or directory I have successfully built and installed clutter 0.8.