[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to find out when display property is deleted in C?
From: |
Stefan Monnier |
Subject: |
Re: how to find out when display property is deleted in C? |
Date: |
Mon, 12 May 2008 12:57:23 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>> How do I find out when a display property is deleted in C?
>> You don't/can't.
> Hmm.
>>> In the xwidget patch I need to delete the corresponding xwdiget when
>>> the display property is deleted.
>> What happens if the display property is later re-added?
>> If that situations is not problematic, then you can keep your xwidgets
>> in a cache which you can flush every once in a while.
> But I need to remove the gtk widget from display the precise moment the
> display property goes away, or there will be very awkward display bugs.
how do you deal with the case where the widget is scrolled out of view?
> I could maybe have a new phase at the end of emacs redisplay, where all
> xwidgets which haven't been drawn in this redisplay will be deleted.
Or marked as "out of view". Yes, that sounds sensible.
>> Also what happens if the same display property gets added at two places
>> (either in the same buffer or in different buffers)?
> They cant be the same, because I require a unique id for every xwidget
> in the display property:
> (put-text-property (point) (+ 1 (point)) 'display '(xwidget :xwidget-id 3
> :type 3 :title "3" :width 400 :height 200))
> adding the same id twice is an error, as currently designed.
Is this error properly caught and signalled to the user?
Stefan