all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: joakim@verona.se
Cc: emacs-devel@gnu.org
Subject: Re: how to find out when display property is deleted in C?
Date: Mon, 12 May 2008 12:57:23 -0400	[thread overview]
Message-ID: <jwvej87mpiw.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m3y76fsh62.fsf@verona.se> (joakim@verona.se's message of "Mon, 12 May 2008 16:58:29 +0200")

>>> 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




  reply	other threads:[~2008-05-12 16:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12  9:34 how to find out when display property is deleted in C? joakim
2008-05-12 14:25 ` Stefan Monnier
2008-05-12 14:58   ` joakim
2008-05-12 16:57     ` Stefan Monnier [this message]
2008-05-12 20:08     ` Eli Zaretskii
2008-05-13  6:55       ` joakim
2008-05-13 18:53         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvej87mpiw.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.