diff --git a/ChangeLog b/ChangeLog index 9478e2aa25..161740421a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +2000-02-23 Michael Natterer + + * app/file_new_dialog.c: use a gimp_query_boolean_box(). + + * libgimp/gimpenv.c + * libgimp/gimpquerybox.c: documentation updates. + + * libgimp/gimpwidgets.[ch]: changed the widget constructors to + return only the container widget and added access marcos for the + sub-widgets. Added documentation for all functions. + Made gimp_toggle_button_sensitive_update() public so this feature + can be properly documented. + + * plug-ins/common/blur.c + * plug-ins/common/gauss_iir.c + * plug-ins/common/gauss_rle.c + * plug-ins/common/plasma.c + * plug-ins/common/randomize.c + * plug-ins/common/snoise.c + * plug-ins/common/spread.c + * plug-ins/common/tile.c + * plug-ins/gflare/gflare.c: updated according to the + gimpwidgets.[ch] changes. + Wed Feb 23 14:50:09 CET 2000 Sven Neumann * plug-ins/print/print-escp2.c diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index ec7789c2ad..7acc8b33d3 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -148,59 +148,40 @@ file_new_cancel_callback (GtkWidget *widget, g_free (info); } -/* local callbacks of file_new_confirm_dialog() */ +/* local callback of file_new_confirm_dialog() */ static void -file_new_confirm_dialog_ok_callback (GtkWidget *widget, - gpointer data) +file_new_confirm_dialog_callback (GtkWidget *widget, + gboolean create, + gpointer data) { NewImageInfo *info; info = (NewImageInfo*) data; - gtk_widget_destroy (info->confirm_dlg); - gtk_widget_destroy (info->dlg); - image_new_create_image (info->values); - image_new_values_free (info->values); - g_free (info); -} - -static void -file_new_confirm_dialog_cancel_callback (GtkWidget *widget, - gpointer data) -{ - NewImageInfo *info; - - info = (NewImageInfo*) data; - - gtk_widget_destroy (info->confirm_dlg); info->confirm_dlg = NULL; - gtk_widget_set_sensitive (info->dlg, TRUE); + + if (create) + { + gtk_widget_destroy (info->dlg); + image_new_create_image (info->values); + image_new_values_free (info->values); + g_free (info); + } + else + { + gtk_widget_set_sensitive (info->dlg, TRUE); + } } static void file_new_confirm_dialog (NewImageInfo *info) { - GtkWidget *label; gchar *size; gchar *max_size; gchar *text; gtk_widget_set_sensitive (info->dlg, FALSE); - info->confirm_dlg = - gimp_dialog_new (_("Confirm Image Size"), "confirm_size", - gimp_standard_help_func, - "dialogs/file_new.html#confirm_size", - GTK_WIN_POS_MOUSE, - FALSE, FALSE, FALSE, - - _("OK"), file_new_confirm_dialog_ok_callback, - info, NULL, NULL, TRUE, FALSE, - _("Cancel"), file_new_confirm_dialog_cancel_callback, - info, NULL, NULL, FALSE, TRUE, - - NULL); - size = image_new_get_size_string (info->size); max_size = image_new_get_size_string (max_new_image_size); @@ -216,11 +197,17 @@ file_new_confirm_dialog (NewImageInfo *info) "setting (currently %s) in the\n" "preferences dialog."), size, max_size); - label = gtk_label_new (text); - gtk_misc_set_padding (GTK_MISC (label), 6, 6); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->confirm_dlg)->vbox), label, - TRUE, TRUE, 0); - gtk_widget_show (label); + + info->confirm_dlg = + gimp_query_boolean_box (_("Confirm Image Size"), + gimp_standard_help_func, + "dialogs/file_new.html#confirm_size", + FALSE, + text, + _("OK"), _("Cancel"), + NULL, NULL, + file_new_confirm_dialog_callback, + info); g_free (text); g_free (max_size); diff --git a/app/file_new_dialog.c b/app/file_new_dialog.c index ec7789c2ad..7acc8b33d3 100644 --- a/app/file_new_dialog.c +++ b/app/file_new_dialog.c @@ -148,59 +148,40 @@ file_new_cancel_callback (GtkWidget *widget, g_free (info); } -/* local callbacks of file_new_confirm_dialog() */ +/* local callback of file_new_confirm_dialog() */ static void -file_new_confirm_dialog_ok_callback (GtkWidget *widget, - gpointer data) +file_new_confirm_dialog_callback (GtkWidget *widget, + gboolean create, + gpointer data) { NewImageInfo *info; info = (NewImageInfo*) data; - gtk_widget_destroy (info->confirm_dlg); - gtk_widget_destroy (info->dlg); - image_new_create_image (info->values); - image_new_values_free (info->values); - g_free (info); -} - -static void -file_new_confirm_dialog_cancel_callback (GtkWidget *widget, - gpointer data) -{ - NewImageInfo *info; - - info = (NewImageInfo*) data; - - gtk_widget_destroy (info->confirm_dlg); info->confirm_dlg = NULL; - gtk_widget_set_sensitive (info->dlg, TRUE); + + if (create) + { + gtk_widget_destroy (info->dlg); + image_new_create_image (info->values); + image_new_values_free (info->values); + g_free (info); + } + else + { + gtk_widget_set_sensitive (info->dlg, TRUE); + } } static void file_new_confirm_dialog (NewImageInfo *info) { - GtkWidget *label; gchar *size; gchar *max_size; gchar *text; gtk_widget_set_sensitive (info->dlg, FALSE); - info->confirm_dlg = - gimp_dialog_new (_("Confirm Image Size"), "confirm_size", - gimp_standard_help_func, - "dialogs/file_new.html#confirm_size", - GTK_WIN_POS_MOUSE, - FALSE, FALSE, FALSE, - - _("OK"), file_new_confirm_dialog_ok_callback, - info, NULL, NULL, TRUE, FALSE, - _("Cancel"), file_new_confirm_dialog_cancel_callback, - info, NULL, NULL, FALSE, TRUE, - - NULL); - size = image_new_get_size_string (info->size); max_size = image_new_get_size_string (max_new_image_size); @@ -216,11 +197,17 @@ file_new_confirm_dialog (NewImageInfo *info) "setting (currently %s) in the\n" "preferences dialog."), size, max_size); - label = gtk_label_new (text); - gtk_misc_set_padding (GTK_MISC (label), 6, 6); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->confirm_dlg)->vbox), label, - TRUE, TRUE, 0); - gtk_widget_show (label); + + info->confirm_dlg = + gimp_query_boolean_box (_("Confirm Image Size"), + gimp_standard_help_func, + "dialogs/file_new.html#confirm_size", + FALSE, + text, + _("OK"), _("Cancel"), + NULL, NULL, + file_new_confirm_dialog_callback, + info); g_free (text); g_free (max_size); diff --git a/app/gui/file-new-dialog.c b/app/gui/file-new-dialog.c index ec7789c2ad..7acc8b33d3 100644 --- a/app/gui/file-new-dialog.c +++ b/app/gui/file-new-dialog.c @@ -148,59 +148,40 @@ file_new_cancel_callback (GtkWidget *widget, g_free (info); } -/* local callbacks of file_new_confirm_dialog() */ +/* local callback of file_new_confirm_dialog() */ static void -file_new_confirm_dialog_ok_callback (GtkWidget *widget, - gpointer data) +file_new_confirm_dialog_callback (GtkWidget *widget, + gboolean create, + gpointer data) { NewImageInfo *info; info = (NewImageInfo*) data; - gtk_widget_destroy (info->confirm_dlg); - gtk_widget_destroy (info->dlg); - image_new_create_image (info->values); - image_new_values_free (info->values); - g_free (info); -} - -static void -file_new_confirm_dialog_cancel_callback (GtkWidget *widget, - gpointer data) -{ - NewImageInfo *info; - - info = (NewImageInfo*) data; - - gtk_widget_destroy (info->confirm_dlg); info->confirm_dlg = NULL; - gtk_widget_set_sensitive (info->dlg, TRUE); + + if (create) + { + gtk_widget_destroy (info->dlg); + image_new_create_image (info->values); + image_new_values_free (info->values); + g_free (info); + } + else + { + gtk_widget_set_sensitive (info->dlg, TRUE); + } } static void file_new_confirm_dialog (NewImageInfo *info) { - GtkWidget *label; gchar *size; gchar *max_size; gchar *text; gtk_widget_set_sensitive (info->dlg, FALSE); - info->confirm_dlg = - gimp_dialog_new (_("Confirm Image Size"), "confirm_size", - gimp_standard_help_func, - "dialogs/file_new.html#confirm_size", - GTK_WIN_POS_MOUSE, - FALSE, FALSE, FALSE, - - _("OK"), file_new_confirm_dialog_ok_callback, - info, NULL, NULL, TRUE, FALSE, - _("Cancel"), file_new_confirm_dialog_cancel_callback, - info, NULL, NULL, FALSE, TRUE, - - NULL); - size = image_new_get_size_string (info->size); max_size = image_new_get_size_string (max_new_image_size); @@ -216,11 +197,17 @@ file_new_confirm_dialog (NewImageInfo *info) "setting (currently %s) in the\n" "preferences dialog."), size, max_size); - label = gtk_label_new (text); - gtk_misc_set_padding (GTK_MISC (label), 6, 6); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->confirm_dlg)->vbox), label, - TRUE, TRUE, 0); - gtk_widget_show (label); + + info->confirm_dlg = + gimp_query_boolean_box (_("Confirm Image Size"), + gimp_standard_help_func, + "dialogs/file_new.html#confirm_size", + FALSE, + text, + _("OK"), _("Cancel"), + NULL, NULL, + file_new_confirm_dialog_callback, + info); g_free (text); g_free (max_size); diff --git a/devel-docs/ChangeLog b/devel-docs/ChangeLog index a283c39d68..cc32803945 100644 --- a/devel-docs/ChangeLog +++ b/devel-docs/ChangeLog @@ -1,15 +1,23 @@ +2000-02-23 Michael Natterer + + * libgimp/libgimp-decl.txt + * libgimp/libgimp-sections.txt + * libgimp/tmpl/gimpenv.sgml + * libgimp/tmpl/gimppixmap.sgml + * libgimp/tmpl/gimpwidgets.sgml: various updates and documentation + for all gimpwidgets.[ch] functions. + Mon Feb 21 11:55:18 CET 2000 Sven Neumann * libgimp/libgimp-decl.txt - * libgimp/tmpl/gimpwidgets.sgml; updated + * libgimp/tmpl/gimpwidgets.sgml: updated 2000-02-18 Michael Natterer * libgimp/libgimp-decl.txt * libgimp/tmpl/gimpmatrix.sgml * libgimp/tmpl/gimpvector.sgml - * libgimp/tmpl/libgimp-unused.sgml: updates and - cleanups. + * libgimp/tmpl/libgimp-unused.sgml: updates and cleanups. 2000-02-18 Michael Natterer diff --git a/devel-docs/libgimp/libgimp-decl.txt b/devel-docs/libgimp/libgimp-decl.txt index 9c3fef39ad..b8d68fc97a 100644 --- a/devel-docs/libgimp/libgimp-decl.txt +++ b/devel-docs/libgimp/libgimp-decl.txt @@ -1,3 +1,142 @@ + +GimpColorDisplayInit +void +void + + +GimpColorDisplayNew +gpointer +int type + + +GimpColorDisplayClone +gpointer +gpointer cd_ID + + +GimpColorDisplayConvert +void +gpointer cd_ID, + guchar *buf, + int width, + int height, + int bpp, + int bpl + + +GimpColorDisplayDestroy +void +gpointer cd_ID + + +GimpColorDisplayFinalize +void +void + + +GimpColorDisplayLoadState +void +gpointer cd_ID, + Parasite *state + + +GimpColorDisplaySaveState +Parasite * +gpointer cd_ID + + +GimpColorDisplayConfigure +void +gpointer cd_ID, + GFunc ok_func, + gpointer ok_data, + GFunc cancel_func, + gpointer cancel_data + + +GimpColorDisplayConfigureCancel +void +gpointer cd_ID + + +GimpColorDisplayMethods + + +GimpColorDisplayMethods +struct GimpColorDisplayMethods +{ + GimpColorDisplayInit init; + GimpColorDisplayNew new; + GimpColorDisplayClone clone; + GimpColorDisplayConvert convert; + GimpColorDisplayDestroy destroy; + GimpColorDisplayFinalize finalize; + GimpColorDisplayLoadState load; + GimpColorDisplaySaveState save; + GimpColorDisplayConfigure configure; + GimpColorDisplayConfigureCancel cancel; +}; + + +gimp_color_display_register +gboolean +const char *name,GimpColorDisplayMethods *methods + + +gimp_color_display_unregister +gboolean +const char *name + + +GimpColorSelector_Callback +void +void *data, int r, int g, int b + + +GimpColorSelector_NewFunc +GtkWidget * +int r, int g, int b, + GimpColorSelector_Callback cb, + void *data, + void **selector_data + + +GimpColorSelector_FreeFunc +void +void *selector_data + + +GimpColorSelector_SetColorFunc +void +void *selector_data, + int r, int g, int b, + int set_current + + +GimpColorSelectorMethods + + +GimpColorSelectorMethods +struct GimpColorSelectorMethods { + GimpColorSelector_NewFunc new; + GimpColorSelector_FreeFunc free; + GimpColorSelector_SetColorFunc setcolor; +}; + + +GimpColorSelectorID +typedef void *GimpColorSelectorID; + + +gimp_color_selector_register +GimpColorSelectorID +const char *name,const char *help_page,GimpColorSelectorMethods *methods + + +gimp_color_selector_unregister +gboolean +GimpColorSelectorID id,void (*callback)(void *data),void *data + GIMPVAR # define GIMPVAR __declspec(dllexport) @@ -1299,6 +1438,140 @@ gchar *help_data void gchar *help_data + +GIMP_MAJOR_VERSION +#define GIMP_MAJOR_VERSION (1) + + +GIMP_MINOR_VERSION +#define GIMP_MINOR_VERSION (1) + + +GIMP_MICRO_VERSION +#define GIMP_MICRO_VERSION (17) + + +GIMP_VERSION +#define GIMP_VERSION "1.1.17" + + +GIMP_CHECK_VERSION +#define GIMP_CHECK_VERSION(major, minor, micro) \ + (GIMP_MAJOR_VERSION > (major) || \ + (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \ + (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \ + GIMP_MICRO_VERSION >= (micro))) + + +GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE +#define GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE 1-1-0 + + +GIMP_HAVE_PARASITES +#define GIMP_HAVE_PARASITES 1-1-0 + + +GIMP_HAVE_RESOLUTION_INFO +#define GIMP_HAVE_RESOLUTION_INFO 1-1-0 + + +GIMP_HAVE_DESTROY_PARAMDEFS +#define GIMP_HAVE_DESTROY_PARAMDEFS 1-1-0 + + +GIMP_HAVE_FEATURES_1_1_5 +#define GIMP_HAVE_FEATURES_1_1_5 1-1-5 + + +GIMP_HAVE_DEFAULT_DISPLAY +#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5 + + +GIMP_HAVE_PIXEL_RGNS_REGISTER2 +#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5 + + +GIMP_HAVE_NEW_ENUMS +#define GIMP_HAVE_NEW_ENUMS 1-1-10 + + +GIMP_HAVE_EXPORT +#define GIMP_HAVE_EXPORT 1-1-10 + + +GIMP_TYPE_CHAIN_BUTTON +#define GIMP_TYPE_CHAIN_BUTTON (gimp_chain_button_get_type ()) + + +GIMP_CHAIN_BUTTON +#define GIMP_CHAIN_BUTTON(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHAIN_BUTTON, GimpChainButton)) + + +GIMP_CHAIN_BUTTON_CLASS +#define GIMP_CHAIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHAIN_BUTTON, GimpChainButtonClass)) + + +GIMP_IS_CHAIN_BUTTON +#define GIMP_IS_CHAIN_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHAIN_BUTTON)) + + +GIMP_IS_CHAIN_BUTTON_CLASS +#define GIMP_IS_CHAIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHAIN_BUTTON)) + + +GimpChainButton + + +GimpChainButtonClass + + +GimpChainPosition +typedef enum +{ + GIMP_CHAIN_TOP, + GIMP_CHAIN_LEFT, + GIMP_CHAIN_BOTTOM, + GIMP_CHAIN_RIGHT +} GimpChainPosition; + + +GimpChainButton +struct GimpChainButton +{ + GtkTable table; + + GimpChainPosition position; + GtkWidget *button; + GtkWidget *line1; + GtkWidget *line2; + GtkWidget *pixmap; + GdkPixmap *broken; + GdkBitmap *broken_mask; + GdkPixmap *chain; + GdkBitmap *chain_mask; + gboolean active; +}; + + +gimp_chain_button_get_type +GtkType +void + + +gimp_chain_button_new +GtkWidget * +GimpChainPosition position + + +gimp_chain_button_set_active +void +GimpChainButton *gcb,gboolean is_active + + +gimp_chain_button_get_active +gboolean +GimpChainButton *gcb + GimpAddMaskType typedef enum @@ -1983,6 +2256,307 @@ typedef GimpPDBStatusType GStatusType; RUN_WITH_LAST_VALS #define RUN_WITH_LAST_VALS GIMP_RUN_WITH_LAST_VALS + +gimp_directory +gchar * +void + + +gimp_personal_rc_file +gchar * +gchar *basename + + +gimp_data_directory +gchar * +void + + +gimp_gtkrc +gchar * +void + + +gimp_path_parse +GList * +gchar *path,gint max_paths,gboolean check,GList **check_failed + + +gimp_path_to_str +gchar * +GList *path + + +gimp_path_free +void +GList *path + + +gimp_path_get_user_writable_dir +gchar * +GList *path + + +GimpExportCapabilities +typedef enum { + CAN_HANDLE_RGB = 1 << 0, + CAN_HANDLE_GRAY = 1 << 1, + CAN_HANDLE_INDEXED = 1 << 2, + CAN_HANDLE_ALPHA = 1 << 3, + CAN_HANDLE_LAYERS = 1 << 4, + CAN_HANDLE_LAYERS_AS_ANIMATION = 1 << 5, + NEEDS_ALPHA = 1 << 6 +} GimpExportCapabilities; + + +GimpExportReturnType +typedef enum +{ + EXPORT_CANCEL, + EXPORT_IGNORE, + EXPORT_EXPORT +} GimpExportReturnType; + + +gimp_export_image +GimpExportReturnType +gint32 *image_ID,gint32 *drawable_ID,gchar *format_name,GimpExportCapabilities capabilities + + +GIMP_TYPE_FILE_SELECTION +#define GIMP_TYPE_FILE_SELECTION (gimp_file_selection_get_type ()) + + +GIMP_FILE_SELECTION +#define GIMP_FILE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_FILE_SELECTION, GimpFileSelection)) + + +GIMP_FILE_SELECTION_CLASS +#define GIMP_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILE_SELECTION, GimpFileSelectionClass)) + + +GIMP_IS_FILE_SELECTION +#define GIMP_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_FILE_SELECTION)) + + +GIMP_IS_FILE_SELECTION_CLASS +#define GIMP_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FILE_SELECTION)) + + +GimpFileSelection + + +GimpFileSelectionClass + + +GimpFileSelection +struct GimpFileSelection +{ + GtkHBox hbox; + + GtkWidget *yes_pixmap; + GtkWidget *no_pixmap; + GtkWidget *entry; + GtkWidget *browse_button; + + GtkWidget *file_selection; + + gchar *title; + gboolean dir_only; + gboolean check_valid; +}; + + +gimp_file_selection_get_type +GtkType +void + + +gimp_file_selection_new +GtkWidget * +gchar *title,gchar *filename,gboolean dir_only,gboolean check_valid + + +gimp_file_selection_get_filename +gchar * +GimpFileSelection *gfs + + +gimp_file_selection_set_filename +void +GimpFileSelection *gfs,gchar *filename + + +GIMP_MIN_IMAGE_SIZE +#define GIMP_MIN_IMAGE_SIZE 1 + + +GIMP_MAX_IMAGE_SIZE +#define GIMP_MAX_IMAGE_SIZE 16777216 + + +GIMP_MIN_RESOLUTION +#define GIMP_MIN_RESOLUTION (1.0 / 65536.0) + + +GIMP_MAX_RESOLUTION +#define GIMP_MAX_RESOLUTION 65536.0 + + +GIMP_CHECK_SIZE +#define GIMP_CHECK_SIZE 8 + + +GIMP_CHECK_SIZE_SM +#define GIMP_CHECK_SIZE_SM 4 + + +GIMP_CHECK_DARK +#define GIMP_CHECK_DARK (1.0 / 3.0) + + +GIMP_CHECK_LIGHT +#define GIMP_CHECK_LIGHT (2.0 / 3.0) + + +G_PI +#define G_PI 3.14159265358979323846 + + +G_PI_2 +#define G_PI_2 1.57079632679489661923 + + +G_PI_4 +#define G_PI_4 0.78539816339744830962 + + +G_SQRT2 +#define G_SQRT2 1.4142135623730951 + + +G_MAXRAND +#define G_MAXRAND G_MAXINT + + +G_MAXRAND +#define G_MAXRAND RAND_MAX + + +RINT +#define RINT(x) rint(x) + + +RINT +#define RINT(x) floor ((x) + 0.5) + + +ROUND +#define ROUND(x) ((int) ((x) + 0.5)) + + +SQR +#define SQR(x) ((x) * (x)) + + +MAX255 +#define MAX255(a) ((a) | (((a) & 256) - (((a) & 256) >> 8))) + + +CLAMP0255 +#define CLAMP0255(a) CLAMP(a,0,255) + + +gimp_deg_to_rad +#define gimp_deg_to_rad(angle) ((angle) * (2.0 * G_PI) / 360.0) + + +gimp_rad_to_deg +#define gimp_rad_to_deg(angle) ((angle) * 360.0 / (2.0 * G_PI)) + + +GimpMatrix3[3][3] +typedef gdouble GimpMatrix3[3][3]; + + +GimpMatrix4[4][4] +typedef gdouble GimpMatrix4[4][4]; + + +gimp_matrix3_transform_point +void +GimpMatrix3 matrix,gdouble x,gdouble y,gdouble *newx,gdouble *newy + + +gimp_matrix3_mult +void +GimpMatrix3 matrix1,GimpMatrix3 matrix2 + + +gimp_matrix3_identity +void +GimpMatrix3 matrix + + +gimp_matrix3_translate +void +GimpMatrix3 matrix,gdouble x,gdouble y + + +gimp_matrix3_scale +void +GimpMatrix3 matrix,gdouble x,gdouble y + + +gimp_matrix3_rotate +void +GimpMatrix3 matrix,gdouble theta + + +gimp_matrix3_xshear +void +GimpMatrix3 matrix,gdouble amount + + +gimp_matrix3_yshear +void +GimpMatrix3 matrix,gdouble amount + + +gimp_matrix3_determinant +gdouble +GimpMatrix3 matrix + + +gimp_matrix3_invert +void +GimpMatrix3 matrix,GimpMatrix3 matrix_inv + + +gimp_matrix3_duplicate +void +GimpMatrix3 src,GimpMatrix3 target + + +gimp_matrix3_is_diagonal +gboolean +GimpMatrix3 matrix + + +gimp_matrix3_is_identity +gboolean +GimpMatrix3 matrix + + +gimp_matrix3_is_simple +gboolean +GimpMatrix3 matrix + + +gimp_matrix4_to_deg +void +GimpMatrix4 matrix,gdouble *a,gdouble *b,gdouble *c + GimpConstraintFunc gint @@ -2154,6 +2728,86 @@ void * popup_pnt, gchar * pname gint void * popup_pnt + +GimpModuleStatus +typedef enum { + GIMP_MODULE_OK, + GIMP_MODULE_UNLOAD +} GimpModuleStatus; + + +GimpModuleInfo +typedef struct { + void *shutdown_data; + const char *purpose; + const char *author; + const char *version; + const char *copyright; + const char *date; +} GimpModuleInfo; + + +GIMP_TYPE_PATH_EDITOR +#define GIMP_TYPE_PATH_EDITOR (gimp_path_editor_get_type ()) + + +GIMP_PATH_EDITOR +#define GIMP_PATH_EDITOR(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PATH_EDITOR, GimpPathEditor)) + + +GIMP_PATH_EDITOR_CLASS +#define GIMP_PATH_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PATH_EDITOR, GimpPathEditorClass)) + + +GIMP_IS_PATH_EDITOR +#define GIMP_IS_PATH_EDITOR(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_PATH_EDITOR)) + + +GIMP_IS_PATH_EDITOR_CLASS +#define GIMP_IS_PATH_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PATH_EDITOR)) + + +GimpPathEditor + + +GimpPathEditorClass + + +GimpPathEditor +struct GimpPathEditor +{ + GtkVBox vbox; + + GtkWidget *upper_hbox; + + GtkWidget *new_button; + GtkWidget *up_button; + GtkWidget *down_button; + GtkWidget *delete_button; + + GtkWidget *file_selection; + + GtkWidget *dir_list; + + GtkWidget *selected_item; + gint number_of_items; +}; + + +gimp_path_editor_get_type +GtkType +void + + +gimp_path_editor_new +GtkWidget * +gchar *filesel_title,gchar *path + + +gimp_path_editor_get_path +gchar * +GimpPathEditor *gpe + GP_VERSION #define GP_VERSION 0x0003 @@ -2396,6 +3050,282 @@ GIOChannel *channel int GIOChannel *channel + +GIMP_TYPE_SIZE_ENTRY +#define GIMP_TYPE_SIZE_ENTRY (gimp_size_entry_get_type ()) + + +GIMP_SIZE_ENTRY +#define GIMP_SIZE_ENTRY(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntry)) + + +GIMP_SIZE_ENTRY_CLASS +#define GIMP_SIZE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntryClass)) + + +GIMP_IS_SIZE_ENTRY +#define GIMP_IS_SIZE_ENTRY(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_SIZE_ENTRY)) + + +GIMP_IS_SIZE_ENTRY_CLASS +#define GIMP_IS_SIZE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SIZE_ENTRY)) + + +GimpSizeEntry + + +GimpSizeEntryClass + + +GimpSizeEntryUpdatePolicy +typedef enum +{ + GIMP_SIZE_ENTRY_UPDATE_NONE = 0, + GIMP_SIZE_ENTRY_UPDATE_SIZE = 1, + GIMP_SIZE_ENTRY_UPDATE_RESOLUTION = 2 +} GimpSizeEntryUpdatePolicy; + + +GimpSizeEntryField + + +GimpSizeEntry +struct GimpSizeEntry +{ + GtkTable table; + + GSList *fields; + gint number_of_fields; + + GtkWidget *unitmenu; + GimpUnit unit; + gboolean menu_show_pixels; + gboolean menu_show_percent; + + gboolean show_refval; + GimpSizeEntryUpdatePolicy update_policy; +}; + + +gimp_size_entry_get_type +GtkType +void + + +gimp_size_entry_new +GtkWidget * +gint number_of_fields,GimpUnit unit,gchar *unit_format,gboolean menu_show_pixels,gboolean menu_show_percent,gboolean show_refval,gint spinbutton_usize,GimpSizeEntryUpdatePolicy update_policy + + +gimp_size_entry_add_field +void +GimpSizeEntry *gse,GtkSpinButton *value_spinbutton,GtkSpinButton *refval_spinbutton + + +gimp_size_entry_attach_label +void +GimpSizeEntry *gse,gchar *text,gint row,gint column,gfloat alignment + + +gimp_size_entry_set_resolution +void +GimpSizeEntry *gse,gint field,gdouble resolution,gboolean keep_size + + +gimp_size_entry_set_size +void +GimpSizeEntry *gse,gint field,gdouble lower,gdouble upper + + +gimp_size_entry_set_value_boundaries +void +GimpSizeEntry *gse,gint field,gdouble lower,gdouble upper + + +gimp_size_entry_get_value +gdouble +GimpSizeEntry *gse,gint field + + +gimp_size_entry_set_value +void +GimpSizeEntry *gse,gint field,gdouble value + + +gimp_size_entry_set_refval_boundaries +void +GimpSizeEntry *gse,gint field,gdouble lower,gdouble upper + + +gimp_size_entry_set_refval_digits +void +GimpSizeEntry *gse,gint field,gint digits + + +gimp_size_entry_get_refval +gdouble +GimpSizeEntry *gse,gint field + + +gimp_size_entry_set_refval +void +GimpSizeEntry *gse,gint field,gdouble refval + + +gimp_size_entry_get_unit +GimpUnit +GimpSizeEntry *gse + + +gimp_size_entry_set_unit +void +GimpSizeEntry *gse,GimpUnit unit + + +gimp_size_entry_grab_focus +void +GimpSizeEntry *gse + + +GimpUnit +typedef enum +{ + GIMP_UNIT_PIXEL = 0, + + GIMP_UNIT_INCH = 1, + GIMP_UNIT_MM = 2, + GIMP_UNIT_POINT = 3, + GIMP_UNIT_PICA = 4, + + GIMP_UNIT_END = 5, + + GIMP_UNIT_PERCENT = 65536 +} GimpUnit; + + +gimp_unit_get_number_of_units +gint +void + + +gimp_unit_get_number_of_built_in_units +gint +void + + +gimp_unit_new +GimpUnit +gchar *identifier,gdouble factor,gint digits,gchar *symbol,gchar *abbreviation,gchar *singular,gchar *plural + + +gimp_unit_get_deletion_flag +gboolean +GimpUnit unit + + +gimp_unit_set_deletion_flag +void +GimpUnit unit,gboolean deletion_flag + + +gimp_unit_get_factor +gdouble +GimpUnit unit + + +gimp_unit_get_digits +gint +GimpUnit unit + + +gimp_unit_get_identifier +gchar * +GimpUnit unit + + +gimp_unit_get_symbol +gchar * +GimpUnit unit + + +gimp_unit_get_abbreviation +gchar * +GimpUnit unit + + +gimp_unit_get_singular +gchar * +GimpUnit unit + + +gimp_unit_get_plural +gchar * +GimpUnit unit + + +GIMP_TYPE_UNIT_MENU +#define GIMP_TYPE_UNIT_MENU (gimp_unit_menu_get_type ()) + + +GIMP_UNIT_MENU +#define GIMP_UNIT_MENU(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_UNIT_MENU, GimpUnitMenu)) + + +GIMP_UNIT_MENU_CLASS +#define GIMP_UNIT_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_UNIT_MENU, GimpUnitMenuClass)) + + +GIMP_IS_UNIT_MENU +#define GIMP_IS_UNIT_MENU(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_UNIT_MENU)) + + +GIMP_IS_UNIT_MENU_CLASS +#define GIMP_IS_UNIT_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_UNIT_MENU)) + + +GimpUnitMenu + + +GimpUnitMenuClass + + +GimpUnitMenu +struct GimpUnitMenu +{ + GtkOptionMenu optionmenu; + + /* public (read only) */ + gchar *format; + GimpUnit unit; + + gboolean show_pixels; + gboolean show_percent; + + /* private */ + GtkWidget *selection; + GtkWidget *clist; +}; + + +gimp_unit_menu_get_type +GtkType +void + + +gimp_unit_menu_new +GtkWidget * +gchar *format,GimpUnit unit,gboolean show_pixels,gboolean show_percent,gboolean show_custom + + +gimp_unit_menu_set_unit +void +GimpUnitMenu *gum,GimpUnit unit + + +gimp_unit_menu_get_unit +GimpUnit +GimpUnitMenu *gum + WireMessage @@ -2542,89 +3472,6 @@ GIOChannel *channel,gdouble *data,gint count int GIOChannel *channel,gchar **data,gint count - -GimpMatrix3[3][3] -typedef gdouble GimpMatrix3[3][3]; - - -GimpMatrix4[4][4] -typedef gdouble GimpMatrix4[4][4]; - - -gimp_matrix3_transform_point -void -GimpMatrix3 matrix,gdouble x,gdouble y,gdouble *newx,gdouble *newy - - -gimp_matrix3_mult -void -GimpMatrix3 matrix1,GimpMatrix3 matrix2 - - -gimp_matrix3_identity -void -GimpMatrix3 matrix - - -gimp_matrix3_translate -void -GimpMatrix3 matrix,gdouble x,gdouble y - - -gimp_matrix3_scale -void -GimpMatrix3 matrix,gdouble x,gdouble y - - -gimp_matrix3_rotate -void -GimpMatrix3 matrix,gdouble theta - - -gimp_matrix3_xshear -void -GimpMatrix3 matrix,gdouble amount - - -gimp_matrix3_yshear -void -GimpMatrix3 matrix,gdouble amount - - -gimp_matrix3_determinant -gdouble -GimpMatrix3 matrix - - -gimp_matrix3_invert -void -GimpMatrix3 matrix,GimpMatrix3 matrix_inv - - -gimp_matrix3_duplicate -void -GimpMatrix3 src,GimpMatrix3 target - - -gimp_matrix3_is_diagonal -gboolean -GimpMatrix3 matrix - - -gimp_matrix3_is_identity -gboolean -GimpMatrix3 matrix - - -gimp_matrix3_is_simple -gboolean -GimpMatrix3 matrix - - -gimp_matrix4_to_deg -void -GimpMatrix4 matrix,gdouble *a,gdouble *b,gdouble *c - PARASITE_PERSISTENT #define PARASITE_PERSISTENT 1 @@ -2719,6 +3566,9 @@ const Parasite *p Parasite + + +Parasite struct Parasite { char *name; /* The name of the parasite. USE A UNIQUE PREFIX! */ @@ -2728,673 +3578,6 @@ struct Parasite * responsible for tracking byte order */ }; - -GimpColorSelector_Callback -void -void *data, int r, int g, int b - - -GimpColorSelector_NewFunc -GtkWidget * -int r, int g, int b, - GimpColorSelector_Callback cb, - void *data, - void **selector_data - - -GimpColorSelector_FreeFunc -void -void *selector_data - - -GimpColorSelector_SetColorFunc -void -void *selector_data, - int r, int g, int b, - int set_current - - -GimpColorSelectorMethods - - -GimpColorSelectorMethods -struct GimpColorSelectorMethods { - GimpColorSelector_NewFunc new; - GimpColorSelector_FreeFunc free; - GimpColorSelector_SetColorFunc setcolor; -}; - - -GimpColorSelectorID -typedef void *GimpColorSelectorID; - - -gimp_color_selector_register -GimpColorSelectorID -const char *name,const char *help_page,GimpColorSelectorMethods *methods - - -gimp_color_selector_unregister -gboolean -GimpColorSelectorID id,void (*callback)(void *data),void *data - - -GimpModuleStatus -typedef enum { - GIMP_MODULE_OK, - GIMP_MODULE_UNLOAD -} GimpModuleStatus; - - -GimpModuleInfo -typedef struct { - void *shutdown_data; - const char *purpose; - const char *author; - const char *version; - const char *copyright; - const char *date; -} GimpModuleInfo; - - -GimpUnit -typedef enum -{ - GIMP_UNIT_PIXEL = 0, - - GIMP_UNIT_INCH = 1, - GIMP_UNIT_MM = 2, - GIMP_UNIT_POINT = 3, - GIMP_UNIT_PICA = 4, - - GIMP_UNIT_END = 5, - - GIMP_UNIT_PERCENT = 65536 -} GimpUnit; - - -gimp_unit_get_number_of_units -gint -void - - -gimp_unit_get_number_of_built_in_units -gint -void - - -gimp_unit_new -GimpUnit -gchar *identifier,gdouble factor,gint digits,gchar *symbol,gchar *abbreviation,gchar *singular,gchar *plural - - -gimp_unit_get_deletion_flag -gboolean -GimpUnit unit - - -gimp_unit_set_deletion_flag -void -GimpUnit unit,gboolean deletion_flag - - -gimp_unit_get_factor -gdouble -GimpUnit unit - - -gimp_unit_get_digits -gint -GimpUnit unit - - -gimp_unit_get_identifier -gchar * -GimpUnit unit - - -gimp_unit_get_symbol -gchar * -GimpUnit unit - - -gimp_unit_get_abbreviation -gchar * -GimpUnit unit - - -gimp_unit_get_singular -gchar * -GimpUnit unit - - -gimp_unit_get_plural -gchar * -GimpUnit unit - - -GIMP_TYPE_UNIT_MENU -#define GIMP_TYPE_UNIT_MENU (gimp_unit_menu_get_type ()) - - -GIMP_UNIT_MENU -#define GIMP_UNIT_MENU(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_UNIT_MENU, GimpUnitMenu)) - - -GIMP_UNIT_MENU_CLASS -#define GIMP_UNIT_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_UNIT_MENU, GimpUnitMenuClass)) - - -GIMP_IS_UNIT_MENU -#define GIMP_IS_UNIT_MENU(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_UNIT_MENU)) - - -GIMP_IS_UNIT_MENU_CLASS -#define GIMP_IS_UNIT_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_UNIT_MENU)) - - -GimpUnitMenu - - -GimpUnitMenuClass - - -GimpUnitMenu -struct GimpUnitMenu -{ - GtkOptionMenu optionmenu; - - /* public (read only) */ - gchar *format; - GimpUnit unit; - - gboolean show_pixels; - gboolean show_percent; - - /* private */ - GtkWidget *selection; - GtkWidget *clist; -}; - - -gimp_unit_menu_get_type -GtkType -void - - -gimp_unit_menu_new -GtkWidget * -gchar *format,GimpUnit unit,gboolean show_pixels,gboolean show_percent,gboolean show_custom - - -gimp_unit_menu_set_unit -void -GimpUnitMenu *gum,GimpUnit unit - - -gimp_unit_menu_get_unit -GimpUnit -GimpUnitMenu *gum - - -GIMP_TYPE_SIZE_ENTRY -#define GIMP_TYPE_SIZE_ENTRY (gimp_size_entry_get_type ()) - - -GIMP_SIZE_ENTRY -#define GIMP_SIZE_ENTRY(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntry)) - - -GIMP_SIZE_ENTRY_CLASS -#define GIMP_SIZE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SIZE_ENTRY, GimpSizeEntryClass)) - - -GIMP_IS_SIZE_ENTRY -#define GIMP_IS_SIZE_ENTRY(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_SIZE_ENTRY)) - - -GIMP_IS_SIZE_ENTRY_CLASS -#define GIMP_IS_SIZE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SIZE_ENTRY)) - - -GimpSizeEntry - - -GimpSizeEntryClass - - -GimpSizeEntryUpdatePolicy -typedef enum -{ - GIMP_SIZE_ENTRY_UPDATE_NONE = 0, - GIMP_SIZE_ENTRY_UPDATE_SIZE = 1, - GIMP_SIZE_ENTRY_UPDATE_RESOLUTION = 2 -} GimpSizeEntryUpdatePolicy; - - -GimpSizeEntryField - - -GimpSizeEntry -struct GimpSizeEntry -{ - GtkTable table; - - GSList *fields; - gint number_of_fields; - - GtkWidget *unitmenu; - GimpUnit unit; - gboolean menu_show_pixels; - gboolean menu_show_percent; - - gboolean show_refval; - GimpSizeEntryUpdatePolicy update_policy; -}; - - -gimp_size_entry_get_type -GtkType -void - - -gimp_size_entry_new -GtkWidget * -gint number_of_fields,GimpUnit unit,gchar *unit_format,gboolean menu_show_pixels,gboolean menu_show_percent,gboolean show_refval,gint spinbutton_usize,GimpSizeEntryUpdatePolicy update_policy - - -gimp_size_entry_add_field -void -GimpSizeEntry *gse,GtkSpinButton *value_spinbutton,GtkSpinButton *refval_spinbutton - - -gimp_size_entry_attach_label -void -GimpSizeEntry *gse,gchar *text,gint row,gint column,gfloat alignment - - -gimp_size_entry_set_resolution -void -GimpSizeEntry *gse,gint field,gdouble resolution,gboolean keep_size - - -gimp_size_entry_set_size -void -GimpSizeEntry *gse,gint field,gdouble lower,gdouble upper - - -gimp_size_entry_set_value_boundaries -void -GimpSizeEntry *gse,gint field,gdouble lower,gdouble upper - - -gimp_size_entry_get_value -gdouble -GimpSizeEntry *gse,gint field - - -gimp_size_entry_set_value -void -GimpSizeEntry *gse,gint field,gdouble value - - -gimp_size_entry_set_refval_boundaries -void -GimpSizeEntry *gse,gint field,gdouble lower,gdouble upper - - -gimp_size_entry_set_refval_digits -void -GimpSizeEntry *gse,gint field,gint digits - - -gimp_size_entry_get_refval -gdouble -GimpSizeEntry *gse,gint field - - -gimp_size_entry_set_refval -void -GimpSizeEntry *gse,gint field,gdouble refval - - -gimp_size_entry_get_unit -GimpUnit -GimpSizeEntry *gse - - -gimp_size_entry_set_unit -void -GimpSizeEntry *gse,GimpUnit unit - - -gimp_size_entry_grab_focus -void -GimpSizeEntry *gse - - -G_PI -#define G_PI 3.14159265358979323846 - - -G_PI_2 -#define G_PI_2 1.57079632679489661923 - - -G_PI_4 -#define G_PI_4 0.78539816339744830962 - - -G_SQRT2 -#define G_SQRT2 1.4142135623730951 - - -G_MAXRAND -#define G_MAXRAND G_MAXINT - - -G_MAXRAND -#define G_MAXRAND RAND_MAX - - -RINT -#define RINT(x) rint(x) - - -RINT -#define RINT(x) floor ((x) + 0.5) - - -ROUND -#define ROUND(x) ((int) ((x) + 0.5)) - - -SQR -#define SQR(x) ((x) * (x)) - - -MAX255 -#define MAX255(a) ((a) | (((a) & 256) - (((a) & 256) >> 8))) - - -CLAMP0255 -#define CLAMP0255(a) CLAMP(a,0,255) - - -gimp_deg_to_rad -#define gimp_deg_to_rad(angle) ((angle) * (2.0 * G_PI) / 360.0) - - -gimp_rad_to_deg -#define gimp_rad_to_deg(angle) ((angle) * 360.0 / (2.0 * G_PI)) - - -gimp_directory -gchar * -void - - -gimp_personal_rc_file -gchar * -gchar *basename - - -gimp_data_directory -gchar * -void - - -gimp_gtkrc -gchar * -void - - -GimpColorDisplayInit -void -void - - -GimpColorDisplayNew -gpointer -int type - - -GimpColorDisplayClone -gpointer -gpointer cd_ID - - -GimpColorDisplayConvert -void -gpointer cd_ID, - guchar *buf, - int width, - int height, - int bpp, - int bpl - - -GimpColorDisplayDestroy -void -gpointer cd_ID - - -GimpColorDisplayFinalize -void -void - - -GimpColorDisplayLoadState -void -gpointer cd_ID, - Parasite *state - - -GimpColorDisplaySaveState -Parasite * -gpointer cd_ID - - -GimpColorDisplayConfigure -void -gpointer cd_ID, - GFunc ok_func, - gpointer ok_data, - GFunc cancel_func, - gpointer cancel_data - - -GimpColorDisplayConfigureCancel -void -gpointer cd_ID - - -GimpColorDisplayMethods - - -GimpColorDisplayMethods -struct GimpColorDisplayMethods -{ - GimpColorDisplayInit init; - GimpColorDisplayNew new; - GimpColorDisplayClone clone; - GimpColorDisplayConvert convert; - GimpColorDisplayDestroy destroy; - GimpColorDisplayFinalize finalize; - GimpColorDisplayLoadState load; - GimpColorDisplaySaveState save; - GimpColorDisplayConfigure configure; - GimpColorDisplayConfigureCancel cancel; -}; - - -gimp_color_display_register -gboolean -const char *name,GimpColorDisplayMethods *methods - - -gimp_color_display_unregister -gboolean -const char *name - - -GIMP_MIN_IMAGE_SIZE -#define GIMP_MIN_IMAGE_SIZE 1 - - -GIMP_MAX_IMAGE_SIZE -#define GIMP_MAX_IMAGE_SIZE 16777216 - - -GIMP_MIN_RESOLUTION -#define GIMP_MIN_RESOLUTION (1.0 / 65536.0) - - -GIMP_MAX_RESOLUTION -#define GIMP_MAX_RESOLUTION 65536.0 - - -GIMP_CHECK_SIZE -#define GIMP_CHECK_SIZE 8 - - -GIMP_CHECK_SIZE_SM -#define GIMP_CHECK_SIZE_SM 4 - - -GIMP_CHECK_DARK -#define GIMP_CHECK_DARK (1.0 / 3.0) - - -GIMP_CHECK_LIGHT -#define GIMP_CHECK_LIGHT (2.0 / 3.0) - - -GIMP_TYPE_FILE_SELECTION -#define GIMP_TYPE_FILE_SELECTION (gimp_file_selection_get_type ()) - - -GIMP_FILE_SELECTION -#define GIMP_FILE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_FILE_SELECTION, GimpFileSelection)) - - -GIMP_FILE_SELECTION_CLASS -#define GIMP_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILE_SELECTION, GimpFileSelectionClass)) - - -GIMP_IS_FILE_SELECTION -#define GIMP_IS_FILE_SELECTION(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_FILE_SELECTION)) - - -GIMP_IS_FILE_SELECTION_CLASS -#define GIMP_IS_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FILE_SELECTION)) - - -GimpFileSelection - - -GimpFileSelectionClass - - -GimpFileSelection -struct GimpFileSelection -{ - GtkHBox hbox; - - GtkWidget *yes_pixmap; - GtkWidget *no_pixmap; - GtkWidget *entry; - GtkWidget *browse_button; - - GtkWidget *file_selection; - - gchar *title; - gboolean dir_only; - gboolean check_valid; -}; - - -gimp_file_selection_get_type -GtkType -void - - -gimp_file_selection_new -GtkWidget * -gchar *title,gchar *filename,gboolean dir_only,gboolean check_valid - - -gimp_file_selection_get_filename -gchar * -GimpFileSelection *gfs - - -gimp_file_selection_set_filename -void -GimpFileSelection *gfs,gchar *filename - - -GIMP_TYPE_PATH_EDITOR -#define GIMP_TYPE_PATH_EDITOR (gimp_path_editor_get_type ()) - - -GIMP_PATH_EDITOR -#define GIMP_PATH_EDITOR(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PATH_EDITOR, GimpPathEditor)) - - -GIMP_PATH_EDITOR_CLASS -#define GIMP_PATH_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PATH_EDITOR, GimpPathEditorClass)) - - -GIMP_IS_PATH_EDITOR -#define GIMP_IS_PATH_EDITOR(obj) (GTK_CHECK_TYPE (obj, GIMP_TYPE_PATH_EDITOR)) - - -GIMP_IS_PATH_EDITOR_CLASS -#define GIMP_IS_PATH_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PATH_EDITOR)) - - -GimpPathEditor - - -GimpPathEditorClass - - -GimpPathEditor -struct GimpPathEditor -{ - GtkVBox vbox; - - GtkWidget *upper_hbox; - - GtkWidget *new_button; - GtkWidget *up_button; - GtkWidget *down_button; - GtkWidget *delete_button; - - GtkWidget *file_selection; - - GtkWidget *dir_list; - - GtkWidget *selected_item; - gint number_of_items; -}; - - -gimp_path_editor_get_type -GtkType -void - - -gimp_path_editor_new -GtkWidget * -gchar *filesel_title,gchar *path - - -gimp_path_editor_get_path -gchar * -GimpPathEditor *gpe - PIXPIPE_MAXDIM #define PIXPIPE_MAXDIM 4 @@ -3431,92 +3614,6 @@ gchar *parameters,PixPipeParams *params gchar * PixPipeParams *params - -GimpExportCapabilities -typedef enum { - CAN_HANDLE_RGB = 1 << 0, - CAN_HANDLE_GRAY = 1 << 1, - CAN_HANDLE_INDEXED = 1 << 2, - CAN_HANDLE_ALPHA = 1 << 3, - CAN_HANDLE_LAYERS = 1 << 4, - CAN_HANDLE_LAYERS_AS_ANIMATION = 1 << 5, - NEEDS_ALPHA = 1 << 6 -} GimpExportCapabilities; - - -GimpExportReturnType -typedef enum -{ - EXPORT_CANCEL, - EXPORT_IGNORE, - EXPORT_EXPORT -} GimpExportReturnType; - - -gimp_export_image -GimpExportReturnType -gint32 *image_ID,gint32 *drawable_ID,gchar *format_name,GimpExportCapabilities capabilities - - -GIMP_MAJOR_VERSION -#define GIMP_MAJOR_VERSION (1) - - -GIMP_MINOR_VERSION -#define GIMP_MINOR_VERSION (1) - - -GIMP_MICRO_VERSION -#define GIMP_MICRO_VERSION (17) - - -GIMP_VERSION -#define GIMP_VERSION "1.1.17" - - -GIMP_CHECK_VERSION -#define GIMP_CHECK_VERSION(major, minor, micro) \ - (GIMP_MAJOR_VERSION > (major) || \ - (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \ - (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \ - GIMP_MICRO_VERSION >= (micro))) - - -GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE -#define GIMP_HAVE_PROCEDURAL_DB_GET_DATA_SIZE 1-1-0 - - -GIMP_HAVE_PARASITES -#define GIMP_HAVE_PARASITES 1-1-0 - - -GIMP_HAVE_RESOLUTION_INFO -#define GIMP_HAVE_RESOLUTION_INFO 1-1-0 - - -GIMP_HAVE_DESTROY_PARAMDEFS -#define GIMP_HAVE_DESTROY_PARAMDEFS 1-1-0 - - -GIMP_HAVE_FEATURES_1_1_5 -#define GIMP_HAVE_FEATURES_1_1_5 1-1-5 - - -GIMP_HAVE_DEFAULT_DISPLAY -#define GIMP_HAVE_DEFAULT_DISPLAY 1-1-5 - - -GIMP_HAVE_PIXEL_RGNS_REGISTER2 -#define GIMP_HAVE_PIXEL_RGNS_REGISTER2 1-1-5 - - -GIMP_HAVE_NEW_ENUMS -#define GIMP_HAVE_NEW_ENUMS 1-1-10 - - -GIMP_HAVE_EXPORT -#define GIMP_HAVE_EXPORT 1-1-10 - gimp_attach_parasite #define gimp_attach_parasite gimp_parasite_attach @@ -3702,30 +3799,46 @@ guchar *rgb,gdouble hue,gdouble saturation,gdouble value (g) * INTENSITY_GREEN + \ (b) * INTENSITY_BLUE + 0.001) + +GIMP_TYPE_PIXMAP +#define GIMP_TYPE_PIXMAP (gimp_pixmap_get_type ()) + + +GIMP_PIXMAP +#define GIMP_PIXMAP(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PIXMAP, GimpPixmap)) + + +GIMP_PIXMAP_CLASS +#define GIMP_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PIXMAP, GimpPixmapClass)) + + +GIMP_IS_PIXMAP +#define GIMP_IS_PIXMAP(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PIXMAP)) + + +GIMP_IS_PIXMAP_CLASS +#define GIMP_IS_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PIXMAP)) + + +GimpPixmap + + +GimpPixmapClass + -gimp_dialog_new +gimp_pixmap_get_type +GtkType +void + + +gimp_pixmap_new GtkWidget * -const gchar *title,const gchar *wmclass_name,GimpHelpFunc help_func,gchar *help_data,GtkWindowPosition position,gint allow_shrink,gint allow_grow,gint auto_shrink,... +gchar **xpm_data -gimp_dialog_newv -GtkWidget * -const gchar *title,const gchar *wmclass_name,GimpHelpFunc help_func,gchar *help_data,GtkWindowPosition position,gint allow_shrink,gint allow_grow,gint auto_shrink,va_list args - - -gimp_dialog_set_icon +gimp_pixmap_set void -GtkWindow *dialog - - -gimp_dialog_create_action_area -void -GtkDialog *dialog,... - - -gimp_dialog_create_action_areav -void -GtkDialog *dialog,va_list args +GimpPixmap *pixmap,gchar **xpm_data GimpHelpFunc @@ -3772,9 +3885,31 @@ GtkWidget *widget,const gchar *tool_tip,gchar *help_data void void - -Parasite - + +gimp_dialog_new +GtkWidget * +const gchar *title,const gchar *wmclass_name,GimpHelpFunc help_func,gchar *help_data,GtkWindowPosition position,gint allow_shrink,gint allow_grow,gint auto_shrink,... + + +gimp_dialog_newv +GtkWidget * +const gchar *title,const gchar *wmclass_name,GimpHelpFunc help_func,gchar *help_data,GtkWindowPosition position,gint allow_shrink,gint allow_grow,gint auto_shrink,va_list args + + +gimp_dialog_set_icon +void +GtkWindow *dialog + + +gimp_dialog_create_action_area +void +GtkDialog *dialog,... + + +gimp_dialog_create_action_areav +void +GtkDialog *dialog,va_list args + gimp_option_menu_new GtkWidget * @@ -3819,33 +3954,56 @@ GtkObject **adjustment,gfloat value,gfloat low GIMP_SCALE_ENTRY_SCALE_ADJ #define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \ gtk_range_get_adjustment \ - (GTK_RANGE (gtk_object_get_data (GTK_OBJECT(adj), "scale"))) + (GTK_RANGE (gtk_object_get_data (GTK_OBJECT (adj), "scale"))) GIMP_SCALE_ENTRY_SPINBUTTON #define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \ - GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton")) + GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton")) GIMP_SCALE_ENTRY_SPINBUTTON_ADJ #define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \ gtk_spin_button_get_adjustment \ - (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton"))) + (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton"))) gimp_scale_entry_new GtkObject * GtkTable *table,gint column,gint row,gchar *text,gint scale_usize,gint spinbutton_usize,gfloat value,gfloat lower,gfloat upper,gfloat step_increment,gfloat page_increment,guint digits,gboolean constrain,gfloat unconstrained_lower,gfloat unconstrained_upper,gchar *tooltip,gchar *private_tip + +GIMP_RANDOM_SEED_SPINBUTTON +#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \ + GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT( hbox), "spinbutton")) + + +GIMP_RANDOM_SEED_SPINBUTTON_ADJ +#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \ + gtk_spin_button_get_adjustment \ + (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), "spinbutton"))) + + +GIMP_RANDOM_SEED_TOGGLEBUTTON +#define GIMP_RANDOM_SEED_TOGGLEBUTTON(hbox) \ + GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), \ + "togglebutton")) + gimp_random_seed_new GtkWidget * -gint *seed,GtkWidget **seed_spinbutton,gint *use_time,GtkWidget **time_button,gint time_true,gint time_false +gint *seed,gint *use_time,gint time_true,gint time_false + +GIMP_COORDINATES_CHAINBUTTON +#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \ + GIMP_CHAIN_BUTTON (gtk_object_get_data (GTK_OBJECT (sizeentry), \ + "chainbutton")) + gimp_coordinates_new GtkWidget * -GimpUnit unit,gchar *unit_format,gboolean menu_show_pixels,gboolean menu_show_percent,gint spinbutton_usize,GimpSizeEntryUpdatePolicy update_policy,gboolean chainbutton_active,gboolean chain_constrains_ratio,GtkWidget **chainbutton,gchar *xlabel,gdouble x,gdouble xres,gdouble lower_boundary_x,gdouble upper_boundary_x,gdouble xsize_0,gdouble xsize_100,gchar *ylabel,gdouble y,gdouble yres,gdouble lower_boundary_y,gdouble upper_boundary_y,gdouble ysize_0,gdouble ysize_100 +GimpUnit unit,gchar *unit_format,gboolean menu_show_pixels,gboolean menu_show_percent,gint spinbutton_usize,GimpSizeEntryUpdatePolicy update_policy,gboolean chainbutton_active,gboolean chain_constrains_ratio,gchar *xlabel,gdouble x,gdouble xres,gdouble lower_boundary_x,gdouble upper_boundary_x,gdouble xsize_0,gdouble xsize_100,gchar *ylabel,gdouble y,gdouble yres,gdouble lower_boundary_y,gdouble upper_boundary_y,gdouble ysize_0,gdouble ysize_100 gimp_pixmap_button_new @@ -3853,39 +4011,44 @@ GimpUnit unit,gchar *unit_format,gboolean men gchar **xpm_data,gchar *text -gimp_toggle_button_update +gimp_toggle_button_sensitive_update void -GtkWidget *widget,gpointer data +GtkToggleButton *toggle_button -gimp_menu_item_update +gimp_toggle_button_update void -GtkWidget *widget,gpointer data +GtkWidget *widget,gpointer data gimp_radio_button_update void -GtkWidget *widget,gpointer data +GtkWidget *widget,gpointer data + + +gimp_menu_item_update +void +GtkWidget *widget,gpointer data gimp_int_adjustment_update void -GtkAdjustment *adjustment,gpointer data +GtkAdjustment *adjustment,gpointer data gimp_float_adjustment_update void -GtkAdjustment *adjustment,gpointer data +GtkAdjustment *adjustment,gpointer data gimp_double_adjustment_update void -GtkAdjustment *adjustment,gpointer data +GtkAdjustment *adjustment,gpointer data gimp_unit_menu_update void -GtkWidget *widget,gpointer data +GtkWidget *widget,gpointer data gimp_table_attach_aligned @@ -3953,80 +4116,6 @@ gchar *title,GimpHelpFunc help_func,gchar GtkWidget * gchar *title,GimpHelpFunc help_func,gchar *help_data,gboolean eek,gchar *message,gchar *true_button,gchar *false_button,GtkObject *object,gchar *signal,GimpQueryBooleanCallback callback,gpointer data - -GIMP_TYPE_CHAIN_BUTTON -#define GIMP_TYPE_CHAIN_BUTTON (gimp_chain_button_get_type ()) - - -GIMP_CHAIN_BUTTON -#define GIMP_CHAIN_BUTTON(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CHAIN_BUTTON, GimpChainButton)) - - -GIMP_CHAIN_BUTTON_CLASS -#define GIMP_CHAIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CHAIN_BUTTON, GimpChainButtonClass)) - - -GIMP_IS_CHAIN_BUTTON -#define GIMP_IS_CHAIN_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CHAIN_BUTTON)) - - -GIMP_IS_CHAIN_BUTTON_CLASS -#define GIMP_IS_CHAIN_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CHAIN_BUTTON)) - - -GimpChainButton - - -GimpChainButtonClass - - -GimpChainPosition -typedef enum -{ - GIMP_CHAIN_TOP, - GIMP_CHAIN_LEFT, - GIMP_CHAIN_BOTTOM, - GIMP_CHAIN_RIGHT -} GimpChainPosition; - - -GimpChainButton -struct GimpChainButton -{ - GtkTable table; - - GimpChainPosition position; - GtkWidget *button; - GtkWidget *line1; - GtkWidget *line2; - GtkWidget *pixmap; - GdkPixmap *broken; - GdkBitmap *broken_mask; - GdkPixmap *chain; - GdkBitmap *chain_mask; - gboolean active; -}; - - -gimp_chain_button_get_type -GtkType -void - - -gimp_chain_button_new -GtkWidget * -GimpChainPosition position - - -gimp_chain_button_set_active -void -GimpChainButton *gcb,gboolean is_active - - -gimp_chain_button_get_active -gboolean -GimpChainButton *gcb - GimpVector2 @@ -4167,39 +4256,3 @@ gint sx,gint sy,gint w,gint h,gint x,gin void gint sx,gint sy,gint w,gint h,gdouble *x,gdouble *y,GimpVector3 *vp,GimpVector3 *p - -GIMP_TYPE_PIXMAP -#define GIMP_TYPE_PIXMAP (gimp_pixmap_get_type ()) - - -GIMP_PIXMAP -#define GIMP_PIXMAP(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_PIXMAP, GimpPixmap)) - - -GIMP_PIXMAP_CLASS -#define GIMP_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PIXMAP, GimpPixmapClass)) - - -GIMP_IS_PIXMAP -#define GIMP_IS_PIXMAP(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_PIXMAP)) - - -GIMP_IS_PIXMAP_CLASS -#define GIMP_IS_PIXMAP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PIXMAP)) - - -GimpPixmap - - -GimpPixmapClass - - -gimp_pixmap_get_type -GtkType -void - - -gimp_pixmap_new -GtkWidget * -gchar **xpm_data - diff --git a/devel-docs/libgimp/libgimp-sections.txt b/devel-docs/libgimp/libgimp-sections.txt index 3315ff806a..f6ed4e2ab8 100644 --- a/devel-docs/libgimp/libgimp-sections.txt +++ b/devel-docs/libgimp/libgimp-sections.txt @@ -572,6 +572,10 @@ gimp_directory gimp_personal_rc_file gimp_data_directory gimp_gtkrc +gimp_path_parse +gimp_path_free +gimp_path_to_str +gimp_path_get_user_writable_dir
@@ -713,6 +717,7 @@ GimpPixmap GIMP_PIXMAP GimpPixmap gimp_pixmap_new +gimp_pixmap_set GIMP_TYPE_PIXMAP GIMP_IS_PIXMAP @@ -870,11 +875,16 @@ GIMP_SCALE_ENTRY_SCALE_ADJ GIMP_SCALE_ENTRY_SPINBUTTON GIMP_SCALE_ENTRY_SPINBUTTON_ADJ gimp_random_seed_new +GIMP_RANDOM_SEED_SPINBUTTON +GIMP_RANDOM_SEED_SPINBUTTON_ADJ +GIMP_RANDOM_SEED_TOGGLEBUTTON gimp_coordinates_new +GIMP_COORDINATES_CHAINBUTTON gimp_pixmap_button_new +gimp_toggle_button_sensitive_update gimp_toggle_button_update -gimp_menu_item_update gimp_radio_button_update +gimp_menu_item_update gimp_int_adjustment_update gimp_float_adjustment_update gimp_double_adjustment_update diff --git a/devel-docs/libgimp/tmpl/gimpenv.sgml b/devel-docs/libgimp/tmpl/gimpenv.sgml index 8531de028d..38473c4931 100644 --- a/devel-docs/libgimp/tmpl/gimpenv.sgml +++ b/devel-docs/libgimp/tmpl/gimpenv.sgml @@ -48,3 +48,41 @@ configuration files. @Returns: + + + + + +@path: +@max_paths: +@check: +@check_failed: +@Returns: + + + + + + + +@path: + + + + + + + +@path: +@Returns: + + + + + + + +@path: +@Returns: + + diff --git a/devel-docs/libgimp/tmpl/gimppixmap.sgml b/devel-docs/libgimp/tmpl/gimppixmap.sgml index 2465d4e981..983d5dd191 100644 --- a/devel-docs/libgimp/tmpl/gimppixmap.sgml +++ b/devel-docs/libgimp/tmpl/gimppixmap.sgml @@ -38,3 +38,12 @@ performs the cast if valid. @Returns: + + + + + +@pixmap: +@xpm_data: + + diff --git a/devel-docs/libgimp/tmpl/gimpwidgets.sgml b/devel-docs/libgimp/tmpl/gimpwidgets.sgml index 699367924c..8b79588382 100644 --- a/devel-docs/libgimp/tmpl/gimpwidgets.sgml +++ b/devel-docs/libgimp/tmpl/gimpwidgets.sgml @@ -18,6 +18,46 @@ helper functions. +The @va_list describing the #GtkMenuItem's has the following format: + + + + + + +#gchar label, +The menu item's label. + + + +#GtkSignalFunc callback, +The callback which will be connected to the menu item's +"activate" signal + + + +#gpointer data, +The callback data which will be used in gtk_signal_connect(). + + + +#gpointer user_data, +The menu item's @user_data which will be set with +gtk_object_set_user_data(). + + + +#GtkWidget **widget_ptr, +A pointer to store the created menu item in. + + + +#gboolean active, +#TRUE if this should be the initially selected menu item. + + + + @menu_only: @@ -28,6 +68,30 @@ helper functions. +The @va_list describing the #GtkMenuItem's has the following format: + + + + + + +#gchar label, +The menu item's label. + + + +#gpointer user_data, +The menu item's @user_data which will be set with +gtk_object_set_user_data(). + + + +#GtkWidget **widget_ptr, +A pointer to store the created menu item in. + + + + @menu_only: @@ -50,6 +114,46 @@ helper functions. +The @va_list describing the #GtkRadioButton's has the following format: + + + + + + +#gchar label, +The radio button's label. + + + +#GtkSignalFunc callback, +The callback which will be connected to the radio button's +"toggled" signal + + + +#gpointer data, +The callback data which will be used in gtk_signal_connect(). + + + +#gpointer user_data, +The radio button's @user_data which will be set with +gtk_object_set_user_data(). + + + +#GtkWidget **widget_ptr, +A pointer to store the created radio button in. + + + +#gboolean active, +#TRUE if this should be the initially pressed radio button. + + + + @in_frame: @@ -61,6 +165,30 @@ helper functions. +The @va_list describing the #GtkRadioButton's has the following format: + + + + + + +#gchar label, +The radio button's label. + + + +#gpointer user_data, +The radio button's @user_data which will be set with +gtk_object_set_user_data(). + + + +#GtkWidget **widget_ptr, +A pointer to store the created radio button in. + + + + @in_frame: @@ -116,42 +244,42 @@ helper functions. - +Returns the scale_entry's #GtkLabel. -@adj: +@adj: The #GtkAdjustment returned by gimp_scale_entry_new(). - +Returns the scale_entry's #GtkHScale. -@adj: +@adj: The #GtkAdjustment returned by gimp_scale_entry_new(). - +Returns the #GtkAdjustment of the scale_entry's #GtkHScale. -@adj: +@adj: The #GtkAdjustment returned by gimp_scale_entry_new(). - +Returns the scale_entry's #GtkSpinButton. -@adj: +@adj: The #GtkAdjustment returned by gimp_scale_entry_new(). - +Returns the #GtkAdjustment of the scale_entry's #GtkSpinButton. -@adj: +@adj: The #GtkAdjustment returned by gimp_scale_entry_new(). @@ -160,14 +288,36 @@ helper functions. @seed: -@seed_spinbutton: @use_time: -@time_button: @time_true: @time_false: @Returns: + + +Returns the random_seed's #GtkSpinButton. + + +@hbox: The #GtkHBox returned by gimp_random_seed_new(). + + + + +Returns the #GtkAdjustment of the random_seed's #GtkSpinButton. + + +@hbox: The #GtkHBox returned by gimp_random_seed_new(). + + + + +Returns the random_seed's #GtkToggleButton. + + +@hbox: The #GtkHBox returned by gimp_random_seed_new(). + + @@ -181,7 +331,6 @@ helper functions. @update_policy: @chainbutton_active: @chain_constrains_ratio: -@chainbutton: @xlabel: @x: @xres: @@ -199,6 +348,14 @@ helper functions. @Returns: + + +Returns the #GimpChainButton which is attached to the #GimpSizeEntry. + + +@sizeentry: The #GimpSizeEntry returned by gimp_coordinates_new(). + + @@ -209,6 +366,14 @@ helper functions. @Returns: + + + + + +@toggle_button: + + @@ -218,7 +383,7 @@ helper functions. @data: - + @@ -227,7 +392,7 @@ helper functions. @data: - + diff --git a/libgimp/gimpenv.c b/libgimp/gimpenv.c index 805b811283..3dc48c91c9 100644 --- a/libgimp/gimpenv.c +++ b/libgimp/gimpenv.c @@ -249,11 +249,12 @@ gimp_gtkrc (void) /** * gimp_path_parse: * @path: A list of directories separated by #G_SEARCHPATH_SEPARATOR. - * @max_path: The maximum number of directories to return. + * @max_paths: The maximum number of directories to return. * @check: #TRUE if you want the directories to be checked. - * @not_found: # + * @check_failed: Returns a #GList of path elements for which the + * check failed. * - * Return: A list of all directories in @path. + * Returns: A #GList of all directories in @path. * */ GList * diff --git a/libgimp/gimpquerybox.c b/libgimp/gimpquerybox.c index e4b2ed72bd..99544548af 100644 --- a/libgimp/gimpquerybox.c +++ b/libgimp/gimpquerybox.c @@ -383,7 +383,8 @@ gimp_query_size_box (gchar *title, * @false_button: The string to be shown in the dialog's right button. * @object: The object this query box is associated with. * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user selects "OK". + * @callback: The function which will be called when the user clicks one + * of the buttons. * @data: The callback's user data. * * Returns: A pointer to the new #GtkDialog. diff --git a/libgimp/gimpwidgets.c b/libgimp/gimpwidgets.c index aa96127c02..90113bf453 100644 --- a/libgimp/gimpwidgets.c +++ b/libgimp/gimpwidgets.c @@ -31,23 +31,16 @@ #include "libgimp-intl.h" -/* - * Forward declarations - */ - -static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button); - - /* * Widget Constructors */ /** * gimp_option_menu_new: - * @menu_only: - * @...: + * @menu_only: #TRUE if the function should return a #GtkMenu only. + * @...: A #NULL terminated @va_list describing the menu items. * - * Returns: + * Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only). * */ GtkWidget * @@ -142,13 +135,14 @@ gimp_option_menu_new (gboolean menu_only, /** * gimp_option_menu_new2: - * @menu_only: - * @menu_item_callback: - * @data: - * @initial: - * @...: + * @menu_only: #TRUE if the function should return a #GtkMenu only. + * @menu_item_callback: The callback each menu item's "activate" signal will + * be connected with. + * @data: The data which will be passed to gtk_signal_connect(). + * @initial: The @user_data of the initially selected menu item. + * @...: A #NULL terminated @va_list describing the menu items. * - * Returns: + * Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only). * */ GtkWidget * @@ -237,8 +231,9 @@ gimp_option_menu_new2 (gboolean menu_only, /** * gimp_option_menu_set_history: - * @option_menu: - * @user_data: + * @option_menu: A #GtkOptionMenu as returned by gimp_option_menu_new() or + * gimp_option_menu_new2(). + * @user_data: The @user_data of the menu item you want to select. * */ void @@ -273,11 +268,11 @@ gimp_option_menu_set_history (GtkOptionMenu *option_menu, /** * gimp_radio_group_new: - * @in_frame: - * @frame_title: - * @...: + * @in_frame: #TRUE if you want a #GtkFrame around the radio button group. + * @frame_title: The title of the Frame or #NULL if you don't want a title. + * @...: A #NULL terminated @va_list describing the radio buttons. * - * Returns: + * Returns: A #GtkFrame or #GtkVbox (depending on @in_frame). * */ GtkWidget * @@ -368,14 +363,15 @@ gimp_radio_group_new (gboolean in_frame, /** * gimp_radio_group_new2: - * @in_frame: - * @frame_title: - * @radio_button_callback: - * @data: - * @initial: - * @...: + * @in_frame: #TRUE if you want a #GtkFrame around the radio button group. + * @frame_title: The title of the Frame or #NULL if you don't want a title. + * @radio_button_callback: The callback each button's "toggled" signal will + * be connected with. + * @data: The data which will be passed to gtk_signal_connect(). + * @initial: The @user_data of the initially pressed radio button. + * @...: A #NULL terminated @va_list describing the radio buttons. * - * Returns: + * Returns: A #GtkFrame or #GtkVbox (depending on @in_frame). * */ GtkWidget * @@ -460,17 +456,21 @@ gimp_radio_group_new2 (gboolean in_frame, /** * gimp_spin_button_new: - * @adjustment: - * @value: - * @lower: - * @upper: - * @step_increment: - * @page_increment: - * @page_size: - * @climb_rate: - * @digits: + * @adjustment: Returns the spinbutton's #GtkAdjustment. + * @value: The initial value of the spinbutton. + * @lower: The lower boundary. + * @upper: The uppper boundary. + * @step_increment: The spinbutton's step increment. + * @page_increment: The spinbutton's page increment (mouse button 2). + * @page_size: The spinbutton's page size. + * @climb_rate: The spinbutton's climb rate. + * @digits: The spinbutton's number of decimal digits. * - * Returns: + * This function is a shortcut for gtk_adjustment_new() and a subsequent + * gtk_spin_button_new() and does some more initialisation stuff like + * setting a standard minimun horizontal size. + * + * Returns: A #GtkSpinbutton and it's #GtkAdjustment. * */ GtkWidget * @@ -512,25 +512,34 @@ gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment, /** * gimp_scale_entry_new: - * @table: - * @column: - * @row: - * @text: - * @scale_usize: - * @spinbutton_usize: - * @value: - * @lower: - * @upper: - * @step_increment: - * @page_increment: - * @digits: - * @constrain: - * @unconstrained_lower: - * @unconstrained_upper: - * @tooltip: - * @private_tip: + * @table: The #GtkTable the widgets will be attached to. + * @column: The column to start with. + * @row: The row to attach the widgets. + * @text: The text for the #GtkLabel which will appear left of the #GtkHScale. + * @scale_usize: The minimum horizontal size of the #GtkHScale. + * @spinbutton_usize: The minimum horizontal size of the #GtkSpinButton. + * @value: The initial value. + * @lower: The lower boundary. + * @upper: The upper boundary. + * @step_increment: The step increment. + * @page_increment: The page increment. + * @digits: The number of decimal digits. + * @constrain: #TRUE if the range of possible values of the #GtkSpinButton + * should be the same as of the #GtkHScale. + * @unconstrained_lower: The spinbutton's lower boundary + * if @constrain == #FALSE. + * @unconstrained_upper: The spinbutton's upper boundary + * if @constrain == #FALSE. + * @tooltip: A tooltip message for the scale and the spinbutton. + * @private_tip: The widgets' private_tip (see gimp_help_set_help_data()). * - * Returns: + * This function creates a #GtkLabel, a #GtkHScale and a #GtkSpinButton and + * attaches them to a 3-column #GtkTable. + * + * Note that if you pass a @tooltip or @private_tip to this function you'll + * have to initialize GIMP's help system with gimp_help_init() before using it. + * + * Returns: The #GtkSpinButton's #GtkAdjustment. * */ GtkObject * @@ -655,21 +664,24 @@ gimp_random_seed_toggle_update (GtkWidget *widget, /** * gimp_random_seed_new: - * @seed: - * @seed_spinbutton: - * @use_time: - * @time_button: - * @time_true: - * @time_false: + * @seed: A pointer to the variable which stores the random seed. + * @use_time: A pointer to the variable which stores the @use_time + * toggle boolean. + * @time_true: The value to write to @use_time if the toggle button is checked. + * @time_false: The value to write to @use_time if the toggle button is + * unchecked. * - * Returns: + * Note that this widget automatically sets tooltips with + * gimp_help_set_help_data(), so you'll have to initialize GIMP's help + * system with gimp_help_init() before using it. + * + * Returns: A #GtkHBox containing a #GtkSpinButton for the random seed and + * a #GtkToggleButton for toggling the @use_time behaviour. * */ GtkWidget * gimp_random_seed_new (gint *seed, - GtkWidget **seed_spinbutton, gint *use_time, - GtkWidget **time_button, gint time_true, gint time_false) { @@ -688,9 +700,6 @@ gimp_random_seed_new (gint *seed, seed); gtk_widget_show (spinbutton); - if (seed_spinbutton) - *seed_spinbutton = spinbutton; - gimp_help_set_help_data (spinbutton, _("If the \"Time\" button is not pressed, " "use this value for random number generator " @@ -705,9 +714,6 @@ gimp_random_seed_new (gint *seed, gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show (button); - if (time_button) - *time_button = button; - gimp_help_set_help_data (button, _("Seed random number generator from the current " "time - this guarantees a reasonable " @@ -724,6 +730,9 @@ gimp_random_seed_new (gint *seed, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), *use_time == time_true); + gtk_object_set_data (GTK_OBJECT (hbox), "spinbutton", spinbutton); + gtk_object_set_data (GTK_OBJECT (hbox), "togglebutton", button); + return hbox; } @@ -799,31 +808,38 @@ gimp_coordinates_callback (GtkWidget *widget, /** * gimp_coordinates_new: - * @unit: - * @unit_format: - * @menu_show_pixels: - * @menu_show_percent: - * @spinbutton_usize: - * @update_policy: - * @chainbutton_active: - * @chain_constrains_ratio: - * @chainbutton: - * @xlabel: - * @x: - * @xres: - * @lower_boundary_x: - * @upper_boundary_x: - * @xsize_0: - * @xsize_100: - * @ylabel: - * @y: - * @yres: - * @lower_boundary_y: - * @upper_boundary_y: - * @ysize_0: - * @ysize_100: + * @unit: The unitial unit of the #GimpUnitMenu. + * @unit_format: The unit format string as passed to gimp_size_entry_new(). + * @menu_show_pixels: #TRUE if the #GimpUnitMenu should contain an item for + * GIMP_UNIT_PIXEL. + * @menu_show_percent: #TRUE if the #GimpUnitMenu should contain an item for + * GIMP_UNIT_PERCENT. + * @spinbutton_usize: The horizontal usize of the #GimpSizeEntry's + * #GtkSpinButton's. + * @update_policy: The update policy for the #GimpSizeEntry. + * @chainbutton_active: #TRUE if the attached #GimpChainButton should be + * active. + * @chain_constrains_ratio: #TRUE if the chainbutton should constrain the + * fields' aspect ratio. If #FALSE, the values will + * be constrained. + * @xlabel: The label for the X coordinate. + * @x: The initial value of the X coordinate. + * @xres: The horizontal resolution in DPI. + * @lower_boundary_x: The lower boundary of the X coordinate. + * @upper_boundary_x: The upper boundary of the X coordinate. + * @xsize_0: The X value which will be treated as 0%. + * @xsize_100: The X value which will be treated as 100%. + * @ylabel: The label for the Y coordinate. + * @y: The initial value of the Y coordinate. + * @yres: The vertical resolution in DPI. + * @lower_boundary_y: The lower boundary of the Y coordinate. + * @upper_boundary_y: The upper boundary of the Y coordinate. + * @ysize_0: The Y value which will be treated as 0%. + * @ysize_100: The Y value which will be treated as 100%. * - * Returns: + * Returns: A #GimpSizeEntry with two fields for x/y coordinates/sizes with + * a #GimpChainButton attached to constrain either the two fields' + * values or the ratio between them. * */ GtkWidget * @@ -836,8 +852,6 @@ gimp_coordinates_new (GimpUnit unit, gboolean chainbutton_active, gboolean chain_constrains_ratio, - /* return value: */ - GtkWidget **chainbutton, gchar *xlabel, gdouble x, @@ -859,7 +873,7 @@ gimp_coordinates_new (GimpUnit unit, GtkObject *adjustment; GtkWidget *spinbutton; GtkWidget *sizeentry; - GtkWidget *chainb; + GtkWidget *chainbutton; spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2); sizeentry = gimp_size_entry_new (1, unit, unit_format, @@ -898,18 +912,15 @@ gimp_coordinates_new (GimpUnit unit, gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), xlabel, 0, 0, 1.0); gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), ylabel, 1, 0, 1.0); - chainb = gimp_chain_button_new (GIMP_CHAIN_RIGHT); + chainbutton = gimp_chain_button_new (GIMP_CHAIN_RIGHT); if (chainbutton_active) - gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainb), TRUE); - gtk_table_attach (GTK_TABLE (sizeentry), chainb, 2, 3, 0, 2, + gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainbutton), TRUE); + gtk_table_attach (GTK_TABLE (sizeentry), chainbutton, 2, 3, 0, 2, GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (chainb); - - if (chainbutton) - *chainbutton = chainb; + gtk_widget_show (chainbutton); gcd = g_new (GimpCoordinatesData, 1); - gcd->chainbutton = GIMP_CHAIN_BUTTON (chainb); + gcd->chainbutton = GIMP_CHAIN_BUTTON (chainbutton); gcd->chain_constrains_ratio = chain_constrains_ratio; gcd->orig_x = x; gcd->orig_y = y; @@ -924,15 +935,17 @@ gimp_coordinates_new (GimpUnit unit, GTK_SIGNAL_FUNC (gimp_coordinates_callback), gcd); + gtk_object_set_data (GTK_OBJECT (sizeentry), "chainbutton", chainbutton); + return sizeentry; } /** * gimp_pixmap_button_new: - * @xpm_data: - * @text: + * @xpm_data: The XPM data which will be passed to gimp_pixmap_new(). + * @text: An optional text which will appear right of the pixmap. * - * Returns: + * Returns: A #GtkButton with a #GimpPixmap and an optional #GtkLabel. * */ GtkWidget * @@ -980,7 +993,25 @@ gimp_pixmap_button_new (gchar **xpm_data, * Standard Callbacks */ -static void +/** + * gimp_toggle_button_sensitive_update: + * @toggle_button: The #GtkToggleButton the "set_sensitive" and + * "inverse_sensitive" lists are attached to. + * + * If you attached a pointer to a #GtkWidget with gtk_object_set_data() and + * the "set_sensitive" key to the #GtkToggleButton, the sensitive state of + * the attached widget will be set according to the toggle button's + * "active" state. + * + * You can attach an arbitrary list of widgets by attaching another + * "set_sensitive" data pointer to the first widget (and so on...). + * + * This function can also set the sensitive state according to the toggle + * button's inverse "active" state by attaching widgets with the + * "inverse_sensitive" key. + * + */ +void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button) { GtkWidget *set_sensitive; @@ -1009,8 +1040,11 @@ gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button) /** * gimp_toggle_button_update: - * @widget: - * @data: + * @widget: A #GtkToggleButton. + * @data: A pointer to a #gint variable which will store the value of + * gtk_toggle_button_get_active(). + * + * Note that this function calls gimp_toggle_button_sensitive_update(). * */ void @@ -1029,27 +1063,13 @@ gimp_toggle_button_update (GtkWidget *widget, gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); } -/** - * gimp_menu_item_update: - * @widget: - * @data: - * - */ -void -gimp_menu_item_update (GtkWidget *widget, - gpointer data) -{ - gint *item_val; - - item_val = (gint *) data; - - *item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget)); -} - /** * gimp_radio_button_update: - * @widget: - * @data: + * @widget: A #GtkRadioButton. + * @data: A pointer to a #gint variable which will store the value of + * (#gint) gtk_object_get_user_data(). + * + * Note that this function calls gimp_toggle_button_sensitive_update(). * */ void @@ -1068,10 +1088,32 @@ gimp_radio_button_update (GtkWidget *widget, gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); } +/** + * gimp_menu_item_update: + * @widget: A #GtkMenuItem. + * @data: A pointer to a #gint variable which will store the value of + * (#gint) gtk_object_get_user_data(). + * + */ +void +gimp_menu_item_update (GtkWidget *widget, + gpointer data) +{ + gint *item_val; + + item_val = (gint *) data; + + *item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget)); +} + /** * gimp_int_adjustment_update: - * @adjustment: - * @data: + * @adjustment: A #GtkAdjustment. + * @data: A pointer to a #gint variable which will store the adjustment's + * value. + * + * Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded + * with (#gint) (value + 0.5). * */ void @@ -1086,8 +1128,9 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment, /** * gimp_float_adjustment_update: - * @adjustment: - * @data: + * @adjustment: A #GtkAdjustment. + * @data: A pointer to a #gfloat varaiable which willl store the adjustment's + * value. * */ void @@ -1102,8 +1145,9 @@ gimp_float_adjustment_update (GtkAdjustment *adjustment, /** * gimp_double_adjustment_update: - * @adjustment: - * @data: + * @adjustment: A #GtkAdjustment. + * @data: A pointer to a #gdouble variable which will store the adjustment's + * value. * */ void @@ -1118,8 +1162,17 @@ gimp_double_adjustment_update (GtkAdjustment *adjustment, /** * gimp_unit_menu_update: - * @widget: - * @data: + * @widget: A #GimpUnitMenu. + * @data: A pointer to a #GimpUnit variable which will store the unit menu's + * value. + * + * This callback can set the number of decimal digits of an arbitrary number + * of #GtkSpinButton's. To use this functionality, attach the spinbuttons + * as list of data pointers attached with gtk_object_set_data() with the + * "set_digits" key. + * + * See gimp_toggle_button_sensitive_update() for a description of how + * to set up the list. * */ void @@ -1152,15 +1205,19 @@ gimp_unit_menu_update (GtkWidget *widget, /** * gimp_table_attach_aligned: - * @table: - * @column: - * @row: - * @label_text: - * @xalign: - * @yalign: - * @widget: - * @colspan: - * @left_align: + * @table: The #GtkTable the widgets will be attached to. + * @column: The column to start with. + * @row: The row to attach the eidgets. + * @label_text: The text for the #GtkLabel which will be attached left of the + * widget. + * @xalign: The horizontal alignment of the #GtkLabel. + * @yalign: The vertival alignment of the #GtkLabel. + * @widget: The #GtkWidget to attach right of the label. + * @colspan: The number of columns the widget will use. + * @left_align: #TRUE if the widget should be left-aligned. + * + * Note that the @label_text can be #NULL and that the widget will be attached + * starting at (@column + 1) in this case, too. * */ void diff --git a/libgimp/gimpwidgets.h b/libgimp/gimpwidgets.h index 66bd026085..fbedec8980 100644 --- a/libgimp/gimpwidgets.h +++ b/libgimp/gimpwidgets.h @@ -30,6 +30,8 @@ extern "C" { #endif +/* For information look into the C source or the html documentation */ + /* * Widget Constructors */ @@ -110,13 +112,13 @@ GtkWidget * gimp_spin_button_new (/* return value: */ GTK_HSCALE (gtk_object_get_data (GTK_OBJECT(adj), "scale")) #define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \ gtk_range_get_adjustment \ - (GTK_RANGE (gtk_object_get_data (GTK_OBJECT(adj), "scale"))) + (GTK_RANGE (gtk_object_get_data (GTK_OBJECT (adj), "scale"))) #define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \ - GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton")) + GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton")) #define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \ gtk_spin_button_get_adjustment \ - (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton"))) + (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton"))) GtkObject * gimp_scale_entry_new (GtkTable *table, gint column, @@ -136,13 +138,25 @@ GtkObject * gimp_scale_entry_new (GtkTable *table, gchar *tooltip, gchar *private_tip); +#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \ + GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT( hbox), "spinbutton")) +#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \ + gtk_spin_button_get_adjustment \ + (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), "spinbutton"))) + +#define GIMP_RANDOM_SEED_TOGGLEBUTTON(hbox) \ + GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), \ + "togglebutton")) + GtkWidget * gimp_random_seed_new (gint *seed, - GtkWidget **seed_spinbutton, gint *use_time, - GtkWidget **time_button, gint time_true, gint time_false); +#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \ + GIMP_CHAIN_BUTTON (gtk_object_get_data (GTK_OBJECT (sizeentry), \ + "chainbutton")) + GtkWidget * gimp_coordinates_new (GimpUnit unit, gchar *unit_format, gboolean menu_show_pixels, @@ -152,8 +166,6 @@ GtkWidget * gimp_coordinates_new (GimpUnit unit, gboolean chainbutton_active, gboolean chain_constrains_ratio, - /* return value: */ - GtkWidget **chainbutton, gchar *xlabel, gdouble x, @@ -178,32 +190,33 @@ GtkWidget * gimp_pixmap_button_new (gchar **xpm_data, * Standard Callbacks */ -void gimp_toggle_button_update (GtkWidget *widget, - gpointer data); +void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button); -void gimp_menu_item_update (GtkWidget *widget, - gpointer data); +void gimp_toggle_button_update (GtkWidget *widget, + gpointer data); -void gimp_radio_button_update (GtkWidget *widget, - gpointer data); +void gimp_radio_button_update (GtkWidget *widget, + gpointer data); -void gimp_int_adjustment_update (GtkAdjustment *adjustment, - gpointer data); +void gimp_menu_item_update (GtkWidget *widget, + gpointer data); -void gimp_float_adjustment_update (GtkAdjustment *adjustment, - gpointer data); +void gimp_int_adjustment_update (GtkAdjustment *adjustment, + gpointer data); -void gimp_double_adjustment_update (GtkAdjustment *adjustment, - gpointer data); +void gimp_float_adjustment_update (GtkAdjustment *adjustment, + gpointer data); -void gimp_unit_menu_update (GtkWidget *widget, - gpointer data); +void gimp_double_adjustment_update (GtkAdjustment *adjustment, + gpointer data); + +void gimp_unit_menu_update (GtkWidget *widget, + gpointer data); /* * Helper Functions */ -/* add aligned label & widget to a table */ void gimp_table_attach_aligned (GtkTable *table, gint column, gint row, diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c index 805b811283..3dc48c91c9 100644 --- a/libgimpbase/gimpenv.c +++ b/libgimpbase/gimpenv.c @@ -249,11 +249,12 @@ gimp_gtkrc (void) /** * gimp_path_parse: * @path: A list of directories separated by #G_SEARCHPATH_SEPARATOR. - * @max_path: The maximum number of directories to return. + * @max_paths: The maximum number of directories to return. * @check: #TRUE if you want the directories to be checked. - * @not_found: # + * @check_failed: Returns a #GList of path elements for which the + * check failed. * - * Return: A list of all directories in @path. + * Returns: A #GList of all directories in @path. * */ GList * diff --git a/libgimpwidgets/gimpquerybox.c b/libgimpwidgets/gimpquerybox.c index e4b2ed72bd..99544548af 100644 --- a/libgimpwidgets/gimpquerybox.c +++ b/libgimpwidgets/gimpquerybox.c @@ -383,7 +383,8 @@ gimp_query_size_box (gchar *title, * @false_button: The string to be shown in the dialog's right button. * @object: The object this query box is associated with. * @signal: The object's signal which will cause the query box to be closed. - * @callback: The function which will be called when the user selects "OK". + * @callback: The function which will be called when the user clicks one + * of the buttons. * @data: The callback's user data. * * Returns: A pointer to the new #GtkDialog. diff --git a/libgimpwidgets/gimpwidgets.c b/libgimpwidgets/gimpwidgets.c index aa96127c02..90113bf453 100644 --- a/libgimpwidgets/gimpwidgets.c +++ b/libgimpwidgets/gimpwidgets.c @@ -31,23 +31,16 @@ #include "libgimp-intl.h" -/* - * Forward declarations - */ - -static void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button); - - /* * Widget Constructors */ /** * gimp_option_menu_new: - * @menu_only: - * @...: + * @menu_only: #TRUE if the function should return a #GtkMenu only. + * @...: A #NULL terminated @va_list describing the menu items. * - * Returns: + * Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only). * */ GtkWidget * @@ -142,13 +135,14 @@ gimp_option_menu_new (gboolean menu_only, /** * gimp_option_menu_new2: - * @menu_only: - * @menu_item_callback: - * @data: - * @initial: - * @...: + * @menu_only: #TRUE if the function should return a #GtkMenu only. + * @menu_item_callback: The callback each menu item's "activate" signal will + * be connected with. + * @data: The data which will be passed to gtk_signal_connect(). + * @initial: The @user_data of the initially selected menu item. + * @...: A #NULL terminated @va_list describing the menu items. * - * Returns: + * Returns: A #GtkOptionMenu or a #GtkMenu (depending on @menu_only). * */ GtkWidget * @@ -237,8 +231,9 @@ gimp_option_menu_new2 (gboolean menu_only, /** * gimp_option_menu_set_history: - * @option_menu: - * @user_data: + * @option_menu: A #GtkOptionMenu as returned by gimp_option_menu_new() or + * gimp_option_menu_new2(). + * @user_data: The @user_data of the menu item you want to select. * */ void @@ -273,11 +268,11 @@ gimp_option_menu_set_history (GtkOptionMenu *option_menu, /** * gimp_radio_group_new: - * @in_frame: - * @frame_title: - * @...: + * @in_frame: #TRUE if you want a #GtkFrame around the radio button group. + * @frame_title: The title of the Frame or #NULL if you don't want a title. + * @...: A #NULL terminated @va_list describing the radio buttons. * - * Returns: + * Returns: A #GtkFrame or #GtkVbox (depending on @in_frame). * */ GtkWidget * @@ -368,14 +363,15 @@ gimp_radio_group_new (gboolean in_frame, /** * gimp_radio_group_new2: - * @in_frame: - * @frame_title: - * @radio_button_callback: - * @data: - * @initial: - * @...: + * @in_frame: #TRUE if you want a #GtkFrame around the radio button group. + * @frame_title: The title of the Frame or #NULL if you don't want a title. + * @radio_button_callback: The callback each button's "toggled" signal will + * be connected with. + * @data: The data which will be passed to gtk_signal_connect(). + * @initial: The @user_data of the initially pressed radio button. + * @...: A #NULL terminated @va_list describing the radio buttons. * - * Returns: + * Returns: A #GtkFrame or #GtkVbox (depending on @in_frame). * */ GtkWidget * @@ -460,17 +456,21 @@ gimp_radio_group_new2 (gboolean in_frame, /** * gimp_spin_button_new: - * @adjustment: - * @value: - * @lower: - * @upper: - * @step_increment: - * @page_increment: - * @page_size: - * @climb_rate: - * @digits: + * @adjustment: Returns the spinbutton's #GtkAdjustment. + * @value: The initial value of the spinbutton. + * @lower: The lower boundary. + * @upper: The uppper boundary. + * @step_increment: The spinbutton's step increment. + * @page_increment: The spinbutton's page increment (mouse button 2). + * @page_size: The spinbutton's page size. + * @climb_rate: The spinbutton's climb rate. + * @digits: The spinbutton's number of decimal digits. * - * Returns: + * This function is a shortcut for gtk_adjustment_new() and a subsequent + * gtk_spin_button_new() and does some more initialisation stuff like + * setting a standard minimun horizontal size. + * + * Returns: A #GtkSpinbutton and it's #GtkAdjustment. * */ GtkWidget * @@ -512,25 +512,34 @@ gimp_scale_entry_unconstrained_adjustment_callback (GtkAdjustment *adjustment, /** * gimp_scale_entry_new: - * @table: - * @column: - * @row: - * @text: - * @scale_usize: - * @spinbutton_usize: - * @value: - * @lower: - * @upper: - * @step_increment: - * @page_increment: - * @digits: - * @constrain: - * @unconstrained_lower: - * @unconstrained_upper: - * @tooltip: - * @private_tip: + * @table: The #GtkTable the widgets will be attached to. + * @column: The column to start with. + * @row: The row to attach the widgets. + * @text: The text for the #GtkLabel which will appear left of the #GtkHScale. + * @scale_usize: The minimum horizontal size of the #GtkHScale. + * @spinbutton_usize: The minimum horizontal size of the #GtkSpinButton. + * @value: The initial value. + * @lower: The lower boundary. + * @upper: The upper boundary. + * @step_increment: The step increment. + * @page_increment: The page increment. + * @digits: The number of decimal digits. + * @constrain: #TRUE if the range of possible values of the #GtkSpinButton + * should be the same as of the #GtkHScale. + * @unconstrained_lower: The spinbutton's lower boundary + * if @constrain == #FALSE. + * @unconstrained_upper: The spinbutton's upper boundary + * if @constrain == #FALSE. + * @tooltip: A tooltip message for the scale and the spinbutton. + * @private_tip: The widgets' private_tip (see gimp_help_set_help_data()). * - * Returns: + * This function creates a #GtkLabel, a #GtkHScale and a #GtkSpinButton and + * attaches them to a 3-column #GtkTable. + * + * Note that if you pass a @tooltip or @private_tip to this function you'll + * have to initialize GIMP's help system with gimp_help_init() before using it. + * + * Returns: The #GtkSpinButton's #GtkAdjustment. * */ GtkObject * @@ -655,21 +664,24 @@ gimp_random_seed_toggle_update (GtkWidget *widget, /** * gimp_random_seed_new: - * @seed: - * @seed_spinbutton: - * @use_time: - * @time_button: - * @time_true: - * @time_false: + * @seed: A pointer to the variable which stores the random seed. + * @use_time: A pointer to the variable which stores the @use_time + * toggle boolean. + * @time_true: The value to write to @use_time if the toggle button is checked. + * @time_false: The value to write to @use_time if the toggle button is + * unchecked. * - * Returns: + * Note that this widget automatically sets tooltips with + * gimp_help_set_help_data(), so you'll have to initialize GIMP's help + * system with gimp_help_init() before using it. + * + * Returns: A #GtkHBox containing a #GtkSpinButton for the random seed and + * a #GtkToggleButton for toggling the @use_time behaviour. * */ GtkWidget * gimp_random_seed_new (gint *seed, - GtkWidget **seed_spinbutton, gint *use_time, - GtkWidget **time_button, gint time_true, gint time_false) { @@ -688,9 +700,6 @@ gimp_random_seed_new (gint *seed, seed); gtk_widget_show (spinbutton); - if (seed_spinbutton) - *seed_spinbutton = spinbutton; - gimp_help_set_help_data (spinbutton, _("If the \"Time\" button is not pressed, " "use this value for random number generator " @@ -705,9 +714,6 @@ gimp_random_seed_new (gint *seed, gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_widget_show (button); - if (time_button) - *time_button = button; - gimp_help_set_help_data (button, _("Seed random number generator from the current " "time - this guarantees a reasonable " @@ -724,6 +730,9 @@ gimp_random_seed_new (gint *seed, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), *use_time == time_true); + gtk_object_set_data (GTK_OBJECT (hbox), "spinbutton", spinbutton); + gtk_object_set_data (GTK_OBJECT (hbox), "togglebutton", button); + return hbox; } @@ -799,31 +808,38 @@ gimp_coordinates_callback (GtkWidget *widget, /** * gimp_coordinates_new: - * @unit: - * @unit_format: - * @menu_show_pixels: - * @menu_show_percent: - * @spinbutton_usize: - * @update_policy: - * @chainbutton_active: - * @chain_constrains_ratio: - * @chainbutton: - * @xlabel: - * @x: - * @xres: - * @lower_boundary_x: - * @upper_boundary_x: - * @xsize_0: - * @xsize_100: - * @ylabel: - * @y: - * @yres: - * @lower_boundary_y: - * @upper_boundary_y: - * @ysize_0: - * @ysize_100: + * @unit: The unitial unit of the #GimpUnitMenu. + * @unit_format: The unit format string as passed to gimp_size_entry_new(). + * @menu_show_pixels: #TRUE if the #GimpUnitMenu should contain an item for + * GIMP_UNIT_PIXEL. + * @menu_show_percent: #TRUE if the #GimpUnitMenu should contain an item for + * GIMP_UNIT_PERCENT. + * @spinbutton_usize: The horizontal usize of the #GimpSizeEntry's + * #GtkSpinButton's. + * @update_policy: The update policy for the #GimpSizeEntry. + * @chainbutton_active: #TRUE if the attached #GimpChainButton should be + * active. + * @chain_constrains_ratio: #TRUE if the chainbutton should constrain the + * fields' aspect ratio. If #FALSE, the values will + * be constrained. + * @xlabel: The label for the X coordinate. + * @x: The initial value of the X coordinate. + * @xres: The horizontal resolution in DPI. + * @lower_boundary_x: The lower boundary of the X coordinate. + * @upper_boundary_x: The upper boundary of the X coordinate. + * @xsize_0: The X value which will be treated as 0%. + * @xsize_100: The X value which will be treated as 100%. + * @ylabel: The label for the Y coordinate. + * @y: The initial value of the Y coordinate. + * @yres: The vertical resolution in DPI. + * @lower_boundary_y: The lower boundary of the Y coordinate. + * @upper_boundary_y: The upper boundary of the Y coordinate. + * @ysize_0: The Y value which will be treated as 0%. + * @ysize_100: The Y value which will be treated as 100%. * - * Returns: + * Returns: A #GimpSizeEntry with two fields for x/y coordinates/sizes with + * a #GimpChainButton attached to constrain either the two fields' + * values or the ratio between them. * */ GtkWidget * @@ -836,8 +852,6 @@ gimp_coordinates_new (GimpUnit unit, gboolean chainbutton_active, gboolean chain_constrains_ratio, - /* return value: */ - GtkWidget **chainbutton, gchar *xlabel, gdouble x, @@ -859,7 +873,7 @@ gimp_coordinates_new (GimpUnit unit, GtkObject *adjustment; GtkWidget *spinbutton; GtkWidget *sizeentry; - GtkWidget *chainb; + GtkWidget *chainbutton; spinbutton = gimp_spin_button_new (&adjustment, 1, 0, 1, 1, 10, 1, 1, 2); sizeentry = gimp_size_entry_new (1, unit, unit_format, @@ -898,18 +912,15 @@ gimp_coordinates_new (GimpUnit unit, gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), xlabel, 0, 0, 1.0); gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (sizeentry), ylabel, 1, 0, 1.0); - chainb = gimp_chain_button_new (GIMP_CHAIN_RIGHT); + chainbutton = gimp_chain_button_new (GIMP_CHAIN_RIGHT); if (chainbutton_active) - gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainb), TRUE); - gtk_table_attach (GTK_TABLE (sizeentry), chainb, 2, 3, 0, 2, + gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chainbutton), TRUE); + gtk_table_attach (GTK_TABLE (sizeentry), chainbutton, 2, 3, 0, 2, GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_widget_show (chainb); - - if (chainbutton) - *chainbutton = chainb; + gtk_widget_show (chainbutton); gcd = g_new (GimpCoordinatesData, 1); - gcd->chainbutton = GIMP_CHAIN_BUTTON (chainb); + gcd->chainbutton = GIMP_CHAIN_BUTTON (chainbutton); gcd->chain_constrains_ratio = chain_constrains_ratio; gcd->orig_x = x; gcd->orig_y = y; @@ -924,15 +935,17 @@ gimp_coordinates_new (GimpUnit unit, GTK_SIGNAL_FUNC (gimp_coordinates_callback), gcd); + gtk_object_set_data (GTK_OBJECT (sizeentry), "chainbutton", chainbutton); + return sizeentry; } /** * gimp_pixmap_button_new: - * @xpm_data: - * @text: + * @xpm_data: The XPM data which will be passed to gimp_pixmap_new(). + * @text: An optional text which will appear right of the pixmap. * - * Returns: + * Returns: A #GtkButton with a #GimpPixmap and an optional #GtkLabel. * */ GtkWidget * @@ -980,7 +993,25 @@ gimp_pixmap_button_new (gchar **xpm_data, * Standard Callbacks */ -static void +/** + * gimp_toggle_button_sensitive_update: + * @toggle_button: The #GtkToggleButton the "set_sensitive" and + * "inverse_sensitive" lists are attached to. + * + * If you attached a pointer to a #GtkWidget with gtk_object_set_data() and + * the "set_sensitive" key to the #GtkToggleButton, the sensitive state of + * the attached widget will be set according to the toggle button's + * "active" state. + * + * You can attach an arbitrary list of widgets by attaching another + * "set_sensitive" data pointer to the first widget (and so on...). + * + * This function can also set the sensitive state according to the toggle + * button's inverse "active" state by attaching widgets with the + * "inverse_sensitive" key. + * + */ +void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button) { GtkWidget *set_sensitive; @@ -1009,8 +1040,11 @@ gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button) /** * gimp_toggle_button_update: - * @widget: - * @data: + * @widget: A #GtkToggleButton. + * @data: A pointer to a #gint variable which will store the value of + * gtk_toggle_button_get_active(). + * + * Note that this function calls gimp_toggle_button_sensitive_update(). * */ void @@ -1029,27 +1063,13 @@ gimp_toggle_button_update (GtkWidget *widget, gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); } -/** - * gimp_menu_item_update: - * @widget: - * @data: - * - */ -void -gimp_menu_item_update (GtkWidget *widget, - gpointer data) -{ - gint *item_val; - - item_val = (gint *) data; - - *item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget)); -} - /** * gimp_radio_button_update: - * @widget: - * @data: + * @widget: A #GtkRadioButton. + * @data: A pointer to a #gint variable which will store the value of + * (#gint) gtk_object_get_user_data(). + * + * Note that this function calls gimp_toggle_button_sensitive_update(). * */ void @@ -1068,10 +1088,32 @@ gimp_radio_button_update (GtkWidget *widget, gimp_toggle_button_sensitive_update (GTK_TOGGLE_BUTTON (widget)); } +/** + * gimp_menu_item_update: + * @widget: A #GtkMenuItem. + * @data: A pointer to a #gint variable which will store the value of + * (#gint) gtk_object_get_user_data(). + * + */ +void +gimp_menu_item_update (GtkWidget *widget, + gpointer data) +{ + gint *item_val; + + item_val = (gint *) data; + + *item_val = (gint) gtk_object_get_user_data (GTK_OBJECT (widget)); +} + /** * gimp_int_adjustment_update: - * @adjustment: - * @data: + * @adjustment: A #GtkAdjustment. + * @data: A pointer to a #gint variable which will store the adjustment's + * value. + * + * Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded + * with (#gint) (value + 0.5). * */ void @@ -1086,8 +1128,9 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment, /** * gimp_float_adjustment_update: - * @adjustment: - * @data: + * @adjustment: A #GtkAdjustment. + * @data: A pointer to a #gfloat varaiable which willl store the adjustment's + * value. * */ void @@ -1102,8 +1145,9 @@ gimp_float_adjustment_update (GtkAdjustment *adjustment, /** * gimp_double_adjustment_update: - * @adjustment: - * @data: + * @adjustment: A #GtkAdjustment. + * @data: A pointer to a #gdouble variable which will store the adjustment's + * value. * */ void @@ -1118,8 +1162,17 @@ gimp_double_adjustment_update (GtkAdjustment *adjustment, /** * gimp_unit_menu_update: - * @widget: - * @data: + * @widget: A #GimpUnitMenu. + * @data: A pointer to a #GimpUnit variable which will store the unit menu's + * value. + * + * This callback can set the number of decimal digits of an arbitrary number + * of #GtkSpinButton's. To use this functionality, attach the spinbuttons + * as list of data pointers attached with gtk_object_set_data() with the + * "set_digits" key. + * + * See gimp_toggle_button_sensitive_update() for a description of how + * to set up the list. * */ void @@ -1152,15 +1205,19 @@ gimp_unit_menu_update (GtkWidget *widget, /** * gimp_table_attach_aligned: - * @table: - * @column: - * @row: - * @label_text: - * @xalign: - * @yalign: - * @widget: - * @colspan: - * @left_align: + * @table: The #GtkTable the widgets will be attached to. + * @column: The column to start with. + * @row: The row to attach the eidgets. + * @label_text: The text for the #GtkLabel which will be attached left of the + * widget. + * @xalign: The horizontal alignment of the #GtkLabel. + * @yalign: The vertival alignment of the #GtkLabel. + * @widget: The #GtkWidget to attach right of the label. + * @colspan: The number of columns the widget will use. + * @left_align: #TRUE if the widget should be left-aligned. + * + * Note that the @label_text can be #NULL and that the widget will be attached + * starting at (@column + 1) in this case, too. * */ void diff --git a/libgimpwidgets/gimpwidgets.h b/libgimpwidgets/gimpwidgets.h index 66bd026085..fbedec8980 100644 --- a/libgimpwidgets/gimpwidgets.h +++ b/libgimpwidgets/gimpwidgets.h @@ -30,6 +30,8 @@ extern "C" { #endif +/* For information look into the C source or the html documentation */ + /* * Widget Constructors */ @@ -110,13 +112,13 @@ GtkWidget * gimp_spin_button_new (/* return value: */ GTK_HSCALE (gtk_object_get_data (GTK_OBJECT(adj), "scale")) #define GIMP_SCALE_ENTRY_SCALE_ADJ(adj) \ gtk_range_get_adjustment \ - (GTK_RANGE (gtk_object_get_data (GTK_OBJECT(adj), "scale"))) + (GTK_RANGE (gtk_object_get_data (GTK_OBJECT (adj), "scale"))) #define GIMP_SCALE_ENTRY_SPINBUTTON(adj) \ - GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton")) + GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton")) #define GIMP_SCALE_ENTRY_SPINBUTTON_ADJ(adj) \ gtk_spin_button_get_adjustment \ - (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT(adj), "spinbutton"))) + (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (adj), "spinbutton"))) GtkObject * gimp_scale_entry_new (GtkTable *table, gint column, @@ -136,13 +138,25 @@ GtkObject * gimp_scale_entry_new (GtkTable *table, gchar *tooltip, gchar *private_tip); +#define GIMP_RANDOM_SEED_SPINBUTTON(hbox) \ + GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT( hbox), "spinbutton")) +#define GIMP_RANDOM_SEED_SPINBUTTON_ADJ(hbox) \ + gtk_spin_button_get_adjustment \ + (GTK_SPIN_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), "spinbutton"))) + +#define GIMP_RANDOM_SEED_TOGGLEBUTTON(hbox) \ + GTK_TOGGLE_BUTTON (gtk_object_get_data (GTK_OBJECT (hbox), \ + "togglebutton")) + GtkWidget * gimp_random_seed_new (gint *seed, - GtkWidget **seed_spinbutton, gint *use_time, - GtkWidget **time_button, gint time_true, gint time_false); +#define GIMP_COORDINATES_CHAINBUTTON(sizeentry) \ + GIMP_CHAIN_BUTTON (gtk_object_get_data (GTK_OBJECT (sizeentry), \ + "chainbutton")) + GtkWidget * gimp_coordinates_new (GimpUnit unit, gchar *unit_format, gboolean menu_show_pixels, @@ -152,8 +166,6 @@ GtkWidget * gimp_coordinates_new (GimpUnit unit, gboolean chainbutton_active, gboolean chain_constrains_ratio, - /* return value: */ - GtkWidget **chainbutton, gchar *xlabel, gdouble x, @@ -178,32 +190,33 @@ GtkWidget * gimp_pixmap_button_new (gchar **xpm_data, * Standard Callbacks */ -void gimp_toggle_button_update (GtkWidget *widget, - gpointer data); +void gimp_toggle_button_sensitive_update (GtkToggleButton *toggle_button); -void gimp_menu_item_update (GtkWidget *widget, - gpointer data); +void gimp_toggle_button_update (GtkWidget *widget, + gpointer data); -void gimp_radio_button_update (GtkWidget *widget, - gpointer data); +void gimp_radio_button_update (GtkWidget *widget, + gpointer data); -void gimp_int_adjustment_update (GtkAdjustment *adjustment, - gpointer data); +void gimp_menu_item_update (GtkWidget *widget, + gpointer data); -void gimp_float_adjustment_update (GtkAdjustment *adjustment, - gpointer data); +void gimp_int_adjustment_update (GtkAdjustment *adjustment, + gpointer data); -void gimp_double_adjustment_update (GtkAdjustment *adjustment, - gpointer data); +void gimp_float_adjustment_update (GtkAdjustment *adjustment, + gpointer data); -void gimp_unit_menu_update (GtkWidget *widget, - gpointer data); +void gimp_double_adjustment_update (GtkAdjustment *adjustment, + gpointer data); + +void gimp_unit_menu_update (GtkWidget *widget, + gpointer data); /* * Helper Functions */ -/* add aligned label & widget to a table */ void gimp_table_attach_aligned (GtkTable *table, gint column, gint row, diff --git a/plug-ins/common/blur.c b/plug-ins/common/blur.c index d7f11cebe7..d09b9723f1 100644 --- a/plug-ins/common/blur.c +++ b/plug-ins/common/blur.c @@ -650,8 +650,8 @@ blur_dialog (void) gtk_widget_show (table); /* Random Seed */ - seed_hbox = gimp_random_seed_new (&pivals.blur_seed, NULL, - &pivals.seed_type, NULL, + seed_hbox = gimp_random_seed_new (&pivals.blur_seed, + &pivals.seed_type, SEED_TIME, SEED_USER); gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, _("Random Seed:"), 1.0, 0.5, diff --git a/plug-ins/common/gauss_iir.c b/plug-ins/common/gauss_iir.c index c09c9f7656..fb336a2b4e 100644 --- a/plug-ins/common/gauss_iir.c +++ b/plug-ins/common/gauss_iir.c @@ -464,7 +464,7 @@ gauss_iir2_dialog (gint32 image_ID, GIMP_SIZE_ENTRY_UPDATE_SIZE, b2vals.horizontal == b2vals.vertical, - FALSE, NULL, + FALSE, _("Horizontal:"), b2vals.horizontal, xres, 0, 8 * MAX (drawable->width, drawable->height), diff --git a/plug-ins/common/gauss_rle.c b/plug-ins/common/gauss_rle.c index eb93eb3aea..bd58c0cb79 100644 --- a/plug-ins/common/gauss_rle.c +++ b/plug-ins/common/gauss_rle.c @@ -461,7 +461,7 @@ gauss_rle2_dialog (gint32 image_ID, GIMP_SIZE_ENTRY_UPDATE_SIZE, b2vals.horizontal == b2vals.vertical, - FALSE, NULL, + FALSE, _("Horizontal:"), b2vals.horizontal, xres, 0, 8 * MAX (drawable->width, drawable->height), diff --git a/plug-ins/common/plasma.c b/plug-ins/common/plasma.c index 68191b2521..6386ac7661 100644 --- a/plug-ins/common/plasma.c +++ b/plug-ins/common/plasma.c @@ -317,8 +317,8 @@ plasma_dialog (void) gtk_container_set_border_width (GTK_CONTAINER (table), 4); gtk_container_add (GTK_CONTAINER (frame), table); - seed_hbox = gimp_random_seed_new (&pvals.seed, NULL, - &pvals.timeseed, NULL, + seed_hbox = gimp_random_seed_new (&pvals.seed, + &pvals.timeseed, TRUE, FALSE); gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, _("Random Seed:"), 1.0, 0.5, diff --git a/plug-ins/common/randomize.c b/plug-ins/common/randomize.c index e5e62b5049..01860dc438 100644 --- a/plug-ins/common/randomize.c +++ b/plug-ins/common/randomize.c @@ -738,8 +738,8 @@ randomize_dialog (void) gtk_widget_show(table); /* Random Seed */ - seed_hbox = gimp_random_seed_new (&pivals.rndm_seed, NULL, - &pivals.seed_type, NULL, + seed_hbox = gimp_random_seed_new (&pivals.rndm_seed, + &pivals.seed_type, SEED_TIME, SEED_USER); gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, _("Random Seed:"), 1.0, 0.5, diff --git a/plug-ins/common/snoise.c b/plug-ins/common/snoise.c index e3ab135123..7acb11f5dc 100644 --- a/plug-ins/common/snoise.c +++ b/plug-ins/common/snoise.c @@ -549,8 +549,8 @@ solid_noise_dialog (void) gtk_container_add (GTK_CONTAINER (frame), table); /* Random Seed */ - seed_hbox = gimp_random_seed_new (&snvals.seed, NULL, - &snvals.timeseed, NULL, + seed_hbox = gimp_random_seed_new (&snvals.seed, + &snvals.timeseed, TRUE, FALSE); gimp_table_attach_aligned (GTK_TABLE (table), 0, 0, _("Random Seed:"), 1.0, 0.5, diff --git a/plug-ins/common/spread.c b/plug-ins/common/spread.c index a7c5961d00..96430283e7 100644 --- a/plug-ins/common/spread.c +++ b/plug-ins/common/spread.c @@ -403,7 +403,7 @@ spread_dialog (gint32 image_ID, GIMP_SIZE_ENTRY_UPDATE_SIZE, spvals.spread_amount_x == spvals.spread_amount_y, - FALSE, NULL, + FALSE, _("Horizontal:"), spvals.spread_amount_x, xres, 0, MAX (drawable->width, drawable->height), diff --git a/plug-ins/common/tile.c b/plug-ins/common/tile.c index 41a73eeecf..93414be757 100644 --- a/plug-ins/common/tile.c +++ b/plug-ins/common/tile.c @@ -415,7 +415,7 @@ tile_dialog (gint32 image_ID, sizeentry = gimp_coordinates_new (unit, "%a", TRUE, TRUE, 75, GIMP_SIZE_ENTRY_UPDATE_SIZE, - tvals.constrain, TRUE, &tint.chainbutton, + tvals.constrain, TRUE, _("Width:"), width, xres, 1, GIMP_MAX_IMAGE_SIZE, @@ -430,6 +430,7 @@ tile_dialog (gint32 image_ID, gtk_widget_show (sizeentry); tint.sizeentry = sizeentry; + tint.chainbutton = GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (sizeentry)); toggle = gtk_check_button_new_with_label (_("Create New Image")); gtk_table_attach (GTK_TABLE (sizeentry), toggle, 0, 4, 2, 3, diff --git a/plug-ins/gflare/gflare.c b/plug-ins/gflare/gflare.c index df7be17fa3..bc6dae9dc6 100644 --- a/plug-ins/gflare/gflare.c +++ b/plug-ins/gflare/gflare.c @@ -2864,7 +2864,7 @@ dlg_make_page_settings (GFlareDialog *dlg, gimp_coordinates_new (gimp_image_get_unit (image_ID), "%a", TRUE, TRUE, 75, GIMP_SIZE_ENTRY_UPDATE_SIZE, - FALSE, FALSE, &chain, + FALSE, FALSE, _("X:"), pvals.xcenter, xres, -GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, @@ -2873,6 +2873,9 @@ dlg_make_page_settings (GFlareDialog *dlg, _("Y:"), pvals.ycenter, yres, -GIMP_MAX_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE, 0, gimp_drawable_height (drawable->id)); + + chain = GTK_WIDGET (GIMP_COORDINATES_CHAINBUTTON (center)); + gtk_container_set_border_width (GTK_CONTAINER (center), 4); gtk_container_add (GTK_CONTAINER (frame), center); gtk_signal_connect (GTK_OBJECT (center), "value_changed", @@ -4094,9 +4097,13 @@ ed_make_page_sflare (GFlareEditor *ed, gtk_box_pack_start (GTK_BOX (seed_hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); - seed = gimp_random_seed_new (&gflare->sflare_seed, &entry, - &gflare->sflare_seed_time, &toggle, + seed = gimp_random_seed_new (&gflare->sflare_seed, + &gflare->sflare_seed_time, TRUE, FALSE); + + entry = GTK_WIDGET (GIMP_RANDOM_SEED_SPINBUTTON (seed)); + toggle = GTK_WIDGET (GIMP_RANDOM_SEED_TOGGLEBUTTON (seed)); + gtk_box_pack_start (GTK_BOX (seed_hbox), seed, FALSE, TRUE, 0); gtk_widget_show (seed);