Re: Need to get the tree view from the model
- From: rpoe <randall c poe lmco com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Need to get the tree view from the model
- Date: Wed, 17 Sep 2008 10:09:03 -0400
The answer to your second question: A dummy typedef means you
can't find the structure for it. :-) The *.h file is merely saying
that the typedef is a shorthand for a given structure. The actual
structure is private, not intended to be seen by users of the *.h
file.
The intent is to force you to go through accessor functions. Those
functions will reside in a source code that contains the actual
definition of the structure. The idea is to prevent users from
directly accessing fields in that structure. Accessor functions
allow the author to force any safety measures or bookkeeping that
may be required. Also, the user needn't worry about the names
of fields in the structure and the author is free to add, delete,
or rename them without affecting the interface.
As for your first question, the reason you can't get "the"
tree view from the model is that models can be attached to
arbitrarily many views, which will all update when the model
is changed.
You will have to provide the linkage yourself. The easiest way
is probably to provide the model as an additional parameter
in your callbacks (notice that most have an argument for
"user data".
Randy
dhk wrote:
What is the most direct way to get the tree view from the tree model? I
don't see a function for doing this.
Also, when I went to the source, GtkTreeModel is defined a follows:
typedef struct _GtkTreeModel GtkTreeModel; /* Dummy typedef */
Why is it called a "Dummy typedef" and why can't I find the structure
for it?
Thanks,
Dave
--
Randall Poe (randall c poe lmco com)
Senior Member Engineering Staff
Lockheed Martin Advanced Technology Laboratory
Sixth Floor, 3 Executive Campus
Cherry Hill, NJ 08002
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]