blob: 8b9994d35b077ce376f8481336343651a46ccbce [file] [log] [blame]
Nicolas Jagerb413b302016-05-06 11:41:32 -04001/*
Guillaume Roguez2a6150d2017-07-19 18:24:47 -04002 * Copyright (C) 2016-2017 Savoir-faire Linux Inc.
Nicolas Jagerb413b302016-05-06 11:41:32 -04003 * 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
Stepan Salenikovichae92efd2016-07-28 18:51:27 -040040 * or the default avatar, with the possible actions being to start the camera (if available) to
41 * take a new photo) or to select an existing image.
42 * @AVATAR_MANIPULATION_STATE_PHOTO: The state in which the camera is on and the video is being
43 * shown. The possible actions are to take a snapshot or to return to the previous state.
44 * @AVATAR_MANIPULATION_STATE_EDIT: The state after selecting a new image (or snapping a photo). The
45 * user must select the square area they wish to use for the avatar. The possible actions are to
46 * confirm the selection or to return to the previous state.
Nicolas Jagerb413b302016-05-06 11:41:32 -040047 */
48typedef enum
49{
50 AVATAR_MANIPULATION_STATE_CURRENT,
Stepan Salenikovichae92efd2016-07-28 18:51:27 -040051 AVATAR_MANIPULATION_STATE_PHOTO,
Nicolas Jagerb413b302016-05-06 11:41:32 -040052 AVATAR_MANIPULATION_STATE_EDIT
53} AvatarManipulationState;
54
55
56GType avatar_manipulation_get_type (void) G_GNUC_CONST;
57GtkWidget *avatar_manipulation_new (void);
Stepan Salenikovichec16deb2017-04-14 14:18:37 -040058
59/* used from the account creation wizard */
60GtkWidget *avatar_manipulation_new_from_wizard(void);
61void avatar_manipulation_wizard_completed(AvatarManipulation *);
Nicolas Jagerb413b302016-05-06 11:41:32 -040062
63G_END_DECLS
64
65#endif /* _AVATARMANIPULATION_H */