GimpContext

GimpContext

Synopsis

                    GimpContext;
GimpContext *       gimp_context_new                    (Gimp *gimp,
                                                         const gchar *name,
                                                         GimpContext *template);
GimpContext *       gimp_context_get_parent             (const GimpContext *context);
void                gimp_context_set_parent             (GimpContext *context,
                                                         GimpContext *parent);
void                gimp_context_define_property        (GimpContext *context,
                                                         GimpContextPropType prop,
                                                         gboolean defined);
gboolean            gimp_context_property_defined       (GimpContext *context,
                                                         GimpContextPropType prop);
void                gimp_context_define_properties      (GimpContext *context,
                                                         GimpContextPropMask props_mask,
                                                         gboolean defined);
GimpContextPropMask gimp_context_get_serialize_properties
                                                        (GimpContext *context);
void                gimp_context_set_serialize_properties
                                                        (GimpContext *context,
                                                         GimpContextPropMask props_mask);
void                gimp_context_copy_property          (GimpContext *src,
                                                         GimpContext *dest,
                                                         GimpContextPropType prop);
void                gimp_context_copy_properties        (GimpContext *src,
                                                         GimpContext *dest,
                                                         GimpContextPropMask props_mask);
GimpContextPropType gimp_context_type_to_property       (GType type);
const gchar *       gimp_context_type_to_prop_name      (GType type);
const gchar *       gimp_context_type_to_signal_name    (GType type);
GimpObject *        gimp_context_get_by_type            (GimpContext *context,
                                                         GType type);
void                gimp_context_set_by_type            (GimpContext *context,
                                                         GType type,
                                                         GimpObject *object);
void                gimp_context_changed_by_type        (GimpContext *context,
                                                         GType type);
GimpImage *         gimp_context_get_image              (GimpContext *context);
void                gimp_context_set_image              (GimpContext *context,
                                                         GimpImage *image);
void                gimp_context_image_changed          (GimpContext *context);
gpointer            gimp_context_get_display            (GimpContext *context);
void                gimp_context_set_display            (GimpContext *context,
                                                         gpointer display);
void                gimp_context_display_changed        (GimpContext *context);
GimpToolInfo *      gimp_context_get_tool               (GimpContext *context);
void                gimp_context_set_tool               (GimpContext *context,
                                                         GimpToolInfo *tool_info);
void                gimp_context_tool_changed           (GimpContext *context);
GimpPaintInfo *     gimp_context_get_paint_info         (GimpContext *context);
void                gimp_context_paint_info_changed     (GimpContext *context);
void                gimp_context_set_paint_info         (GimpContext *context,
                                                         GimpPaintInfo *paint_info);
void                gimp_context_get_foreground         (GimpContext *context,
                                                         GimpRGB *color);
void                gimp_context_set_foreground         (GimpContext *context,
                                                         const GimpRGB *color);
void                gimp_context_foreground_changed     (GimpContext *context);
void                gimp_context_get_background         (GimpContext *context,
                                                         GimpRGB *color);
void                gimp_context_set_background         (GimpContext *context,
                                                         const GimpRGB *color);
void                gimp_context_background_changed     (GimpContext *context);
void                gimp_context_set_default_colors     (GimpContext *context);
void                gimp_context_swap_colors            (GimpContext *context);
gdouble             gimp_context_get_opacity            (GimpContext *context);
void                gimp_context_set_opacity            (GimpContext *context,
                                                         gdouble opacity);
void                gimp_context_opacity_changed        (GimpContext *context);
GimpLayerModeEffects gimp_context_get_paint_mode        (GimpContext *context);
void                gimp_context_set_paint_mode         (GimpContext *context,
                                                         GimpLayerModeEffects paint_mode);
void                gimp_context_paint_mode_changed     (GimpContext *context);
GimpBrush *         gimp_context_get_brush              (GimpContext *context);
void                gimp_context_set_brush              (GimpContext *context,
                                                         GimpBrush *brush);
void                gimp_context_brush_changed          (GimpContext *context);
GimpDynamics *      gimp_context_get_dynamics           (GimpContext *context);
void                gimp_context_set_dynamics           (GimpContext *context,
                                                         GimpDynamics *dynamics);
