2001-01-25 09:20:05 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2003-11-08 01:29:02 +08:00
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
1998-01-25 18:26:47 +08:00
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
1999-11-18 05:13:50 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1998-01-25 18:26:47 +08:00
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2001-01-25 09:20:05 +08:00
|
|
|
*
|
|
|
|
* 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
|
1999-12-26 15:54:39 +08:00
|
|
|
* Lesser General Public License for more details.
|
1998-01-25 18:26:47 +08:00
|
|
|
*
|
1999-11-18 05:13:50 +08:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
2018-07-12 05:27:07 +08:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2001-01-25 09:20:05 +08:00
|
|
|
*/
|
2000-05-31 07:38:46 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#ifndef __GIMP_PROTOCOL_H__
|
|
|
|
#define __GIMP_PROTOCOL_H__
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_BEGIN_DECLS
|
2000-05-31 07:38:46 +08:00
|
|
|
|
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* Increment every time the protocol changes
|
|
|
|
*/
|
2019-09-22 22:48:16 +08:00
|
|
|
#define GIMP_PROTOCOL_VERSION 0x010D
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
2000-03-04 08:24:39 +08:00
|
|
|
enum
|
|
|
|
{
|
1997-11-25 06:05:25 +08:00
|
|
|
GP_QUIT,
|
|
|
|
GP_CONFIG,
|
|
|
|
GP_TILE_REQ,
|
|
|
|
GP_TILE_ACK,
|
|
|
|
GP_TILE_DATA,
|
|
|
|
GP_PROC_RUN,
|
|
|
|
GP_PROC_RETURN,
|
|
|
|
GP_TEMP_PROC_RUN,
|
|
|
|
GP_TEMP_PROC_RETURN,
|
|
|
|
GP_PROC_INSTALL,
|
|
|
|
GP_PROC_UNINSTALL,
|
2002-02-12 15:59:16 +08:00
|
|
|
GP_EXTENSION_ACK,
|
|
|
|
GP_HAS_INIT
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GP_PARAM_DEF_TYPE_DEFAULT,
|
|
|
|
GP_PARAM_DEF_TYPE_INT,
|
2019-07-30 21:04:06 +08:00
|
|
|
GP_PARAM_DEF_TYPE_UNIT,
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
GP_PARAM_DEF_TYPE_ENUM,
|
|
|
|
GP_PARAM_DEF_TYPE_BOOLEAN,
|
|
|
|
GP_PARAM_DEF_TYPE_FLOAT,
|
|
|
|
GP_PARAM_DEF_TYPE_STRING,
|
|
|
|
GP_PARAM_DEF_TYPE_COLOR,
|
2019-08-05 20:12:19 +08:00
|
|
|
GP_PARAM_DEF_TYPE_ID,
|
2019-09-12 03:40:17 +08:00
|
|
|
GP_PARAM_DEF_TYPE_ID_ARRAY
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
} GPParamDefType;
|
|
|
|
|
2019-08-05 05:59:25 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GP_PARAM_TYPE_INT,
|
|
|
|
GP_PARAM_TYPE_FLOAT,
|
|
|
|
GP_PARAM_TYPE_STRING,
|
2019-09-12 03:40:17 +08:00
|
|
|
GP_PARAM_TYPE_FILE,
|
2019-08-05 05:59:25 +08:00
|
|
|
GP_PARAM_TYPE_COLOR,
|
|
|
|
GP_PARAM_TYPE_PARASITE,
|
|
|
|
GP_PARAM_TYPE_ARRAY,
|
2019-08-05 06:58:44 +08:00
|
|
|
GP_PARAM_TYPE_STRING_ARRAY,
|
2019-09-05 17:34:54 +08:00
|
|
|
GP_PARAM_TYPE_ID_ARRAY,
|
2019-08-05 06:58:44 +08:00
|
|
|
GP_PARAM_TYPE_PARAM_DEF
|
2019-08-05 05:59:25 +08:00
|
|
|
} GPParamType;
|
|
|
|
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
|
app, libgimp, libgimpbase: big plug-in API refactoring part three
- libgimpbase: change GPParam to transfer all information about the
GValues we use, in the same way done for GPParamDef. GPParam is now
different from GimpParam from libgimp, pointers can't be casted any
longer. The protocol is now completely GimpPDBArgType-free. Remove
gp_params_destroy() from the public API.
- libgimp: add API to convert between an array of GPParams and
GimpValueArray, the latter is now the new official API for dealing
with procedure arguments and return values, GimpParam is cruft (the
wire now talks with GimpPlugIn more directly than with the members
of GimpPlugInInfo, which need additional compat conversions).
- libgimp, app: rename gimpgpparamspecs.[ch] to simply
gimpgpparams.[ch] which is also more accurate because they now
contain GValue functions too. The code that used to live in
app/plug-in/plug-in-params.h is now completely in libgimp.
- app: contains no protocol compat code any longer, the only place
that uses GimpPDBArgType is the PDB query procedure implementation,
which also needs to change.
- app: change some forgotten int32 run-modes to enums.
2019-07-29 07:56:58 +08:00
|
|
|
typedef struct _GPConfig GPConfig;
|
|
|
|
typedef struct _GPTileReq GPTileReq;
|
|
|
|
typedef struct _GPTileAck GPTileAck;
|
|
|
|
typedef struct _GPTileData GPTileData;
|
|
|
|
typedef struct _GPParamDef GPParamDef;
|
|
|
|
typedef struct _GPParamDefInt GPParamDefInt;
|
2019-07-30 21:04:06 +08:00
|
|
|
typedef struct _GPParamDefUnit GPParamDefUnit;
|
app, libgimp, libgimpbase: big plug-in API refactoring part three
- libgimpbase: change GPParam to transfer all information about the
GValues we use, in the same way done for GPParamDef. GPParam is now
different from GimpParam from libgimp, pointers can't be casted any
longer. The protocol is now completely GimpPDBArgType-free. Remove
gp_params_destroy() from the public API.
- libgimp: add API to convert between an array of GPParams and
GimpValueArray, the latter is now the new official API for dealing
with procedure arguments and return values, GimpParam is cruft (the
wire now talks with GimpPlugIn more directly than with the members
of GimpPlugInInfo, which need additional compat conversions).
- libgimp, app: rename gimpgpparamspecs.[ch] to simply
gimpgpparams.[ch] which is also more accurate because they now
contain GValue functions too. The code that used to live in
app/plug-in/plug-in-params.h is now completely in libgimp.
- app: contains no protocol compat code any longer, the only place
that uses GimpPDBArgType is the PDB query procedure implementation,
which also needs to change.
- app: change some forgotten int32 run-modes to enums.
2019-07-29 07:56:58 +08:00
|
|
|
typedef struct _GPParamDefEnum GPParamDefEnum;
|
|
|
|
typedef struct _GPParamDefBoolean GPParamDefBoolean;
|
|
|
|
typedef struct _GPParamDefFloat GPParamDefFloat;
|
|
|
|
typedef struct _GPParamDefString GPParamDefString;
|
|
|
|
typedef struct _GPParamDefColor GPParamDefColor;
|
|
|
|
typedef struct _GPParamDefID GPParamDefID;
|
2019-09-05 17:34:54 +08:00
|
|
|
typedef struct _GPParamDefIDArray GPParamDefIDArray;
|
2019-08-05 05:59:25 +08:00
|
|
|
typedef struct _GPParam GPParam;
|
|
|
|
typedef struct _GPParamArray GPParamArray;
|
|
|
|
typedef struct _GPParamStringArray GPParamStringArray;
|
2019-09-05 17:34:54 +08:00
|
|
|
typedef struct _GPParamIDArray GPParamIDArray;
|
app, libgimp, libgimpbase: big plug-in API refactoring part three
- libgimpbase: change GPParam to transfer all information about the
GValues we use, in the same way done for GPParamDef. GPParam is now
different from GimpParam from libgimp, pointers can't be casted any
longer. The protocol is now completely GimpPDBArgType-free. Remove
gp_params_destroy() from the public API.
- libgimp: add API to convert between an array of GPParams and
GimpValueArray, the latter is now the new official API for dealing
with procedure arguments and return values, GimpParam is cruft (the
wire now talks with GimpPlugIn more directly than with the members
of GimpPlugInInfo, which need additional compat conversions).
- libgimp, app: rename gimpgpparamspecs.[ch] to simply
gimpgpparams.[ch] which is also more accurate because they now
contain GValue functions too. The code that used to live in
app/plug-in/plug-in-params.h is now completely in libgimp.
- app: contains no protocol compat code any longer, the only place
that uses GimpPDBArgType is the PDB query procedure implementation,
which also needs to change.
- app: change some forgotten int32 run-modes to enums.
2019-07-29 07:56:58 +08:00
|
|
|
typedef struct _GPProcRun GPProcRun;
|
|
|
|
typedef struct _GPProcReturn GPProcReturn;
|
|
|
|
typedef struct _GPProcInstall GPProcInstall;
|
|
|
|
typedef struct _GPProcUninstall GPProcUninstall;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
struct _GPConfig
|
|
|
|
{
|
2003-11-08 01:29:02 +08:00
|
|
|
guint32 tile_width;
|
|
|
|
guint32 tile_height;
|
2019-08-24 04:23:23 +08:00
|
|
|
gint32 shm_id;
|
2004-09-13 21:33:56 +08:00
|
|
|
gint8 check_size;
|
|
|
|
gint8 check_type;
|
2004-10-05 00:21:52 +08:00
|
|
|
gint8 show_help_button;
|
2006-06-01 23:34:58 +08:00
|
|
|
gint8 use_cpu_accel;
|
2014-02-26 04:19:25 +08:00
|
|
|
gint8 use_opencl;
|
2018-06-18 08:19:41 +08:00
|
|
|
gint8 export_profile;
|
2018-01-11 12:14:07 +08:00
|
|
|
gint8 export_exif;
|
|
|
|
gint8 export_xmp;
|
|
|
|
gint8 export_iptc;
|
2019-08-24 04:23:23 +08:00
|
|
|
gint32 gdisp_id;
|
2004-02-17 22:03:07 +08:00
|
|
|
gchar *app_name;
|
2003-11-08 01:29:02 +08:00
|
|
|
gchar *wm_class;
|
|
|
|
gchar *display_name;
|
|
|
|
gint32 monitor_number;
|
2008-03-28 00:30:29 +08:00
|
|
|
guint32 timestamp;
|
libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it. Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.
Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init(). This allows gimp_ui_init() to run without making
any PDB calls. Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.
Bump the protocol version.
2018-05-29 23:20:54 +08:00
|
|
|
gchar *icon_theme_dir;
|
2018-11-20 05:13:07 +08:00
|
|
|
guint64 tile_cache_size;
|
|
|
|
gchar *swap_path;
|
2019-09-22 22:48:16 +08:00
|
|
|
gchar *swap_compression;
|
2018-11-20 05:13:07 +08:00
|
|
|
gint32 num_processors;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPTileReq
|
|
|
|
{
|
2019-08-24 04:23:23 +08:00
|
|
|
gint32 drawable_id;
|
2004-10-05 00:21:52 +08:00
|
|
|
guint32 tile_num;
|
|
|
|
guint32 shadow;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPTileData
|
|
|
|
{
|
2019-08-24 04:23:23 +08:00
|
|
|
gint32 drawable_id;
|
2000-03-04 08:24:39 +08:00
|
|
|
guint32 tile_num;
|
|
|
|
guint32 shadow;
|
|
|
|
guint32 bpp;
|
|
|
|
guint32 width;
|
|
|
|
guint32 height;
|
|
|
|
guint32 use_shm;
|
|
|
|
guchar *data;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
struct _GPParamDefInt
|
|
|
|
{
|
2019-08-10 22:25:22 +08:00
|
|
|
gint64 min_val;
|
|
|
|
gint64 max_val;
|
|
|
|
gint64 default_val;
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
};
|
|
|
|
|
2019-07-30 21:04:06 +08:00
|
|
|
struct _GPParamDefUnit
|
|
|
|
{
|
|
|
|
gint32 allow_pixels;
|
|
|
|
gint32 allow_percent;
|
|
|
|
gint32 default_val;
|
|
|
|
};
|
|
|
|
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
struct _GPParamDefEnum
|
|
|
|
{
|
2019-09-12 03:40:17 +08:00
|
|
|
gint32 default_val;
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDefBoolean
|
|
|
|
{
|
|
|
|
gint32 default_val;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDefFloat
|
|
|
|
{
|
|
|
|
gdouble min_val;
|
|
|
|
gdouble max_val;
|
|
|
|
gdouble default_val;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDefString
|
|
|
|
{
|
2019-09-05 17:34:54 +08:00
|
|
|
gchar *default_val;
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDefColor
|
|
|
|
{
|
|
|
|
gint32 has_alpha;
|
|
|
|
GimpRGB default_val;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDefID
|
|
|
|
{
|
|
|
|
gint32 none_ok;
|
|
|
|
};
|
|
|
|
|
2019-09-05 17:34:54 +08:00
|
|
|
struct _GPParamDefIDArray
|
|
|
|
{
|
|
|
|
gchar *type_name;
|
|
|
|
};
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
struct _GPParamDef
|
|
|
|
{
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
GPParamDefType param_def_type;
|
|
|
|
gchar *type_name;
|
2019-09-12 03:40:17 +08:00
|
|
|
gchar *value_type_name;
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
gchar *name;
|
|
|
|
gchar *nick;
|
|
|
|
gchar *blurb;
|
2019-08-19 18:54:52 +08:00
|
|
|
guint flags;
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
|
|
|
|
union
|
|
|
|
{
|
2019-09-12 03:40:17 +08:00
|
|
|
GPParamDefInt m_int;
|
|
|
|
GPParamDefUnit m_unit;
|
|
|
|
GPParamDefEnum m_enum;
|
|
|
|
GPParamDefBoolean m_boolean;
|
|
|
|
GPParamDefFloat m_float;
|
|
|
|
GPParamDefString m_string;
|
|
|
|
GPParamDefColor m_color;
|
|
|
|
GPParamDefID m_id;
|
|
|
|
GPParamDefIDArray m_id_array;
|
app, libgimp, libgimpbase: plug-in and PDB protocol refactoring part two
- Change the wire protocol's GPProcInstall to transmit the entire
information needed for constructing all GParamSpecs we use, don't
use GimpPDBArgType in GPProcInstall but an enum private to the wire
protocol plus the GParamSpec's GType name. Bump the wire protocol
version.
- Add gimpgpparamspecs.[ch] in both app/plug-in/ and libgimp/ which
take care of converting between GPParamDef and GParamSpec. They
share code as far as possible.
- Change pluginrc writing and parsing to re-use GPParamDef and the
utility functions from gimpgpparamspecs.
- Remove gimp_pdb_compat_param_spec() from app/pdb/gimp-pdb-compat.[ch],
the entire core uses proper GParamSpecs from the wire protocol now,
the whole file will follow down the drain once we use a GValue
representation on the wire too.
- In gimp_plug_in_handle_proc_install(), change the "run-mode"
parameter to a GParamSpecEnum(GIMP_TYPE_RUN_MODE) (if it is not
already an enum). and change all places in app/ to treat it as an
enum value.
- plug-ins: fix cml-explorer to register correctly, a typo in
"run-mode" was never noticed until now.
- Add gimpgpcompat.[ch] in libgimp to deal with all the transforms
between old-style wire communication and using GParamSpec and
GValue, it contains some functions that are subject to change or
even removal in the next steps.
- Change the libgimp GimpProcedure and GimpPlugIn in many ways to be
able to actually install procedures the new way.
- plug-ins: change goat-exercise to completely use the new GimpPlugIn
and GimpProcedure API, look here to see how plug-ins will look in
the future, of course subject to change until this is finished.
- Next: changing GPParam to transmit all information about a GValue.
2019-07-27 22:37:55 +08:00
|
|
|
} meta;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
2019-08-05 05:59:25 +08:00
|
|
|
struct _GPParamArray
|
|
|
|
{
|
|
|
|
guint32 size;
|
|
|
|
guint8 *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamStringArray
|
|
|
|
{
|
|
|
|
guint32 size;
|
|
|
|
gchar **data;
|
|
|
|
};
|
|
|
|
|
2019-09-05 17:34:54 +08:00
|
|
|
struct _GPParamIDArray
|
|
|
|
{
|
|
|
|
gchar *type_name;
|
|
|
|
guint32 size;
|
|
|
|
gint32 *data;
|
|
|
|
};
|
|
|
|
|
2019-08-05 05:59:25 +08:00
|
|
|
struct _GPParam
|
|
|
|
{
|
|
|
|
GPParamType param_type;
|
|
|
|
gchar *type_name;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
gint32 d_int;
|
|
|
|
gdouble d_float;
|
|
|
|
gchar *d_string;
|
|
|
|
GimpRGB d_color;
|
|
|
|
GimpParasite d_parasite;
|
|
|
|
GPParamArray d_array;
|
|
|
|
GPParamStringArray d_string_array;
|
2019-09-05 17:34:54 +08:00
|
|
|
GPParamIDArray d_id_array;
|
2019-08-05 06:58:44 +08:00
|
|
|
GPParamDef d_param_def;
|
2019-08-05 05:59:25 +08:00
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
struct _GPProcRun
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
2019-09-09 07:00:54 +08:00
|
|
|
guint32 n_params;
|
1997-11-25 06:05:25 +08:00
|
|
|
GPParam *params;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcReturn
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
2019-09-09 07:00:54 +08:00
|
|
|
guint32 n_params;
|
1997-11-25 06:05:25 +08:00
|
|
|
GPParam *params;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcInstall
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
|
|
|
guint32 type;
|
2019-09-09 07:00:54 +08:00
|
|
|
guint32 n_params;
|
|
|
|
guint32 n_return_vals;
|
1997-11-25 06:05:25 +08:00
|
|
|
GPParamDef *params;
|
|
|
|
GPParamDef *return_vals;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcUninstall
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-03-04 08:24:39 +08:00
|
|
|
void gp_init (void);
|
|
|
|
|
2002-05-17 01:41:38 +08:00
|
|
|
gboolean gp_quit_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_config_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPConfig *config,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_tile_req_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPTileReq *tile_req,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_tile_ack_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_tile_data_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPTileData *tile_data,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_run_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPProcRun *proc_run,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_return_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPProcReturn *proc_return,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_temp_proc_run_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPProcRun *proc_run,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_temp_proc_return_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPProcReturn *proc_return,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_install_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPProcInstall *proc_install,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_uninstall_write (GIOChannel *channel,
|
2006-04-12 18:53:28 +08:00
|
|
|
GPProcUninstall *proc_uninstall,
|
2002-05-17 01:41:38 +08:00
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_extension_ack_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_has_init_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_END_DECLS
|
2000-05-31 07:38:46 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#endif /* __GIMP_PROTOCOL_H__ */
|