blob: 28c17b11ef17c818bb2c1784852b3315b4ae0f6a [file] [log] [blame]
Stepan Salenikovich0cf247d2015-07-24 17:36:32 -04001/*
Guillaume Roguez2a6150d2017-07-19 18:24:47 -04002 * Copyright (C) 2015-2017 Savoir-faire Linux Inc.
Stepan Salenikovich0cf247d2015-07-24 17:36:32 -04003 * Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Stepan Salenikovich0cf247d2015-07-24 17:36:32 -040018 */
19
20#ifndef _CONTACTPOPOVER_H
21#define _CONTACTPOPOVER_H
22
23#include <gtk/gtk.h>
24
25G_BEGIN_DECLS
26
27class ContactMethod;
28
29#define CONTACT_POPOVER_TYPE (contact_popover_get_type ())
30#define CONTACT_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACT_POPOVER_TYPE, ContactPopover))
31#define CONTACT_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CONTACT_POPOVER_TYPE, ContactPopoverClass))
32#define IS_CONTACT_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CONTACT_POPOVER_TYPE))
33#define IS_CONTACT_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CONTACT_POPOVER_TYPE))
34
35typedef struct _ContactPopover ContactPopover;
36typedef struct _ContactPopoverClass ContactPopoverClass;
37
38GType contact_popover_get_type (void) G_GNUC_CONST;
39
40/**
41 * For gtk+ >= 3.12 this will create a GtkPopover pointing to the parent and if
42 * given, the GdkRectangle. Otherwise, this will create an undecorated GtkWindow
43 * which will be centered on the toplevel window of the given parent.
44 * This is to ensure cmpatibility with gtk+3.10.
45 */
46GtkWidget *contact_popover_new (ContactMethod *cm, GtkWidget *parent, GdkRectangle *rect);
47
48G_END_DECLS
49
50#endif /* _CONTACTPOPOVER_H */