From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akira Kyle Newsgroups: gmane.emacs.devel Subject: Re: Introducing emacs-webkit and more thoughts on Emacs rendering (was Rethinking the design of xwidgets) Date: Sun, 22 Nov 2020 15:04:57 -0700 Message-ID: <86h7phnj3q.fsf@akirakyle.com> References: <864kmzupp0.fsf@akirakyle.com> <86pn46awrr.fsf@akirakyle.com> <83wnydw9nc.fsf@gnu.org> <86sg91nsah.fsf@akirakyle.com> <20201122212004.GA62328@odonien.localdomain> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10290"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.13; emacs 28.0.50 Cc: Eli Zaretskii , emacs-devel@gnu.org To: Vasilij Schneidermann Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 22 23:05:49 2020 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 1kgxUT-0002YY-9y for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Nov 2020 23:05:49 +0100 Original-Received: from localhost ([::1]:42030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgxUS-0000gm-Au for ged-emacs-devel@m.gmane-mx.org; Sun, 22 Nov 2020 17:05:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgxTj-0008PW-Lg for emacs-devel@gnu.org; Sun, 22 Nov 2020 17:05:03 -0500 Original-Received: from mail-il1-f181.google.com ([209.85.166.181]:37263) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgxTh-0006Mm-BU; Sun, 22 Nov 2020 17:05:03 -0500 Original-Received: by mail-il1-f181.google.com with SMTP id k8so3483901ilr.4; Sun, 22 Nov 2020 14:05:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=LSetgrT5IBSUeBJVKtAol9o6JdtAfpb7PYiTmfWqCZU=; b=SM2swQMNX4VNNcTlfYcqmQYjNFceAlujkJsdX8nsF/2Dd+aUKqf3IylEWEyAh+0IUt Ew45WBHaDApRXQXFOEtJYAKtC3ZfWAUA/TjgyCZUidwQPb39zROMFln47Q8sqJjLxwmp 2c72O1MLY+z4FoVvBp496X1BqawN7Vps586B73bufD9MBn5JaaY6yo45FXVOtV4xKSyE Y+1vtak3Qqj9vzFDWaxtKC6pWbWgDxoVG+E7Qe6ZEkaQQNJdvEDz7IasWqnJXdXSdzwK EhATMr5Ueo56qTkqIj2ufCT/BAuaqaG+ZGcylqdhDTTvJ3E5wdrscNiZNTJp4DXGrH6l IOsQ== X-Gm-Message-State: AOAM530g7ma8g18OAntWqgerfbQEGb7TGz2NjKVKZBaFnMwp04iFPbp4 qyjoOp6327XyK2S90h+T2Hy4MCLNGqEbeEOO X-Google-Smtp-Source: ABdhPJx9z9s/aP/CN8FxvES7Rru/u0W2CnpZ2EzbOnCyujXOMkWldGBssfOZGzu7l/HTysRgw72BGA== X-Received: by 2002:a92:da52:: with SMTP id p18mr13836137ilq.261.1606082699739; Sun, 22 Nov 2020 14:04:59 -0800 (PST) Original-Received: from data ([2601:281:8080:45f0:ae86:53b8:ddcf:9fa4]) by smtp.gmail.com with ESMTPSA id r21sm1077947ioc.34.2020.11.22.14.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2020 14:04:59 -0800 (PST) In-reply-to: <20201122212004.GA62328@odonien.localdomain> Received-SPF: pass client-ip=209.85.166.181; envelope-from=aikokyle@gmail.com; helo=mail-il1-f181.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:259655 Archived-At: On Sun, Nov 22, 2020 at 02:20 PM, Vasilij Schneidermann wrote: >> I find the GtkFixed widget that contains the windows of a >> frame, then I add >> the webkitgtk widget as a child of that GtkFixed. So everything >> under the >> widget is obscured, including any text written into the >> webkit-mode buffer. >> In fact I use the buffer for processing module->lisp async >> messages. I >> monitor for changes in the coordinates of the window with >> `window-size-change-functions`. Child frames are also added as >> children of >> the GtkFixed widget which presents a problem for things like >> posframe. I >> ensure that the webkit view is always below such child frames, >> as it would >> be if it were rendered as part of the buffer's window itself. > > Could this approach be used to perform OpenGL drawing or > obtaining a > cairo context to draw on? I'm not terribly interested in putting > a > webview inside Emacs, 3D/2D graphics however... > > Vasilij Yes, the webkitgtk widget is ultimately just drawing itself on cario or opengl contexts. So if you only care about taking over the display of a window, this approach should work fine. I'm not sure it would be wise, or necessarily possible, to use this approach to mix elements drawn with GtkWidgets and Emacs' own display code.