add G_GNUC_INTERNAL to declaration of wrapped PDB functions.

2005-10-25  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/lib.pl: add G_GNUC_INTERNAL to declaration of
	wrapped PDB functions.

	* libgimp/gimpchannel_pdb.h
	* libgimp/gimpdrawable_pdb.h
	* libgimp/gimpgimprc_pdb.h
	* libgimp/gimpimage_pdb.h
	* libgimp/gimplayer_pdb.h
	* libgimp/gimpplugin_pdb.h
	* libgimp/gimpproceduraldb_pdb.h
	* libgimp/gimpprogress_pdb.h
	* libgimp/gimpselection_pdb.h
	* libgimp/gimpunit_pdb.h: regenerated.

	* libgimp/gimptile.h
	* libgimp/gimpunitcache.h
	* libgimpthumb/gimpthumb-utils.h
	* libgimpwidgets/gimpcolorarea.h
	* libgimpwidgets/gimphelpui.h: declare internal functions as such
	using G_GNUC_INTERNAL.
This commit is contained in:
Sven Neumann 2005-10-25 12:08:32 +00:00 committed by Sven Neumann
parent a0fa08c138
commit dc4757cedc
18 changed files with 80 additions and 47 deletions

View file

@ -1,3 +1,26 @@
2005-10-25 Sven Neumann <sven@gimp.org>
* tools/pdbgen/lib.pl: add G_GNUC_INTERNAL to declaration of
wrapped PDB functions.
* libgimp/gimpchannel_pdb.h
* libgimp/gimpdrawable_pdb.h
* libgimp/gimpgimprc_pdb.h
* libgimp/gimpimage_pdb.h
* libgimp/gimplayer_pdb.h
* libgimp/gimpplugin_pdb.h
* libgimp/gimpproceduraldb_pdb.h
* libgimp/gimpprogress_pdb.h
* libgimp/gimpselection_pdb.h
* libgimp/gimpunit_pdb.h: regenerated.
* libgimp/gimptile.h
* libgimp/gimpunitcache.h
* libgimpthumb/gimpthumb-utils.h
* libgimpwidgets/gimpcolorarea.h
* libgimpwidgets/gimphelpui.h: declare internal functions as such
using G_GNUC_INTERNAL.
2005-10-25 Sven Neumann <sven@gimp.org> 2005-10-25 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/paths.pdb: added getter and setter for path * tools/pdbgen/pdb/paths.pdb: added getter and setter for path

3
NEWS
View file

@ -21,6 +21,9 @@ Changes in GIMP 2.3.5
- menu reorganisation in the Toolbox menu - menu reorganisation in the Toolbox menu
- export "Open As Layer" to the PDB as file-load-layer - export "Open As Layer" to the PDB as file-load-layer
- added keyboard control for the Curves tool - added keyboard control for the Curves tool
- load and save embedded ICC profiles from/to PNG images
- improved appearance of some tool icons on dark background
- added PDB API to get and set path visibility
- bug fixes and code cleanup - bug fixes and code cleanup

View file

@ -34,7 +34,7 @@ gint32 _gimp_channel_new (gint32 image_ID,
gint height, gint height,
const gchar *name, const gchar *name,
gdouble opacity, gdouble opacity,
const GimpRGB *color); const GimpRGB *color) G_GNUC_INTERNAL;
gint32 gimp_channel_new_from_component (gint32 image_ID, gint32 gimp_channel_new_from_component (gint32 image_ID,
GimpChannelType component, GimpChannelType component,
const gchar *name); const gchar *name);

View file

