app, libgimp, pdb: remove specific functions now in shared GimpRasterizable API.
This commit is contained in:
parent
92e587b31f
commit
6f69a16e0a
10 changed files with 1 additions and 328 deletions
|
|
@ -30,7 +30,7 @@
|
|||
#include "internal-procs.h"
|
||||
|
||||
|
||||
/* 780 procedures registered total */
|
||||
/* 777 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (GimpPDB *pdb)
|
||||
|
|
|
|||
|
|
@ -106,50 +106,6 @@ link_layer_new_invoker (GimpProcedure *procedure,
|
|||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_discard_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLinkLayer *layer;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
gimp_rasterizable_rasterize (GIMP_RASTERIZABLE (layer));
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_monitor_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLinkLayer *layer;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
gimp_rasterizable_restore (GIMP_RASTERIZABLE (layer));
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_get_file_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
|
|
@ -287,53 +243,6 @@ register_link_layer_procs (GimpPDB *pdb)
|
|||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-discard
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_discard_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-discard");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Discard the link layer information.",
|
||||
"Discards the link information. This makes the layer behave like a normal layer.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-monitor
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_monitor_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-monitor");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Retrieve the link layer information.",
|
||||
"Retrieve the link information. This makes the layer behave like a link layer after the link information has been discarded.\n"
|
||||
"Since the source file will be monitored again, it may change the layer's render.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The link layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-get-file
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -125,28 +125,6 @@ vector_layer_refresh_invoker (GimpProcedure *procedure,
|
|||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
vector_layer_discard_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpVectorLayer *layer;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
gimp_rasterizable_rasterize (GIMP_RASTERIZABLE (layer));
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
vector_layer_get_enable_fill_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
|
|
@ -1030,29 +1008,6 @@ register_vector_layer_procs (GimpPDB *pdb)
|
|||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-vector-layer-discard
|
||||
*/
|
||||
procedure = gimp_procedure_new (vector_layer_discard_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-vector-layer-discard");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Discard the vector layer information.",
|
||||
"Discards the vector information. This makes the layer behave like a normal layer.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Alex S.",
|
||||
"Alex S.",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_vector_layer ("layer",
|
||||
"layer",
|
||||
"The vector layer",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-vector-layer-get-enable-fill
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -681,12 +681,10 @@ EXPORTS
|
|||
gimp_layer_set_offsets
|
||||
gimp_layer_set_opacity
|
||||
gimp_layer_set_show_mask
|
||||
gimp_link_layer_discard
|
||||
gimp_link_layer_get_by_id
|
||||
gimp_link_layer_get_file
|
||||
gimp_link_layer_get_mime_type
|
||||
gimp_link_layer_get_type
|
||||
gimp_link_layer_monitor
|
||||
gimp_link_layer_new
|
||||
gimp_link_layer_set_file
|
||||
gimp_list_images
|
||||
|
|
@ -1113,7 +1111,6 @@ EXPORTS
|
|||
gimp_unit_new
|
||||
gimp_update_metadata
|
||||
gimp_user_time
|
||||
gimp_vector_layer_discard
|
||||
gimp_vector_layer_get_by_id
|
||||
gimp_vector_layer_get_enable_fill
|
||||
gimp_vector_layer_get_enable_stroke
|
||||
|
|
|
|||
|
|
@ -84,80 +84,6 @@ gimp_link_layer_new (GimpImage *image,
|
|||
return layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_link_layer_discard:
|
||||
* @layer: The link layer.
|
||||
*
|
||||
* Discard the link layer information.
|
||||
*
|
||||
* Discards the link information. This makes the layer behave like a
|
||||
* normal layer.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_link_layer_discard (GimpLinkLayer *layer)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gboolean success = TRUE;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_LINK_LAYER, layer,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-link-layer-discard",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_link_layer_monitor:
|
||||
* @layer: The link layer.
|
||||
*
|
||||
* Retrieve the link layer information.
|
||||
*
|
||||
* Retrieve the link information. This makes the layer behave like a
|
||||
* link layer after the link information has been discarded.
|
||||
* Since the source file will be monitored again, it may change the
|
||||
* layer's render.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_link_layer_monitor (GimpLinkLayer *layer)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gboolean success = TRUE;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_LINK_LAYER, layer,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-link-layer-monitor",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_link_layer_get_file:
|
||||
* @layer: The link layer.
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ G_BEGIN_DECLS
|
|||
|
||||
GimpLinkLayer* gimp_link_layer_new (GimpImage *image,
|
||||
GFile *file);
|
||||
gboolean gimp_link_layer_discard (GimpLinkLayer *layer);
|
||||
gboolean gimp_link_layer_monitor (GimpLinkLayer *layer);
|
||||
GFile* gimp_link_layer_get_file (GimpLinkLayer *layer);
|
||||
gboolean gimp_link_layer_set_file (GimpLinkLayer *layer,
|
||||
GFile *file);
|
||||
|
|
|
|||
|
|
@ -122,42 +122,6 @@ gimp_vector_layer_refresh (GimpVectorLayer *layer)
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_vector_layer_discard:
|
||||
* @layer: The vector layer.
|
||||
*
|
||||
* Discard the vector layer information.
|
||||
*
|
||||
* Discards the vector information. This makes the layer behave like a
|
||||
* normal layer.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_vector_layer_discard (GimpVectorLayer *layer)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gboolean success = TRUE;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_VECTOR_LAYER, layer,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-vector-layer-discard",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_vector_layer_get_enable_fill:
|
||||
* @layer: The vector layer.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ G_BEGIN_DECLS
|
|||
GimpVectorLayer* gimp_vector_layer_new (GimpImage *image,
|
||||
GimpPath *path);
|
||||
gboolean gimp_vector_layer_refresh (GimpVectorLayer *layer);
|
||||
gboolean gimp_vector_layer_discard (GimpVectorLayer *layer);
|
||||
gboolean gimp_vector_layer_get_enable_fill (GimpVectorLayer *layer);
|
||||
gboolean gimp_vector_layer_get_enable_stroke (GimpVectorLayer *layer);
|
||||
GeglColor* gimp_vector_layer_get_fill_color (GimpVectorLayer *layer);
|
||||
|
|
|
|||
|
|
@ -90,55 +90,6 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub link_layer_discard {
|
||||
$blurb = 'Discard the link layer information.';
|
||||
|
||||
$help = <<'HELP';
|
||||
Discards the link information. This makes the layer behave like a normal layer.
|
||||
HELP
|
||||
|
||||
&jehan_pdb_misc('2025', '3.2');
|
||||
|
||||
@inargs = (
|
||||
{ name => 'layer', type => 'link_layer',
|
||||
desc => 'The link layer' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
gimp_rasterizable_rasterize (GIMP_RASTERIZABLE (layer));
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub link_layer_monitor {
|
||||
$blurb = 'Retrieve the link layer information.';
|
||||
|
||||
$help = <<'HELP';
|
||||
Retrieve the link information. This makes the layer behave like a link
|
||||
layer after the link information has been discarded.
|
||||
|
||||
Since the source file will be monitored again, it may change the layer's render.
|
||||
HELP
|
||||
|
||||
&jehan_pdb_misc('2025', '3.2');
|
||||
|
||||
@inargs = (
|
||||
{ name => 'layer', type => 'link_layer',
|
||||
desc => 'The link layer' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
gimp_rasterizable_restore (GIMP_RASTERIZABLE (layer));
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub link_layer_get_file {
|
||||
$blurb = 'Get the monitored file.';
|
||||
|
||||
|
|
@ -248,8 +199,6 @@ CODE
|
|||
"gimp-intl.h");
|
||||
|
||||
@procs = qw(link_layer_new
|
||||
link_layer_discard
|
||||
link_layer_monitor
|
||||
link_layer_get_file
|
||||
link_layer_set_file
|
||||
link_layer_get_mime_type);
|
||||
|
|
|
|||
|
|
@ -100,29 +100,6 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
sub vector_layer_discard {
|
||||
$blurb = 'Discard the vector layer information.';
|
||||
|
||||
$help = <<'HELP';
|
||||
Discards the vector information. This makes the layer behave like a normal layer.
|
||||
HELP
|
||||
|
||||
&alxsa_pdb_misc('2025', '3.2');
|
||||
|
||||
@inargs = (
|
||||
{ name => 'layer', type => 'vector_layer',
|
||||
desc => 'The vector layer' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
gimp_rasterizable_rasterize (GIMP_RASTERIZABLE (layer));
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub vector_layer_get_path {
|
||||
$blurb = 'Gets the path from the vector layer if one is associated with it.';
|
||||
|
||||
|
|
@ -951,7 +928,6 @@ CODE
|
|||
|
||||
@procs = qw(vector_layer_new
|
||||
vector_layer_refresh
|
||||
vector_layer_discard
|
||||
vector_layer_get_enable_fill
|
||||
vector_layer_get_enable_stroke
|
||||
vector_layer_get_fill_color
|
||||
|
|
|
|||
Loading…
Reference in a new issue