gimp/plug-ins/script-fu/libscriptfu
Jehan 231ca0c505 Issue #9994: do not call g_file_info_get_is_hidden() (and others) directly.
This is not the main reason for the specific output in #9994. These ones are
more probably because of similar usage in GTK (which updated its own calls to
g_file_info_get_is_hidden|backup() in version 3.24.38). But we should likely
also update the various calls we have to use the generic
g_file_info_get_attribute_*() variants.

To be fair, it is unclear to me when we can be sure that an attribute is set.
For instance, when we call g_file_enumerate_children() or g_file_query_info()
with specific attributes, docs say that it is still possible for these
attributes to not be set. So I assume it means we should never use direct
accessor functions.

The only exception is that I didn't remove usage of g_file_info_get_name(),
since its docs says:

> * Gets a display name for a file. This is guaranteed to always be set.

Even though it also says just after:

> * It is an error to call this if the #GFileInfo does not contain
> * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

Which is very contradictory. But assuming that this error warning was
over-zealous documentation, I kept the direct accessors since they are supposed
to be slightly more optimized (still according to in-code documentation) so
let's priorize them when we know they are set for sure.
2023-09-19 15:34:48 +02:00
..
ftx Remove autotools 2023-05-27 00:03:52 +02:00
tinyscheme tinyscheme: enhance: rearrange error msg so error kind is stable prefix 2023-09-06 06:37:29 -04:00
README ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
meson.build ScriptFu: Extract function marshal_returned_PDB_value 2023-09-12 15:02:15 +00:00
scheme-marshal-return.c ScriptFu: change binding of resource from string to int 2023-09-15 11:02:46 +00:00
scheme-marshal-return.h ScriptFu: extract function marshall_pdb_return 2023-09-12 15:02:15 +00:00
scheme-marshal.c Introduce a global ID space for GimpData/GimpResource objects 2023-05-31 16:12:04 +02:00
scheme-marshal.h ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
scheme-wrapper.c ScriptFu: change binding of resource from string to int 2023-09-15 11:02:46 +00:00
scheme-wrapper.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-arg.c script-fu: fix out-of-bounds array access 2023-07-11 12:04:24 -04:00
script-fu-arg.h ScriptFu: Extract informal class SFArg from script-fu-script.c 2022-07-04 08:28:19 +00:00
script-fu-command.c Issue #8744: refactor overdependence on gimpui.h 2022-10-15 15:17:08 +00:00
script-fu-command.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-compat.c plug-ins: gimp-plug-in-domain-register PDB procedure doesn't exist… 2022-07-06 16:14:03 +02:00
script-fu-compat.h ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu-dialog.c script-fu: fix double free in script-fu-dialog.c 2023-05-24 21:35:48 +02:00
script-fu-dialog.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-enums.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-errors.c ScriptFu: delete unneeded #define G_LOG_DOMAIN 2022-06-30 13:44:07 -04:00
script-fu-errors.h ScriptFu: delete unneeded #define G_LOG_DOMAIN 2022-06-30 13:44:07 -04:00
script-fu-interface.c Enhance #9532 elide "Script-Fu" from SF plugin dialog title 2023-08-20 20:44:04 +00:00
script-fu-interface.h ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu-intl.h ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu-lib.c Issue #8744: refactor overdependence on gimpui.h 2022-10-15 15:17:08 +00:00
script-fu-lib.h ScriptFu: Add script-fu-interpreter akin to other interpreters 2022-06-30 13:39:45 +00:00
script-fu-proc-factory.c Issue #8744: refactor overdependence on gimpui.h 2022-10-15 15:17:08 +00:00
script-fu-proc-factory.h ScriptFu: Add script-fu-interpreter akin to other interpreters 2022-06-30 13:39:45 +00:00
script-fu-regex.c ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu-regex.h ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu-register.c Fix plugins to use new GimpResource. 2023-01-14 17:43:26 +01:00
script-fu-register.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-run-func.c Issue #8744: refactor overdependence on gimpui.h 2022-10-15 15:17:08 +00:00
script-fu-run-func.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-script.c script-fu: Fixed SF_ONE_OR_MORE_DRAWABLE option 2023-06-13 02:51:58 +00:00
script-fu-script.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-scripts.c Issue #9994: do not call g_file_info_get_is_hidden() (and others) directly. 2023-09-19 15:34:48 +02:00
script-fu-scripts.h ScriptFu: script-fu-register-filter for GimpImageProcedure. 2022-08-02 07:45:35 +00:00
script-fu-types.h Fix plugins to use new GimpResource. 2023-01-14 17:43:26 +01:00
script-fu-utils.c ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu-utils.h ScriptFu: build shared libgimp-scriptfu-3.0.so separate from executable script-fu 2022-06-11 08:58:30 -04:00
script-fu.def ScriptFu: Add script-fu-interpreter akin to other interpreters 2022-06-30 13:39:45 +00:00

README

About libscriptfu

libscriptfu is part of GIMP.
It is not generally useful except by GIMP.

The libscriptfu library is used by plugin executables,
and the PDB procedures they create,
all part of the "ScriptFu" machinery.

The libscriptfu library is not intended for third-party developers,
only for core GIMP developers.
Headers for libscriptfu might not be installed.

This directory contains three libraries: libscriptfu, tinyscheme, and ftx.
The tinyscheme library contains a TinyScheme interpreter.
The ftx library extends the TinyScheme interpreter,
adding file functions to the Scheme language.
The libscriptfu library contains both the tinyscheme and ftx libraries.
The libscriptfu library wraps the TinyScheme interpreter,
specializing it for GIMP.
The script-fu executable uses the libscriptfu library,
to interpret Scheme scripts that GIMP users refer to as "plug-ins."

These libraries depend on other libraries, e.g. math, libgimp, glib, etc.

Coupling between the executables and the libraries should be in one direction:
source for the inner libs should not include headers from the outer executables.
This lets you more easily update the inner libraries
(which originated elsewhere and might be maintained elsewhere),
and change the outer executables
(which are subject to change by GIMP developers.)

Example (which may change):
The script-fu executable is a plugin file that implements PDB procedures:
extension-script-fu, script-fu-console, script-fu-text-console, script-fu-eval,
and script-fu-server.
Each of those PDB procedures runs as a separate process.
Each of those processes uses libscriptfu.
The main PDB procedure is extension-script-fu, which is a long-lived process.
It is a PDB procedure of PDBProcedureType EXTENSION.
It interprets the Scheme scripts that user's call "plug-ins."

Rarely two of the PDB procedure processes run concurrently.
When they do, and libscriptfu is built as a shared library,
the read-only, code portion of the library is only loaded in memory once.