Merge lp:~timo-jyrinki/bamf/revert-474-0.2 into lp: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
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.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Looks good to me. If distro says it needs reverting, let be it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.am.marshal'
--- Makefile.am.marshal 2012-07-01 18:12:17 +0000
+++ Makefile.am.marshal 2012-11-27 13:41:43 +0000
@@ -23,7 +23,7 @@
23EXTRA_DIST += $(glib_marshal_list)23EXTRA_DIST += $(glib_marshal_list)
2424
25stamp-marshal: $(glib_marshal_list)25stamp-marshal: $(glib_marshal_list)
26 $(AM_V_GEN)$(GLIB_GENMARSHAL) \26 $(QUIET_GEN)$(GLIB_GENMARSHAL) \
27 --prefix=$(glib_marshal_prefix) \27 --prefix=$(glib_marshal_prefix) \
28 --header \28 --header \
29 $(srcdir)/$(glib_marshal_list) > xgen-mh \29 $(srcdir)/$(glib_marshal_list) > xgen-mh \
@@ -35,7 +35,7 @@
35 @true35 @true
3636
37$(marshal_c): $(marshal_h)37$(marshal_c): $(marshal_h)
38 $(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \38 $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \
39 $(GLIB_GENMARSHAL) \39 $(GLIB_GENMARSHAL) \
40 --prefix=$(glib_marshal_prefix) \40 --prefix=$(glib_marshal_prefix) \
41 --body \41 --body \
4242
=== modified file 'configure.in'
--- configure.in 2012-11-14 06:54:12 +0000
+++ configure.in 2012-11-27 13:41:43 +0000
@@ -9,7 +9,6 @@
9AC_CONFIG_HEADERS(config.h)9AC_CONFIG_HEADERS(config.h)
1010
11AM_INIT_AUTOMAKE([foreign tar-pax])11AM_INIT_AUTOMAKE([foreign tar-pax])
12AM_SILENT_RULES([yes])
1312
14AC_CONFIG_MACRO_DIR([m4])13AC_CONFIG_MACRO_DIR([m4])
1514
@@ -106,7 +105,7 @@
106# GObject Introspection105# GObject Introspection
107###########################106###########################
108107
109GOBJECT_INTROSPECTION_CHECK([0.10.2])108GOBJECT_INTROSPECTION_CHECK([0.6.7])
110109
111###########################110###########################
112# Vala API Generation111# Vala API Generation
@@ -175,7 +174,6 @@
175174
176 Build Environment175 Build Environment
177 Install Prefix: ${prefix}176 Install Prefix: ${prefix}
178 Introspection: ${enable_introspection}
179 GTK+ Version: ${with_gtk}177 GTK+ Version: ${with_gtk}
180 Headless tests: ${enable_headless_tests}178 Headless tests: ${enable_headless_tests}
181179
182180
=== modified file 'data/Makefile.am'
--- data/Makefile.am 2012-07-01 18:12:17 +0000
+++ data/Makefile.am 2012-11-27 13:41:43 +0000
@@ -4,6 +4,6 @@
4EXTRA_DIST=org.ayatana.bamf.service.in4EXTRA_DIST=org.ayatana.bamf.service.in
55
6org.ayatana.bamf.service: org.ayatana.bamf.service.in6org.ayatana.bamf.service: org.ayatana.bamf.service.in
7 $(AM_V_GEN)sed "s,@LIBEXECDIR@,$(libexecdir)," $< > $@7 sed "s,@LIBEXECDIR@,$(libexecdir)," $< > $@
88
9CLEANFILES = org.ayatana.bamf.service9CLEANFILES = org.ayatana.bamf.service
1010
=== removed file 'lib/libbamf/Bamf-0.2.metadata'
--- lib/libbamf/Bamf-0.2.metadata 2012-07-01 18:38:29 +0000
+++ lib/libbamf/Bamf-0.2.metadata 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1TabSource.show_tab skip
20
=== modified file 'lib/libbamf/Makefile.am'
--- lib/libbamf/Makefile.am 2012-11-27 11:39:42 +0000
+++ lib/libbamf/Makefile.am 2012-11-27 13:41:43 +0000
@@ -12,7 +12,6 @@
12EXTRA_DIST = 12EXTRA_DIST =
1313
14include $(top_srcdir)/Makefile.am.marshal14include $(top_srcdir)/Makefile.am.marshal
15-include $(INTROSPECTION_MAKEFILE)
1615
17libbamf_sources = \16libbamf_sources = \
18 bamf-application.c \17 bamf-application.c \
@@ -82,7 +81,7 @@
82glib_marshal_prefix = bamf_marshal81glib_marshal_prefix = bamf_marshal
8382
84bamf-tab-source-glue.h: bamf-tab-source-glue.xml83bamf-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=$@ $<84 $(DBUS_GLIB_BIN)/dbus-binding-tool --prefix=bamf_tab_source --mode=glib-server --output=$@ $<
8685
87BUILT_SOURCES += \86BUILT_SOURCES += \
88 bamf-tab-source-glue.h \87 bamf-tab-source-glue.h \
@@ -106,51 +105,47 @@
106# GObject Introsepction 105# GObject Introsepction
107#########################106#########################
108107
109INTROSPECTION_GIRS = 108#-include $(INTROSPECTION_MAKEFILE)
110INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)109#INTROSPECTION_GIRS =
111INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)110#INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
112111#INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
113if HAVE_INTROSPECTION112
114113#if HAVE_INTROSPECTION
115introspection_sources = $(libbamf_la_SOURCES)114
116115#introspection_sources = $(library_include_HEADERS)
117Bamf-0.2.gir: libbamf.la116
118Bamf_0_2_gir_INCLUDES = GObject-2.0 GLib-2.0117#Bamf-0.2.gir: libbamf.la
119Bamf_0_2_gir_CFLAGS = \118#Bamf_0_2_gir_INCLUDES = \
120 --c-include='libbamf/libbamf.h' \119# GObject-2.0
121 $(DBUS_CFLAGS) \120#Bamf_0_2_gir_CFLAGS = --c-include='libbamf/libbamf.h' $(LIBBAMF_CFLAGS) -I$(top_srcdir)/lib -I$(top_builddir)/lib
122 -I$(top_srcdir)/lib \121#Bamf_0_2_gir_LIBS = libbamf.la
123 -I$(top_builddir)/lib \122#Bamf_0_2_gir_FILES = $(introspection_sources)
124 $(NULL)123#
125Bamf_0_2_gir_LIBS = libbamf.la124#INTROSPECTION_GIRS += Bamf-0.2.gir
126Bamf_0_2_gir_FILES = $(introspection_sources)125#
127Bamf_0_2_gir_EXPORT_PACKAGES = libbamf$(VER)126#girdir = $(datadir)/gir-1.0
128127#dist_gir_DATA = $(INTROSPECTION_GIRS)
129INTROSPECTION_GIRS += Bamf-0.2.gir128
130129#typelibdir = $(libdir)/girepository-1.0
131girdir = $(datadir)/gir-1.0130#typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
132dist_gir_DATA = $(INTROSPECTION_GIRS)131
133132#CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
134typelibdir = $(libdir)/girepository-1.0133
135typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)134#endif
136
137CLEANFILES += $(dist_gir_DATA) $(typelib_DATA)
138
139endif
140135
141#########################136#########################
142# VAPI Files137# VAPI Files
143#########################138#########################
144139
145if HAVE_INTROSPECTION140#if HAVE_INTROSPECTION
146141
147vapidir = $(datadir)/vala/vapi142#vapidir = $(datadir)/vala/vapi
148vapi_DATA = libbamf$(VER).vapi143#vapi_DATA = Bamf-0.2.vapi
149144
150$(vapi_DATA): $(INTROSPECTION_GIRS)145#Bamf-0.2.vapi: Bamf-0.2.gir
151 $(AM_V_GEN)$(VALA_API_GEN) --library=$(@:.vapi=) $<146# $(VALA_API_GEN) --library=Bamf-0.2 $<
152147
153DISTCLEANFILES += $(vapi_DATA)148#CLEANFILES += $(vapi_DATA)
154149
155endif150#endif
156151
157152
=== modified file 'lib/libbamf/bamf-application.c'
--- lib/libbamf/bamf-application.c 2012-11-27 11:39:42 +0000
+++ lib/libbamf/bamf-application.c 2012-11-27 13:41:43 +0000
@@ -71,15 +71,6 @@
71 int show_stubs;71 int show_stubs;
72};72};
7373
74/**
75 * bamf_application_get_desktop_file:
76 * @application: a #BamfApplication
77 *
78 * Used to fetch the path to the .desktop file associated with the passed application. If
79 * none exists, the result is NULL.
80 *
81 * Returns: A string representing the path to the desktop file.
82 */
83const gchar *74const gchar *
84bamf_application_get_desktop_file (BamfApplication *application)75bamf_application_get_desktop_file (BamfApplication *application)
85{76{
@@ -119,16 +110,6 @@
119 return file;110 return file;
120}111}
121112
122/**
123 * bamf_application_get_applicaton_type:
124 * @application: a #BamfApplication
125 *
126 * Used to determine what type of application a .desktop file represents. Current values are:
127 * "system" : A normal application, like firefox or evolution
128 * "web" : A web application, like facebook or twitter
129 *
130 * Returns: A string
131 */
132const gchar *113const gchar *
133bamf_application_get_application_type (BamfApplication *application)114bamf_application_get_application_type (BamfApplication *application)
134{115{
@@ -162,14 +143,6 @@
162 return type;143 return type;
163}144}
164145
165/**
166 * bamf_application_get_xids:
167 * @application: a #BamfApplication
168 *
169 * Used to fetch all #BamfWindow's xids associated with the passed #BamfApplication.
170 *
171 * Returns: (element-type guint) (transfer full): An array of xids.
172 */
173GArray *146GArray *
174bamf_application_get_xids (BamfApplication *application)147bamf_application_get_xids (BamfApplication *application)
175{148{
@@ -199,14 +172,6 @@
199 return xids;172 return xids;
200}173}
201174
202/**
203 * bamf_application_get_windows:
204 * @application: a #BamfApplication
205 *
206 * Used to fetch all #BamfWindow's associated with the passed #BamfApplication.
207 *
208 * Returns: (element-type Bamf.Window) (transfer container): A list of #BamfWindow's.
209 */
210GList *175GList *
211bamf_application_get_windows (BamfApplication *application)176bamf_application_get_windows (BamfApplication *application)
212{177{
@@ -232,14 +197,6 @@
232 return windows;197 return windows;
233}198}
234199
235/**
236 * bamf_application_get_show_menu_stubs:
237 * @application: a #BamfApplication
238 *
239 * Used to discover whether the application wants menu stubs shown.
240 *
241 * Returns: Whether the stubs should be shown.
242 */
243gboolean200gboolean
244bamf_application_get_show_menu_stubs (BamfApplication * application)201bamf_application_get_show_menu_stubs (BamfApplication * application)
245{202{
246203
=== modified file 'lib/libbamf/bamf-application.h'
--- lib/libbamf/bamf-application.h 2012-07-01 18:13:55 +0000
+++ lib/libbamf/bamf-application.h 2012-11-27 13:41:43 +0000
@@ -75,15 +75,58 @@
7575
76GType bamf_application_get_type (void) G_GNUC_CONST;76GType bamf_application_get_type (void) G_GNUC_CONST;
7777
78/**
79 * bamf_application_get_applicaton_type:
80 * @application: a #BamfApplication
81 *
82 * Used to determine what type of application a .desktop file represents. Current values are:
83 * "system" : A normal application, like firefox or evolution
84 * "web" : A web application, like facebook or twitter
85 *
86 * Returns: A string
87 */
78const gchar * bamf_application_get_application_type (BamfApplication *application);88const gchar * bamf_application_get_application_type (BamfApplication *application);
7989
90/**
91 * bamf_application_get_desktop_file:
92 * @application: a #BamfApplication
93 *
94 * Used to fetch the path to the .desktop file associated with the passed application. If
95 * none exists, the result is NULL.
96 *
97 * Returns: A string representing the path to the desktop file.
98 */
80const gchar * bamf_application_get_desktop_file (BamfApplication *application);99const gchar * bamf_application_get_desktop_file (BamfApplication *application);
81100
82GList * bamf_application_get_windows (BamfApplication *application);101/**
83102 * bamf_application_get_windows:
84GArray * bamf_application_get_xids (BamfApplication *application);103 * @application: a #BamfApplication
85104 *
86gboolean bamf_application_get_show_menu_stubs (BamfApplication *application);105 * Used to fetch all #BamfWindow's associated with the passed #BamfApplication.
106 *
107 * Returns: (element-type Bamf.Window) (transfer container): A list of #BamfWindow's.
108 */
109GList * bamf_application_get_windows (BamfApplication *application);
110
111/**
112 * bamf_application_get_xids:
113 * @application: a #BamfApplication
114 *
115 * Used to fetch all #BamfWindow's xids associated with the passed #BamfApplication.
116 *
117 * Returns: (transfer full): An array of xids.
118 */
119GArray * bamf_application_get_xids (BamfApplication *application);
120
121/**
122 * bamf_application_get_show_stubs:
123 * @application: a #BamfApplication
124 *
125 * Used to discover whether the application wants menu stubs shown.
126 *
127 * Returns: Whether the stubs should be shown.
128 */
129gboolean bamf_application_get_show_menu_stubs (BamfApplication *application);
87130
88G_END_DECLS131G_END_DECLS
89132
90133
=== modified file 'lib/libbamf/bamf-matcher.c'
--- lib/libbamf/bamf-matcher.c 2012-11-27 11:39:42 +0000
+++ lib/libbamf/bamf-matcher.c 2012-11-27 13:41:43 +0000
@@ -346,14 +346,6 @@
346/*346/*
347 * Public Methods347 * Public Methods
348 */348 */
349
350/**
351 * bamf_matcher_get_default:
352 *
353 * Returns the default matcher. This matcher is owned by bamf and shared between other callers.
354 *
355 * Returns: (transfer full): A new #BamfMatcher
356 */
357BamfMatcher *349BamfMatcher *
358bamf_matcher_get_default (void)350bamf_matcher_get_default (void)
359{351{
@@ -363,14 +355,6 @@
363 return (default_matcher = g_object_new (BAMF_TYPE_MATCHER, NULL));355 return (default_matcher = g_object_new (BAMF_TYPE_MATCHER, NULL));
364}356}
365357
366/**
367 * bamf_matcher_get_active_application:
368 * @matcher: a #BamfMatcher
369 *
370 * Used to fetch the active #BamfApplication.
371 *
372 * Returns: (transfer none): The active #BamfApplication.
373 */
374BamfApplication *358BamfApplication *
375bamf_matcher_get_active_application (BamfMatcher *matcher)359bamf_matcher_get_active_application (BamfMatcher *matcher)
376{360{
@@ -413,14 +397,6 @@
413 return BAMF_APPLICATION (view);397 return BAMF_APPLICATION (view);
414}398}
415399
416/**
417 * bamf_matcher_get_active_window:
418 * @matcher: a #BamfMatcher
419 *
420 * Used to fetch the active #BamfWindow.
421 *
422 * Returns: (transfer none): The active #BamfWindow.
423 */
424BamfWindow *400BamfWindow *
425bamf_matcher_get_active_window (BamfMatcher *matcher)401bamf_matcher_get_active_window (BamfMatcher *matcher)
426{402{
@@ -463,36 +439,16 @@
463 return BAMF_WINDOW (view);439 return BAMF_WINDOW (view);
464}440}
465441
466/**442/* Looks up the window's XID and calls the application_for_xid
467 * bamf_matcher_get_application_for_window:443 function just below here. */
468 * @matcher: a #BamfMatcher
469 * @window: The window to look for
470 *
471 * Used to fetch the #BamfApplication containing the passed window.
472 *
473 * Returns: (transfer none): The #BamfApplication representing the xid passed, or NULL if none exists.
474 */
475BamfApplication * 444BamfApplication *
476bamf_matcher_get_application_for_window (BamfMatcher *matcher,445bamf_matcher_get_application_for_window (BamfMatcher *matcher,
477 BamfWindow *window)446 BamfWindow *window)
478{447{
479 /* Looks up the window's XID and calls the application_for_xid
480 function just below here. */
481
482 g_return_val_if_fail(BAMF_IS_WINDOW(window), NULL);448 g_return_val_if_fail(BAMF_IS_WINDOW(window), NULL);
483 return bamf_matcher_get_application_for_xid (matcher,449 return bamf_matcher_get_application_for_xid (matcher, bamf_window_get_xid(window));
484 bamf_window_get_xid(window));
485}450}
486451
487/**
488 * bamf_matcher_get_application_for_xid:
489 * @matcher: a #BamfMatcher
490 * @xid: The XID to search for
491 *
492 * Used to fetch the #BamfApplication containing the passed xid.
493 *
494 * Returns: (transfer none): The #BamfApplication representing the xid passed, or NULL if none exists.
495 */
496BamfApplication *452BamfApplication *
497bamf_matcher_get_application_for_xid (BamfMatcher *matcher,453bamf_matcher_get_application_for_xid (BamfMatcher *matcher,
498 guint32 xid)454 guint32 xid)
@@ -566,17 +522,6 @@
566 return running;522 return running;
567}523}
568524
569/**
570 * bamf_matcher_get_applications:
571 * @matcher: a #BamfMatcher
572 *
573 * Used to fetch all #BamfApplication's running or not. Application authors who wish to only
574 * see running applications should use bamf_matcher_get_running_applications instead. The reason
575 * this method is needed is bamf will occasionally track applications which are not currently
576 * running for nefarious purposes.
577 *
578 * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's.
579 */
580GList *525GList *
581bamf_matcher_get_applications (BamfMatcher *matcher)526bamf_matcher_get_applications (BamfMatcher *matcher)
582{527{
@@ -620,14 +565,6 @@
620 return result;565 return result;
621}566}
622567
623/**
624 * bamf_matcher_get_windows:
625 * @matcher: a #BamfMatcher
626 *
627 * Used to fetch all windows that BAMF knows about.
628 *
629 * Returns: (element-type Bamf.View) (transfer container): A list of windows.
630 */
631GList *568GList *
632bamf_matcher_get_windows (BamfMatcher *matcher)569bamf_matcher_get_windows (BamfMatcher *matcher)
633{570{
@@ -671,16 +608,6 @@
671 return result;608 return result;
672}609}
673610
674/**
675 * bamf_matcher_get_window_stack_for_monitor:
676 * @matcher: a #BamfMatcher
677 * @monitor: the monitor you want the stack from, negative value to get all
678 *
679 * Used to fetch all windows that BAMF knows about in the requested screen,
680 * in stacking bottom-to-top order.
681 *
682 * Returns: (element-type Bamf.View) (transfer container): A list of #BamfWindow.
683 */
684GList *611GList *
685bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, gint monitor)612bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher, gint monitor)
686{613{
@@ -726,14 +653,6 @@
726 return result;653 return result;
727}654}
728655
729/**
730 * bamf_matcher_register_favorites:
731 * @matcher: a #BamfMatcher
732 * @favorites: an array of strings, each containing an absolute path to a .desktop file
733 *
734 * Used to effect how bamf performs matching. Desktop files passed to this method will
735 * be prefered by bamf to system desktop files.
736 */
737void656void
738bamf_matcher_register_favorites (BamfMatcher *matcher,657bamf_matcher_register_favorites (BamfMatcher *matcher,
739 const gchar **favorites)658 const gchar **favorites)
@@ -751,14 +670,6 @@
751 G_TYPE_INVALID);670 G_TYPE_INVALID);
752}671}
753672
754/**
755 * bamf_matcher_get_running_applications:
756 * @matcher: a #BamfMatcher
757 *
758 * Used to fetch all #BamfApplication's which are running.
759 *
760 * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's.
761 */
762GList *673GList *
763bamf_matcher_get_running_applications (BamfMatcher *matcher)674bamf_matcher_get_running_applications (BamfMatcher *matcher)
764{675{
@@ -802,14 +713,6 @@
802 return result;713 return result;
803}714}
804715
805/**
806 * bamf_matcher_get_tabs:
807 * @matcher: a #BamfMatcher
808 *
809 * Used to fetch all #BamfView's representing tabs. Currently unused.
810 *
811 * Returns: (element-type Bamf.View) (transfer container): A list of #BamfViews's.
812 */
813GList *716GList *
814bamf_matcher_get_tabs (BamfMatcher *matcher)717bamf_matcher_get_tabs (BamfMatcher *matcher)
815{718{
@@ -817,15 +720,6 @@
817 return NULL;720 return NULL;
818}721}
819722
820/**
821 * bamf_matcher_get_xids_for_application:
822 * @matcher: a #BamfMatcher
823 *
824 * Used to fetch all xid's associated with an application. Useful for performing window
825 *
826 *
827 * Returns: (element-type guint32) (transfer full): A list of xids.
828 */
829GArray *723GArray *
830bamf_matcher_get_xids_for_application (BamfMatcher *matcher,724bamf_matcher_get_xids_for_application (BamfMatcher *matcher,
831 const gchar *application)725 const gchar *application)
@@ -834,14 +728,6 @@
834 return NULL;728 return NULL;
835}729}
836730
837/**
838 * bamf_matcher_get_application_for_desktop_file:
839 * @matcher: a #BamfMatcher
840 * @desktop_file_path: Path to the desktop file
841 * @create_if_not_found: Create a #BamfApplication if one isn't found
842 *
843 * Returns: (transfer none): A #BamfApplication for given desktop file.
844 */
845BamfApplication * 731BamfApplication *
846bamf_matcher_get_application_for_desktop_file (BamfMatcher *matcher,732bamf_matcher_get_application_for_desktop_file (BamfMatcher *matcher,
847 const gchar *desktop_file_path,733 const gchar *desktop_file_path,
848734
=== modified file 'lib/libbamf/bamf-matcher.h'
--- lib/libbamf/bamf-matcher.h 2012-07-01 18:13:55 +0000
+++ lib/libbamf/bamf-matcher.h 2012-11-27 13:41:43 +0000
@@ -76,34 +76,138 @@
7676
77GType bamf_matcher_get_type (void) G_GNUC_CONST;77GType bamf_matcher_get_type (void) G_GNUC_CONST;
7878
79/**
80 * bamf_matcher_get_default:
81 * @matcher: a #BamfMatcher
82 *
83 * Returns the default matcher. This matcher is owned by bamf and shared between other callers.
84 *
85 * Returns: (transfer none): A new #BamfMatcher
86 */
79BamfMatcher * bamf_matcher_get_default (void);87BamfMatcher * bamf_matcher_get_default (void);
8088
89/**
90 * bamf_matcher_get_active_application:
91 * @matcher: a #BamfMatcher
92 *
93 * Used to fetch the active #BamfApplication.
94 *
95 * Returns: (transfer none): The active #BamfApplication.
96 */
81BamfApplication * bamf_matcher_get_active_application (BamfMatcher *matcher);97BamfApplication * bamf_matcher_get_active_application (BamfMatcher *matcher);
8298
99/**
100 * bamf_matcher_get_active_window:
101 * @matcher: a #BamfMatcher
102 *
103 * Used to fetch the active #BamfWindow.
104 *
105 * Returns: (transfer none): The active #BamfWindow.
106 */
83BamfWindow * bamf_matcher_get_active_window (BamfMatcher *matcher);107BamfWindow * bamf_matcher_get_active_window (BamfMatcher *matcher);
84108
109/**
110 * bamf_matcher_get_application_for_xid:
111 * @matcher: a #BamfMatcher
112 * @xid: The XID to search for
113 *
114 * Used to fetch the #BamfApplication containing the passed xid.
115 *
116 * Returns: (transfer container): The #BamfApplication representing the xid passed, or NULL if none exists.
117 */
85BamfApplication * bamf_matcher_get_application_for_xid (BamfMatcher *matcher,118BamfApplication * bamf_matcher_get_application_for_xid (BamfMatcher *matcher,
86 guint32 xid);119 guint32 xid);
120/**
121 * bamf_matcher_get_application_for_window:
122 * @matcher: a #BamfMatcher
123 * @window: The window to look for
124 *
125 * Used to fetch the #BamfApplication containing the passed window.
126 *
127 * Returns: (transfer container): The #BamfApplication representing the xid passed, or NULL if none exists.
128 */
87BamfApplication * bamf_matcher_get_application_for_window (BamfMatcher *matcher,129BamfApplication * bamf_matcher_get_application_for_window (BamfMatcher *matcher,
88 BamfWindow *window);130 BamfWindow *window);
89131
90gboolean bamf_matcher_application_is_running (BamfMatcher *matcher,132gboolean bamf_matcher_application_is_running (BamfMatcher *matcher,
91 const gchar *application);133 const gchar *application);
92134
135/**
136 * bamf_matcher_get_applications:
137 * @matcher: a #BamfMatcher
138 *
139 * Used to fetch all #BamfApplication's running or not. Application authors who wish to only
140 * see running applications should use bamf_matcher_get_running_applications instead. The reason
141 * this method is needed is bamf will occasionally track applications which are not currently
142 * running for nefarious purposes.
143 *
144 * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's.
145 */
93GList * bamf_matcher_get_applications (BamfMatcher *matcher);146GList * bamf_matcher_get_applications (BamfMatcher *matcher);
94147
148/**
149 * bamf_matcher_register_favorites:
150 * @matcher: a #BamfMatcher
151 * @favorites: an array of strings, each containing an absolute path to a .desktop file
152 *
153 * Used to effect how bamf performs matching. Desktop files passed to this method will
154 * be prefered by bamf to system desktop files.
155 */
95void bamf_matcher_register_favorites (BamfMatcher *matcher,156void bamf_matcher_register_favorites (BamfMatcher *matcher,
96 const gchar **favorites);157 const gchar **favorites);
97158
159/**
160 * bamf_matcher_get_running_applications:
161 * @matcher: a #BamfMatcher
162 *
163 * Used to fetch all #BamfApplication's which are running.
164 *
165 * Returns: (element-type Bamf.Application) (transfer container): A list of #BamfApplication's.
166 */
98GList * bamf_matcher_get_running_applications (BamfMatcher *matcher);167GList * bamf_matcher_get_running_applications (BamfMatcher *matcher);
99168
169/**
170 * bamf_matcher_get_tabs:
171 * @matcher: a #BamfMatcher
172 *
173 * Used to fetch all #BamfView's representing tabs. Currently unused.
174 *
175 * Returns: (element-type Bamf.View) (transfer container): A list of #BamfViews's.
176 */
100GList * bamf_matcher_get_tabs (BamfMatcher *matcher);177GList * bamf_matcher_get_tabs (BamfMatcher *matcher);
101178
179/**
180 * bamf_matcher_get_applications:
181 * @matcher: a #BamfMatcher
182 *
183 * Used to fetch all xid's associated with an application. Useful for performing window
184 *
185 *
186 * Returns: (element-type guint32) (transfer none): A list of xids.
187 */
102GArray * bamf_matcher_get_xids_for_application (BamfMatcher *matcher,188GArray * bamf_matcher_get_xids_for_application (BamfMatcher *matcher,
103 const gchar *application);189 const gchar *application);
104190
191/**
192 * bamf_matcher_get_windows:
193 * @matcher: a #BamfMatcher
194 *
195 * Used to fetch all windows that BAMF knows about.
196 *
197 * Returns: (element-type Bamf.View) (transfer container): A list of windows.
198 */
105GList * bamf_matcher_get_windows (BamfMatcher *matcher);199GList * bamf_matcher_get_windows (BamfMatcher *matcher);
106200
201/**
202 * bamf_matcher_get_window_stack_for_monitor:
203 * @matcher: a #BamfMatcher
204 * @monitor: the monitor you want the stack from, negative value to get all
205 *
206 * Used to fetch all windows that BAMF knows about in the requested screen,
207 * in stacking bottom-to-top order.
208 *
209 * Returns: (element-type Bamf.View) (transfer container): A list of #BamfWindow.
210 */
107GList * bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher,211GList * bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher,
108 gint monitor);212 gint monitor);
109213
110214
=== modified file 'lib/libbamf/bamf-view.c'
--- lib/libbamf/bamf-view.c 2012-11-27 11:39:42 +0000
+++ lib/libbamf/bamf-view.c 2012-11-27 13:41:43 +0000
@@ -142,15 +142,6 @@
142 return priv->set_flags & flag;142 return priv->set_flags & flag;
143}143}
144144
145/**
146 * bamf_view_get_children:
147 * @view: a #BamfView
148 *
149 * Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards.
150 *
151 * Returns: (element-type Bamf.View) (transfer container): Returns a list of #BamfView which must be
152 * freed after usage. Elements of the list are owned by bamf and should not be unreffed.
153 */
154GList *145GList *
155bamf_view_get_children (BamfView *view)146bamf_view_get_children (BamfView *view)
156{147{
@@ -233,12 +224,6 @@
233 return result;224 return result;
234}225}
235226
236/**
237 * bamf_view_is_closed:
238 * @view: a #BamfView
239 *
240 * Determines if the view is closed or not.
241 */
242gboolean227gboolean
243bamf_view_is_closed (BamfView *view)228bamf_view_is_closed (BamfView *view)
244{229{
@@ -247,12 +232,6 @@
247 return view->priv->is_closed;232 return view->priv->is_closed;
248}233}
249234
250/**
251 * bamf_view_is_active:
252 * @view: a #BamfView
253 *
254 * Determines if the view is currently active and focused by the user. Useful for an active window indicator.
255 */
256gboolean235gboolean
257bamf_view_is_active (BamfView *view)236bamf_view_is_active (BamfView *view)
258{237{
@@ -265,14 +244,7 @@
265244
266}245}
267246
268/**247gboolean
269 * bamf_view_user_visible:
270 * @view: a #BamfView
271 *
272 * Returns a boolean useful for determining if a particular view is "user visible". User visible
273 * is a concept relating to whether or not a window should be shown in a launcher tasklist.
274 */
275gboolean
276bamf_view_user_visible (BamfView *self)248bamf_view_user_visible (BamfView *self)
277{249{
278 g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE);250 g_return_val_if_fail (BAMF_IS_VIEW (self), FALSE);
@@ -281,12 +253,6 @@
281253
282}254}
283255
284/**
285 * bamf_view_is_running:
286 * @view: a #BamfView
287 *
288 * Determines if the view is currently running. Useful for a running window indicator.
289 */
290gboolean256gboolean
291bamf_view_is_running (BamfView *self)257bamf_view_is_running (BamfView *self)
292{258{
@@ -298,12 +264,6 @@
298 return bamf_view_get_boolean (self, "IsRunning", BAMF_VIEW_RUNNING_FLAG);264 return bamf_view_get_boolean (self, "IsRunning", BAMF_VIEW_RUNNING_FLAG);
299}265}
300266
301/**
302 * bamf_view_is_urgent:
303 * @view: a #BamfView
304 *
305 * Determines if the view is currently requiring attention. Useful for a running window indicator.
306 */
307gboolean267gboolean
308bamf_view_is_urgent (BamfView *self)268bamf_view_is_urgent (BamfView *self)
309{269{
@@ -376,12 +336,6 @@
376 g_object_unref (view);336 g_object_unref (view);
377}337}
378338
379/**
380 * bamf_view_get_icon:
381 * @view: a #BamfView
382 *
383 * Gets the icon of a view. This icon is used to visually represent the view.
384 */
385gchar *339gchar *
386bamf_view_get_icon (BamfView *self)340bamf_view_get_icon (BamfView *self)
387{341{
@@ -420,12 +374,6 @@
420 return icon;374 return icon;
421}375}
422376
423/**
424 * bamf_view_get_name:
425 * @view: a #BamfView
426 *
427 * Gets the name of a view. This name is a short name best used to represent the view with text.
428 */
429gchar *377gchar *
430bamf_view_get_name (BamfView *self)378bamf_view_get_name (BamfView *self)
431{379{
@@ -473,15 +421,6 @@
473 return FALSE;421 return FALSE;
474}422}
475423
476/**
477 * bamf_view_get_view_type:
478 * @view: a #BamfView
479 *
480 * The view type of a window is a short string used to represent all views of the same class. These
481 * descriptions should not be used to do casting as they are not considered stable.
482 *
483 * Virtual: view_type
484 */
485const gchar *424const gchar *
486bamf_view_get_view_type (BamfView *self)425bamf_view_get_view_type (BamfView *self)
487{426{
488427
=== modified file 'lib/libbamf/bamf-view.h'
--- lib/libbamf/bamf-view.h 2012-07-01 18:13:55 +0000
+++ lib/libbamf/bamf-view.h 2012-11-27 13:41:43 +0000
@@ -106,22 +106,83 @@
106106
107GType bamf_view_get_type (void) G_GNUC_CONST;107GType bamf_view_get_type (void) G_GNUC_CONST;
108108
109/**
110 * bamf_view_get_children:
111 * @view: a #BamfView
112 *
113 * Note: Makes sever dbus calls the first time this is called on a view. Dbus messaging is reduced afterwards.
114 *
115 * Returns: (element-type Bamf.View) (transfer container): Returns a list of #BamfView which must be
116 * freed after usage. Elements of the list are owned by bamf and should not be unreffed.
117 */
109GList * bamf_view_get_children (BamfView *view);118GList * bamf_view_get_children (BamfView *view);
110119
120/**
121 * bamf_view_is_active:
122 * @view: a #BamfView
123 *
124 * Determines if the view is closed or not.
125 */
111gboolean bamf_view_is_closed (BamfView *view);126gboolean bamf_view_is_closed (BamfView *view);
112127
128/**
129 * bamf_view_is_active:
130 * @view: a #BamfView
131 *
132 * Determines if the view is currently active and focused by the user. Useful for an active window indicator.
133 */
113gboolean bamf_view_is_active (BamfView *view);134gboolean bamf_view_is_active (BamfView *view);
114135
136/**
137 * bamf_view_is_running:
138 * @view: a #BamfView
139 *
140 * Determines if the view is currently running. Useful for a running window indicator.
141 */
115gboolean bamf_view_is_running (BamfView *view);142gboolean bamf_view_is_running (BamfView *view);
116143
144/**
145 * bamf_view_is_running:
146 * @view: a #BamfView
147 *
148 * Determines if the view is currently requiring attention. Useful for a running window indicator.
149 */
117gboolean bamf_view_is_urgent (BamfView *view);150gboolean bamf_view_is_urgent (BamfView *view);
118151
152/**
153 * bamf_view_get_name:
154 * @view: a #BamfView
155 *
156 * Gets the name of a view. This name is a short name best used to represent the view with text.
157 */
119gchar * bamf_view_get_name (BamfView *view);158gchar * bamf_view_get_name (BamfView *view);
120159
160/**
161 * bamf_view_get_icon:
162 * @view: a #BamfView
163 *
164 * Gets the icon of a view. This icon is used to visually represent the view.
165 */
121gchar * bamf_view_get_icon (BamfView *view);166gchar * bamf_view_get_icon (BamfView *view);
122167
168/**
169 * bamf_view_user_visible:
170 * @view: a #BamfView
171 *
172 * Returns a boolean useful for determining if a particular view is "user visible". User visible
173 * is a concept relating to whether or not a window should be shown in a launcher tasklist.
174 */
123gboolean bamf_view_user_visible (BamfView *view);175gboolean bamf_view_user_visible (BamfView *view);
124176
177/**
178 * bamf_view_get_view_type:
179 * @view: a #BamfView
180 *
181 * The view type of a window is a short string used to represent all views of the same class. These
182 * descriptions should not be used to do casting as they are not considered stable.
183 *
184 * Returns: (transfer full): A gchar*
185 */
125const gchar * bamf_view_get_view_type (BamfView *view);186const gchar * bamf_view_get_view_type (BamfView *view);
126187
127void bamf_view_set_sticky (BamfView *view, gboolean value);188void bamf_view_set_sticky (BamfView *view, gboolean value);
128189
=== modified file 'lib/libbamf/bamf-window.c'
--- lib/libbamf/bamf-window.c 2012-11-27 11:39:42 +0000
+++ lib/libbamf/bamf-window.c 2012-11-27 13:41:43 +0000
@@ -75,13 +75,6 @@
75 return self->priv->last_active;75 return self->priv->last_active;
76}76}
7777
78/**
79 * bamf_window_get_transient:
80 * @self: a #BamfWindow
81 *
82 * Returns: (transfer none) (nullable): A transient for this #BamfWindow.
83 */
84
85BamfWindow * bamf_window_get_transient (BamfWindow *self)78BamfWindow * bamf_window_get_transient (BamfWindow *self)
86{79{
87 BamfWindowPrivate *priv;80 BamfWindowPrivate *priv;

Subscribers

People subscribed via source and target branches

to all changes: