- From: muppet <scott asofyet org>
- To: gtk-devel-list gnome org
- Subject: binding gtk_tree_view_[sg]et_row_separator_func
- Date: Wed, 20 Oct 2004 23:05:08 -0400
gtk_tree_view_get_row_separator_func() allows you to fetch the current
separator function pointer. i'm presuming the use case for this would
be something like
old = get current func
set new func
do some stuff
restore old func
in a language bindings setting (gtk2-perl, in this case), the language
binding will always use the same C function, and will pass the actual
language-specific callback function context through the user-data.
quite properly, gtk_tree_view_set_row_separator_func() allows you to
specify a GDestroyNotify callback to clean this up. however, the
ability to fetch the current callback makes this somewhat problematic.
when you get the function pointer back, you don't get the user data. i
can compare the function pointer with my binding-level marshaler to see
that this is my function, but i will have to store the callback context
someplace else to get the actual perl function to return to the caller.
if the function is *not* a perl function, i'm stuck, because there is
no generic scheme for handling C functions pointers in a non-C
language. i can come up with some binding magic to determine the
difference between a C pointer as a integer value and a perl code
reference, but this is unsafe and i don't like doing it.
so, the question for gtk-devel is, is this something you expect to be
available to a language binding? is it going to be a common thing to
want to restore the old separator func, or can i just not bind the
If I lived in Teletubby Land, the homicide rate would be four.
] [Thread Prev