This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Completed GdkWindow; enhanced design


Kevin Ryde <user42@zip.com.au>:

> Marko Rauhamaa <marko@pacujo.net> writes:
> >
> >    The GdkWindow user_data is either NULL (initially) or an SCM
> >    list. The first element of the list is the SCM user data (or #f).
> >    The remainder of the list consists of filter procedures.
> >
> > You will see that gdk_window_mark will simply return its user_data
> > to protect it against GC.
> 
> Are you aware that gtk stores a widget (pointer) in the GdkWindow
> puser_data? So for instance you can't assume a window obtained from
> gtk_widget_window will have an SCM in the user_data field.

I wasn't aware of that. The GDK 1.2 specification doesn't make its usual
comment about GTK reserving the user_data facility for itself.

Now what are the consequences? First, it probably doesn't make sense to
even provide the user access to user_data. But the other casualty would
be the filter procedures that can be registered for the window. Let me
make a wild guess and assume that GTK reserves the filtering mechanism
for itself as well?

If we dropped user_data and filtering support from GDK, the whole
marking/user_data mechanism becomes unneeded.

> (Presumably this issue must have shown up when you tested your
> changes, so I wonder if I've badly missed something.)

As I stated before, I'm first writing the code and just making sure it
compiles. Once I'm done writing the code, I'll start testing it.


Marko

-- 
Marko Rauhamaa      mailto:marko@pacujo.net     http://pacujo.net/marko/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]