Back to index

bamf  0.2.120
bamf-window.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 Canonical Ltd
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 3 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Authored by: Jason Smith <jason.smith@canonical.com>
00017  *
00018  */
00019 
00020 #ifndef __BAMFWINDOW_H__
00021 #define __BAMFWINDOW_H__
00022 
00023 #include "bamf.h"
00024 #include "bamf-view.h"
00025 #include "bamf-legacy-window.h"
00026 #include <glib.h>
00027 #include <glib-object.h>
00028 #include <time.h>
00029 
00030 #define BAMF_TYPE_WINDOW                  (bamf_window_get_type ())
00031 #define BAMF_WINDOW(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_WINDOW, BamfWindow))
00032 #define BAMF_IS_WINDOW(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_WINDOW))
00033 #define BAMF_WINDOW_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_WINDOW, BamfWindowClass))
00034 #define BAMF_IS_WINDOW_CLASS(klass)              (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_WINDOW))
00035 #define BAMF_WINDOW_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_WINDOW, BamfWindowClass))
00036 
00037 typedef struct _BamfWindow BamfWindow;
00038 typedef struct _BamfWindowClass BamfWindowClass;
00039 typedef struct _BamfWindowPrivate BamfWindowPrivate;
00040 
00041 struct _BamfWindowClass
00042 {
00043   BamfViewClass parent;
00044 
00045   gboolean           (*user_visible) (BamfWindow *window);
00046   gboolean           (*is_urgent)    (BamfWindow *window);
00047   guint32            (*get_xid)      (BamfWindow *window);
00048   BamfLegacyWindow * (*get_window)   (BamfWindow *window);
00049 };
00050 
00051 struct _BamfWindow
00052 {
00053   BamfView parent;
00054 
00055   /* private */
00056   BamfWindowPrivate *priv;
00057 };
00058 
00059 GType bamf_window_get_type (void) G_GNUC_CONST;
00060 
00061 BamfLegacyWindow * bamf_window_get_window (BamfWindow *self);
00062 
00063 BamfWindow       * bamf_window_get_transient (BamfWindow *self);
00064 
00065 const char       * bamf_window_get_transient_path (BamfWindow *self);
00066 
00067 guint32            bamf_window_get_window_type (BamfWindow *self);
00068 
00069 guint32            bamf_window_get_xid (BamfWindow *window);
00070 
00071 guint32            bamf_window_get_pid (BamfWindow *window);
00072 
00073 time_t             bamf_window_last_active (BamfWindow *window);
00074 
00075 time_t             bamf_window_opened (BamfWindow *window);
00076 
00077 gint               bamf_window_get_stack_position (BamfWindow *window);
00078 
00079 char             * bamf_window_get_xprop (BamfWindow *self, const char* prop);
00080 
00081 BamfWindowMaximizationType bamf_window_maximized (BamfWindow *self);
00082 
00083 gint               bamf_window_get_monitor (BamfWindow *self);
00084 
00085 BamfWindow       * bamf_window_new (BamfLegacyWindow *window);
00086 
00087 #endif