[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get information of a tip created by x-show-tip
From: |
Feng Shu |
Subject: |
Re: How to get information of a tip created by x-show-tip |
Date: |
Sat, 19 Jan 2019 17:06:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
martin rudalics <address@hidden> writes:
>> I want to get a tip's information created by x-show-tip, for
>> example: width, height, x and y
>>
>> but I fail to find the way, anyone can help me?
>
> We have invested some efforts to hide information about the tooltip
> implementation. The major reason was to protect our own routines from
> operating on tooltip frames and windows. Compare, for example,
>
> http://lists.gnu.org/archive/html/emacs-devel/2018-02/msg00694.html
>
> From there you can see that the return value of 'visible-frame-list'
> and the 'tooltip' frame paramter can give you the current tooltip
> frame if it is visible and native (that is created by Emacs itself).
> The size and position paramters of that frame should give you the
> values you cited above.
>
I use the following code to test, but failure
1. width and height parameter do not work
2. I can find any frame with 'tooltip parameter
```
(setq tooltip-reuse-hidden-frame t)
(setq x-gtk-use-system-tooltips nil)
(progn
(x-show-tip "this is a test"
(selected-frame)
'((name . "tooltip1")
(internal-border-width . 2)
(left . 200)
(top . 300)
(width . 200)
(height . 600)
(border-width . 1)
(no-special-glyphs . t))
100 0 0)
(dolist (frame (visible-frame-list))
(princ (frame-parameter frame 'tooltip))))
```
>> by the way, is a tip a window or a frame?
>
> 'tooltip' (or 'tip') usually refer to the text only. Emacs can put
> that text into a window, that window into a frame and ask the window
> system to display that frame in a window-system window. But Emacs can
> drop that text directly to GTK in which case no frame will be made.
> For GTK tooltips no information can be retrieved.
>
> martin
>
--
- How to get information of a tip created by x-show-tip, Feng Shu, 2019/01/18
- Re: How to get information of a tip created by x-show-tip, Eli Zaretskii, 2019/01/19
- Re: How to get information of a tip created by x-show-tip, martin rudalics, 2019/01/19
- Re: How to get information of a tip created by x-show-tip,
Feng Shu <=
- Re: How to get information of a tip created by x-show-tip, Feng Shu, 2019/01/19
- Re: How to get information of a tip created by x-show-tip, martin rudalics, 2019/01/19
- Re: How to get information of a tip created by x-show-tip, Feng Shu, 2019/01/19
- RE: How to get information of a tip created by x-show-tip, Drew Adams, 2019/01/19
- Re: How to get information of a tip created by x-show-tip, martin rudalics, 2019/01/19