OssoABookAvatarEditorDialog

OssoABookAvatarEditorDialog — A dialog for modifying avatar images.

Synopsis

                    OssoABookAvatarEditorDialog;
GtkWidget*          osso_abook_avatar_editor_dialog_new (GtkWindow *parent,
                                                         GdkPixbuf *pixbuf);
void                osso_abook_avatar_editor_dialog_set_pixbuf
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         GdkPixbuf *pixbuf);
GdkPixbuf*          osso_abook_avatar_editor_dialog_get_pixbuf
                                                        (OssoABookAvatarEditorDialog *dialog);
GdkPixbuf*          osso_abook_avatar_editor_dialog_get_scaled_pixbuf
                                                        (OssoABookAvatarEditorDialog *dialog);
void                osso_abook_avatar_editor_dialog_set_avatar_size
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         int size);
int                 osso_abook_avatar_editor_dialog_get_avatar_size
                                                        (OssoABookAvatarEditorDialog *dialog);
void                osso_abook_avatar_editor_dialog_set_zoom_steps
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         int steps);
int                 osso_abook_avatar_editor_dialog_get_zoom_steps
                                                        (OssoABookAvatarEditorDialog *dialog);
void                osso_abook_avatar_editor_dialog_set_maximum_zoom
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         double zoom);
double              osso_abook_avatar_editor_dialog_get_maximum_zoom
                                                        (OssoABookAvatarEditorDialog *dialog);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----OssoABookAvatarEditorDialog

Implemented Interfaces

OssoABookAvatarEditorDialog implements AtkImplementorIface and GtkBuildable.

Properties

  "avatar-size"              gint                  : Read / Write
  "maximum-zoom"             gdouble               : Read / Write
  "pixbuf"                   GdkPixbuf*            : Read / Write
  "zoom-steps"               gint                  : Read / Write

Description

This module provides a dialog that allows a user to do some very basic editing of avatar images, including scaling and cropping.

Details

OssoABookAvatarEditorDialog

typedef struct _OssoABookAvatarEditorDialog OssoABookAvatarEditorDialog;

osso_abook_avatar_editor_dialog_new ()

GtkWidget*          osso_abook_avatar_editor_dialog_new (GtkWindow *parent,
                                                         GdkPixbuf *pixbuf);

Creates a new OssoABookAvatarEditorDialog for editing pixbuf

parent : an optional parent GtkWindow
pixbuf : the pixbuf to edit

osso_abook_avatar_editor_dialog_set_pixbuf ()

void                osso_abook_avatar_editor_dialog_set_pixbuf
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         GdkPixbuf *pixbuf);

Sets pixbuf as the image to edit

dialog : a OssoABookAvatarEditorDialog
pixbuf : the pixbuf to edit

osso_abook_avatar_editor_dialog_get_pixbuf ()

GdkPixbuf*          osso_abook_avatar_editor_dialog_get_pixbuf
                                                        (OssoABookAvatarEditorDialog *dialog);

dialog : a OssoABookAvatarEditorDialog
Returns : the pixbuf being edited, owned by dialog

osso_abook_avatar_editor_dialog_get_scaled_pixbuf ()

GdkPixbuf*          osso_abook_avatar_editor_dialog_get_scaled_pixbuf
                                                        (OssoABookAvatarEditorDialog *dialog);

dialog : a OssoABookAvatarEditorDialog
Returns : a scaled copy of the pixbuf being edited, owned by the caller.

osso_abook_avatar_editor_dialog_set_avatar_size ()

void                osso_abook_avatar_editor_dialog_set_avatar_size
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         int size);

Sets the size of the avatar to be size

dialog : a OssoABookAvatarEditorDialog
size : the size of the avatar

osso_abook_avatar_editor_dialog_get_avatar_size ()

int                 osso_abook_avatar_editor_dialog_get_avatar_size
                                                        (OssoABookAvatarEditorDialog *dialog);

dialog : a OssoABookAvatarEditorDialog
Returns : the size of the avatar

osso_abook_avatar_editor_dialog_set_zoom_steps ()

void                osso_abook_avatar_editor_dialog_set_zoom_steps
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         int steps);

Sets how many steps there should be when zooming

dialog : a OssoABookAvatarEditorDialog
steps : the number of zooming steps

osso_abook_avatar_editor_dialog_get_zoom_steps ()

int                 osso_abook_avatar_editor_dialog_get_zoom_steps
                                                        (OssoABookAvatarEditorDialog *dialog);

dialog : a OssoABookAvatarEditorDialog
Returns : the number of zooming steps

osso_abook_avatar_editor_dialog_set_maximum_zoom ()

void                osso_abook_avatar_editor_dialog_set_maximum_zoom
                                                        (OssoABookAvatarEditorDialog *dialog,
                                                         double zoom);

Sets the maximum zoom value to zoom

dialog : a OssoABookAvatarEditorDialog
zoom : maximum zoom value

osso_abook_avatar_editor_dialog_get_maximum_zoom ()

double              osso_abook_avatar_editor_dialog_get_maximum_zoom
                                                        (OssoABookAvatarEditorDialog *dialog);

dialog : a OssoABookAvatarEditorDialog
Returns : the maximum zoom value

Property Details

The "avatar-size" property

  "avatar-size"              gint                  : Read / Write

The size of the avatar image.

Allowed values: >= 1

Default value: 216


The "maximum-zoom" property

  "maximum-zoom"             gdouble               : Read / Write

The maximum allowed zoom level.

Allowed values: >= 1

Default value: 2


The "pixbuf" property

  "pixbuf"                   GdkPixbuf*            : Read / Write

The image to edit.


The "zoom-steps" property

  "zoom-steps"               gint                  : Read / Write

The number of zooming steps.

Allowed values: >= 1

Default value: 20