aboutsummaryrefslogtreecommitdiffstats
path: root/README.xwidget
diff options
context:
space:
mode:
authorJoakim Verona2010-09-15 11:34:12 +0200
committerJoakim Verona2010-09-15 11:34:12 +0200
commitffce6496f1e23dbe524b8c3c0e3530cf610e1b08 (patch)
tree9dc9d35237fc616280b31bf469848527777fe122 /README.xwidget
parent263063570533390c3859ad1e64c7fdcc06c8617d (diff)
downloademacs-ffce6496f1e23dbe524b8c3c0e3530cf610e1b08.tar.gz
emacs-ffce6496f1e23dbe524b8c3c0e3530cf610e1b08.zip
this doesnt actually work at all, but it does do some interesting things with composition, and contains lots of random experimental code. so i commit now, remove junk, and continue
Diffstat (limited to 'README.xwidget')
-rw-r--r--README.xwidget50
1 files changed, 29 insertions, 21 deletions
diff --git a/README.xwidget b/README.xwidget
index 506e34a7866..e8617392ef5 100644
--- a/README.xwidget
+++ b/README.xwidget
@@ -18,19 +18,21 @@ buffer with a display spec. Also, xwidgets exists in only one copy,
18where a plain image can be shown in several windows. The xwidget code 18where a plain image can be shown in several windows. The xwidget code
19tries to handle this by essentialy making a screen capture of the 19tries to handle this by essentialy making a screen capture of the
20widget and displaying those in the non-active windows, and the live 20widget and displaying those in the non-active windows, and the live
21widget in the active window. This doesnt currently work for xembed 21widget in the active window. The current snapshot code doesnt work if
22gtk_socket widgets. 22the live xwidget is off-screen. This seems to be solveable by using
23the XComposite interface, but that doesnt currently work.
23 24
24The current state is that one window, one frame, showing many xwidgets 25The current state is that one window, one frame, showing many xwidgets
25is a nice demo. One frame, many windows, will have lots of display 26is a nice demo. One frame, many windows, will have lots of display
26glitches. Many frames, many windows, will probably work even worse. 27glitches. Many frames, many windows, will work even worse.
28
27 29
28* Brief overview of how xwidgets work 30* Brief overview of how xwidgets work
29Xwidgets work in one way like images in Emacs. You bind a display spec very 31Xwidgets work in one way like images in Emacs. You bind a display spec very
30similar to an image display spec to buffer contents. The display engine will 32similar to an image display spec to buffer contents. The display engine will
31notice the display spec and try to display the xwidget there. The display engine 33notice the display spec and try to display the xwidget there. The display engine
32prepares space at the right place for the xwidget and so on for free, as long as 34prepares space at the right place for the xwidget and so on for free, as long as
33we provide proper sizes and so on. 35we provide proper sizes and so on back to the redisplay engine.
34 36
35The problem is that Emacs cant actually draw the widgets, as it can with 37The problem is that Emacs cant actually draw the widgets, as it can with
36images. Emacs must notify GTK about where the widgets should be, and how they 38images. Emacs must notify GTK about where the widgets should be, and how they
@@ -50,33 +52,34 @@ synchonous with Emacs display changes. Ok, so why is that difficult then?
50 display is clever and optimized. It is often difficult to know that a xwdiget 52 display is clever and optimized. It is often difficult to know that a xwdiget
51 hasnt actually been displayed after a redisplay. 53 hasnt actually been displayed after a redisplay.
52 54
53- phantom views of xwidgets are thankfully not so hard because gtk supports 55- phantom views of xwidgets are thankfully not so hard because gtk
54 offscreen rendering of many widget types. Except it doesnt for the gtk socket 56 supports snapshoting of many widget types. Snapshoting doesnt seem
55 type, which happens to be very desirable. This might be solvable with 57 to work if the live widget is offscreen. This might be solvable with
56 xcomposite, but is difficult. 58 xcomposite, but attempts have so far failed.
57 59
58- The gtk socket type for embedding external applications is desirable but 60- The gtk socket type for embedding external applications is desirable
59 presents a lot of difficulties of its own. Offscreen rendering has been 61 but presents a lot of difficulties of its own. One difficulty is
60 mentioned already. Another difficulty is deciding which input events to 62 deciding which input events to forward, and when and how to do it.
61 forward, and when and how to do it.
62 63
63- The case of showing an xwidget in several frames is not solved at all 64- The case of showing an xwidget in several frames is not solved at all
64 currently. This would mean moving the live xwidget between frames when the 65 currently. This would mean moving the live xwidget between frames when the
65 selected window moves. The gtk widget will need to be reparented between 66 selected window moves. The gtk widget will need to be reparented between
66 windows, which seem fragile. 67 windows, which seems fragile.
67 68
68* ToDo:s 69* ToDo:s
69 70
70** TODO Examine using XComposite rather than GTK off-screen rendering. This 71** TODO Examine using XComposite rather than GTK off-screen
71 would make xembed widgets work much better. This would probably be 72 rendering. This would make xembed widgets work much better. This
72 rathter difficult, but could open up other interesting possibilities 73 would probably be rathter difficult, but could open up other
73 for Emacs. 74 interesting possibilities for Emacs. There is an early attempt in
75 xwidget.c, but the X call to redirect to offscreen rendering fails
76 for unknown reasons.
74 77
75** TODO make the keyboard event code propagation code work. There is an attempt 78** TODO make the keyboard event code propagation code work. There is an attempt
76to provide an api to send keyboard events to an xwidget, but it doesnt currently 79to provide an api to send keyboard events to an xwidget, but it doesnt currently
77work very well. 80work very well.
78 81
79** TODO remove the special-case for when the minibuffer is 82** DONE remove the special-case for when the minibuffer is
80 active. I added some code to reduce the annoying problem display artefacts 83 active. I added some code to reduce the annoying problem display artefacts
81 when making the minibuffer the selected window. This made xwidgets in the 84 when making the minibuffer the selected window. This made xwidgets in the
82 buffer go grey or black whenever one did m-x to activate the minibuffer. The 85 buffer go grey or black whenever one did m-x to activate the minibuffer. The
@@ -84,15 +87,18 @@ work very well.
84 good idea. Special-casing will never work properly. It is much better to spend 87 good idea. Special-casing will never work properly. It is much better to spend
85 time finding solutions that work acceptably in the general case. 88 time finding solutions that work acceptably in the general case.
86 89
87** TODO disable emacs cursor drawing on top of an active xwidget. 90** DONE disable emacs cursor drawing on top of an active xwidget.
88 This ought to be rather simple and should improve the visuals a lot. 91 This ought to be rather simple and should improve the visuals a lot.
92
89 93
90** TODO figure out what to do with the multiple frames case. 94** TODO figure out what to do with the multiple frames case.
91I havent spent any time at all on this. 95I havent spent any time at all on this.
92 96
93** TODO improve the xwidgets programming interface so its less of 97** TODO improve the xwidgets programming interface so its less of
94 hand-waving affair. This shouldnt be too hard, but I have deliberatley not 98 hand-waving affair. This shouldnt be too hard, but I have deliberatley not
95spent any time on it, since getting the visuals right is much harder. 99spent any time on it, since getting the visuals right is much
100harder. Anyway, I sort of think the interface should be somewhat like
101it is, except symbols is used instead of integers.
96 102
97** TODO more documentation 103** TODO more documentation
98There should be user docs, and xwidget contributor docs. The current README 104There should be user docs, and xwidget contributor docs. The current README
@@ -102,5 +108,7 @@ is all contributor docs there is now, apart from the code.
102window rather than a point in a buffer. This was suggested by Chidong. 108window rather than a point in a buffer. This was suggested by Chidong.
103This would be a useful addition to Emacs in itself, and would avoid nearly all 109This would be a useful addition to Emacs in itself, and would avoid nearly all
104display issues. I still think the general case is more interesting, but this 110display issues. I still think the general case is more interesting, but this
105special case should also be added. 111special case should also be added. The xwidget would then be bound to
112replace the view of a particular window, and it would only show in
113that window.
106 114