@ -102,7 +102,7 @@ gboolean _gimp_drawable_thumbnail (gint32 draw
gint *ret_height, gint *ret_height,
gint *bpp, gint *bpp,
gint *thumbnail_data_count, gint *thumbnail_data_count,
guint8 **thumbnail_data); guint8 **thumbnail_data) G_GNUC_INTERNAL;
gboolean _gimp_drawable_sub_thumbnail (gint32 drawable_ID, gboolean _gimp_drawable_sub_thumbnail (gint32 drawable_ID,
gint src_x, gint src_x,
gint src_y, gint src_y,
@ -114,7 +114,7 @@ gboolean _gimp_drawable_sub_thumbnail (gint32 draw
gint *height, gint *height,
gint *bpp, gint *bpp,
gint *thumbnail_data_count, gint *thumbnail_data_count,
guint8 **thumbnail_data); guint8 **thumbnail_data) G_GNUC_INTERNAL;
gboolean gimp_drawable_foreground_extract (gint32 drawable_ID, gboolean gimp_drawable_foreground_extract (gint32 drawable_ID,
GimpForegroundExtractMode mode, GimpForegroundExtractMode mode,
gint32 mask_ID); gint32 mask_ID);

View file

@ -36,7 +36,7 @@ gchar* gimp_get_default_comment (void);
gboolean gimp_get_monitor_resolution (gdouble *xres, gboolean gimp_get_monitor_resolution (gdouble *xres,
gdouble *yres); gdouble *yres);
gchar* gimp_get_theme_dir (void); gchar* gimp_get_theme_dir (void);
gchar* _gimp_get_color_configuration (void); gchar* _gimp_get_color_configuration (void) G_GNUC_INTERNAL;
gchar* gimp_get_module_load_inhibit (void); gchar* gimp_get_module_load_inhibit (void);

View file

@ -107,10 +107,10 @@ gint32 gimp_image_merge_down (gint32 ima
gint32 merge_layer_ID, gint32 merge_layer_ID,
GimpMergeType merge_type); GimpMergeType merge_type);
guint8* _gimp_image_get_colormap (gint32 image_ID, guint8* _gimp_image_get_colormap (gint32 image_ID,
gint *num_bytes); gint *num_bytes) G_GNUC_INTERNAL;
gboolean _gimp_image_set_colormap (gint32 image_ID, gboolean _gimp_image_set_colormap (gint32 image_ID,
gint num_bytes, gint num_bytes,
const guint8 *colormap); const guint8 *colormap) G_GNUC_INTERNAL;
gboolean gimp_image_clean_all (gint32 image_ID); gboolean gimp_image_clean_all (gint32 image_ID);
gboolean gimp_image_is_dirty (gint32 image_ID); gboolean gimp_image_is_dirty (gint32 image_ID);
gboolean _gimp_image_thumbnail (gint32 image_ID, gboolean _gimp_image_thumbnail (gint32 image_ID,
@ -120,7 +120,7 @@ gboolean _gimp_image_thumbnail (gint32 ima
gint *ret_height, gint *ret_height,
gint *bpp, gint *bpp,
gint *thumbnail_data_count, gint *thumbnail_data_count,
guint8 **thumbnail_data); guint8 **thumbnail_data) G_GNUC_INTERNAL;
gint32 gimp_image_get_active_layer (gint32 image_ID); gint32 gimp_image_get_active_layer (gint32 image_ID);
gboolean gimp_image_set_active_layer (gint32 image_ID, gboolean gimp_image_set_active_layer (gint32 image_ID,
gint32 active_layer_ID); gint32 active_layer_ID);

View file

@ -35,11 +35,11 @@ gint32 _gimp_layer_new (gint32 imag
GimpImageType type, GimpImageType type,
const gchar *name, const gchar *name,
gdouble opacity, gdouble opacity,
GimpLayerModeEffects mode); GimpLayerModeEffects mode) G_GNUC_INTERNAL;
gint32 gimp_layer_new_from_drawable (gint32 drawable_ID, gint32 gimp_layer_new_from_drawable (gint32 drawable_ID,
gint32 dest_image_ID); gint32 dest_image_ID);
gint32 _gimp_layer_copy (gint32 layer_ID, gint32 _gimp_layer_copy (gint32 layer_ID,
gboolean add_alpha); gboolean add_alpha) G_GNUC_INTERNAL;
gboolean gimp_layer_add_alpha (gint32 layer_ID); gboolean gimp_layer_add_alpha (gint32 layer_ID);
gboolean gimp_layer_scale (gint32 layer_ID, gboolean gimp_layer_scale (gint32 layer_ID,
gint new_width, gint new_width,

View file

@ -40,7 +40,7 @@ gboolean gimp_plugin_menu_branch_register (const gchar *menu_path,
gboolean _gimp_plugin_icon_register (const gchar *procedure_name, gboolean _gimp_plugin_icon_register (const gchar *procedure_name,
GimpIconType icon_type, GimpIconType icon_type,
gint icon_data_length, gint icon_data_length,
const guint8 *icon_data); const guint8 *icon_data) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -48,7 +48,7 @@ gboolean _gimp_procedural_db_proc_info (const gchar *procedure,
gchar **date, gchar **date,
GimpPDBProcType *proc_type, GimpPDBProcType *proc_type,
gint *num_args, gint *num_args,
gint *num_values); gint *num_values) G_GNUC_INTERNAL;
gboolean gimp_procedural_db_proc_arg (const gchar *procedure, gboolean gimp_procedural_db_proc_arg (const gchar *procedure,
gint arg_num, gint arg_num,
GimpPDBArgType *arg_type, GimpPDBArgType *arg_type,
@ -61,11 +61,11 @@ gboolean gimp_procedural_db_proc_val (const gchar *procedure,
gchar **val_desc); gchar **val_desc);
gboolean _gimp_procedural_db_get_data (const gchar *identifier, gboolean _gimp_procedural_db_get_data (const gchar *identifier,
gint *bytes, gint *bytes,
guint8 **data); guint8 **data) G_GNUC_INTERNAL;
gint gimp_procedural_db_get_data_size (const gchar *identifier); gint gimp_procedural_db_get_data_size (const gchar *identifier);
gboolean _gimp_procedural_db_set_data (const gchar *identifier, gboolean _gimp_procedural_db_set_data (const gchar *identifier,
gint bytes, gint bytes,
const guint8 *data); const guint8 *data) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -34,8 +34,8 @@ gboolean gimp_progress_update (gdouble percentage);
gboolean gimp_progress_pulse (void); gboolean gimp_progress_pulse (void);
gboolean gimp_progress_set_text (const gchar *message); gboolean gimp_progress_set_text (const gchar *message);
gint gimp_progress_get_window_handle (void); gint gimp_progress_get_window_handle (void);
gboolean _gimp_progress_install (const gchar *progress_callback); gboolean _gimp_progress_install (const gchar *progress_callback) G_GNUC_INTERNAL;
gboolean _gimp_progress_uninstall (const gchar *progress_callback); gboolean _gimp_progress_uninstall (const gchar *progress_callback) G_GNUC_INTERNAL;
gboolean gimp_progress_cancel (const gchar *progress_callback); gboolean gimp_progress_cancel (const gchar *progress_callback);

View file

@ -44,7 +44,7 @@ gboolean gimp_selection_translate (gint32 image_ID,
gint offy); gint offy);
gint32 _gimp_selection_float (gint32 drawable_ID, gint32 _gimp_selection_float (gint32 drawable_ID,
gint offx, gint offx,
gint offy); gint offy) G_GNUC_INTERNAL;
gboolean gimp_selection_invert (gint32 image_ID); gboolean gimp_selection_invert (gint32 image_ID);
gboolean gimp_selection_sharpen (gint32 image_ID); gboolean gimp_selection_sharpen (gint32 image_ID);
gboolean gimp_selection_all (gint32 image_ID); gboolean gimp_selection_all (gint32 image_ID);

View file

@ -53,7 +53,7 @@ void gimp_tile_cache_ntiles (gulong ntiles);
/* private function */ /* private function */
void _gimp_tile_cache_flush_drawable (GimpDrawable *drawable); void _gimp_tile_cache_flush_drawable (GimpDrawable *drawable) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -29,25 +29,25 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */ /* For information look into the C source or the html documentation */
gint _gimp_unit_get_number_of_units (void); gint _gimp_unit_get_number_of_units (void) G_GNUC_INTERNAL;
gint _gimp_unit_get_number_of_built_in_units (void); gint _gimp_unit_get_number_of_built_in_units (void) G_GNUC_INTERNAL;
GimpUnit _gimp_unit_new (const gchar *identifier, GimpUnit _gimp_unit_new (const gchar *identifier,
gdouble factor, gdouble factor,
gint digits, gint digits,
const gchar *symbol, const gchar *symbol,
const gchar *abbreviation, const gchar *abbreviation,
const gchar *singular, const gchar *singular,
const gchar *plural); const gchar *plural) G_GNUC_INTERNAL;
gboolean _gimp_unit_get_deletion_flag (GimpUnit unit_id); gboolean _gimp_unit_get_deletion_flag (GimpUnit unit_id) G_GNUC_INTERNAL;
gboolean _gimp_unit_set_deletion_flag (GimpUnit unit_id, gboolean _gimp_unit_set_deletion_flag (GimpUnit unit_id,
gboolean deletion_flag); gboolean deletion_flag) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_identifier (GimpUnit unit_id); gchar* _gimp_unit_get_identifier (GimpUnit unit_id) G_GNUC_INTERNAL;
gdouble _gimp_unit_get_factor (GimpUnit unit_id); gdouble _gimp_unit_get_factor (GimpUnit unit_id) G_GNUC_INTERNAL;
gint _gimp_unit_get_digits (GimpUnit unit_id); gint _gimp_unit_get_digits (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_symbol (GimpUnit unit_id); gchar* _gimp_unit_get_symbol (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_abbreviation (GimpUnit unit_id); gchar* _gimp_unit_get_abbreviation (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_singular (GimpUnit unit_id); gchar* _gimp_unit_get_singular (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_plural (GimpUnit unit_id); gchar* _gimp_unit_get_plural (GimpUnit unit_id) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -26,8 +26,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
gint _gimp_unit_cache_get_number_of_units (void); gint _gimp_unit_cache_get_number_of_units (void) G_GNUC_INTERNAL;
gint _gimp_unit_cache_get_number_of_built_in_units (void); gint _gimp_unit_cache_get_number_of_built_in_units (void) G_GNUC_INTERNAL;
GimpUnit _gimp_unit_cache_new (gchar *identifier, GimpUnit _gimp_unit_cache_new (gchar *identifier,
gdouble factor, gdouble factor,
@ -35,17 +35,17 @@ GimpUnit _gimp_unit_cache_new (gchar *identifier,
gchar *symbol, gchar *symbol,
gchar *abbreviation, gchar *abbreviation,
gchar *singular, gchar *singular,
gchar *plural); gchar *plural) G_GNUC_INTERNAL;
gboolean _gimp_unit_cache_get_deletion_flag (GimpUnit unit); gboolean _gimp_unit_cache_get_deletion_flag (GimpUnit unit) G_GNUC_INTERNAL;
void _gimp_unit_cache_set_deletion_flag (GimpUnit unit, void _gimp_unit_cache_set_deletion_flag (GimpUnit unit,
gboolean deletion_flag); gboolean deletion_flag) G_GNUC_INTERNAL;
gdouble _gimp_unit_cache_get_factor (GimpUnit unit); gdouble _gimp_unit_cache_get_factor (GimpUnit unit) G_GNUC_INTERNAL;
gint _gimp_unit_cache_get_digits (GimpUnit unit); gint _gimp_unit_cache_get_digits (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_identifier (GimpUnit unit); const gchar * _gimp_unit_cache_get_identifier (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_symbol (GimpUnit unit); const gchar * _gimp_unit_cache_get_symbol (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_abbreviation (GimpUnit unit); const gchar * _gimp_unit_cache_get_abbreviation (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_singular (GimpUnit unit); const gchar * _gimp_unit_cache_get_singular (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_plural (GimpUnit unit); const gchar * _gimp_unit_cache_get_plural (GimpUnit unit) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -59,8 +59,8 @@ void gimp_thumbs_delete_for_uri_local (const gchar *uri);
/* for internal use only */ /* for internal use only */
void _gimp_thumbs_delete_others (const gchar *uri, void _gimp_thumbs_delete_others (const gchar *uri,
GimpThumbSize size); GimpThumbSize size) G_GNUC_INTERNAL;
gchar * _gimp_thumb_filename_from_uri (const gchar *uri); gchar * _gimp_thumb_filename_from_uri (const gchar *uri) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -97,7 +97,8 @@ void _gimp_color_area_render_buf (GtkWidget *widget,
guint width, guint width,
guint height, guint height,
guint rowstride, guint rowstride,
GimpRGB *color); GimpRGB *color) G_GNUC_INTERNAL;
G_END_DECLS G_END_DECLS

View file

@ -28,7 +28,7 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */ /* For information look into the C source or the html documentation */
void _gimp_help_init (void); void _gimp_help_init (void) G_GNUC_INTERNAL;
void gimp_help_enable_tooltips (void); void gimp_help_enable_tooltips (void);
void gimp_help_disable_tooltips (void); void gimp_help_disable_tooltips (void);

View file

@ -81,7 +81,8 @@ sub generate {
my @inargs = @{$proc->{inargs}} if exists $proc->{inargs}; my @inargs = @{$proc->{inargs}} if exists $proc->{inargs};
my @outargs = @{$proc->{outargs}} if exists $proc->{outargs}; my @outargs = @{$proc->{outargs}} if exists $proc->{outargs};
my $funcname = "gimp_$name"; my $wrapped = ""; my %usednames; my $funcname = "gimp_$name"; my $wrapped = ""; my $attribute = "";
my %usednames;
my $retdesc = ""; my $retdesc = "";
if ($proc->{deprecated} && !$out->{deprecated}) { if ($proc->{deprecated} && !$out->{deprecated}) {
@ -133,6 +134,7 @@ sub generate {
my $id = exists $arg->{id_func} || $_->{type} =~ /guide/; my $id = exists $arg->{id_func} || $_->{type} =~ /guide/;
$wrapped = "_" if exists $_->{wrap}; $wrapped = "_" if exists $_->{wrap};
$attribute = " G_GNUC_INTERNAL" if exists $_->{wrap};
$usednames{$_->{name}}++; $usednames{$_->{name}}++;
@ -198,6 +200,7 @@ sub generate {
$return_marshal = "" unless $once++; $return_marshal = "" unless $once++;
$wrapped = "_" if exists $_->{wrap}; $wrapped = "_" if exists $_->{wrap};
$attribute = " G_GNUC_INTERNAL" if exists $_->{wrap};
$_->{libname} = exists $usednames{$_->{name}} ? "ret_$_->{name}" $_->{libname} = exists $usednames{$_->{name}} ? "ret_$_->{name}"
: $_->{name}; : $_->{name};
@ -439,7 +442,7 @@ CODE
# Our function prototype for the headers # Our function prototype for the headers
(my $hrettype = $rettype) =~ s/ //g; (my $hrettype = $rettype) =~ s/ //g;
my $proto = "$hrettype $wrapped$funcname ($arglist);\n"; my $proto = "$hrettype $wrapped$funcname ($arglist)$attribute;\n";
$proto =~ s/ +/ /g; $proto =~ s/ +/ /g;
push @{$out->{protos}}, $proto; push @{$out->{protos}}, $proto;
@ -605,6 +608,9 @@ LGPL
foreach (@args) { foreach (@args) {
$space = rindex($_, ' '); $space = rindex($_, ' ');
if ($space > 0 && substr($_, $space - 1, 1) eq ')') {
$space = rindex($_, ' ', $space - 1)
}
my $len = $longest[2] - $space + 1; my $len = $longest[2] - $space + 1;
$len -= scalar @{[ /\*/g ]}; $len -= scalar @{[ /\*/g ]};