1 /*
2  * Copyright (C) 2010 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Jason Smith <jason.smith@canonical.com>
17  *
18  */
19 
20 #ifndef __BAMFWINDOW_H__
21 #define __BAMFWINDOW_H__
22 
23 #include "bamf-view.h"
24 #include "bamf-legacy-window.h"
25 #include <glib.h>
26 #include <glib-object.h>
27 #include <time.h>
28 
29 #define BAMF_TYPE_WINDOW                        (bamf_window_get_type ())
30 #define BAMF_WINDOW(obj)                        (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_WINDOW, BamfWindow))
31 #define BAMF_IS_WINDOW(obj)                     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_WINDOW))
32 #define BAMF_WINDOW_CLASS(klass)                (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_WINDOW, BamfWindowClass))
33 #define BAMF_IS_WINDOW_CLASS(klass)             (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_WINDOW))
34 #define BAMF_WINDOW_GET_CLASS(obj)              (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_WINDOW, BamfWindowClass))
35 
36 typedef struct _BamfWindow BamfWindow;
37 typedef struct _BamfWindowClass BamfWindowClass;
38 typedef struct _BamfWindowPrivate BamfWindowPrivate;
39 
40 struct _BamfWindowClass
41 {
42   BamfViewClass parent;
43 
44   gboolean           (*user_visible) (BamfWindow *window);
45   gboolean           (*is_urgent)    (BamfWindow *window);
46   guint32            (*get_xid)      (BamfWindow *window);
47   BamfLegacyWindow * (*get_window)   (BamfWindow *window);
48 };
49 
50 struct _BamfWindow
51 {
52   BamfView parent;
53 
54   /* private */
55   BamfWindowPrivate *priv;
56 };
57 
58 GType bamf_window_get_type (void) G_GNUC_CONST;
59 
60 BamfLegacyWindow * bamf_window_get_window (BamfWindow *self);
61 
62 BamfWindow       * bamf_window_get_transient (BamfWindow *self);
63 
64 const char       * bamf_window_get_transient_path (BamfWindow *self);
65 
66 guint32            bamf_window_get_window_type (BamfWindow *self);
67 
68 guint32            bamf_window_get_xid (BamfWindow *window);
69 
70 guint32            bamf_window_get_pid (BamfWindow *window);
71 
72 gint               bamf_window_get_stack_position (BamfWindow *window);
73 
74 char             * bamf_window_get_string_hint (BamfWindow *self, const char* prop);
75 
76 char             * bamf_window_get_application_id (BamfWindow *self);
77 
78 BamfWindowMaximizationType bamf_window_maximized (BamfWindow *self);
79 
80 gint               bamf_window_get_monitor (BamfWindow *self);
81 
82 BamfWindow       * bamf_window_new (BamfLegacyWindow *window);
83 
84 #endif
85