Merge lp:~timo-jyrinki/bamf/revert-474-0.2 into lp:bamf/0.2
- revert-474-0.2
- Merge into bamf-0.2
Proposed by
Timo Jyrinki
Status: | Merged |
---|---|
Approved by: | Łukasz Zemczak |
Approved revision: | 485 |
Merged at revision: | 485 |
Proposed branch: | lp:~timo-jyrinki/bamf/revert-474-0.2 |
Merge into: | lp:bamf/0.2 |
Diff against target: |
923 lines (+260/-285) 12 files modified
Makefile.am.marshal (+2/-2) configure.in (+1/-3) data/Makefile.am (+1/-1) lib/libbamf/Bamf-0.2.metadata (+0/-1) lib/libbamf/Makefile.am (+39/-44) lib/libbamf/bamf-application.c (+0/-43) lib/libbamf/bamf-application.h (+48/-5) lib/libbamf/bamf-matcher.c (+3/-117) lib/libbamf/bamf-matcher.h (+104/-0) lib/libbamf/bamf-view.c (+1/-62) lib/libbamf/bamf-view.h (+61/-0) lib/libbamf/bamf-window.c (+0/-7) |
To merge this branch: | bzr merge lp:~timo-jyrinki/bamf/revert-474-0.2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Łukasz Zemczak | Approve | ||
Review via email: mp+136417@code.launchpad.net |
Commit message
Revert r474 - preferable not to change dependencies in stable release (was: Enable introspection)
Description of the change
Revert r474 - preferable not to change dependencies in stable release (was: Enable introspection)
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Makefile.am.marshal' |
2 | --- Makefile.am.marshal 2012-07-01 18:12:17 +0000 |
3 | +++ Makefile.am.marshal 2012-11-27 13:41:43 +0000 |
4 | @@ -23,7 +23,7 @@ |
5 | EXTRA_DIST += $(glib_marshal_list) |
6 | |
7 | stamp-marshal: $(glib_marshal_list) |
8 | - $(AM_V_GEN)$(GLIB_GENMARSHAL) \ |
9 | + $(QUIET_GEN)$(GLIB_GENMARSHAL) \ |
10 | --prefix=$(glib_marshal_prefix) \ |
11 | --header \ |
12 | $(srcdir)/$(glib_marshal_list) > xgen-mh \ |
13 | @@ -35,7 +35,7 @@ |
14 | @true |
15 | |
16 | $(marshal_c): $(marshal_h) |
17 | - $(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \ |
18 | + $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \ |
19 | $(GLIB_GENMARSHAL) \ |
20 | --prefix=$(glib_marshal_prefix) \ |
21 | --body \ |
22 | |
23 | === modified file 'configure.in' |
24 | --- configure.in 2012-11-14 06:54:12 +0000 |
25 | +++ configure.in 2012-11-27 13:41:43 +0000 |
26 | @@ -9,7 +9,6 @@ |
27 | AC_CONFIG_HEADERS(config.h) |
28 | |
29 | AM_INIT_AUTOMAKE([foreign tar-pax]) |
30 | -AM_SILENT_RULES([yes]) |
31 | |
32 | AC_CONFIG_MACRO_DIR([m4]) |
33 | |
34 | @@ -106,7 +105,7 @@ |
35 | # GObject Introspection |
36 | ########################### |
37 | |
38 | -GOBJECT_INTROSPECTION_CHECK([0.10.2]) |
39 | +GOBJECT_INTROSPECTION_CHECK([0.6.7]) |
40 | |
41 | ########################### |
42 | # Vala API Generation |
43 | @@ -175,7 +174,6 @@ |
44 | |
45 | Build Environment |
46 | Install Prefix: ${prefix} |
47 | - Introspection: ${enable_introspection} |
48 | GTK+ Version: ${with_gtk} |
49 | Headless tests: ${enable_headless_tests} |
50 | |
51 | |
52 | === modified file 'data/Makefile.am' |
53 | --- data/Makefile.am 2012-07-01 18:12:17 +0000 |
54 | +++ data/Makefile.am 2012-11-27 13:41:43 +0000 |
55 | @@ -4,6 +4,6 @@ |
56 | EXTRA_DIST=org.ayatana.bamf.service.in |
57 | |
58 | org.ayatana.bamf.service: org.ayatana.bamf.service.in |
59 | - $(AM_V_GEN)sed "s,@LIBEXECDIR@,$(libexecdir)," $< > $@ |
60 | + sed "s,@LIBEXECDIR@,$(libexecdir)," $< > $@ |
61 | |
62 | CLEANFILES = org.ayatana.bamf.service |
63 | |
64 | === removed file 'lib/libbamf/Bamf-0.2.metadata' |
65 | --- lib/libbamf/Bamf-0.2.metadata 2012-07-01 18:38:29 +0000 |
66 | +++ lib/libbamf/Bamf-0.2.metadata 1970-01-01 00:00:00 +0000 |
67 | @@ -1,1 +0,0 @@ |
68 | -TabSource.show_tab skip |
69 | |
70 | === modified file 'lib/libbamf/Makefile.am' |
71 | --- lib/libbamf/Makefile.am 2012-11-27 11:39:42 +0000 |
72 | +++ lib/libbamf/Makefile.am 2012-11-27 13:41:43 +0000 |
73 | @@ -12,7 +12,6 @@ |
74 | EXTRA_DIST = |
75 | |
76 | include $(top_srcdir)/Makefile.am.marshal |
77 | --include $(INTROSPECTION_MAKEFILE) |
78 | |
79 | libbamf_sources = \ |
80 | bamf-application.c \ |
81 | @@ -82,7 +81,7 @@ |
82 | glib_marshal_prefix = bamf_marshal |
83 | |
84 | bamf-tab-source-glue.h: bamf-tab-source-glue.xml |
85 | - $(AM_V_GEN)$(DBUS_GLIB_BIN)/dbus-binding-tool --prefix=bamf_tab_source --mode=glib-server --output=$@ $< |
86 | + $(DBUS_GLIB_BIN)/dbus-binding-tool --prefix=bamf_tab_source --mode=glib-server --output=$@ $< |
87 | |
88 | BUILT_SOURCES += \ |
89 | bamf-tab-source-glue.h \ |
90 | @@ -106,51 +105,47 @@ |
91 | # GObject Introsepction |
92 | ######################### |
93 | |
94 | -INTROSPECTION_GIRS = |
95 | -INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) |
96 | -INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) |
97 | - |
98 | -if HAVE_INTROSPECTION |
99 | - |
100 | -introspection_sources = $(libbamf_la_SOURCES) |
101 | - |
102 | -Bamf-0.2.gir: libbamf.la |
103 | -Bamf_0_2_gir_INCLUDES = GObject-2.0 GLib-2.0 |
104 | -Bamf_0_2_gir_CFLAGS = \ |
105 | - --c-include='libbamf/libbamf.h' \ |
106 | - $(DBUS_CFLAGS) \ |
107 | - -I$(top_srcdir)/lib \ |
108 | - -I$(top_builddir)/lib \ |
109 | - $(NULL) |
110 | -Bamf_0_2_gir_LIBS = libbamf.la |
111 | -Bamf_0_2_gir_FILES = $(introspection_sources) |
112 | -Bamf_0_2_gir_EXPORT_PACKAGES = libbamf$(VER) |
113 | - |
114 | -INTROSPECTION_GIRS += Bamf-0.2.gir |
115 | - |
116 | -girdir = $(datadir)/gir-1.0 |
117 | -dist_gir_DATA = $(INTROSPECTION_GIRS) |
118 | - |
119 | -typelibdir = $(libdir)/girepository-1.0 |
120 | -typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) |
121 | - |
122 | -CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) |
123 | - |
124 | -endif |
125 | +#-include $(INTROSPECTION_MAKEFILE) |
126 | +#INTROSPECTION_GIRS = |
127 | +#INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) |
128 | +#INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) |
129 | + |
130 | +#if HAVE_INTROSPECTION |
131 | + |
132 | +#introspection_sources = $(library_include_HEADERS) |
133 | + |
134 | +#Bamf-0.2.gir: libbamf.la |
135 | +#Bamf_0_2_gir_INCLUDES = \ |
136 | +# GObject-2.0 |
137 | +#Bamf_0_2_gir_CFLAGS = --c-include='libbamf/libbamf.h' $(LIBBAMF_CFLAGS) -I$(top_srcdir)/lib -I$(top_builddir)/lib |
138 | +#Bamf_0_2_gir_LIBS = libbamf.la |
139 | +#Bamf_0_2_gir_FILES = $(introspection_sources) |
140 | +# |
141 | +#INTROSPECTION_GIRS += Bamf-0.2.gir |
142 | +# |
143 | +#girdir = $(datadir)/gir-1.0 |
144 | +#dist_gir_DATA = $(INTROSPECTION_GIRS) |
145 | + |
146 | +#typelibdir = $(libdir)/girepository-1.0 |
147 | +#typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) |
148 | + |
149 | +#CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) |
150 | + |
151 | +#endif |
152 | |
153 | ######################### |
154 | # VAPI Files |
155 | ######################### |
156 | |
157 | -if HAVE_INTROSPECTION |
158 | - |
159 | -vapidir = $(datadir)/vala/vapi |
160 | -vapi_DATA = libbamf$(VER).vapi |
161 | - |
162 | -$(vapi_DATA): $(INTROSPECTION_GIRS) |
163 | - $(AM_V_GEN)$(VALA_API_GEN) --library=$(@:.vapi=) $< |
164 | - |
165 | -DISTCLEANFILES += $(vapi_DATA) |
166 | - |
167 | -endif |
168 | +#if HAVE_INTROSPECTION |
169 | + |
170 | +#vapidir = $(datadir)/vala/vapi |
171 | +#vapi_DATA = Bamf-0.2.vapi |
172 | + |
173 | +#Bamf-0.2.vapi: Bamf-0.2.gir |
174 | +# $(VALA_API_GEN) --library=Bamf-0.2 $< |
175 | + |
176 | +#CLEANFILES += $(vapi_DATA) |
177 | + |
178 | +#endif |
179 | |
180 | |
181 | === modified file 'lib/libbamf/bamf-application.c' |
182 | --- lib/libbamf/bamf-application.c 2012-11-27 11:39:42 +0000 |
183 | +++ lib/libbamf/bamf-application.c 2012-11-27 13:41:43 +0000 |
184 | @@ -71,15 +71,6 @@ |
185 | int show_stubs; |
186 | }; |
187 | |
188 | -/** |
189 | - * bamf_application_get_desktop_file: |
190 | - * @application: a #BamfApplication |
191 | - * |
192 | - * Used to fetch the path to the .desktop file associated with the passed application. If |
193 | - * none exists, the result is NULL. |
194 | - * |
195 | - * Returns: A string representing the path to the desktop file. |
196 | - */ |
197 | const gchar * |
198 | bamf_application_get_desktop_file (BamfApplication *application) |
199 | { |
200 | @@ -119,16 +110,6 @@ |
201 | return file; |
202 | } |
203 | |
204 | -/** |
205 | - * bamf_application_get_applicaton_type: |
206 | - * @application: a #BamfApplication |
207 | - * |
208 | - * Used to determine what type of application a .desktop file represents. Current values are: |
209 | - * "system" : A normal application, like firefox or evolution |
210 | - * "web" : A web application, like facebook or twitter |
211 | - * |
212 | - * Returns: A string |
213 | - */ |
214 | const gchar * |
215 | bamf_application_get_application_type (BamfApplication *application) |
216 | { |
217 | @@ -162,14 +143,6 @@ |
218 | return type; |
219 | } |
220 | |
221 | -/** |
222 | - * bamf_application_get_xids: |
223 | - * @application: a #BamfApplication |
224 | - * |
225 | - * Used to fetch all #BamfWindow's xids associated with the passed #BamfApplication. |
226 | - * |
227 | - * Returns: (element-type guint) (transfer full): An array of xids. |
228 | - */ |
229 | GArray * |
230 | bamf_application_get_xids (BamfApplication *application) |
231 | { |
232 | @@ -199,14 +172,6 @@ |
233 | return xids; |
234 | } |
235 | |
236 | -/** |
237 | - * bamf_application_get_windows: |
238 | - * @application: a #BamfApplication |
239 | - * |
240 | - * Used to fetch all #BamfWindow's associated with the passed #BamfApplication. |
241 | - * |
242 | - * Returns: (element-type Bamf.Window) (transfer container): A list of #BamfWindow's. |
243 | - */ |
244 | GList * |
245 | bamf_application_get_windows (BamfApplication *application) |
246 | { |
247 | @@ -232,14 +197,6 @@ |
248 | return windows; |
249 | } |
250 | |
251 | -/** |
252 | - * bamf_application_get_show_menu_stubs: |
253 | - * @application: a #BamfApplication |
254 | - * |
255 | - * Used to discover whether the application wants menu stubs shown. |
256 | - * |
257 | - * Returns: Whether the stubs should be shown. |
258 | - */ |
259 | gboolean |
260 | bamf_application_get_show_menu_stubs (BamfApplication * application) |
261 | { |
262 | |
263 | === modified file 'lib/libbamf/bamf-application.h' |
264 | --- lib/libbamf/bamf-application.h 2012-07-01 18:13:55 +0000 |
265 | +++ lib/libbamf/bamf-application.h 2012-11-27 13:41:43 +0000 |
266 | @@ -75,15 +75,58 @@ |
267 | |
268 | GType bamf_application_get_type (void) G_GNUC_CONST; |
269 | |
270 | +/** |
271 | + * bamf_application_get_applicaton_type: |
272 | + * @application: a #BamfApplication |
273 | + * |
274 | + * Used to determine what type of application a .desktop file represents. Current values are: |
275 | + * "system" : A normal application, like firefox or evolution |
276 | + * "web" : A web application, like facebook or twitter |
277 | + * |
278 | + * Returns: A string |
279 | + */ |
280 | const gchar * bamf_application_get_application_type (BamfApplication *application); |
281 | |
282 | +/** |
283 | + * bamf_application_get_desktop_file: |
284 | + * @application: a #BamfApplication |
285 | + * |
286 | + * Used to fetch the path to the .desktop file associated with the passed application. If |
287 | + * none exists, the result is NULL. |
288 | + * |
289 | + * Returns: A string representing the path to the desktop file. |
290 | + */ |
291 | const gchar * bamf_application_get_desktop_file (BamfApplication *application); |
292 | |
293 | -GList * bamf_application_get_windows (BamfApplication *application); |
294 | - |
295 | -GArray * bamf_application_get_xids (BamfApplication *application); |
296 | - |
297 | -gboolean bamf_application_get_show_menu_stubs (BamfApplication *application); |
298 | +/** |
299 | + * bamf_application_get_windows: |
300 | + * @application: a #BamfApplication |
301 | + * |
302 | + * Used to fetch all #BamfWindow's associated with the passed #BamfApplication. |
303 | + * |
304 | + * Returns: (element-type Bamf.Window) (transfer container): A list of #BamfWindow's. |
305 | + */ |
306 | +GList * bamf_application_get_windows (BamfApplication *application); |
307 | + |
308 | +/** |
309 | + * bamf_application_get_xids: |
310 | + * @application: a #BamfApplication |
311 | + * |
312 | + * Used to fetch all #BamfWindow's xids associated with the passed #BamfApplication. |
313 | + * |
314 | + * Returns: (transfer full): An array of xids. |
315 | + */ |
316 | +GArray * bamf_application_get_xids (BamfApplication *application); |
317 | + |
318 | +/** |
319 | + * bamf_application_get_show_stubs: |
320 | + * @application: a #BamfApplication |
321 | + * |
322 | + * Used to discover whether the application wants menu stubs shown. |
323 | + * |
324 | + * Returns: Whether the stubs should be shown. |
325 | + */ |
326 | +gboolean bamf_application_get_show_menu_stubs (BamfApplication *application); |
327 | |
328 | G_END_DECLS |
329 | |
330 | |
331 | === modified file 'lib/libbamf/bamf-matcher.c' |
332 | --- lib/libbamf/bamf-matcher.c 2012-11-27 11:39:42 +0000 |
333 | +++ lib/libbamf/bamf-matcher.c 2012-11-27 13:41:43 +0000 |
334 | @@ -346,14 +346,6 @@ |
335 | /* |
336 | * Public Methods |
337 | */ |
338 | - |
339 | -/** |
340 | - * bamf_matcher_get_default: |
341 | - * |
342 | - * Returns the default matcher. This matcher is owned by bamf and shared between other callers. |
343 | - * |
344 | - * Returns: (transfer full): A new #BamfMatcher |
345 | - */ |
346 | BamfMatcher * |
347 | bamf_matcher_get_default (void) |
348 | { |
349 | @@ -363,14 +355,6 @@ |
350 | return (default_matcher = g_object_new (BAMF_TYPE_MATCHER, NULL)); |
351 | } |
352 | |
353 | -/** |
354 | - * bamf_matcher_get_active_application: |
355 | - * @matcher: a #BamfMatcher |
356 | - * |
357 | - * Used to fetch the active #BamfApplication. |
358 | - * |
359 | - * Returns: (transfer none): The active #BamfApplication. |
360 | - */ |
361 | BamfApplication * |
362 | bamf_matcher_get_active_application (BamfMatcher *matcher) |
363 | { |
364 | @@ -413,14 +397,6 @@ |
365 | return BAMF_APPLICATION (view); |
366 | } |
367 | |
368 | -/** |
369 | - * bamf_matcher_get_active_window: |
370 | - * @matcher: a #BamfMatcher |
371 | - * |
372 | - * Used to fetch the active #BamfWindow. |
373 | - * |
374 | - * Returns: (transfer none): The active #BamfWindow. |
375 | - */ |
376 | BamfWindow * |
377 | bamf_matcher_get_active_window (BamfMatcher *matcher) |
378 | { |
379 | @@ -463,36 +439,16 @@ |
380 | return BAMF_WINDOW (view); |
381 | } |
382 | |
383 | -/** |
384 | - * bamf_matcher_get_application_for_window: |
385 | - * @matcher: a #BamfMatcher |
386 | - * @window: The window to look for |
387 | - * |
388 | - * Used to fetch the #BamfApplication containing the passed window. |
389 | - * |
390 | - * Returns: (transfer none): The #BamfApplication representing the xid passed, or NULL if none exists. |
391 | - */ |
392 | +/* Looks up the window's XID and calls the application_for_xid |
393 | + function just below here. */ |
394 | BamfApplication * |
395 | bamf_matcher_get_application_for_window (BamfMatcher *matcher, |
396 | BamfWindow *window) |
397 | { |
398 | - /* Looks up the window's XID and calls the application_for_xid |
399 | - function just below here. */ |
400 | - |
401 | g_return_val_if_fail(BAMF_IS_WINDOW(window), NULL); |
402 | - return bamf_matcher_get_application_for_xid (matcher, |
403 | - bamf_window_get_xid(window)); |
404 | + return bamf_matcher_get_application_for_xid (matcher, bamf_window_get_xid(window)); |
405 | } |
406 | |
407 | -/** |
408 | - * bamf_matcher_get_application_for_xid: |
409 | - * @matcher: a #BamfMatcher |
410 | - * @xid: The XID to search for |
411 | - * |
412 | - * Used to fetch the #BamfApplication containing the passed xid. |
413 | - * |
414 | - * Returns: (transfer none): The #BamfApplication representing the xid passed, or NULL if none exists. |
415 | - */ |
416 | BamfApplication * |
417 | bamf_matcher_get_application_for_xid (BamfMatcher *matcher, |
418 | guint32 xid) |
419 | @@ -566,17 +522,6 @@ |
420 | return running; |
421 | } |
422 | |
423 | -/** |
424 | - * bamf_matcher_get_applications: |
425 | - * @matcher: a #BamfMatcher |
426 | - * |
427 | - * Used to fetch all #BamfApplication's running or not. Application authors who wish to only |
428 | - * see running applications should use bamf_matcher_get_running_applications instead. The reason |
429 | - * this method is needed is bamf will occasionally track applications which are not currently |
430 | - * running for nefarious purposes. |
431 | - * |
432 | - * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. |
433 | - */ |
434 | GList * |
435 | bamf_matcher_get_applications (BamfMatcher *matcher) |
436 | { |
437 | @@ -620,14 +565,6 @@ |
438 | return result; |
439 | } |
440 | |
441 | -/** |
442 | - * bamf_matcher_get_windows: |
443 | - * @matcher: a #BamfMatcher |
444 | - * |
445 | - * Used to fetch all windows that BAMF knows about. |
446 | - * |
447 | - * Returns: (element-type Bamf.View) (transfer container): A list of windows. |
448 | - */ |
449 | GList * |
450 | bamf_matcher_get_windows (BamfMatcher *matcher) |
451 | { |
452 | @@ -671,16 +608,6 @@ |
453 | return result; |
454 | } |
455 | |
456 | -/** |
457 | - * bamf_matcher_get_window_stack_for_monitor: |
458 | - * @matcher: a #BamfMatcher |
459 | - * @monitor: the monitor you want the stack from, negative value to get all |
460 | - * |
461 | - * Used to fetch all windows that BAMF knows about in the requested screen, |
462 | - * in stacking bottom-to-top order. |
463 | - * |
464 | - * Returns: (element-type Bamf.View) (transfer container): A list of #BamfWindow. |
465 | - */ |
466 | GList * |
467 | bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, gint monitor) |
468 | { |
469 | @@ -726,14 +653,6 @@ |
470 | return result; |
471 | } |
472 | |
473 | -/** |
474 | - * bamf_matcher_register_favorites: |
475 | - * @matcher: a #BamfMatcher |
476 | - * @favorites: an array of strings, each containing an absolute path to a .desktop file |
477 | - * |
478 | - * Used to effect how bamf performs matching. Desktop files passed to this method will |
479 | - * be prefered by bamf to system desktop files. |
480 | - */ |
481 | void |
482 | bamf_matcher_register_favorites (BamfMatcher *matcher, |
483 | const gchar **favorites) |
484 | @@ -751,14 +670,6 @@ |
485 | G_TYPE_INVALID); |
486 | } |
487 | |
488 | -/** |
489 | - * bamf_matcher_get_running_applications: |
490 | - * @matcher: a #BamfMatcher |
491 | - * |
492 | - * Used to fetch all #BamfApplication's which are running. |
493 | - * |
494 | - * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. |
495 | - */ |
496 | GList * |
497 | bamf_matcher_get_running_applications (BamfMatcher *matcher) |
498 | { |
499 | @@ -802,14 +713,6 @@ |
500 | return result; |
501 | } |
502 | |
503 | -/** |
504 | - * bamf_matcher_get_tabs: |
505 | - * @matcher: a #BamfMatcher |
506 | - * |
507 | - * Used to fetch all #BamfView's representing tabs. Currently unused. |
508 | - * |
509 | - * Returns: (element-type Bamf.View) (transfer container): A list of #BamfViews's. |
510 | - */ |
511 | GList * |
512 | bamf_matcher_get_tabs (BamfMatcher *matcher) |
513 | { |
514 | @@ -817,15 +720,6 @@ |
515 | return NULL; |
516 | } |
517 | |
518 | -/** |
519 | - * bamf_matcher_get_xids_for_application: |
520 | - * @matcher: a #BamfMatcher |
521 | - * |
522 | - * Used to fetch all xid's associated with an application. Useful for performing window |
523 | - * |
524 | - * |
525 | - * Returns: (element-type guint32) (transfer full): A list of xids. |
526 | - */ |
527 | GArray * |
528 | bamf_matcher_get_xids_for_application (BamfMatcher *matcher, |
529 | const gchar *application) |
530 | @@ -834,14 +728,6 @@ |
531 | return NULL; |
532 | } |
533 | |
534 | -/** |
535 | - * bamf_matcher_get_application_for_desktop_file: |
536 | - * @matcher: a #BamfMatcher |
537 | - * @desktop_file_path: Path to the desktop file |
538 | - * @create_if_not_found: Create a #BamfApplication if one isn't found |
539 | - * |
540 | - * Returns: (transfer none): A #BamfApplication for given desktop file. |
541 | - */ |
542 | BamfApplication * |
543 | bamf_matcher_get_application_for_desktop_file (BamfMatcher *matcher, |
544 | const gchar *desktop_file_path, |
545 | |
546 | === modified file 'lib/libbamf/bamf-matcher.h' |
547 | --- lib/libbamf/bamf-matcher.h 2012-07-01 18:13:55 +0000 |
548 | +++ lib/libbamf/bamf-matcher.h 2012-11-27 13:41:43 +0000 |
549 | @@ -76,34 +76,138 @@ |
550 | |
551 | GType bamf_matcher_get_type (void) G_GNUC_CONST; |
552 | |
553 | +/** |
554 | + * bamf_matcher_get_default: |
555 | + * @matcher: a #BamfMatcher |
556 | + * |
557 | + * Returns the default matcher. This matcher is owned by bamf and shared between other callers. |
558 | + * |
559 | + * Returns: (transfer none): A new #BamfMatcher |
560 | + */ |
561 | BamfMatcher * bamf_matcher_get_default (void); |
562 | |
563 | +/** |
564 | + * bamf_matcher_get_active_application: |
565 | + * @matcher: a #BamfMatcher |
566 | + * |
567 | + * Used to fetch the active #BamfApplication. |
568 | + * |
569 | + * Returns: (transfer none): The active #BamfApplication. |
570 | + */ |
571 | BamfApplication * bamf_matcher_get_active_application (BamfMatcher *matcher); |
572 | |
573 | +/** |
574 | + * bamf_matcher_get_active_window: |
575 | + * @matcher: a #BamfMatcher |
576 | + * |
577 | + * Used to fetch the active #BamfWindow. |
578 | + * |
579 | + * Returns: (transfer none): The active #BamfWindow. |
580 | + */ |
581 | BamfWindow * bamf_matcher_get_active_window (BamfMatcher *matcher); |
582 | |
583 | +/** |
584 | + * bamf_matcher_get_application_for_xid: |
585 | + * @matcher: a #BamfMatcher |
586 | + * @xid: The XID to search for |
587 | + * |
588 | + * Used to fetch the #BamfApplication containing the passed xid. |
589 | + * |
590 | + * Returns: (transfer container): The #BamfApplication representing the xid passed, or NULL if none exists. |
591 | + */ |
592 | BamfApplication * bamf_matcher_get_application_for_xid (BamfMatcher *matcher, |
593 | guint32 xid); |
594 | +/** |
595 | + * bamf_matcher_get_application_for_window: |
596 | + * @matcher: a #BamfMatcher |
597 | + * @window: The window to look for |
598 | + * |
599 | + * Used to fetch the #BamfApplication containing the passed window. |
600 | + * |
601 | + * Returns: (transfer container): The #BamfApplication representing the xid passed, or NULL if none exists. |
602 | + */ |
603 | BamfApplication * bamf_matcher_get_application_for_window (BamfMatcher *matcher, |
604 | BamfWindow *window); |
605 | |
606 | gboolean bamf_matcher_application_is_running (BamfMatcher *matcher, |
607 | const gchar *application); |
608 | |
609 | +/** |
610 | + * bamf_matcher_get_applications: |
611 | + * @matcher: a #BamfMatcher |
612 | + * |
613 | + * Used to fetch all #BamfApplication's running or not. Application authors who wish to only |
614 | + * see running applications should use bamf_matcher_get_running_applications instead. The reason |
615 | + * this method is needed is bamf will occasionally track applications which are not currently |
616 | + * running for nefarious purposes. |
617 | + * |
618 | + * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. |
619 | + */ |
620 | GList * bamf_matcher_get_applications (BamfMatcher *matcher); |
621 | |
622 | +/** |
623 | + * bamf_matcher_register_favorites: |
624 | + * @matcher: a #BamfMatcher |
625 | + * @favorites: an array of strings, each containing an absolute path to a .desktop file |
626 | + * |
627 | + * Used to effect how bamf performs matching. Desktop files passed to this method will |
628 | + * be prefered by bamf to system desktop files. |
629 | + */ |
630 | void bamf_matcher_register_favorites (BamfMatcher *matcher, |
631 | const gchar **favorites); |
632 | |
633 | +/** |
634 | + * bamf_matcher_get_running_applications: |
635 | + * @matcher: a #BamfMatcher |
636 | + * |
637 | + * Used to fetch all #BamfApplication's which are running. |
638 | + * |
639 | + * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's. |
640 | + */ |
641 | GList * bamf_matcher_get_running_applications (BamfMatcher *matcher); |
642 | |
643 | +/** |
644 | + * bamf_matcher_get_tabs: |
645 | + * @matcher: a #BamfMatcher |
646 | + * |
647 | + * Used to fetch all #BamfView's representing tabs. Currently unused. |
648 | + * |
649 | + * Returns: (element-type Bamf.View) (transfer container): A list of #BamfViews's. |
650 | + */ |
651 | GList * bamf_matcher_get_tabs (BamfMatcher *matcher); |
652 | |
653 | +/** |
654 | + * bamf_matcher_get_applications: |
655 | + * @matcher: a #BamfMatcher |
656 | + * |
657 | + * Used to fetch all xid's associated with an application. Useful for performing window |
658 | + * |
659 | + * |
660 | + * Returns: (element-type guint32) (transfer none): A list of xids. |
661 | + */ |
662 | GArray * bamf_matcher_get_xids_for_application (BamfMatcher *matcher, |
663 | const gchar *application); |
664 | |
665 | +/** |
666 | + * bamf_matcher_get_windows: |
667 | + * @matcher: a #BamfMatcher |
668 | + * |
669 | + * Used to fetch all windows that BAMF knows about. |
670 | + * |
671 | + * Returns: (element-type Bamf.View) (transfer container): A list of windows. |
672 | + */ |
673 | GList * bamf_matcher_get_windows (BamfMatcher *matcher); |
674 | |
675 | +/** |
676 | + * bamf_matcher_get_window_stack_for_monitor: |
677 | + * @matcher: a #BamfMatcher |
678 | + * @monitor: the monitor you want the stack from, negative value to get all |
679 | + * |
680 | + * Used to fetch all windows that BAMF knows about in the requested screen, |
681 | + * in stacking bottom-to-top order. |
682 | + * |
683 | + * Returns: (element-type Bamf.View) (transfer container): A list of #BamfWindow. |
684 | + */ |
685 | GList * bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, |
686 | gint monitor); |
687 | |
688 | |
689 | === modified file 'lib/libbamf/bamf-view.c' |
690 | --- lib/libbamf/bamf-view.c 2012-11-27 11:39:42 +0000 |
691 | +++ lib/libbamf/bamf-view.c 2012-11-27 13:41:43 +0000 |
692 | @@ -142,15 +142,6 @@ |
693 | return priv->set_flags & flag; |
694 | } |
695 | |
696 | -/** |
697 | - * bamf_view_get_children: |
698 | - * @view: a #BamfView |
699 | - * |
700 | - * Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards. |
701 | - * |
702 | - * Returns: (element-type Bamf.View) (transfer container): Returns a list of #BamfView which must be |
703 | - * freed after usage. Elements of the list are owned by bamf and should not be unreffed. |
704 | - */ |
705 | GList * |
706 | bamf_view_get_children (BamfView *view) |
707 | { |
708 | @@ -233,12 +224,6 @@ |
709 | return result; |
710 | } |
711 | |
712 | -/** |
713 | - * bamf_view_is_closed: |
714 | - * @view: a #BamfView |
715 | - * |
716 | - * Determines if the view is closed or not. |
717 | - */ |
718 | gboolean |
719 | bamf_view_is_closed (BamfView *view) |
720 | { |
721 | @@ -247,12 +232,6 @@ |
722 | return view->priv->is_closed; |
723 | } |
724 | |
725 | -/** |
726 | - * bamf_view_is_active: |
727 | - * @view: a #BamfView |
728 | - * |
729 | - * Determines if the view is currently active and focused by the user. Useful for an active window indicator. |
730 | - */ |
731 | gboolean |
732 | bamf_view_is_active (BamfView *view) |
733 | { |
734 | @@ -265,14 +244,7 @@ |
735 | |
736 | } |
737 | |
738 | -/** |
739 | - * bamf_view_user_visible: |
740 | - * @view: a #BamfView |
741 | - * |
742 | - * Returns a boolean useful for determining if a particular view is "user visible". User visible |
743 | - * is a concept relating to whether or not a window should be shown in a launcher tasklist. |
744 | - */ |
745 | -gboolean |
746 | +gboolean |
747 | bamf_view_user_visible (BamfView *self) |
748 | { |
749 | g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE); |
750 | @@ -281,12 +253,6 @@ |
751 | |
752 | } |
753 | |
754 | -/** |
755 | - * bamf_view_is_running: |
756 | - * @view: a #BamfView |
757 | - * |
758 | - * Determines if the view is currently running. Useful for a running window indicator. |
759 | - */ |
760 | gboolean |
761 | bamf_view_is_running (BamfView *self) |
762 | { |
763 | @@ -298,12 +264,6 @@ |
764 | return bamf_view_get_boolean (self, "IsRunning", BAMF_VIEW_RUNNING_FLAG); |
765 | } |
766 | |
767 | -/** |
768 | - * bamf_view_is_urgent: |
769 | - * @view: a #BamfView |
770 | - * |
771 | - * Determines if the view is currently requiring attention. Useful for a running window indicator. |
772 | - */ |
773 | gboolean |
774 | bamf_view_is_urgent (BamfView *self) |
775 | { |
776 | @@ -376,12 +336,6 @@ |
777 | g_object_unref (view); |
778 | } |
779 | |
780 | -/** |
781 | - * bamf_view_get_icon: |
782 | - * @view: a #BamfView |
783 | - * |
784 | - * Gets the icon of a view. This icon is used to visually represent the view. |
785 | - */ |
786 | gchar * |
787 | bamf_view_get_icon (BamfView *self) |
788 | { |
789 | @@ -420,12 +374,6 @@ |
790 | return icon; |
791 | } |
792 | |
793 | -/** |
794 | - * bamf_view_get_name: |
795 | - * @view: a #BamfView |
796 | - * |
797 | - * Gets the name of a view. This name is a short name best used to represent the view with text. |
798 | - */ |
799 | gchar * |
800 | bamf_view_get_name (BamfView *self) |
801 | { |
802 | @@ -473,15 +421,6 @@ |
803 | return FALSE; |
804 | } |
805 | |
806 | -/** |
807 | - * bamf_view_get_view_type: |
808 | - * @view: a #BamfView |
809 | - * |
810 | - * The view type of a window is a short string used to represent all views of the same class. These |
811 | - * descriptions should not be used to do casting as they are not considered stable. |
812 | - * |
813 | - * Virtual: view_type |
814 | - */ |
815 | const gchar * |
816 | bamf_view_get_view_type (BamfView *self) |
817 | { |
818 | |
819 | === modified file 'lib/libbamf/bamf-view.h' |
820 | --- lib/libbamf/bamf-view.h 2012-07-01 18:13:55 +0000 |
821 | +++ lib/libbamf/bamf-view.h 2012-11-27 13:41:43 +0000 |
822 | @@ -106,22 +106,83 @@ |
823 | |
824 | GType bamf_view_get_type (void) G_GNUC_CONST; |
825 | |
826 | +/** |
827 | + * bamf_view_get_children: |
828 | + * @view: a #BamfView |
829 | + * |
830 | + * Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards. |
831 | + * |
832 | + * Returns: (element-type Bamf.View) (transfer container): Returns a list of #BamfView which must be |
833 | + * freed after usage. Elements of the list are owned by bamf and should not be unreffed. |
834 | + */ |
835 | GList * bamf_view_get_children (BamfView *view); |
836 | |
837 | +/** |
838 | + * bamf_view_is_active: |
839 | + * @view: a #BamfView |
840 | + * |
841 | + * Determines if the view is closed or not. |
842 | + */ |
843 | gboolean bamf_view_is_closed (BamfView *view); |
844 | |
845 | +/** |
846 | + * bamf_view_is_active: |
847 | + * @view: a #BamfView |
848 | + * |
849 | + * Determines if the view is currently active and focused by the user. Useful for an active window indicator. |
850 | + */ |
851 | gboolean bamf_view_is_active (BamfView *view); |
852 | |
853 | +/** |
854 | + * bamf_view_is_running: |
855 | + * @view: a #BamfView |
856 | + * |
857 | + * Determines if the view is currently running. Useful for a running window indicator. |
858 | + */ |
859 | gboolean bamf_view_is_running (BamfView *view); |
860 | |
861 | +/** |
862 | + * bamf_view_is_running: |
863 | + * @view: a #BamfView |
864 | + * |
865 | + * Determines if the view is currently requiring attention. Useful for a running window indicator. |
866 | + */ |
867 | gboolean bamf_view_is_urgent (BamfView *view); |
868 | |
869 | +/** |
870 | + * bamf_view_get_name: |
871 | + * @view: a #BamfView |
872 | + * |
873 | + * Gets the name of a view. This name is a short name best used to represent the view with text. |
874 | + */ |
875 | gchar * bamf_view_get_name (BamfView *view); |
876 | |
877 | +/** |
878 | + * bamf_view_get_icon: |
879 | + * @view: a #BamfView |
880 | + * |
881 | + * Gets the icon of a view. This icon is used to visually represent the view. |
882 | + */ |
883 | gchar * bamf_view_get_icon (BamfView *view); |
884 | |
885 | +/** |
886 | + * bamf_view_user_visible: |
887 | + * @view: a #BamfView |
888 | + * |
889 | + * Returns a boolean useful for determining if a particular view is "user visible". User visible |
890 | + * is a concept relating to whether or not a window should be shown in a launcher tasklist. |
891 | + */ |
892 | gboolean bamf_view_user_visible (BamfView *view); |
893 | |
894 | +/** |
895 | + * bamf_view_get_view_type: |
896 | + * @view: a #BamfView |
897 | + * |
898 | + * The view type of a window is a short string used to represent all views of the same class. These |
899 | + * descriptions should not be used to do casting as they are not considered stable. |
900 | + * |
901 | + * Returns: (transfer full): A gchar* |
902 | + */ |
903 | const gchar * bamf_view_get_view_type (BamfView *view); |
904 | |
905 | void bamf_view_set_sticky (BamfView *view, gboolean value); |
906 | |
907 | === modified file 'lib/libbamf/bamf-window.c' |
908 | --- lib/libbamf/bamf-window.c 2012-11-27 11:39:42 +0000 |
909 | +++ lib/libbamf/bamf-window.c 2012-11-27 13:41:43 +0000 |
910 | @@ -75,13 +75,6 @@ |
911 | return self->priv->last_active; |
912 | } |
913 | |
914 | -/** |
915 | - * bamf_window_get_transient: |
916 | - * @self: a #BamfWindow |
917 | - * |
918 | - * Returns: (transfer none) (nullable): A transient for this #BamfWindow. |
919 | - */ |
920 | - |
921 | BamfWindow * bamf_window_get_transient (BamfWindow *self) |
922 | { |
923 | BamfWindowPrivate *priv; |
Looks good to me. If distro says it needs reverting, let be it!