unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: Question about GC in C code.
Date: Mon, 11 Nov 2002 15:25:48 +0100 (MET)	[thread overview]
Message-ID: <200211111422.gABEM2MU013344@stubby.bodenonline.com> (raw)
In-Reply-To: <E18BBfp-0002Go-00@fencepost.gnu.org> from "Richard Stallman" at nov 11, 2002 05:20:05

> 
>     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	other threads:[~2002-11-11 14:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09 20:36 Question about GC in C code Jan D.
2002-11-11 10:20 ` Richard Stallman
2002-11-11 14:25   ` Jan D. [this message]
2002-11-12 12:49   ` Jan D.
2002-11-12 19:44     ` Stefan Monnier
2002-11-14  4:10     ` Richard Stallman
2002-11-14  6:18       ` Jan D.
2002-11-16  1:34         ` Richard Stallman
2002-11-16 12:37           ` Jan D.
2002-11-17  5:14             ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200211111422.gABEM2MU013344@stubby.bodenonline.com \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).