From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#5721: Feature request: Function that returns absolute coordinates Date: Fri, 02 Jul 2010 09:06:49 +0200 Message-ID: <4C2D9009.60405@swipnet.se> References: <4B9E4521.9030909@yahoo.co.jp> <4C2C8C02.1010906@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: 7bit X-Trace: dough.gmane.org 1278055810 4787 80.91.229.12 (2 Jul 2010 07:30:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Jul 2010 07:30:10 +0000 (UTC) Cc: 5721@debbugs.gnu.org To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 02 09:30:08 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1OUahK-0000q9-Kl for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jul 2010 09:30:07 +0200 Original-Received: from localhost ([127.0.0.1]:50442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUahI-0007d6-De for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jul 2010 03:30:04 -0400 Original-Received: from [140.186.70.92] (port=57888 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUagp-0007c4-Fh for bug-gnu-emacs@gnu.org; Fri, 02 Jul 2010 03:29:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUagn-0000Ku-7E for bug-gnu-emacs@gnu.org; Fri, 02 Jul 2010 03:29:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39794) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUagn-0000Kh-5o for bug-gnu-emacs@gnu.org; Fri, 02 Jul 2010 03:29:33 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OUaL0-0001hv-1y; Fri, 02 Jul 2010 03:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Jul 2010 07:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5721 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5721-submit@debbugs.gnu.org id=B5721.12780544186557 (code B ref 5721); Fri, 02 Jul 2010 07:07:01 +0000 Original-Received: (at 5721) by debbugs.gnu.org; 2 Jul 2010 07:06:58 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUaKv-0001hi-Nx for submit@debbugs.gnu.org; Fri, 02 Jul 2010 03:06:58 -0400 Original-Received: from smtprelay-b11.telenor.se ([62.127.194.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUaKt-0001hd-2D for 5721@debbugs.gnu.org; Fri, 02 Jul 2010 03:06:56 -0400 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 66AF1DFAD for <5721@debbugs.gnu.org>; Fri, 2 Jul 2010 09:06:51 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmU8AFUsLUxV4S0jPGdsb2JhbACfaQwBAQEBNS29TYUlBIQXjTg X-IronPort-AV: E=Sophos;i="4.53,525,1272837600"; d="scan'208";a="97197680" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb2.telenor.se with ESMTP; 02 Jul 2010 09:06:50 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id 29A727FA05A; Fri, 2 Jul 2010 09:06:50 +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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 02 Jul 2010 03:07:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38193 Archived-At: YAMAMOTO Mitsuharu skrev 2010-07-02 04.10: > What do you think about the following point? > >>>>>> On Tue, 01 Jun 2010 10:16:08 +0900, YAMAMOTO Mitsuharu said: > >> I'd rather suggest introducing some conversion functions between >> relative and absolute coordinate systems. Newer versions of Mac OS >> X provides "Resolution Independence" that allows users to specify a >> scale factor: > >> http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/HiDPIOverview/HiDPIConcepts/HiDPIConcepts.html > >> With the scale factor, 1 pixel in the relative coordinate system no >> longer always correspond to 1 pixel in the absolute one. Thus one >> cannot determine the corresponding absolute coordinates only from >> `inside-left' and `inside-top'. > > (Maybe "pixel" above should be "unit".) > > One can argue that the new API can return enough information to deal > with the scale factor by computing width and height in both relative > and absolute coordinate systems. But I guess many programmers just > tends to add some offsets for the conversion between these coordinate > systems. This might cause rewrite of elisp programs when GTK+ > supports resolution independence in future. One could argue that we are always dealing with scaled pixels, and absolute in this context means "absolute scaled" instead of "absolute unscaled". Can't we always use scaled coordinates? When do we need to handle unscsaled? The new functions use tool bar and title bar height as well as frame top and left. Are these scaled or unscaled pixels? Shouldn't the nextstep specific code just expose scaled pixels to the generic code and do the conversion when needed? I know too little about which API functions that use scaled and which use unscaled. Jan D.