diff --git a/ChangeLog b/ChangeLog index ac2d0fb7f9..ecba2df2bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,25 @@ +2000-02-05 Michael Natterer + + * libgimp/gimpcolorspace.[ch]: use g* types and name the + parameters in the header. + + * plug-ins/common/CML_explorer.c + * plug-ins/common/blur.c + * plug-ins/common/newsprint.c + * plug-ins/common/nova.c + * plug-ins/common/pixelize.c + * plug-ins/common/plasma.c + * plug-ins/common/randomize.c + * plug-ins/common/unsharp.c + * plug-ins/gflare/gflare.c + * plug-ins/sinus/sinus.c + * plug-ins/struc/struc.c: soem more consistency stuff. + 2000-02-05 Asbjorn Pettersen * plug-ins/FractalExplorer/FractalExplorer.c (fractalexplorer_load): - * plug-ins/FractalExplorer/Dialogs.c (explorer_load): Use "rt","wt" with fopen() for - OS/2, Win portability. + * plug-ins/FractalExplorer/Dialogs.c (explorer_load): Use + "rt", "wt" with fopen() for OS/2, Win portability. Sat Feb 5 17:49:43 CET 2000 Sven Neumann diff --git a/devel-docs/ChangeLog b/devel-docs/ChangeLog index becbd387e1..3b90a3be6c 100644 --- a/devel-docs/ChangeLog +++ b/devel-docs/ChangeLog @@ -1,3 +1,13 @@ +2000-02-05 Michael Natterer + + * devel-docs/libgimp/Makefile.am: correctly quote shell commands. + + * libgimp/libgimp-docs.sgml: added two new chapters: + "GIMP Constants and Limits" and "GIMP Module Headers". + + * libgimp/libgimp-decl.txt + * libgimp/tmpl/gimpcolorspace.sgml: updated from the c-source. + Sat Feb 5 17:48:41 CET 2000 Sven Neumann * libgimp/libgimp-decl.txt diff --git a/devel-docs/libgimp/Makefile.am b/devel-docs/libgimp/Makefile.am index c4c93c9441..c39c67e17f 100644 --- a/devel-docs/libgimp/Makefile.am +++ b/devel-docs/libgimp/Makefile.am @@ -78,7 +78,8 @@ sgml/libgimp-doc.bottom: $(tmpl_sources) scan: -(cd $(srcdir) \ - && env CFLAGS="$(CFLAGS) libgimp-include.c" LDFLAGS=$(LDFLAGS) \ + && env CFLAGS="$(CFLAGS) libgimp-include.c" CPPFLAGS="$(CPPFLAGS)" \ + LDFLAGS="$(LDFLAGS)" \ gtkdoc-scanobj --module=$(DOC_MODULE) \ && gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) \ --ignore-headers="gimpintl.h libgimp-intl.h stdplugins-intl.h" ) diff --git a/devel-docs/libgimp/libgimp-decl.txt b/devel-docs/libgimp/libgimp-decl.txt index 862ddf31a9..8963b85f2e 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,80 @@ gchar *help_data void gchar *help_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 + GimpAddMaskType typedef enum @@ -1983,6 +2196,290 @@ typedef GimpPDBStatusType GStatusType; RUN_WITH_LAST_VALS #define RUN_WITH_LAST_VALS GIMP_RUN_WITH_LAST_VALS + +gimp_directory +char * +void + + +gimp_personal_rc_file +char * +char *basename + + +gimp_data_directory +char * +void + + +gimp_gtkrc +char * +void + + +CAN_HANDLE_RGB +#define CAN_HANDLE_RGB 1 << 0 + + +CAN_HANDLE_GRAY +#define CAN_HANDLE_GRAY 1 << 1 + + +CAN_HANDLE_INDEXED +#define CAN_HANDLE_INDEXED 1 << 2 + + +CAN_HANDLE_ALPHA +#define CAN_HANDLE_ALPHA 1 << 3 + + +CAN_HANDLE_LAYERS +#define CAN_HANDLE_LAYERS 1 << 4 + + +CAN_HANDLE_LAYERS_AS_ANIMATION +#define CAN_HANDLE_LAYERS_AS_ANIMATION 1 << 5 + + +NEEDS_ALPHA +#define NEEDS_ALPHA 1 << 6 + + +GimpExportReturnType +typedef enum +{ + EXPORT_CANCEL, + EXPORT_IGNORE, + EXPORT_EXPORT +} GimpExportReturnType; + + +gimp_export_image +GimpExportReturnType +gint32 *image_ID,gint32 *drawable_ID,gchar *format_name,gint 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 +{ + GtkVBox hbox; + + GtkWidget *file_exists; + GtkWidget *entry; + GtkWidget *browse_button; + + GtkWidget *file_selection; + + GdkPixmap *yes_pixmap; + GdkBitmap *yes_mask; + GdkPixmap *no_pixmap; + GdkBitmap *no_mask; + + 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) + + +GimpMatrix[3][3] +typedef double GimpMatrix[3][3]; + + +gimp_matrix_transform_point +void +GimpMatrix, double, double,double *, double * + + +gimp_matrix_mult +void +GimpMatrix, GimpMatrix + + +gimp_matrix_identity +void +GimpMatrix + + +gimp_matrix_translate +void +GimpMatrix, double, double + + +gimp_matrix_scale +void +GimpMatrix, double, double + + +gimp_matrix_rotate +void +GimpMatrix, double + + +gimp_matrix_xshear +void +GimpMatrix, double + + +gimp_matrix_yshear +void +GimpMatrix, double + + +gimp_matrix_determinant +double +GimpMatrix + + +gimp_matrix_invert +void +GimpMatrix m, GimpMatrix m_inv + + +gimp_matrix_duplicate +void +GimpMatrix src, GimpMatrix target + + +gimp_matrix_is_diagonal +int +GimpMatrix m + + +gimp_matrix_is_identity +int +GimpMatrix m + + +gimp_matrix_is_simple +int +GimpMatrix m + GimpConstraintFunc gint @@ -2154,6 +2651,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,465 +2973,142 @@ 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)) + -WireMessage - - -WireReadFunc -void -GIOChannel *channel, WireMessage *msg - - -WireWriteFunc -void -GIOChannel *channel, WireMessage *msg - - -WireDestroyFunc -void -WireMessage *msg - - -WireIOFunc -int -GIOChannel *channel, guint8 *buf, gulong count - - -WireFlushFunc -int -GIOChannel *channel - - -WireMessage -struct WireMessage -{ - guint32 type; - gpointer data; -}; - - -wire_register -void -guint32 type,WireReadFunc read_func,WireWriteFunc write_func,WireDestroyFunc destroy_func - - -wire_set_reader -void -WireIOFunc read_func - - -wire_set_writer -void -WireIOFunc write_func - - -wire_set_flusher -void -WireFlushFunc flush_func - - -wire_read -int -GIOChannel *channel,guint8 *buf,gulong count - - -wire_write -int -GIOChannel *channel,guint8 *buf,gulong count - - -wire_flush -int -GIOChannel *channel - - -wire_error -int -void - - -wire_clear_error -void -void - - -wire_read_msg -int -GIOChannel *channel,WireMessage *msg - - -wire_write_msg -int -GIOChannel *channel,WireMessage *msg - - -wire_destroy -void -WireMessage *msg - - -wire_read_int32 -int -GIOChannel *channel,guint32 *data,gint count - - -wire_read_int16 -int -GIOChannel *channel,guint16 *data,gint count - - -wire_read_int8 -int -GIOChannel *channel,guint8 *data,gint count - - -wire_read_double -int -GIOChannel *channel,gdouble *data,gint count - - -wire_read_string -int -GIOChannel *channel,gchar **data,gint count - - -wire_write_int32 -int -GIOChannel *channel,guint32 *data,gint count - - -wire_write_int16 -int -GIOChannel *channel,guint16 *data,gint count - - -wire_write_int8 -int -GIOChannel *channel,guint8 *data,gint count - - -wire_write_double -int -GIOChannel *channel,gdouble *data,gint count - - -wire_write_string -int -GIOChannel *channel,gchar **data,gint count - - -GimpMatrix[3][3] -typedef double GimpMatrix[3][3]; - - -gimp_matrix_transform_point -void -GimpMatrix, double, double,double *, double * - - -gimp_matrix_mult -void -GimpMatrix, GimpMatrix - - -gimp_matrix_identity -void -GimpMatrix - - -gimp_matrix_translate -void -GimpMatrix, double, double - - -gimp_matrix_scale -void -GimpMatrix, double, double - - -gimp_matrix_rotate -void -GimpMatrix, double - - -gimp_matrix_xshear -void -GimpMatrix, double - - -gimp_matrix_yshear -void -GimpMatrix, double - - -gimp_matrix_determinant -double -GimpMatrix - - -gimp_matrix_invert -void -GimpMatrix m, GimpMatrix m_inv - - -gimp_matrix_duplicate -void -GimpMatrix src, GimpMatrix target - - -gimp_matrix_is_diagonal -int -GimpMatrix m - - -gimp_matrix_is_identity -int -GimpMatrix m - - -gimp_matrix_is_simple -int -GimpMatrix m - - -PARASITE_PERSISTENT -#define PARASITE_PERSISTENT 1 - - -PARASITE_UNDOABLE -#define PARASITE_UNDOABLE 2 - - -PARASITE_ATTACH_PARENT -#define PARASITE_ATTACH_PARENT (0x80 << 8) - - -PARASITE_PARENT_PERSISTENT -#define PARASITE_PARENT_PERSISTENT (PARASITE_PERSISTENT << 8) - - -PARASITE_PARENT_UNDOABLE -#define PARASITE_PARENT_UNDOABLE (PARASITE_UNDOABLE << 8) - - -PARASITE_ATTACH_GRANDPARENT -#define PARASITE_ATTACH_GRANDPARENT (0x80 << 16) - - -PARASITE_GRANDPARENT_PERSISTENT -#define PARASITE_GRANDPARENT_PERSISTENT (PARASITE_PERSISTENT << 16) - - -PARASITE_GRANDPARENT_UNDOABLE -#define PARASITE_GRANDPARENT_UNDOABLE (PARASITE_UNDOABLE << 16) - - -parasite_new -Parasite * -const char *name, guint32 flags,guint32 size, const void *data - - -parasite_free -void -Parasite *parasite - - -parasite_copy -Parasite * -const Parasite *parasite - - -parasite_compare -int -const Parasite *a, const Parasite *b - - -parasite_is_type -int -const Parasite *parasite,const char *name - - -parasite_is_persistent -int -const Parasite *p - - -parasite_is_undoable -int -const Parasite *p - - -parasite_has_flag -int -const Parasite *p, gulong flag - - -parasite_flags -gulong -const Parasite *p - - -parasite_name -const char * -const Parasite *p - - -parasite_data -void * -const Parasite *p - - -parasite_data_size -long -const Parasite *p - - -Parasite +GimpSizeEntry -Parasite -struct Parasite -{ - char *name; /* The name of the parasite. USE A UNIQUE PREFIX! */ - guint32 flags; /* save Parasite in XCF file, etc. */ - guint32 size; /* amount of data */ - void *data; /* a pointer to the data. plugin is * - * responsible for tracking byte order */ -}; +GimpSizeEntryClass -GSerialType -typedef enum { - GSERIAL_END = 0, /* for internal use only */ - GSERIAL_INT8 = 1, - GSERIAL_INT16 = 2, - GSERIAL_INT32 = 3, - GSERIAL_FLOAT = 4, /* 32 bit IEEE fp value */ - GSERIAL_DOUBLE = 5, /* 64 bit IEEE fp value */ - GSERIAL_STRING = 101, - GSERIAL_INT8ARRAY = 102, - GSERIAL_INT16ARRAY = 103, - GSERIAL_INT32ARRAY = 104, - GSERIAL_FLOATARRAY = 105, - GSERIAL_DOUBLEARRAY = 106, - GSERIAL_LAST_TYPE = 107 -} GSerialType; +GimpSizeEntryUP +typedef enum +{ + GIMP_SIZE_ENTRY_UPDATE_NONE = 0, + GIMP_SIZE_ENTRY_UPDATE_SIZE = 1, + GIMP_SIZE_ENTRY_UPDATE_RESOLUTION = 2 +} GimpSizeEntryUP; -GSerialItem +GimpSizeEntryField -GSerialDescription +GimpSizeEntry +struct GimpSizeEntry +{ + GtkTable table; + + GSList *fields; + gint number_of_fields; + + GtkWidget *unitmenu; + GUnit unit; + gboolean menu_show_pixels; + gboolean menu_show_percent; + + gboolean show_refval; + GimpSizeEntryUP update_policy; +}; -g_new_serial_item -GSerialItem * -GSerialType type, gulong offset,gint32 length, gulong length_offset - - -g_serial_item -#define g_serial_item(type, struct_, member) \ - g_new_serial_item(type, G_STRUCT_OFFSET(struct_, member), 0, 0) - - -g_serial_array -#define g_serial_array(type, struct_, member, length) \ - g_new_serial_item(type, G_STRUCT_OFFSET(struct_, member), length, 0) - - -g_serial_vlen_array -#define g_serial_vlen_array(type, struct_, member, length_member) \ - g_new_serial_item(type, G_STRUCT_OFFSET(struct_, member), -1, \ - G_STRUCT_OFFSET(struct_, length_member)) - - -g_new_serial_description -GSerialDescription * -char *name, ... +gimp_size_entry_get_type +GtkType +void -g_free_serial_description -void -GSerialDescription * - - -g_serialize -long -GSerialDescription *d, void **output, void *struct_data - - -g_deserialize -long -GSerialDescription *d, void *output, void *serial - - -GimpColorSelector_Callback -void -void *data, int r, int g, int b - - -GimpColorSelector_NewFunc +gimp_size_entry_new 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 +gint number_of_fields,GUnit unit,gchar *unit_format,gboolean menu_show_pixels,gboolean menu_show_percent,gboolean show_refval,gint spinbutton_usize,GimpSizeEntryUP update_policy -gimp_color_selector_unregister -gboolean -GimpColorSelectorID id,void (*callback)(void *data),void *data +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,guint 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 +GUnit +GimpSizeEntry *gse + + +gimp_size_entry_set_unit +void +GimpSizeEntry *gse,GUnit unit + + +gimp_size_entry_grab_focus +void +GimpSizeEntry *gse - -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; - GUnit typedef enum @@ -3002,535 +3256,323 @@ GimpUnitMenu *gum,GUnit unit GUnit 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 +WireMessage + +WireReadFunc +void +GIOChannel *channel, WireMessage *msg + + +WireWriteFunc +void +GIOChannel *channel, WireMessage *msg + + +WireDestroyFunc +void +WireMessage *msg + + +WireIOFunc +int +GIOChannel *channel, guint8 *buf, gulong count + + +WireFlushFunc +int +GIOChannel *channel + -GimpSizeEntryClass - - -GimpSizeEntryUP -typedef enum +WireMessage +struct WireMessage { - GIMP_SIZE_ENTRY_UPDATE_NONE = 0, - GIMP_SIZE_ENTRY_UPDATE_SIZE = 1, - GIMP_SIZE_ENTRY_UPDATE_RESOLUTION = 2 -} GimpSizeEntryUP; + guint32 type; + gpointer data; +}; + + +wire_register +void +guint32 type,WireReadFunc read_func,WireWriteFunc write_func,WireDestroyFunc destroy_func + + +wire_set_reader +void +WireIOFunc read_func + + +wire_set_writer +void +WireIOFunc write_func + + +wire_set_flusher +void +WireFlushFunc flush_func + + +wire_read +int +GIOChannel *channel,guint8 *buf,gulong count + + +wire_write +int +GIOChannel *channel,guint8 *buf,gulong count + + +wire_flush +int +GIOChannel *channel + + +wire_error +int +void + + +wire_clear_error +void +void + + +wire_read_msg +int +GIOChannel *channel,WireMessage *msg + + +wire_write_msg +int +GIOChannel *channel,WireMessage *msg + + +wire_destroy +void +WireMessage *msg + + +wire_read_int32 +int +GIOChannel *channel,guint32 *data,gint count + + +wire_read_int16 +int +GIOChannel *channel,guint16 *data,gint count + + +wire_read_int8 +int +GIOChannel *channel,guint8 *data,gint count + + +wire_read_double +int +GIOChannel *channel,gdouble *data,gint count + + +wire_read_string +int +GIOChannel *channel,gchar **data,gint count + + +wire_write_int32 +int +GIOChannel *channel,guint32 *data,gint count + + +wire_write_int16 +int +GIOChannel *channel,guint16 *data,gint count + + +wire_write_int8 +int +GIOChannel *channel,guint8 *data,gint count + + +wire_write_double +int +GIOChannel *channel,gdouble *data,gint count + + +wire_write_string +int +GIOChannel *channel,gchar **data,gint count + + +GSerialType +typedef enum { + GSERIAL_END = 0, /* for internal use only */ + GSERIAL_INT8 = 1, + GSERIAL_INT16 = 2, + GSERIAL_INT32 = 3, + GSERIAL_FLOAT = 4, /* 32 bit IEEE fp value */ + GSERIAL_DOUBLE = 5, /* 64 bit IEEE fp value */ + GSERIAL_STRING = 101, + GSERIAL_INT8ARRAY = 102, + GSERIAL_INT16ARRAY = 103, + GSERIAL_INT32ARRAY = 104, + GSERIAL_FLOATARRAY = 105, + GSERIAL_DOUBLEARRAY = 106, + GSERIAL_LAST_TYPE = 107 +} GSerialType; -GimpSizeEntryField +GSerialItem -GimpSizeEntry -struct GimpSizeEntry +GSerialDescription + + +g_new_serial_item +GSerialItem * +GSerialType type, gulong offset,gint32 length, gulong length_offset + + +g_serial_item +#define g_serial_item(type, struct_, member) \ + g_new_serial_item(type, G_STRUCT_OFFSET(struct_, member), 0, 0) + + +g_serial_array +#define g_serial_array(type, struct_, member, length) \ + g_new_serial_item(type, G_STRUCT_OFFSET(struct_, member), length, 0) + + +g_serial_vlen_array +#define g_serial_vlen_array(type, struct_, member, length_member) \ + g_new_serial_item(type, G_STRUCT_OFFSET(struct_, member), -1, \ + G_STRUCT_OFFSET(struct_, length_member)) + + +g_new_serial_description +GSerialDescription * +char *name, ... + + +g_free_serial_description +void +GSerialDescription * + + +g_serialize +long +GSerialDescription *d, void **output, void *struct_data + + +g_deserialize +long +GSerialDescription *d, void *output, void *serial + + +PARASITE_PERSISTENT +#define PARASITE_PERSISTENT 1 + + +PARASITE_UNDOABLE +#define PARASITE_UNDOABLE 2 + + +PARASITE_ATTACH_PARENT +#define PARASITE_ATTACH_PARENT (0x80 << 8) + + +PARASITE_PARENT_PERSISTENT +#define PARASITE_PARENT_PERSISTENT (PARASITE_PERSISTENT << 8) + + +PARASITE_PARENT_UNDOABLE +#define PARASITE_PARENT_UNDOABLE (PARASITE_UNDOABLE << 8) + + +PARASITE_ATTACH_GRANDPARENT +#define PARASITE_ATTACH_GRANDPARENT (0x80 << 16) + + +PARASITE_GRANDPARENT_PERSISTENT +#define PARASITE_GRANDPARENT_PERSISTENT (PARASITE_PERSISTENT << 16) + + +PARASITE_GRANDPARENT_UNDOABLE +#define PARASITE_GRANDPARENT_UNDOABLE (PARASITE_UNDOABLE << 16) + + +parasite_new +Parasite * +const char *name, guint32 flags,guint32 size, const void *data + + +parasite_free +void +Parasite *parasite + + +parasite_copy +Parasite * +const Parasite *parasite + + +parasite_compare +int +const Parasite *a, const Parasite *b + + +parasite_is_type +int +const Parasite *parasite,const char *name + + +parasite_is_persistent +int +const Parasite *p + + +parasite_is_undoable +int +const Parasite *p + + +parasite_has_flag +int +const Parasite *p, gulong flag + + +parasite_flags +gulong +const Parasite *p + + +parasite_name +const char * +const Parasite *p + + +parasite_data +void * +const Parasite *p + + +parasite_data_size +long +const Parasite *p + + +Parasite + + +Parasite +struct Parasite { - GtkTable table; - - GSList *fields; - gint number_of_fields; - - GtkWidget *unitmenu; - GUnit unit; - gboolean menu_show_pixels; - gboolean menu_show_percent; - - gboolean show_refval; - GimpSizeEntryUP update_policy; + char *name; /* The name of the parasite. USE A UNIQUE PREFIX! */ + guint32 flags; /* save Parasite in XCF file, etc. */ + guint32 size; /* amount of data */ + void *data; /* a pointer to the data. plugin is * + * responsible for tracking byte order */ }; - -gimp_size_entry_get_type -GtkType -void - - -gimp_size_entry_new -GtkWidget * -gint number_of_fields,GUnit unit,gchar *unit_format,gboolean menu_show_pixels,gboolean menu_show_percent,gboolean show_refval,gint spinbutton_usize,GimpSizeEntryUP 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,guint 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 -GUnit -GimpSizeEntry *gse - - -gimp_size_entry_set_unit -void -GimpSizeEntry *gse,GUnit unit - - -gimp_size_entry_grab_focus -void -GimpSizeEntry *gse - - -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 - - -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_directory -char * -void - - -gimp_personal_rc_file -char * -char *basename - - -gimp_data_directory -char * -void - - -gimp_gtkrc -char * -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 -{ - GtkVBox hbox; - - GtkWidget *file_exists; - GtkWidget *entry; - GtkWidget *browse_button; - - GtkWidget *file_selection; - - GdkPixmap *yes_pixmap; - GdkBitmap *yes_mask; - GdkPixmap *no_pixmap; - GdkBitmap *no_mask; - - 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 @@ -3568,48 +3610,6 @@ gchar *parameters,PixPipeParams *params PixPipeParams *params -CAN_HANDLE_RGB -#define CAN_HANDLE_RGB 1 << 0 - - -CAN_HANDLE_GRAY -#define CAN_HANDLE_GRAY 1 << 1 - - -CAN_HANDLE_INDEXED -#define CAN_HANDLE_INDEXED 1 << 2 - - -CAN_HANDLE_ALPHA -#define CAN_HANDLE_ALPHA 1 << 3 - - -CAN_HANDLE_LAYERS -#define CAN_HANDLE_LAYERS 1 << 4 - - -CAN_HANDLE_LAYERS_AS_ANIMATION -#define CAN_HANDLE_LAYERS_AS_ANIMATION 1 << 5 - - -NEEDS_ALPHA -#define NEEDS_ALPHA 1 << 6 - - -GimpExportReturnType -typedef enum -{ - EXPORT_CANCEL, - EXPORT_IGNORE, - EXPORT_EXPORT -} GimpExportReturnType; - - -gimp_export_image -GimpExportReturnType -gint32 *image_ID,gint32 *drawable_ID,gchar *format_name,gint capabilities - - GIMP_MAJOR_VERSION #define GIMP_MAJOR_VERSION (1) @@ -3788,48 +3788,48 @@ GimpColorButton *gcb gimp_rgb_to_hsv -void -int *, int *, int * +void +gint *red ,gint *green ,gint *blue gimp_hsv_to_rgb -void -int *, int *, int * +void +gint *hue ,gint *saturation ,gint *value gimp_rgb_to_hls -void -int *, int *, int * +void +gint *red ,gint *green ,gint *blue gimp_rgb_to_l -int -int, int, int +gint +gint red,gint green,gint blue gimp_hls_to_rgb -void -int *, int *, int * +void +gint *hue ,gint *lightness ,gint *saturation gimp_rgb_to_hsv_double -void -double *, double *, double * +void +gdouble *red ,gdouble *green ,gdouble *blue gimp_hsv_to_rgb_double -void -double *, double *, double * +void +gdouble *hue ,gdouble *saturation,gdouble *value gimp_rgb_to_hsv4 -void -guchar *, double *, double *, double * +void +guchar *hsv,gdouble *red,gdouble *green,gdouble *blue gimp_hsv_to_rgb4 -void -guchar *, double, double, double +void +guchar *rgb,gdouble hue,gdouble saturation,gdouble value INTENSITY_RED @@ -3849,31 +3849,6 @@ guchar *, double, double, double (g) * INTENSITY_GREEN + \ (b) * INTENSITY_BLUE + 0.001) - -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 -GtkWidget *dialog - - -gimp_dialog_create_action_area -void -GtkDialog *dialog,... - - -gimp_dialog_create_action_areav -void -GtkDialog *dialog,va_list args - GimpHelpFunc void @@ -3920,6 +3895,31 @@ GtkWidget *widget,const gchar *tool_tip,gchar *help_data void +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 +GtkWidget *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 * gboolean menu_only,... diff --git a/devel-docs/libgimp/libgimp-docs.sgml b/devel-docs/libgimp/libgimp-docs.sgml index ee02d3a4dc..bd7f52bd5f 100644 --- a/devel-docs/libgimp/libgimp-docs.sgml +++ b/devel-docs/libgimp/libgimp-docs.sgml @@ -36,28 +36,28 @@ GIMP Library Reference Manual + + GIMP Constants and Limits + &libgimp-gimpenums; + &libgimp-gimpfeatures; + &libgimp-gimplimits; + &libgimp-gimpmath; + + GIMP Library &libgimp-gimp; &libgimp-gimpprotocol; &libgimp-gimpcolorspace; - &libgimp-gimpenums; &libgimp-gimpwire; &libgimp-gimpmatrix; &libgimp-parasite; &libgimp-parasiteF; &libgimp-parasiteP; &libgimp-gserialize; - &libgimp-color-selector; - &libgimp-gimpmodule; - &libgimp-gimpmath; - &libgimp-color-display; &libgimp-gimpenv; - &libgimp-gimplimits; - &libgimp-gimpexport; &libgimp-parasiteio; &libgimp-gimpcompat; - &libgimp-gimpfeatures; @@ -69,11 +69,19 @@ &GimpSizeEntry; &GimpUnitMenu; &libgimp-gimpdialog; + &libgimp-gimpexport; &libgimp-gimphelpui; &libgimp-gimpmenu; &libgimp-gimpunit; &libgimp-gimpwidgets; + + + GIMP Module Header Files + &libgimp-gimpmodule; + &libgimp-color-display; + &libgimp-color-selector; + diff --git a/devel-docs/libgimp/tmpl/gimpcolorspace.sgml b/devel-docs/libgimp/tmpl/gimpcolorspace.sgml index 5e51b9c5b5..e82d837001 100644 --- a/devel-docs/libgimp/tmpl/gimpcolorspace.sgml +++ b/devel-docs/libgimp/tmpl/gimpcolorspace.sgml @@ -19,6 +19,10 @@ gimpcolorspace +@red: +@green: +@blue: + @Param1: @Param2: @Param3: @@ -29,6 +33,10 @@ gimpcolorspace +@hue: +@saturation: +@value: + @Param1: @Param2: @Param3: @@ -39,6 +47,10 @@ gimpcolorspace +@red: +@green: +@blue: + @Param1: @Param2: @Param3: @@ -49,10 +61,14 @@ gimpcolorspace -@Varargs: -@Varargs: -@Varargs: +@red: +@green: +@blue: @Returns: + +@Varargs: +@Varargs: +@Varargs: @@ -60,6 +76,10 @@ gimpcolorspace +@hue: +@lightness: +@saturation: + @Param1: @Param2: @Param3: @@ -70,6 +90,10 @@ gimpcolorspace +@red: +@green: +@blue: + @Param1: @Param2: @Param3: @@ -80,6 +104,10 @@ gimpcolorspace +@hue: +@saturation: +@value: + @Param1: @Param2: @Param3: @@ -90,6 +118,11 @@ gimpcolorspace +@hsv: +@red: +@green: +@blue: + @Param1: @Param2: @Param3: @@ -101,6 +134,11 @@ gimpcolorspace +@rgb: +@hue: +@saturation: +@value: + @Param1: @Param2: @Param3: diff --git a/libgimp/gimpcolorspace.c b/libgimp/gimpcolorspace.c index 2cf728fa28..20d7bde865 100644 --- a/libgimp/gimpcolorspace.c +++ b/libgimp/gimpcolorspace.c @@ -26,50 +26,36 @@ *********************************/ void -gimp_rgb_to_hsv (int *r, - int *g, - int *b) +gimp_rgb_to_hsv (gint *r, + gint *g, + gint *b) { - int red, green, blue; - float h, s, v; - int min, max; - int delta; + gint red, green, blue; + gdouble h, s, v; + gint min, max; + gint delta; h = 0.0; - red = *r; + red = *r; green = *g; - blue = *b; + blue = *b; if (red > green) { - if (red > blue) - max = red; - else - max = blue; - - if (green < blue) - min = green; - else - min = blue; + max = MAX (red, blue); + min = MIN (green, blue); } else { - if (green > blue) - max = green; - else - max = blue; - - if (red < blue) - min = red; - else - min = blue; + max = MAX (green, blue); + min = MIN (red, blue); } v = max; if (max != 0) - s = ((max - min) * 255) / (float) max; + s = ((max - min) * 255) / (gdouble) max; else s = 0; @@ -79,11 +65,11 @@ gimp_rgb_to_hsv (int *r, { delta = max - min; if (red == max) - h = (green - blue) / (float) delta; + h = (green - blue) / (gdouble) delta; else if (green == max) - h = 2 + (blue - red) / (float) delta; + h = 2 + (blue - red) / (gdouble) delta; else if (blue == max) - h = 4 + (red - green) / (float) delta; + h = 4 + (red - green) / (gdouble) delta; h *= 42.5; if (h < 0) @@ -98,12 +84,12 @@ gimp_rgb_to_hsv (int *r, } void -gimp_hsv_to_rgb (int *h, - int *s, - int *v) +gimp_hsv_to_rgb (gint *h, + gint *s, + gint *v) { - float hue, saturation, value; - float f, p, q, t; + gdouble hue, saturation, value; + gdouble f, p, q, t; if (*s == 0) { @@ -126,75 +112,66 @@ gimp_hsv_to_rgb (int *h, { case 0: *h = value * 255; - *s = t * 255; - *v = p * 255; + *s = t * 255; + *v = p * 255; break; + case 1: - *h = q * 255; + *h = q * 255; *s = value * 255; - *v = p * 255; + *v = p * 255; break; + case 2: - *h = p * 255; + *h = p * 255; *s = value * 255; - *v = t * 255; + *v = t * 255; break; + case 3: - *h = p * 255; - *s = q * 255; + *h = p * 255; + *s = q * 255; *v = value * 255; break; + case 4: - *h = t * 255; - *s = p * 255; + *h = t * 255; + *s = p * 255; *v = value * 255; break; + case 5: *h = value * 255; - *s = p * 255; - *v = q * 255; + *s = p * 255; + *v = q * 255; break; } } } void -gimp_rgb_to_hls (int *r, - int *g, - int *b) +gimp_rgb_to_hls (gint *r, + gint *g, + gint *b) { - int red, green, blue; - float h, l, s; - int min, max; - int delta; + gint red, green, blue; + gdouble h, l, s; + gint min, max; + gint delta; - red = *r; + red = *r; green = *g; - blue = *b; + blue = *b; if (red > green) { - if (red > blue) - max = red; - else - max = blue; - - if (green < blue) - min = green; - else - min = blue; + max = MAX (red, blue); + min = MIN (green, blue); } else { - if (green > blue) - max = green; - else - max = blue; - - if (red < blue) - min = red; - else - min = blue; + max = MAX (green, blue); + min = MIN (red, blue); } l = (max + min) / 2.0; @@ -209,16 +186,16 @@ gimp_rgb_to_hls (int *r, delta = (max - min); if (l < 128) - s = 255 * (float) delta / (float) (max + min); + s = 255 * (gdouble) delta / (gdouble) (max + min); else - s = 255 * (float) delta / (float) (511 - max - min); + s = 255 * (gdouble) delta / (gdouble) (511 - max - min); if (red == max) - h = (green - blue) / (float) delta; + h = (green - blue) / (gdouble) delta; else if (green == max) - h = 2 + (blue - red) / (float) delta; + h = 2 + (blue - red) / (gdouble) delta; else - h = 4 + (red - green) / (float) delta; + h = 4 + (red - green) / (gdouble) delta; h = h * 42.5; @@ -233,47 +210,33 @@ gimp_rgb_to_hls (int *r, *b = s; } -int -gimp_rgb_to_l (int red, - int green, - int blue) +gint +gimp_rgb_to_l (gint red, + gint green, + gint blue) { - int min, max; + gint min, max; if (red > green) { - if (red > blue) - max = red; - else - max = blue; - - if (green < blue) - min = green; - else - min = blue; + max = MAX (red, blue); + min = MIN (green, blue); } else { - if (green > blue) - max = green; - else - max = blue; - - if (red < blue) - min = red; - else - min = blue; + max = MAX (green, blue); + min = MIN (red, blue); } return (max + min) / 2.0; } -int -gimp_hls_value (float n1, - float n2, - float hue) +static gint +gimp_hls_value (gdouble n1, + gdouble n2, + gdouble hue) { - float value; + gdouble value; if (hue > 255) hue -= 255; @@ -288,19 +251,19 @@ gimp_hls_value (float n1, else value = n1; - return (int) (value * 255); + return (gint) (value * 255); } void -gimp_hls_to_rgb (int *h, - int *l, - int *s) +gimp_hls_to_rgb (gint *h, + gint *l, + gint *s) { - float hue, lightness, saturation; - float m1, m2; + gdouble hue, lightness, saturation; + gdouble m1, m2; - hue = *h; - lightness = *l; + hue = *h; + lightness = *l; saturation = *s; if (saturation == 0) @@ -327,14 +290,14 @@ gimp_hls_to_rgb (int *h, } void -gimp_rgb_to_hsv_double (double *r, - double *g, - double *b) +gimp_rgb_to_hsv_double (gdouble *r, + gdouble *g, + gdouble *b) { - double red, green, blue; - double h, s, v; - double min, max; - double delta; + gdouble red, green, blue; + gdouble h, s, v; + gdouble min, max; + gdouble delta; red = *r; green = *g; @@ -344,27 +307,13 @@ gimp_rgb_to_hsv_double (double *r, if (red > green) { - if (red > blue) - max = red; - else - max = blue; - - if (green < blue) - min = green; - else - min = blue; + max = MAX (red, blue); + min = MIN (green, blue); } else { - if (green > blue) - max = green; - else - max = blue; - - if (red < blue) - min = red; - else - min = blue; + max = MAX (green, blue); + min = MIN (red, blue); } v = max; @@ -403,12 +352,12 @@ gimp_rgb_to_hsv_double (double *r, } void -gimp_hsv_to_rgb_double (double *h, - double *s, - double *v) +gimp_hsv_to_rgb_double (gdouble *h, + gdouble *s, + gdouble *v) { - double hue, saturation, value; - double f, p, q, t; + gdouble hue, saturation, value; + gdouble f, p, q, t; if (*s == 0.0) { @@ -425,12 +374,12 @@ gimp_hsv_to_rgb_double (double *h, if (hue == 6.0) hue = 0.0; - f = hue - (int) hue; + f = hue - (gint) hue; p = value * (1.0 - saturation); q = value * (1.0 - saturation * f); t = value * (1.0 - saturation * (1.0 - f)); - switch ((int) hue) + switch ((gint) hue) { case 0: *h = value; @@ -472,15 +421,15 @@ gimp_hsv_to_rgb_double (double *h, } void -gimp_rgb_to_hsv4 (guchar *rgb, - double *hue, - double *sat, - double *val) +gimp_rgb_to_hsv4 (guchar *rgb, + gdouble *hue, + gdouble *sat, + gdouble *val) { - double red, green, blue; - double h, s, v; - double min, max; - double delta; + gdouble red, green, blue; + gdouble h, s, v; + gdouble min, max; + gdouble delta; red = rgb[0] / 255.0; green = rgb[1] / 255.0; @@ -547,13 +496,13 @@ gimp_rgb_to_hsv4 (guchar *rgb, } void -gimp_hsv_to_rgb4 (guchar *rgb, - double h, - double s, - double v) +gimp_hsv_to_rgb4 (guchar *rgb, + gdouble h, + gdouble s, + gdouble v) { - double hue, saturation, value; - double f, p, q, t; + gdouble hue, saturation, value; + gdouble f, p, q, t; if (s == 0.0) { diff --git a/libgimp/gimpcolorspace.h b/libgimp/gimpcolorspace.h index 30466c0a6c..129e4b1f74 100644 --- a/libgimp/gimpcolorspace.h +++ b/libgimp/gimpcolorspace.h @@ -22,15 +22,38 @@ /* Color conversion routines */ -void gimp_rgb_to_hsv (int *, int *, int *); -void gimp_hsv_to_rgb (int *, int *, int *); -void gimp_rgb_to_hls (int *, int *, int *); -int gimp_rgb_to_l (int, int, int); -void gimp_hls_to_rgb (int *, int *, int *); -void gimp_rgb_to_hsv_double (double *, double *, double *); -void gimp_hsv_to_rgb_double (double *, double *, double *); -void gimp_rgb_to_hsv4 (guchar *, double *, double *, double *); -void gimp_hsv_to_rgb4 (guchar *, double, double, double); +void gimp_rgb_to_hsv (gint *red /* returns hue */, + gint *green /* returns saturation */, + gint *blue /* returns value */); +void gimp_hsv_to_rgb (gint *hue /* returns red */, + gint *saturation /* returns green */, + gint *value /* returns blue */); + +void gimp_rgb_to_hls (gint *red /* returns hue */, + gint *green /* returns lightness */, + gint *blue /* returns saturation */); +gint gimp_rgb_to_l (gint red, + gint green, + gint blue); +void gimp_hls_to_rgb (gint *hue /* returns red */, + gint *lightness /* returns green */, + gint *saturation /* returns blue */); + +void gimp_rgb_to_hsv_double (gdouble *red /* returns hue */, + gdouble *green /* returns saturation */, + gdouble *blue /* returns value */); +void gimp_hsv_to_rgb_double (gdouble *hue /* returns red */, + gdouble *saturation, /* returns green */ + gdouble *value /* returns blue */); + +void gimp_rgb_to_hsv4 (guchar *hsv, + gdouble *red, + gdouble *green, + gdouble *blue); +void gimp_hsv_to_rgb4 (guchar *rgb, + gdouble hue, + gdouble saturation, + gdouble value); /* Map RGB to intensity */ @@ -41,4 +64,5 @@ void gimp_hsv_to_rgb4 (guchar *, double, double, double); #define INTENSITY(r,g,b) ((r) * INTENSITY_RED + \ (g) * INTENSITY_GREEN + \ (b) * INTENSITY_BLUE + 0.001) -#endif + +#endif /* __GIMPCOLORSPACE_H__ */ diff --git a/plug-ins/common/CML_explorer.c b/plug-ins/common/CML_explorer.c index a5b07392e8..9cc2acf2bb 100644 --- a/plug-ins/common/CML_explorer.c +++ b/plug-ins/common/CML_explorer.c @@ -420,7 +420,7 @@ typedef struct #define RANDOM_SENSITIVES_NUM 5 -CML_sensitive_widget_table random_sensitives[RANDOM_SENSITIVES_NUM] = +static CML_sensitive_widget_table random_sensitives[RANDOM_SENSITIVES_NUM] = { { NULL, 0 }, { NULL, 0 }, diff --git a/plug-ins/common/blur.c b/plug-ins/common/blur.c index 94e869acd2..d7f11cebe7 100644 --- a/plug-ins/common/blur.c +++ b/plug-ins/common/blur.c @@ -134,10 +134,10 @@ static void run (gchar *name, GPlugInInfo PLUG_IN_INFO = { - NULL, /* init_proc */ - NULL, /* quit_proc */ - query, /* query_proc */ - run, /* run_proc */ + NULL, /* init_proc */ + NULL, /* quit_proc */ + query, /* query_proc */ + run, /* run_proc */ }; static void blur (GDrawable *drawable); @@ -187,9 +187,6 @@ query (void) }; static gint nargs = sizeof(args) / sizeof (args[0]); - static GParamDef *return_vals = NULL; - static gint nreturn_vals = 0; - const gchar *blurb = "Apply a 3x3 blurring convolution kernel to the specified drawable."; const gchar *help = "This plug-in randomly blurs the specified drawable, using a 3x3 blur. You control the percentage of the pixels that are blurred and the number of times blurring is applied. Indexed images are not supported."; const gchar *author = "Miles O'Neal http://www.rru.com/~meo/"; @@ -207,8 +204,8 @@ query (void) N_("/Filters/Blur/Blur..."), "RGB*, GRAY*", PROC_PLUG_IN, - nargs, nreturn_vals, - args, return_vals); + nargs, 0, + args, NULL); gimp_install_procedure (PLUG_IN_NAME, (gchar *) blurb, @@ -219,8 +216,8 @@ query (void) NULL, "RGB*, GRAY*", PROC_PLUG_IN, - nargs_ni, nreturn_vals, - args_ni, return_vals); + nargs_ni, 0, + args_ni, NULL); } /********************************* @@ -294,7 +291,6 @@ run (gchar *name, pivals.seed_type = (gint) MIN (SEED_USER, param[5].data.d_int32); pivals.seed_type = (gint) MAX (SEED_TIME, param[5].data.d_int32); pivals.blur_seed = (gint) param[6].data.d_int32; - status = STATUS_SUCCESS; } else if ((strcmp (name, PLUG_IN_NAME) == 0) && (nparams == 3)) @@ -303,7 +299,6 @@ run (gchar *name, pivals.blur_rcount = (gdouble) 1.0; pivals.seed_type = SEED_TIME; pivals.blur_seed = 0; - status = STATUS_SUCCESS; } else { @@ -324,6 +319,7 @@ run (gchar *name, default: break; } + if (status == STATUS_SUCCESS) { /* @@ -457,16 +453,16 @@ blur (GDrawable *drawable) * allocate row buffers */ prev_row = g_new (guchar, (x2 - x1 + 2) * bytes); - cur_row = g_new (guchar, (x2 - x1 + 2) * bytes); + cur_row = g_new (guchar, (x2 - x1 + 2) * bytes); next_row = g_new (guchar, (x2 - x1 + 2) * bytes); - dest = g_new (guchar, (x2 - x1) * bytes); + dest = g_new (guchar, (x2 - x1) * bytes); /* * initialize the pixel regions */ - gimp_pixel_rgn_init(&srcPR, drawable, 0, 0, width, height, FALSE, FALSE); - gimp_pixel_rgn_init(&destPR, drawable, 0, 0, width, height, TRUE, TRUE); - gimp_pixel_rgn_init(&destPR2, drawable, 0, 0, width, height, TRUE, TRUE); + gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height, FALSE, FALSE); + gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height, TRUE, TRUE); + gimp_pixel_rgn_init (&destPR2, drawable, 0, 0, width, height, TRUE, TRUE); sp = &srcPR; dp = &destPR; tp = NULL; diff --git a/plug-ins/common/newsprint.c b/plug-ins/common/newsprint.c index fa24837ce7..ba34e51822 100644 --- a/plug-ins/common/newsprint.c +++ b/plug-ins/common/newsprint.c @@ -1267,21 +1267,23 @@ newsprint_dialog (GDrawable *drawable) } #endif - st.input_spi = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, - _("Input SPI:"), SCALE_WIDTH, 0, - pvals_ui.input_spi, - 1.0, 1200.0, 1.0, 10.0, 0, - TRUE, 0, 0, - NULL, NULL); + st.input_spi = + gimp_scale_entry_new (GTK_TABLE (table), 0, 0, + _("Input SPI:"), SCALE_WIDTH, 0, + pvals_ui.input_spi, + 1.0, 1200.0, 1.0, 10.0, 0, + FALSE, GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION, + NULL, NULL); gtk_signal_connect (GTK_OBJECT (st.input_spi), "value_changed", GTK_SIGNAL_FUNC (spi_callback), &st); - st.output_lpi = gimp_scale_entry_new (GTK_TABLE (table), 0, 1, - _("Output LPI:"), SCALE_WIDTH, 0, - pvals_ui.output_lpi, - 1.0, 1200.0, 1.0, 10.0, 1, - TRUE, 0, 0, + st.output_lpi = + gimp_scale_entry_new (GTK_TABLE (table), 0, 1, + _("Output LPI:"), SCALE_WIDTH, 0, + pvals_ui.output_lpi, + 1.0, 1200.0, 1.0, 10.0, 1, + FALSE, GIMP_MIN_RESOLUTION, GIMP_MAX_RESOLUTION, NULL, NULL); gtk_signal_connect (GTK_OBJECT (st.output_lpi), "value_changed", GTK_SIGNAL_FUNC (lpi_callback), @@ -1291,7 +1293,7 @@ newsprint_dialog (GDrawable *drawable) _("Cell Size:"), SCALE_WIDTH, 0, pvals.cell_width, 3.0, 100.0, 1.0, 5.0, 0, - TRUE, 0, 0, + FALSE, 3.0, GIMP_MAX_IMAGE_SIZE, NULL, NULL); gtk_signal_connect (GTK_OBJECT (st.cellsize), "value_changed", GTK_SIGNAL_FUNC (cellsize_callback), diff --git a/plug-ins/common/nova.c b/plug-ins/common/nova.c index 092768eed8..aa41ed9306 100644 --- a/plug-ins/common/nova.c +++ b/plug-ins/common/nova.c @@ -398,7 +398,7 @@ nova_dialog (GDrawable *drawable) adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2, _("Radius:"), SCALE_WIDTH, 0, pvals.radius, 1, 100, 1, 10, 0, - TRUE, 0, 0, + FALSE, 1, GIMP_MAX_IMAGE_SIZE, NULL, NULL); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC (gimp_int_adjustment_update), diff --git a/plug-ins/common/pixelize.c b/plug-ins/common/pixelize.c index 9e438205ec..b9944befde 100644 --- a/plug-ins/common/pixelize.c +++ b/plug-ins/common/pixelize.c @@ -312,7 +312,7 @@ pixelize_dialog (void) gimp_scale_entry_new (GTK_TABLE (table), 0, 0, _("Pixel Width:"), SCALE_WIDTH, ENTRY_WIDTH, pvals.pixelwidth, 1, 64, 1, 8, 0, - TRUE, 0, 0, + FALSE, 0, GIMP_MAX_IMAGE_SIZE, NULL, NULL); gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed", GTK_SIGNAL_FUNC (gimp_int_adjustment_update), diff --git a/plug-ins/common/plasma.c b/plug-ins/common/plasma.c index ebdbdf0dc6..68191b2521 100644 --- a/plug-ins/common/plasma.c +++ b/plug-ins/common/plasma.c @@ -327,8 +327,8 @@ plasma_dialog (void) adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1, _("Turbulence:"), SCALE_WIDTH, 0, pvals.turbulence, - TRUE, 0, 0, 0.1, 7.0, 0.1, 1.0, 1, + TRUE, 0, 0, NULL, NULL); gtk_signal_connect (GTK_OBJECT (adj), "value_changed", GTK_SIGNAL_FUNC (gimp_double_adjustment_update), diff --git a/plug-ins/common/randomize.c b/plug-ins/common/randomize.c index 8e9d5c3302..e46f6a86c5 100644 --- a/plug-ins/common/randomize.c +++ b/plug-ins/common/randomize.c @@ -338,29 +338,29 @@ run (gchar *name, { status = STATUS_CALLING_ERROR; } - if (status == STATUS_SUCCESS) + else { pivals.rndm_pct = (gdouble) param[3].data.d_float; pivals.rndm_rcount = (gdouble) param[4].data.d_float; pivals.seed_type = (gint) param[5].data.d_int32; pivals.rndm_seed = (gint) param[6].data.d_int32; - } - if (status == STATUS_SUCCESS && - ((rndm_type != RNDM_PICK && - rndm_type != RNDM_SLUR && - rndm_type != RNDM_HURL) || - (pivals.rndm_pct < 1.0 || pivals.rndm_pct > 100.0) || - (pivals.rndm_rcount < 1.0 || pivals.rndm_rcount > 100.0))) - { - status = STATUS_CALLING_ERROR; + + if ((rndm_type != RNDM_PICK && + rndm_type != RNDM_SLUR && + rndm_type != RNDM_HURL) || + (pivals.rndm_pct < 1.0 || pivals.rndm_pct > 100.0) || + (pivals.rndm_rcount < 1.0 || pivals.rndm_rcount > 100.0)) + { + status = STATUS_CALLING_ERROR; + } } break; /* * If we're running with the last set of values, get those values. */ case RUN_WITH_LAST_VALS: - INIT_I18N(); - gimp_get_data(PLUG_IN_NAME[rndm_type - 1], &pivals); + INIT_I18N (); + gimp_get_data (PLUG_IN_NAME[rndm_type - 1], &pivals); break; /* * Hopefully we never get here! @@ -751,7 +751,7 @@ randomize_dialog (void) * Randomization percentage label & scale (1 to 100) */ adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1, - _("Randomization %:"), SCALE_WIDTH, 0, + _("Randomization (%):"), SCALE_WIDTH, 0, pivals.rndm_pct, 1.0, 100.0, 1.0, 10.0, 0, TRUE, 0, 0, _("Percentage of pixels to be filtered"), NULL); diff --git a/plug-ins/common/unsharp.c b/plug-ins/common/unsharp.c index c69d415840..a13820b57b 100644 --- a/plug-ins/common/unsharp.c +++ b/plug-ins/common/unsharp.c @@ -117,15 +117,15 @@ static void preview_exit (void); static void preview_update (void); static GtkWidget* preview; -static int preview_width; /* Width of preview widget */ -static int preview_height; /* Height of preview widget */ -static int preview_x1; /* Upper-left X of preview */ -static int preview_y1; /* Upper-left Y of preview */ -static int preview_x2; /* Lower-right X of preview */ -static int preview_y2; /* Lower-right Y of preview */ +static gint preview_width; /* Width of preview widget */ +static gint preview_height; /* Height of preview widget */ +static gint preview_x1; /* Upper-left X of preview */ +static gint preview_y1; /* Upper-left Y of preview */ +static gint preview_x2; /* Lower-right X of preview */ +static gint preview_y2; /* Lower-right Y of preview */ -static int sel_width; /* Selection width */ -static int sel_height; /* Selection height */ +static gint sel_width; /* Selection width */ +static gint sel_height; /* Selection height */ static GtkObject *hscroll_data; /* Horizontal scrollbar data */ static GtkObject *vscroll_data; /* Vertical scrollbar data */ @@ -167,7 +167,7 @@ query (void) { PARAM_FLOAT, "amount", "Strength of effect" }, { PARAM_FLOAT, "threshold", "Threshold" } }; - static gint nargs = sizeof(args) / sizeof(args[0]); + static gint nargs = sizeof (args) / sizeof (args[0]); INIT_I18N(); diff --git a/plug-ins/gflare/gflare.c b/plug-ins/gflare/gflare.c index 385ede52f4..9a14709ad7 100644 --- a/plug-ins/gflare/gflare.c +++ b/plug-ins/gflare/gflare.c @@ -3601,28 +3601,29 @@ ed_make_page_general (GFlareEditor *ed, { GFlare *gflare = ed->gflare; GtkWidget *vbox; + GtkWidget *frame; GtkWidget *table; GtkWidget *option_menu; - GtkWidget *sep; GtkObject *adj; - gint row; - vbox = gtk_vbox_new (FALSE, 0); + vbox = gtk_vbox_new (FALSE, 4); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); - /* - * Scales - */ + /* Glow */ - table = gtk_table_new (8, 3, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (table), 6); + frame = gtk_frame_new (_("Glow Paint Options")); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + gtk_widget_show (frame); + + table = gtk_table_new (2, 3, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 4); gtk_table_set_row_spacings (GTK_TABLE (table), 2); gtk_table_set_col_spacings (GTK_TABLE (table), 4); - gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_widget_show (table); - row = 0; - - adj = gimp_scale_entry_new (GTK_TABLE (table), 0, row++, - _("Glow Opacity (%):"), SCALE_WIDTH, 0, + adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, + _("Opacity:"), SCALE_WIDTH, 0, gflare->glow_opacity, 0.0, 100.0, 1.0, 10.0, 1, TRUE, 0, 0, NULL, NULL); @@ -3634,17 +3635,25 @@ ed_make_page_general (GFlareEditor *ed, NULL); option_menu = ed_mode_menu_new (&gflare->glow_mode); - gimp_table_attach_aligned (GTK_TABLE (table), 0, row++, - _("Glow Mode:"), 1.0, 0.5, + gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, + _("Paint Mode:"), 1.0, 0.5, option_menu, 1, TRUE); - sep = gtk_hseparator_new (); - gtk_table_attach_defaults (GTK_TABLE (table), sep, 0, 4, row, row + 1); - gtk_widget_show (sep); - row++; + /* Rays */ - adj = gimp_scale_entry_new (GTK_TABLE (table), 0, row++, - _("Rays Opacity (%):"), SCALE_WIDTH, 0, + frame = gtk_frame_new (_("Rays Paint Options")); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + gtk_widget_show (frame); + + table = gtk_table_new (2, 3, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 4); + gtk_table_set_row_spacings (GTK_TABLE (table), 2); + gtk_table_set_col_spacings (GTK_TABLE (table), 4); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_widget_show (table); + + adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, + _("Opacity:"), SCALE_WIDTH, 0, gflare->rays_opacity, 0.0, 100.0, 1.0, 10.0, 1, TRUE, 0, 0, NULL, NULL); @@ -3656,17 +3665,25 @@ ed_make_page_general (GFlareEditor *ed, NULL); option_menu = ed_mode_menu_new (&gflare->rays_mode); - gimp_table_attach_aligned (GTK_TABLE (table), 0, row++, - _("Rays Mode:"), 1.0, 0.5, + gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, + _("Paint Mode:"), 1.0, 0.5, option_menu, 1, TRUE); - sep = gtk_hseparator_new (); - gtk_table_attach_defaults (GTK_TABLE (table), sep, 0, 4, row, row + 1); - gtk_widget_show (sep); - row++; + /* Rays */ - adj = gimp_scale_entry_new (GTK_TABLE (table), 0, row++, - _("Second Flares Opacity (%):"), SCALE_WIDTH, 0, + frame = gtk_frame_new (_("Second Flares Paint Options")); + gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); + gtk_widget_show (frame); + + table = gtk_table_new (2, 3, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 4); + gtk_table_set_row_spacings (GTK_TABLE (table), 2); + gtk_table_set_col_spacings (GTK_TABLE (table), 4); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_widget_show (table); + + adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, + _("Opacity:"), SCALE_WIDTH, 0, gflare->sflare_opacity, 0.0, 100.0, 1.0, 10.0, 1, TRUE, 0, 0, NULL, NULL); @@ -3678,12 +3695,10 @@ ed_make_page_general (GFlareEditor *ed, NULL); option_menu = ed_mode_menu_new (&gflare->sflare_mode); - gimp_table_attach_aligned (GTK_TABLE (table), 0, row++, - _("Second Flares Mode:"), 1.0, 0.5, + gimp_table_attach_aligned (GTK_TABLE (table), 0, 1, + _("Paint Mode:"), 1.0, 0.5, option_menu, 1, TRUE); - gtk_widget_show (table); - /* * Create Page */ diff --git a/plug-ins/sinus/sinus.c b/plug-ins/sinus/sinus.c index be7e1fc1b6..841691b57c 100644 --- a/plug-ins/sinus/sinus.c +++ b/plug-ins/sinus/sinus.c @@ -153,10 +153,10 @@ static inline void compute_block_1 (guchar *dest_row, guint rowstride, GPlugInInfo PLUG_IN_INFO = { - NULL, /* init_proc */ - NULL, /* quit_proc */ - query, /* query_proc */ - run, /* run_proc */ + NULL, /* init_proc */ + NULL, /* quit_proc */ + query, /* query_proc */ + run, /* run_proc */ }; MAIN () @@ -184,10 +184,7 @@ query (void) { PARAM_INT32, "blend", "0= linear, 1= bilinear, 2= sinusoidal" }, { PARAM_FLOAT, "blend_power", "Power used to strech the blend" } }; - - static GParamDef *return_vals = NULL; static gint nargs = sizeof (args) / sizeof (args[0]); - static gint nreturn_vals = 0; INIT_I18N (); @@ -200,8 +197,8 @@ query (void) N_("/Filters/Render/Sinus..."), "RGB*, GRAY*", PROC_PLUG_IN, - nargs, nreturn_vals, - args, return_vals); + nargs, 0, + args, NULL); } static void @@ -247,8 +244,10 @@ run (gchar *name, case RUN_NONINTERACTIVE: /* Make sure all the arguments are there! */ if (nparams != 16) - status = STATUS_CALLING_ERROR; - if (status == STATUS_SUCCESS) + { + status = STATUS_CALLING_ERROR; + } + else { svals.scalex = param[3].data.d_float; svals.scaley = param[4].data.d_float; @@ -287,7 +286,7 @@ run (gchar *name, (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id))) { - gimp_progress_init ("Calculating picture..."); + gimp_progress_init (_("Sinus: rendering...")); gimp_tile_cache_ntiles (1); sinus (); @@ -1212,4 +1211,3 @@ mw_preview_new (GtkWidget *parent, return preview; } - diff --git a/plug-ins/struc/struc.c b/plug-ins/struc/struc.c index 542c247559..2a66a00dea 100644 --- a/plug-ins/struc/struc.c +++ b/plug-ins/struc/struc.c @@ -88,14 +88,16 @@ GPlugInInfo PLUG_IN_INFO = query, /* query_proc */ run, /* run_proc */ }; + static StrucValues svals = { - 0, /* direction*/ - 4 /* depth */ + 0, /* direction */ + 4 /* depth */ }; + static StructInterface s_int = { - FALSE /* run */ + FALSE /* run */ }; @@ -114,9 +116,7 @@ query (void) { PARAM_INT32, "direction", "Light direction (0 - 3)" }, { PARAM_INT32, "depth", "Texture depth (1 - 50)" }, }; - static GParamDef *return_vals = NULL; - static int nargs = sizeof (args) / sizeof (args[0]); - static int nreturn_vals = 0; + static gint nargs = sizeof (args) / sizeof (args[0]); INIT_I18N(); @@ -129,8 +129,8 @@ query (void) N_("/Filters/Artistic/Apply Canvas..."), "RGB*, GRAY*", PROC_PLUG_IN, - nargs, nreturn_vals, - args, return_vals); + nargs, 0, + args, NULL); } static void @@ -182,16 +182,19 @@ run (gchar *name, case RUN_NONINTERACTIVE: /* Make sure all the arguments are there! */ if (nparams != 5) - status = STATUS_CALLING_ERROR; - if (status == STATUS_SUCCESS) + { + status = STATUS_CALLING_ERROR; + } + else { svals.direction = (gint) param[3].data.d_int32; - svals.depth = (gint) param[4].data.d_int32; + svals.depth = (gint) param[4].data.d_int32; + + if (svals.direction < 0 || svals.direction > 4) + status = STATUS_CALLING_ERROR; + if (svals.depth < 1 || svals.depth > 50) + status = STATUS_CALLING_ERROR; } - if(svals.direction<0 || svals.direction>4) - status = STATUS_CALLING_ERROR; - if(svals.depth<1 || svals.depth>50) - status = STATUS_CALLING_ERROR; break; case RUN_WITH_LAST_VALS: @@ -206,9 +209,10 @@ run (gchar *name, if (status == STATUS_SUCCESS) { /* Make sure that the drawable is gray or RGB color */ - if (gimp_drawable_is_rgb (drawable->id) || gimp_drawable_is_gray (drawable->id)) + if (gimp_drawable_is_rgb (drawable->id) || + gimp_drawable_is_gray (drawable->id)) { - gimp_progress_init ("struc"); + gimp_progress_init (_("Applying Canvas...")); gimp_tile_cache_ntiles (2 * (drawable->width / gimp_tile_width () + 1)); strucpi (drawable); @@ -352,40 +356,40 @@ strucpi (GDrawable *drawable) bytes = drawable->bpp; /* allocate row buffers */ - cur_row = (guchar *) malloc ((x2 - x1) * bytes); - dest = (guchar *) malloc ((x2 - x1) * bytes); + cur_row = g_new (guchar, (x2 - x1) * bytes); + dest = g_new (guchar, (x2 - x1) * bytes); /* initialize the pixel regions */ gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, width, height, FALSE, FALSE); gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height, TRUE, TRUE); - mult=(gfloat)svals.depth*0.25; + mult = (gfloat) svals.depth * 0.25; switch(svals.direction) { case 0: - xm=1; - ym=128; - offs=0; + xm = 1; + ym = 128; + offs = 0; break; case 1: - xm=-1; - ym=128; - offs=127; + xm = -1; + ym = 128; + offs = 127; break; case 2: - xm=128; - ym=1; - offs=0; + xm = 128; + ym = 1; + offs = 0; break; case 3: - xm=128; - ym=-1; - offs=128; + xm = 128; + ym = -1; + offs = 128; break; default: - xm=1; - ym=128; - offs=0; + xm = 1; + ym = 128; + offs = 0; break; } @@ -416,18 +420,18 @@ strucpi (GDrawable *drawable) case 4: /* RGB alpha */ for (col = 0; col < (x2 - x1) * bytes; col+=bytes) { - varde = cur_row[col] + mult*sdata[rcol*xm+rrow*ym+offs]; + varde = cur_row[col] + mult * sdata[rcol*xm+rrow*ym+offs]; if (varde > 255 ) varde = 255; if (varde < 0) varde = 0; - *d++ = (guchar)varde; - varde = cur_row[col+1] + mult*sdata[rcol*xm+rrow*ym+offs]; + *d++ = (guchar) varde; + varde = cur_row[col+1] + mult * sdata[rcol*xm+rrow*ym+offs]; if (varde > 255 ) varde = 255; if (varde < 0) varde = 0; - *d++ = (guchar)varde; - varde = cur_row[col+2] + mult*sdata[rcol*xm+rrow*ym+offs]; + *d++ = (guchar) varde; + varde = cur_row[col+2] + mult * sdata[rcol*xm+rrow*ym+offs]; if (varde > 255 ) varde = 255; if (varde < 0) varde = 0; - *d++ = (guchar)varde; + *d++ = (guchar) varde; if (bytes == 4) *d++ = cur_row[col+3]; rcol++; @@ -442,7 +446,7 @@ strucpi (GDrawable *drawable) if (rrow == 128) rrow = 0; if ((row % 5) == 0) - gimp_progress_update ((double) row / (double) (y2 - y1)); + gimp_progress_update ((gdouble) row / (gdouble) (y2 - y1)); } /* update the textured region */