Back to index

bamf  0.2.120
bamf-legacy-screen.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 __BAMFLEGACY_SCREEN_H__
00021 #define __BAMFLEGACY_SCREEN_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 
00029 #define BAMF_TYPE_LEGACY_SCREEN                  (bamf_legacy_screen_get_type ())
00030 #define BAMF_LEGACY_SCREEN(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_LEGACY_SCREEN, BamfLegacyScreen))
00031 #define BAMF_IS_LEGACY_SCREEN(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_LEGACY_SCREEN))
00032 #define BAMF_LEGACY_SCREEN_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_LEGACY_SCREEN, BamfLegacyScreenClass))
00033 #define BAMF_IS_LEGACY_SCREEN_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_LEGACY_SCREEN))
00034 #define BAMF_LEGACY_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_LEGACY_SCREEN, BamfLegacyScreenClass))
00035 
00036 #define BAMF_LEGACY_SCREEN_SIGNAL_WINDOW_OPENED         "window-opened"
00037 #define BAMF_LEGACY_SCREEN_SIGNAL_WINDOW_CLOSED         "window-closed"
00038 #define BAMF_LEGACY_SCREEN_SIGNAL_STACKING_CHANGED      "stacking-changed"
00039 #define BAMF_LEGACY_SCREEN_SIGNAL_ACTIVE_WINDOW_CHANGED "active-window-changed"
00040 
00041 typedef struct _BamfLegacyScreen BamfLegacyScreen;
00042 typedef struct _BamfLegacyScreenClass BamfLegacyScreenClass;
00043 typedef struct _BamfLegacyScreenPrivate BamfLegacyScreenPrivate;
00044 
00045 struct _BamfLegacyScreenClass
00046 {
00047   GObjectClass parent;
00048 
00049   GList    (*get_windows)      (BamfLegacyScreen *legacy_screen);
00050 
00051   /*< signals >*/
00052   void     (*window_opened)          (BamfLegacyScreen *legacy_screen, BamfLegacyWindow *legacy_window);
00053   void     (*window_closed)          (BamfLegacyScreen *legacy_screen, BamfLegacyWindow *legacy_window);
00054   void     (*stacking_changed)       (BamfLegacyScreen *legacy_screen);
00055   void     (*active_window_changed)  (BamfLegacyScreen *legacy_screen);
00056 };
00057 
00058 struct _BamfLegacyScreen
00059 {
00060   GObject parent;
00061 
00062   /* private */
00063   BamfLegacyScreenPrivate *priv;
00064 };
00065 
00066 GType              bamf_legacy_screen_get_type           (void) G_GNUC_CONST;
00067 
00068 void               bamf_legacy_screen_set_state_file     (BamfLegacyScreen *screen, const char *file);
00069 
00070 GList            * bamf_legacy_screen_get_windows        (BamfLegacyScreen *screen);
00071 
00072 BamfLegacyWindow * bamf_legacy_screen_get_active_window  (BamfLegacyScreen *screen);
00073 
00074 BamfLegacyScreen * bamf_legacy_screen_get_default        (void);
00075 
00076 void               bamf_legacy_screen_inject_window      (BamfLegacyScreen *screen, guint xid);
00077 
00078 #endif