mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
Compare commits
92 Commits
bug373060-
...
740f5013b8
Author | SHA1 | Date | |
---|---|---|---|
|
740f5013b8 | ||
|
182aa67ce1 | ||
|
d8d73266bc | ||
|
356c2baec5 | ||
|
aea7042aa1 | ||
|
97944a5415 | ||
|
a5182a010f | ||
|
9c2c5ff183 | ||
|
f09007507f | ||
|
2b91551f4e | ||
|
cbe56ff388 | ||
|
7cec3f52b9 | ||
|
81c67e5614 | ||
|
67fa72a94e | ||
|
6587256c3a | ||
|
ad9dbf2c8b | ||
|
2f0bfc569b | ||
|
36330a271a | ||
|
baa4825880 | ||
|
8c910c2b6b | ||
|
a025cfe41b | ||
|
41035c7589 | ||
|
7275569079 | ||
|
dfafb7c6f2 | ||
|
25d1b7f8c3 | ||
|
0edf615333 | ||
|
daf23e1a50 | ||
|
b633b4b9c7 | ||
|
cfa3fd6bb7 | ||
|
669685d1d8 | ||
|
f032153596 | ||
|
13639b1d3d | ||
|
eb0bfe7bdb | ||
|
393ca59e79 | ||
|
3a698a05a1 | ||
|
f4a7da1ee3 | ||
|
bb9d8df855 | ||
|
78e68efd06 | ||
|
2fa82d51ee | ||
|
f223dae9fe | ||
|
9daf5d2e5d | ||
|
789af76a32 | ||
|
f9ba343558 | ||
|
014aa5ae6f | ||
|
47eac319b1 | ||
|
3bde6195f6 | ||
|
b0689f565b | ||
|
1e46438ced | ||
|
2b32496195 | ||
|
de62139894 | ||
|
f774ad7f16 | ||
|
f53a843c3d | ||
|
46d9a09698 | ||
|
355d695607 | ||
|
714e9041d8 | ||
|
24c8f86c85 | ||
|
f50145c155 | ||
|
7f8298467b | ||
|
23a9758a7b | ||
|
0af9261980 | ||
|
77d25750a7 | ||
|
155e951fa6 | ||
|
5a22a9b931 | ||
|
2187f0a49c | ||
|
91418131a0 | ||
|
645d23cd37 | ||
|
28fa2e5fc7 | ||
|
c13bf1af19 | ||
|
9337c55599 | ||
|
947995248a | ||
|
abcfbfbca5 | ||
|
b121ddd6f8 | ||
|
ba1de3b68e | ||
|
6552e3200d | ||
|
4d97212cf9 | ||
|
54b64252df | ||
|
c79db4c15a | ||
|
cecb937a0b | ||
|
fe4dbeb911 | ||
|
fdb4111e3f | ||
|
72533aaf8e | ||
|
ccc4eacac3 | ||
|
8e9b7bfce6 | ||
|
17552c0e11 | ||
|
f428089947 | ||
|
6260590cf4 | ||
|
c5e77fb8bb | ||
|
b50781730c | ||
|
2b669917c2 | ||
|
7d22110cfb | ||
|
86cc15cbf0 | ||
|
865e6363e1 |
267
.gitlab-ci.yml
267
.gitlab-ci.yml
@@ -13,7 +13,7 @@ spec:
|
||||
test_pipeline:
|
||||
description: 'Pipelines used only for testing'
|
||||
options:
|
||||
- GIMP_CI_MESON_GCC #trigger the Debian GCC build (rare usefulness)
|
||||
- GIMP_CI_MESON_CLANG #trigger the Debian Clang build (rare usefulness)
|
||||
- GIMP_CI_RASTER_ICONS #trigger the Debian Clang build without vector icons (rare usefulness)
|
||||
- GIMP_CI_CPPCHECK #trigger cppcheck (static code analysis)
|
||||
- none
|
||||
@@ -30,7 +30,7 @@ workflow:
|
||||
##################################################
|
||||
|
||||
## 1. On MERGE REQUESTS, the following are triggered:
|
||||
## - Abbreviated Linux Clang build
|
||||
## - Abbreviated Linux build
|
||||
## - Building quality tests (static code analysis)
|
||||
## - clang-format (static code analysis)
|
||||
## - Execution tests (dynamic code analysis)
|
||||
@@ -44,7 +44,7 @@ workflow:
|
||||
# GitLab is quite sensitive about rules 'if' order so be careful
|
||||
|
||||
## 3. On COMMITS except tags.
|
||||
## - Linux Clang build
|
||||
## - Linux build
|
||||
## - Building quality tests (static code analysis)
|
||||
## - Execution tests (dynamic code analysis)
|
||||
## - Source tarball
|
||||
@@ -84,6 +84,7 @@ workflow:
|
||||
image: $CI_REGISTRY_IMAGE:build-debian-${DEB_VERSION}-${RUNNER}
|
||||
variables:
|
||||
DEB_VERSION: "bookworm"
|
||||
UMFPACK: libumfpack5
|
||||
RUNNER: "x86_64_v3"
|
||||
# Common cloning procedure
|
||||
GIT_DEPTH: "1"
|
||||
@@ -102,27 +103,30 @@ stages:
|
||||
- analysis
|
||||
- distribution
|
||||
|
||||
## AppImage CI (Debian) ##
|
||||
.debian:
|
||||
|
||||
## Common GNU/Linux 64-bit CI (Debian) ##
|
||||
.debian-nonreloc:
|
||||
extends: .default
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
variables: {}
|
||||
- if: '$GIMP_CI_MESON_CLANG != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_CLANG.*/'
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
CC_LD: lld
|
||||
CXX_LD: lld
|
||||
TOOLCHAIN: "clang lld"
|
||||
VARIANT: -clang
|
||||
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
|
||||
variables:
|
||||
MESON_OPTIONS: "-Dvector-icons=false"
|
||||
VARIANT: "-raster"
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: [aarch64, x86_64_v3]
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
CC: "clang"
|
||||
CXX: "clang++"
|
||||
CC_LD: lld
|
||||
CXX_LD: lld
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install-${RUNNER}"
|
||||
timeout: 20m
|
||||
timeout: 30m
|
||||
|
||||
.debian_environ: &ENVIRON
|
||||
# See: https://testing.developer.gimp.org/core/setup/build/#preparing-for-building
|
||||
@@ -138,13 +142,12 @@ stages:
|
||||
- export GI_TYPELIB_PATH="${GIMP_PREFIX}/${LIB_DIR}/${LIB_SUBDIR}girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
|
||||
- printf "\e[0Ksection_end:`date +%s`:environ\r\e[0K\n"
|
||||
|
||||
deps-debian:
|
||||
extends: .debian
|
||||
deps-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
stage: dependencies
|
||||
image: quay.io/buildah/stable
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
script:
|
||||
- export BUILDAH_FORMAT=docker
|
||||
- export STORAGE_DRIVER=vfs
|
||||
@@ -158,16 +161,15 @@ deps-debian:
|
||||
- echo "RUN apt-get install -qq -y --no-install-recommends ca-certificates" >> Dockerfile
|
||||
## Build-time only dependencies
|
||||
- echo "RUN apt-get install -qq -y --no-install-recommends \\" >> Dockerfile
|
||||
- echo "appstream
|
||||
- echo "${TOOLCHAIN:-build-essential}
|
||||
appstream
|
||||
bison
|
||||
clang
|
||||
desktop-file-utils
|
||||
flex
|
||||
gi-docgen
|
||||
git
|
||||
gobject-introspection
|
||||
libgtk-3-bin
|
||||
lld
|
||||
meson
|
||||
valac
|
||||
xsltproc" >> Dockerfile
|
||||
@@ -194,6 +196,7 @@ deps-debian:
|
||||
libgtk-3-dev
|
||||
libgudev-1.0-dev
|
||||
libheif-dev
|
||||
$LIBHEIF_PLUGINS
|
||||
libjson-glib-dev
|
||||
libjxl-dev
|
||||
liblcms2-dev
|
||||
@@ -209,7 +212,7 @@ deps-debian:
|
||||
librsvg2-dev
|
||||
libsuitesparse-dev
|
||||
libtiff-dev
|
||||
libumfpack5
|
||||
$UMFPACK
|
||||
libunwind-dev
|
||||
libwebp-dev
|
||||
libwmf-dev
|
||||
@@ -226,10 +229,12 @@ deps-debian:
|
||||
- echo "RUN printf \"\e[0Ksection_start:`date +%s`:environ[collapsed=true]\r\e[0KPreparing build environment\n\"" >> Dockerfile2;
|
||||
- echo "ENV PKG_CONFIG_PATH=\"${GIMP_PREFIX}/lib/$([ "$(uname -m)" = 'aarch64' ] && echo "aarch64-linux-gnu/" || echo "x86_64-linux-gnu/")pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}\"" >> Dockerfile2;
|
||||
- echo "ENV XDG_DATA_DIRS=\"${GIMP_PREFIX}/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}\"" >> Dockerfile2;
|
||||
- echo "ENV CC=\"$CC\"" >> Dockerfile2;
|
||||
- echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
|
||||
- echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
|
||||
- echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
|
||||
- if [ "$VARIANT" = "-clang" ]; then
|
||||
echo "ENV CC=\"$CC\"" >> Dockerfile2;
|
||||
echo "ENV CXX=\"$CXX\"" >> Dockerfile2;
|
||||
echo "ENV CC_LD=\"$CC_LD\"" >> Dockerfile2;
|
||||
echo "ENV CXX_LD=\"$CXX_LD\"" >> Dockerfile2;
|
||||
fi
|
||||
- echo "ENV CLICOLOR_FORCE=\"1\"" >> Dockerfile2;
|
||||
- echo "RUN printf \"\e[0Ksection_end:`date +%s`:environ\r\e[0K\n\"" >> Dockerfile2;
|
||||
# Build some dependencies
|
||||
@@ -259,11 +264,88 @@ deps-debian:
|
||||
- gegl/_build-${RUNNER}/config.h
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
needs: ["deps-debian-nonreloc"]
|
||||
stage: build
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- *ENVIRON
|
||||
# Check building
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
|
||||
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
|
||||
-Dfile-plug-ins-test=true
|
||||
$MESON_OPTIONS
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
|
||||
# Check execution
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
|
||||
- ninja test
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
|
||||
# Check source
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
|
||||
- if [ $(git diff |wc -l) -ne 0 ]; then
|
||||
printf "ERROR. A generated file was updated without the source:\n";
|
||||
git diff;
|
||||
exit 1;
|
||||
fi
|
||||
- if [ "$VARIANT" != "-clang" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
|
||||
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
|
||||
fi
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
|
||||
# Check install
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
|
||||
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-${RUNNER}/
|
||||
- _build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- _build-${RUNNER}/meson-dist/
|
||||
- _build-${RUNNER}/config.h
|
||||
reports:
|
||||
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## AppImage CI (Debian) ##
|
||||
.debian:
|
||||
extends: .debian-nonreloc
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*Package:AppImage.*/'
|
||||
interruptible: true
|
||||
- if: '$GIMP_CI_APPIMAGE != null || "$[[ inputs.distribution_pipeline ]]" =~ /.*GIMP_CI_APPIMAGE.*/'
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: [aarch64, x86_64_v3]
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
#FIXME: remove this variables: key and go back to relying on .default DEB_VERSION on GIMP 3.3/3.4
|
||||
DEB_VERSION: "trixie"
|
||||
UMFPACK: libumfpack6
|
||||
LIBHEIF_PLUGINS: "libheif-plugin-dav1d libheif-plugin-aomenc libheif-plugin-libde265 libheif-plugin-x265 libheif-plugin-j2kdec libheif-plugin-j2kenc"
|
||||
|
||||
deps-debian:
|
||||
extends: .debian
|
||||
stage: !reference [deps-debian-nonreloc, stage]
|
||||
image: !reference [deps-debian-nonreloc, image]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
script:
|
||||
- !reference [deps-debian-nonreloc, script]
|
||||
artifacts: !reference [deps-debian-nonreloc, artifacts]
|
||||
|
||||
gimp-debian:
|
||||
extends: .debian
|
||||
needs: ["deps-debian"]
|
||||
stage: build
|
||||
stage: !reference [gimp-debian-nonreloc, stage]
|
||||
variables:
|
||||
#FIXME: remove this variables: key and go back to relying on gimp-debian-nonreloc variables: on GIMP 3.3/3.4
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
script:
|
||||
- *ENVIRON
|
||||
@@ -293,85 +375,6 @@ gimp-debian:
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## GNU/Linux 64-bit CIs (Debian) ##
|
||||
.debian-nonreloc:
|
||||
extends: .debian
|
||||
rules:
|
||||
- <<: *CI_MERGE
|
||||
- <<: *CI_COMMIT
|
||||
variables: {}
|
||||
- if: '$GIMP_CI_MESON_GCC != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_MESON_GCC.*/'
|
||||
variables:
|
||||
CC: "cc"
|
||||
CXX: "c++"
|
||||
CC_LD: bfd
|
||||
CXX_LD: bfd
|
||||
VARIANT: "-gcc"
|
||||
- if: '$GIMP_CI_RASTER_ICONS != null || "$[[ inputs.test_pipeline ]]" =~ /.*GIMP_CI_RASTER_ICONS.*/'
|
||||
variables:
|
||||
MESON_OPTIONS: "-Dvector-icons=false"
|
||||
VARIANT: "-raster"
|
||||
- <<: *CI_RELEASE
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: x86_64_v3
|
||||
tags: []
|
||||
|
||||
deps-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
stage: !reference [deps-debian, stage]
|
||||
image: !reference [deps-debian, image]
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
script:
|
||||
- !reference [deps-debian, script]
|
||||
artifacts: !reference [deps-debian, artifacts]
|
||||
|
||||
gimp-debian-nonreloc:
|
||||
extends: .debian-nonreloc
|
||||
needs: ["deps-debian-nonreloc"]
|
||||
stage: !reference [gimp-debian, stage]
|
||||
variables: !reference [gimp-debian, variables]
|
||||
script:
|
||||
- *ENVIRON
|
||||
# Check building
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_build[collapsed=true]\r\e[0KBuilding GIMP\n"
|
||||
- meson setup _build-${RUNNER} -Dprefix="${GIMP_PREFIX}"
|
||||
-Dfile-plug-ins-test=true
|
||||
$MESON_OPTIONS
|
||||
- cd _build-${RUNNER}
|
||||
- ninja
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_build\r\e[0K\n"
|
||||
# Check execution
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_test[collapsed=true]\r\e[0KTesting GIMP execution\n"
|
||||
- ninja test
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_test\r\e[0K\n"
|
||||
# Check source
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_tar[collapsed=true]\r\e[0KChecking GIMP source\n"
|
||||
- if [ $(git diff |wc -l) -ne 0 ]; then
|
||||
printf "ERROR. A generated file was updated without the source:\n";
|
||||
git diff;
|
||||
exit 1;
|
||||
fi
|
||||
- if [ "$VARIANT" != "-gcc" ] && [ "$VARIANT" != "-raster" ] && [ "$CI_PIPELINE_SOURCE" != "merge_request_event" ]; then
|
||||
ninja dist > ninja_dist.log 2>&1 || { cat ninja_dist.log; exit 1; };
|
||||
fi
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_tar\r\e[0K\n"
|
||||
# Check install
|
||||
- printf "\e[0Ksection_start:`date +%s`:gimp_install[collapsed=true]\r\e[0KChecking GIMP installation\n"
|
||||
- ninja install > ninja_install.log 2>&1 || { cat ninja_install.log; exit 1; };
|
||||
- printf "\e[0Ksection_end:`date +%s`:gimp_install\r\e[0K\n"
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-${RUNNER}/
|
||||
- _build-${RUNNER}/meson-logs/meson-log.txt
|
||||
- _build-${RUNNER}/meson-dist/
|
||||
- _build-${RUNNER}/config.h
|
||||
reports:
|
||||
junit: "_build-${RUNNER}/meson-logs/testlog.junit.xml"
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
## Flatpak CI (Fedora) ##
|
||||
.flatpak:
|
||||
extends: .default
|
||||
@@ -392,7 +395,7 @@ gimp-debian-nonreloc:
|
||||
MESON_DIST: 0
|
||||
before_script:
|
||||
- export GIMP_PREFIX="${CI_PROJECT_DIR}/_install"
|
||||
timeout: 90m
|
||||
timeout: 30m
|
||||
|
||||
deps-flatpak:
|
||||
extends: .flatpak
|
||||
@@ -401,8 +404,7 @@ deps-flatpak:
|
||||
- sh build/linux/flatpak/1_build-deps-flatpakbuilder.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- _build-$RUNNER.tar
|
||||
- flatpak-builder.log
|
||||
- _build-$RUNNER.tar.zst
|
||||
- babl-meson-log.tar
|
||||
- gegl-meson-log.tar
|
||||
expire_in: 2 hours
|
||||
@@ -440,7 +442,7 @@ gimp-flatpak:
|
||||
variables:
|
||||
SNAPCRAFT_BASE_VERSION: "8_core24"
|
||||
RUNNER: x86_64_v3
|
||||
timeout: 20m
|
||||
timeout: 30m
|
||||
|
||||
deps-snap:
|
||||
extends: .snap
|
||||
@@ -530,10 +532,7 @@ gimp-snap:
|
||||
STORE_OPTION: '-Dms-store=true'
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: windows-aarch64
|
||||
MSYSTEM_PREFIX: clangarm64
|
||||
- RUNNER: win32-ps
|
||||
MSYSTEM_PREFIX: clang64
|
||||
- RUNNER: [windows-aarch64, win32-ps]
|
||||
tags:
|
||||
- $RUNNER
|
||||
variables:
|
||||
@@ -541,9 +540,9 @@ gimp-snap:
|
||||
#meson.build forces non-relocatable .pc. See: https://github.com/mesonbuild/meson/issues/14346
|
||||
PKGCONF_RELOCATABLE_OPTION: '-Dpkgconfig.relocatable=true'
|
||||
before_script:
|
||||
# FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
|
||||
- $GIMP_PREFIX = "$PWD\_install-$MSYSTEM_PREFIX".Replace('\', '/')
|
||||
timeout: 40m
|
||||
- if (-not $env:MSYSTEM_PREFIX) { $env:MSYSTEM_PREFIX = if ((Get-WmiObject Win32_ComputerSystem).SystemType -like 'ARM64*') { 'clangarm64' } else { 'clang64' }}
|
||||
- $GIMP_PREFIX = "$PWD\_install-$env:MSYSTEM_PREFIX"
|
||||
timeout: 30m
|
||||
|
||||
.win_environ: &WIN_ENVIRON
|
||||
# See: https://testing.developer.gimp.org/core/setup/build/windows/#prepare-for-building
|
||||
@@ -563,9 +562,9 @@ deps-win:
|
||||
- build\windows\1_build-deps-msys2.ps1
|
||||
artifacts:
|
||||
paths:
|
||||
- _install-$MSYSTEM_PREFIX/
|
||||
- babl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
||||
- gegl/_build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
||||
- _install-*/
|
||||
- babl/_build-*/meson-logs/meson-log.txt
|
||||
- gegl/_build-*/meson-logs/meson-log.txt
|
||||
expire_in: 2 hours
|
||||
|
||||
gimp-win:
|
||||
@@ -581,14 +580,14 @@ gimp-win:
|
||||
- build\windows\2_build-gimp-msys2.ps1
|
||||
artifacts:
|
||||
paths:
|
||||
- gimp-$MSYSTEM_PREFIX/
|
||||
- _build-$MSYSTEM_PREFIX/meson-logs/meson-log.txt
|
||||
- _build-$MSYSTEM_PREFIX/done-dll.list
|
||||
- gimp-*/
|
||||
- _build-*/meson-logs/meson-log.txt
|
||||
- _build-*/done-dll.list
|
||||
# Needed by dist-installer-weekly and dist-store-weekly
|
||||
- _build-$MSYSTEM_PREFIX/config.h
|
||||
- _build-$MSYSTEM_PREFIX/plug-ins/file_associations.list
|
||||
- _build-$MSYSTEM_PREFIX/build/windows/installer/
|
||||
- _build-$MSYSTEM_PREFIX/build/windows/store/
|
||||
- _build-*/config.h
|
||||
- _build-*/plug-ins/file_associations.list
|
||||
- _build-*/build/windows/installer/
|
||||
- _build-*/build/windows/store/
|
||||
expire_in: 2 days
|
||||
|
||||
|
||||
@@ -597,12 +596,10 @@ gimp-win:
|
||||
extends: .win
|
||||
parallel:
|
||||
matrix:
|
||||
- RUNNER: win32-ps
|
||||
MSYSTEM_PREFIX: mingw32
|
||||
- RUNNER: [win32-ps]
|
||||
variables:
|
||||
MSYSTEM_PREFIX: mingw32
|
||||
MINGW_PACKAGE_PREFIX: mingw-w64-i686
|
||||
CC: cc
|
||||
CXX: c++
|
||||
|
||||
deps-win-eol:
|
||||
extends: .win-eol
|
||||
|
@@ -24,7 +24,7 @@ https://gitlab.gnome.org/GNOME/gimp/-/issues/?sort=updated_desc&state=all&label_
|
||||
- "Be considerate and respectful". This is our main rule.
|
||||
E.g. avoid negative emotional writing which only generates more upsetting
|
||||
interactions.
|
||||
- Stay on topic by writting only one bug per report created.
|
||||
- Stay on topic by writing only one bug per report created.
|
||||
- Add full (not cropped) screenshots or other files using the clip button on GitLab. -->
|
||||
|
||||
### Reproduction
|
||||
|
@@ -12,4 +12,4 @@
|
||||
Only human created works please!
|
||||
|
||||
- You can request the devs to allow installable packages to be
|
||||
generated from this MR by writting ~Package: in the comments -->
|
||||
generated from this MR by writing ~Package: in the comments -->
|
||||
|
@@ -201,7 +201,7 @@ help in that regard:
|
||||
* HEIC: e.g. libde265 and libx265 support (for
|
||||
respectively decoding and encoding of HEVC).
|
||||
* AVIF: e.g. libaom decoder and encoder (for AV1 encoding and
|
||||
decoding), prefered over rav1e.
|
||||
decoding), preferred over rav1e.
|
||||
* HEJ2: OpenJPEG (for JPEG2000 inside HEIF).
|
||||
|
||||
If you don't compile libheif with the correct flags (see libheif
|
||||
@@ -489,5 +489,5 @@ reconfiguration:
|
||||
% ninja reconfigure
|
||||
|
||||
Verify that the optional features you wanted are now shown as `true`,
|
||||
otherwise follow similar advices than above to make sure they are
|
||||
otherwise follow similar advice as above to make sure they are
|
||||
visible to your setup.
|
||||
|
45
NEWS
45
NEWS
@@ -11,21 +11,26 @@ Overview of Changes from GIMP 3.1.4 to GIMP 3.2-RC1
|
||||
|
||||
Core:
|
||||
|
||||
- Improve Export to SVG of paths by not exporting the DTD and adding
|
||||
an explicit SVG version.
|
||||
- macOS: "Quit" from the dock's right-click menu will now follow our
|
||||
standard Quit procedure, by intercepting the
|
||||
applicationShouldTerminate signal, instead of forcing the
|
||||
application to close (hence losing unsaved changes).
|
||||
- "Add Layer Mask" will now have an "Edit mask immediately" checkbox
|
||||
allowing to decide whether to go into Edit Mask state or not. This
|
||||
setting is saved across repetitive actions, as all other settings in
|
||||
this dialog.
|
||||
|
||||
Graphical User Interface:
|
||||
|
||||
- "Monitor Linked Image" and "Discard Link Information" menu items
|
||||
added to Layer menu when the selected layer is a link layer.
|
||||
- Palette Import dialog now display file format filters, both to let
|
||||
users hide irrelevant files from view and to highlight which formats
|
||||
we support.
|
||||
- The GimpColorHexEntry will now update the chosen color as you type.
|
||||
- Use a standard, yet extended, AppMenu on macOS.
|
||||
|
||||
Plug-Ins:
|
||||
|
||||
- Fixed vulnerabilities: ZDI-CAN-27684, ZDI-CAN-27863, ZDI-CAN-27878,
|
||||
ZDI-CAN-27836, ZDI-CAN-27823, ZDI-CAN-27793
|
||||
- file-compressor: add zip decompression support. This allows support
|
||||
for .hgt.zip files, as well as other formats compressed with zip.
|
||||
|
||||
API:
|
||||
|
||||
@@ -58,15 +63,23 @@ API:
|
||||
* gimp_vector_layer_set_stroke_miter_limit
|
||||
* gimp_vector_layer_set_stroke_width
|
||||
* gimp_vector_layer_set_stroke_width_unit
|
||||
|
||||
|
||||
Build:
|
||||
|
||||
- CI:
|
||||
* Linux builds ported from unmaintained Kaniko to Buildah.
|
||||
* Colored output and .pdb support for builds of dependency using
|
||||
CMake.
|
||||
* Ability to apply remote patches on dependency builds.
|
||||
* gimp_item_is_vector_layer
|
||||
* gimp_item_id_is_link_layer
|
||||
* gimp_item_is_link_layer
|
||||
* gimp_link_layer_discard
|
||||
* gimp_link_layer_get_by_id
|
||||
* gimp_link_layer_get_file
|
||||
* gimp_link_layer_get_type
|
||||
* gimp_link_layer_monitor
|
||||
* gimp_link_layer_new
|
||||
* gimp_link_layer_set_file
|
||||
* gimp_param_link_layer_get_type
|
||||
* gimp_param_spec_link_layer
|
||||
* gimp_procedure_add_link_layer_argument
|
||||
* gimp_procedure_add_link_layer_aux_argument
|
||||
* gimp_procedure_add_link_layer_return_value
|
||||
* gimp_link_layer_get_mime_type
|
||||
- New libgimp class: GimpLinkLayer
|
||||
|
||||
|
||||
Overview of Changes from GIMP 3.1.2 to GIMP 3.1.4
|
||||
|
@@ -307,13 +307,8 @@ gint n_dialogs_dockable_actions = G_N_ELEMENTS (dialogs_dockable_actions);
|
||||
static const GimpStringActionEntry dialogs_toplevel_actions[] =
|
||||
{
|
||||
{ "dialogs-preferences", GIMP_ICON_PREFERENCES_SYSTEM,
|
||||
#if defined(PLATFORM_OSX)
|
||||
NC_("dialogs-action", "_Settings..."),
|
||||
NC_("dialogs-action", "_Settings..."),
|
||||
#else
|
||||
NC_("dialogs-action", "_Preferences"),
|
||||
NC_("dialogs-action", "_Preferences"),
|
||||
#endif
|
||||
{ NULL },
|
||||
NC_("dialogs-action", "Open the preferences dialog"),
|
||||
"gimp-preferences-dialog",
|
||||
@@ -360,8 +355,6 @@ static const GimpStringActionEntry dialogs_toplevel_actions[] =
|
||||
{ "dialogs-about", GIMP_ICON_HELP_ABOUT,
|
||||
#if defined(G_OS_WIN32)
|
||||
NC_("dialogs-action", "About GIMP"),
|
||||
#elif defined(PLATFORM_OSX)
|
||||
NC_("dialogs-action", "About"),
|
||||
#else /* UNIX: use GNOME HIG */
|
||||
NC_("dialogs-action", "_About"),
|
||||
#endif
|
||||
|
@@ -720,6 +720,12 @@ edit_paste (GimpDisplay *display,
|
||||
{
|
||||
gimp_image_set_selected_layers (image, pasted_layers);
|
||||
|
||||
for (GList *iter = pasted_layers; iter; iter = iter->next)
|
||||
{
|
||||
if (GIMP_IS_DRAWABLE (iter->data))
|
||||
gimp_drawable_enable_resize_undo (GIMP_DRAWABLE (iter->data));
|
||||
}
|
||||
|
||||
g_list_free (pasted_layers);
|
||||
gimp_image_flush (image);
|
||||
}
|
||||
|
@@ -824,7 +824,7 @@ filters_actions_setup (GimpActionGroup *group)
|
||||
* operations end up generating the same action name. Typically we
|
||||
* don't want a third-party operation called "my-op" to have the same
|
||||
* action name than "my_op" (which is to say that one will be
|
||||
* overrided by the other).
|
||||
* overridden by the other).
|
||||
*/
|
||||
g_free (action_name);
|
||||
action_name = g_strdup_printf ("filters-%s-%d", formatted_op_name, i++);
|
||||
|
@@ -1764,7 +1764,7 @@ layers_mask_show_cmd_callback (GimpAction *action,
|
||||
{
|
||||
/* if switching "show mask" on, and any selected layer's
|
||||
* mask is already visible, bail out because that's
|
||||
* exactly the logic we use in the ui for multile
|
||||
* exactly the logic we use in the ui for multiple
|
||||
* visible layer masks.
|
||||
*/
|
||||
return;
|
||||
@@ -1815,7 +1815,7 @@ layers_mask_disable_cmd_callback (GimpAction *action,
|
||||
{
|
||||
/* if switching "disable mask" on, and any selected
|
||||
* layer's mask is already disabled, bail out because
|
||||
* that's exactly the logic we use in the ui for multile
|
||||
* that's exactly the logic we use in the ui for multiple
|
||||
* disabled layer masks.
|
||||
*/
|
||||
return;
|
||||
|
@@ -101,6 +101,6 @@ libappactions = static_library('appactions',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Actions"',
|
||||
dependencies: [
|
||||
gegl, gdk_pixbuf, gtk3,
|
||||
gegl, gdk_pixbuf, gtk3, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -44,7 +44,7 @@ libappconfig = static_library('appconfig',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Config"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, gio, gio_specific, libmypaint,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, gio, gio_specific, libmypaint,
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -353,7 +353,7 @@ gimp_transform_resize_crop (const GimpVector2 *orig_points,
|
||||
|
||||
if (r.area == 0)
|
||||
{
|
||||
/* saveguard if something went wrong, adjust and give warning */
|
||||
/* safeguard if something went wrong, adjust and give warning */
|
||||
gimp_transform_resize_adjust (orig_points, n_points,
|
||||
x1, y1, x2, y2);
|
||||
g_printerr ("no rectangle found by algorithm, no cropping done\n");
|
||||
|
@@ -605,7 +605,7 @@ gimp_get_fill_params (GimpContext *context,
|
||||
* @start_y:
|
||||
* @end_x:
|
||||
* @end_y:
|
||||
* @n_snap_lines: Number evenly disributed lines to snap to.
|
||||
* @n_snap_lines: Number evenly distributed lines to snap to.
|
||||
* @offset_angle: The angle by which to offset the lines, in degrees.
|
||||
* @xres: The horizontal resolution.
|
||||
* @yres: The vertical resolution.
|
||||
|
@@ -271,7 +271,7 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
||||
break;
|
||||
|
||||
case PIPE_SELECT_ANGULAR:
|
||||
/* Coords angle is already nomalized,
|
||||
/* Coords angle is already normalized,
|
||||
* offset by 90 degrees is still needed
|
||||
* because hoses were made PS compatible*/
|
||||
ix = (gint) RINT ((1.0 - current_coords->direction + 0.25) * pipe->rank[i]) % pipe->rank[i];
|
||||
|
@@ -152,7 +152,7 @@ gimp_id_table_insert (GimpIdTable *id_table, gpointer data)
|
||||
* @data: The data to associate with the id
|
||||
*
|
||||
* Insert data in the id table with a specific ID. If data already
|
||||
* exsts with the given ID, this function fails.
|
||||
* exists with the given ID, this function fails.
|
||||
*
|
||||
* Returns: The used ID if successful, -1 if it was already in use.
|
||||
**/
|
||||
|
@@ -3012,7 +3012,7 @@ gimp_image_get_xcf_version (GimpImage *image,
|
||||
/* The blending space variant corresponding to SPACE_RGB_PERCEPTUAL in <3.0
|
||||
* corresponds to R'G'B'A which is NON_LINEAR in babl. Perceptual in babl is
|
||||
* R~G~B~A, >= 3.0 the code, comments and usage matches the existing enum value
|
||||
* as being NON_LINEAR and new layers created use the new interger value for
|
||||
* as being NON_LINEAR and new layers created use the new integer value for
|
||||
* PERCEPTUAL.
|
||||
*/
|
||||
version = MAX (23, version);
|
||||
@@ -3166,7 +3166,7 @@ gimp_image_get_xcf_version (GimpImage *image,
|
||||
|
||||
/* Note: user unit storage was changed in XCF 21, but we can still
|
||||
* easily save older XCF (we use the unit name for both singular and
|
||||
* plural forms). Therefore we don't bump the XCF version unecessarily
|
||||
* plural forms). Therefore we don't bump the XCF version unnecessarily
|
||||
* and don't add any test.
|
||||
*/
|
||||
|
||||
|
@@ -76,6 +76,7 @@ struct _GimpLinkPrivate
|
||||
GimpImageBaseType base_type;
|
||||
GimpPrecision precision;
|
||||
GimpPlugInProcedure *load_proc;
|
||||
const gchar *mime_type;
|
||||
};
|
||||
|
||||
static void gimp_link_finalize (GObject *object);
|
||||
@@ -298,8 +299,8 @@ gimp_link_update_buffer (GimpLink *link,
|
||||
{
|
||||
GimpImage *image;
|
||||
GimpPDBStatusType status;
|
||||
const gchar *mime_type = NULL;
|
||||
|
||||
link->p->mime_type = NULL;
|
||||
image = file_open_image (link->p->gimp,
|
||||
gimp_get_user_context (link->p->gimp),
|
||||
progress,
|
||||
@@ -313,7 +314,8 @@ gimp_link_update_buffer (GimpLink *link,
|
||||
*/
|
||||
GIMP_RUN_NONINTERACTIVE,
|
||||
&link->p->is_vector,
|
||||
&status, &mime_type, &real_error);
|
||||
&status, &link->p->mime_type,
|
||||
&real_error);
|
||||
|
||||
if (image && status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
@@ -635,6 +637,14 @@ gimp_link_set_absolute_path (GimpLink *link,
|
||||
link->p->absolute_path = absolute_path;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gimp_link_get_mime_type (GimpLink *link)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_LINK (link), NULL);
|
||||
|
||||
return link->p->mime_type;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_link_freeze (GimpLink *link)
|
||||
{
|
||||
|
@@ -73,6 +73,9 @@ void gimp_link_set_file (GimpLink *layer,
|
||||
gboolean gimp_link_get_absolute_path (GimpLink *link);
|
||||
void gimp_link_set_absolute_path (GimpLink *link,
|
||||
gboolean absolute_path);
|
||||
|
||||
const gchar * gimp_link_get_mime_type (GimpLink *link);
|
||||
|
||||
void gimp_link_freeze (GimpLink *link);
|
||||
void gimp_link_thaw (GimpLink *link);
|
||||
gboolean gimp_link_is_monitored (GimpLink *link);
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayermask.h"
|
||||
#include "gimplinklayer.h"
|
||||
#include "gimppalette.h"
|
||||
#include "gimpparamspecs.h"
|
||||
#include "gimppattern.h"
|
||||
|
@@ -249,9 +249,14 @@ file_open_dialog_open_image (GtkWidget *dialog,
|
||||
|
||||
if (! image && status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
|
||||
{
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
if (error)
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed:\n\n%s"),
|
||||
gimp_file_get_utf8_name (file), error->message);
|
||||
else
|
||||
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
||||
_("Opening '%s' failed."),
|
||||
gimp_file_get_utf8_name (file));
|
||||
g_clear_error (&error);
|
||||
}
|
||||
|
||||
|
@@ -539,16 +539,16 @@ welcome_dialog_create_welcome_page (Gimp *gimp,
|
||||
/* "globe with meridians" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x8c\x90",
|
||||
_("GIMP website"), "https://www.gimp.org/");
|
||||
welcome_add_link (GTK_GRID (grid), 0, &row,
|
||||
/* "graduation cap" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x8e\x93",
|
||||
_("Tutorials"),
|
||||
"https://www.gimp.org/tutorials/");
|
||||
welcome_add_link (GTK_GRID (grid), 0, &row,
|
||||
/* "open book" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x93\x96",
|
||||
_("Documentation"),
|
||||
"https://docs.gimp.org/");
|
||||
welcome_add_link (GTK_GRID (grid), 0, &row,
|
||||
/* "graduation cap" emoticone in UTF-8. */
|
||||
"\xf0\x9f\x8e\x93",
|
||||
_("Community Tutorials"),
|
||||
"https://www.gimp.org/tutorials/");
|
||||
|
||||
/* XXX: should we add API docs for plug-in developers once it's
|
||||
* properly set up? */
|
||||
@@ -1125,10 +1125,19 @@ welcome_dialog_create_release_page (Gimp *gimp,
|
||||
|
||||
tmp = g_strdup_printf (GIMP_VERSION);
|
||||
if (GIMP_MINOR_VERSION % 2 == 0 && ! strstr (tmp, "RC"))
|
||||
release_link = g_strdup_printf ("https://www.gimp.org/release-notes/gimp-%d.%d.html",
|
||||
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
|
||||
{
|
||||
if (GIMP_MICRO_VERSION == 0 && ! strstr (tmp, "RC"))
|
||||
release_link = g_strdup_printf ("https://www.gimp.org/release-notes/gimp-%d.%d.html",
|
||||
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
|
||||
else
|
||||
release_link = g_strdup_printf ("https://www.gimp.org/release/%d.%d.%d/",
|
||||
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION,
|
||||
GIMP_MICRO_VERSION);
|
||||
}
|
||||
else
|
||||
release_link = g_strdup ("https://www.gimp.org/");
|
||||
{
|
||||
release_link = g_strdup ("https://www.gimp.org/");
|
||||
}
|
||||
g_free (tmp);
|
||||
|
||||
widget = gtk_link_button_new_with_label (release_link, _("Learn more"));
|
||||
@@ -1382,7 +1391,7 @@ welcome_dialog_release_item_activated (GtkListBox *listbox,
|
||||
{
|
||||
GList *windows = gimp_get_image_windows (gimp);
|
||||
|
||||
/* Losing forcus on the welcome dialog on purpose for the main GUI
|
||||
/* Losing focus on the welcome dialog on purpose for the main GUI
|
||||
* to be more readable.
|
||||
*/
|
||||
if (windows)
|
||||
|
@@ -246,7 +246,7 @@ gimp_display_shell_scale_get_image_size (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image, after it has
|
||||
* Gets the screen-space bounding box of the image, after it has
|
||||
* been transformed (i.e., scaled, rotated, and scrolled).
|
||||
**/
|
||||
void
|
||||
@@ -290,7 +290,7 @@ gimp_display_shell_scale_get_image_bounds (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image, after it has
|
||||
* Gets the screen-space bounding box of the image, after it has
|
||||
* been scaled and scrolled, but before it has been rotated.
|
||||
**/
|
||||
void
|
||||
@@ -320,7 +320,7 @@ gimp_display_shell_scale_get_image_unrotated_bounds (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image content, after it has
|
||||
* Gets the screen-space bounding box of the image content, after it has
|
||||
* been transformed (i.e., scaled, rotated, and scrolled).
|
||||
**/
|
||||
void
|
||||
@@ -375,7 +375,7 @@ gimp_display_shell_scale_get_image_bounding_box (GimpDisplayShell *shell,
|
||||
* @w:
|
||||
* @h:
|
||||
*
|
||||
* Gets the screen-space boudning box of the image content, after it has
|
||||
* Gets the screen-space bounding box of the image content, after it has
|
||||
* been scaled and scrolled, but before it has been rotated.
|
||||
**/
|
||||
void
|
||||
|
@@ -464,12 +464,10 @@ gimp_image_window_constructed (GObject *object)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
/* Docs says that macOS always returns FALSE but we actually want to create
|
||||
* our custom macOS menu.
|
||||
*/
|
||||
#ifdef GDK_WINDOWING_QUARTZ
|
||||
menus_quartz_app_menu (private->gimp);
|
||||
#else
|
||||
use_app_menu = gtk_application_prefers_app_menu (GTK_APPLICATION (private->gimp->app));
|
||||
#endif /* !GDK_WINDOWING_QUARTZ */
|
||||
|
||||
if (use_app_menu)
|
||||
{
|
||||
@@ -482,6 +480,7 @@ gimp_image_window_constructed (GObject *object)
|
||||
gtk_application_set_app_menu (GTK_APPLICATION (private->gimp->app),
|
||||
G_MENU_MODEL (app_menu_model));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Create the hbox that contains docks and images */
|
||||
private->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
@@ -706,7 +705,7 @@ gimp_image_window_configure_event (GtkWidget *widget,
|
||||
if (GTK_WIDGET_CLASS (parent_class)->configure_event)
|
||||
GTK_WIDGET_CLASS (parent_class)->configure_event (widget, event);
|
||||
|
||||
/* If the window size has changed, make sure additoinal logic is run
|
||||
/* If the window size has changed, make sure additional logic is run
|
||||
* in the display shell's size-allocate
|
||||
*/
|
||||
if (event->width != current_width ||
|
||||
|
@@ -558,7 +558,7 @@ gimp_tool_polygon_fit_segment (GimpToolPolygon *polygon,
|
||||
|
||||
dest_end = &dest_points[n_points - 1];
|
||||
|
||||
/* Transate to origin */
|
||||
/* Translate to origin */
|
||||
gimp_vector2_sub (&origo_translation_offset,
|
||||
&vector2_zero,
|
||||
&dest_points[0]);
|
||||
|
@@ -122,6 +122,6 @@ libappdisplay = static_library('appdisplay',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Display"',
|
||||
dependencies: [
|
||||
gegl, gtk3, cairo,
|
||||
gegl, gtk3, cairo, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -16,6 +16,7 @@ libappfiledata = static_library('appfiledata',
|
||||
cairo,
|
||||
gdk_pixbuf,
|
||||
gegl,
|
||||
gexiv2,
|
||||
libarchive,
|
||||
],
|
||||
)
|
||||
|
@@ -139,7 +139,7 @@ file_open_image (Gimp *gimp,
|
||||
}
|
||||
}
|
||||
|
||||
if (! file_open_valid_permissions (file, error))
|
||||
if (g_file_is_native (file) && ! file_open_valid_permissions (file, error))
|
||||
return NULL;
|
||||
|
||||
if (! file_proc)
|
||||
@@ -248,7 +248,15 @@ file_open_image (Gimp *gimp,
|
||||
{
|
||||
if (image)
|
||||
{
|
||||
/* Only set the load procedure if it hasn't already been set. */
|
||||
/* Only set the load procedure if it hasn't already been set.
|
||||
* The reason is that we want to know the information of the
|
||||
* inner format, in case loading the file went through
|
||||
* intermediate container file formats procedures, typically
|
||||
* the procedures registered by the file-compressor plug-in.
|
||||
*
|
||||
* E.g. it could be used for our compressed XCF, but also for
|
||||
* commonly compressed formats such as .hgt.zip.
|
||||
*/
|
||||
if (! gimp_image_get_load_proc (image))
|
||||
gimp_image_set_load_proc (image, file_proc);
|
||||
|
||||
@@ -789,7 +797,7 @@ file_open_link_image (Gimp *gimp,
|
||||
GIMP_FILE_PROCEDURE_GROUP_OPEN,
|
||||
file, error);
|
||||
|
||||
if (! file_open_valid_permissions (file, error))
|
||||
if (g_file_is_native (file) && ! file_open_valid_permissions (file, error))
|
||||
return NULL;
|
||||
|
||||
if (g_file_is_native (file) && file_proc != NULL)
|
||||
@@ -815,7 +823,9 @@ file_open_link_image (Gimp *gimp,
|
||||
layer = gimp_link_layer_new (image, link);
|
||||
gimp_image_add_layer (image, layer, NULL, 0, FALSE);
|
||||
|
||||
gimp_image_set_load_proc (image, gimp_link_get_load_proc (link));
|
||||
if (! gimp_image_get_load_proc (image))
|
||||
gimp_image_set_load_proc (image, gimp_link_get_load_proc (link));
|
||||
|
||||
file_proc = gimp_image_get_load_proc (image);
|
||||
if (mime_type)
|
||||
*mime_type = g_slist_nth_data (file_proc->mime_types_list, 0);
|
||||
@@ -945,14 +955,11 @@ file_open_file_proc_is_import (GimpPlugInProcedure *file_proc)
|
||||
|
||||
proc_name = gimp_object_get_name (file_proc);
|
||||
|
||||
return (g_strcmp0 (proc_name, "gimp-xcf-load") != 0 &&
|
||||
/* Assuming that all file-compressor file are XCF.
|
||||
* So far, this is always true with current file-compressor
|
||||
* implementation.
|
||||
*/
|
||||
g_strcmp0 (proc_name, "file-gz-load") != 0 &&
|
||||
g_strcmp0 (proc_name, "file-bz2-load") != 0 &&
|
||||
g_strcmp0 (proc_name, "file-xz-load") != 0);
|
||||
/* Even when loading through an intermediate container format plug-in
|
||||
* (e.g. file-compressor), the stored procedure shall be the inner
|
||||
* format.
|
||||
*/
|
||||
return (g_strcmp0 (proc_name, "gimp-xcf-load") != 0);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -11,6 +11,6 @@ libappfile = static_library('appfile',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-File"',
|
||||
dependencies: [
|
||||
gegl, gdk_pixbuf,
|
||||
gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -56,5 +56,6 @@ libappgegl = static_library('appgegl',
|
||||
cairo,
|
||||
gegl,
|
||||
gdk_pixbuf,
|
||||
gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -414,8 +414,30 @@ gimp_check_updates_callback (GObject *source,
|
||||
{
|
||||
gchar *uri = g_file_get_uri (G_FILE (source));
|
||||
|
||||
#ifndef GIMP_CONSOLE_COMPILATION
|
||||
if (error->domain == G_IO_ERROR &&
|
||||
error->code == G_IO_ERROR_NOT_SUPPORTED)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends and need "
|
||||
"to install GVFS?"));
|
||||
#else
|
||||
g_message ("%s: loading of %s failed: %s\n\n%s",
|
||||
G_STRFUNC, uri, error->message,
|
||||
_("Perhaps you are missing GIO backends."));
|
||||
#endif /* G_OS_WIN32 */
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
}
|
||||
#else
|
||||
g_printerr ("%s: loading of %s failed: %s\n", G_STRFUNC,
|
||||
uri, error->message);
|
||||
#endif /* GIMP_CONSOLE_COMPILATION */
|
||||
|
||||
g_free (uri);
|
||||
g_clear_error (&error);
|
||||
|
@@ -220,7 +220,7 @@ icon_themes_current_prefer_symbolic (Gimp *gimp)
|
||||
* override the "prefer-symbolic-icons" property, not only to avoid
|
||||
* discrepancies, but even more to avoid weird cases where we end up using
|
||||
* icons from the system icon theme while the chosen theme has the right icon
|
||||
* (yet simply not in the prefered style). See Issue #9410.
|
||||
* (yet simply not in the preferred style). See Issue #9410.
|
||||
*/
|
||||
if (gtk_icon_theme_has_icon (icon_theme, GIMP_ICON_WILBER) &&
|
||||
! gtk_icon_theme_has_icon (icon_theme, GIMP_ICON_WILBER "-symbolic"))
|
||||
|
@@ -31,7 +31,7 @@ libappgui = static_library('appgui',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-GUI"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, gio_specific, gtk3
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, gio_specific, gtk3
|
||||
],
|
||||
install: false,
|
||||
)
|
||||
|
@@ -805,7 +805,7 @@ language_get_system_lang_id (void)
|
||||
#elif defined PLATFORM_OSX
|
||||
NSString *langs;
|
||||
|
||||
/* In macOS, the user sets a list of prefered languages and the
|
||||
/* In macOS, the user sets a list of preferred languages and the
|
||||
* software respects this preference order. I.e. that just storing the
|
||||
* top-prefered lang would not be enough. What if GIMP didn't have
|
||||
* translations for it, then it would fallback to the second lang. If
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -475,7 +475,7 @@ gimp_early_configuration (void)
|
||||
if (user_gimprc)
|
||||
user_gimprc_file = g_file_new_for_commandline_arg (user_gimprc);
|
||||
|
||||
/* GimpEarlyRc is reponsible for reading "gimprc" files for the
|
||||
/* GimpEarlyRc is responsible for reading "gimprc" files for the
|
||||
* sole purpose of getting some configuration data that is needed
|
||||
* in the early initialization phase
|
||||
*/
|
||||
@@ -761,10 +761,10 @@ main (int argc,
|
||||
|
||||
/* The GIMP option group is just an empty option group, created for
|
||||
* the sole purpose of running a post-parse hook before any other of
|
||||
* dependant libraries are run. This makes it possible to apply
|
||||
* dependent libraries are run. This makes it possible to apply
|
||||
* options from configuration data obtained from "gimprc" files,
|
||||
* before other libraries have a chance to run some of their
|
||||
* intialization code.
|
||||
* initialization code.
|
||||
*/
|
||||
gimp_group = g_option_group_new ("gimp", "", "", NULL, NULL);
|
||||
g_option_group_set_parse_hooks (gimp_group, NULL,
|
||||
|
@@ -20,6 +20,10 @@
|
||||
#include <gegl.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
#include <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "menus-types.h"
|
||||
@@ -52,7 +56,11 @@
|
||||
|
||||
/* private variables */
|
||||
|
||||
static gboolean menurc_deleted = FALSE;
|
||||
static gboolean menurc_deleted = FALSE;
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
static Gimp *unique_gimp = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
/* public functions */
|
||||
@@ -542,3 +550,115 @@ menus_get_image_manager_singleton (Gimp *gimp)
|
||||
|
||||
return image_ui_manager;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
@interface GimpappMenuHandler : NSObject
|
||||
@end
|
||||
|
||||
@implementation GimpappMenuHandler
|
||||
+ (void) gimpShowAbout:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-about");
|
||||
}
|
||||
|
||||
+ (void) gimpShowWelcomeDialog:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-welcome");
|
||||
}
|
||||
|
||||
+ (void) gimpShowPreferences:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-preferences");
|
||||
}
|
||||
|
||||
+ (void) gimpShowInputDevices:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-input-devices");
|
||||
}
|
||||
|
||||
+ (void) gimpShowKeyboardShortcuts:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "dialogs", "dialogs-keyboard-shortcuts");
|
||||
}
|
||||
|
||||
+ (void) gimpQuit:(id) sender
|
||||
{
|
||||
GimpUIManager *ui_manager = menus_get_image_manager_singleton (unique_gimp);
|
||||
|
||||
gimp_ui_manager_activate_action (ui_manager, "file", "file-quit");
|
||||
}
|
||||
@end
|
||||
|
||||
void
|
||||
menus_quartz_app_menu (Gimp *gimp)
|
||||
{
|
||||
NSMenu *main_menu;
|
||||
NSMenuItem *app_menu_item;
|
||||
NSMenu *app_menu;
|
||||
NSInteger last_index;
|
||||
NSMenuItem *item;
|
||||
|
||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||
|
||||
unique_gimp = gimp;
|
||||
|
||||
main_menu = [NSApp mainMenu];
|
||||
app_menu_item = [main_menu itemAtIndex:0];
|
||||
app_menu = [app_menu_item submenu];
|
||||
|
||||
/* On macOS, some standard menu items (e.g. "Hide", "Hide Others", "Show All", "Quit")
|
||||
* are automatically provided by the system rather than created by our application.
|
||||
* For the items we need to customize, we override their default behavior with our own
|
||||
* implementations. In addition, we extend the menu with extra entries specific to
|
||||
* our application’s functionality. */
|
||||
|
||||
[app_menu setTitle:@"GIMP"];
|
||||
|
||||
/* About */
|
||||
item = [app_menu itemAtIndex:0];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[item setAction:@selector (gimpShowAbout:)];
|
||||
|
||||
/* Welcome Dialog */
|
||||
item = [[NSMenuItem alloc] initWithTitle:@"Welcome Dialog"
|
||||
action:@selector (gimpShowWelcomeDialog:)
|
||||
keyEquivalent:@""];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[app_menu insertItem:item atIndex:1];
|
||||
|
||||
/* Settings */
|
||||
item = [app_menu itemAtIndex:3];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[item setAction:@selector (gimpShowPreferences:)];
|
||||
|
||||
/* Input Devices */
|
||||
item = [[NSMenuItem alloc] initWithTitle:@"Input Devices"
|
||||
action:@selector (gimpShowInputDevices:)
|
||||
keyEquivalent:@""];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[app_menu insertItem:item atIndex:4];
|
||||
|
||||
/* Keyboard Shortcuts */
|
||||
item = [[NSMenuItem alloc] initWithTitle:@"Keyboard Shortcuts"
|
||||
action:@selector (gimpShowKeyboardShortcuts:)
|
||||
keyEquivalent:@""];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[app_menu insertItem:item atIndex:5];
|
||||
|
||||
/* Quit */
|
||||
last_index = [app_menu numberOfItems] - 1;
|
||||
item = [app_menu itemAtIndex:last_index];
|
||||
[item setTarget:[GimpappMenuHandler class]];
|
||||
[item setAction:@selector (gimpQuit:)];
|
||||
}
|
||||
#endif
|
||||
|
@@ -31,3 +31,7 @@ void menus_remove (Gimp *gimp);
|
||||
|
||||
GimpMenuFactory * menus_get_global_menu_factory (Gimp *gimp);
|
||||
GimpUIManager * menus_get_image_manager_singleton (Gimp *gimp);
|
||||
|
||||
#ifdef PLATFORM_OSX
|
||||
void menus_quartz_app_menu (Gimp *gimp);
|
||||
#endif
|
||||
|
@@ -16,6 +16,6 @@ libappmenus = static_library('appmenus',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Menus"',
|
||||
dependencies: [
|
||||
gegl, gtk3
|
||||
gegl, gtk3, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -25,6 +25,6 @@ libapplayermodeslegacy = static_library('applayermodeslegacy',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Layer-Modes-Legacy"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -50,5 +50,6 @@ libapplayermodes = static_library('applayermodes',
|
||||
cairo,
|
||||
gegl,
|
||||
gdk_pixbuf,
|
||||
gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -66,7 +66,7 @@ libappoperations = static_library('appoperations',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Operations"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -63,6 +63,6 @@ libapppaint = static_library('apppaint',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Paint"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, libmypaint,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, libmypaint,
|
||||
],
|
||||
)
|
||||
|
@@ -523,7 +523,7 @@ gimp_vector_layer_removed_options_path (GimpVectorLayer *layer)
|
||||
if (layer->options)
|
||||
{
|
||||
gimp_image_undo_push_vector_layer (gimp_item_get_image (GIMP_ITEM (layer)),
|
||||
_("Discard Vector Informations"),
|
||||
_("Discard Vector Information"),
|
||||
layer, NULL);
|
||||
|
||||
g_object_set (layer->options, "path", NULL, NULL);
|
||||
|
@@ -22,6 +22,6 @@ libapppath = static_library('apppath',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Path"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -84,8 +84,17 @@ file_load_invoker (GimpProcedure *procedure,
|
||||
gimp_value_array_index (new_args, 1));
|
||||
|
||||
for (i = 2; i < proc->num_args; i++)
|
||||
if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i]))
|
||||
{
|
||||
GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]);
|
||||
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i),
|
||||
string_spec->default_value);
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
{
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
}
|
||||
|
||||
return_vals =
|
||||
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
|
||||
@@ -103,7 +112,16 @@ file_load_invoker (GimpProcedure *procedure,
|
||||
{
|
||||
GimpImage *image =
|
||||
g_value_get_object (gimp_value_array_index (return_vals, 1));
|
||||
gimp_image_set_load_proc (image, file_proc);
|
||||
|
||||
if (! gimp_image_get_load_proc (image))
|
||||
/* Leave the initial load procedure if it already exists as
|
||||
* it will give information about the source format. See
|
||||
* similar code in file_open_image().
|
||||
*/
|
||||
gimp_image_set_load_proc (image, file_proc);
|
||||
|
||||
if (! gimp_image_get_file (image))
|
||||
gimp_image_set_imported_file (image, file);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -223,7 +223,7 @@ temp_file_invoker (GimpProcedure *procedure,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
@@ -2318,13 +2318,15 @@ image_get_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_any_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
@@ -2396,13 +2398,15 @@ image_get_xcf_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
@@ -2425,13 +2429,15 @@ image_get_imported_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_imported_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
@@ -2454,13 +2460,15 @@ image_get_exported_file_invoker (GimpProcedure *procedure,
|
||||
if (success)
|
||||
{
|
||||
file = gimp_image_get_exported_file (image);
|
||||
if (file)
|
||||
g_object_ref (file);
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), file);
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
@@ -30,26 +30,26 @@
|
||||
#include "internal-procs.h"
|
||||
|
||||
|
||||
/* 752 procedures registered total */
|
||||
/* 759 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (GimpPDB *pdb)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_PDB (pdb));
|
||||
|
||||
register_brush_procs (pdb);
|
||||
register_brush_select_procs (pdb);
|
||||
register_brush_procs (pdb);
|
||||
register_brushes_procs (pdb);
|
||||
register_buffer_procs (pdb);
|
||||
register_channel_procs (pdb);
|
||||
register_context_procs (pdb);
|
||||
register_debug_procs (pdb);
|
||||
register_display_procs (pdb);
|
||||
register_drawable_procs (pdb);
|
||||
register_drawable_color_procs (pdb);
|
||||
register_drawable_edit_procs (pdb);
|
||||
register_drawable_filter_procs (pdb);
|
||||
register_drawable_select_procs (pdb);
|
||||
register_drawable_procs (pdb);
|
||||
register_dynamics_procs (pdb);
|
||||
register_edit_procs (pdb);
|
||||
register_file_procs (pdb);
|
||||
@@ -59,12 +59,11 @@ internal_procs_init (GimpPDB *pdb)
|
||||
register_fonts_procs (pdb);
|
||||
register_gimp_procs (pdb);
|
||||
register_gimprc_procs (pdb);
|
||||
register_gradient_procs (pdb);
|
||||
register_gradient_select_procs (pdb);
|
||||
register_gradient_procs (pdb);
|
||||
register_gradients_procs (pdb);
|
||||
register_group_layer_procs (pdb);
|
||||
register_help_procs (pdb);
|
||||
register_image_procs (pdb);
|
||||
register_image_autocrop_procs (pdb);
|
||||
register_image_color_profile_procs (pdb);
|
||||
register_image_convert_procs (pdb);
|
||||
@@ -74,17 +73,19 @@ internal_procs_init (GimpPDB *pdb)
|
||||
register_image_select_procs (pdb);
|
||||
register_image_transform_procs (pdb);
|
||||
register_image_undo_procs (pdb);
|
||||
register_item_procs (pdb);
|
||||
register_image_procs (pdb);
|
||||
register_item_transform_procs (pdb);
|
||||
register_item_procs (pdb);
|
||||
register_layer_procs (pdb);
|
||||
register_link_layer_procs (pdb);
|
||||
register_message_procs (pdb);
|
||||
register_paint_tools_procs (pdb);
|
||||
register_palette_procs (pdb);
|
||||
register_palette_select_procs (pdb);
|
||||
register_palette_procs (pdb);
|
||||
register_palettes_procs (pdb);
|
||||
register_path_procs (pdb);
|
||||
register_pattern_procs (pdb);
|
||||
register_pattern_select_procs (pdb);
|
||||
register_pattern_procs (pdb);
|
||||
register_patterns_procs (pdb);
|
||||
register_pdb_procs (pdb);
|
||||
register_plug_in_procs (pdb);
|
||||
|
@@ -24,19 +24,19 @@ void internal_procs_init (GimpPDB *pdb);
|
||||
|
||||
/* Forward declarations for registering PDB procs */
|
||||
|
||||
void register_brush_procs (GimpPDB *pdb);
|
||||
void register_brush_select_procs (GimpPDB *pdb);
|
||||
void register_brush_procs (GimpPDB *pdb);
|
||||
void register_brushes_procs (GimpPDB *pdb);
|
||||
void register_buffer_procs (GimpPDB *pdb);
|
||||
void register_channel_procs (GimpPDB *pdb);
|
||||
void register_context_procs (GimpPDB *pdb);
|
||||
void register_debug_procs (GimpPDB *pdb);
|
||||
void register_display_procs (GimpPDB *pdb);
|
||||
void register_drawable_procs (GimpPDB *pdb);
|
||||
void register_drawable_color_procs (GimpPDB *pdb);
|
||||
void register_drawable_edit_procs (GimpPDB *pdb);
|
||||
void register_drawable_filter_procs (GimpPDB *pdb);
|
||||
void register_drawable_select_procs (GimpPDB *pdb);
|
||||
void register_drawable_procs (GimpPDB *pdb);
|
||||
void register_dynamics_procs (GimpPDB *pdb);
|
||||
void register_edit_procs (GimpPDB *pdb);
|
||||
void register_file_procs (GimpPDB *pdb);
|
||||
@@ -46,12 +46,11 @@ void register_font_select_procs (GimpPDB *pdb);
|
||||
void register_fonts_procs (GimpPDB *pdb);
|
||||
void register_gimp_procs (GimpPDB *pdb);
|
||||
void register_gimprc_procs (GimpPDB *pdb);
|
||||
void register_gradient_procs (GimpPDB *pdb);
|
||||
void register_gradient_select_procs (GimpPDB *pdb);
|
||||
void register_gradient_procs (GimpPDB *pdb);
|
||||
void register_gradients_procs (GimpPDB *pdb);
|
||||
void register_group_layer_procs (GimpPDB *pdb);
|
||||
void register_help_procs (GimpPDB *pdb);
|
||||
void register_image_procs (GimpPDB *pdb);
|
||||
void register_image_autocrop_procs (GimpPDB *pdb);
|
||||
void register_image_color_profile_procs (GimpPDB *pdb);
|
||||
void register_image_convert_procs (GimpPDB *pdb);
|
||||
@@ -61,17 +60,19 @@ void register_image_sample_points_procs (GimpPDB *pdb);
|
||||
void register_image_select_procs (GimpPDB *pdb);
|
||||
void register_image_transform_procs (GimpPDB *pdb);
|
||||
void register_image_undo_procs (GimpPDB *pdb);
|
||||
void register_item_procs (GimpPDB *pdb);
|
||||
void register_image_procs (GimpPDB *pdb);
|
||||
void register_item_transform_procs (GimpPDB *pdb);
|
||||
void register_item_procs (GimpPDB *pdb);
|
||||
void register_layer_procs (GimpPDB *pdb);
|
||||
void register_link_layer_procs (GimpPDB *pdb);
|
||||
void register_message_procs (GimpPDB *pdb);
|
||||
void register_paint_tools_procs (GimpPDB *pdb);
|
||||
void register_palette_procs (GimpPDB *pdb);
|
||||
void register_palette_select_procs (GimpPDB *pdb);
|
||||
void register_palette_procs (GimpPDB *pdb);
|
||||
void register_palettes_procs (GimpPDB *pdb);
|
||||
void register_path_procs (GimpPDB *pdb);
|
||||
void register_pattern_procs (GimpPDB *pdb);
|
||||
void register_pattern_select_procs (GimpPDB *pdb);
|
||||
void register_pattern_procs (GimpPDB *pdb);
|
||||
void register_patterns_procs (GimpPDB *pdb);
|
||||
void register_pdb_procs (GimpPDB *pdb);
|
||||
void register_plug_in_procs (GimpPDB *pdb);
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimplist.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
#include "core/gimpselection.h"
|
||||
@@ -244,6 +245,39 @@ item_id_is_group_layer_invoker (GimpProcedure *procedure,
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
item_id_is_link_layer_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
gint item_id;
|
||||
gboolean text_layer = FALSE;
|
||||
|
||||
item_id = g_value_get_int (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpItem *item = gimp_item_get_by_id (gimp, item_id);
|
||||
|
||||
text_layer = (GIMP_IS_LAYER (item) &&
|
||||
! gimp_item_is_removed (item) &&
|
||||
gimp_item_is_link_layer (item));
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_boolean (gimp_value_array_index (return_vals, 1), text_layer);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
item_id_is_channel_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
@@ -1287,6 +1321,37 @@ register_item_procs (GimpPDB *pdb)
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-item-id-is-link-layer
|
||||
*/
|
||||
procedure = gimp_procedure_new (item_id_is_link_layer_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-item-id-is-link-layer");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Returns whether the item ID is a link layer.",
|
||||
"This procedure returns %TRUE if the specified item ID is a link layer.\n"
|
||||
"\n"
|
||||
"*Note*: in most use cases, you should not use this function. See [func@Gimp.Item.id_is_layer] for a discussion on alternatives.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_int ("item-id",
|
||||
"item id",
|
||||
"The item ID",
|
||||
G_MININT32, G_MAXINT32, 0,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
g_param_spec_boolean ("text-layer",
|
||||
"text layer",
|
||||
"TRUE if the item is a text layer, FALSE otherwise.",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-item-id-is-channel
|
||||
*/
|
||||
|
427
app/pdb/link-layer-cmds.c
Normal file
427
app/pdb/link-layer-cmds.c
Normal file
@@ -0,0 +1,427 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995-2003 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* NOTE: This file is auto-generated by pdbgen.pl. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "stamp-pdbgen.h"
|
||||
|
||||
#include <gegl.h>
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
|
||||
#include "pdb-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplink.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
|
||||
#include "gimppdb.h"
|
||||
#include "gimppdberror.h"
|
||||
#include "gimpprocedure.h"
|
||||
#include "internal-procs.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_new_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpImage *image;
|
||||
GFile *file;
|
||||
GimpLinkLayer *layer = NULL;
|
||||
|
||||
image = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
file = g_value_get_object (gimp_value_array_index (args, 1));
|
||||
|
||||
if (success)
|
||||
{
|
||||
if (file == NULL)
|
||||
{
|
||||
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
|
||||
_("Failed to create link layer"));
|
||||
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpLink *link;
|
||||
|
||||
link = gimp_link_new (gimp, file, 0, 0, TRUE, NULL, error);
|
||||
|
||||
if (link == NULL)
|
||||
{
|
||||
success = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
layer = GIMP_LINK_LAYER (gimp_link_layer_new (image, link));
|
||||
|
||||
if (! layer)
|
||||
{
|
||||
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
|
||||
_("Failed to create link layer"));
|
||||
|
||||
success = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
g_clear_object (&link);
|
||||
}
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_set_object (gimp_value_array_index (return_vals, 1), layer);
|
||||
|
||||
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_link_layer_discard (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_link_layer_monitor (layer);
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_get_file_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpLinkLayer *layer;
|
||||
GFile *file = NULL;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
file = g_object_ref (gimp_link_get_file (gimp_link_layer_get_link (layer), NULL, NULL));
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_take_object (gimp_value_array_index (return_vals, 1), file);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_set_file_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpLinkLayer *layer;
|
||||
GFile *file;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
file = g_value_get_object (gimp_value_array_index (args, 1));
|
||||
|
||||
if (success)
|
||||
{
|
||||
GimpLink *link = gimp_link_new (gimp, file, 0, 0, TRUE, NULL, error);
|
||||
|
||||
if (link)
|
||||
{
|
||||
gimp_link_layer_set_link (layer, link, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
g_clear_object (&link);
|
||||
}
|
||||
|
||||
return gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
}
|
||||
|
||||
static GimpValueArray *
|
||||
link_layer_get_mime_type_invoker (GimpProcedure *procedure,
|
||||
Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
const GimpValueArray *args,
|
||||
GError **error)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
GimpValueArray *return_vals;
|
||||
GimpLinkLayer *layer;
|
||||
gchar *mimetype = NULL;
|
||||
|
||||
layer = g_value_get_object (gimp_value_array_index (args, 0));
|
||||
|
||||
if (success)
|
||||
{
|
||||
mimetype = g_strdup (gimp_link_get_mime_type (gimp_link_layer_get_link (layer)));
|
||||
}
|
||||
|
||||
return_vals = gimp_procedure_get_return_values (procedure, success,
|
||||
error ? *error : NULL);
|
||||
|
||||
if (success)
|
||||
g_value_take_string (gimp_value_array_index (return_vals, 1), mimetype);
|
||||
|
||||
return return_vals;
|
||||
}
|
||||
|
||||
void
|
||||
register_link_layer_procs (GimpPDB *pdb)
|
||||
{
|
||||
GimpProcedure *procedure;
|
||||
|
||||
/*
|
||||
* gimp-link-layer-new
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_new_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-new");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Creates a new link layer.",
|
||||
"This procedure creates a link layer monitoring the specified @file.\n"
|
||||
"\n"
|
||||
"The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method@Image.insert_layer] method.\n"
|
||||
"\n"
|
||||
"The arguments are kept as simple as necessary for the basic case. All link attributes, however, can be modified with the appropriate `gimp_link_layer_set_*()` procedures.",
|
||||
NULL);
|
||||
gimp_procedure_set_static_attribution (procedure,
|
||||
"Jehan",
|
||||
"Jehan",
|
||||
"2025");
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_image ("image",
|
||||
"image",
|
||||
"The image",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
g_param_spec_object ("file",
|
||||
"file",
|
||||
"The file this link layer will monitor",
|
||||
G_TYPE_FILE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_link_layer ("layer",
|
||||
"layer",
|
||||
"The new link layer. The object belongs to libgimp and you should not free it.",
|
||||
FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
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
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_get_file_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-get-file");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Get the monitored file.",
|
||||
"This procedure returns the file which is being monitored.",
|
||||
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_procedure_add_return_value (procedure,
|
||||
g_param_spec_object ("file",
|
||||
"file",
|
||||
"The monitored file",
|
||||
G_TYPE_FILE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-set-file
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_set_file_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-set-file");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Set the monitored file.",
|
||||
"This procedure sets the file to be monitored. 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_procedure_add_argument (procedure,
|
||||
g_param_spec_object ("file",
|
||||
"file",
|
||||
"The file to monitor",
|
||||
G_TYPE_FILE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
|
||||
/*
|
||||
* gimp-link-layer-get-mime-type
|
||||
*/
|
||||
procedure = gimp_procedure_new (link_layer_get_mime_type_invoker, FALSE);
|
||||
gimp_object_set_static_name (GIMP_OBJECT (procedure),
|
||||
"gimp-link-layer-get-mime-type");
|
||||
gimp_procedure_set_static_help (procedure,
|
||||
"Get the mime type of the monitored file.",
|
||||
"This procedure returns the mime type of the file which is being monitored by @layer.\n"
|
||||
"\n"
|
||||
"Note that this will be the real mime type, corresponding to our format support, as returned by the [class@Gimp.LoadProcedure] which actually performs the external image file import.\n"
|
||||
"\n"
|
||||
"This function may also return %NULL in case of error (for instance if the external file doesn't exist anymore).",
|
||||
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_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_string ("mimetype",
|
||||
"mimetype",
|
||||
"The mime type of the monitored file",
|
||||
FALSE, FALSE, FALSE,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_pdb_register_procedure (pdb, procedure);
|
||||
g_object_unref (procedure);
|
||||
}
|
@@ -49,6 +49,7 @@ libappinternalprocs_sources = [
|
||||
'item-cmds.c',
|
||||
'item-transform-cmds.c',
|
||||
'layer-cmds.c',
|
||||
'link-layer-cmds.c',
|
||||
'message-cmds.c',
|
||||
'paint-tools-cmds.c',
|
||||
'palette-cmds.c',
|
||||
@@ -74,7 +75,7 @@ libapppdb = static_library('apppdb',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2
|
||||
],
|
||||
)
|
||||
|
||||
@@ -84,7 +85,7 @@ libappinternalprocs = static_library('appinternalprocs',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, pangocairo, pango,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, pangocairo, pango,
|
||||
],
|
||||
sources: [
|
||||
pdbgen
|
||||
|
@@ -40,6 +40,7 @@
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimppalette.h"
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimpselection.h"
|
||||
|
@@ -56,6 +56,6 @@ libappplugin = static_library('appplug-in',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Plug-In"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf,
|
||||
cairo, gegl, gdk_pixbuf, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -28,6 +28,6 @@ libapppropgui = static_library('apppropgui',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-PropGUI"',
|
||||
dependencies: [
|
||||
gegl, gtk3,
|
||||
gegl, gtk3, gexiv2
|
||||
],
|
||||
)
|
||||
|
@@ -464,7 +464,7 @@ sanity_check_babl (void)
|
||||
|
||||
#define BABL_REQUIRED_MAJOR 0
|
||||
#define BABL_REQUIRED_MINOR 1
|
||||
#define BABL_REQUIRED_MICRO 114
|
||||
#define BABL_REQUIRED_MICRO 116
|
||||
|
||||
babl_get_version (&babl_major_version,
|
||||
&babl_minor_version,
|
||||
@@ -502,7 +502,7 @@ sanity_check_gegl (void)
|
||||
|
||||
#define GEGL_REQUIRED_MAJOR 0
|
||||
#define GEGL_REQUIRED_MINOR 4
|
||||
#define GEGL_REQUIRED_MICRO 62
|
||||
#define GEGL_REQUIRED_MICRO 64
|
||||
|
||||
gegl_get_version (&gegl_major_version,
|
||||
&gegl_minor_version,
|
||||
|
@@ -398,7 +398,7 @@ crop_tool_can_crop (GimpTestFixture *fixture,
|
||||
gint cropped_w = 20;
|
||||
gint cropped_h = 30;
|
||||
|
||||
/* Fit display and pause and let it stabalize (two idlings seems to
|
||||
/* Fit display and pause and let it stabilize (two idlings seems to
|
||||
* always be enough)
|
||||
*/
|
||||
gimp_ui_manager_activate_action (gimp_test_utils_get_ui_manager (gimp),
|
||||
|
@@ -42,6 +42,6 @@ libapptext = static_library('apptext',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Text"',
|
||||
dependencies: [
|
||||
gegl, gdk_pixbuf, harfbuzz, pangocairo, pangoft2,
|
||||
gegl, gdk_pixbuf, gexiv2, harfbuzz, pangocairo, pangoft2,
|
||||
],
|
||||
)
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include "core/gimpimageproxy.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimplineart.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimppickable.h"
|
||||
#include "core/gimppickable-contiguous-region.h"
|
||||
#include "core/gimpprogress.h"
|
||||
@@ -50,6 +51,8 @@
|
||||
|
||||
#include "operations/layer-modes/gimp-layer-modes.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
@@ -620,7 +623,21 @@ gimp_bucket_fill_tool_button_press (GimpTool *tool,
|
||||
return;
|
||||
}
|
||||
|
||||
if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
|
||||
if (gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("Link layers must be rasterized "
|
||||
"before they can be painted on."));
|
||||
return;
|
||||
}
|
||||
else if (gimp_item_is_vector_layer (GIMP_ITEM (drawable)))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("Vector layers must be rasterized "
|
||||
"before they can be painted on."));
|
||||
return;
|
||||
}
|
||||
else if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("The selected layer's pixels are locked."));
|
||||
|
@@ -562,48 +562,50 @@ gimp_filter_tool_control (GimpTool *tool,
|
||||
|
||||
case GIMP_TOOL_ACTION_COMMIT:
|
||||
if (filter_tool->filter)
|
||||
drawable = gimp_drawable_filter_get_drawable (filter_tool->filter);
|
||||
|
||||
/* TODO: Expand non-destructive editing to other drawables
|
||||
* besides layers and channels */
|
||||
if ((! GIMP_IS_LAYER (drawable) && ! GIMP_IS_CHANNEL (drawable)) ||
|
||||
GIMP_IS_LAYER_MASK (drawable) ||
|
||||
(! filter_tool->existing_filter && options->merge_filter))
|
||||
non_destructive = FALSE;
|
||||
|
||||
if (filter_tool->operation)
|
||||
{
|
||||
gegl_node_get (filter_tool->operation,
|
||||
"operation", &operation_name,
|
||||
NULL);
|
||||
drawable = gimp_drawable_filter_get_drawable (filter_tool->filter);
|
||||
|
||||
if (! g_strcmp0 (operation_name, "gegl:nop"))
|
||||
/* TODO: Expand non-destructive editing to other drawables
|
||||
* besides layers and channels */
|
||||
if ((! GIMP_IS_LAYER (drawable) && ! GIMP_IS_CHANNEL (drawable)) ||
|
||||
GIMP_IS_LAYER_MASK (drawable) ||
|
||||
(! filter_tool->existing_filter && options->merge_filter))
|
||||
non_destructive = FALSE;
|
||||
|
||||
/* TODO: Once we can serialize GimpDrawable, remove so that filters with
|
||||
* aux nodes can be non-destructive */
|
||||
if (gegl_node_has_pad (filter_tool->operation, "aux") ||
|
||||
/* GEGL graph is dangerous even without using third-party
|
||||
* effects, because it may run any effect. E.g. it can
|
||||
* run sink effects overwriting any local files with user
|
||||
* rights. We leave a way in through an environment
|
||||
* variable because it is a useful tool for GEGL ops
|
||||
* developers but it should only be set while knowing what
|
||||
* you are doing.
|
||||
*/
|
||||
(g_strcmp0 (operation_name, "gegl:gegl") == 0 &&
|
||||
g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") == NULL))
|
||||
non_destructive = FALSE;
|
||||
if (filter_tool->operation)
|
||||
{
|
||||
gegl_node_get (filter_tool->operation,
|
||||
"operation", &operation_name,
|
||||
NULL);
|
||||
|
||||
g_free (operation_name);
|
||||
if (! g_strcmp0 (operation_name, "gegl:nop"))
|
||||
non_destructive = FALSE;
|
||||
|
||||
/* TODO: Once we can serialize GimpDrawable, remove so that
|
||||
* filters with aux nodes can be non-destructive */
|
||||
if (gegl_node_has_pad (filter_tool->operation, "aux") ||
|
||||
/* GEGL graph is dangerous even without using third-party
|
||||
* effects, because it may run any effect. E.g. it can
|
||||
* run sink effects overwriting any local files with user
|
||||
* rights. We leave a way in through an environment
|
||||
* variable because it is a useful tool for GEGL ops
|
||||
* developers but it should only be set while knowing what
|
||||
* you are doing.
|
||||
*/
|
||||
(g_strcmp0 (operation_name, "gegl:gegl") == 0 &&
|
||||
g_getenv ("GIMP_ALLOW_GEGL_GRAPH_LAYER_EFFECT") == NULL))
|
||||
non_destructive = FALSE;
|
||||
|
||||
g_free (operation_name);
|
||||
}
|
||||
|
||||
/* Ensure that filters applied to group, vector or link layers are
|
||||
* non-destructive */
|
||||
if (GIMP_IS_GROUP_LAYER (drawable) ||
|
||||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
|
||||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
non_destructive = TRUE;
|
||||
}
|
||||
|
||||
/* Ensure that filters applied to group, vector or link layers are non-destructive */
|
||||
if (GIMP_IS_GROUP_LAYER (drawable) ||
|
||||
gimp_item_is_vector_layer (GIMP_ITEM (drawable)) ||
|
||||
gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
non_destructive = TRUE;
|
||||
|
||||
gimp_filter_tool_commit (filter_tool, non_destructive);
|
||||
break;
|
||||
}
|
||||
|
@@ -127,6 +127,8 @@ static void gimp_mybrush_tool_cursor_update (GimpTool *tool,
|
||||
options->view_zoom = (gimp_zoom_model_get_factor (shell->zoom) > 0.0f) ?
|
||||
gimp_zoom_model_get_factor (shell->zoom) : 1.0f;
|
||||
options->view_rotation = shell->rotate_angle;
|
||||
|
||||
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -143,6 +143,6 @@ libapptools = static_library('apptools',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Tools"',
|
||||
dependencies: [
|
||||
gegl, gtk3,
|
||||
gegl, gtk3, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -3319,7 +3319,7 @@ gimp_dashboard_field_to_string (GimpDashboard *dashboard,
|
||||
const FieldInfo *field_info = &group_info->fields[field];
|
||||
const VariableInfo *variable_info = &variables[field_info->variable];
|
||||
const VariableData *variable_data = &priv->variables[field_info->variable];
|
||||
/* Tranlators: "N/A" is an abbreviation for "not available" */
|
||||
/* Translators: "N/A" is an abbreviation for "not available" */
|
||||
const gchar *str = C_("dashboard-value", "N/A");
|
||||
gboolean static_str = TRUE;
|
||||
gboolean show_limit = TRUE;
|
||||
|
@@ -2011,7 +2011,7 @@ control_compress_left (GimpGradient *gradient,
|
||||
range_l = range_r = drag_seg;
|
||||
}
|
||||
|
||||
/* Calculate left bound for dragged hadle */
|
||||
/* Calculate left bound for dragged handle */
|
||||
|
||||
if (drag_seg == range_l)
|
||||
lbound = range_l->prev->left + 2.0 * EPSILON;
|
||||
|
@@ -2245,7 +2245,7 @@ gimp_item_tree_view_popover_button_press (GtkWidget *widget,
|
||||
|
||||
/* Also immediately pass a release event at same position.
|
||||
* Without this, we get weird pointer as though a quick drag'n
|
||||
* drop occured.
|
||||
* drop occurred.
|
||||
*/
|
||||
new_event->type = GDK_BUTTON_RELEASE;
|
||||
gtk_main_do_event (new_event);
|
||||
|
@@ -222,7 +222,7 @@ gimp_palette_view_button_press (GtkWidget *widget,
|
||||
gimp_palette_view_select_entry (view, entry);
|
||||
|
||||
/* Usually the menu is provided by a GimpEditor.
|
||||
* Make sure it's also run by returning FALSE here */
|
||||
* Make sure it's also run by returning FALSE here */
|
||||
return FALSE;
|
||||
}
|
||||
else if (bevent->button == 1)
|
||||
|
@@ -386,7 +386,7 @@ gimp_shortcut_button_focus_out_event (GimpShortcutButton* button,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* On losing focus, we untoggle, so we don't have to grab anything.
|
||||
* Let's avoid cases with several shortcut buttons all grabing the
|
||||
* Let's avoid cases with several shortcut buttons all grabbing the
|
||||
* same shortcuts for instance.
|
||||
*/
|
||||
if (button->priv->timer != 0)
|
||||
|
@@ -161,13 +161,12 @@ gimp_view_renderer_palette_render (GimpViewRenderer *renderer,
|
||||
|
||||
if ((y % renderpal->cell_height) == 0)
|
||||
{
|
||||
guchar rgba[4];
|
||||
gint n = 0;
|
||||
guchar *d = row;
|
||||
|
||||
for (x = 0; x < renderer->width; x++, d += 4)
|
||||
{
|
||||
guchar rgba[4];
|
||||
|
||||
if ((x % renderpal->cell_width) == 0)
|
||||
{
|
||||
if (list && n < renderpal->columns &&
|
||||
|
@@ -280,6 +280,6 @@ libappwidgets = static_library('appwidgets',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-Widgets"',
|
||||
dependencies: [
|
||||
gegl, gtk3,
|
||||
gegl, gtk3, gexiv2,
|
||||
],
|
||||
)
|
||||
|
@@ -13,6 +13,6 @@ libappxcf = static_library('appxcf',
|
||||
include_directories: [ rootInclude, rootAppInclude, ],
|
||||
c_args: '-DG_LOG_DOMAIN="Gimp-XCF"',
|
||||
dependencies: [
|
||||
cairo, gegl, gdk_pixbuf, zlib
|
||||
cairo, gegl, gdk_pixbuf, gexiv2, zlib
|
||||
],
|
||||
)
|
||||
|
@@ -304,6 +304,7 @@ prep_pkg "xapps-common"
|
||||
bund_usr "$UNIX_PREFIX" "share/glib-*/schemas"
|
||||
### Glib commonly required modules
|
||||
bund_usr "$UNIX_PREFIX" "lib/gvfs/*.so"
|
||||
bund_usr "$UNIX_PREFIX" "lib/libproxy/libpxbackend*.so" --dest "${LIB_DIR}/${LIB_SUBDIR}"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gio/modules/*"
|
||||
conf_app GIO_MODULE_DIR "${LIB_DIR}/${LIB_SUBDIR}gio/modules"
|
||||
conf_app GIO_EXTRA_MODULES "" --no-expand
|
||||
@@ -324,6 +325,7 @@ conf_app GTK_PATH "${LIB_DIR}/${LIB_SUBDIR}gtk-3.0"
|
||||
prep_pkg "ibus-gtk3"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gtk-3.0/*.*.*/immodules/*.so" --bundler
|
||||
conf_app GTK_IM_MODULE_FILE "${LIB_DIR}/${LIB_SUBDIR}gtk-3.0/*.*.*/immodules.cache"
|
||||
conf_app GTK_MODULES "" --no-expand
|
||||
|
||||
## Core features
|
||||
bund_usr "$GIMP_PREFIX" "lib/libbabl*"
|
||||
@@ -352,9 +354,16 @@ bund_usr "$GIMP_PREFIX" "etc/gimp"
|
||||
## Other features and plug-ins
|
||||
### mypaint brushes
|
||||
bund_usr "$UNIX_PREFIX" "share/mypaint-data/2.0"
|
||||
####https://salsa.debian.org/multimedia-team/mypaint-brushes/-/merge_requests/2
|
||||
for myb in $(find "$USR_DIR/share/mypaint-data/2.0/brushes/Dieterle" -iname "*.myb"); do
|
||||
sed -i -e 's|surfacemap_x|gridmap_x|g' -e 's|surfacemap_y|gridmap_y|g' $myb;
|
||||
done
|
||||
### Needed for 'th' word breaking in Text tool etc
|
||||
bund_usr "$UNIX_PREFIX" "share/libthai"
|
||||
conf_app LIBTHAI_DICTDIR "share/libthai"
|
||||
### Needed for file-heif work
|
||||
bund_usr "$UNIX_PREFIX" "lib/libheif/plugins/*.so"
|
||||
conf_app LIBHEIF_PLUGIN_PATH "${LIB_DIR}/${LIB_SUBDIR}libheif/plugins"
|
||||
### Needed for full CJK and Cyrillic support in file-pdf
|
||||
bund_usr "$UNIX_PREFIX" "share/poppler"
|
||||
### Needed for file-ps work. See: #14785
|
||||
@@ -375,9 +384,6 @@ if [ "$GIMP_UNSTABLE" ] || [ -z "$GIMP_RELEASE" ]; then
|
||||
### Needed for GTK inspector
|
||||
bund_usr "$UNIX_PREFIX" "lib/libEGL*"
|
||||
bund_usr "$UNIX_PREFIX" "lib/libGL*"
|
||||
bund_usr "$UNIX_PREFIX" "lib/dri*"
|
||||
#TODO: remove this on Debian Trixie (which have Mesa 24.2)
|
||||
conf_app LIBGL_DRIVERS_PATH "${LIB_DIR}/${LIB_SUBDIR}dri"
|
||||
fi
|
||||
### Debug dialog
|
||||
bund_usr "$GIMP_PREFIX" "bin/gimp-debug-tool*" --dest "libexec"
|
||||
@@ -391,7 +397,8 @@ wipe_usr ${LIB_DIR}/*.pyc
|
||||
conf_app PYTHONDONTWRITEBYTECODE "1" --no-expand
|
||||
#### JavaScript plug-ins support
|
||||
bund_usr "$UNIX_PREFIX" "bin/gjs*"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gjs/girepository-1.0/Gjs*" --dest "${LIB_DIR}/${LIB_SUBDIR}girepository-1.0"
|
||||
bund_usr "$UNIX_PREFIX" "lib/gjs/girepository-*/Gjs*.typelib" --dest "${LIB_DIR}/${LIB_SUBDIR}girepository-1.0"
|
||||
bund_usr "$UNIX_PREFIX" "lib/girepository-*/GioUnix*.typelib"
|
||||
####FIXME: lua crashes with loop: See: #11895
|
||||
#bund_usr "$UNIX_PREFIX" "bin/luajit" --rename "lua"
|
||||
#bund_usr "$UNIX_PREFIX" "lib/liblua5.1-lgi*"
|
||||
|
@@ -8,11 +8,11 @@ if [ -z "$APPDIR" ]; then
|
||||
fi
|
||||
|
||||
|
||||
## Minimum runtime-sandboxed paths. See: #13527, #13603 and #13001
|
||||
## Minimum runtime paths. See: #13527 and #13603
|
||||
export PATH="${APPDIR}/usr/bin/:$PATH"
|
||||
unset LD_PRELOAD
|
||||
unset LD_LIBRARY_PATH
|
||||
export XDG_DATA_DIRS="${APPDIR}/usr/share/"
|
||||
export XDG_DATA_DIRS="${APPDIR}/usr/share/:$XDG_DATA_DIRS"
|
||||
|
||||
|
||||
## Other needed runtime paths (added by 3_dist-gimp-goappimage.sh)
|
||||
|
@@ -60,10 +60,19 @@ if [ "$CI_PIPELINE_SOURCE" = 'schedule' ]; then
|
||||
printf "(INFO): All dependencies sources are up to date. Building them...\n"
|
||||
fi
|
||||
fi
|
||||
## (The deps building is too long and no complete output would be collected,
|
||||
## even from GitLab runner messages. So, let's silent and save logs as a file.)
|
||||
if [ "$GITLAB_CI" ]; then
|
||||
built_deps_image="quay.io/gnome_infrastructure/gnome-nightly-cache:$(uname -m)-$(echo "org.gimp.GIMP.Nightly" | tr 'A-Z' 'a-z')-master"
|
||||
oras pull $built_deps_image && oras logout quay.io || true
|
||||
tar --zstd --xattrs -xf _build-$RUNNER.tar.zst || true
|
||||
fi
|
||||
eval $FLATPAK_BUILDER --force-clean --disable-rofiles-fuse --keep-build-dirs --build-only --stop-at=babl \
|
||||
"$GIMP_PREFIX" build/linux/flatpak/org.gimp.GIMP-nightly.json > flatpak-builder.log 2>&1
|
||||
"$GIMP_PREFIX" build/linux/flatpak/org.gimp.GIMP-nightly.json
|
||||
if [ "$GITLAB_CI" ] && [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
|
||||
tar --zstd --xattrs --exclude=.flatpak-builder/build/babl-1 --exclude=.flatpak-builder/build/gegl-1 -cf _build-$RUNNER.tar.zst .flatpak-builder/
|
||||
cat $NIGHTLY_CACHE_ORAS_TOKEN_FILE | oras login -u "${NIGHTLY_CACHE_ORAS_USER}" --password-stdin quay.io || true
|
||||
oras push $built_deps_image _build-$RUNNER.tar.zst && oras logout quay.io || true
|
||||
rm _build-$RUNNER.tar.zst
|
||||
fi
|
||||
printf "\e[0Ksection_end:`date +%s`:deps_build\r\e[0K\n"
|
||||
|
||||
printf "\e[0Ksection_start:`date +%s`:babl_build[collapsed=true]\r\e[0KBuilding babl\n"
|
||||
@@ -82,5 +91,5 @@ if [ "$GITLAB_CI" ]; then
|
||||
printf "\e[0Ksection_end:`date +%s`:gegl_build\r\e[0K\n"
|
||||
|
||||
## Save built deps for 'gimp-flatpak' job
|
||||
tar cf _build-$RUNNER.tar .flatpak-builder/
|
||||
tar --zstd --xattrs -cf _build-$RUNNER.tar.zst .flatpak-builder/
|
||||
fi
|
||||
|
@@ -23,7 +23,7 @@ eval "$(sed -n '/Install part/,/End of check/p' build/linux/flatpak/1_build-deps
|
||||
|
||||
if [ "$GITLAB_CI" ]; then
|
||||
# Extract deps from previous job
|
||||
tar xf _build-$RUNNER.tar
|
||||
tar xf _build-$RUNNER.tar.zst
|
||||
fi
|
||||
|
||||
|
||||
|
@@ -29,6 +29,7 @@
|
||||
"--filesystem=/tmp",
|
||||
"--filesystem=xdg-run/gvfs",
|
||||
"--filesystem=xdg-run/gvfsd",
|
||||
"--unset-env=GTK_MODULES",
|
||||
"--talk-name=org.gtk.vfs.*",
|
||||
"--talk-name=org.freedesktop.FileManager1",
|
||||
"--talk-name=org.gnome.Shell.Screenshot",
|
||||
@@ -230,7 +231,7 @@
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"-DOJPH_ENABLE_TIFF_SUPPORT=OFF",
|
||||
"-DOJPH_BUILD_EXECUTABLES=OFF"
|
||||
"-DOJPH_BUILD_EXECUTABLES=OFF"
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
@@ -244,8 +245,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://poppler.freedesktop.org/poppler-25.09.1.tar.xz",
|
||||
"sha256": "0c1091d01d3dd1664a13816861e812d02b29201e96665454b81b52d261fad658",
|
||||
"url": "https://poppler.freedesktop.org/poppler-25.10.0.tar.xz",
|
||||
"sha256": "6b5e9bb64dabb15787a14db1675291c7afaf9387438cc93a4fb7f6aec4ee6fe0",
|
||||
"x-checker-data": {
|
||||
"type": "anitya",
|
||||
"project-id": 3686,
|
||||
@@ -608,9 +609,9 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"buildsystem": "cmake-ninja",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"buildsystem": "cmake-ninja",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"-DUTILS=OFF",
|
||||
"-DTESTS=OFF"
|
||||
],
|
||||
|
@@ -21,14 +21,16 @@ apps:
|
||||
desktop: usr/share/applications/gimp.desktop
|
||||
environment:
|
||||
HOME: $SNAP_REAL_HOME
|
||||
#Matting Leving support on FG select
|
||||
LD_LIBRARY_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack:$LD_LIBRARY_PATH
|
||||
#Internet connection and Matting Leving support on FG select
|
||||
LD_LIBRARY_PATH: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libproxy:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack:$LD_LIBRARY_PATH
|
||||
#JavaScript plug-ins support
|
||||
GI_TYPELIB_PATH: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gjs/girepository-1.0:$GI_TYPELIB_PATH
|
||||
#AVIF, HEIC and HEJ2 plug-ins support
|
||||
LIBHEIF_PLUGIN_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libheif/plugins
|
||||
#PostScript plug-in support
|
||||
GS_LIB: $SNAP/usr/share/ghostscript/10.02.1/Resource/Init
|
||||
#Acessibility support
|
||||
GTK_MODULES: ""
|
||||
slots:
|
||||
- dbus-gimp
|
||||
plugs:
|
||||
@@ -164,3 +166,7 @@ parts:
|
||||
# get gimp icon for proper desktop integration
|
||||
cp $CRAFT_STAGE/usr/share/icons/hicolor/scalable/apps/gimp.svg $CRAFT_PRIME/gimp
|
||||
craftctl default
|
||||
#https://salsa.debian.org/multimedia-team/mypaint-brushes/-/merge_requests/2
|
||||
for myb in $(find "$CRAFT_PRIME/usr/share/mypaint-data/2.0/brushes/Dieterle" -iname "*.myb"); do
|
||||
sed -i -e 's|surfacemap_x|gridmap_x|g' -e 's|surfacemap_y|gridmap_y|g' $myb;
|
||||
done
|
||||
|
@@ -32,8 +32,7 @@ if ($GITLAB_CI)
|
||||
# Prepare env
|
||||
if (-not $GIMP_PREFIX)
|
||||
{
|
||||
#FIXME:'gimpenv' have buggy code about Windows paths. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/12284
|
||||
$GIMP_PREFIX = "$PWD\..\_install".Replace('\', '/')
|
||||
$GIMP_PREFIX = "$PWD\..\_install"
|
||||
}
|
||||
Invoke-Expression ((Get-Content .gitlab-ci.yml | Select-String 'win_environ\[' -Context 0,7) -replace '> ','' -replace '- ','')
|
||||
|
||||
|
@@ -26,7 +26,7 @@ Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0)
|
||||
## Install or Update Inno (if needed)
|
||||
## (We need to ensure that TLS 1.2 is enabled because of some runners)
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest https://jrsoftware.org/download.php/is.exe -OutFile ..\is.exe
|
||||
Invoke-WebRequest https://files.jrsoftware.org/is/6/innosetup-6.5.4.exe -OutFile ..\is.exe
|
||||
$inno_version_downloaded = (Get-Item ..\is.exe).VersionInfo.ProductVersion -replace ' ',''
|
||||
$broken_inno = Get-ChildItem $env:TMP -Filter *.isl.bak -ErrorAction SilentlyContinue
|
||||
$inno_version = Get-ItemProperty Registry::'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup*' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty DisplayVersion
|
||||
|
@@ -140,10 +140,12 @@
|
||||
|
||||
|
||||
;3 INSTALLER SOURCE
|
||||
#define ASSETS_DIR BUILD_DIR + "\build\windows\installer"
|
||||
|
||||
;3.1.1 Icons and other files
|
||||
#define ASSETS_DIR BUILD_DIR + "\build\windows\installer"
|
||||
#include ASSETS_DIR + "\splash-dimensions.h"
|
||||
#define WIZARD_SMALL_IMAGE ASSETS_DIR + "\gimp.scale-100.bmp," + ASSETS_DIR + "\gimp.scale-125.bmp," + ASSETS_DIR + "\gimp.scale-150.bmp," + ASSETS_DIR + "\gimp.scale-175.bmp," + ASSETS_DIR + "\gimp.scale-200.bmp," + ASSETS_DIR + "\gimp.scale-225.bmp," + ASSETS_DIR + "\gimp.scale-250.bmp"
|
||||
#define WIZARD_IMAGE ASSETS_DIR + "\install-end.scale-100.bmp," + ASSETS_DIR + "\install-end.scale-125.bmp," + ASSETS_DIR + "\install-end.scale-150.bmp," + ASSETS_DIR + "\install-end.scale-175.bmp," + ASSETS_DIR + "\install-end.scale-200.bmp," + ASSETS_DIR + "\install-end.scale-225.bmp," + ASSETS_DIR + "\install-end.scale-250.bmp"
|
||||
|
||||
;3.1.2 Installer lang files
|
||||
[Languages]
|
||||
@@ -247,8 +249,9 @@ AlwaysShowDirOnReadyPage=yes
|
||||
WizardStyle=modern
|
||||
WizardSizePercent=100
|
||||
WizardResizable=no
|
||||
WizardSmallImageFile={#ASSETS_DIR}\gimp.scale-100.bmp,{#ASSETS_DIR}\gimp.scale-125.bmp,{#ASSETS_DIR}\gimp.scale-150.bmp,{#ASSETS_DIR}\gimp.scale-175.bmp,{#ASSETS_DIR}\gimp.scale-200.bmp,{#ASSETS_DIR}\gimp.scale-225.bmp,{#ASSETS_DIR}\gimp.scale-250.bmp
|
||||
WizardImageFile={#ASSETS_DIR}\install-end.scale-100.bmp,{#ASSETS_DIR}\install-end.scale-125.bmp,{#ASSETS_DIR}\install-end.scale-150.bmp,{#ASSETS_DIR}\install-end.scale-175.bmp,{#ASSETS_DIR}\install-end.scale-200.bmp,{#ASSETS_DIR}\install-end.scale-225.bmp,{#ASSETS_DIR}\install-end.scale-250.bmp
|
||||
WizardImageAlphaFormat=defined
|
||||
WizardSmallImageFile={#WIZARD_SMALL_IMAGE}
|
||||
WizardImageFile={#WIZARD_IMAGE}
|
||||
WizardImageStretch=yes
|
||||
[LangOptions]
|
||||
DialogFontName=Segoe UI
|
||||
|
@@ -48,7 +48,7 @@ if have_vala and have_gobject_introspection
|
||||
'goat-exercise-vala.vala',
|
||||
include_directories: [ rootInclude, ],
|
||||
dependencies: [
|
||||
libgimp_vapi, libgimpui_vapi, gtk3, gegl, math,
|
||||
libgimp_vapi, libgimpui_vapi, libgimpui_dep, math,
|
||||
],
|
||||
c_args: [
|
||||
'-DGETTEXT_PACKAGE="@0@"'.format('org.gimp.extension.goat-exercises'),
|
||||
|
Submodule gimp-data updated: 9218ec5970...048d766855
@@ -601,6 +601,7 @@ EXPORTS
|
||||
gimp_item_id_is_group_layer
|
||||
gimp_item_id_is_layer
|
||||
gimp_item_id_is_layer_mask
|
||||
gimp_item_id_is_link_layer
|
||||
gimp_item_id_is_path
|
||||
gimp_item_id_is_selection
|
||||
gimp_item_id_is_text_layer
|
||||
@@ -612,10 +613,12 @@ EXPORTS
|
||||
gimp_item_is_group_layer
|
||||
gimp_item_is_layer
|
||||
gimp_item_is_layer_mask
|
||||
gimp_item_is_link_layer
|
||||
gimp_item_is_path
|
||||
gimp_item_is_selection
|
||||
gimp_item_is_text_layer
|
||||
gimp_item_is_valid
|
||||
gimp_item_is_vector_layer
|
||||
gimp_item_list_children
|
||||
gimp_item_set_color_tag
|
||||
gimp_item_set_expanded
|
||||
@@ -678,6 +681,14 @@ 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
|
||||
gimp_load_procedure_get_handles_raw
|
||||
gimp_load_procedure_get_thumbnail_loader
|
||||
@@ -724,6 +735,7 @@ EXPORTS
|
||||
gimp_param_item_get_type
|
||||
gimp_param_layer_get_type
|
||||
gimp_param_layer_mask_get_type
|
||||
gimp_param_link_layer_get_type
|
||||
gimp_param_palette_get_type
|
||||
gimp_param_path_get_type
|
||||
gimp_param_pattern_get_type
|
||||
@@ -746,6 +758,7 @@ EXPORTS
|
||||
gimp_param_spec_item_none_allowed
|
||||
gimp_param_spec_layer
|
||||
gimp_param_spec_layer_mask
|
||||
gimp_param_spec_link_layer
|
||||
gimp_param_spec_palette
|
||||
gimp_param_spec_path
|
||||
gimp_param_spec_pattern
|
||||
@@ -882,6 +895,9 @@ EXPORTS
|
||||
gimp_procedure_add_layer_mask_aux_argument
|
||||
gimp_procedure_add_layer_mask_return_value
|
||||
gimp_procedure_add_layer_return_value
|
||||
gimp_procedure_add_link_layer_argument
|
||||
gimp_procedure_add_link_layer_aux_argument
|
||||
gimp_procedure_add_link_layer_return_value
|
||||
gimp_procedure_add_menu_path
|
||||
gimp_procedure_add_palette_argument
|
||||
gimp_procedure_add_palette_aux_argument
|
||||
|
@@ -57,6 +57,7 @@
|
||||
#include <libgimp/gimpitem.h>
|
||||
#include <libgimp/gimplayer.h>
|
||||
#include <libgimp/gimplayermask.h>
|
||||
#include <libgimp/gimplinklayer.h>
|
||||
#include <libgimp/gimploadprocedure.h>
|
||||
#include <libgimp/gimppalette.h>
|
||||
#include <libgimp/gimpparamspecs.h>
|
||||
|
@@ -67,6 +67,7 @@
|
||||
#include <libgimp/gimpitem_pdb.h>
|
||||
#include <libgimp/gimpitemtransform_pdb.h>
|
||||
#include <libgimp/gimplayer_pdb.h>
|
||||
#include <libgimp/gimplinklayer_pdb.h>
|
||||
#include <libgimp/gimpmessage_pdb.h>
|
||||
#include <libgimp/gimppainttools_pdb.h>
|
||||
#include <libgimp/gimppalette_pdb.h>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
* GimpFileProcedure:
|
||||
*
|
||||
* File procedures implement file support. They cannot be created directly.
|
||||
* Instead, you will create an instance of one of the sublasses (such as export
|
||||
* Instead, you will create an instance of one of the subclasses (such as export
|
||||
* or load procedures). This provides a common interface for file-related
|
||||
* functions on these objects.
|
||||
**/
|
||||
|
@@ -289,6 +289,11 @@ _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def)
|
||||
param_def->meta.m_id.none_ok,
|
||||
flags);
|
||||
|
||||
if (! strcmp (param_def->type_name, "GimpParamLinkLayer"))
|
||||
return gimp_param_spec_link_layer (name, nick, blurb,
|
||||
param_def->meta.m_id.none_ok,
|
||||
flags);
|
||||
|
||||
if (! strcmp (param_def->type_name, "GimpParamGroupLayer"))
|
||||
return gimp_param_spec_group_layer (name, nick, blurb,
|
||||
param_def->meta.m_id.none_ok,
|
||||
@@ -725,6 +730,10 @@ _gimp_param_spec_to_gp_param_def (GParamSpec *pspec,
|
||||
{
|
||||
type_name = "GimpParamVectorLayer";
|
||||
}
|
||||
else if (value_type == GIMP_TYPE_LINK_LAYER)
|
||||
{
|
||||
type_name = "GimpParamLinkLayer";
|
||||
}
|
||||
else if (value_type == GIMP_TYPE_GROUP_LAYER)
|
||||
{
|
||||
type_name = "GimpParamGroupLayer";
|
||||
|
@@ -261,6 +261,44 @@ gimp_item_is_text_layer (GimpItem *item)
|
||||
return gimp_item_id_is_text_layer (gimp_item_get_id (item));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_item_is_vector_layer:
|
||||
* @item: The item.
|
||||
*
|
||||
* Returns whether the item is a vector layer.
|
||||
*
|
||||
* This procedure returns TRUE if the specified item is a vector
|
||||
* layer.
|
||||
*
|
||||
* Returns: TRUE if the item is a vector layer, FALSE otherwise.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_item_is_vector_layer (GimpItem *item)
|
||||
{
|
||||
return gimp_item_id_is_vector_layer (gimp_item_get_id (item));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_item_is_link_layer:
|
||||
* @item: The item.
|
||||
*
|
||||
* Returns whether the item is a link layer.
|
||||
*
|
||||
* This procedure returns TRUE if the specified item is a link
|
||||
* layer.
|
||||
*
|
||||
* Returns: TRUE if the item is a link layer, FALSE otherwise.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_item_is_link_layer (GimpItem *item)
|
||||
{
|
||||
return gimp_item_id_is_link_layer (gimp_item_get_id (item));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_item_is_group_layer:
|
||||
* @item: The item.
|
||||
|
@@ -53,20 +53,22 @@ struct _GimpItemClass
|
||||
};
|
||||
|
||||
|
||||
gint32 gimp_item_get_id (GimpItem *item);
|
||||
GimpItem * gimp_item_get_by_id (gint32 item_id);
|
||||
gint32 gimp_item_get_id (GimpItem *item);
|
||||
GimpItem * gimp_item_get_by_id (gint32 item_id);
|
||||
|
||||
gboolean gimp_item_is_valid (GimpItem *item);
|
||||
gboolean gimp_item_is_drawable (GimpItem *item);
|
||||
gboolean gimp_item_is_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_text_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_group_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_channel (GimpItem *item);
|
||||
gboolean gimp_item_is_layer_mask (GimpItem *item);
|
||||
gboolean gimp_item_is_selection (GimpItem *item);
|
||||
gboolean gimp_item_is_path (GimpItem *item);
|
||||
gboolean gimp_item_is_valid (GimpItem *item);
|
||||
gboolean gimp_item_is_drawable (GimpItem *item);
|
||||
gboolean gimp_item_is_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_text_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_vector_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_link_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_group_layer (GimpItem *item);
|
||||
gboolean gimp_item_is_channel (GimpItem *item);
|
||||
gboolean gimp_item_is_layer_mask (GimpItem *item);
|
||||
gboolean gimp_item_is_selection (GimpItem *item);
|
||||
gboolean gimp_item_is_path (GimpItem *item);
|
||||
|
||||
GList * gimp_item_list_children (GimpItem *item);
|
||||
GList * gimp_item_list_children (GimpItem *item);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -291,6 +291,46 @@ gimp_item_id_is_group_layer (gint item_id)
|
||||
return group_layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_item_id_is_link_layer:
|
||||
* @item_id: The item ID.
|
||||
*
|
||||
* Returns whether the item ID is a link layer.
|
||||
*
|
||||
* This procedure returns %TRUE if the specified item ID is a link
|
||||
* layer.
|
||||
*
|
||||
* *Note*: in most use cases, you should not use this function. See
|
||||
* [func@Gimp.Item.id_is_layer] for a discussion on alternatives.
|
||||
*
|
||||
* Returns: TRUE if the item is a text layer, FALSE otherwise.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_item_id_is_link_layer (gint item_id)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gboolean text_layer = FALSE;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
G_TYPE_INT, item_id,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-item-id-is-link-layer",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
text_layer = GIMP_VALUES_GET_BOOLEAN (return_vals, 1);
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return text_layer;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_item_id_is_channel:
|
||||
* @item_id: The item ID.
|
||||
|
@@ -38,6 +38,7 @@ gboolean gimp_item_id_is_layer (gint item_id);
|
||||
gboolean gimp_item_id_is_text_layer (gint item_id);
|
||||
gboolean gimp_item_id_is_vector_layer (gint item_id);
|
||||
gboolean gimp_item_id_is_group_layer (gint item_id);
|
||||
gboolean gimp_item_id_is_link_layer (gint item_id);
|
||||
gboolean gimp_item_id_is_channel (gint item_id);
|
||||
gboolean gimp_item_id_is_layer_mask (gint item_id);
|
||||
gboolean gimp_item_id_is_path (gint item_id);
|
||||
|
76
libgimp/gimplinklayer.c
Normal file
76
libgimp/gimplinklayer.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimplinklayer.c
|
||||
* Copyright (C) 2025 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gimp.h"
|
||||
|
||||
|
||||
struct _GimpLinkLayer
|
||||
{
|
||||
GimpLayer parent_instance;
|
||||
};
|
||||
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpLinkLayer, gimp_link_layer, GIMP_TYPE_LAYER)
|
||||
|
||||
#define parent_class gimp_link_layer_parent_class
|
||||
|
||||
|
||||
static void
|
||||
gimp_link_layer_class_init (GimpLinkLayerClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_link_layer_init (GimpLinkLayer *layer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* Public API. */
|
||||
|
||||
/**
|
||||
* gimp_link_layer_get_by_id:
|
||||
* @layer_id: The layer id.
|
||||
*
|
||||
* Returns a #GimpLinkLayer representing @layer_id. This function calls
|
||||
* [func@Gimp.Item.get_by_id] and returns the item if it is a link
|
||||
* layer or %NULL otherwise.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GimpLinkLayer for @layer_id or
|
||||
* %NULL if @layer_id does not represent a valid link layer. The
|
||||
* object belongs to libgimp and you must not modify or unref
|
||||
* it.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
GimpLinkLayer *
|
||||
gimp_link_layer_get_by_id (gint32 layer_id)
|
||||
{
|
||||
GimpItem *item = gimp_item_get_by_id (layer_id);
|
||||
|
||||
if (GIMP_IS_LINK_LAYER (item))
|
||||
return (GimpLinkLayer *) item;
|
||||
|
||||
return NULL;
|
||||
}
|
46
libgimp/gimplinklayer.h
Normal file
46
libgimp/gimplinklayer.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimplinklayer.h
|
||||
* Copyright (C) 2025 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
|
||||
#error "Only <libgimp/gimp.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GIMP_LINK_LAYER_H__
|
||||
#define __GIMP_LINK_LAYER_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
#include <libgimp/gimplayer.h>
|
||||
|
||||
|
||||
#define GIMP_TYPE_LINK_LAYER (gimp_link_layer_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpLinkLayer, gimp_link_layer, GIMP, LINK_LAYER, GimpLayer)
|
||||
|
||||
|
||||
GimpLinkLayer * gimp_link_layer_get_by_id (gint32 layer_id);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_LINK_LAYER_H__ */
|
279
libgimp/gimplinklayer_pdb.c
Normal file
279
libgimp/gimplinklayer_pdb.c
Normal file
@@ -0,0 +1,279 @@
|
||||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimplinklayer_pdb.c
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* NOTE: This file is auto-generated by pdbgen.pl */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "stamp-pdbgen.h"
|
||||
|
||||
#include "gimp.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION: gimplinklayer
|
||||
* @title: gimplinklayer
|
||||
* @short_description: Functions for querying and manipulating link layers.
|
||||
*
|
||||
* Functions for querying and manipulating link layers.
|
||||
**/
|
||||
|
||||
|
||||
/**
|
||||
* gimp_link_layer_new:
|
||||
* @image: The image.
|
||||
* @file: The file this link layer will monitor.
|
||||
*
|
||||
* Creates a new link layer.
|
||||
*
|
||||
* This procedure creates a link layer monitoring the specified @file.
|
||||
*
|
||||
* The new layer still needs to be added to the image as this is not
|
||||
* automatic. Add the new layer with the [method@Image.insert_layer]
|
||||
* method.
|
||||
*
|
||||
* The arguments are kept as simple as necessary for the basic case.
|
||||
* All link attributes, however, can be modified with the appropriate
|
||||
* `gimp_link_layer_set_*()` procedures.
|
||||
*
|
||||
* Returns: (transfer none):
|
||||
* The new link layer. The object belongs to libgimp and you should not free it.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
GimpLinkLayer *
|
||||
gimp_link_layer_new (GimpImage *image,
|
||||
GFile *file)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GimpLinkLayer *layer = NULL;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_IMAGE, image,
|
||||
G_TYPE_FILE, file,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-link-layer-new",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
layer = GIMP_VALUES_GET_LINK_LAYER (return_vals, 1);
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
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.
|
||||
*
|
||||
* Get the monitored file.
|
||||
*
|
||||
* This procedure returns the file which is being monitored.
|
||||
*
|
||||
* Returns: (transfer full): The monitored file.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
GFile *
|
||||
gimp_link_layer_get_file (GimpLinkLayer *layer)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
GFile *file = NULL;
|
||||
|
||||
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-get-file",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
file = GIMP_VALUES_DUP_FILE (return_vals, 1);
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_link_layer_set_file:
|
||||
* @layer: The link layer.
|
||||
* @file: The file to monitor.
|
||||
*
|
||||
* Set the monitored file.
|
||||
*
|
||||
* This procedure sets the file to be monitored. It may change the
|
||||
* layer's render.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gboolean
|
||||
gimp_link_layer_set_file (GimpLinkLayer *layer,
|
||||
GFile *file)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gboolean success = TRUE;
|
||||
|
||||
args = gimp_value_array_new_from_types (NULL,
|
||||
GIMP_TYPE_LINK_LAYER, layer,
|
||||
G_TYPE_FILE, file,
|
||||
G_TYPE_NONE);
|
||||
|
||||
return_vals = _gimp_pdb_run_procedure_array (gimp_get_pdb (),
|
||||
"gimp-link-layer-set-file",
|
||||
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_mime_type:
|
||||
* @layer: The link layer.
|
||||
*
|
||||
* Get the mime type of the monitored file.
|
||||
*
|
||||
* This procedure returns the mime type of the file which is being
|
||||
* monitored by @layer.
|
||||
*
|
||||
* Note that this will be the real mime type, corresponding to our
|
||||
* format support, as returned by the [class@Gimp.LoadProcedure] which
|
||||
* actually performs the external image file import.
|
||||
*
|
||||
* This function may also return %NULL in case of error (for instance
|
||||
* if the external file doesn't exist anymore).
|
||||
*
|
||||
* Returns: (transfer full): The mime type of the monitored file.
|
||||
* The returned value must be freed with g_free().
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
gchar *
|
||||
gimp_link_layer_get_mime_type (GimpLinkLayer *layer)
|
||||
{
|
||||
GimpValueArray *args;
|
||||
GimpValueArray *return_vals;
|
||||
gchar *mimetype = NULL;
|
||||
|
||||
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-get-mime-type",
|
||||
args);
|
||||
gimp_value_array_unref (args);
|
||||
|
||||
if (GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS)
|
||||
mimetype = GIMP_VALUES_DUP_STRING (return_vals, 1);
|
||||
|
||||
gimp_value_array_unref (return_vals);
|
||||
|
||||
return mimetype;
|
||||
}
|
47
libgimp/gimplinklayer_pdb.h
Normal file
47
libgimp/gimplinklayer_pdb.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimplinklayer_pdb.h
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* NOTE: This file is auto-generated by pdbgen.pl */
|
||||
|
||||
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
|
||||
#error "Only <libgimp/gimp.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GIMP_LINK_LAYER_PDB_H__
|
||||
#define __GIMP_LINK_LAYER_PDB_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
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);
|
||||
gchar* gimp_link_layer_get_mime_type (GimpLinkLayer *layer);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_LINK_LAYER_PDB_H__ */
|
@@ -612,6 +612,86 @@ gimp_param_spec_vector_layer (const gchar *name,
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* GIMP_TYPE_PARAM_LINK_LAYER
|
||||
*/
|
||||
|
||||
static void gimp_param_link_layer_class_init (GParamSpecClass *klass);
|
||||
static void gimp_param_link_layer_init (GParamSpec *pspec);
|
||||
|
||||
GType
|
||||
gimp_param_link_layer_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (! type)
|
||||
{
|
||||
const GTypeInfo info =
|
||||
{
|
||||
sizeof (GParamSpecClass),
|
||||
NULL, NULL,
|
||||
(GClassInitFunc) gimp_param_link_layer_class_init,
|
||||
NULL, NULL,
|
||||
sizeof (GimpParamSpecItem),
|
||||
0,
|
||||
(GInstanceInitFunc) gimp_param_link_layer_init
|
||||
};
|
||||
|
||||
type = g_type_register_static (GIMP_TYPE_PARAM_LAYER,
|
||||
"GimpParamLinkLayer", &info, 0);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_param_link_layer_class_init (GParamSpecClass *klass)
|
||||
{
|
||||
klass->value_type = GIMP_TYPE_LINK_LAYER;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_param_link_layer_init (GParamSpec *pspec)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_param_spec_link_layer:
|
||||
* @name: Canonical name of the property specified.
|
||||
* @nick: Nick name of the property specified.
|
||||
* @blurb: Description of the property specified.
|
||||
* @none_ok: Whether no is a valid value.
|
||||
* @flags: Flags for the property specified.
|
||||
*
|
||||
* Creates a new #GimpParamSpecLinkLayer specifying a
|
||||
* [type@LinkLayer] property.
|
||||
*
|
||||
* See g_param_spec_internal() for details on property names.
|
||||
*
|
||||
* Returns: (transfer floating): The newly created #GimpParamSpecLinkLayer.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
GParamSpec *
|
||||
gimp_param_spec_link_layer (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags)
|
||||
{
|
||||
GimpParamSpecItem *ispec;
|
||||
|
||||
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LINK_LAYER,
|
||||
name, nick, blurb, flags);
|
||||
|
||||
g_return_val_if_fail (ispec, NULL);
|
||||
|
||||
ispec->none_ok = none_ok ? TRUE : FALSE;
|
||||
|
||||
return G_PARAM_SPEC (ispec);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* GIMP_TYPE_PARAM_GROUP_LAYER
|
||||
*/
|
||||
|
@@ -148,6 +148,22 @@ GParamSpec * gimp_param_spec_vector_layer (const gchar *name,
|
||||
GParamFlags flags);
|
||||
|
||||
|
||||
/*
|
||||
* GIMP_TYPE_PARAM_LINK_LAYER
|
||||
*/
|
||||
|
||||
#define GIMP_VALUE_HOLDS_LINK_LAYER(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_LINK_LAYER))
|
||||
#define GIMP_TYPE_PARAM_LINK_LAYER (gimp_param_link_layer_get_type ())
|
||||
#define GIMP_IS_PARAM_SPEC_LINK_LAYER(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_LINK_LAYER))
|
||||
|
||||
GType gimp_param_link_layer_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GParamSpec * gimp_param_spec_link_layer (const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags);
|
||||
|
||||
/*
|
||||
* GIMP_TYPE_PARAM_GROUP_LAYER
|
||||
*/
|
||||
|
@@ -1807,6 +1807,12 @@ _gimp_plug_in_get_item (GimpPlugIn *plug_in,
|
||||
"id", item_id,
|
||||
NULL);
|
||||
}
|
||||
else if (gimp_item_id_is_link_layer (item_id))
|
||||
{
|
||||
item = g_object_new (GIMP_TYPE_LINK_LAYER,
|
||||
"id", item_id,
|
||||
NULL);
|
||||
}
|
||||
else if (gimp_item_id_is_group_layer (item_id))
|
||||
{
|
||||
item = g_object_new (GIMP_TYPE_GROUP_LAYER,
|
||||
|
@@ -1895,7 +1895,7 @@ gimp_procedure_add_text_layer_return_value (GimpProcedure *procedure,
|
||||
*
|
||||
* Add a new #GimpVectorLayer argument to @procedure.
|
||||
*
|
||||
* Since: 3.0
|
||||
* Since: 3.2
|
||||
**/
|
||||
void
|
||||
gimp_procedure_add_vector_layer_argument (GimpProcedure *procedure,
|
||||
@@ -1921,7 +1921,7 @@ gimp_procedure_add_vector_layer_argument (GimpProcedure *procedure,
|
||||
*
|
||||
* Add a new #GimpVectorLayer auxiliary argument to @procedure.
|
||||
*
|
||||
* Since: 3.0
|
||||
* Since: 3.2
|
||||
**/
|
||||
void
|
||||
gimp_procedure_add_vector_layer_aux_argument (GimpProcedure *procedure,
|
||||
@@ -1947,7 +1947,7 @@ gimp_procedure_add_vector_layer_aux_argument (GimpProcedure *procedure,
|
||||
*
|
||||
* Add a new #GimpVectorLayer return value to @procedure.
|
||||
*
|
||||
* Since: 3.0
|
||||
* Since: 3.2
|
||||
**/
|
||||
void
|
||||
gimp_procedure_add_vector_layer_return_value (GimpProcedure *procedure,
|
||||
@@ -1962,6 +1962,84 @@ gimp_procedure_add_vector_layer_return_value (GimpProcedure *procedure,
|
||||
none_ok, flags));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_procedure_add_link_layer_argument:
|
||||
* @procedure: the #GimpProcedure.
|
||||
* @name: the name of the argument to be created.
|
||||
* @nick: the label used in #GimpProcedureDialog.
|
||||
* @blurb: (nullable): a more detailed help description.
|
||||
* @none_ok: Whether no is a valid value.
|
||||
* @flags: argument flags.
|
||||
*
|
||||
* Add a new #GimpLinkLayer argument to @procedure.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
void
|
||||
gimp_procedure_add_link_layer_argument (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags)
|
||||
{
|
||||
_gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_link_layer (name, nick, blurb,
|
||||
none_ok, flags));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_procedure_add_link_layer_aux_argument:
|
||||
* @procedure: the #GimpProcedure.
|
||||
* @name: the name of the argument to be created.
|
||||
* @nick: the label used in #GimpProcedureDialog.
|
||||
* @blurb: (nullable): a more detailed help description.
|
||||
* @none_ok: Whether no is a valid value.
|
||||
* @flags: argument flags.
|
||||
*
|
||||
* Add a new #GimpLinkLayer auxiliary argument to @procedure.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
void
|
||||
gimp_procedure_add_link_layer_aux_argument (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags)
|
||||
{
|
||||
_gimp_procedure_add_aux_argument (procedure,
|
||||
gimp_param_spec_link_layer (name, nick, blurb,
|
||||
none_ok, flags));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_procedure_add_link_layer_return_value:
|
||||
* @procedure: the #GimpProcedure.
|
||||
* @name: the name of the argument to be created.
|
||||
* @nick: the label used in #GimpProcedureDialog.
|
||||
* @blurb: (nullable): a more detailed help description.
|
||||
* @none_ok: Whether no is a valid value.
|
||||
* @flags: argument flags.
|
||||
*
|
||||
* Add a new #GimpLinkLayer return value to @procedure.
|
||||
*
|
||||
* Since: 3.2
|
||||
**/
|
||||
void
|
||||
gimp_procedure_add_link_layer_return_value (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags)
|
||||
{
|
||||
_gimp_procedure_add_return_value (procedure,
|
||||
gimp_param_spec_link_layer (name, nick, blurb,
|
||||
none_ok, flags));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_procedure_add_group_layer_argument:
|
||||
* @procedure: the #GimpProcedure.
|
||||
|
@@ -325,6 +325,18 @@ G_BEGIN_DECLS
|
||||
g_value_set_object (gimp_value_array_index (args, n), value)
|
||||
|
||||
|
||||
/* link layer */
|
||||
|
||||
#define GIMP_VALUES_GET_LINK_LAYER(args, n) \
|
||||
g_value_get_object (gimp_value_array_index (args, n))
|
||||
|
||||
#define GIMP_VALUES_GET_LINK_LAYER_ID(args, n) \
|
||||
gimp_item_get_id (g_value_get_object (gimp_value_array_index (args, n)))
|
||||
|
||||
#define GIMP_VALUES_SET_LINK_LAYER(args, n, value) \
|
||||
g_value_set_object (gimp_value_array_index (args, n), value)
|
||||
|
||||
|
||||
/* group layer */
|
||||
|
||||
#define GIMP_VALUES_GET_GROUP_LAYER(args, n) \
|
||||
@@ -930,6 +942,25 @@ void gimp_procedure_add_vector_layer_return_value (GimpProcedure *procedure
|
||||
gboolean none_ok,
|
||||
GParamFlags flags);
|
||||
|
||||
void gimp_procedure_add_link_layer_argument (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags);
|
||||
void gimp_procedure_add_link_layer_aux_argument (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags);
|
||||
void gimp_procedure_add_link_layer_return_value (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
gboolean none_ok,
|
||||
GParamFlags flags);
|
||||
|
||||
void gimp_procedure_add_group_layer_argument (GimpProcedure *procedure,
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
|
@@ -36,9 +36,9 @@
|
||||
* The GimpContext holds a user's current choice of resources.
|
||||
* The GIMP core has the *resource* data.
|
||||
*
|
||||
* A resource has-a identifier.
|
||||
* A resource has an identifier.
|
||||
* Currently the identifier is a string, sometimes called a name.
|
||||
* The identifier is unique among instances(resource datas) loaded into GIMP.
|
||||
* The identifier is unique among instances (resource data) loaded into GIMP.
|
||||
*
|
||||
* A user can change the set of resources installed with GIMP,
|
||||
* and edit or create new resources meaning datasets.
|
||||
|
@@ -47,6 +47,7 @@ typedef struct _GimpGroupLayer GimpGroupLayer;
|
||||
typedef struct _GimpLayer GimpLayer;
|
||||
typedef struct _GimpChannel GimpChannel;
|
||||
typedef struct _GimpLayerMask GimpLayerMask;
|
||||
typedef struct _GimpLinkLayer GimpLinkLayer;
|
||||
typedef struct _GimpSelection GimpSelection;
|
||||
typedef struct _GimpTextLayer GimpTextLayer;
|
||||
typedef struct _GimpPath GimpPath;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user