~ubuntu-branches/ubuntu/precise/xfce4-panel/precise

« back to all changes in this revision

Viewing changes to panel/panel-base-window.h

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-12-04 15:45:53 UTC
  • mto: (4.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 50.
  • Revision ID: james.westby@ubuntu.com-20101204154553-f452gq02eiksf09f
Tags: upstream-4.7.5
ImportĀ upstreamĀ versionĀ 4.7.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2009 Nick Schermer <nick@xfce.org>
 
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 as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License along
 
15
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
16
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
17
 */
 
18
 
 
19
#ifndef __PANEL_BASE_WINDOW_H__
 
20
#define __PANEL_BASE_WINDOW_H__
 
21
 
 
22
#include <gtk/gtk.h>
 
23
 
 
24
G_BEGIN_DECLS
 
25
 
 
26
typedef struct _PanelBaseWindowClass   PanelBaseWindowClass;
 
27
typedef struct _PanelBaseWindow        PanelBaseWindow;
 
28
typedef struct _PanelBaseWindowPrivate PanelBaseWindowPrivate;
 
29
typedef enum   _PanelBorders           PanelBorders;
 
30
typedef enum   _PanelBgStyle           PanelBgStyle;
 
31
 
 
32
#define PANEL_TYPE_BASE_WINDOW            (panel_base_window_get_type ())
 
33
#define PANEL_BASE_WINDOW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANEL_TYPE_BASE_WINDOW, PanelBaseWindow))
 
34
#define PANEL_BASE_WINDOW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), PANEL_TYPE_BASE_WINDOW, PanelBaseWindowClass))
 
35
#define PANEL_IS_BASE_WINDOW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANEL_TYPE_BASE_WINDOW))
 
36
#define PANEL_IS_BASE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANEL_TYPE_BASE_WINDOW))
 
37
#define PANEL_BASE_WINDOW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), PANEL_TYPE_BASE_WINDOW, PanelBaseWindowClass))
 
38
 
 
39
enum _PanelBorders
 
40
{
 
41
  PANEL_BORDER_NONE   = 0,
 
42
  PANEL_BORDER_LEFT   = 1 << 0,
 
43
  PANEL_BORDER_RIGHT  = 1 << 1,
 
44
  PANEL_BORDER_TOP    = 1 << 2,
 
45
  PANEL_BORDER_BOTTOM = 1 << 3
 
46
};
 
47
 
 
48
enum _PanelBgStyle
 
49
{
 
50
  PANEL_BG_STYLE_NONE,
 
51
  PANEL_BG_STYLE_COLOR,
 
52
  PANEL_BG_STYLE_IMAGE
 
53
};
 
54
 
 
55
struct _PanelBaseWindowClass
 
56
{
 
57
  GtkWindowClass __parent__;
 
58
};
 
59
 
 
60
struct _PanelBaseWindow
 
61
{
 
62
  GtkWindow __parent__;
 
63
 
 
64
  /*< private >*/
 
65
  PanelBaseWindowPrivate *priv;
 
66
 
 
67
  guint                   is_composited : 1;
 
68
 
 
69
  gdouble                 background_alpha;
 
70
  PanelBgStyle            background_style;
 
71
  GdkColor               *background_color;
 
72
  gchar                  *background_image;
 
73
};
 
74
 
 
75
GType        panel_base_window_get_type    (void) G_GNUC_CONST;
 
76
 
 
77
void         panel_base_window_move_resize (PanelBaseWindow *window,
 
78
                                            gint             x,
 
79
                                            gint             y,
 
80
                                            gint             width,
 
81
                                            gint             height);
 
82
 
 
83
void         panel_base_window_set_borders (PanelBaseWindow *window,
 
84
                                            PanelBorders     borders);
 
85
PanelBorders panel_base_window_get_borders (PanelBaseWindow *window);
 
86
 
 
87
void         panel_base_window_set_active  (PanelBaseWindow *window,
 
88
                                            gboolean         active);
 
89
 
 
90
void         panel_util_set_source_rgba    (cairo_t         *cr,
 
91
                                            const GdkColor  *color,
 
92
                                            gdouble          alpha);
 
93
 
 
94
G_END_DECLS
 
95
 
 
96
#endif /* !__PANEL_BASE_WINDOW_H__ */