Commit dc4757ce authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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.
parent a0fa08c1
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>
* tools/pdbgen/pdb/paths.pdb: added getter and setter for path
......
......@@ -21,6 +21,9 @@ Changes in GIMP 2.3.5
- menu reorganisation in the Toolbox menu
- export "Open As Layer" to the PDB as file-load-layer
- 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
......
......@@ -34,7 +34,7 @@ gint32 _gimp_channel_new (gint32 image_ID,
gint height,
const gchar *name,
gdouble opacity,
const GimpRGB *color);
const GimpRGB *color) G_GNUC_INTERNAL;
gint32 gimp_channel_new_from_component (gint32 image_ID,
GimpChannelType component,
const gchar *name);
......
......@@ -102,7 +102,7 @@ gboolean _gimp_drawable_thumbnail (gint32 draw
gint *ret_height,
gint *bpp,
gint *thumbnail_data_count,
guint8 **thumbnail_data);
guint8 **thumbnail_data) G_GNUC_INTERNAL;
gboolean _gimp_drawable_sub_thumbnail (gint32 drawable_ID,
gint src_x,
gint src_y,
......@@ -114,7 +114,7 @@ gboolean _gimp_drawable_sub_thumbnail (gint32 draw
gint *height,
gint *bpp,
gint *thumbnail_data_count,
guint8 **thumbnail_data);
guint8 **thumbnail_data) G_GNUC_INTERNAL;
gboolean gimp_drawable_foreground_extract (gint32 drawable_ID,
GimpForegroundExtractMode mode,
gint32 mask_ID);
......
......@@ -36,7 +36,7 @@ gchar* gimp_get_default_comment (void);
gboolean gimp_get_monitor_resolution (gdouble *xres,
gdouble *yres);
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);
......
......@@ -107,10 +107,10 @@ gint32 gimp_image_merge_down (gint32 ima
gint32 merge_layer_ID,
GimpMergeType merge_type);
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,
gint num_bytes,
const guint8 *colormap);
const guint8 *colormap) G_GNUC_INTERNAL;
gboolean gimp_image_clean_all (gint32 image_ID);
gboolean gimp_image_is_dirty (gint32 image_ID);
gboolean _gimp_image_thumbnail (gint32 image_ID,
......@@ -120,7 +120,7 @@ gboolean _gimp_image_thumbnail (gint32 ima
gint *ret_height,
gint *bpp,
gint *thumbnail_data_count,
guint8 **thumbnail_data);
guint8 **thumbnail_data) G_GNUC_INTERNAL;
gint32 gimp_image_get_active_layer (gint32 image_ID);
gboolean gimp_image_set_active_layer (gint32 image_ID,
gint32 active_layer_ID);
......
......@@ -35,11 +35,11 @@ gint32 _gimp_layer_new (gint32 imag
GimpImageType type,
const gchar *name,
gdouble opacity,
GimpLayerModeEffects mode);
GimpLayerModeEffects mode) G_GNUC_INTERNAL;
gint32 gimp_layer_new_from_drawable (gint32 drawable_ID,
gint32 dest_image_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_scale (gint32 layer_ID,
gint new_width,
......
......@@ -40,7 +40,7 @@ gboolean gimp_plugin_menu_branch_register (const gchar *menu_path,
gboolean _gimp_plugin_icon_register (const gchar *procedure_name,
GimpIconType icon_type,
gint icon_data_length,
const guint8 *icon_data);
const guint8 *icon_data) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -48,7 +48,7 @@ gboolean _gimp_procedural_db_proc_info (const gchar *procedure,
gchar **date,
GimpPDBProcType *proc_type,
gint *num_args,
gint *num_values);
gint *num_values) G_GNUC_INTERNAL;
gboolean gimp_procedural_db_proc_arg (const gchar *procedure,
gint arg_num,
GimpPDBArgType *arg_type,
......@@ -61,11 +61,11 @@ gboolean gimp_procedural_db_proc_val (const gchar *procedure,
gchar **val_desc);
gboolean _gimp_procedural_db_get_data (const gchar *identifier,
gint *bytes,
guint8 **data);
guint8 **data) G_GNUC_INTERNAL;
gint gimp_procedural_db_get_data_size (const gchar *identifier);
gboolean _gimp_procedural_db_set_data (const gchar *identifier,
gint bytes,
const guint8 *data);
const guint8 *data) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -34,8 +34,8 @@ gboolean gimp_progress_update (gdouble percentage);
gboolean gimp_progress_pulse (void);
gboolean gimp_progress_set_text (const gchar *message);
gint gimp_progress_get_window_handle (void);
gboolean _gimp_progress_install (const gchar *progress_callback);
gboolean _gimp_progress_uninstall (const gchar *progress_callback);
gboolean _gimp_progress_install (const gchar *progress_callback) G_GNUC_INTERNAL;
gboolean _gimp_progress_uninstall (const gchar *progress_callback) G_GNUC_INTERNAL;
gboolean gimp_progress_cancel (const gchar *progress_callback);
......
......@@ -44,7 +44,7 @@ gboolean gimp_selection_translate (gint32 image_ID,
gint offy);
gint32 _gimp_selection_float (gint32 drawable_ID,
gint offx,
gint offy);
gint offy) G_GNUC_INTERNAL;
gboolean gimp_selection_invert (gint32 image_ID);
gboolean gimp_selection_sharpen (gint32 image_ID);
gboolean gimp_selection_all (gint32 image_ID);
......
......@@ -53,7 +53,7 @@ void gimp_tile_cache_ntiles (gulong ntiles);
/* private function */
void _gimp_tile_cache_flush_drawable (GimpDrawable *drawable);
void _gimp_tile_cache_flush_drawable (GimpDrawable *drawable) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -29,25 +29,25 @@ G_BEGIN_DECLS
/* 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_built_in_units (void);
gint _gimp_unit_get_number_of_units (void) G_GNUC_INTERNAL;
gint _gimp_unit_get_number_of_built_in_units (void) G_GNUC_INTERNAL;
GimpUnit _gimp_unit_new (const gchar *identifier,
gdouble factor,
gint digits,
const gchar *symbol,
const gchar *abbreviation,
const gchar *singular,
const gchar *plural);
gboolean _gimp_unit_get_deletion_flag (GimpUnit unit_id);
const gchar *plural) G_GNUC_INTERNAL;
gboolean _gimp_unit_get_deletion_flag (GimpUnit unit_id) G_GNUC_INTERNAL;
gboolean _gimp_unit_set_deletion_flag (GimpUnit unit_id,
gboolean deletion_flag);
gchar* _gimp_unit_get_identifier (GimpUnit unit_id);
gdouble _gimp_unit_get_factor (GimpUnit unit_id);
gint _gimp_unit_get_digits (GimpUnit unit_id);
gchar* _gimp_unit_get_symbol (GimpUnit unit_id);
gchar* _gimp_unit_get_abbreviation (GimpUnit unit_id);
gchar* _gimp_unit_get_singular (GimpUnit unit_id);
gchar* _gimp_unit_get_plural (GimpUnit unit_id);
gboolean deletion_flag) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_identifier (GimpUnit unit_id) G_GNUC_INTERNAL;
gdouble _gimp_unit_get_factor (GimpUnit unit_id) G_GNUC_INTERNAL;
gint _gimp_unit_get_digits (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_symbol (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_abbreviation (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_singular (GimpUnit unit_id) G_GNUC_INTERNAL;
gchar* _gimp_unit_get_plural (GimpUnit unit_id) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -26,8 +26,8 @@
G_BEGIN_DECLS
gint _gimp_unit_cache_get_number_of_units (void);
gint _gimp_unit_cache_get_number_of_built_in_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) G_GNUC_INTERNAL;
GimpUnit _gimp_unit_cache_new (gchar *identifier,
gdouble factor,
......@@ -35,17 +35,17 @@ GimpUnit _gimp_unit_cache_new (gchar *identifier,
gchar *symbol,
gchar *abbreviation,
gchar *singular,
gchar *plural);
gboolean _gimp_unit_cache_get_deletion_flag (GimpUnit unit);
gchar *plural) G_GNUC_INTERNAL;
gboolean _gimp_unit_cache_get_deletion_flag (GimpUnit unit) G_GNUC_INTERNAL;
void _gimp_unit_cache_set_deletion_flag (GimpUnit unit,
gboolean deletion_flag);
gdouble _gimp_unit_cache_get_factor (GimpUnit unit);
gint _gimp_unit_cache_get_digits (GimpUnit unit);
const gchar * _gimp_unit_cache_get_identifier (GimpUnit unit);
const gchar * _gimp_unit_cache_get_symbol (GimpUnit unit);
const gchar * _gimp_unit_cache_get_abbreviation (GimpUnit unit);
const gchar * _gimp_unit_cache_get_singular (GimpUnit unit);
const gchar * _gimp_unit_cache_get_plural (GimpUnit unit);
gboolean deletion_flag) G_GNUC_INTERNAL;
gdouble _gimp_unit_cache_get_factor (GimpUnit unit) G_GNUC_INTERNAL;
gint _gimp_unit_cache_get_digits (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_identifier (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_symbol (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_abbreviation (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_singular (GimpUnit unit) G_GNUC_INTERNAL;
const gchar * _gimp_unit_cache_get_plural (GimpUnit unit) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -59,8 +59,8 @@ void gimp_thumbs_delete_for_uri_local (const gchar *uri);
/* for internal use only */
void _gimp_thumbs_delete_others (const gchar *uri,
GimpThumbSize size);
gchar * _gimp_thumb_filename_from_uri (const gchar *uri);
GimpThumbSize size) G_GNUC_INTERNAL;
gchar * _gimp_thumb_filename_from_uri (const gchar *uri) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -97,7 +97,8 @@ void _gimp_color_area_render_buf (GtkWidget *widget,
guint width,
guint height,
guint rowstride,
GimpRGB *color);
GimpRGB *color) G_GNUC_INTERNAL;
G_END_DECLS
......
......@@ -28,7 +28,7 @@ G_BEGIN_DECLS
/* 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_disable_tooltips (void);
......
......@@ -81,7 +81,8 @@ sub generate {
my @inargs = @{$proc->{inargs}} if exists $proc->{inargs};
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 = "";
if ($proc->{deprecated} && !$out->{deprecated}) {
......@@ -133,6 +134,7 @@ sub generate {
my $id = exists $arg->{id_func} || $_->{type} =~ /guide/;
$wrapped = "_" if exists $_->{wrap};
$attribute = " G_GNUC_INTERNAL" if exists $_->{wrap};
$usednames{$_->{name}}++;
......@@ -198,6 +200,7 @@ sub generate {
$return_marshal = "" unless $once++;
$wrapped = "_" if exists $_->{wrap};
$attribute = " G_GNUC_INTERNAL" if exists $_->{wrap};
$_->{libname} = exists $usednames{$_->{name}} ? "ret_$_->{name}"
: $_->{name};
......@@ -439,7 +442,7 @@ CODE
# Our function prototype for the headers
(my $hrettype = $rettype) =~ s/ //g;
my $proto = "$hrettype $wrapped$funcname ($arglist);\n";
my $proto = "$hrettype $wrapped$funcname ($arglist)$attribute;\n";
$proto =~ s/ +/ /g;
push @{$out->{protos}}, $proto;
......@@ -605,6 +608,9 @@ LGPL
foreach (@args) {
$space = rindex($_, ' ');
if ($space > 0 && substr($_, $space - 1, 1) eq ')') {
$space = rindex($_, ' ', $space - 1)
}
my $len = $longest[2] - $space + 1;
$len -= scalar @{[ /\*/g ]};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment