Changeset View
Changeset View
Standalone View
Standalone View
dbus/org.kde.Spectacle.xml
Show All 18 Lines | 12 | <interface name="org.kde.Spectacle"> | |||
---|---|---|---|---|---|
19 | </method> | 19 | </method> | ||
20 | 20 | | |||
21 | <method name="FullScreen"> | 21 | <method name="FullScreen"> | ||
22 | <arg name="includeMousePointer" direction="in" type="b"> | 22 | <arg name="includeMousePointer" direction="in" type="b"> | ||
23 | <doc:doc> | 23 | <doc:doc> | ||
24 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | 24 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | ||
25 | </doc:doc> | 25 | </doc:doc> | ||
26 | </arg> | 26 | </arg> | ||
27 | <arg name="shouldCopy" direction="in" type="b"> | ||||
28 | <doc:doc> | ||||
29 | <doc:summary>Whether to copy the image to clipboard.</doc:summary> | ||||
30 | </doc:doc> | ||||
31 | </arg> | ||||
32 | <arg name="shouldSave" direction="in" type="b"> | ||||
33 | <doc:doc> | ||||
34 | <doc:summary>Whether to save the image to file.</doc:summary> | ||||
35 | </doc:doc> | ||||
36 | </arg> | ||||
27 | <doc:doc> | 37 | <doc:doc> | ||
28 | <doc:description> | 38 | <doc:description> | ||
29 | <doc:para>Takes a full-screen screenshot.</doc:para> | 39 | <doc:para>Takes a full-screen screenshot.</doc:para> | ||
30 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | 40 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | ||
31 | </doc:description> | 41 | </doc:description> | ||
32 | </doc:doc> | 42 | </doc:doc> | ||
33 | </method> | 43 | </method> | ||
34 | 44 | | |||
35 | <method name="CurrentScreen"> | 45 | <method name="CurrentScreen"> | ||
36 | <arg name="includeMousePointer" direction="in" type="b"> | 46 | <arg name="includeMousePointer" direction="in" type="b"> | ||
37 | <doc:doc> | 47 | <doc:doc> | ||
38 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | 48 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | ||
39 | </doc:doc> | 49 | </doc:doc> | ||
40 | </arg> | 50 | </arg> | ||
51 | <arg name="shouldCopy" direction="in" type="b"> | ||||
52 | <doc:doc> | ||||
53 | <doc:summary>Whether to copy the image to clipboard.</doc:summary> | ||||
54 | </doc:doc> | ||||
55 | </arg> | ||||
56 | <arg name="shouldSave" direction="in" type="b"> | ||||
57 | <doc:doc> | ||||
58 | <doc:summary>Whether to save the image to file.</doc:summary> | ||||
59 | </doc:doc> | ||||
60 | </arg> | ||||
41 | <doc:doc> | 61 | <doc:doc> | ||
42 | <doc:description> | 62 | <doc:description> | ||
43 | <doc:para>Takes a screenshot of the current screen.</doc:para> | 63 | <doc:para>Takes a screenshot of the current screen.</doc:para> | ||
44 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | 64 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | ||
45 | </doc:description> | 65 | </doc:description> | ||
46 | </doc:doc> | 66 | </doc:doc> | ||
47 | </method> | 67 | </method> | ||
48 | 68 | | |||
49 | <method name="ActiveWindow"> | 69 | <method name="ActiveWindow"> | ||
50 | <arg name="includeWindowDecorations" direction="in" type="b"> | 70 | <arg name="includeWindowDecorations" direction="in" type="b"> | ||
51 | <doc:doc> | 71 | <doc:doc> | ||
52 | <doc:summary>Whether to include the window titlebars and frames.</doc:summary> | 72 | <doc:summary>Whether to include the window titlebars and frames.</doc:summary> | ||
53 | </doc:doc> | 73 | </doc:doc> | ||
54 | </arg> | 74 | </arg> | ||
75 | <arg name="shouldCopy" direction="in" type="b"> | ||||
76 | <doc:doc> | ||||
77 | <doc:summary>Whether to copy the image to clipboard.</doc:summary> | ||||
78 | </doc:doc> | ||||
79 | </arg> | ||||
80 | <arg name="shouldSave" direction="in" type="b"> | ||||
81 | <doc:doc> | ||||
82 | <doc:summary>Whether to save the image to file.</doc:summary> | ||||
83 | </doc:doc> | ||||
84 | </arg> | ||||
55 | <arg name="includeMousePointer" direction="in" type="b"> | 85 | <arg name="includeMousePointer" direction="in" type="b"> | ||
56 | <doc:doc> | 86 | <doc:doc> | ||
57 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | 87 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | ||
58 | </doc:doc> | 88 | </doc:doc> | ||
59 | </arg> | 89 | </arg> | ||
60 | <doc:doc> | 90 | <doc:doc> | ||
61 | <doc:description> | 91 | <doc:description> | ||
62 | <doc:para>Takes a screenshot of the window that currently has window focus.</doc:para> | 92 | <doc:para>Takes a screenshot of the window that currently has window focus.</doc:para> | ||
63 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | 93 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | ||
64 | </doc:description> | 94 | </doc:description> | ||
65 | </doc:doc> | 95 | </doc:doc> | ||
66 | </method> | 96 | </method> | ||
67 | 97 | | |||
68 | <method name="WindowUnderCursor"> | 98 | <method name="WindowUnderCursor"> | ||
69 | <arg name="includeWindowDecorations" direction="in" type="b"> | 99 | <arg name="includeWindowDecorations" direction="in" type="b"> | ||
70 | <doc:doc> | 100 | <doc:doc> | ||
71 | <doc:summary>Whether to include the window titlebars and frames.</doc:summary> | 101 | <doc:summary>Whether to include the window titlebars and frames.</doc:summary> | ||
rkflx: There were 5 DBus methods before, but you only add 3. In principle we should support all 5 also… | |||||
72 | </doc:doc> | 102 | </doc:doc> | ||
73 | </arg> | 103 | </arg> | ||
74 | <arg name="includeMousePointer" direction="in" type="b"> | 104 | <arg name="includeMousePointer" direction="in" type="b"> | ||
75 | <doc:doc> | 105 | <doc:doc> | ||
76 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | 106 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | ||
77 | </doc:doc> | 107 | </doc:doc> | ||
78 | </arg> | 108 | </arg> | ||
109 | <arg name="shouldCopy" direction="in" type="b"> | ||||
110 | <doc:doc> | ||||
111 | <doc:summary>Whether to copy the image to clipboard.</doc:summary> | ||||
112 | </doc:doc> | ||||
113 | </arg> | ||||
114 | <arg name="shouldSave" direction="in" type="b"> | ||||
115 | <doc:doc> | ||||
116 | <doc:summary>Whether to save the image to file.</doc:summary> | ||||
117 | </doc:doc> | ||||
118 | </arg> | ||||
79 | <doc:doc> | 119 | <doc:doc> | ||
80 | <doc:description> | 120 | <doc:description> | ||
81 | <doc:para>Takes a screenshot of the window that is currently under the mouse cursor.</doc:para> | 121 | <doc:para>Takes a screenshot of the window that is currently under the mouse cursor.</doc:para> | ||
82 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | 122 | <doc:para>If Spectacle was started via D-Bus, it takes a screenshot in the background without spawning the GUI and exits after the shot has been taken.</doc:para> | ||
83 | </doc:description> | 123 | </doc:description> | ||
84 | </doc:doc> | 124 | </doc:doc> | ||
85 | </method> | 125 | </method> | ||
86 | 126 | | |||
87 | <method name="RectangularRegion"> | 127 | <method name="RectangularRegion"> | ||
88 | <arg name="includeMousePointer" direction="in" type="b"> | 128 | <arg name="includeMousePointer" direction="in" type="b"> | ||
89 | <doc:doc> | 129 | <doc:doc> | ||
90 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | 130 | <doc:summary>Whether to include an image of the mouse pointer.</doc:summary> | ||
91 | </doc:doc> | 131 | </doc:doc> | ||
92 | </arg> | 132 | </arg> | ||
133 | <arg name="shouldCopy" direction="in" type="b"> | ||||
134 | <doc:doc> | ||||
135 | <doc:summary>Whether to copy the image to clipboard.</doc:summary> | ||||
136 | </doc:doc> | ||||
137 | </arg> | ||||
138 | <arg name="shouldSave" direction="in" type="b"> | ||||
139 | <doc:doc> | ||||
140 | <doc:summary>Whether to save the image to file.</doc:summary> | ||||
141 | </doc:doc> | ||||
142 | </arg> | ||||
93 | <doc:doc> | 143 | <doc:doc> | ||
94 | <doc:description> | 144 | <doc:description> | ||
95 | <doc:para>Takes a screenshot of a rectangular region.</doc:para> | 145 | <doc:para>Takes a screenshot of a rectangular region.</doc:para> | ||
96 | <doc:para>The user is prompted to select the region to capture. If Spectacle was started via D-Bus, it exits after the shot has been taken.</doc:para> | 146 | <doc:para>The user is prompted to select the region to capture. If Spectacle was started via D-Bus, it exits after the shot has been taken.</doc:para> | ||
97 | </doc:description> | 147 | </doc:description> | ||
98 | </doc:doc> | 148 | </doc:doc> | ||
99 | </method> | 149 | </method> | ||
100 | 150 | | |||
Show All 21 Lines |
There were 5 DBus methods before, but you only add 3. In principle we should support all 5 also for the clipboard case, even if we don't add shortcuts for them. Also, some users (e.g. in Bug 390415) want to save and copy simultaneously.
I wonder if it would be better to not add new methods and instead extend the existing ones with two optional parameters: method(..., saveToFile=true, copyToClipboard=false). Could you research whether DBus supports such optional parameters? We'd still have to ensure that existing users of the DBus API don't have to change their calls.