mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00

2000-01-25 Michael Natterer <mitch@gimp.org> * configure.in * po-plug-ins/POTFILES.in * plug-ins/common/Makefile.am * plug-ins/common/plugin-defs.pl * plug-ins/megawidget/*: removed. (There were only 3 functions left which were used by ~5 plugins, so I moved the resp. functions to the plugins). More preview stuff to come... * app/airbrush_blob.c * modules/colorsel_triangle.c * modules/colorsel_water.c: use G_PI instead of M_PI. * app/procedural_db.h * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: new PDB return value STATUS_CANCEL which indicates that "Cancel" was pressed in a plugin dialog. (Useful only for file load/save plugins). * app/fileops.[ch] * app/menus.c: changes to handle STATUS_CANCEL correctly. Did some code cleanup in fileops.[ch]. Pop up a warning if File->Save failed. * app/plug_in.c: return_val[0] is of type PDB_STATUS, not PDB_INT32. * libgimp/gimpmath.h: new constant G_MAXRAND which equals to RAND_MAX if it exists or to G_MAXINT otherwise. * libgimp/gimpwidgets.[ch]: new function gimp_random_seed_new() which creates a spinbutton and a "Time" toggle. Call the function which does the "set_sensitive" magic from the radio button callback. * plug-ins/[75 plugins]: - Return STATUS_CANCEL in all file load/save dialogs if "Cancel" was pressed. - Standardized the file plugins' "run" functions. - Use G_PI and G_MAXRAND everywhere. - Added tons of scales and spinbuttons instead of text entries. - Applied uniform packing/spacings all over the place. - Reorganized some UIs (stuff like moving the preview to the top left corner of the dialog). - Removed many ui helper functions and callbacks and use the stuff from libgimp instead. - I tried not to restrict the range of possible values when I replaced entries with spinbuttons/scales but may have failed, though in some cases. Please test ;-) - #include <libgimp/gimpmath.h> where appropriate and use it's constants. - Indentation, s/int/gint/ et.al., code cleanup. RFC: The plugins are definitely not useable with GIMP 1.0 any more, so shouldn't we remove all the remaining compatibility stuff ??? (like "#ifdef GIMP_HAVE_PARASITES")
149 lines
4.6 KiB
C
149 lines
4.6 KiB
C
/* LIBGIMP - The GIMP Library
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
*
|
|
* gimpwidgets.h
|
|
* Copyright (C) 2000 Michael Natterer <mitch@gimp.org>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
#ifndef __GIMP_WIDGETS_H__
|
|
#define __GIMP_WIDGETS_H__
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* Widget Constructors
|
|
*/
|
|
|
|
GtkWidget * gimp_option_menu_new (GtkSignalFunc menu_item_callback,
|
|
gpointer data,
|
|
gpointer initial, /* user_data */
|
|
|
|
/* specify menu items as va_list:
|
|
* gchar *label,
|
|
* gpointer user_data,
|
|
* GtkWidget **widget_ptr,
|
|
*/
|
|
|
|
...);
|
|
|
|
GtkWidget * gimp_radio_group_new (gboolean in_frame,
|
|
gchar *frame_title,
|
|
|
|
/* specify radio buttons as va_list:
|
|
* gchar *label,
|
|
* GtkSignalFunc callback,
|
|
* gpointer data,
|
|
* gpointer user_data,
|
|
* GtkWidget **widget_ptr,
|
|
* gboolean active,
|
|
*/
|
|
|
|
...);
|
|
|
|
GtkWidget * gimp_radio_group_new2 (gboolean in_frame,
|
|
gchar *frame_title,
|
|
GtkSignalFunc callback,
|
|
gpointer data,
|
|
gpointer initial, /* user_data */
|
|
|
|
/* specify radio buttons as va_list:
|
|
* gchar *label,
|
|
* gpointer user_data,
|
|
* GtkWidget **widget_ptr,
|
|
*/
|
|
|
|
...);
|
|
|
|
GtkWidget * gimp_spin_button_new (/* return value: */
|
|
GtkObject **adjustment,
|
|
|
|
gfloat value,
|
|
gfloat lower,
|
|
gfloat upper,
|
|
gfloat step_increment,
|
|
gfloat page_increment,
|
|
gfloat page_size,
|
|
gfloat climb_rate,
|
|
guint digits);
|
|
|
|
GtkObject * gimp_scale_entry_new (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,
|
|
gchar *tooltip,
|
|
gchar *private_tip);
|
|
|
|
GtkWidget * gimp_random_seed_new (gint *seed,
|
|
gint *use_time,
|
|
gint time_true,
|
|
gint time_false);
|
|
|
|
/*
|
|
* Standard Callbacks
|
|
*/
|
|
|
|
void gimp_toggle_button_update (GtkWidget *widget,
|
|
gpointer data);
|
|
|
|
void gimp_menu_item_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_float_adjustment_update (GtkAdjustment *adjustment,
|
|
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 two-column table */
|
|
void gimp_table_attach_aligned (GtkTable *table,
|
|
gint row,
|
|
gchar *text,
|
|
gfloat xalign,
|
|
gfloat yalign,
|
|
GtkWidget *widget,
|
|
gboolean left_adjust);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __GIMP_WIDGETS_H__ */
|