1/*
2 * bluroverlay.h
3 * This file is part of gtk
4 *
5 * Copyright (C) 2011 - Ignacio Casal Quinteiro, Mike Krüger
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __BLUR_OVERLAY_H__
22#define __BLUR_OVERLAY_H__
23
24#include <gtk/gtk.h>
25
26G_BEGIN_DECLS
27
28#define BLUR_TYPE_OVERLAY (blur_overlay_get_type ())
29#define BLUR_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BLUR_TYPE_OVERLAY, BlurOverlay))
30#define BLUR_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BLUR_TYPE_OVERLAY, BlurOverlayClass))
31#define BLUR_IS_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BLUR_TYPE_OVERLAY))
32#define BLUR_IS_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BLUR_TYPE_OVERLAY))
33#define BLUR_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BLUR_TYPE_OVERLAY, BlurOverlayClass))
34
35typedef struct _BlurOverlay BlurOverlay;
36typedef struct _BlurOverlayClass BlurOverlayClass;
37
38struct _BlurOverlay
39{
40 GtkWidget parent_instance;
41
42 GtkWidget *main_widget;
43};
44
45struct _BlurOverlayClass
46{
47 GtkWidgetClass parent_class;
48
49 gboolean (*get_child_position) (BlurOverlay *overlay,
50 GtkWidget *widget,
51 GtkAllocation *allocation);
52};
53
54GDK_AVAILABLE_IN_ALL
55GType blur_overlay_get_type (void) G_GNUC_CONST;
56GDK_AVAILABLE_IN_ALL
57GtkWidget *blur_overlay_new (void);
58GDK_AVAILABLE_IN_ALL
59void blur_overlay_add_overlay (BlurOverlay *overlay,
60 GtkWidget *widget,
61 double blur);
62GDK_AVAILABLE_IN_ALL
63void blur_overlay_set_child (BlurOverlay *overlay,
64 GtkWidget *widget);
65
66G_END_DECLS
67
68#endif /* __BLUR_OVERLAY_H__ */
69

source code of gtk/demos/gtk-demo/bluroverlay.h