[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5721: Feature request: Function that returns absolute coordinates
From: |
YAMAMOTO Mitsuharu |
Subject: |
bug#5721: Feature request: Function that returns absolute coordinates |
Date: |
Tue, 01 Jun 2010 10:16:08 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
>>>>> On Mon, 31 May 2010 19:28:07 +0900, IRIE Shinsuke
>>>>> <irieshinsuke@yahoo.co.jp> said:
> Sorry, I forgot to reply to your question.
>> I can understand posn-absolute-x-y and window-absolute-pixel-edges, but can
>> you add some details on what posn-at-absolute-x-y should do?
> Umm... I suggest the new frame parameters like `inside-left' and
> `inside-top', which show the top left coordinates of an X window
> corresponding to `window-id'. See below:
> A------------------------+
> | File Edit Options ... | `left' => horizontal position of A
> +B----------------------++ `top' => vertical position of A
> || || `inside-left'=> horizontal position of B
> || || `inside-top' => vertical position of B
> || ||
> ||-U:**- *scratch* (lisp||
> ||______________________||
> +------------------------+
>> I'd rather not introduce another position format that looks like the old,
>> but
>> where pixels are absolute rather than relative.
> I believe Emacs should provide some ways to obtain absolute coordinates.
> Recently I created ibus.el, which is an IBus client for Emacs, but it
> requires the external program to calculate the absolute coordinates of
> candidate window...
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'.
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp