Re: Gtk{Tree,List} replacement proposal



On 4 Jul 2000, Jonathan Blandford wrote:

> Tim Janik <timj@gtk.org> writes:

> > > ---------
> > > gtktlmodel.h
> > > ---------
> > 
> > > typedef gpointer                GtkTLNode;
> > 
> > what is this? i suppose you use a real GtkTLNode structure internally?
> > then use:
> > typedef struct _GtkTLNode GtkTLNode; and use GtkTLNode *node throughout
> > the API.
> 
> Because it isn't necessarily a struct.  It's up to the model to
> determine what it's internal data pointer is.  For example, a simple
> model could just pass around an offset into an array.

i see, though i have to say that all these
func (GtkZView    *zview,
      GtkZViewNode node);
arguments look a bit strange (like the programmer forgot to add that
asterisk). if a model uses an offset, it'll have to cast ala
GPOINTER_TO_UINT (node) anyways, right? so we could still use

typedef struct _GtkZNode GtkZNode;
func (GtkZView     *zview,
      GtkZViewNode *node);

without changing things significantly in the non-struct model implementations.

> 
> Thanks,
> -Jonathan
> 

---
ciaoTJ





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