Re: Mixing GTK+ signal with GTKmm
- From: Jonathon Jongsma <jonathon quotidian org>
- To: GTKmm List <gtkmm-list gnome org>
- Subject: Re: Mixing GTK+ signal with GTKmm
- Date: Tue, 17 Nov 2009 13:57:44 -0600
On Tue, 2009-11-17 at 17:36 -0200, Paulo Flabiano Smorigo wrote:
> Hi everybody,
>
> I have a GTKmm application and since last week it's using a c library.
> I want to create a custom signal in this c library so when an event
> occurs in this library, my application knows.
Is the C library a Gtk+/gobject-based library? Glib signals can only be
used with GObjects.
> How do I implement a signal in this library and link it to a callback
> in my gtkmm application?
A signal is registered for a GObject using g_signal_new():
http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-new
I recommend reading some existing C Gtk+/Glib projects to see exactly
how this is done. Google's code search is often helpful to find
examples of how a certain function is used in other projects:
http://www.google.com/codesearch?hl=en&lr=&q=g_signal_new&sbtn=Search
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]