Back to index

bamf  0.2.120
bamf-matcher.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2010 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of either or both of the following licenses:
00006  *
00007  * 1) the GNU Lesser General Public License version 3, as published by the
00008  * Free Software Foundation; and/or
00009  * 2) the GNU Lesser General Public License version 2.1, as published by
00010  * the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranties of
00014  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00015  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00016  * License for more details.
00017  *
00018  * You should have received a copy of both the GNU Lesser General Public
00019  * License version 3 and version 2.1 along with this program.  If not, see
00020  * <http://www.gnu.org/licenses/>
00021  *
00022  * Authored by: Jason Smith <jason.smith@canonical.com>
00023  *              Neil Jagdish Patel <neil.patel@canonical.com>
00024  *
00025  */
00026 
00027 #ifndef _BAMF_MATCHER_H_
00028 #define _BAMF_MATCHER_H_
00029 
00030 #include <glib-object.h>
00031 #include <libbamf/bamf-window.h>
00032 #include <libbamf/bamf-application.h>
00033 
00034 G_BEGIN_DECLS
00035 
00036 #define BAMF_TYPE_MATCHER (bamf_matcher_get_type ())
00037 
00038 #define BAMF_MATCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
00039         BAMF_TYPE_MATCHER, BamfMatcher))
00040 
00041 #define BAMF_MATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
00042         BAMF_TYPE_MATCHER, BamfMatcherClass))
00043 
00044 #define BAMF_IS_MATCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
00045         BAMF_TYPE_MATCHER))
00046 
00047 #define BAMF_IS_MATCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
00048         BAMF_TYPE_MATCHER))
00049 
00050 #define BAMF_MATCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
00051         BAMF_TYPE_MATCHER, BamfMatcherClass))
00052 
00053 typedef struct _BamfMatcher        BamfMatcher;
00054 typedef struct _BamfMatcherClass   BamfMatcherClass;
00055 typedef struct _BamfMatcherPrivate BamfMatcherPrivate;
00056 
00057 struct _BamfMatcher
00058 {
00059   GObject           parent;
00060 
00061   BamfMatcherPrivate *priv;
00062 };
00063 
00064 struct _BamfMatcherClass
00065 {
00066   GObjectClass parent_class;
00067 
00068   /*< private >*/
00069   void (*_matcher_padding1) (void);
00070   void (*_matcher_padding2) (void);
00071   void (*_matcher_padding3) (void);
00072   void (*_matcher_padding4) (void);
00073   void (*_matcher_padding5) (void);
00074   void (*_matcher_padding6) (void);
00075 };
00076 
00077 GType             bamf_matcher_get_type                 (void) G_GNUC_CONST;
00078 
00087 BamfMatcher     * bamf_matcher_get_default              (void);
00088 
00097 BamfApplication * bamf_matcher_get_active_application   (BamfMatcher *matcher);
00098 
00107 BamfWindow      * bamf_matcher_get_active_window        (BamfMatcher *matcher);
00108 
00118 BamfApplication * bamf_matcher_get_application_for_xid  (BamfMatcher *matcher,
00119                                                          guint32      xid);
00129 BamfApplication * bamf_matcher_get_application_for_window  (BamfMatcher *matcher,
00130                                                             BamfWindow *window);
00131 
00132 gboolean          bamf_matcher_application_is_running   (BamfMatcher *matcher,
00133                                                          const gchar *application);
00134 
00146 GList *           bamf_matcher_get_applications         (BamfMatcher *matcher);
00147 
00156 void              bamf_matcher_register_favorites       (BamfMatcher *matcher,
00157                                                          const gchar **favorites);
00158 
00167 GList *           bamf_matcher_get_running_applications (BamfMatcher *matcher);
00168 
00177 GList *           bamf_matcher_get_tabs                 (BamfMatcher *matcher);
00178 
00188 GArray *          bamf_matcher_get_xids_for_application (BamfMatcher *matcher,
00189                                                          const gchar *application);
00190 
00199 GList *           bamf_matcher_get_windows (BamfMatcher *matcher);
00200 
00211 GList *           bamf_matcher_get_window_stack_for_monitor (BamfMatcher *matcher,
00212                                                              gint monitor);
00213 
00214 BamfApplication * bamf_matcher_get_application_for_desktop_file (BamfMatcher *matcher,
00215                                                                  const gchar *desktop_file_path,
00216                                                                  gboolean create_if_not_found);
00217 
00218 G_END_DECLS
00219 
00220 #endif