avatarmanipulation.h 2.72 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 *  Copyright (C) 2016 Savoir-faire Linux Inc.
 *  Author: Nicolas Jager <nicolas.jager@savoirfairelinux.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
 */

#ifndef _AVATARMANIPULATION_H
#define _AVATARMANIPULATION_H

#include <gtk/gtk.h>

G_BEGIN_DECLS

#define AVATAR_MANIPULATION_TYPE            (avatar_manipulation_get_type ())
#define AVATAR_MANIPULATION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), AVATAR_MANIPULATION_TYPE, AvatarManipulation))
#define AVATAR_MANIPULATION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), AVATAR_MANIPULATION_TYPE, AvatarManipulation))
#define IS_AVATAR_MANIPULATION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), AVATAR_MANIPULATION_TYPE))
#define IS_AVATAR_MANIPULATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), AVATAR_MANIPULATION_TYPE))


typedef struct _AvatarManipulation      AvatarManipulation;
typedef struct _AvatarManipulationClass AvatarManipulationClass;

/**
 * AvatarManipulationState:
 * @AVATAR_MANIPULATION_STATE_CURRENT: The initial state. The widget will display the current
 *  or the default avatar, with the possible actions being to delete (and select a new one) or to
 *  save to disk the current avatar.
 * @AVATAR_MANIPULATION_STATE_NEW: The state in which the user is selecting a new avatar. If
 *  a video device is available, it will will be turned on. The possible actions being to take a
 *  snapshot or to select an existing image from a file.
 * @AVATAR_MANIPULATION_STATE_EDIT: The state after selecting a new image when the user must
 *  select the square area they wish to use for the avatar. The possible actions being to confirm
 *  the selection or to discard it.
 */
typedef enum
{
    AVATAR_MANIPULATION_STATE_CURRENT,
    AVATAR_MANIPULATION_STATE_NEW,
    AVATAR_MANIPULATION_STATE_EDIT
} AvatarManipulationState;


GType      avatar_manipulation_get_type       (void) G_GNUC_CONST;
GtkWidget *avatar_manipulation_new            (void);
GtkWidget *avatar_manipulation_new_from_wizard(void); /* should be used from the account creation wizard */

G_END_DECLS

#endif /* _AVATARMANIPULATION_H */