From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs and Gnome Canvas Date: Thu, 15 Jul 2010 11:29:29 +0200 Message-ID: <4C3ED4F9.4080603@swipnet.se> References: <4C3CD120.4040905@swipnet.se> <5A91499A-0470-43FD-9F48-560CEAD3424C@mit.edu> <83wrsyr068.fsf@gnu.org> <83iq4hhjww.fsf@gnu.org> <87sk3lbvv0.fsf@telefonica.net> <83hbk1grnq.fsf@gnu.org> <4C3EBCDC.8050709@swipnet.se> <83d3upgmwj.fsf@gnu.org> <4C3ECB4C.6050208@swipnet.se> <83aaptgly1.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1279186210 32563 80.91.229.12 (15 Jul 2010 09:30:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2010 09:30:10 +0000 (UTC) Cc: ofv@wanadoo.es, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 15 11:30:06 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 1OZKlX-0000iy-CE for ged-emacs-devel@m.gmane.org; Thu, 15 Jul 2010 11:30:03 +0200 Original-Received: from localhost ([127.0.0.1]:58758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZKlW-0004KK-DX for ged-emacs-devel@m.gmane.org; Thu, 15 Jul 2010 05:30:02 -0400 Original-Received: from [140.186.70.92] (port=53574 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZKl8-0004Ev-Cb for emacs-devel@gnu.org; Thu, 15 Jul 2010 05:29:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZKl7-0001RM-7N for emacs-devel@gnu.org; Thu, 15 Jul 2010 05:29:38 -0400 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]:32906) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZKl4-0001Qb-3U; Thu, 15 Jul 2010 05:29:34 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id AA8EDEA055; Thu, 15 Jul 2010 11:29:32 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Asw1AG5yPkxV4S0jPGdsb2JhbACDH4RSl3kMAQEBATUtrGWRRoEpgwlyBA X-IronPort-AV: E=Sophos;i="4.55,207,1278280800"; d="scan'208";a="104624490" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb2.telenor.se with ESMTP; 15 Jul 2010 11:29:30 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id A8EC07FA05A; Thu, 15 Jul 2010 11:29:29 +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: <83aaptgly1.fsf@gnu.org> 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:127340 Archived-At: Eli Zaretskii skrev 2010-07-15 10.59: >> Date: Thu, 15 Jul 2010 10:48:12 +0200 >> From: Jan Dj=C3=A4rv >> CC: ofv@wanadoo.es, emacs-devel@gnu.org >> >>>> The changes that require redisplay would have to notify the Canvas t= hat things >>>> changed. I think this style is more efficient. >>> >>> What do you mean by "changes that require redisplay"? Suppose a >>> character was inserted or deleted -- would that need to notify the >>> Canvas? >> >> Yes. > > But the inserted character could be in the portion that is not > displayed at all, in which case it does not "require redisplay". Who > should decide whether redisplay is necessary? If that's Emacs, then > it should know a lot about the display layout. If its the Canvas, > then it should know a lot about what portions of the buffer text are > on the screen. You probably have your text in an CanvasItem that has a GtkTextBuffer. W= hen a=20 character is inserted, you insert in to the GtkTextBuffer. The redisplay= part=20 is then handeled internally between GtkTextBuffer, GnomeCanvas(Rich)TextI= tem=20 and GnomeCanvas. As I said, it probably relies on having all text in the GtkTextBuffer. > > Besides, this mean a thorough redesign of Emacs objects. Currently, > they are totally unaware of the display engine, and don't request any > redisplays. They just modify themselves and that's it. > >>> How about an arbitrary mouse move? >> >> If it resulted in a different highlightning of a link, yes. > > Again, how to know that? Note that some mouse movements perform > complex operations on Emacs objects, like popping up windows and > frames. Each CanvasItem can have callbacks for mouse move, click, key press and s= o on.=20 The idea is to have separate CanvasItems for the items that should reac= t to=20 mouse events and then register callbacks for those events. The callback = then=20 pops up windows or whatever. It is a more event driven approach, and that in itself is a big modificat= ion=20 for Emacs which is more sequential in nature. Jan D.