emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

advice sought for the xwidget lisp interface


From: joakim
Subject: advice sought for the xwidget lisp interface
Date: Mon, 27 Jun 2011 19:13:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

I've spent some time on the xwidget branch lately.

I switched to a MVC pattern which seems much saner than my
previous attempts, so I now have some confidence the current code can at
least in principle be worthy of trunk someday.

Since I've mostly worked on resolving display glitches the lisp
interface isn't very state of the art, to say the least, so I'd like
some advice.

Some terms:
xwidget: xternal widget. The model.
xwidget-view: the actual gtk widget embedded in an Emacs window.
window: in the emacs sense
process: in the emacs sense, used for reference

the lisp interface would be like this:
- xwidget-create returns an xwidget object, similar to a process
  object. this id is used when creating the display spec(instead of
  the user defined id now used)
  Its not obvious that this function needs to be public. It could be
  done while processing the display spec and later retrieved. 
  
the data structure would be something like this:
- a "process" like aproach to create the xwidgets. xwidgets are
  coupled to buffers, somewhat like processes, except a buffer can
  hold several xwidgets
- an xwidget has a plist to hold the model, like a process does
- an xwidget has an assoc list of xwidget views

there are some things that arent clear:
- an xwidget doesnt necessarily need to be coupled to a buffer but it
  seems to be the clearest model. xwidgets would be buffer local
- xwidget-views are by necessity coupled to a emacs window so it might
  be better to store them window locally rather than in an assoc
  coupled to the xwidget model

stuff that needs to work:
- do something for all views of a xwidget(resize, value change)
- do something for all xw-views in an emacs window(deletion etc)
- lookup xw-view for xwidget in emacs window(during redisplay)
(- do something for all siblings of a xw-view. not atm)
- garbage collect of widget (killed manually atm)

-- 
Joakim Verona



reply via email to

[Prev in Thread] Current Thread [Next in Thread]