g_object_new shared memory
Hi, I'm using GLib in my application, and I'm using g_object_new to allocate memory of an object. As in C++ specification, there is new placement technique that can allow us to place a new object into our predefined memory region. And we can also do with malloc by redefine the malloc fuction. I wonder if we can do it with g_object_new or not? The purpose is to have g_object_new to allocate memory on my own memory region. Thanks, -Hieu ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: g_object_new shared memory
On Mon, Oct 26, 2009 at 05:09:42PM +0700, Hieu Le Trung wrote: I'm using GLib in my application, and I'm using g_object_new to allocate memory of an object. As in C++ specification, there is new placement technique that can allow us to place a new object into our predefined memory region. And we can also do with malloc by redefine the malloc fuction. I wonder if we can do it with g_object_new or not? The purpose is to have g_object_new to allocate memory on my own memory region. I don't think it's possible because g_type_create_instance() has the allocation function hardcoded (g_slice_alloc0() at this moment). Yeti ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: g_object_new shared memory
On Monday, October 26, 2009 5:22 PM, David Nečas wrote: On Mon, Oct 26, 2009 at 05:09:42PM +0700, Hieu Le Trung wrote: I wonder if we can do it with g_object_new or not? The purpose is to have g_object_new to allocate memory on my own memory region. I don't think it's possible because g_type_create_instance() has the allocation function hardcoded (g_slice_alloc0() at this moment). Can I change the g_slide_alloc0 to use my own alloc function so that it can be allocated in a shared region? Or can I override the constructor of my class so that the private data is allocated in a shared region, then in other application, I'll reconstruct the object using g_object_new and then set the private data pointer manually? Regards, -Hieu ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Intricate changes to Quartz/OSX backend
Hi, Over the weekend I have reworked how the Quartz backend does its coordinate transformation. You can imagine this is at the very core of the backend and thus a very intricate change set. I have just pushed these changes to git master. This is a call out to all GTK+ users on Quartz to please report any issues they find so we can iron out any regressions quickly. These changes were needed to properly implement multi monitor support in the Quartz backend. The code implementing this support has also been pushed to git master. This includes support for emitting the ::size-changed and ::monitors-changed GdkScreen signals when appropriate. I have tested this with a myriad of dual monitor setups on my Tiger laptop, I will give it some testing on my Snow Leopard machine later this week. Again, testing is appreciated and if you find issues, please let me know. thanks, -kris. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Mocks and coverage with gtk/glib test frameworks?
Forgive me if I'm on the wrong list with these questions, but gtk-devel seems to be the place where most gtk/glib test discussion has occurred. If there's a more appropriate place to bring this up, please let me know. I am using the gtk/glib test frameworks to do test driven development in C. Two things that I'm wondering: 1. Is there a way to build mocks to use with the gtk or glib test frameworks? I can code a mock_whatever.c file that implements the interface defined by whatever.h and link the resulting whatever.o in my test fixture... and maybe that's the easiest/best way? But I am curious if there is already a way to do mocking that I should be aware of. 2. Is there any way to measure code coverage? I'm sure the debugger must instrument the code somehow. And I'm sure I could measure coverage with macros or a preprocessor that finds all the checkpoints to measure and puts calls to a few functions that record coverage data. But I wonder if there is already a way to do this with existing tools or methods? Thanks! -- Michael C. Libby www.mikelibby.com ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Mocks and coverage with gtk/glib test frameworks?
On Mon, 26 Oct 2009 at 06:58:35 -0500, Michael Libby wrote: 2. Is there any way to measure code coverage? In Telepathy we use the standard gcov framework that comes with gcc, together with lcov (apt-get install lcov) to produce a nice HTML report. For instance, have a look at /m4/compiler.m4 and /tools/lcov.am in telepathy-glib (which are glued in to the build via /configure.ac and /Makefile.am respectively). Regards, Simon signature.asc Description: Digital signature ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 2:07 AM, Kristian Rietveld wrote: Hi, Over the weekend I have reworked how the Quartz backend does its coordinate transformation. You can imagine this is at the very core of the backend and thus a very intricate change set. I have just pushed these changes to git master. This is a call out to all GTK+ users on Quartz to please report any issues they find so we can iron out any regressions quickly. These changes were needed to properly implement multi monitor support in the Quartz backend. The code implementing this support has also been pushed to git master. This includes support for emitting the ::size-changed and ::monitors-changed GdkScreen signals when appropriate. I have tested this with a myriad of dual monitor setups on my Tiger laptop, I will give it some testing on my Snow Leopard machine later this week. Again, testing is appreciated and if you find issues, please let me know. I'll pull build for SL this morning. What particular dual-monitor behavior should I look for? Regards, John Ralls ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Mon, Oct 26, 2009 at 10:03 AM, John Ralls jra...@ceridwen.us wrote: On Oct 26, 2009, at 2:07 AM, Kristian Rietveld wrote: Hi, Over the weekend I have reworked how the Quartz backend does its coordinate transformation. You can imagine this is at the very core of the backend and thus a very intricate change set. I have just pushed these changes to git master. This is a call out to all GTK+ users on Quartz to please report any issues they find so we can iron out any regressions quickly. These changes were needed to properly implement multi monitor support in the Quartz backend. The code implementing this support has also been pushed to git master. This includes support for emitting the ::size-changed and ::monitors-changed GdkScreen signals when appropriate. I have tested this with a myriad of dual monitor setups on my Tiger laptop, I will give it some testing on my Snow Leopard machine later this week. Again, testing is appreciated and if you find issues, please let me know. I'll pull build for SL this morning. What particular dual-monitor behavior should I look for? I'm starting a build with moduleset-unstable. I've run into a fairly problem at the meta-gtk-osx-bootstrap stage: *** Checking out docbook-setup *** [2/13] jhbuild build: failed to unpack /Users/paul/gtk/source/pkgs/DB_1 there is nothing wrong with the downloaded tarball - i can unpack it manually into ~/gtk/source without any issues. but jhbuild refuses to believe it can do this. anybody got any clues? or hints on how to get more info? ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 7:44 AM, Paul Davis wrote: I'm starting a build with moduleset-unstable. I've run into a fairly problem at the meta-gtk-osx-bootstrap stage: *** Checking out docbook-setup *** [2/13] jhbuild build: failed to unpack /Users/paul/gtk/source/pkgs/DB_1 there is nothing wrong with the downloaded tarball - i can unpack it manually into ~/gtk/source without any issues. but jhbuild refuses to believe it can do this. anybody got any clues? or hints on how to get more info? When I've encountered that in the past it's been because Python was too old: Jhbuild's tarball.py uses a function that's only available in Python 2.5. While jhbuild bootstrap will install a new Python for you on Tiger (which comes with Python 2.3), the new version isn't used to run jhbuild itself unless you tell it to. See http://sourceforge.net/apps/trac/gtk-osx/wiki/Build Please use the Gtk-OSX mailing list (http://sourceforge.net/mailarchive/forum.php?forum_name=gtk-osx-users ) or forum (http://sourceforge.net/apps/phpbb/gtk-osx/) for Gtk-OSX issues. Regards, John Ralls ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 7:44 AM, Paul Davis wrote: I'm starting a build with moduleset-unstable. I've run into a fairly problem at the meta-gtk-osx-bootstrap stage: *** Checking out docbook-setup *** [2/13] jhbuild build: failed to unpack /Users/paul/gtk/source/pkgs/DB_1 there is nothing wrong with the downloaded tarball - i can unpack it manually into ~/gtk/source without any issues. but jhbuild refuses to believe it can do this. anybody got any clues? or hints on how to get more info? Oh, and unstable won't build without intervention on Tiger, because the latest Pango uses CoreText instead of ATSUI; CoreText wasn't supported before Leopard. When it bombs, select item 4 to start a shell, and say git checkout 1.24.3 exit then select clean (which I think will be item 8) Regards, John Ralls ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 4:23 PM, John Ralls wrote: Oh, and unstable won't build without intervention on Tiger, because the latest Pango uses CoreText instead of ATSUI; CoreText wasn't supported before Leopard. They didn't really port the backend to CoreText. It is still using the ATSUI API and they changed two function calls. I have an easy patch that puts the old calls (which were removed) back and then it builds and works fine on Tiger. I will try to clean this patch up and push it soon (and also test it on Leopard, which I was not able to do before). The real challenge will be to write a proper, real, CoreText backend for Pango. I might tackle that in the future. regards, -kris. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 3:03 PM, John Ralls wrote: I'll pull build for SL this morning. What particular dual-monitor behavior should I look for? I have verified that it builds fine on SL. Things that might be broken are event delivery on the secondary monitor (or on the main monitor if the menubar is on the secondary), broken menus, broken window placement, etc. If you find no regressions, then awesome :) regards, -kris. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Pango CoreText/ATSUI (was:Intricate changes to Quartz/OSX backend)
On Oct 26, 2009, at 8:34 AM, Kristian Rietveld wrote: On Oct 26, 2009, at 4:23 PM, John Ralls wrote: Oh, and unstable won't build without intervention on Tiger, because the latest Pango uses CoreText instead of ATSUI; CoreText wasn't supported before Leopard. They didn't really port the backend to CoreText. It is still using the ATSUI API and they changed two function calls. I have an easy patch that puts the old calls (which were removed) back and then it builds and works fine on Tiger. I will try to clean this patch up and push it soon (and also test it on Leopard, which I was not able to do before). The real challenge will be to write a proper, real, CoreText backend for Pango. I might tackle that in the future. True, switch would have been a better term... ISTM that a configure option and a macro that selects either the ATSUI or CoreText function is the way to go, so that Pango will build both for Tiger and x86_64. Cairo needs the same treatment; right now they just skip the ATSUI functions when building in 64-bit. Regards, John Ralls ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 4:50 PM, John Ralls wrote: On Oct 26, 2009, at 8:36 AM, Kristian Rietveld wrote: On Oct 26, 2009, at 3:03 PM, John Ralls wrote: I'll pull build for SL this morning. What particular dual- monitor behavior should I look for? I have verified that it builds fine on SL. Things that might be broken are event delivery on the secondary monitor (or on the main monitor if the menubar is on the secondary), broken menus, broken window placement, etc. If you find no regressions, then awesome :) What do you mean by event delivery? That mouse-clicks in a window on the secondary monitor don't do anything? Yes for example. As well as missing motion and crossing events. regards, -kris. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Mon, Oct 26, 2009 at 11:07 AM, John Ralls jra...@ceridwen.us wrote: When I've encountered that in the past it's been because Python was too old: Jhbuild's tarball.py uses a function that's only available in Python 2.5. While jhbuild bootstrap will install a new Python for you on Tiger (which comes with Python 2.3), the new version isn't used to run jhbuild itself unless you tell it to. turns out that this was not the issue. basically, even my jhbuild was too old to get this right. a new build is underway, but its now died claiming that we need m4 1.4 or later, and i have 1.4.13 ... sigh. digging in. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Building Gtk-OSX (was: Intricate changes to Quartz/OSX backend)
On Mon, Oct 26, 2009 at 12:17 PM, John Ralls jra...@ceridwen.us wrote: On Oct 26, 2009, at 9:07 AM, Paul Davis wrote: On Mon, Oct 26, 2009 at 11:07 AM, John Ralls jra...@ceridwen.us wrote: When I've encountered that in the past it's been because Python was too old: Jhbuild's tarball.py uses a function that's only available in Python 2.5. While jhbuild bootstrap will install a new Python for you on Tiger (which comes with Python 2.3), the new version isn't used to run jhbuild itself unless you tell it to. turns out that this was not the issue. basically, even my jhbuild was too old to get this right. a new build is underway, but its now died claiming that we need m4 1.4 or later, and i have 1.4.13 ... sigh. digging in. Having installed the new jhbuild, did you run jhbuild bootstrap? Remember that jhbuild sets the path to find its own stuff first. the downloaded autoconf-2.63 contains this line: my $m4 = $ENV{M4} || '@M4@'; both LHS halves of which evaluate to $gtk_prefix/inst/bin/m4 even though jbhuild has not built m4 at this stage. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[REMINDER] GTK+ IRC Team meeting - 2009-10-27
hi everyone; this is a reminder for the GTK+ team IRC meeting: * date: 2009-10-27 * time: 20:00 UTC [0] * channel: #gtk-devel on irc.gnome.org * agenda: - fundamental types for gint16/guint16 (bug: 562498) [jjardon] - use target milestone field in bugzilla for creating release-based queries [jjardon] - features set for gtk-next - features set for glib-next - miscellaneous as always, everyone is invited to attend. ciao, Emmanuele. [0] http://www.timeanddate.com/worldclock/fixedtime.html?month=10day=27year=2009hour=20min=0sec=0p1=0 ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Building Gtk-OSX (was: Intricate changes to Quartz/OSX backend)
On Oct 26, 2009, at 9:35 AM, Paul Davis wrote: On Mon, Oct 26, 2009 at 12:17 PM, John Ralls jra...@ceridwen.us wrote: On Oct 26, 2009, at 9:07 AM, Paul Davis wrote: On Mon, Oct 26, 2009 at 11:07 AM, John Ralls jra...@ceridwen.us wrote: When I've encountered that in the past it's been because Python was too old: Jhbuild's tarball.py uses a function that's only available in Python 2.5. While jhbuild bootstrap will install a new Python for you on Tiger (which comes with Python 2.3), the new version isn't used to run jhbuild itself unless you tell it to. turns out that this was not the issue. basically, even my jhbuild was too old to get this right. a new build is underway, but its now died claiming that we need m4 1.4 or later, and i have 1.4.13 ... sigh. digging in. Having installed the new jhbuild, did you run jhbuild bootstrap? Remember that jhbuild sets the path to find its own stuff first. the downloaded autoconf-2.63 contains this line: my $m4 = $ENV{M4} || '@M4@'; both LHS halves of which evaluate to $gtk_prefix/inst/bin/m4 even though jbhuild has not built m4 at this stage. Um, how long ago did you last run jhbuild bootstrap? The m4 module was added to bootstrap.modules last December, with version 1.4.11. The autoconf module depends upon it, so it should be installed before autoconf. .jhbuildrc, if you're using the one from Gtk-OSX, sets M4= $PREFIX/bin/m4. That happens after jhbuildrc-custom is imported, so you'll have to edit .jhbuildrc directly if you want to use another one. Just don't try to use the one Apple provides (but you probably already know that). Regards, John Ralls ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Building Gtk-OSX (was: Intricate changes to Quartz/OSX backend)
On Mon, Oct 26, 2009 at 3:22 PM, John Ralls jra...@ceridwen.us wrote: Um, how long ago did you last run jhbuild bootstrap? The m4 module was added to bootstrap.modules last December, with version 1.4.11. more than bootstrap - fixing this required an entirely new version of jhbuild. there is also possibly some interaction going on because i have at least two GTK builds managed by jhbuild on this system. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: Intricate changes to Quartz/OSX backend
On Oct 26, 2009, at 9:00 AM, Kristian Rietveld wrote: On Oct 26, 2009, at 4:50 PM, John Ralls wrote: On Oct 26, 2009, at 8:36 AM, Kristian Rietveld wrote: On Oct 26, 2009, at 3:03 PM, John Ralls wrote: I'll pull build for SL this morning. What particular dual- monitor behavior should I look for? I have verified that it builds fine on SL. Things that might be broken are event delivery on the secondary monitor (or on the main monitor if the menubar is on the secondary), broken menus, broken window placement, etc. If you find no regressions, then awesome :) What do you mean by event delivery? That mouse-clicks in a window on the secondary monitor don't do anything? Yes for example. As well as missing motion and crossing events. OK. I ran through several of the tests in gtk-demo. I found a crasher, but it's not a regression. (Both of the Off-screen Window demos crash on launch, in the same place; backtrace is below. I haven't yet figured out what's going on with it.) So the only difference in behavior that I see is that the windows open on the secondary screen instead of the primary one. Dragging them around works either way. Regards, John Ralls (gdb) bt #0 0x9706691b in objc_msgSend () #1 0x048240c0 in ?? () #2 0x001ce6b1 in gdk_window_process_updates_internal (window=0x30319e8) at gdkwindow.c:5218 #3 0x001ce8cc in gdk_window_process_all_updates () at gdkwindow.c:5326 #4 0x001ce064 in gdk_window_update_idle (data=0x0) at gdkwindow.c:4952 #5 0x001a2c4e in gdk_threads_dispatch (data=0x482cc00) at gdk.c:506 #6 0x026b3dc0 in g_idle_dispatch (source=0x2b44830, callback=0x1a2bf9 gdk_threads_dispatch, user_data=0x482cc00) at gmain.c:4065 #7 0x026afe25 in g_main_dispatch (context=0x2b10600) at gmain.c:1960 #8 0x026b136d in g_main_context_dispatch (context=0x2b10600) at gmain.c:2513 #9 0x026b1877 in g_main_context_iterate (context=0x2b10600, block=1, dispatch=1, self=0x2b10930) at gmain.c:2591 #10 0x026b2069 in g_main_loop_run (loop=0x4033380) at gmain.c:2799 #11 0x0094e71b in gtk_main () at gtkmain.c:1218 #12 0x000279ed in main (argc=1, argv=0xb4b0) at main.c:1010 (gdb) f 2 #2 0x001ce6b1 in gdk_window_process_updates_internal (window=0x30319e8) at gdkwindow.c:5218 5218 _gdk_windowing_window_process_updates_recurse (window, expose_region); ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: GDBus API Questions; was: GDBus/GVariant plans for next GLib release
2009/10/25 Mikkel Kamstrup Erlandsen mikkel.kamst...@gmail.com: 2009/10/15 David Zeuthen da...@fubar.dk: Hey Mikkel, On Thu, 2009-10-15 at 08:24 +0200, Mikkel Kamstrup Erlandsen wrote: * Can I register a GDBusInterfaceVTable without registering an object? The use case I have in mind is something akin to dynamically spawning objects on the server side when messages are send to objects under a given path[1]. Fx. when messages are send to /org/example/item/* I create the item matching * dynamically. Ideally one would register the vtable for objects matching a regexp. This would facilitate RESTful message passing on the bus. Yeah, there's a TODO in gdbusconnection.h to say we need something like that - it would be similar dbus_connection_register_fallback() [1]. We probably want a separate GDBusHierarchyVTable with functions to a) list objects in the directory; and b) get introspection data for objects in the directory. I just looked over the newly introduced g_dbus_connection_register_subtree() and related data structures, and I think it will fit very nicely with what I am going to need. All in all it looks really sweet, good work. One thing though is that as I read it objects in a subtree must be known before method calls are accepted to them? For my use case in Zeitgeist I was hoping that I could completely get rid of a Manager type of interface, and just implicitly create objects in the tree whenever calls where made to them. This does not look possible as it stands? Maybe allowing '*' as a wildcard node name in the subtree enumeration function? I had a stab at this myself. The wildcard idea seemed like a bad one, so I instead added another gboolean param to g_dbus_connection_register_subtree(), @is_dynamic. If is_dynamic is TRUE then objects need not be in the enumerated list of objects in order to be introspected and dispatched. Pretty simple. No matter the simplicity I still managed to screw up one of the unit tests. I will fix it and add some specific tests for the dynamic case if you give the go for this David. -- Cheers, Mikkel PS: And thanks for nice readable and commented code David! diff --git a/gdbus/example-subtree.c b/gdbus/example-subtree.c index 041a8f4..f870589 100644 --- a/gdbus/example-subtree.c +++ b/gdbus/example-subtree.c @@ -332,6 +332,7 @@ on_name_acquired (GDBusConnection *connection, registration_id = g_dbus_connection_register_subtree (connection, /org/gtk/GDBus/TestSubtree/Devices, subtree_vtable, +FALSE, /* is_dynamic */ NULL, /* user_data */ NULL, /* user_data_free_func */ NULL); /* GError** */ diff --git a/gdbus/gdbusconnection.c b/gdbus/gdbusconnection.c index aa21213..d9099c0 100644 --- a/gdbus/gdbusconnection.c +++ b/gdbus/gdbusconnection.c @@ -3620,6 +3620,7 @@ struct ExportedSubtree gchar*object_path; GDBusConnection *connection; const GDBusSubtreeVTable *vtable; + gboolean is_dynamic; GMainContext *context; gpointer user_data; @@ -3685,6 +3686,8 @@ handle_subtree_introspect (DBusConnection *connection, //g_debug (in handle_subtree_introspect for %s, requested_object_path); + /* Strictly we don't need the children in dynamic mode, but we avoid the + * conditionals to preserve code clarity */ children = es-vtable-enumerate (es-connection, es-user_data, sender, @@ -3693,8 +3696,9 @@ handle_subtree_introspect (DBusConnection *connection, if (!is_root) { requested_node = strrchr (requested_object_path, '/') + 1; - /* skip if requested node is not part of children */ - if (!_g_strv_has_string ((const gchar * const *) children, requested_node)) + + /* Assert existence of object if we are not dynamic */ + if (!es-is_dynamic !_g_strv_has_string ((const gchar * const *) children, requested_node)) goto out; } else @@ -3825,8 +3829,9 @@ handle_subtree_method_invocation (DBusConnection *connection, if (!is_root) { requested_node = strrchr (requested_object_path, '/') + 1; - /* skip if requested node is not part of children */ - if (!_g_strv_has_string ((const gchar * const *) children, requested_node)) + + /* If not dynamic, skip if requested node is not part of children */ + if (!es-is_dynamic !_g_strv_has_string ((const gchar * const *) children, requested_node)) goto out; } else @@ -4048,6 +4053,9 @@ static const DBusObjectPathVTable dbus_1_subtree_vtable = * @connection: A #GDBusConnection. * @object_path: The
RE: Building Gtk-OSX (was: Intricate changes to Quartz/OSX backend)
Very Sweet guys Last I tried Snow Leopard I was not able to get past the bootstrap / build process (a couple of a months ago). I am going to spend the rest of the day re-building the environment, and our application to see if this is all works on OS X 10.6 Snow Kitty (SL). I don't have dual monitor but I will see if I can find one and test. EMAILING FOR THE GREATER GOOD Join me Date: Mon, 26 Oct 2009 15:46:54 -0400 Subject: Re: Building Gtk-OSX (was: Intricate changes to Quartz/OSX backend) From: p...@linuxaudiosystems.com To: jra...@ceridwen.us CC: gtk-devel-list@gnome.org On Mon, Oct 26, 2009 at 3:22 PM, John Ralls jra...@ceridwen.us wrote: Um, how long ago did you last run jhbuild bootstrap? The m4 module was added to bootstrap.modules last December, with version 1.4.11. more than bootstrap - fixing this required an entirely new version of jhbuild. there is also possibly some interaction going on because i have at least two GTK builds managed by jhbuild on this system. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: GDBus API Questions; was: GDBus/GVariant plans for next GLib release
Hey Mikkel, On Mon, 2009-10-26 at 23:52 +0100, Mikkel Kamstrup Erlandsen wrote: I just looked over the newly introduced g_dbus_connection_register_subtree() and related data structures, and I think it will fit very nicely with what I am going to need. All in all it looks really sweet, good work. One thing though is that as I read it objects in a subtree must be known before method calls are accepted to them? For my use case in Zeitgeist I was hoping that I could completely get rid of a Manager type of interface, and just implicitly create objects in the tree whenever calls where made to them. This does not look possible as it stands? Maybe allowing '*' as a wildcard node name in the subtree enumeration function? I'm actually a bit wary of introducing this kind of functionality - mainly, I guess, because it screws with the notion that a D-Bus service export a set of objects. In particular it makes it hard to debug/introspect the service - for example, in extreme abuses of such a feature (not the use-case you are suggesting though), you can't really use e.g. d-feet to get an idea of what kind of objects are exported and known by the service. The subtree functionality is really just for performance hacks - the intended use is to avoid creating a huge amount of objects. For example, one use case is export the subtree /org/foo/Project/processes/pid where pid is, say, a UNIX process id. With the subtree handler, no object creation over is necessary. Anyway, your original use case does seem sound and reasonable - it reduces overhead insofar that the client saves a round-trip to a hypothetical Manager.CreateObject() method that would be needed if we didn't have this. It does make it less intuitive insofar that remote object creation is this magical thing with automatically appearing nodes... but I guess that's fine. I had a stab at this myself. The wildcard idea seemed like a bad one, so I instead added another gboolean param to g_dbus_connection_register_subtree(), @is_dynamic. If is_dynamic is TRUE then objects need not be in the enumerated list of objects in order to be introspected and dispatched. Pretty simple. No matter the simplicity I still managed to screw up one of the unit tests. I will fix it and add some specific tests for the dynamic case if you give the go for this David. Sounds good to me. I'd prefer a GDBusSubtreeFlags flag enumeration with a G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES member instead of @is_dynamic. Just for future proofing and all. Maybe it would also be nice to pass a gboolean enumerated to @introspect and @dispatch that indicates whether the node was enumerated (or not). PS: And thanks for nice readable and commented code David! Hey, thanks for trying it out and providing feedback! Thanks, David ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
g_object_new shared memory
Hi, I've posted this through gtk-app-devel list but no good response. So that I'm doing cross post here. Here is my situation. I'm using GLib in my application, and I'm using g_object_new to allocate memory of an object. As in C++ specification, there is new placement technique that can allow us to place a new object into our predefined memory region. And we can also do with malloc by redefine the malloc fuction. I wonder if we can do it with g_object_new or not? The purpose is to have g_object_new to allocate memory on my own memory region. Thanks, -Hieu ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: error building git head GTK on OS X ... IM symbols missing etc.
On Oct 26, 2009, at 4:50 PM, Paul Davis wrote: just tried a jhbuild of gtk on OS X (tiger). things went well until it got to the link stage in the input methods code. i got a large number of messages of this form, one for each (every?) IM module: Cannot load module /Users/paul/gtk/source/gtk+/modules/input/im-am-et.la: dlopen(/Users/paul/gtk/source/gtk+/modules/input/.libs/im-am-et.so, 10): Symbol not found: _res_9_init Referenced from: /Users/paul/gtk/inst/lib/libgio-2.0.0.dylib Expected in: flat namespace does anybody have any clues what this might be? the missing symbol is always _res_9_init Found it, after a bit of searching. It's defined in /usr/include/ resolv.h, included from gio/gionetworkingprivate.h It doesn't show up in my SL build from today. I can't see from configure why it would pick it up for your build but not for mine. Search for lresolv in configure and config.log; maybe you can see why it's getting picked up on yours. Regards, John Ralls ___ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list