blob: cb76840c38d847d4f043bba2480d354af988891f [file] [log] [blame]
Nicolas Jagerb413b302016-05-06 11:41:32 -04001/*
2 * Copyright (C) 2016 Savoir-faire Linux Inc.
3 * Author: Nicolas Jager <nicolas.jager@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.
18 */
19
20#ifndef _AVATARMANIPULATION_H
21#define _AVATARMANIPULATION_H
22
23#include <gtk/gtk.h>
24
25G_BEGIN_DECLS
26
27#define AVATAR_MANIPULATION_TYPE (avatar_manipulation_get_type ())
28#define AVATAR_MANIPULATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AVATAR_MANIPULATION_TYPE, AvatarManipulation))
29#define AVATAR_MANIPULATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), AVATAR_MANIPULATION_TYPE, AvatarManipulation))
30#define IS_AVATAR_MANIPULATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AVATAR_MANIPULATION_TYPE))
31#define IS_AVATAR_MANIPULATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), AVATAR_MANIPULATION_TYPE))
32
33
34typedef struct _AvatarManipulation AvatarManipulation;
35typedef struct _AvatarManipulationClass AvatarManipulationClass;
36
37/**
38 * AvatarManipulationState:
39 * @AVATAR_MANIPULATION_STATE_CURRENT: The initial state. The widget will display the current
40 * or the default avatar, with the possible actions being to delete (and select a new one) or to
41 * save to disk the current avatar.
42 * @AVATAR_MANIPULATION_STATE_NEW: The state in which the user is selecting a new avatar. If
43 * a video device is available, it will will be turned on. The possible actions being to take a
44 * snapshot or to select an existing image from a file.
45 * @AVATAR_MANIPULATION_STATE_EDIT: The state after selecting a new image when the user must
46 * select the square area they wish to use for the avatar. The possible actions being to confirm
47 * the selection or to discard it.
48 */
49typedef enum
50{
51 AVATAR_MANIPULATION_STATE_CURRENT,
52 AVATAR_MANIPULATION_STATE_NEW,
53 AVATAR_MANIPULATION_STATE_EDIT
54} AvatarManipulationState;
55
56
57GType avatar_manipulation_get_type (void) G_GNUC_CONST;
58GtkWidget *avatar_manipulation_new (void);
59GtkWidget *avatar_manipulation_new_from_wizard(void); /* should be used from the account creation wizard */
60
61G_END_DECLS
62
63#endif /* _AVATARMANIPULATION_H */