From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.devel Subject: Menu bar items structure Date: Wed, 16 Nov 2022 18:30:58 +0100 Message-ID: <87pmdmkdrh.fsf@elite.giraud> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38853"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 16 18:31:25 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovMFt-0009oX-Hh for ged-emacs-devel@m.gmane-mx.org; Wed, 16 Nov 2022 18:31:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovMFl-0000cQ-Dx; Wed, 16 Nov 2022 12:31:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovMFi-0000by-KC for emacs-devel@gnu.org; Wed, 16 Nov 2022 12:31:11 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovMFa-0006bU-Jq for emacs-devel@gnu.org; Wed, 16 Nov 2022 12:31:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=kXGgM36gWREt8Gm9 Mx9HEc4TTwn3oIgEYI/NUm/DH6c=; h=date:subject:to:from; d=ledu-giraud.fr; b=DoCp3nS+RzBppjPxiS238PKttozC1Qh9MQX1b1gDTMh7e9U8AS Ju1eZFCyV0Vu76LpBXCikk3vS4RVDmznbD+CVWV0qf4tiZXVQzJK3u7mxGR3jSrITZGEWR 3vfkaFpkn+YyWdR0ia1oAvi251yi1vMk9n6iv1Gp2QFevQ6E1SillG0VF+hTLK/b+PZXGP QD6ABjbPycuxIuqAXvmoQULm1BSU8jZJ4BkviYVYg1YvVU5/2pJ/LXDIaXTOKze6N7Id35 bVocaWnMGnzdH4foIiRPrIaf8pggBO36rvydVmHL/TgGyYal62G8ibIj+jJR4oSUUsySds j3tRpKUawvcQ== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id d6ac3c1c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 16 Nov 2022 18:30:59 +0100 (CET) Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299960 Archived-At: Hi, I'm still trying to improve the X11 no toolkit menus and for this I end up having to add an entry for each menu bar items. It currently has 4: a key, a name, an item_property_def(?) and a starting char position. AFAIU, those items are stored as a flat array. So there are many usage of this magical "4" number in keyboard.c and *term.c to walk this array. So I guess my question is: could (should?) it not be done with a proper struct? Maybe it is historical or maybe I'm missing something? Best regards, -- Manuel Giraud