From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller 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 17:50:37 +0100 Message-ID: References: <87bkz3pltw.fsf@yahoo.com> <87pmnil4w0.fsf@yahoo.com> <83sfsdwsc7.fsf@gnu.org> <83a6elwgv7.fsf@gnu.org> <87r17xhvne.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40302"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Po Lu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 21 17:52: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 1nMBvG-000AHW-5p for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 17:52:27 +0100 Original-Received: from localhost ([::1]:43090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMBvE-0007bz-Ma for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 11:52:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMBtf-0007aC-8U for help-gnu-emacs@gnu.org; Mon, 21 Feb 2022 11:50:49 -0500 Original-Received: from mail-oln040092074029.outbound.protection.outlook.com ([40.92.74.29]:53365 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMBta-0002ZW-AR; Mon, 21 Feb 2022 11:50:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AqhfUqMTtT1IpR8nvG1UsMCft05+3uPOPTFhdDExWknVhPPgmQZWlEq6cb+OR1vBF14yzjxpBn3yLA5Ww75Q9Cux9kvdN6J9KEvbQLNC3fDuCMR9+oKaseEZPKf3WYvSFs/feJwpquamBxGpWZ7gIvCKZzqf7jeartKx3mFK/BfGkdiVNNwZGKDSeawQ22+H3aHnT7LcWBkYjCXwnOUKxo2CVWwrWI5iPWN/iw4k3Rik2Ulyse40lyui71zxktTOS9n4oGFjOHHUJ6g1TAC28mRtJRYb8GUJhlIS9QwIqdysYpookLjYE57TWzBtP/lqqeiGtlA4juyCN16yU1ntuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QD9uZflX99B/gTFN+WdtX6kIoX3KBSCCGTyhqVVxNpc=; b=fQUzmvjHHs/M5iT9gEKaovKIH0l9K6GIDAkOoRHPnHG7msHhUDIffCM5uq5zRrkk1RPq2JUBsm3MWlGn8iHYArdUnJSAZ6CMuS3sqcELQWWNdYSHHJK0BpRTWbx38pP4FExqemiujwXYsp+fUhpEplXMxx6nLJ3Yoh0+Fonc7//1KvNHJLLDm4JpzWNZ3BFAdkTuQI9GSlEo1tHwDIQxtkRovBittIG6MQIIsCVDQWQ4n5UWACDC0HHfZNU9Bwekxp6TCHNKV692fm4ssguRCjOSElM6P7LM/iydUuvIpgqbroVXspw6ZifjJG88yT4Z8cn3eGYFlylY07K31rJorw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QD9uZflX99B/gTFN+WdtX6kIoX3KBSCCGTyhqVVxNpc=; b=di3i0S1I2h3BrK+2K8BsdjraREd0l3FFlILhHn9JUCcdQE6PCo8cHEQOOTVEE/LRtAqjOmE65mwywCsxFlE7DOj0oYorG5IYyunmg9bukotfXiGq3V6TnsroXl+++/OluZ8F53f7sP4BBWT8lw2pfh8925YEoNH3OXPC829GODxczWTIjl6/qyKdFcPIql57qewsjoD7vgxX5V/9tbH/Y0+thwjg8VcjHzzSjcPtICH+pbYjaKIcqCTMeXc0dPin5X6jHKlIcJN9tKh1o7geji1inwB+0Q2Zjma6UW33MSyU80jmQzH7+SNCvFL+gMuaaspFmmkLucgecib9GVuB5g== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by DB9PR09MB5130.eurprd09.prod.outlook.com (2603:10a6:10:26d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Mon, 21 Feb 2022 16:50:39 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b569:2640:494d:e192]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b569:2640:494d:e192%7]) with mapi id 15.20.4995.027; Mon, 21 Feb 2022 16:50:39 +0000 In-Reply-To: <87r17xhvne.fsf@yahoo.com> (Po Lu's message of "Mon, 21 Feb 2022 09:10:29 +0800") X-TMN: [PyED4+Xreoc3fAtxBfnwEjaJqfyyHGyZ] X-ClientProxiedBy: HE1PR05CA0341.eurprd05.prod.outlook.com (2603:10a6:7:92::36) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <871qzwnoyq.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb2eafdc-a7f5-45c6-2233-08d9f55a49e9 X-MS-TrafficTypeDiagnostic: DB9PR09MB5130:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cq7IybcNsoIyk4JUpJLCdhydOctrkbsAkpKqxh5MZX207XWDevqEgAAxGfvFhzweqOqd0cxmInogc164Ti8jFrLmxNq7wGtqlYlsbR2tANk9R57zNj++CpI4xmoeXRIhK5iOqkOX8SEo0EDUbPLdlH83+FoZK+7gyLNpUba1Ny7ooqjc+Z0235EY6K3aWQEL+OCHi3aqxCOQx7ki2+U8rntrMZ8mehwdLNDzczEXi82MTsBT5ur3ymthYL3pJ0R0b9VeR5DUOrXVt/IEFa04PZYi18o5yeeeSA22Vw/thuvQ4p0fnSEGrPc5RRm/LjMK662tTVmoCotQKzvkYmoDUXaXDqOyZf0qp6ELxbWYzUGyK54itgPC/ZKLXzQqG3B9fewWIjjgQ7L0nJ89HpTyqFr/mG08+eY8gC0Ta1pfdjiuToI0ljewkozDQItSreEo8f1AGlkdC45CRtqQ92VHlo+xn27bZ8XOEj6umfZ99b7GLXkKaZz+ITl3eDnb1OpNjVxOLLmTB6oFjyWZ8RrkkHI1H1VwJk+2UjgPpdhlON6ZCpDBAAKhi5ivlQTofnhUSW7/VIoeJGIQnFrJzOI6Nw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SINVrpvpLeH9qbYN9TQiUh3UwFo2DqKBKHQvd//Ddc9e6sTTnXcxuia8yc0i?= =?us-ascii?Q?hAqCMVD5gI8BAODrZL6NXB2BRM1Ub3r6lX09tP01de6uYcM5wrTArb6cHvD0?= =?us-ascii?Q?clZEDFIT+GtD7BEIiwY0OTkMuZI8dRZ2cn+ym3pjdhryUuWUudMTdu0bdu/H?= =?us-ascii?Q?1JO0qENelmp+i+9s1oW/mG8XH+t8ewyXyjnkjmYoWxz5eePM/ciHrLnnBqkD?= =?us-ascii?Q?3twBot5AAmgizy/sbBuVvw0rmN5iRaWfUJ0sk1deLfoyUnx8KBnDd3bm7jEu?= =?us-ascii?Q?Of0IgBt7Dlr2BznG591WeI2bLACz4UTMgf7D6vluKrodSL1gArgaiND0gRTG?= =?us-ascii?Q?QDQ3voT599Oz4Oq1hfrsa25m9h942tjfZmNHVVnl1a54dJxvq3OObP0w2RjO?= =?us-ascii?Q?H8IAHG5oUfGAK98ZwNwIgrvWUSKIvgpTeRwE0V0zTF3ubqkCnrG/OcnC0rwP?= =?us-ascii?Q?tptHJCIvktUyhcikliIjLnShAriZYkn2KLmlhc5Qexbed7Q7YiGTuWVteraN?= =?us-ascii?Q?Bxmv+lP9koN7aYc4la858FGLxW2JqB+Tl0fd/0GZ7JYA3BFNu3yCsvLhnRDO?= =?us-ascii?Q?P9bVaIiS1CGi8zllG/HtXOmAV3H6fdDzFf+l5eTGT8x111m7eG6Pu4SDpPSR?= =?us-ascii?Q?EW X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: fb2eafdc-a7f5-45c6-2233-08d9f55a49e9 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2022 16:50:39.5750 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR09MB5130 Received-SPF: pass client-ip=40.92.74.29; envelope-from=arthur.miller@live.com; helo=EUR04-DB3-obe.outbound.protection.outlook.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_PASS=-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:136119 Archived-At: Po Lu writes: > 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. I understand; but they have probably changed API because of some reason that suits their goals. Every project prioritize their own goals, that is how life is. They certainly didn't do it to piss off Emacs devs. >>> 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. It looks to me more like an invite to contribute an API, so there is your chance to get it the way you like.