GimpDisplayShell

GimpDisplayShell

Synopsis

#define             PROJ_ROUND                          (coord)
#define             PROJ_ROUND64                        (coord)
#define             SCALEX                              (s,
                                                         x)
#define             SCALEY                              (s,
                                                         y)
#define             UNSCALEX                            (s,
                                                         x)
#define             UNSCALEY                            (s,
                                                         y)
#define             FUNSCALEX                           (s,
                                                         x)
#define             FUNSCALEY                           (s,
                                                         y)
                    GimpDisplayShell;
GtkWidget *         gimp_display_shell_new              (GimpDisplay *display,
                                                         GimpUnit unit,
                                                         gdouble scale,
                                                         GimpUIManager *popup_manager);
void                gimp_display_shell_add_overlay      (GimpDisplayShell *shell,
                                                         GtkWidget *child,
                                                         gdouble image_x,
                                                         gdouble image_y,
                                                         GimpHandleAnchor anchor,
                                                         gint spacing_x,
                                                         gint spacing_y);
void                gimp_display_shell_move_overlay     (GimpDisplayShell *shell,
                                                         GtkWidget *child,
                                                         gdouble image_x,
                                                         gdouble image_y,
                                                         GimpHandleAnchor anchor,
                                                         gint spacing_x,
                                                         gint spacing_y);
GimpImageWindow *   gimp_display_shell_get_window       (GimpDisplayShell *shell);
GimpStatusbar *     gimp_display_shell_get_statusbar    (GimpDisplayShell *shell);
void                gimp_display_shell_present          (GimpDisplayShell *shell);
void                gimp_display_shell_reconnect        (GimpDisplayShell *shell);
void                gimp_display_shell_empty            (GimpDisplayShell *shell);
void                gimp_display_shell_fill             (GimpDisplayShell *shell,
                                                         GimpImage *image,
                                                         GimpUnit unit,
                                                         gdouble scale);
void                gimp_display_shell_scale_changed    (GimpDisplayShell *shell);
void                gimp_display_shell_scaled           (GimpDisplayShell *shell);
void                gimp_display_shell_scrolled         (GimpDisplayShell *shell);
GimpUnit            gimp_display_shell_get_unit         (GimpDisplayShell *shell);
void                gimp_display_shell_set_unit         (GimpDisplayShell *shell,
                                                         GimpUnit unit);
gboolean            gimp_display_shell_snap_coords      (GimpDisplayShell *shell,
                                                         GimpCoords *coords,
                                                         gint snap_offset_x,
                                                         gint snap_offset_y,
                                                         gint snap_width,
                                                         gint snap_height);
gboolean            gimp_display_shell_mask_bounds      (GimpDisplayShell *shell,
                                                         gint *x1,
                                                         gint *y1,
                                                         gint *x2,
                                                         gint *y2);
void                gimp_display_shell_flush            (GimpDisplayShell *shell,
                                                         gboolean now);
void                gimp_display_shell_pause            (GimpDisplayShell *shell);
void                gimp_display_shell_resume           (GimpDisplayShell *shell);
void                gimp_display_shell_set_highlight    (GimpDisplayShell *shell,
                                                         const GdkRectangle *highlight);
void                gimp_display_shell_set_mask         (GimpDisplayShell *shell,
                                                         GimpDrawable *mask,
                                                         const GimpRGB *color);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GimpDisplayShell

Implemented Interfaces

GimpDisplayShell implements AtkImplementorIface, GtkBuildable, GtkOrientable, GimpProgressInterface and GimpColorManagedInterface.

Properties

  "display"                  GimpDisplay*          : Read / Write / Construct Only
  "icon"                     GdkPixbuf*            : Read / Write
  "popup-manager"            GimpUIManager*        : Read / Write / Construct Only
  "status"                   gchar*                : Read / Write
  "title"                    gchar*                : Read / Write / Construct
  "unit"                     GimpUnit              : Read / Write

Signals

  "reconnect"                                      : Run First
  "scaled"                                         : Run First
  "scrolled"                                       : Run First

Description

Details

PROJ_ROUND()

#define  PROJ_ROUND(coord)   ((gint) RINT (coord))


PROJ_ROUND64()

#define  PROJ_ROUND64(coord) ((gint64) RINT (coord))


SCALEX()

#define  SCALEX(s,x)      PROJ_ROUND ((x) * (s)->scale_x)


SCALEY()

#define  SCALEY(s,y)      PROJ_ROUND ((y) * (s)->scale_y)


UNSCALEX()

#define  UNSCALEX(s,x)    ((gint) ((x) / (s)->scale_x))


UNSCALEY()

#define  UNSCALEY(s,y)    ((gint) ((y) / (s)->scale_y))


FUNSCALEX()

#define  FUNSCALEX(s,x)   ((x) / (s)->scale_x)


FUNSCALEY()

#define  FUNSCALEY(s,y)   ((y) / (s)->scale_y)


GimpDisplayShell

typedef struct _GimpDisplayShell GimpDisplayShell;


gimp_display_shell_new ()

GtkWidget *         gimp_display_shell_new              (GimpDisplay *display,
                                                         GimpUnit unit,
                                                         gdouble scale,
                                                         GimpUIManager *popup_manager);


gimp_display_shell_add_overlay ()

