Re: Second draft (was Re: defs files)
- From: Tim Janik <timj gtk org>
- To: Havoc Pennington <rhp zirx pair com>
- cc: Gtk+ Developers <gtk-devel-list redhat com>, kenelson sequoia ece ucdavis edu
- Subject: Re: Second draft (was Re: defs files)
- Date: Thu, 20 Jan 2000 08:51:02 +0100 (CET)
On 19 Jan 2000, Havoc Pennington wrote:
> - argument becomes "object-argument" or "parameter"
i'd rather not see "parameter" taken, since that may become the name of a
new mechanism in 1.4.
On 19 Jan 2000, Havoc Pennington wrote:
> Karl Nelson <kenelson@ece.ucdavis.edu> writes:
> > Shouldn't the signal have the c-name of emitting function if
> > the signal is publically callable. Having a signal
> > and the emit definitions separate means the relationship
> > is weak. Since we prefer calls to be made to the emitting
> > function rather then directly with gtk_signal_emit, because
> > extra checking is done in the emit function.
> >
> > Defining them separately seems bad.
>
> Indeed, this is another thing I can't autogenerate though.
>
> Can I propose a /*< emits signalname >*/ magic comment to go on the
> line preceding any function that emits a signal? this could go in the
> 1.2.x branch in CVS (even if a 1.2.7 is never released we can use the
> CVS code for defs-generation).
>
> I think the magic comments are the thing to add whenever we can't
> autogenerate stuff.
for one, i don't particularly understand why you need to know what signals
get emitted by a certain function (there might be a bunch involved like with
gtk_widget_show).
apart from that, there's a convention on how pure emission functions
are named, e.g. for GtkCList::selection-changed, you'd do:
GtkCList -> gtk_clist (like makeenums.pl does it)
selection-changed -> selection_changed
and then you simply concatenate gtk_clist _ selection_changed, and figure
whether that function is exported.
another thing i noted:
> (object-argument arg-name
> (of-object object-we-are-an-argument-of optional-objects-module)
> (type argument-type) ;; not sure what to put for type
> ;; flags all default to #f
> (readable bool-value)
> (writeable bool-value)
> (run-action bool-value)
> (construct-only bool-value))
what is "run-action" meant to indicate?
>
> s/gint/gboolean/ changes also need to go in to make autogeneration
> easier.
>
> Example of the magic emits comment:
> /*< emits clicked >*/
> void gtk_button_clicked(GtkButton* button);
>
> OK that was probably clear without an example. :-)
>
> Havoc
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]