From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.help Subject: Re: Would there be a drawback of using the same graphical toolkit on every platform? Date: Mon, 21 Feb 2022 09:10:29 +0800 Message-ID: <87r17xhvne.fsf@yahoo.com> References: <87bkz3pltw.fsf@yahoo.com> <87pmnil4w0.fsf@yahoo.com> <83sfsdwsc7.fsf@gnu.org> <83a6elwgv7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4848"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Eli Zaretskii , help-gnu-emacs@gnu.org To: Arthur Miller Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 21 02:11:27 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1nLxEc-000143-A2 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 02:11:26 +0100 Original-Received: from localhost ([::1]:49180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLxEZ-0008HE-0L for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Feb 2022 20:11:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLxDw-0008H6-EG for help-gnu-emacs@gnu.org; Sun, 20 Feb 2022 20:10:44 -0500 Original-Received: from sonic316-21.consmr.mail.ne1.yahoo.com ([66.163.187.147]:38785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLxDt-0006rY-PO for help-gnu-emacs@gnu.org; Sun, 20 Feb 2022 20:10:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1645405840; bh=30r5w7uIdcdpJXtI8dyByXdBQNXBhOfZnKPqWaAEK48=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=qexXL3GSUEFkdg7FVPO22iHr1TF8oSM9dgEu7m0kXaxkaJIjQKBI7LXIUv/zJSgjSCcFQbpfhdkrcOhW5kZ/EXEP9GcMVYzjlctS77cLUEfDr21zn7VQoZD8EMgocjc8Y2vNy5AuyihKEYEx/6TOWCfCJrdplP8Q0wOU7av37jgKukw4cY6YcmWMqowoynJ7whvXJiYyPSxyagQpdV1Olbmz3qAsBOEoERDUb5vWgMHT6hZewXio6Ls65Vf2kIHcFbyaXog3liOcrJyLU/qWW3DBfpqnGXKz/kMzQCG+WqPgyOFbD7kK+WxJPdu+J7MmY6hxg9Rbhq3E6nhoXVSNhw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1645405840; bh=tpYviMG1FgrbJuHahKx2MtsqfGwXvKGN2L1F4K7xL3+=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=W4ypSkh9ePLAQLg8u9jxITVrw95kIRwAR6xZyE6AtbN822pgc1XWWRaZhPy9QqIUTHeJ860Bduon1Ilgj1EUgIs1EiX+zEgN7JRrZCgQcZmsapkszgybD5BDUmn/TjaFjN4SHuxV2rKvgXFL45al5ND/quP6g4Rt0Hcjuo0QWqnJFbDgTSXaXkFAxi/dsgNecSERBiKVyseIcFZ6SpZw7VGJmGquV2LTmarauRdAsj0W0P9n1HfgfvCt7UADrws+vCXs6z+BVyiP1UWEMgtfJJUvCK6TlXah1I3KfbNUP3/d8pRwzBpZB52sLbHI5IER162T8Kx31XmyKQZ4s7EFlQ== X-YMail-OSG: xZhzaFoVM1nvD8EP9o7FOaqy2CDmysUNOqu0PGVPqR_cD9GWv4mqtFnuwxMc5WF 5MyU2.ZWHH2VCehTwMr6STD_YW1XhHnuALln1IpubfHQEBAG.KAKuQz4qHBhYqurKmiHRnPCd6Yj uf4lmQJ7NQhNMT1U4f94PTbtpfq1HzFM8zLdtE3wJwzLyMeLd6a5nGxcWMY4VQcyoH8WUGcmeOhQ HmvH2NiKEr22F8j1jF3WS55U6ta2jLVOvdMTxAYudPle_vEqJEPf9qOFafm9vatIMhkB3a4tyx7z hMTrQLloo34IourRbDfGcSGvgGCTJXkraik56GeN2BM4zSbgZ.v.Gg4qID5gFWnhuZjtI7e8TWwc LEQAKUYaUizGI82qX.WdKPzsFPpqNnu6nXoQ41KolnuzQwrOsuP6Vf0xwc8l9QYP6LyNgMg28qVK tEKT9nJVf7s81TUk0Vbf6tD9mVc_gNFDycZvSQdUEdKjlSxLZpGG5HwJ7CKxv9WqJPFNUJCGr5oD zMyddFlsUcpx8f8Q31FSJORyi._MmA5IkfsSPjP5aLdoI4c2kXwNPEhIe1pZSI9H8zKRVSzlWnaM uNX_yqtpsbReQTpLItaVQWy27Nyzzy9ca0FQj3NzwvOiLggStBQmkogM97WCJ4dSc0x9G.U8UidN kYf8bCCJeQIfyM4HWlMVcOYPxQ0eflc.S3QTBQy0RfOumZdZaEV7X7NwzvIwQxjm1OCf31fXKJPP GDEODm3UC38hPc.EwzAY6sGgrm3WdGdoBoXavAauPz33Qki6yFJ65BvsSmi0S0DDB96D9weXf9D2 bPlWpLr60wIUcq4MppJ9_AJel.TejbW7BwmnYK9LJA X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Mon, 21 Feb 2022 01:10:40 +0000 Original-Received: by kubenode513.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID cf939040442515c607969e3dad56652c; Mon, 21 Feb 2022 01:10:34 +0000 (UTC) In-Reply-To: (Arthur Miller's message of "Sun, 20 Feb 2022 20:34:01 +0100") X-Mailer: WebService/1.1.19797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.147; envelope-from=luangruo@yahoo.com; helo=sonic316-21.consmr.mail.ne1.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136094 Archived-At: Arthur Miller writes: >> You can of course build dynamic menus out of the GMenu and >> GMenuModel API. The things become slightly more complex if you have >> extension points, like plugins, that add and remove menus and menu >> items depending on whether they have been enabled or disabled at run >> time. We lack a decent API for that. That isn't an option. You cannot attach arbitrary data to such menus, only a GVariant that can be serialized to disk (or stored in HTML). The programmatic GMenu and GMenuModel API also leaves much else to be desired. It is slow, involves recreating the menu bar widget every time something changes, and makes it impossible to create menu elements such as checkboxes which are possible in the XML-based API. `hidden-when' isn't an option, since there is no way to record all the information required for Emacs's very deeply nested menus. After struggling with both interfaces in my GTK 4 port, I decided to create two separate widgets, LwPopupMenu and LwMenuBar, which build their menu contents dynamically based on the contents of a `widget_value'. It cannot look and behave exactly like the native GTK 4 menus, is a lot of code to maintain (and it was already broken once by the changes to layout processing in GTK 4.4), but it's the best that can be done in GTK 4. Meanwhile, the GtkMenu interface that we have used all the way back to GTK+ 2.x works fine, but was deleted by the GTK developers for GTK 4. >> AFAIR, @hergertme had some wrapper API for GNOME Builder; I think we >> could expand the API in GIO to have a better story for extensible >> menus. I won't be convinced until I see such an expansion.