void                gimp_context_dynamics_changed       (GimpContext *context);
GimpPattern *       gimp_context_get_pattern            (GimpContext *context);
void                gimp_context_set_pattern            (GimpContext *context,
                                                         GimpPattern *pattern);
void                gimp_context_pattern_changed        (GimpContext *context);
GimpGradient *      gimp_context_get_gradient           (GimpContext *context);
void                gimp_context_set_gradient           (GimpContext *context,
                                                         GimpGradient *gradient);
void                gimp_context_gradient_changed       (GimpContext *context);
GimpPalette *       gimp_context_get_palette            (GimpContext *context);
void                gimp_context_set_palette            (GimpContext *context,
                                                         GimpPalette *palette);
void                gimp_context_palette_changed        (GimpContext *context);
GimpToolPreset *    gimp_context_get_tool_preset        (GimpContext *context);
void                gimp_context_set_tool_preset        (GimpContext *context,
                                                         GimpToolPreset *tool_preset);
void                gimp_context_tool_preset_changed    (GimpContext *context);
GimpFont *          gimp_context_get_font               (GimpContext *context);
const gchar *       gimp_context_get_font_name          (GimpContext *context);
void                gimp_context_set_font               (GimpContext *context,
                                                         GimpFont *font);
void                gimp_context_set_font_name          (GimpContext *context,
                                                         const gchar *name);
void                gimp_context_font_changed           (GimpContext *context);
GimpBuffer *        gimp_context_get_buffer             (GimpContext *context);
void                gimp_context_set_buffer             (GimpContext *context,
                                                         GimpBuffer *palette);
void                gimp_context_buffer_changed         (GimpContext *context);
GimpImagefile *     gimp_context_get_imagefile          (GimpContext *context);
void                gimp_context_set_imagefile          (GimpContext *context,
                                                         GimpImagefile *imagefile);
void                gimp_context_imagefile_changed      (GimpContext *context);
GimpTemplate *      gimp_context_get_template           (GimpContext *context);
void                gimp_context_set_template           (GimpContext *context,
                                                         GimpTemplate *template);
void                gimp_context_template_changed       (GimpContext *context);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpViewable
               +----GimpContext
                     +----GimpToolOptions
                     +----GimpDeviceInfo
                     +----GimpFillOptions

Implemented Interfaces

GimpContext implements GimpConfigInterface.

Properties

  "background"               GimpRGB*              : Read / Write / Construct
  "brush"                    GimpBrush*            : Read / Write
  "buffer"                   GimpBuffer*           : Read / Write
  "display"                  GimpObject*           : Read / Write
  "dynamics"                 GimpDynamics*         : Read / Write
  "font"                     GimpFont*             : Read / Write
  "foreground"               GimpRGB*              : Read / Write / Construct
  "gimp"                     Gimp*                 : Read / Write / Construct Only
  "gradient"                 GimpGradient*         : Read / Write
  "image"                    GimpImage*            : Read / Write
  "imagefile"                GimpImagefile*        : Read / Write
  "opacity"                  gdouble               : Read / Write / Construct
  "paint-info"               GimpPaintInfo*        : Read / Write
  "paint-mode"               GimpLayerModeEffects  : Read / Write / Construct
  "palette"                  GimpPalette*          : Read / Write
  "pattern"                  GimpPattern*          : Read / Write
  "template"                 GimpTemplate*         : Read / Write
  "tool"                     GimpToolInfo*         : Read / Write
  "tool-preset"              GimpToolPreset*       : Read / Write

Signals

  "background-changed"                             : Run First
  "brush-changed"                                  : Run First
  "buffer-changed"                                 : Run First
  "display-changed"                                : Run First
  "dynamics-changed"                               : Run First
  "font-changed"                                   : Run First
  "foreground-changed"                             : Run First
  "gradient-changed"                               : Run First
  "image-changed"                                  : Run First
  "imagefile-changed"                              : Run First
  "opacity-changed"                                : Run First
  "paint-info-changed"                             : Run First
  "paint-mode-changed"                             : Run First
  "palette-changed"                                : Run First
  "pattern-changed"                                : Run First
  "template-changed"                               : Run First
  "tool-changed"                                   : Run First
  "tool-preset-changed"                            : Run First