void                gimp_display_shell_add_overlay      (GimpDisplayShell *shell,
                                                         GtkWidget *child,
                                                         gdouble image_x,
                                                         gdouble image_y,
                                                         GimpHandleAnchor anchor,
                                                         gint spacing_x,
                                                         gint spacing_y);


gimp_display_shell_move_overlay ()

void                gimp_display_shell_move_overlay     (GimpDisplayShell *shell,
                                                         GtkWidget *child,
                                                         gdouble image_x,
                                                         gdouble image_y,
                                                         GimpHandleAnchor anchor,
                                                         gint spacing_x,
                                                         gint spacing_y);


gimp_display_shell_get_window ()

GimpImageWindow *   gimp_display_shell_get_window       (GimpDisplayShell *shell);


gimp_display_shell_get_statusbar ()

GimpStatusbar *     gimp_display_shell_get_statusbar    (GimpDisplayShell *shell);


gimp_display_shell_present ()

void                gimp_display_shell_present          (GimpDisplayShell *shell);


gimp_display_shell_reconnect ()

void                gimp_display_shell_reconnect        (GimpDisplayShell *shell);


gimp_display_shell_empty ()

void                gimp_display_shell_empty            (GimpDisplayShell *shell);


gimp_display_shell_fill ()

void                gimp_display_shell_fill             (GimpDisplayShell *shell,
                                                         GimpImage *image,
                                                         GimpUnit unit,
                                                         gdouble scale);


gimp_display_shell_scale_changed ()

void                gimp_display_shell_scale_changed    (GimpDisplayShell *shell);


gimp_display_shell_scaled ()

void                gimp_display_shell_scaled           (GimpDisplayShell *shell);


gimp_display_shell_scrolled ()

void                gimp_display_shell_scrolled         (GimpDisplayShell *shell);


gimp_display_shell_get_unit ()

GimpUnit            gimp_display_shell_get_unit         (GimpDisplayShell *shell);


gimp_display_shell_set_unit ()

void                gimp_display_shell_set_unit         (GimpDisplayShell *shell,
                                                         GimpUnit unit);


gimp_display_shell_snap_coords ()

gboolean            gimp_display_shell_snap_coords      (GimpDisplayShell *shell,
                                                         GimpCoords *coords,
                                                         gint snap_offset_x,
                                                         gint snap_offset_y,
                                                         gint snap_width,
                                                         gint snap_height);


gimp_display_shell_mask_bounds ()

gboolean            gimp_display_shell_mask_bounds      (GimpDisplayShell *shell,
                                                         gint *x1,
                                                         gint *y1,
                                                         gint *x2,
                                                         gint *y2);


gimp_display_shell_flush ()

void                gimp_display_shell_flush            (GimpDisplayShell *shell,
                                                         gboolean now);


gimp_display_shell_pause ()

void                gimp_display_shell_pause            (GimpDisplayShell *shell);

This function increments the pause count or the display shell. If it was zero coming in, then the function pauses the active tool, so that operations on the display can take place without corrupting anything that the tool has drawn. It "undraws" the current tool drawing, and must be followed by gimp_display_shell_resume() after the operation in question is completed.

shell :

a display shell

gimp_display_shell_resume ()

void                gimp_display_shell_resume           (GimpDisplayShell *shell);

This function decrements the pause count for the display shell. If this brings it to zero, then the current tool is resumed. It is an error to call this function without having previously called gimp_display_shell_pause().

shell :

a display shell

gimp_display_shell_set_highlight ()

void                gimp_display_shell_set_highlight    (GimpDisplayShell *shell,
                                                         const GdkRectangle *highlight);

This function allows to set an area of the image that should be accentuated. The actual implementation is to dim all pixels outside this rectangle. Passing NULL for highlight unsets the rectangle.

shell :

a GimpDisplayShell

highlight :

a rectangle in image coordinates that should be brought out

gimp_display_shell_set_mask ()

void                gimp_display_shell_set_mask         (GimpDisplayShell *shell,
                                                         GimpDrawable *mask,
                                                         const GimpRGB *color);

Allows to preview a selection (used by the foreground selection tool). Pixels that are not selected (> 127) in the mask are tinted with the given color.

shell :

a GimpDisplayShell

mask :

a GimpDrawable (1 byte per pixel)

color :

the color to use for drawing the mask

Property Details

The "display" property

  "display"                  GimpDisplay*          : Read / Write / Construct Only


The "icon" property

  "icon"                     GdkPixbuf*            : Read / Write


The "popup-manager" property

  "popup-manager"            GimpUIManager*        : Read / Write / Construct Only


The "status" property

  "status"                   gchar*                : Read / Write

Default value: NULL


The "title" property

  "title"                    gchar*                : Read / Write / Construct

Default value: "GNU Image Manipulation Program"


The "unit" property

  "unit"                     GimpUnit              : Read / Write

Allowed values: [0,65535]

Default value: 0

Signal Details

The "reconnect" signal

void                user_function                      (GimpDisplayShell *gimpdisplayshell,
                                                        gpointer          user_data)             : Run First

gimpdisplayshell :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "scaled" signal

void                user_function                      (GimpDisplayShell *gimpdisplayshell,
                                                        gpointer          user_data)             : Run First

gimpdisplayshell :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "scrolled" signal

void                user_function                      (GimpDisplayShell *gimpdisplayshell,
                                                        gpointer          user_data)             : Run First

gimpdisplayshell :

the object which received the signal.

user_data :

user data set when the signal handler was connected.