GimpSessionInfo

GimpSessionInfo

Synopsis

                    GimpSessionInfo;
                    GimpSessionInfoPrivate;
GimpSessionInfo *   gimp_session_info_new               (void);
void                gimp_session_info_restore           (GimpSessionInfo *info,
                                                         GimpDialogFactory *factory);
void                gimp_session_info_apply_geometry    (GimpSessionInfo *info);
void                gimp_session_info_read_geometry     (GimpSessionInfo *info,
                                                         GdkEventConfigure *cevent);
void                gimp_session_info_get_info          (GimpSessionInfo *info);
void                gimp_session_info_get_info_with_widget
                                                        (GimpSessionInfo *info,
                                                         GtkWidget *widget);
void                gimp_session_info_clear_info        (GimpSessionInfo *info);
gboolean            gimp_session_info_is_singleton      (GimpSessionInfo *info);
gboolean            gimp_session_info_is_session_managed
                                                        (GimpSessionInfo *info);
gboolean            gimp_session_info_get_remember_size (GimpSessionInfo *info);
gboolean            gimp_session_info_get_remember_if_open
                                                        (GimpSessionInfo *info);
GtkWidget *         gimp_session_info_get_widget        (GimpSessionInfo *info);
void                gimp_session_info_set_widget        (GimpSessionInfo *info,
                                                         GtkWidget *widget);
GimpDialogFactoryEntry * gimp_session_info_get_factory_entry
                                                        (GimpSessionInfo *info);
void                gimp_session_info_set_factory_entry (GimpSessionInfo *info,
                                                         GimpDialogFactoryEntry *entry);
gboolean            gimp_session_info_get_open          (GimpSessionInfo *info);
void                gimp_session_info_append_book       (GimpSessionInfo *info,
                                                         GimpSessionInfoBook *book);
gint                gimp_session_info_get_x             (GimpSessionInfo *info);
gint                gimp_session_info_get_y             (GimpSessionInfo *info);
gint                gimp_session_info_get_width         (GimpSessionInfo *info);
gint                gimp_session_info_get_height        (GimpSessionInfo *info);
void                gimp_session_info_class_set_position_accuracy
                                                        (GimpSessionInfoClass *klass,
                                                         gint accuracy);
gint                gimp_session_info_class_apply_position_accuracy
                                                        (GimpSessionInfoClass *klass,
                                                         gint position);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpSessionInfo

Implemented Interfaces

GimpSessionInfo implements GimpConfigInterface.

Description

Details

GimpSessionInfo

typedef struct _GimpSessionInfo GimpSessionInfo;

Contains session info for one toplevel window in the interface such as a dock, the empty-image-window, or the open/save dialog.


GimpSessionInfoPrivate

typedef struct {
  /*  the dialog factory entry for object we have session info for
   *  note that pure "dock" entries don't have any factory entry
   */
  GimpDialogFactoryEntry *factory_entry;

  gint                    x;
  gint                    y;
  gint                    width;
  gint                    height;
  gboolean                right_align;
  gboolean                bottom_align;

  /*  only valid while restoring and saving the session  */
  gboolean                open;
  gint                    screen;

  /*  dialog specific list of GimpSessionInfoAux  */
  GList                  *aux_info;

  GtkWidget              *widget;

  /*  list of GimpSessionInfoDock  */
  GList                  *docks;
} GimpSessionInfoPrivate;


gimp_session_info_new ()

GimpSessionInfo *   gimp_session_info_new               (void);


gimp_session_info_restore ()

void                gimp_session_info_restore           (GimpSessionInfo *info,
                                                         GimpDialogFactory *factory);


gimp_session_info_apply_geometry ()

void                gimp_session_info_apply_geometry    (GimpSessionInfo *info);

Apply the geometry stored in the session info object to the associated widget.


gimp_session_info_read_geometry ()

void                gimp_session_info_read_geometry     (GimpSessionInfo *info,
                                                         GdkEventConfigure *cevent);

Read geometry related information from the associated widget.

info :

A GimpSessionInfo cevent A GdkEventConfigure. If set, use the size from here instead of from the window allocation.

gimp_session_info_get_info ()

void                gimp_session_info_get_info          (GimpSessionInfo *info);


gimp_session_info_get_info_with_widget ()

void                gimp_session_info_get_info_with_widget
                                                        (GimpSessionInfo *info,
                                                         GtkWidget *widget);

Temporarily sets widget on info and calls gimp_session_info_get_info(), then restores the old widget that was set.

widget :

GtkWidget to use

gimp_session_info_clear_info ()

void                gimp_session_info_clear_info        (GimpSessionInfo *info);


gimp_session_info_is_singleton ()

gboolean            gimp_session_info_is_singleton      (GimpSessionInfo *info);


gimp_session_info_is_session_managed ()

gboolean            gimp_session_info_is_session_managed
                                                        (GimpSessionInfo *info);


gimp_session_info_get_remember_size ()

gboolean            gimp_session_info_get_remember_size (GimpSessionInfo *info);


gimp_session_info_get_remember_if_open ()

gboolean            gimp_session_info_get_remember_if_open
                                                        (GimpSessionInfo *info);


gimp_session_info_get_widget ()

GtkWidget *         gimp_session_info_get_widget        (GimpSessionInfo *info);


gimp_session_info_set_widget ()

void                gimp_session_info_set_widget        (GimpSessionInfo *info,
                                                         GtkWidget *widget);


gimp_session_info_get_factory_entry ()

GimpDialogFactoryEntry * gimp_session_info_get_factory_entry
                                                        (GimpSessionInfo *info);


gimp_session_info_set_factory_entry ()

void                gimp_session_info_set_factory_entry (GimpSessionInfo *info,
                                                         GimpDialogFactoryEntry *entry);


gimp_session_info_get_open ()

gboolean            gimp_session_info_get_open          (GimpSessionInfo *info);


gimp_session_info_append_book ()

void                gimp_session_info_append_book       (GimpSessionInfo *info,
                                                         GimpSessionInfoBook *book);


gimp_session_info_get_x ()

gint                gimp_session_info_get_x             (GimpSessionInfo *info);


gimp_session_info_get_y ()

gint                gimp_session_info_get_y             (GimpSessionInfo *info);


gimp_session_info_get_width ()

gint                gimp_session_info_get_width         (GimpSessionInfo *info);


gimp_session_info_get_height ()

gint                gimp_session_info_get_height        (GimpSessionInfo *info);


gimp_session_info_class_set_position_accuracy ()

void                gimp_session_info_class_set_position_accuracy
                                                        (GimpSessionInfoClass *klass,
                                                         gint accuracy);

When writing sessionrc, make positions and sizes a multiple of accuracy. Meant to be used by test cases that does regression testing on session managed window positions and sizes, to allow for some deviations from the original setup, that the window manager might impose.


gimp_session_info_class_apply_position_accuracy ()

gint                gimp_session_info_class_apply_position_accuracy
                                                        (GimpSessionInfoClass *klass,
                                                         gint position);

Rounds position to the nearest multiple of what was set with gimp_session_info_class_set_position_accuracy().

Returns :

Result.