Description

Details

GimpContext

typedef struct _GimpContext GimpContext;

Holds state such as the active image, active display, active brush, active foreground and background color, and so on. There can many instances of contexts. The user context is what the user sees and interacts with but there can also be contexts for docks and for plug-ins.


gimp_context_new ()

GimpContext *       gimp_context_new                    (Gimp *gimp,
                                                         const gchar *name,
                                                         GimpContext *template);


gimp_context_get_parent ()

GimpContext *       gimp_context_get_parent             (const GimpContext *context);


gimp_context_set_parent ()

void                gimp_context_set_parent             (GimpContext *context,
                                                         GimpContext *parent);


gimp_context_define_property ()

void                gimp_context_define_property        (GimpContext *context,
                                                         GimpContextPropType prop,
                                                         gboolean defined);


gimp_context_property_defined ()

gboolean            gimp_context_property_defined       (GimpContext *context,
                                                         GimpContextPropType prop);


gimp_context_define_properties ()

void                gimp_context_define_properties      (GimpContext *context,
                                                         GimpContextPropMask props_mask,
                                                         gboolean defined);


gimp_context_get_serialize_properties ()

GimpContextPropMask gimp_context_get_serialize_properties
                                                        (GimpContext *context);


gimp_context_set_serialize_properties ()

void                gimp_context_set_serialize_properties
                                                        (GimpContext *context,
                                                         GimpContextPropMask props_mask);


gimp_context_copy_property ()

void                gimp_context_copy_property          (GimpContext *src,
                                                         GimpContext *dest,
                                                         GimpContextPropType prop);


gimp_context_copy_properties ()

void                gimp_context_copy_properties        (GimpContext *src,
                                                         GimpContext *dest,
                                                         GimpContextPropMask props_mask);


gimp_context_type_to_property ()

GimpContextPropType gimp_context_type_to_property       (GType type);


gimp_context_type_to_prop_name ()

const gchar *       gimp_context_type_to_prop_name      (GType type);


gimp_context_type_to_signal_name ()

const gchar *       gimp_context_type_to_signal_name    (GType type);


gimp_context_get_by_type ()

GimpObject *        gimp_context_get_by_type            (GimpContext *context,
                                                         GType type);


gimp_context_set_by_type ()

void                gimp_context_set_by_type            (GimpContext *context,
                                                         GType type,
                                                         GimpObject *object);


gimp_context_changed_by_type ()

void                gimp_context_changed_by_type        (GimpContext *context,
                                                         GType type);


gimp_context_get_image ()

GimpImage *         gimp_context_get_image              (GimpContext *context);


gimp_context_set_image ()

void                gimp_context_set_image              (GimpContext *context,
                                                         GimpImage *image);


gimp_context_image_changed ()

void                gimp_context_image_changed          (GimpContext *context);


gimp_context_get_display ()

gpointer            gimp_context_get_display            (GimpContext *context);


gimp_context_set_display ()

void                gimp_context_set_display            (GimpContext *context,
                                                         gpointer display);


gimp_context_display_changed ()

void                gimp_context_display_changed        (GimpContext *context);


gimp_context_get_tool ()

GimpToolInfo *      gimp_context_get_tool               (GimpContext *context);


gimp_context_set_tool ()

void                gimp_context_set_tool               (GimpContext *context,
                                                         GimpToolInfo *tool_info);


gimp_context_tool_changed ()

void                gimp_context_tool_changed           (GimpContext *context);


gimp_context_get_paint_info ()

GimpPaintInfo *     gimp_context_get_paint_info         (GimpContext *context);


gimp_context_paint_info_changed ()

void                gimp_context_paint_info_changed     (GimpContext *context);


gimp_context_set_paint_info ()

void                gimp_context_set_paint_info         (GimpContext *context,
                                                         GimpPaintInfo *paint_info);


gimp_context_get_foreground ()

void                gimp_context_get_foreground         (GimpContext *context,
                                                         GimpRGB *color);


gimp_context_set_foreground ()

void                gimp_context_set_foreground         (GimpContext *context,
                                                         const GimpRGB *color);


gimp_context_foreground_changed ()

void                gimp_context_foreground_changed     (GimpContext *context);


