[Top][All Lists]

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

Re: Question about GC in C code.

From: Jan D.
Subject: Re: Question about GC in C code.
Date: Mon, 11 Nov 2002 15:25:48 +0100 (MET)

>     But I confess that I have no clue as how GC works in the C code.
>     Will this approach work?  Will menu_bar_vector be safe from GC?
> You have to modify the GC code in alloc.c to explicitly find these
> C data structures in the menus and mark them the vectors by calling
> mark_object.
>     And when a struct menu_gtk_data is free:d, will menu_bar_vector
>     then be a candidate for GC?
> No, because the code you add to GC will not find it and mark it.

Okay, thanks for the pointer.

> Is a detached menu a Lisp object?  If so, what data type is it?

It is more like a dialog popup window, or a file selection window.  It is
created by Gtk when you select a special menu item that looks like a dotted
line.  Gtk does all this detaching internally.

> Do we want a way to manipulate detached menus from Lisp?

I think not.  The idea is that it is to work exactly as a regular menu.
You get all the items in the File menu (for example) layed out in a separate
X window, so you can click on items in that window directly rather
that having to click on the menubar and then drag to the appropiate
menu item.  Its purpose is easier access to menu items.

The application using Gtk menus should not need to know if the selection
was made on a regular menu or a detached menu.

        Jan D.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]