gimp-app-test-utils

gimp-app-test-utils

Synopsis

void                gimp_test_utils_create_image        (Gimp *gimp,
                                                         gint width,
                                                         gint height);
GimpImage *         gimp_test_utils_create_image_from_dalog
                                                        (Gimp *gimp);
GimpUIManager *     gimp_test_utils_get_ui_manager      (Gimp *gimp);
void                gimp_test_utils_set_env_to_subpath  (const gchar *root_env_var,
                                                         const gchar *subdir,
                                                         const gchar *target_env_var);
void                gimp_test_utils_set_gimp2_directory (const gchar *root_env_var,
                                                         const gchar *subdir);
void                gimp_test_utils_setup_menus_dir     (void);
void                gimp_test_utils_synthesize_key_event
                                                        (GtkWidget *widget,
                                                         guint keyval);

Description

Details

gimp_test_utils_create_image ()

void                gimp_test_utils_create_image        (Gimp *gimp,
                                                         gint width,
                                                         gint height);

Creates a new image of a given size with one layer of same size and a display.

gimp :

A Gimp instance.

width :

Width of image (and layer)

height :

Height of image (and layer)

gimp_test_utils_create_image_from_dalog ()

GimpImage *         gimp_test_utils_create_image_from_dalog
                                                        (Gimp *gimp);

Creates a new image using the "New image" dialog, and then returns the GimpImage created.

Returns :

The created GimpImage.

gimp_test_utils_get_ui_manager ()

GimpUIManager *     gimp_test_utils_get_ui_manager      (Gimp *gimp);

Returns the "best" GimpUIManager to use when performing actions. It gives the ui manager of the empty display if it exists, otherwise it gives it the ui manager of the first display.

gimp :

The Gimp instance.

Returns :

The GimpUIManager.

gimp_test_utils_set_env_to_subpath ()

void                gimp_test_utils_set_env_to_subpath  (const gchar *root_env_var,
                                                         const gchar *subdir,
                                                         const gchar *target_env_var);


gimp_test_utils_set_gimp2_directory ()

void                gimp_test_utils_set_gimp2_directory (const gchar *root_env_var,
                                                         const gchar *subdir);

Sets GIMP2_DIRECTORY to the source dir root_env_var/subdir. The environment variables is set up by the test runner, see Makefile.am

root_env_var :

Either "GIMP_TESTING_ABS_TOP_SRCDIR" or "GIMP_TESTING_ABS_TOP_BUILDDIR"

subdir :

Subdir, may be NULL

gimp_test_utils_setup_menus_dir ()

void                gimp_test_utils_setup_menus_dir     (void);

Sets GIMP_TESTING_MENUS_DIR to "$top_srcdir/menus".


gimp_test_utils_synthesize_key_event ()

void                gimp_test_utils_synthesize_key_event
                                                        (GtkWidget *widget,
                                                         guint keyval);

Simulates a keypress and release with gdk_test_simulate_key().

widget :

Widget to target.

keyval :

Keyval, e.g. GDK_Return