Re: GInterface on a per-instance-basis



Ronald Bultje wrote:

In these other cases,
the interface cast should return NULL (or something similar that tells
me that it doesn't implement this interface).

When you write your interface, part of the boiler plate is to
define a macro: prefix_IS_interface-name
where prefix is the namespace of your project and interface-name
is the name of the interface.
ie.  GTK_IS_TREE_SORTABLE ()

You can use this macro to determine if an object supports the
your interface.

Note this is not the appropriate list for his type of question.
gtk-list or gtk-app-devel-list would probably be better.

--Ray Strode




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