gimp_context_get_background ()

void                gimp_context_get_background         (GimpContext *context,
                                                         GimpRGB *color);


gimp_context_set_background ()

void                gimp_context_set_background         (GimpContext *context,
                                                         const GimpRGB *color);


gimp_context_background_changed ()

void                gimp_context_background_changed     (GimpContext *context);


gimp_context_set_default_colors ()

void                gimp_context_set_default_colors     (GimpContext *context);


gimp_context_swap_colors ()

void                gimp_context_swap_colors            (GimpContext *context);


gimp_context_get_opacity ()

gdouble             gimp_context_get_opacity            (GimpContext *context);


gimp_context_set_opacity ()

void                gimp_context_set_opacity            (GimpContext *context,
                                                         gdouble opacity);


gimp_context_opacity_changed ()

void                gimp_context_opacity_changed        (GimpContext *context);


gimp_context_get_paint_mode ()

GimpLayerModeEffects gimp_context_get_paint_mode        (GimpContext *context);


gimp_context_set_paint_mode ()

void                gimp_context_set_paint_mode         (GimpContext *context,
                                                         GimpLayerModeEffects paint_mode);


gimp_context_paint_mode_changed ()

void                gimp_context_paint_mode_changed     (GimpContext *context);


gimp_context_get_brush ()

GimpBrush *         gimp_context_get_brush              (GimpContext *context);


gimp_context_set_brush ()

void                gimp_context_set_brush              (GimpContext *context,
                                                         GimpBrush *brush);


gimp_context_brush_changed ()

void                gimp_context_brush_changed          (GimpContext *context);


gimp_context_get_dynamics ()

GimpDynamics *      gimp_context_get_dynamics           (GimpContext *context);


gimp_context_set_dynamics ()

void                gimp_context_set_dynamics           (GimpContext *context,
                                                         GimpDynamics *dynamics);


gimp_context_dynamics_changed ()

void                gimp_context_dynamics_changed       (GimpContext *context);


gimp_context_get_pattern ()

GimpPattern *       gimp_context_get_pattern            (GimpContext *context);


gimp_context_set_pattern ()

void                gimp_context_set_pattern            (GimpContext *context,
                                                         GimpPattern *pattern);


gimp_context_pattern_changed ()

void                gimp_context_pattern_changed        (GimpContext *context);


gimp_context_get_gradient ()

GimpGradient *      gimp_context_get_gradient           (GimpContext *context);


gimp_context_set_gradient ()

void                gimp_context_set_gradient           (GimpContext *context,
                                                         GimpGradient *gradient);


gimp_context_gradient_changed ()

void                gimp_context_gradient_changed       (GimpContext *context);


gimp_context_get_palette ()

GimpPalette *       gimp_context_get_palette            (GimpContext *context);


gimp_context_set_palette ()

void                gimp_context_set_palette            (GimpContext *context,
                                                         GimpPalette *palette);


gimp_context_palette_changed ()

void                gimp_context_palette_changed        (GimpContext *context);


gimp_context_get_tool_preset ()

GimpToolPreset *    gimp_context_get_tool_preset        (GimpContext *context);


gimp_context_set_tool_preset ()

void                gimp_context_set_tool_preset        (GimpContext *context,
                                                         GimpToolPreset *tool_preset);


gimp_context_tool_preset_changed ()

void                gimp_context_tool_preset_changed    (GimpContext *context);


gimp_context_get_font ()

GimpFont *          gimp_context_get_font               (GimpContext *context);


gimp_context_get_font_name ()

const gchar *       gimp_context_get_font_name          (GimpContext *context);


gimp_context_set_font ()

void                gimp_context_set_font               (GimpContext *context,
                                                         GimpFont *font);


gimp_context_set_font_name ()

void                gimp_context_set_font_name          (GimpContext *context,
                                                         const gchar *name);


gimp_context_font_changed ()

void                gimp_context_font_changed           (GimpContext *context);


gimp_context_get_buffer ()

GimpBuffer *        gimp_context_get_buffer             (GimpContext *context);


gimp_context_set_buffer ()

void                gimp_context_set_buffer             (GimpContext *context,
                                                         GimpBuffer *palette);


gimp_context_buffer_changed ()

