Re: Signal help needed (gtk_signal_new?)



"David J. Topper" wrote:
> But even if I capture the relevant info for "changed" I can't use it to
> create a new signal.  The arguments for gtk_signal_new() are elusive to
> me.  I'd basically like to create something very similar to the
> "value_changed" and "changed" signals, named "activate."  It would be
> the equivalent of a pulse that gets sent whenever the value changes from
> 0-1 or 1-0.

Hi David, take a look at the source for gtkadjustment, you can copy out
the bits you need.

You need to:

- make a new class, inheriting from GtkData
- have a member for your signal
- haev a static array of signal ids in your implementation
- build the signal in _class_init with gtk_signal_new()
- attach the signal to your class with gtk_object_class_add_signals()
- provide a function which emits your signal from an instance

John




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]