Back to index

bamf  0.2.120
bamf-window.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_WINDOW_H_
00028 #define _BAMF_WINDOW_H_
00029 
00030 #include <time.h>
00031 #include <glib-object.h>
00032 #include <libbamf/bamf-view.h>
00033 
00034 G_BEGIN_DECLS
00035 
00036 #define BAMF_TYPE_WINDOW (bamf_window_get_type ())
00037 
00038 #define BAMF_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
00039         BAMF_TYPE_WINDOW, BamfWindow))
00040 
00041 #define BAMF_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
00042         BAMF_TYPE_WINDOW, BamfWindowClass))
00043 
00044 #define BAMF_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
00045         BAMF_TYPE_WINDOW))
00046 
00047 #define BAMF_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
00048         BAMF_TYPE_WINDOW))
00049 
00050 #define BAMF_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
00051         BAMF_TYPE_WINDOW, BamfWindowClass))
00052 
00053 typedef struct _BamfWindow        BamfWindow;
00054 typedef struct _BamfWindowClass   BamfWindowClass;
00055 typedef struct _BamfWindowPrivate BamfWindowPrivate;
00056 
00057 struct _BamfWindow
00058 {
00059   BamfView parent;
00060 
00061   BamfWindowPrivate *priv;
00062 };
00063 
00064 typedef enum
00065 {
00066   BAMF_WINDOW_NORMAL,       /* document/app window */
00067   BAMF_WINDOW_DESKTOP,      /* desktop background */
00068   BAMF_WINDOW_DOCK,         /* panel */
00069   BAMF_WINDOW_DIALOG,       /* dialog */
00070   BAMF_WINDOW_TOOLBAR,      /* tearoff toolbar */
00071   BAMF_WINDOW_MENU,         /* tearoff menu */
00072   BAMF_WINDOW_UTILITY,      /* palette/toolbox window */
00073   BAMF_WINDOW_SPLASHSCREEN  /* splash screen */
00074 } BamfWindowType;
00075 
00076 typedef enum
00077 {
00078   BAMF_WINDOW_FLOATING,              /* Floating window */
00079   BAMF_WINDOW_HORIZONTAL_MAXIMIZED,  /* Horizontally maximized window */
00080   BAMF_WINDOW_VERTICAL_MAXIMIZED,    /* Vertically maximized window */
00081   BAMF_WINDOW_MAXIMIZED              /* Maximized window */
00082 } BamfWindowMaximizationType;
00083 
00084 struct _BamfWindowClass
00085 {
00086   BamfViewClass parent_class;
00087 
00088   /*< signals >*/
00089   void (*monitor_changed)   (BamfWindow *window, gint old_value, gint new_value);
00090   void (*maximized_changed) (BamfWindow *window, gint old_value, gint new_value);
00091 
00092   /*< private >*/
00093   void (*_window_padding1) (void);
00094   void (*_window_padding2) (void);
00095   void (*_window_padding3) (void);
00096   void (*_window_padding4) (void);
00097 };
00098 
00099 GType             bamf_window_get_type                  (void) G_GNUC_CONST;
00100 
00101 BamfWindow      * bamf_window_get_transient             (BamfWindow *self);
00102 
00103 BamfWindowType    bamf_window_get_window_type           (BamfWindow *self);
00104 
00105 guint32           bamf_window_get_xid                   (BamfWindow *self);
00106 
00107 guint32           bamf_window_get_pid                   (BamfWindow *self);
00108 
00109 gint              bamf_window_get_monitor               (BamfWindow *self);
00110 
00111 gchar           * bamf_window_get_utf8_prop             (BamfWindow *self, const char* prop);
00112 BamfWindowMaximizationType bamf_window_maximized        (BamfWindow *self);
00113 
00114 time_t            bamf_window_last_active               (BamfWindow *self);
00115 
00116 G_END_DECLS
00117 
00118 #endif