void                gimp_context_buffer_changed         (GimpContext *context);


gimp_context_get_imagefile ()

GimpImagefile *     gimp_context_get_imagefile          (GimpContext *context);


gimp_context_set_imagefile ()

void                gimp_context_set_imagefile          (GimpContext *context,
                                                         GimpImagefile *imagefile);


gimp_context_imagefile_changed ()

void                gimp_context_imagefile_changed      (GimpContext *context);


gimp_context_get_template ()

GimpTemplate *      gimp_context_get_template           (GimpContext *context);


gimp_context_set_template ()

void                gimp_context_set_template           (GimpContext *context,
                                                         GimpTemplate *template);


gimp_context_template_changed ()

void                gimp_context_template_changed       (GimpContext *context);

Property Details

The "background" property

  "background"               GimpRGB*              : Read / Write / Construct


The "brush" property

  "brush"                    GimpBrush*            : Read / Write


The "buffer" property

  "buffer"                   GimpBuffer*           : Read / Write


The "display" property

  "display"                  GimpObject*           : Read / Write


The "dynamics" property

  "dynamics"                 GimpDynamics*         : Read / Write


The "font" property

  "font"                     GimpFont*             : Read / Write


The "foreground" property

  "foreground"               GimpRGB*              : Read / Write / Construct


The "gimp" property

  "gimp"                     Gimp*                 : Read / Write / Construct Only


The "gradient" property

  "gradient"                 GimpGradient*         : Read / Write


The "image" property

  "image"                    GimpImage*            : Read / Write


The "imagefile" property

  "imagefile"                GimpImagefile*        : Read / Write


The "opacity" property

  "opacity"                  gdouble               : Read / Write / Construct

Opacity.

Allowed values: [0,1]

Default value: 1


The "paint-info" property

  "paint-info"               GimpPaintInfo*        : Read / Write


The "paint-mode" property

  "paint-mode"               GimpLayerModeEffects  : Read / Write / Construct

Paint Mode.

Default value: GIMP_NORMAL_MODE


The "palette" property

  "palette"                  GimpPalette*          : Read / Write


The "pattern" property

  "pattern"                  GimpPattern*          : Read / Write


The "template" property

  "template"                 GimpTemplate*         : Read / Write


The "tool" property

  "tool"                     GimpToolInfo*         : Read / Write


The "tool-preset" property

  "tool-preset"              GimpToolPreset*       : Read / Write

Signal Details

The "background-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpRGB     *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "brush-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpBrush   *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "buffer-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpBuffer  *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "display-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpObject  *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "dynamics-changed" signal

void                user_function                      (GimpContext  *gimpcontext,
                                                        GimpDynamics *arg1,
                                                        gpointer      user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "font-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpFont    *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "foreground-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpRGB     *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "gradient-changed" signal

void                user_function                      (GimpContext  *gimpcontext,
                                                        GimpGradient *arg1,
                                                        gpointer      user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "image-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpImage   *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "imagefile-changed" signal

void                user_function                      (GimpContext   *gimpcontext,
                                                        GimpImagefile *arg1,
                                                        gpointer       user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "opacity-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        gdouble      arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "paint-info-changed" signal

void                user_function                      (GimpContext   *gimpcontext,
                                                        GimpPaintInfo *arg1,
                                                        gpointer       user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "paint-mode-changed" signal

void                user_function                      (GimpContext         *gimpcontext,
                                                        GimpLayerModeEffects arg1,
                                                        gpointer             user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "palette-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpPalette *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "pattern-changed" signal

void                user_function                      (GimpContext *gimpcontext,
                                                        GimpPattern *arg1,
                                                        gpointer     user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "template-changed" signal

void                user_function                      (GimpContext  *gimpcontext,
                                                        GimpTemplate *arg1,
                                                        gpointer      user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "tool-changed" signal

void                user_function                      (GimpContext  *gimpcontext,
                                                        GimpToolInfo *arg1,
                                                        gpointer      user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "tool-preset-changed" signal

void                user_function                      (GimpContext    *gimpcontext,
                                                        GimpToolPreset *arg1,
                                                        gpointer        user_data)        : Run First

gimpcontext :

the object which received the signal.

user_data :

user data set when the signal handler was connected.