/*   mate-user-admin 
*   Copyright (C) 2018  zhuyaliang https://github.com/zhuyaliang/
*
*   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, see <https://www.gnu.org/licenses/>.
*/

#ifndef __USER_CROP_H__
#define __USER_CROP_H__

#include <glib.h>
#include <gtk/gtk.h>
#include <glib-object.h>

G_BEGIN_DECLS

#define USER_TYPE_CROP_AREA (user_crop_area_get_type ())
G_DECLARE_FINAL_TYPE (UserCropArea, user_crop_area, USER, CROP_AREA, GtkDrawingArea)

GtkWidget *user_crop_area_new                  (void);

GdkPixbuf *user_crop_area_get_picture          (UserCropArea  *area);

void       user_crop_area_set_picture          (UserCropArea  *area,
                                                GdkPixbuf     *pixbuf);

void       user_crop_area_set_min_size         (UserCropArea  *area,
                                                gint           width,
                                                gint           height);

void       user_crop_area_set_constrain_aspect (UserCropArea  *area,
                                                gboolean       constrain);

G_END_DECLS

#endif
