all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* embedding gtk widgets in a buffer
@ 2008-05-07 23:23 joakim
  2008-05-08  0:21 ` joakim
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: joakim @ 2008-05-07 23:23 UTC (permalink / raw)
  To: emacs-devel

I'm working on a patch to embed gtk widgets in a buffer.
Its going unexpectedly well!

I'm able to embed different types of widgets, and they move with the
text rather like images in emacs.

I've tested 2 different types of buttons, and an xembed widget.

Heres a screenshot:
http://www.emacswiki.org/cgi-bin/wiki/EmacsXembedScreenshot

Heres the elisp I use to test, which shows the interface:

-----------------------------------------
(insert "xwidgetdemo<<< a button. another button\n")
(goto-char (point-min))
(put-text-property (point) (+ 1 (point)) 'display '(xwidget :xwidget-id 1 :type 1 :title "1"))

(goto-char 15)
(put-text-property (point) (+ 1 (point)) 'display '(xwidget :xwidget-id 2 :type 2 :title "2"))

(goto-char 30)
(put-text-property (point) (+ 1 (point)) 'display '(xwidget :xwidget-id 3 :type 3 :title "3"))
------------------------------------------

Ok, thats rather nice and all, but heres what I dont have:

- callback interface for the widgets. It would be nice with some ideas
how to do this. For instance:
  - button pressed handler
  - when a xembed widget is ready, a callback to start an external
  program in the widget would be nice, now it has to be done manually on
  the cmd line

- currently all xwidgets must have a unique id, ":xwidget-id 3" for
  instance. I havent figured out how to handle this.

- 2 windows showing the same buffer doesnt quite work and is probably tricky

- only 1 frame supported

- beautiful code

-- 
Joakim Verona




^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-05-12  4:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07 23:23 embedding gtk widgets in a buffer joakim
2008-05-08  0:21 ` joakim
2008-05-08  9:02 ` BVK
2008-05-08 22:28 ` Richard M Stallman
2008-05-08 23:13   ` joakim
2008-05-08 23:24     ` Lennart Borgman (gmail)
2008-05-10  8:55     ` Richard M Stallman
2008-05-10 11:55       ` joakim
2008-05-10  8:55     ` Richard M Stallman
2008-05-10  9:58       ` joakim
2008-05-10 10:22         ` Lennart Borgman (gmail)
2008-05-11  7:34         ` Richard M Stallman
2008-05-09  8:34   ` YAMAMOTO Mitsuharu
2008-05-10 21:07 ` joakim
2008-05-11  7:35   ` Richard M Stallman
2008-05-11  8:25     ` joakim
2008-05-11 12:32       ` David Kastrup
2008-05-11 12:48       ` joakim
2008-05-11 12:58         ` Lennart Borgman (gmail)
2008-05-12  4:38           ` tomas

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.