From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: xwidget branch Date: Thu, 01 Jul 2010 17:52:30 +0200 Message-ID: <4C2CB9BE.8000204@swipnet.se> References: <4C2B309B.8000402@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1277999581 6584 80.91.229.12 (1 Jul 2010 15:53:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2010 15:53:01 +0000 (UTC) Cc: Emacs development discussions To: joakim@verona.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 01 17:53:00 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OUM4Q-0000le-Ig for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 17:52:58 +0200 Original-Received: from localhost ([127.0.0.1]:38307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUM4Q-00014F-2M for ged-emacs-devel@m.gmane.org; Thu, 01 Jul 2010 11:52:58 -0400 Original-Received: from [140.186.70.92] (port=52374 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUM4J-000139-BQ for emacs-devel@gnu.org; Thu, 01 Jul 2010 11:52:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUM4H-0004M2-Tn for emacs-devel@gnu.org; Thu, 01 Jul 2010 11:52:51 -0400 Original-Received: from smtprelay-h32.telenor.se ([213.150.131.5]:48223) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUM4H-0004LY-KT for emacs-devel@gnu.org; Thu, 01 Jul 2010 11:52:49 -0400 Original-Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-h32.telenor.se (Postfix) with ESMTP id D2089D02F for ; Thu, 1 Jul 2010 17:52:45 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Auk8AENWLExV4S0jPGdsb2JhbACHb4tAjDsMAQEBATUtv0CCXYJIBA X-IronPort-AV: E=Sophos;i="4.53,520,1272837600"; d="scan'208";a="540292462" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb3.telenor.se with ESMTP; 01 Jul 2010 17:52:33 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 3729F7FA05A; Thu, 1 Jul 2010 17:52:32 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126629 Archived-At: joakim@verona.se skrev 2010-06-30 15.09: > Jan Dj=E4rv writes: > >> This sounds like fun. How do you handle multiple windows, that is the >> same buffer with widgets displayed in different frames/windows? > > There are some notes in the readme. I paste it below so we can discuss = it > and improve it. This is as you might imagine the really tricky part. > > I guess it takes some kind of proxy object that keeps track of creating t= he=20 real widget for each window. GtkAction:s can help here. You can have a=20 GtkAction instead of the real widget. When redisplay is done, check all = proxy=20 widgets for the GtkAction, and if no one is present for the window, creat= e=20 one. The window can be saved in the real widget as widget data. I think the "don't display cursor over widget"-problem should have some=20 precedence, it really looks awful :-). I see lots of redisplay-problems with widgets, but that is to expected as= =20 Emacs doesn't use the Gtk+ event loop. It took a while before Gtk+ scrol= lbars=20 displayed nicely, and even now bugs show up. You have to request redraw = on=20 widgets and flush the Gdk event queue manually at appropriate places. >> Does the widgets always flow with the text or can you anchor them at >> fixed positions? I was thinking of per window toolbars. > > They work like images. It ought to be possible to bind them to a margin > or something like images, but I havent tested this. Also like images > they are not tied to a window but to a buffer. OTOH xwidgets have, > unlike images, their own identity, and I have been thinking of letting > an xwidget be able to replace an entire window, etc. > I'll give it a try. Jan D.