Re: [gtk-list] Re: Signals and malloced memory
- From: Derek Simkowiak <dereks kd-dev com>
- To: Havoc Pennington <hp redhat com>
- cc: gtk-list redhat com, recipient list not shown: ;
- Subject: Re: [gtk-list] Re: Signals and malloced memory
- Date: Thu, 6 Apr 2000 15:33:56 -0700 (PDT)
> (If you could return malloced memory, what happens if there are two
> signal handlers?)
Is it bad to have *any* return value? I noticed that the vast
majority of signals use a gtk_marshal_NONE__[...].
In particular, I'd like to know what to do with an "insert_text"
signal. GtkEditable uses an in/out pointer for "position":
void gtk_editable_insert_text (GtkEditable *editable,
const gchar *new_text,
gint new_text_length,
gint *position);
...I thought it made much more sense to simply have:
gint my_insert_text (GtkEditable *editable,
const gchar *new_text,
gint new_text_length,
gint position);
...and return the actual position of the inserted text, instead of
altering *position. But was there a special reason the creators of
GtkEditable wanted to have a return type void (as is the case with most
of the signals in Gtk+)?
Thanks,
Derek Simkowiak
dereks@kd-dev.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]