Nicolas Jager | b413b30 | 2016-05-06 11:41:32 -0400 | [diff] [blame] | 1 | /* |
| 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 | |
| 25 | G_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 | |
| 34 | typedef struct _AvatarManipulation AvatarManipulation; |
| 35 | typedef struct _AvatarManipulationClass AvatarManipulationClass; |
| 36 | |
| 37 | /** |
| 38 | * AvatarManipulationState: |
| 39 | * @AVATAR_MANIPULATION_STATE_CURRENT: The initial state. The widget will display the current |
Stepan Salenikovich | ae92efd | 2016-07-28 18:51:27 -0400 | [diff] [blame] | 40 | * 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 Jager | b413b30 | 2016-05-06 11:41:32 -0400 | [diff] [blame] | 47 | */ |
| 48 | typedef enum |
| 49 | { |
| 50 | AVATAR_MANIPULATION_STATE_CURRENT, |
Stepan Salenikovich | ae92efd | 2016-07-28 18:51:27 -0400 | [diff] [blame] | 51 | AVATAR_MANIPULATION_STATE_PHOTO, |
Nicolas Jager | b413b30 | 2016-05-06 11:41:32 -0400 | [diff] [blame] | 52 | AVATAR_MANIPULATION_STATE_EDIT |
| 53 | } AvatarManipulationState; |
| 54 | |
| 55 | |
| 56 | GType avatar_manipulation_get_type (void) G_GNUC_CONST; |
| 57 | GtkWidget *avatar_manipulation_new (void); |
Stepan Salenikovich | ec16deb | 2017-04-14 14:18:37 -0400 | [diff] [blame] | 58 | |
| 59 | /* used from the account creation wizard */ |
| 60 | GtkWidget *avatar_manipulation_new_from_wizard(void); |
| 61 | void avatar_manipulation_wizard_completed(AvatarManipulation *); |
Nicolas Jager | b413b30 | 2016-05-06 11:41:32 -0400 | [diff] [blame] | 62 | |
| 63 | G_END_DECLS |
| 64 | |
| 65 | #endif /* _AVATARMANIPULATION_H */ |