From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Question about GC in C code. Date: Mon, 11 Nov 2002 15:25:48 +0100 (MET) Sender: emacs-devel-admin@gnu.org Message-ID: <200211111422.gABEM2MU013344@stubby.bodenonline.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1037201542 23696 80.91.224.249 (13 Nov 2002 15:32:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2002 15:32:22 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18BzCj-00048V-00 for ; Wed, 13 Nov 2002 16:13:21 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18BzOg-00066k-01 for ; Wed, 13 Nov 2002 16:25:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18BFko-0002FL-00; Mon, 11 Nov 2002 09:41:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18BFXT-0000OB-00 for emacs-devel@gnu.org; Mon, 11 Nov 2002 09:27:43 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18BFXQ-0000Nv-00 for emacs-devel@gnu.org; Mon, 11 Nov 2002 09:27:42 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18BFW3-0008EY-00; Mon, 11 Nov 2002 09:26:15 -0500 Original-Received: from pc35.bodenonline.com (IDENT:root@[193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id gABEM2MU013344; Mon, 11 Nov 2002 15:22:03 +0100 Original-To: rms@gnu.org In-Reply-To: from "Richard Stallman" at nov 11, 2002 05:20:05 X-Mailer: ELM [version 2.5 PL0pre8] Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9377 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9377 > > 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.