Compare commits
3 Commits
fix_toolti
...
rendering-
Author | SHA1 | Date | |
---|---|---|---|
|
c85ee0c830 | ||
|
d6386f036f | ||
|
966550b52e |
@@ -1,12 +0,0 @@
|
||||
# See https://wiki.apertis.org/Guidelines/Coding_conventions#Code_formatting
|
||||
BasedOnStyle: GNU
|
||||
AlwaysBreakAfterDefinitionReturnType: All
|
||||
BreakBeforeBinaryOperators: None
|
||||
BinPackParameters: false
|
||||
SpaceAfterCStyleCast: true
|
||||
PointerAlignment: Right
|
||||
# Our column limit is actually 80, but setting that results in clang-format
|
||||
# making a lot of dubious hanging-indent choices; disable it and assume the
|
||||
# developer will line wrap appropriately. clang-format will still check
|
||||
# existing hanging indents.
|
||||
ColumnLimit: 0
|
37
.cvsignore
Normal file
37
.cvsignore
Normal file
@@ -0,0 +1,37 @@
|
||||
*.lo
|
||||
config.log
|
||||
config.h
|
||||
config.h.in
|
||||
libtool
|
||||
config.status
|
||||
stamp-h
|
||||
stamp-h1
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
configure
|
||||
config.h.win32
|
||||
gtk-config-2.0
|
||||
config.cache
|
||||
ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
gtk+-2.0.pc
|
||||
gtk+-2.0-uninstalled.pc
|
||||
gtk+-linux-fb-2.0.pc
|
||||
gtk+-nanox-2.0.pc
|
||||
gtk+-x11-2.0.pc
|
||||
gdk-2.0.pc
|
||||
gdk-2.0-uninstalled.pc
|
||||
gdk-linux-fb-2.0.pc
|
||||
gdk-nanox-2.0.pc
|
||||
gdk-x11-2.0.pc
|
||||
gdk-pixbuf-2.0.pc
|
||||
gdk-pixbuf-2.0-uninstalled.pc
|
||||
gtk-zip.sh
|
||||
missing
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
sgml
|
||||
autom4te.cache
|
@@ -1,32 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2021 The GTK Authors
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.[ch]]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
# For the legacy tabs which still exist in the code:
|
||||
tab_width = 8
|
||||
|
||||
[*.ui]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
|
||||
[*.xml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[meson.build]
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
[*.md]
|
||||
max_line_length = 80
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/subprojects/*/
|
426
.gitlab-ci.yml
426
.gitlab-ci.yml
@@ -1,426 +0,0 @@
|
||||
include:
|
||||
- project: 'gnome/citemplates'
|
||||
file: 'flatpak/flatpak_ci_initiative.yml'
|
||||
|
||||
stages:
|
||||
- check
|
||||
- build
|
||||
- analysis
|
||||
- docs
|
||||
- flatpak
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
.cache-paths: &cache-paths
|
||||
paths:
|
||||
- _ccache/
|
||||
- subprojects/gdk-pixbuf/
|
||||
- subprojects/glib/
|
||||
- subprojects/graphene/
|
||||
- subprojects/libepoxy/
|
||||
- subprojects/pango/
|
||||
|
||||
# Common variables
|
||||
variables:
|
||||
COMMON_MESON_FLAGS: "-Dwerror=true -Dcairo:werror=false -Dgi-docgen:werror=false -Dgraphene:werror=false -Dlibepoxy:werror=false -Dlibsass:werror=false -Dpango:werror=false -Dsassc:werror=false -Dgdk-pixbuf:werror=false -Dglib:werror=false -Dlibcloudproviders:werror=false -Dlibpng:werror=false -Dlibtiff:werror=false -Dsysprof:werror=false -Dwayland-protocols:werror=false -Dharfbuzz:werror=false -Dfreetype2:werror=false -Dfontconfig:werror=false -Dfribidi:werror=false -Dlibffi:werror=false -Dlibjpeg-turbo:werror=false -Dmutest:werror=false -Dpixman:werror=false -Dproxy-libintl:werror=false"
|
||||
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true"
|
||||
FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled -Ddemos=false -Dbuild-examples=false -Dbuild-tests=false -Dbuild-testsuite=true"
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 3
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v40"
|
||||
FLATPAK_IMAGE: "quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master"
|
||||
|
||||
.only-default:
|
||||
only:
|
||||
- branches
|
||||
except:
|
||||
- tags
|
||||
|
||||
style-check-diff:
|
||||
extends: .only-default
|
||||
image: $FEDORA_IMAGE
|
||||
stage: check
|
||||
allow_failure: true
|
||||
script:
|
||||
- .gitlab-ci/run-style-check-diff.sh
|
||||
|
||||
.build-fedora-default:
|
||||
extends: .only-default
|
||||
image: $FEDORA_IMAGE
|
||||
artifacts:
|
||||
when: always
|
||||
reports:
|
||||
junit:
|
||||
- "${CI_PROJECT_DIR}/_build/report-x11.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report-x11_unstable.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report-wayland.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report-wayland_unstable.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report-broadway.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report-broadway_unstable.xml"
|
||||
name: "gtk-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
||||
- "${CI_PROJECT_DIR}/_build/report*.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report*.html"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/reftests/output/*/*.png"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/reftests/output/*/*.node"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/tools/output/*/*"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/gsk/compare/*/*/*.png"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/css/output/*/*.syscap"
|
||||
- "${CI_PROJECT_DIR}/_build_hello/meson-logs"
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- _ccache/
|
||||
|
||||
fedora-x86_64:
|
||||
extends: .build-fedora-default
|
||||
stage: build
|
||||
needs: []
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
|
||||
script:
|
||||
- .gitlab-ci/show-info-linux.sh
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- pip3 install --user meson~=0.64
|
||||
- meson subprojects download
|
||||
- meson subprojects update --reset
|
||||
- mkdir _install
|
||||
- meson setup
|
||||
--prefix=${CI_PROJECT_DIR}/_install
|
||||
${COMMON_MESON_FLAGS}
|
||||
${EXTRA_MESON_FLAGS}
|
||||
${BACKEND_FLAGS}
|
||||
${FEATURE_FLAGS}
|
||||
_build
|
||||
- meson compile -C _build
|
||||
- meson install -C _build
|
||||
- PKG_CONFIG_PATH=${CI_PROJECT_DIR}/_install/lib64/pkgconfig:${CI_PROJECT_DIR}/_install/share/pkgconfig meson setup _build_hello examples/hello
|
||||
- LD_LIBRARY_PATH=${CI_PROJECT_DIR}/_install/lib64 meson compile -C _build_hello
|
||||
- .gitlab-ci/run-tests.sh _build x11
|
||||
- .gitlab-ci/run-tests.sh _build wayland
|
||||
- .gitlab-ci/run-tests.sh _build waylandgles
|
||||
- .gitlab-ci/run-tests.sh _build broadway
|
||||
|
||||
release-build:
|
||||
extends: .build-fedora-default
|
||||
stage: build
|
||||
needs: []
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
||||
script:
|
||||
- .gitlab-ci/show-info-linux.sh
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- pip3 install --user meson~=0.64
|
||||
- meson subprojects download
|
||||
- meson subprojects update --reset
|
||||
- meson setup
|
||||
${COMMON_MESON_FLAGS}
|
||||
${EXTRA_MESON_FLAGS}
|
||||
${BACKEND_FLAGS}
|
||||
${FEATURE_FLAGS}
|
||||
_build
|
||||
- meson compile -C _build
|
||||
- .gitlab-ci/run-tests.sh _build x11
|
||||
|
||||
fedora-mingw64:
|
||||
extends: .build-fedora-default
|
||||
stage: build
|
||||
needs: []
|
||||
before_script:
|
||||
- sudo dnf install -y
|
||||
mingw64-filesystem
|
||||
mingw64-gcc
|
||||
mingw64-binutils
|
||||
mingw64-cairo
|
||||
mingw64-gdk-pixbuf
|
||||
mingw64-gstreamer1-plugins-bad-free
|
||||
mingw64-glib2
|
||||
mingw64-libepoxy
|
||||
mingw64-pango
|
||||
# mingw64-graphene (rawhide)
|
||||
script:
|
||||
- .gitlab-ci/show-info-linux.sh
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- pip3 install --user meson~=0.64
|
||||
- meson subprojects download
|
||||
- meson subprojects update --reset
|
||||
# Test that mingw64-meson still fails. If it has stopped failing, the CI
|
||||
# will fail and now you should remove the hack that follows this.
|
||||
- FAILED=false
|
||||
- mingw64-meson --version || FAILED=true
|
||||
- test $FAILED = false && echo "mingw64-meson works now, remove the hack" && exit 1
|
||||
# HACK: Running mingw64-meson directly fails on the CI with:
|
||||
# /usr/bin/mingw64-meson: line 92: fg: no job control
|
||||
# Because rpm is not evaluating %__meson and it gets interpreted as a job
|
||||
# specifier. So we fix that and run it ourselves.
|
||||
- rpm --eval "%{mingw64_meson}" > mingw64-meson.sh
|
||||
- sed -i -e 's/%__meson/meson/' mingw64-meson.sh
|
||||
- chmod +x mingw64-meson.sh
|
||||
- ./mingw64-meson.sh -Dintrospection=disabled -Dgraphene:introspection=disabled _build
|
||||
- ninja -C _build
|
||||
|
||||
.mingw-defaults:
|
||||
extends: .only-default
|
||||
stage: build
|
||||
tags:
|
||||
- win32-ps
|
||||
script:
|
||||
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
paths:
|
||||
- _ccache/
|
||||
- subprojects/gdk-pixbuf/
|
||||
- subprojects/glib/
|
||||
- subprojects/graphene/
|
||||
- subprojects/libepoxy/
|
||||
- subprojects/pango/
|
||||
|
||||
msys2-mingw64:
|
||||
extends: .mingw-defaults
|
||||
needs: []
|
||||
variables:
|
||||
MSYSTEM: "MINGW64"
|
||||
CHERE_INVOKING: "yes"
|
||||
artifacts:
|
||||
when: always
|
||||
expose_as: 'Windows_DLL_MSYS2_64_bit_toolchain'
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/gtkdll.tar.gz"
|
||||
|
||||
macos:
|
||||
# Sadly, this fails regularly, and its failure is never enlightening
|
||||
allow_failure: true
|
||||
extends: .only-default
|
||||
only:
|
||||
- branches@GNOME/gtk
|
||||
stage: build
|
||||
tags:
|
||||
- macos
|
||||
needs: []
|
||||
before_script:
|
||||
- bash .gitlab-ci/show-info-osx.sh
|
||||
- pip3 install --user meson~=0.64
|
||||
- pip3 install --user ninja
|
||||
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
||||
- export MESON_FORCE_BACKTRACE=1
|
||||
script:
|
||||
- meson setup ${COMMON_MESON_FLAGS}
|
||||
-Dx11-backend=false
|
||||
-Dbroadway-backend=true
|
||||
-Dmacos-backend=true
|
||||
-Dmedia-gstreamer=disabled
|
||||
-Dintrospection=disabled
|
||||
-Dcpp_std=c++11
|
||||
-Dpixman:tests=disabled
|
||||
-Dlibjpeg-turbo:simd=disabled
|
||||
-Ddemos=false
|
||||
-Dbuild-tests=false
|
||||
-Dbuild-examples=false
|
||||
-Dbuild-testsuite=false
|
||||
_build
|
||||
- meson compile -C _build
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
||||
|
||||
vs2017-x64:
|
||||
extends: .only-default
|
||||
# TODO: Uncomment this when ready to merge.
|
||||
#only:
|
||||
# - branches@GNOME/gtk
|
||||
stage: build
|
||||
tags:
|
||||
- win32-ps
|
||||
needs: []
|
||||
script:
|
||||
- .gitlab-ci/test-msvc.bat
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
||||
|
||||
.flatpak-defaults:
|
||||
image: $FLATPAK_IMAGE
|
||||
stage: flatpak
|
||||
allow_failure: true
|
||||
tags:
|
||||
- flatpak
|
||||
artifacts:
|
||||
paths:
|
||||
- "${APPID}-dev.flatpak"
|
||||
- 'repo.tar'
|
||||
expire_in: 1 day
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/flatpak-build.sh "${APPID}"
|
||||
|
||||
# Manual jobs, for branches and MRs
|
||||
.flatpak-manual:
|
||||
extends: .flatpak-defaults
|
||||
when: manual
|
||||
|
||||
# Only build Flatpak bundles automatically on main
|
||||
.flatpak-main:
|
||||
extends: .flatpak-defaults
|
||||
only:
|
||||
- main
|
||||
|
||||
flatpak-manual:demo:
|
||||
extends: .flatpak-manual
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.Demo4
|
||||
|
||||
flatpak-main:demo:
|
||||
extends: .flatpak-main
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.Demo4
|
||||
|
||||
flatpak-manual:widget-factory:
|
||||
extends: .flatpak-manual
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.WidgetFactory4
|
||||
|
||||
flatpak-main:widget-factory:
|
||||
extends: .flatpak-main
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.WidgetFactory4
|
||||
|
||||
flatpak-manual:icon-browser:
|
||||
extends: .flatpak-manual
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
|
||||
flatpak-main:icon-browser:
|
||||
extends: .flatpak-main
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
|
||||
flatpak-manual:node-editor:
|
||||
extends: .flatpak-manual
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.gtk4.NodeEditor
|
||||
|
||||
flatpak-main:node-editor:
|
||||
extends: .flatpak-main
|
||||
needs: []
|
||||
variables:
|
||||
APPID: org.gtk.gtk4.NodeEditor
|
||||
|
||||
# Publish the demo apps to the GNOME Nightly repo
|
||||
# https://wiki.gnome.org/Apps/Nightly
|
||||
# https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/DevOps-with-Flatpak
|
||||
nightly demo:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-main:demo']
|
||||
needs: ['flatpak-main:demo']
|
||||
|
||||
nightly factory:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-main:widget-factory']
|
||||
needs: ['flatpak-main:widget-factory']
|
||||
|
||||
nightly icon-browser:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-main:icon-browser']
|
||||
needs: ['flatpak-main:icon-browser']
|
||||
|
||||
nightly node-editor:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-main:node-editor']
|
||||
needs: ['flatpak-main:node-editor']
|
||||
|
||||
static-scan:
|
||||
image: $FEDORA_IMAGE
|
||||
stage: analysis
|
||||
needs: []
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=debug"
|
||||
script:
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- pip3 install --user meson~=0.64
|
||||
- meson setup
|
||||
${COMMON_MESON_FLAGS}
|
||||
${EXTRA_MESON_FLAGS}
|
||||
_scan_build
|
||||
- ninja -C _scan_build scan-build
|
||||
artifacts:
|
||||
paths:
|
||||
- _scan_build/meson-logs
|
||||
allow_failure: true
|
||||
|
||||
# Run tests with the address sanitizer. We need to turn off introspection
|
||||
# and f16c, since they are incompatible with asan
|
||||
asan-build:
|
||||
image: $FEDORA_IMAGE
|
||||
tags: [ asan ]
|
||||
stage: analysis
|
||||
needs: []
|
||||
variables:
|
||||
script:
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- pip3 install --user meson~=0.64
|
||||
- CC=clang meson setup --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled -Df16c=disabled _build
|
||||
- ninja -C _build
|
||||
- .gitlab-ci/run-tests.sh _build wayland
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/meson-logs
|
||||
allow_failure: true
|
||||
|
||||
reference:
|
||||
image: $FEDORA_IMAGE
|
||||
stage: docs
|
||||
needs: []
|
||||
script:
|
||||
- export PATH="$HOME/.local/bin:$PATH"
|
||||
- pip3 install --user meson~=0.64
|
||||
- meson setup
|
||||
${COMMON_MESON_FLAGS}
|
||||
--buildtype=release
|
||||
--force-fallback-for=gdk-pixbuf,pango
|
||||
-Dintrospection=enabled
|
||||
-Dgtk_doc=true
|
||||
-Dgdk-pixbuf:gtk_doc=true
|
||||
-Dpango:gtk_doc=true
|
||||
-Ddemos=false
|
||||
-Dbuild-examples=false
|
||||
-Dbuild-tests=false
|
||||
-Dbuild-testsuite=false
|
||||
_build
|
||||
- meson compile -C _build
|
||||
- mkdir -p _reference/
|
||||
- mv _build/docs/reference/gdk/gdk4/ _reference/gdk4/
|
||||
- mv _build/docs/reference/gdk/gdk4-x11/ _reference/gdk4-x11/
|
||||
- mv _build/docs/reference/gdk/gdk4-wayland/ _reference/gdk4-wayland/
|
||||
- mv _build/docs/reference/gsk/gsk4/ _reference/gsk4/
|
||||
- mv _build/docs/reference/gtk/gtk4/ _reference/gtk4/
|
||||
- mv _build/subprojects/pango/docs/Pango/ _reference/Pango/
|
||||
- mv _build/subprojects/pango/docs/PangoCairo/ _reference/PangoCairo/
|
||||
- mv _build/subprojects/pango/docs/PangoFc/ _reference/PangoFc/
|
||||
- mv _build/subprojects/pango/docs/PangoFT2/ _reference/PangoFT2/
|
||||
- mv _build/subprojects/pango/docs/PangoOT/ _reference/PangoOT/
|
||||
- mv _build/subprojects/pango/docs/PangoXft/ _reference/PangoXft/
|
||||
- mv _build/subprojects/gdk-pixbuf/docs/gdk-pixbuf/ _reference/gdk-pixbuf/
|
||||
- mv _build/subprojects/gdk-pixbuf/docs/gdk-pixdata/ _reference/gdk-pixdata/
|
||||
artifacts:
|
||||
paths:
|
||||
- _reference
|
||||
|
||||
publish-docs:
|
||||
image: fedora:latest
|
||||
stage: publish
|
||||
needs: ['reference']
|
||||
script:
|
||||
- "curl -X POST -F token=${PAGES_TRIGGER_TOKEN} -F ref=docs-gtk-org https://gitlab.gnome.org/api/v4/projects/665/trigger/pipeline"
|
||||
only:
|
||||
refs:
|
||||
- main
|
@@ -1,50 +0,0 @@
|
||||
## GTK CI infrastructure
|
||||
|
||||
GTK uses different CI images depending on platform and jobs.
|
||||
|
||||
The CI images are Docker containers, generated either using `docker` or
|
||||
`podman`, and pushed to the GitLab [container registry][registry].
|
||||
|
||||
Each Docker image has a tag composed of two parts:
|
||||
|
||||
- `${image}`: the base image for a given platform, like "fedora" or
|
||||
"debian-stable"
|
||||
- `${number}`: an incremental version number, or `latest`
|
||||
|
||||
See the [container registry][registry] for the available images for each
|
||||
branch, as well as their available versions.
|
||||
|
||||
Note that using `latest` as version number will overwrite the most
|
||||
recently uploaded image in the registry.
|
||||
|
||||
### Checklist for Updating a CI image
|
||||
|
||||
- [ ] Update the `${image}.Dockerfile` file with the dependencies
|
||||
- [ ] Run `./run-docker.sh build --base ${image} --version ${number}`
|
||||
- [ ] Run `./run-docker.sh push --base ${image} --version ${number}`
|
||||
once the Docker image is built; you may need to log in by using
|
||||
`docker login` or `podman login`
|
||||
- [ ] Update the `image` keys in the `.gitlab-ci.yml` file with the new
|
||||
image tag
|
||||
- [ ] Open a merge request with your changes and let it run
|
||||
|
||||
### Checklist for Adding a new CI image
|
||||
|
||||
- [ ] Write a new `${image}.Dockerfile` with the instructions to set up
|
||||
a build environment
|
||||
- [ ] Add the `pip3 install meson` incantation
|
||||
- [ ] Run `./run-docker.sh build --base ${image} --version ${number}`
|
||||
- [ ] Run `./run-docker.sh push --base ${image} --version ${number}`
|
||||
- [ ] Add the new job to `.gitlab-ci.yml` referencing the image
|
||||
- [ ] Open a merge request with your changes and let it run
|
||||
|
||||
### Checklist for Adding a new dependency to a CI image
|
||||
|
||||
Our images are layered, and the base (called fedora-base) contains
|
||||
all the rpm payload. Therefore, adding a new dependency is a 2-step
|
||||
process:
|
||||
|
||||
1. [ ] Build and upload fedora-base:$version+1
|
||||
1. [ ] Build and upload fedora:$version+1 based on fedora-base:version+1
|
||||
|
||||
[registry]: https://gitlab.gnome.org/GNOME/gtk/container_registry
|
@@ -1,133 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# === clang-format-diff.py - ClangFormat Diff Reformatter ---*- python -*-=== #
|
||||
#
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
# ===---------------------------------------------------------------------=== #
|
||||
|
||||
"""
|
||||
This script reads input from a unified diff and reformats all the changed
|
||||
lines. This is useful to reformat all the lines touched by a specific patch.
|
||||
Example usage for git/svn users:
|
||||
|
||||
git diff -U0 --no-color HEAD^ | clang-format-diff.py -p1 -i
|
||||
svn diff --diff-cmd=diff -x-U0 | clang-format-diff.py -i
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import argparse
|
||||
import difflib
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
from io import StringIO
|
||||
else:
|
||||
from io import BytesIO as StringIO
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description=__doc__,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
parser.add_argument('-i', action='store_true', default=False,
|
||||
help='apply edits to files instead of displaying a '
|
||||
'diff')
|
||||
parser.add_argument('-p', metavar='NUM', default=0,
|
||||
help='strip the smallest prefix containing P slashes')
|
||||
parser.add_argument('-regex', metavar='PATTERN', default=None,
|
||||
help='custom pattern selecting file paths to reformat '
|
||||
'(case sensitive, overrides -iregex)')
|
||||
parser.add_argument('-iregex', metavar='PATTERN',
|
||||
default=r'.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|m|mm|inc'
|
||||
r'|js|ts|proto|protodevel|java|cs)',
|
||||
help='custom pattern selecting file paths to reformat '
|
||||
'(case insensitive, overridden by -regex)')
|
||||
parser.add_argument('-sort-includes', action='store_true', default=False,
|
||||
help='let clang-format sort include blocks')
|
||||
parser.add_argument('-v', '--verbose', action='store_true',
|
||||
help='be more verbose, ineffective without -i')
|
||||
parser.add_argument('-style',
|
||||
help='formatting style to apply (LLVM, Google, '
|
||||
'Chromium, Mozilla, WebKit)')
|
||||
parser.add_argument('-binary', default='clang-format',
|
||||
help='location of binary to use for clang-format')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Extract changed lines for each file.
|
||||
filename = None
|
||||
lines_by_file = {}
|
||||
for line in sys.stdin:
|
||||
match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
|
||||
if match:
|
||||
filename = match.group(2)
|
||||
if filename is None:
|
||||
continue
|
||||
|
||||
if args.regex is not None:
|
||||
if not re.match('^%s$' % args.regex, filename):
|
||||
continue
|
||||
else:
|
||||
if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
|
||||
continue
|
||||
|
||||
match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line)
|
||||
if match:
|
||||
start_line = int(match.group(1))
|
||||
line_count = 1
|
||||
if match.group(3):
|
||||
line_count = int(match.group(3))
|
||||
if line_count == 0:
|
||||
continue
|
||||
end_line = start_line + line_count - 1
|
||||
lines_by_file.setdefault(filename, []).extend(
|
||||
['-lines', str(start_line) + ':' + str(end_line)])
|
||||
|
||||
# Reformat files containing changes in place.
|
||||
# We need to count amount of bytes generated in the output of
|
||||
# clang-format-diff. If clang-format-diff doesn't generate any bytes it
|
||||
# means there is nothing to format.
|
||||
format_line_counter = 0
|
||||
for filename, lines in lines_by_file.items():
|
||||
if args.i and args.verbose:
|
||||
print('Formatting {}'.format(filename))
|
||||
command = [args.binary, filename]
|
||||
if args.i:
|
||||
command.append('-i')
|
||||
if args.sort_includes:
|
||||
command.append('-sort-includes')
|
||||
command.extend(lines)
|
||||
if args.style:
|
||||
command.extend(['-style', args.style])
|
||||
p = subprocess.Popen(command,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=None,
|
||||
stdin=subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
stdout, _ = p.communicate()
|
||||
if p.returncode != 0:
|
||||
sys.exit(p.returncode)
|
||||
|
||||
if not args.i:
|
||||
with open(filename) as f:
|
||||
code = f.readlines()
|
||||
formatted_code = StringIO(stdout).readlines()
|
||||
diff = difflib.unified_diff(code, formatted_code,
|
||||
filename, filename,
|
||||
'(before formatting)',
|
||||
'(after formatting)')
|
||||
diff_string = ''.join(diff)
|
||||
if diff_string:
|
||||
format_line_counter += sys.stdout.write(diff_string)
|
||||
|
||||
if format_line_counter > 0:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@@ -1,110 +0,0 @@
|
||||
FROM fedora:37
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
atk-devel \
|
||||
at-spi2-atk-devel \
|
||||
avahi-gobject-devel \
|
||||
cairo-devel \
|
||||
cairo-gobject-devel \
|
||||
ccache \
|
||||
clang \
|
||||
clang-analyzer \
|
||||
clang-tools-extra \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dbus-daemon \
|
||||
dbus-x11 \
|
||||
dejavu-sans-mono-fonts \
|
||||
desktop-file-utils \
|
||||
diffutils \
|
||||
docbook-style-xsl \
|
||||
elfutils-libelf-devel \
|
||||
expat-devel \
|
||||
fribidi-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdk-pixbuf2-devel \
|
||||
gdk-pixbuf2-modules \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glib2-static \
|
||||
glibc-devel \
|
||||
glibc-headers \
|
||||
gnome-desktop-testing \
|
||||
gnupg2 \
|
||||
gobject-introspection-devel \
|
||||
graphene-devel \
|
||||
graphviz \
|
||||
gstreamer1-devel \
|
||||
gstreamer1-plugins-good \
|
||||
gstreamer1-plugins-bad-free-devel \
|
||||
gstreamer1-plugins-base-devel \
|
||||
hicolor-icon-theme \
|
||||
iso-codes \
|
||||
itstool \
|
||||
json-glib-devel \
|
||||
lcov \
|
||||
libasan \
|
||||
libattr-devel \
|
||||
libcloudproviders-devel \
|
||||
libepoxy-devel \
|
||||
libffi-devel \
|
||||
libjpeg-turbo-devel \
|
||||
libmount-devel \
|
||||
libpng-devel \
|
||||
librsvg2 \
|
||||
libselinux-devel \
|
||||
libtiff-devel \
|
||||
libubsan \
|
||||
libXcomposite-devel \
|
||||
libXcursor-devel \
|
||||
libXcursor-devel \
|
||||
libXdamage-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libXinerama-devel \
|
||||
libxkbcommon-devel \
|
||||
libXrandr-devel \
|
||||
libXrender-devel \
|
||||
libXtst-devel \
|
||||
libxslt \
|
||||
mesa-dri-drivers \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libGLES-devel \
|
||||
ninja-build \
|
||||
pango-devel \
|
||||
pcre-devel \
|
||||
pcre-static \
|
||||
python3 \
|
||||
python3-docutils \
|
||||
python3-gobject \
|
||||
python3-jinja2 \
|
||||
python3-markdown \
|
||||
python3-pip \
|
||||
python3-pygments \
|
||||
python3-typogrify \
|
||||
python3-wheel \
|
||||
redhat-rpm-config \
|
||||
sassc \
|
||||
vulkan-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
weston \
|
||||
weston-libs \
|
||||
which \
|
||||
xorg-x11-server-Xvfb \
|
||||
&& dnf clean all
|
||||
|
||||
# Enable sudo for wheel users
|
||||
RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV LANG C.UTF-8
|
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
appid=$1
|
||||
|
||||
builddir=flatpak_app
|
||||
repodir=repo
|
||||
|
||||
flatpak-builder \
|
||||
--user --disable-rofiles-fuse \
|
||||
--stop-at=gtk \
|
||||
${builddir} \
|
||||
build-aux/flatpak/${appid}.json
|
||||
|
||||
flatpak build ${builddir} meson \
|
||||
--prefix=/app \
|
||||
--libdir=/app/lib \
|
||||
--buildtype=debugoptimized \
|
||||
-Dx11-backend=true \
|
||||
-Dwayland-backend=true \
|
||||
-Dbuild-tests=false \
|
||||
-Dbuild-examples=false \
|
||||
-Dintrospection=disabled \
|
||||
-Ddemos=true \
|
||||
-Dprofile=devel \
|
||||
_flatpak_build
|
||||
|
||||
flatpak build ${builddir} ninja -C _flatpak_build install
|
||||
|
||||
flatpak-builder \
|
||||
--user --disable-rofiles-fuse \
|
||||
--finish-only \
|
||||
--repo=${repodir} \
|
||||
${builddir} \
|
||||
build-aux/flatpak/${appid}.json
|
||||
|
||||
flatpak build-bundle \
|
||||
${repodir} \
|
||||
${appid}-dev.flatpak \
|
||||
--runtime-repo=https://nightly.gnome.org/gnome-nightly.flatpakrepo \
|
||||
${appid}
|
||||
|
||||
# to be consumed by the nightly publish jobs
|
||||
if [[ $CI_COMMIT_BRANCH == main ]]; then
|
||||
tar cf repo.tar ${repodir}
|
||||
fi
|
@@ -1,375 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Turns a Mason testlog.json file into an HTML report
|
||||
#
|
||||
# Copyright 2019 GNOME Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# Original author: Emmanuele Bassi
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from jinja2 import Template
|
||||
|
||||
REPORT_TEMPLATE = '''
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ report.project_name }} Test Report</title>
|
||||
<meta charset="utf-8" />
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: white;
|
||||
color: #333;
|
||||
font-family: 'Cantarell', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #333333;
|
||||
font-size: 1.9em;
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
border-bottom: 1px solid #333333;
|
||||
}
|
||||
|
||||
header {
|
||||
position: fixed;
|
||||
padding-bottom: 12px;
|
||||
margin-bottom: 24px;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
|
||||
z-index: 500;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
transform: translateY(0px);
|
||||
transition: .2s background-color, color;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
visibility: visible;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
article {
|
||||
padding-top: 200px;
|
||||
margin: 2em;
|
||||
}
|
||||
|
||||
div.report-meta {
|
||||
width: auto;
|
||||
border: 1px solid #ccc;
|
||||
padding: .5em 2em;
|
||||
color: #3c3c3c;
|
||||
}
|
||||
|
||||
span.result {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.pass {
|
||||
color: rgb(51, 209, 122);
|
||||
}
|
||||
|
||||
span.skip {
|
||||
color: rgb(255, 163, 72);
|
||||
}
|
||||
|
||||
span.fail {
|
||||
color: rgb(224, 27, 36);
|
||||
}
|
||||
|
||||
span.xfail {
|
||||
color: rgb(163, 71, 186);
|
||||
}
|
||||
|
||||
div.result {
|
||||
border-top: 1px solid #c0c0c0;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.result h4 {
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
margin-bottom: 0.7em;
|
||||
}
|
||||
|
||||
pre {
|
||||
color: #fafafa;
|
||||
background-color: black;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0px 5px 8px 0px rgba(0, 0, 0, 0.25);
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
border: none;
|
||||
padding: 10px 1em;
|
||||
font-size: 0.9em;
|
||||
overflow: auto;
|
||||
white-space: pre;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
ul.passed li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
ul.passed li:after {
|
||||
content: ",";
|
||||
}
|
||||
|
||||
ul.passed li:last-child:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
ul.images {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
ul.images li {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>{{ report.project_name }}/{{ report.backend }}/{{ report.branch_name }} :: Test Reports</h1>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<section>
|
||||
<div class="report-meta">
|
||||
<p><strong>Backend:</strong> {{ report.backend }}</p>
|
||||
<p><strong>Branch:</strong> {{ report.branch_name }}</p>
|
||||
<p><strong>Date:</strong> <time datetime="{{ report.date.isoformat() }}">{{ report.locale_date }}</time></p>
|
||||
{% if report.job_id %}<p><strong>Job ID:</strong> {{ report.job_id }}</p>{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="summary">
|
||||
<h3><a name="summary">Summary</a></h3>
|
||||
<ul>
|
||||
<li><strong>Total units:</strong> {{ report.total_units }}</li>
|
||||
<li><strong>Failed:</strong> {{ report.total_failures }}</li>
|
||||
<li><strong>Passed:</strong> {{ report.total_successes }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% for suite_result in report.results_list %}
|
||||
<section>
|
||||
<div class="result">
|
||||
<h3><a name="results">Suite: {{ suite_result.suite_name }}</a></h3>
|
||||
<ul>
|
||||
<li><strong>Units:</strong> {{ suite_result.n_units }}</li>
|
||||
<li><strong>Failed:</strong> <a href="#{{ suite_result.suite_name }}-failed">{{ suite_result.n_failures }}</a></li>
|
||||
<li><strong>Passed:</strong> <a href="#{{ suite_result.suite_name }}-passed">{{ suite_result.n_successes }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="failures">
|
||||
<h4><a name="{{ suite_result.suite_name }}-failed">Failures</a></h4>
|
||||
<ul class="failed">
|
||||
{% for failure in suite_result.failures if failure.result in [ 'ERROR', 'FAIL', 'UNEXPECTEDPASS' ] %}
|
||||
<li><a name="{{ failure.name }}">{{ failure.name }}</a> - result: <span class="result fail">{{ failure.result }}</span><br/>
|
||||
{% if failure.stdout %}
|
||||
Output: <pre>{{ failure.stdout }}</pre>
|
||||
{% endif %}
|
||||
{% if failure.image_data is defined %}
|
||||
<ul class="images">
|
||||
<li><img alt="ref" src="{{ failure.image_data.ref }}" /></li>
|
||||
<li><img alt="out" src="{{ failure.image_data.out }}" /></li>
|
||||
<li><img alt="diff" src="{{ failure.image_data.diff }}" /></li>
|
||||
<li><a href="{{ failure.image_data.refnode }}">ref node</a></li>
|
||||
<li><a href="{{ failure.image_data.outnode }}">out node</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-timed-out">Timed out</a></h4>
|
||||
<ul class="failed">
|
||||
{% for failure in suite_result.failures if failure.result == 'TIMEOUT' %}
|
||||
<li><a name="{{ failure.name }}">{{ failure.name }}</a> - result: <span class="result fail">{{ failure.result }}</span><br/>
|
||||
{% if failure.stdout %}
|
||||
Output: <pre>{{ failure.stdout }}</pre>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="successes">
|
||||
<h4><a name="{{ suite_result.suite_name }}-expected-fail">Expected failures</a></h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'EXPECTEDFAIL' %}
|
||||
<li><a name="{{ success.name }}">{{ success.name }}</a> - result: <span class="result xfail">{{ success.result }}</span><br/>
|
||||
{% if success.stdout %}
|
||||
Output: <pre>{{ success.stdout }}</pre>
|
||||
{% endif %}
|
||||
{% if success.image_data is defined %}
|
||||
<ul class="images">
|
||||
<li><img alt="ref" src="{{ success.image_data.ref }}" /></li>
|
||||
<li><img alt="out" src="{{ success.image_data.out }}" /></li>
|
||||
<li><img alt="diff" src="{{ success.image_data.diff }}" /></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-skipped">Skipped</a></h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'SKIP' %}
|
||||
<li>{{ success.name }} - result: <span class="result skip">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-passed">Passed</a></h4>
|
||||
<ul class="passed">
|
||||
{% for success in suite_result.successes if success.result == 'OK' %}
|
||||
<li>{{ success.name }} - result: <span class="result pass">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
||||
'''
|
||||
|
||||
aparser = argparse.ArgumentParser(description='Turns a Meson test log into an HTML report')
|
||||
aparser.add_argument('--project-name', metavar='NAME',
|
||||
help='The project name',
|
||||
default='Unknown')
|
||||
aparser.add_argument('--backend', metavar='NAME',
|
||||
help='The used backend',
|
||||
default='unknown')
|
||||
aparser.add_argument('--job-id', metavar='ID',
|
||||
help='The job ID for the report',
|
||||
default=None)
|
||||
aparser.add_argument('--branch', metavar='NAME',
|
||||
help='Branch of the project being tested',
|
||||
default='main')
|
||||
aparser.add_argument('--output', metavar='FILE',
|
||||
help='The output HTML file, stdout by default',
|
||||
type=argparse.FileType('w', encoding='UTF-8'),
|
||||
default=sys.stdout)
|
||||
aparser.add_argument('--reftest-suite', metavar='NAME',
|
||||
help='The name of the reftests suite',
|
||||
default='reftest')
|
||||
aparser.add_argument('--reftest-output-dir', metavar='DIR',
|
||||
help='The output directory for reftests data',
|
||||
default=None)
|
||||
aparser.add_argument('infile', metavar='FILE',
|
||||
help='The input testlog.json, stdin by default',
|
||||
type=argparse.FileType('r', encoding='UTF-8'),
|
||||
default=sys.stdin)
|
||||
|
||||
args = aparser.parse_args()
|
||||
|
||||
outfile = args.output
|
||||
|
||||
suites = {}
|
||||
for line in args.infile:
|
||||
data = json.loads(line)
|
||||
(full_suite, unit_name) = data['name'].split(' / ')
|
||||
(project_name, suite_name) = full_suite.split(':')
|
||||
|
||||
unit = {
|
||||
'project-name': project_name,
|
||||
'suite': suite_name,
|
||||
'name': unit_name,
|
||||
'duration': data['duration'],
|
||||
'returncode': data['returncode'],
|
||||
'result': data['result'],
|
||||
'stdout': data['stdout'],
|
||||
}
|
||||
|
||||
if args.reftest_output_dir is not None and suite_name == args.reftest_suite:
|
||||
filename = unit_name.split(' ')[1]
|
||||
basename = os.path.splitext(filename)[0]
|
||||
|
||||
image_data = {
|
||||
'ref': os.path.join(args.reftest_output_dir, '{}.ref.png'.format(basename)),
|
||||
'out': os.path.join(args.reftest_output_dir, '{}.out.png'.format(basename)),
|
||||
'refnode': os.path.join(args.reftest_output_dir, '{}.ref.node'.format(basename)),
|
||||
'outnode': os.path.join(args.reftest_output_dir, '{}.out.node'.format(basename)),
|
||||
'diff': os.path.join(args.reftest_output_dir, '{}.diff.png'.format(basename)),
|
||||
}
|
||||
|
||||
unit['image_data'] = image_data
|
||||
|
||||
units = suites.setdefault(full_suite, [])
|
||||
units.append(unit)
|
||||
|
||||
report = {}
|
||||
report['date'] = datetime.datetime.utcnow()
|
||||
report['locale_date'] = report['date'].strftime("%c")
|
||||
report['project_name'] = args.project_name
|
||||
report['backend'] = args.backend
|
||||
report['job_id'] = args.job_id
|
||||
report['branch_name'] = args.branch
|
||||
report['total_successes'] = 0
|
||||
report['total_failures'] = 0
|
||||
report['total_units'] = 0
|
||||
report['results_list'] = []
|
||||
|
||||
for name, units in suites.items():
|
||||
(project_name, suite_name) = name.split(':')
|
||||
print('Processing {} suite {}:'.format(project_name, suite_name))
|
||||
|
||||
def if_failed(unit):
|
||||
if unit['result'] in ['FAIL', 'UNEXPECTEDPASS', 'TIMEOUT', 'ERROR',]:
|
||||
return True
|
||||
return False
|
||||
|
||||
def if_succeded(unit):
|
||||
if unit['result'] in ['OK', 'EXPECTEDFAIL', 'SKIP']:
|
||||
return True
|
||||
return False
|
||||
|
||||
successes = list(filter(if_succeded, units))
|
||||
failures = list(filter(if_failed, units))
|
||||
|
||||
n_units = len(units)
|
||||
n_successes = len(successes)
|
||||
n_failures = len(failures)
|
||||
|
||||
report['total_units'] += n_units
|
||||
report['total_successes'] += n_successes
|
||||
report['total_failures'] += n_failures
|
||||
print(' - {}: {} total, {} pass, {} fail'.format(suite_name, n_units, n_successes, n_failures))
|
||||
|
||||
suite_report = {
|
||||
'suite_name': suite_name,
|
||||
'n_units': n_units,
|
||||
'successes': successes,
|
||||
'n_successes': n_successes,
|
||||
'failures': failures,
|
||||
'n_failures': n_failures,
|
||||
}
|
||||
report['results_list'].append(suite_report)
|
||||
|
||||
template = Template(REPORT_TEMPLATE)
|
||||
outfile.write(template.render({'report': report}))
|
@@ -1,114 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Turns a Meson testlog.json file into a JUnit XML report
|
||||
#
|
||||
# Copyright 2019 GNOME Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# Original author: Emmanuele Bassi
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
aparser = argparse.ArgumentParser(description='Turns a Meson test log into a JUnit report')
|
||||
aparser.add_argument('--project-name', metavar='NAME',
|
||||
help='The project name',
|
||||
default='unknown')
|
||||
aparser.add_argument('--backend', metavar='NAME',
|
||||
help='The used backend',
|
||||
default='unknown')
|
||||
aparser.add_argument('--job-id', metavar='ID',
|
||||
help='The job ID for the report',
|
||||
default='Unknown')
|
||||
aparser.add_argument('--branch', metavar='NAME',
|
||||
help='Branch of the project being tested',
|
||||
default='main')
|
||||
aparser.add_argument('--output', metavar='FILE',
|
||||
help='The output file, stdout by default',
|
||||
type=argparse.FileType('w', encoding='UTF-8'),
|
||||
default=sys.stdout)
|
||||
aparser.add_argument('infile', metavar='FILE',
|
||||
help='The input testlog.json, stdin by default',
|
||||
type=argparse.FileType('r', encoding='UTF-8'),
|
||||
default=sys.stdin)
|
||||
|
||||
args = aparser.parse_args()
|
||||
|
||||
outfile = args.output
|
||||
|
||||
testsuites = ET.Element('testsuites')
|
||||
testsuites.set('id', '{}/{}'.format(args.job_id, args.branch))
|
||||
testsuites.set('package', args.project_name)
|
||||
testsuites.set('timestamp', datetime.datetime.utcnow().isoformat(timespec='minutes'))
|
||||
|
||||
suites = {}
|
||||
for line in args.infile:
|
||||
data = json.loads(line)
|
||||
(full_suite, unit_name) = data['name'].split(' / ')
|
||||
(project_name, suite_name) = full_suite.split(':')
|
||||
|
||||
duration = data['duration']
|
||||
return_code = data['returncode']
|
||||
result = data['result']
|
||||
log = data['stdout']
|
||||
|
||||
unit = {
|
||||
'suite': suite_name,
|
||||
'name': unit_name,
|
||||
'duration': duration,
|
||||
'returncode': return_code,
|
||||
'result': result,
|
||||
'stdout': log,
|
||||
}
|
||||
|
||||
units = suites.setdefault(suite_name, [])
|
||||
units.append(unit)
|
||||
|
||||
for name, units in suites.items():
|
||||
print('Processing suite {} (units: {})'.format(name, len(units)))
|
||||
|
||||
def if_failed(unit):
|
||||
if unit['result'] in ['ERROR', 'FAIL', 'UNEXPECTEDPASS', 'TIMEOUT']:
|
||||
return True
|
||||
return False
|
||||
|
||||
def if_succeded(unit):
|
||||
if unit['result'] in ['OK', 'EXPECTEDFAIL', 'SKIP']:
|
||||
return True
|
||||
return False
|
||||
|
||||
successes = list(filter(if_succeded, units))
|
||||
failures = list(filter(if_failed, units))
|
||||
print(' - {}: {} pass, {} fail'.format(name, len(successes), len(failures)))
|
||||
|
||||
testsuite = ET.SubElement(testsuites, 'testsuite')
|
||||
testsuite.set('name', '{}/{}'.format(args.project_name, name))
|
||||
testsuite.set('tests', str(len(units)))
|
||||
testsuite.set('errors', str(len(failures)))
|
||||
testsuite.set('failures', str(len(failures)))
|
||||
|
||||
for unit in successes:
|
||||
testcase = ET.SubElement(testsuite, 'testcase')
|
||||
testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
|
||||
testcase.set('name', '{}/{}'.format(args.backend, unit['name']))
|
||||
testcase.set('time', str(unit['duration']))
|
||||
|
||||
for unit in failures:
|
||||
testcase = ET.SubElement(testsuite, 'testcase')
|
||||
testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
|
||||
testcase.set('name', '{}/{}'.format(args.backend, unit['name']))
|
||||
testcase.set('time', str(unit['duration']))
|
||||
|
||||
failure = ET.SubElement(testcase, 'failure')
|
||||
failure.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
|
||||
testcase.set('name', '{}/{}'.format(args.backend, unit['name']))
|
||||
failure.set('type', 'error')
|
||||
failure.text = unit['stdout']
|
||||
|
||||
output = ET.tostring(testsuites, encoding='unicode')
|
||||
outfile.write(output)
|
@@ -1,154 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 GNOME Foundation
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
/**
|
||||
* RedHat Fonts taken from https://github.com/RedHatOfficial/RedHatFont
|
||||
* License: SIL Open Font License 1.1 http://scripts.sil.org/OFL
|
||||
*/
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Red+Hat+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-Regular.woff2") format("woff2"),
|
||||
url("RedHatDisplay-Regular.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-RegularItalic.woff2") format("woff2"),
|
||||
url("RedHatDisplay-RegularItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-Medium.woff2") format("woff2"),
|
||||
url("RedHatDisplay-Medium.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-MediumItalic.woff2") format("woff2"),
|
||||
url("RedHatDisplay-MediumItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-Bold.woff2") format("woff2"),
|
||||
url("RedHatDisplay-Bold.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-BoldItalic.woff2") format("woff2"),
|
||||
url("RedHatDisplay-BoldItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-Black.woff2") format("woff2"),
|
||||
url("RedHatDisplay-Black.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplayWeb";
|
||||
src: local('RedHatDisplayWeb'),
|
||||
url("RedHatDisplay-BlackItalic.woff2") format("woff2"),
|
||||
url("RedHatDisplay-BlackItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 900;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatTextWeb";
|
||||
src: local('RedHatTextWeb'),
|
||||
url("RedHatText-Regular.woff2") format("woff2"),
|
||||
url("RedHatText-Regular.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatTextWeb";
|
||||
src: local('RedHatTextWeb'),
|
||||
url("RedHatText-RegularItalic.woff2") format("woff2"),
|
||||
url("RedHatText-RegularItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatTextWeb";
|
||||
src: local('RedHatTextWeb'),
|
||||
url("RedHatText-Medium.woff2") format("woff2"),
|
||||
url("RedHatText-Medium.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatTextWeb";
|
||||
src: local('RedHatTextWeb'),
|
||||
url("RedHatText-MediumItalic.woff2") format("woff2"),
|
||||
url("RedHatText-MediumItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatTextWeb";
|
||||
src: local('RedHatTextWeb'),
|
||||
url("RedHatText-Bold.woff2") format("woff2"),
|
||||
url("RedHatText-Bold.woff") format("woff");
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: fallback;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatTextWeb";
|
||||
src: local('RedHatTextWeb'),
|
||||
url("RedHatText-BoldItalic.woff2") format("woff2"),
|
||||
url("RedHatText-BoldItalic.woff") format("woff");
|
||||
font-style: italic;
|
||||
font-weight: 900;
|
||||
font-display: fallback;
|
||||
}
|
@@ -1,138 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg6843"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
version="1.0"
|
||||
sodipodi:docname="gtk-logo.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
inkscape:export-filename="/home/ebassi/Pictures/gtk-logo-256.png"
|
||||
inkscape:export-xdpi="192"
|
||||
inkscape:export-ydpi="192">
|
||||
<defs
|
||||
id="defs6845">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="-50 : 600 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="700 : 600 : 1"
|
||||
inkscape:persp3d-origin="300 : 400 : 1"
|
||||
id="perspective13" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8284271"
|
||||
inkscape:cx="69.874353"
|
||||
inkscape:cy="64.313526"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
width="128px"
|
||||
height="128px"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid7947" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata6848">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:date />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:publisher>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:publisher>
|
||||
<dc:identifier />
|
||||
<dc:source />
|
||||
<dc:relation />
|
||||
<dc:language />
|
||||
<dc:subject>
|
||||
<rdf:Bag />
|
||||
</dc:subject>
|
||||
<dc:coverage />
|
||||
<dc:description />
|
||||
<dc:contributor>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="" />
|
||||
</cc:Work>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
id="path6976"
|
||||
d="M 20.88413,30.82696 L 53.816977,55.527708 L 107.33282,39.060543 L 70.587303,17.177763 L 20.88413,30.82696 z"
|
||||
style="fill:#729fcf;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.12364459;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
|
||||
<path
|
||||
id="path6978"
|
||||
d="M 22.94243,82.287118 L 20.88413,30.82696 L 53.816977,55.527708 L 53.816977,111.10486 L 22.94243,82.287118 z"
|
||||
style="fill:#e40000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.12364459;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
|
||||
<path
|
||||
id="path6980"
|
||||
d="M 53.816977,111.10486 L 103.21619,90.5207 L 107.33282,39.060543 L 53.816977,55.527708 L 53.816977,111.10486 z"
|
||||
style="fill:#7fe719;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:2.12364459;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccc"
|
||||
id="path6982"
|
||||
d="M 23.216626,81.319479 L 70.48573,67.361442 L 103.38422,90.444516"
|
||||
style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path6984"
|
||||
d="M 70.434539,17.875593 L 70.434539,66.984877"
|
||||
style="opacity:1;fill:#babdb6;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.8 KiB |
@@ -1,149 +0,0 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 GNOME Foundation
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>GTK Documentation</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<meta property="og:site_name" content="https://docs.gtk.org"/>
|
||||
<meta property="og:title" content="GTK Documentation"/>
|
||||
<meta property="og:url" content="https://docs.gtk.org"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:description" content="API reference for GTK"/>
|
||||
|
||||
<meta name="twitter:title" content="GTK Documentation"/>
|
||||
<meta name="twitter:url" content="https://docs.gtk.org"/>
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
|
||||
<link rel="canonical" href="https://docs.gtk.org"/>
|
||||
|
||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||
|
||||
<script src="main.js"></script>
|
||||
|
||||
<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="body-wrapper" tabindex="-1">
|
||||
|
||||
<nav class="sidebar">
|
||||
|
||||
<div class="section">
|
||||
<img src="gtk-logo.svg" class="logo"/>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h5>Sections</h5>
|
||||
<div class="links">
|
||||
<a href="#user-interface">User interface</a>
|
||||
<a href="#core-libraries">Core libraries</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button>
|
||||
|
||||
<section id="main" class="content">
|
||||
<header>
|
||||
<h1>GTK Documentation</h1>
|
||||
</header>
|
||||
|
||||
<div class="toggle-wrapper">
|
||||
<h4 id="user-interface">
|
||||
User interface
|
||||
<a href="#user-interface" class="anchor"></a>
|
||||
</h4>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="gdk">GTK</h5>
|
||||
<p>GTK is the primary library used to construct user interfaces. It
|
||||
provides user interface controls and signal callbacks to respond to
|
||||
user actions.</p>
|
||||
<p><a href="https://docs.gtk.org/gtk4/">GTK API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="gdk">GSK</h5>
|
||||
<p>An intermediate layer which provides a rendering API implemented using Cairo, OpenGL or Vulkan.</p>
|
||||
<p><a href="https://docs.gtk.org/gsk4/">GSK API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="gdk">GDK</h5>
|
||||
<p>An intermediate layer which isolates GTK from the details of the windowing system.</p>
|
||||
<p><a href="https://docs.gtk.org/gdk4/">GDK API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="pango">Pango</h5>
|
||||
<p>Pango is the core text and font handling library used in GTK
|
||||
applications. It has extensive support for the different writing
|
||||
systems used throughout the world.</p>
|
||||
<p><a href="https://docs.gtk.org/Pango/">Pango API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="gdk-pixbuf">GdkPixbuf</h5>
|
||||
<p>GdkPixbuf is a library for image loading and manipulation.</p>
|
||||
<p><a href="https://docs.gtk.org/gdk-pixbuf/">GdkPixbuf API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="cairo">Cairo</h5>
|
||||
<p>Cairo is a 2D graphics library with support for multiple output
|
||||
devices. It is designed to produce consistent, high quality output
|
||||
on all media.</p>
|
||||
<p><a href="https://www.cairographics.org/manual/" class="external">Cairo API reference</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toggle-wrapper">
|
||||
<h4 id="core-libraries" style="display:flex;">
|
||||
Core libraries
|
||||
<a href="#core-libraries" class="anchor"></a>
|
||||
</h4>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="glib">GLib</h5>
|
||||
<p>GLib provides the core application building blocks for libraries
|
||||
and applications written in C. It provides common data types
|
||||
used in GTK, the main loop implementation, and a large set of
|
||||
utility functions for strings and general portability across
|
||||
different platforms.</p>
|
||||
<p><a href="https://developer.gnome.org/glib/" class="external">GLib API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="gobject">GObject</h5>
|
||||
<p>GObject provides the object system used by GTK.</p>
|
||||
<p><a href="https://developer.gnome.org/gobject/" class="external">GObject API reference</a></p>
|
||||
</div>
|
||||
|
||||
<div class="docblock">
|
||||
<h5 id="gio">GIO</h5>
|
||||
<p>GIO provides a portable, modern and easy-to-use file system
|
||||
abstraction API for accessing local and remote files; a set of
|
||||
low and high level abstractions over the <a href="https://www.freedesktop.org/wiki/Software/dbus/" class="external">DBus</a>
|
||||
IPC specification; an application settings API; portable networking
|
||||
abstractions; and additional utilities for writing asynchronous
|
||||
operations without blocking the user interface of your application.</p>
|
||||
<p><a href="https://developer.gnome.org/gio/" class="external">GIO API reference</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -1,140 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2021 GNOME Foundation
|
||||
//
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function hasClass(elem, className) {
|
||||
return elem && elem.classList && elem.classList.contains(className);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function addClass(elem, className) {
|
||||
if (!elem || !elem.classList) {
|
||||
return;
|
||||
}
|
||||
elem.classList.add(className);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function removeClass(elem, className) {
|
||||
if (!elem || !elem.classList) {
|
||||
return;
|
||||
}
|
||||
elem.classList.remove(className);
|
||||
}
|
||||
|
||||
function insertAfter(newNode, referenceNode) {
|
||||
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
|
||||
}
|
||||
|
||||
function onEach(arr, func, reversed) {
|
||||
if (arr && arr.length > 0 && func) {
|
||||
var length = arr.length;
|
||||
var i;
|
||||
if (reversed !== true) {
|
||||
for (i = 0; i < length; ++i) {
|
||||
if (func(arr[i]) === true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = length - 1; i >= 0; --i) {
|
||||
if (func(arr[i]) === true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function onEachLazy(lazyArray, func, reversed) {
|
||||
return onEach(
|
||||
Array.prototype.slice.call(lazyArray),
|
||||
func,
|
||||
reversed);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function hasOwnProperty(obj, property) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, property);
|
||||
}
|
||||
|
||||
window.addEventListener("load", function() {
|
||||
"use strict;"
|
||||
|
||||
var main = document.getElementById("main");
|
||||
var btnToTop = document.getElementById("btn-to-top");
|
||||
|
||||
function labelForToggleButton(isCollapsed) {
|
||||
if (isCollapsed) {
|
||||
return "+";
|
||||
}
|
||||
return "\u2212";
|
||||
}
|
||||
|
||||
function createToggle(isCollapsed) {
|
||||
var toggle = document.createElement("a");
|
||||
toggle.href = "javascript:void(0)";
|
||||
toggle.className = "collapse-toggle";
|
||||
toggle.innerHTML = "[<span class=\"inner\">"
|
||||
+ labelForToggleButton(isCollapsed)
|
||||
+ "</span>]";
|
||||
|
||||
return toggle;
|
||||
}
|
||||
|
||||
function toggleClicked() {
|
||||
if (hasClass(this, "collapsed")) {
|
||||
removeClass(this, "collapsed");
|
||||
this.innerHTML = "[<span class=\"inner\">"
|
||||
+ labelForToggleButton(false)
|
||||
+ "</span>]";
|
||||
onEachLazy(this.parentNode.getElementsByClassName("docblock"), function(e) {
|
||||
removeClass(e, "hidden");
|
||||
});
|
||||
} else {
|
||||
addClass(this, "collapsed");
|
||||
this.innerHTML = "[<span class=\"inner\">"
|
||||
+ labelForToggleButton(true)
|
||||
+ "</span>]";
|
||||
onEachLazy(this.parentNode.getElementsByClassName("docblock"), function(e) {
|
||||
addClass(e, "hidden");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onEachLazy(document.getElementsByClassName("toggle-wrapper"), function(e) {
|
||||
let sectionHeader = e.querySelector(".section-header");
|
||||
let fragmentMatches = sectionHeader !== null && location.hash === "#" + sectionHeader.getAttribute('id');
|
||||
collapsedByDefault = hasClass(e, "default-hide") && !fragmentMatches;
|
||||
var toggle = createToggle(collapsedByDefault);
|
||||
toggle.onclick = toggleClicked;
|
||||
e.insertBefore(toggle, e.firstChild);
|
||||
if (collapsedByDefault) {
|
||||
addClass(toggle, "collapsed");
|
||||
onEachLazy(e.getElementsByClassName("docblock"), function(d) {
|
||||
addClass(d, "hidden");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function scrollBackTop(e) {
|
||||
e.preventDefault();
|
||||
window.scroll({
|
||||
top: 0,
|
||||
behavior: 'smooth',
|
||||
});
|
||||
}
|
||||
|
||||
function toggleScrollButton() {
|
||||
if (window.scrollY < 400) {
|
||||
addClass(btnToTop, "hidden");
|
||||
} else {
|
||||
removeClass(btnToTop, "hidden");
|
||||
}
|
||||
}
|
||||
|
||||
window.onscroll = toggleScrollButton;
|
||||
btnToTop.onclick = scrollBackTop;
|
||||
}, false);
|
@@ -1,747 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 GNOME Foundation
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
@import url("fonts.css");
|
||||
|
||||
/*********************************
|
||||
* LIGHT THEME
|
||||
*********************************/
|
||||
:root {
|
||||
|
||||
/* colors */
|
||||
--text-color: #333;
|
||||
--text-color-muted: #999;
|
||||
--primary: rgb(28, 118, 228);
|
||||
--body-bg: #fff;
|
||||
--sidebar-primary: rgb(144, 194, 255);
|
||||
--sidebar-bg: #151515;
|
||||
--sidebar-selected-bg: var(--primary);
|
||||
--sidebar-text-color: #fafafa;
|
||||
--sidebar-padding: 1.5em;
|
||||
|
||||
/* boxes, e.g. code blocks */
|
||||
--box-bg: rgba(135, 135, 135, 0.085);
|
||||
--box-radius: 0.35rem;
|
||||
--box-padding: 0.75rem;
|
||||
--box-margin: 0.75rem 0;
|
||||
--box-text-color: #111;
|
||||
|
||||
/* typography */
|
||||
--body-font-family: "Noto Serif",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
|
||||
--body-font-scale: 0.95;
|
||||
--body-font-size: calc(var(--body-font-scale) * clamp(16px, 1vw, 20px));
|
||||
--body-font-weight: normal;
|
||||
|
||||
--monospace-font-family: "Source Code Pro", monospace;
|
||||
--monospace-font-size: calc(0.86 * var(--body-font-size)); /* Monospace fonts are very different in terms of font-sizes. Adjust this value to scale it */
|
||||
|
||||
--heading-font-family: "Red Hat Display", var(--body-font-family);
|
||||
--heading-weight: 900;
|
||||
--heading-font-scale: 1.05;
|
||||
|
||||
--heading-small-font-family: var(--heading-font-family);
|
||||
--heading-small-weight: 600;
|
||||
--heading-small-font-scale: 1;
|
||||
|
||||
--heading-table-font-family: var(--heading-font-family);
|
||||
--heading-table-weight: 600;
|
||||
|
||||
--heading-docblock-color: #6d6d6d; /* docblocks have headings from source comments. we want them to differ.*/
|
||||
--heading-docblock-scale: 0.9; /* docblocks have headings from source comments. we want them to differ.*/
|
||||
|
||||
--symbol-font-family: var(--heading-font-family);
|
||||
--symbol-font-weight: 500;
|
||||
--symbol-font-scale: 1;
|
||||
|
||||
--table-font-size: 0.92em; /* Tables often contain lots information. It's better to scale them down a big to get more sutff fitted inside */
|
||||
|
||||
/* misc */
|
||||
--prefered-content-width: 90ch; /* The preferred width for the readable content */
|
||||
--anchor-sign: "#";
|
||||
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* DARK THEME (overrides)
|
||||
*********************************/
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--primary: rgb(144, 194, 255);
|
||||
--text-color: #f6f6f6;
|
||||
--text-color-muted: #686868;
|
||||
--body-bg: #121212;
|
||||
--sidebar-primary: rgb(144, 194, 255);
|
||||
--sidebar-bg: #1e1e1e;
|
||||
--sidebar-selected-bg: rgb(17, 112, 228);
|
||||
--sidebar-text-color: #fafafa;
|
||||
--box-bg: rgba(135, 135, 135, 0.1);
|
||||
--box-text-color: #fff;
|
||||
--heading-docblock-color: #b7b7b7;
|
||||
}
|
||||
|
||||
/* fix dark theme syntax highlighting with a filter (for now) */
|
||||
.highlight pre span {
|
||||
filter: brightness(6);
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* GENERAL STYLING
|
||||
*********************************/
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
color: white;
|
||||
background: var(--primary);
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: white;
|
||||
background: var(--primary);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: rgba(128, 128, 128, 0.6);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(128, 128, 128, 1);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: rgba(128, 128, 128, 0.15);
|
||||
}
|
||||
|
||||
* {
|
||||
scrollbar-width: initial;
|
||||
}
|
||||
|
||||
body {
|
||||
font: 16px/1.5 var(--body-font-family);
|
||||
font-weight: var(--body-font-weight);
|
||||
font-size: var(--body-font-size);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
|
||||
-webkit-font-feature-settings: "kern", "liga";
|
||||
-moz-font-feature-settings: "kern", "liga";
|
||||
font-feature-settings: "kern", "liga";
|
||||
color: var(--text-color);
|
||||
background: var(--body-bg);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--heading-font-family);
|
||||
font-weight: var(--heading-weight);
|
||||
margin: 1.75em 0 0.75em 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.75em * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
|
||||
header h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.4em * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.2em * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
header h3 {
|
||||
color: var(--text-color-muted);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h4, h5 {
|
||||
font-size: calc(1em * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: calc(1em * var(--heading-small-font-scale));
|
||||
font-family: var(--heading-small-font-family);
|
||||
font-weight: var(--heading-small-weight);
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
ul ul, ol ul, ul ol, ol ol {
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 .6em 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
summary {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 3px solid var(--primary);
|
||||
background: var(--box-bg);
|
||||
padding: var(--box-padding);
|
||||
border-radius: var(--box-radius);
|
||||
margin: var(--box--margin);
|
||||
}
|
||||
|
||||
code,
|
||||
pre {
|
||||
font-family: var(--monospace-font-family);
|
||||
font-size: var(--monospace-font-size);
|
||||
color: var(--box-text-color);
|
||||
}
|
||||
|
||||
pre {
|
||||
background: var(--box-bg);
|
||||
padding: var(--box-padding);
|
||||
border-radius: var(--box-radius);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
code {
|
||||
background: var(--box-bg);
|
||||
padding: 0 0.35em;
|
||||
border-radius: 0.35rem;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
a > code {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
|
||||
pre pre,
|
||||
pre code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 1em;
|
||||
background: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
|
||||
strong, b {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* fix unwanted margins in tables, code, lists and blockquotes */
|
||||
li > *:first-child,
|
||||
li > *:first-child > *:first-child,
|
||||
li > *:first-child > *:first-child > *:first-child,
|
||||
td > *:first-child,
|
||||
td > *:first-child > *:first-child,
|
||||
td > *:first-child > *:first-child > *:first-child,
|
||||
pre > *:first-child,
|
||||
pre > *:first-child > *:first-child,
|
||||
pre > *:first-child > *:first-child > *:first-child,
|
||||
blockquote > *:first-child,
|
||||
blockquote > *:first-child > *:first-child,
|
||||
blockquote > *:first-child > *:first-child > *:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
li > *:last-child,
|
||||
li > *:last-child > *:last-child,
|
||||
li > *:last-child > *:last-child > *:last-child,
|
||||
td > *:last-child,
|
||||
td > *:last-child > *:last-child,
|
||||
td > *:last-child > *:last-child > *:last-child,
|
||||
pre > *:last-child,
|
||||
pre > *:last-child > *:last-child,
|
||||
pre > *:last-child > *:last-child > *:last-child,
|
||||
blockquote > *:last-child,
|
||||
blockquote > *:last-child > *:last-child,
|
||||
blockquote > *:last-child > *:last-child > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* PAGE STRUCTURE
|
||||
*********************************/
|
||||
#body-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
#body-wrapper:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#main {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
box-shadow: 0 0 134px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* Button
|
||||
*********************************/
|
||||
|
||||
#btn-to-top {
|
||||
position: fixed;
|
||||
bottom: 12px;
|
||||
right: 32px;
|
||||
z-index: 1000;
|
||||
border-radius: 50%;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border: 1px solid var(--primary);
|
||||
background: var(--box-bg);
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
#btn-to-top > .up-arrow:after {
|
||||
content: "🡅"
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* SIDEBAR
|
||||
*********************************/
|
||||
.sidebar {
|
||||
scrollbar-width: thin;
|
||||
background: var(--sidebar-bg);
|
||||
border-right: 1px solid var(--sidebar-bg);
|
||||
min-width: 40ch;
|
||||
padding: var(--sidebar-padding);
|
||||
color: var(--sidebar-text-color);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
height: 100vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sidebar a,
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.sidebar .logo {
|
||||
display: block;
|
||||
margin: 2rem auto 0 auto;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.sidebar .section > ul > li {
|
||||
margin-right: -10px;
|
||||
}
|
||||
|
||||
.sidebar .section h3, .sidebar .section h5 {
|
||||
text-align: left;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
font-weight: var(--heading-weight);
|
||||
}
|
||||
|
||||
.sidebar .section h5 {
|
||||
font-size: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.sidebar .namespace > h3 {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
font-size: 1.5em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.sidebar .namespace > p {
|
||||
font-size: 0.9em;
|
||||
opacity: 0.8;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.sidebar .section {
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.sidebar .links {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.sidebar .section a {
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
transition: background-color 150ms ease;
|
||||
color: var(--sidebar-primary);
|
||||
border-radius: var(--box-radius);
|
||||
padding: 0.2rem 0.5rem;
|
||||
margin-bottom: 0.15rem;
|
||||
}
|
||||
|
||||
.sidebar .section a:hover {
|
||||
background-color: rgba(127, 127, 127, 0.2);
|
||||
color: var(--sidebar-text-color);
|
||||
}
|
||||
|
||||
.sidebar .section a.current {
|
||||
background-color: var(--sidebar-selected-bg);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.sidebar .search {
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar .search input[type="text"] {
|
||||
border-color: transparent;
|
||||
width: 100%;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 50px;
|
||||
padding: 6px 12px;
|
||||
display: inline-block;
|
||||
font-size: 80%;
|
||||
box-shadow: inset 0 1px 3px #ddd;
|
||||
transition: border .3s linear;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* ANCHORS & TOGGLERS
|
||||
*********************************/
|
||||
.anchor,
|
||||
.md-anchor {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
text-decoration: none;
|
||||
padding: 0 0.5em;
|
||||
color: var(--text-color-muted);
|
||||
}
|
||||
|
||||
.anchor:hover,
|
||||
.md-anchor:hover {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.anchor:not([href]),
|
||||
.md-anchor:not([href]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.anchor:before,
|
||||
.md-anchor:before {
|
||||
content: var(--anchor-sign); /*'§'*/
|
||||
}
|
||||
|
||||
.toggle-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.collapse-toggle {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
left: -2em;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
font-size: 0.8em;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.collapse-toggle > .inner {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border-radius: calc(0.75 * var(--box-radius));
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: var(--box-text-color);
|
||||
position: relative;
|
||||
left: -0.25rem;
|
||||
font-family: monospace;
|
||||
font-size: 0.7rem;
|
||||
font-weight: bold;
|
||||
background: var(--box-bg);
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* UTILITY
|
||||
*********************************/
|
||||
.deprecated > h6 > a {
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* CONTENT STYLING
|
||||
*********************************/
|
||||
.content {
|
||||
padding: 2em 4em;
|
||||
overflow: visible;
|
||||
max-width: calc(var(--prefered-content-width) + 8em);
|
||||
}
|
||||
|
||||
.content table:not(.table-display) {
|
||||
border-spacing: 0 0.25rem;
|
||||
}
|
||||
|
||||
.content td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.content td:first-child {
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.content td p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.content td h1, .content td h2 {
|
||||
margin-left: 0;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.content tr:first-child td {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font: 15px monospace;
|
||||
line-height: 10px;
|
||||
vertical-align: middle;
|
||||
border: solid 1px;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.content tr:first-child {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.content td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.content td:first-child {
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.content td p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.content td h4, .content td h5 {
|
||||
margin-left: 0;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.content tr:first-child td {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.srclink {
|
||||
color: var(--text-color-muted);
|
||||
font-size: 1rem;
|
||||
font-weight: var(--body-font-weight);
|
||||
flex-grow: 0;
|
||||
text-decoration: none;
|
||||
margin-left: auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.meta tr > td:not(:first-child) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.meta tr > td:first-child {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*********************************
|
||||
* DOCBLOCK STYLING
|
||||
*********************************/
|
||||
.docblock {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.docblock h1 {
|
||||
font-size: calc(1.3em * var(--heading-docblock-scale) * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
.docblock h2 {
|
||||
font-size: calc(1.2em * var(--heading-docblock-scale) * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
.docblock h3 {
|
||||
font-size: calc(1.1em * var(--heading-docblock-scale) * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
.docblock h4 {
|
||||
font-size: calc(1.05em * var(--heading-docblock-scale) * var(--heading-font-scale));
|
||||
}
|
||||
|
||||
.docblock h1,
|
||||
.docblock h2,
|
||||
.docblock h3,
|
||||
.docblock h4,
|
||||
.docblock h5,
|
||||
.docblock h6 {
|
||||
color: var(--heading-docblock-color)
|
||||
}
|
||||
|
||||
.docblock table {
|
||||
margin: .25em 0;
|
||||
max-width: 100%;
|
||||
font-size: var(--table-font-size);
|
||||
}
|
||||
|
||||
.docblock table td {
|
||||
padding: .25em;
|
||||
}
|
||||
|
||||
.docblock table th {
|
||||
padding: .25em;
|
||||
text-align: left;
|
||||
font-family: var(--heading-table-font-family);
|
||||
font-weight: var(--heading-table-weight);
|
||||
}
|
||||
|
||||
.docblock table tr th:first-child,
|
||||
.docblock table tr td:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.docblock table tr th:last-child,
|
||||
.docblock table tr td:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
table.enum-members,
|
||||
table.results {
|
||||
border-radius: var(--box-radius);
|
||||
border: 1px solid var(--text-color-muted);
|
||||
border-spacing: 0 0 !important;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
table.enum-members tr th,
|
||||
table.results tr th {
|
||||
border-top-color: var(--body-bg);
|
||||
background-color: var(--box-bg);
|
||||
border-bottom: 1px solid var(--text-color-muted);
|
||||
}
|
||||
|
||||
table.enum-members tr th:first-child,
|
||||
table.enum-members tr td:first-child {
|
||||
min-width: 25em;
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
table.results tr th:first-child,
|
||||
table.results tr td:first-child {
|
||||
padding-left: .5em;
|
||||
}
|
||||
|
||||
table.enum-members tr th:last-child,
|
||||
table.enum-members tr td:last-child,
|
||||
table.results tr th:last-child,
|
||||
table.results tr td:last-child {
|
||||
max-width: 35em;
|
||||
padding-right: .5em;
|
||||
}
|
||||
|
||||
table.results tr td code {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.docblock ul li,
|
||||
.docblock ol li {
|
||||
padding-top: 0.15rem;
|
||||
padding-bottom: 0.15rem;
|
||||
}
|
||||
|
||||
.docblock ul.type {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.docblock ul.type li::before {
|
||||
content: "»";
|
||||
color: var(--text-color);
|
||||
display: inline-block;
|
||||
width: 1em;
|
||||
margin-left: -1em;
|
||||
}
|
||||
|
||||
/**************************
|
||||
RESPONSIVENESS
|
||||
**************************/
|
||||
@media (max-width: 700px) {
|
||||
body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
#body-wrapper {
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#main {
|
||||
width: 100%;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: static;
|
||||
height: initial;
|
||||
order: 1;
|
||||
}
|
||||
}
|
@@ -1,135 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
read_arg() {
|
||||
# $1 = arg name
|
||||
# $2 = arg value
|
||||
# $3 = arg parameter
|
||||
local rematch='^[^=]*=(.*)$'
|
||||
if [[ $2 =~ $rematch ]]; then
|
||||
read "$1" <<< "${BASH_REMATCH[1]}"
|
||||
else
|
||||
read "$1" <<< "$3"
|
||||
# There is no way to shift our callers args, so
|
||||
# return 1 to indicate they should do it instead.
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
build=0
|
||||
run=0
|
||||
push=0
|
||||
list=0
|
||||
print_help=0
|
||||
no_login=0
|
||||
|
||||
while (($# > 0)); do
|
||||
case "${1%%=*}" in
|
||||
build) build=1;;
|
||||
run) run=1;;
|
||||
push) push=1;;
|
||||
list) list=1;;
|
||||
help) print_help=1;;
|
||||
--base|-b) read_arg base "$@" || shift;;
|
||||
--version|-v) read_arg base_version "$@" || shift;;
|
||||
--no-login) no_login=1;;
|
||||
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $print_help == 1 ]; then
|
||||
echo "$0 - Build and run Docker images"
|
||||
echo ""
|
||||
echo "Usage: $0 <command> [options] [basename]"
|
||||
echo ""
|
||||
echo "Available commands"
|
||||
echo ""
|
||||
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
|
||||
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
|
||||
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
|
||||
echo " list - List available images"
|
||||
echo " help - This help message"
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ $list == 1 ]; then
|
||||
echo "Available Docker images:"
|
||||
for f in *.Dockerfile; do
|
||||
filename=$( basename -- "$f" )
|
||||
basename="${filename%.*}"
|
||||
|
||||
echo -e " \e[1;39m$basename\e[0m"
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# All commands after this require --base to be set
|
||||
if [ -z $base ]; then
|
||||
echo "Usage: $0 <command>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$base.Dockerfile" ]; then
|
||||
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $base_version ]; then
|
||||
base_version="latest"
|
||||
elif [ $base_version != "latest" ]; then
|
||||
base_version="v$base_version"
|
||||
fi
|
||||
|
||||
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
|
||||
# Docker is actually implemented by podman, and its OCI output
|
||||
# is incompatible with some of the dockerd instances on GitLab
|
||||
# CI runners.
|
||||
echo "Using: Podman"
|
||||
format="--format docker"
|
||||
CMD="podman"
|
||||
else
|
||||
echo "Using: Docker"
|
||||
format=""
|
||||
CMD="sudo docker"
|
||||
fi
|
||||
|
||||
REGISTRY="registry.gitlab.gnome.org"
|
||||
TAG="${REGISTRY}/gnome/gtk/${base}:${base_version}"
|
||||
|
||||
if [ $build == 1 ]; then
|
||||
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} build \
|
||||
${format} \
|
||||
--build-arg HOST_USER_ID="$UID" \
|
||||
--tag "${TAG}" \
|
||||
--file "${base}.Dockerfile" .
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $push == 1 ]; then
|
||||
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
|
||||
|
||||
if [ $no_login == 0 ]; then
|
||||
${CMD} login ${REGISTRY}
|
||||
fi
|
||||
|
||||
${CMD} push ${TAG}
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $run == 1 ]; then
|
||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} run \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--workdir "/home/user/app" \
|
||||
--tty \
|
||||
--interactive "${TAG}" \
|
||||
bash
|
||||
exit $?
|
||||
fi
|
@@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ancestor_horizon=31 # days (one month)
|
||||
|
||||
# Recently, git is picky about directory ownership. Tell it not to worry.
|
||||
git config --global --add safe.directory "$PWD"
|
||||
|
||||
# We need to add a new remote for the upstream target branch, since this script
|
||||
# could be running in a personal fork of the repository which has out of date
|
||||
# branches.
|
||||
#
|
||||
# Limit the fetch to a certain date horizon to limit the amount of data we get.
|
||||
# If the branch was forked from origin/main before this horizon, it should
|
||||
# probably be rebased.
|
||||
if ! git ls-remote --exit-code upstream >/dev/null 2>&1 ; then
|
||||
git remote add upstream https://gitlab.gnome.org/GNOME/gtk.git
|
||||
fi
|
||||
|
||||
# Work out the newest common ancestor between the detached HEAD that this CI job
|
||||
# has checked out, and the upstream target branch (which will typically be
|
||||
# `upstream/main` or `upstream/glib-2-62`).
|
||||
# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` or `${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}`
|
||||
# are only defined if we’re running in a merge request pipeline,
|
||||
# fall back to `${CI_DEFAULT_BRANCH}` or `${CI_COMMIT_BRANCH}` respectively
|
||||
# otherwise.
|
||||
|
||||
source_branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-${CI_COMMIT_BRANCH}}"
|
||||
target_branch="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}"
|
||||
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" origin "${source_branch}"
|
||||
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream "${target_branch}"
|
||||
|
||||
newest_common_ancestor_sha=$(git merge-base upstream/${target_branch} origin/${source_branch})
|
||||
if [ -z "${newest_common_ancestor_sha}" ]; then
|
||||
echo "Couldn’t find common ancestor with upstream main branch. This typically"
|
||||
echo "happens if you branched from main a long time ago. Please update"
|
||||
echo "your clone, rebase, and re-push your branch."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git diff -U0 --no-color "${newest_common_ancestor_sha}" | .gitlab-ci/clang-format-diff.py -binary "clang-format" -p1
|
||||
exit_status=$?
|
||||
|
||||
# The style check is not infallible. The clang-format configuration cannot
|
||||
# perfectly describe GTK’s coding style: in particular, it cannot align
|
||||
# function arguments. The documented coding style for GTK takes priority over
|
||||
# clang-format suggestions. Hopefully we can eventually improve clang-format to
|
||||
# be configurable enough for our coding style. That’s why this CI check is OK
|
||||
# to fail: the idea is that people can look through the output and ignore it if
|
||||
# it’s wrong. (That situation can also happen if someone touches pre-existing
|
||||
# badly formatted code and it doesn’t make sense to tidy up the wider coding
|
||||
# style with the changes they’re making.)
|
||||
echo ""
|
||||
echo "Note that clang-format output is advisory and cannot always match the"
|
||||
echo "GTK coding style, documented at:"
|
||||
echo " https://gitlab.gnome.org/GNOME/gtk/blob/main/docs/CODING-STYLE.md"
|
||||
echo "Warnings from this tool can be ignored in favour of the documented "
|
||||
echo "coding style, or in favour of matching the style of existing"
|
||||
echo "surrounding code."
|
||||
|
||||
exit ${exit_status}
|
@@ -1,147 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set +x
|
||||
set +e
|
||||
|
||||
srcdir=$( pwd )
|
||||
builddir=$1
|
||||
backend=$2
|
||||
|
||||
# Ignore memory leaks lower in dependencies
|
||||
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:verbosity=1:log_threads=1
|
||||
export G_SLICE=always-malloc
|
||||
|
||||
case "${backend}" in
|
||||
x11)
|
||||
xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
--no-suite=failing \
|
||||
--no-suite=flaky \
|
||||
--no-suite=gsk-compare-broadway
|
||||
|
||||
# Store the exit code for the CI run, but always
|
||||
# generate the reports
|
||||
exit_code=$?
|
||||
|
||||
xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend}_unstable \
|
||||
--suite=flaky \
|
||||
--suite=failing || true
|
||||
;;
|
||||
|
||||
wayland)
|
||||
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
||||
|
||||
weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 &
|
||||
compositor=$!
|
||||
export WAYLAND_DISPLAY=wayland-5
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
--no-suite=failing \
|
||||
--no-suite=flaky \
|
||||
--no-suite=gsk-compare-broadway
|
||||
exit_code=$?
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend}_unstable \
|
||||
--suite=flaky \
|
||||
--suite=failing || true
|
||||
|
||||
kill ${compositor}
|
||||
;;
|
||||
|
||||
waylandgles)
|
||||
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
||||
|
||||
weston --backend=headless-backend.so --socket=wayland-6 --idle-time=0 &
|
||||
compositor=$!
|
||||
export WAYLAND_DISPLAY=wayland-6
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
--no-suite=failing \
|
||||
--no-suite=flaky \
|
||||
--no-suite=gsk-compare-broadway
|
||||
exit_code=$?
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend}_unstable \
|
||||
--suite=flaky \
|
||||
--suite=failing || true
|
||||
|
||||
kill ${compositor}
|
||||
;;
|
||||
|
||||
broadway)
|
||||
export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
||||
|
||||
${builddir}/gdk/broadway/gtk4-broadwayd :5 &
|
||||
server=$!
|
||||
export BROADWAY_DISPLAY=:5
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
--no-suite=failing \
|
||||
--no-suite=flaky \
|
||||
--no-suite=gsk-compare-opengl
|
||||
|
||||
# don't let Broadway failures fail the run, for now
|
||||
exit_code=0
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend}_unstable \
|
||||
--suite=flaky \
|
||||
--suite=failing || true
|
||||
|
||||
kill ${server}
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Failed to add ${backend} to .gitlab-ci/run-tests.sh"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
cd ${builddir}
|
||||
|
||||
for suffix in "" "_unstable"; do
|
||||
$srcdir/.gitlab-ci/meson-junit-report.py \
|
||||
--project-name=gtk \
|
||||
--backend="${backend}${suffix}" \
|
||||
--job-id="${CI_JOB_NAME}" \
|
||||
--output="report-${backend}${suffix}.xml" \
|
||||
"meson-logs/testlog-${backend}${suffix}.json"
|
||||
$srcdir/.gitlab-ci/meson-html-report.py \
|
||||
--project-name=gtk \
|
||||
--backend="${backend}${suffix}" \
|
||||
--job-id="${CI_JOB_NAME}" \
|
||||
--reftest-output-dir="testsuite/reftests/output/${backend}${suffix}" \
|
||||
--output="report-${backend}${suffix}.html" \
|
||||
"meson-logs/testlog-${backend}${suffix}.json"
|
||||
done
|
||||
|
||||
exit $exit_code
|
@@ -1,5 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
echo $PRETTY_NAME
|
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux -o pipefail
|
||||
|
||||
xcodebuild -version || :
|
||||
xcodebuild -showsdks || :
|
||||
|
||||
system_profiler SPSoftwareDataType || :
|
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
srcdir=$(pwd)
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
ccache --zero-stats
|
||||
ccache --show-stats
|
||||
export CCACHE_DISABLE=true
|
||||
meson \
|
||||
-Dx11-backend=true \
|
||||
-Dwayland-backend=true \
|
||||
-Dbroadway-backend=true \
|
||||
-Dvulkan=enabled \
|
||||
-Dprofiler=true \
|
||||
--werror \
|
||||
${EXTRA_MESON_FLAGS:-} \
|
||||
_build $srcdir
|
||||
unset CCACHE_DISABLE
|
||||
|
||||
cd _build
|
||||
|
||||
ninja
|
||||
ccache --show-stats
|
||||
|
||||
set +e
|
||||
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test \
|
||||
--timeout-multiplier 2 \
|
||||
--print-errorlogs \
|
||||
--suite=gtk \
|
||||
--no-suite=gtk:a11y
|
||||
|
||||
# Save the exit code
|
||||
exit_code=$?
|
||||
|
||||
# We always want to run the report generators
|
||||
$srcdir/.gitlab-ci/meson-junit-report.py \
|
||||
--project-name=gtk \
|
||||
--job-id="${CI_JOB_NAME}" \
|
||||
--output=report.xml \
|
||||
meson-logs/testlog.json
|
||||
|
||||
$srcdir/.gitlab-ci/meson-html-report.py \
|
||||
--project-name=GTK \
|
||||
--job-id="${CI_JOB_NAME}" \
|
||||
--reftest-output-dir="testsuite/reftests/output" \
|
||||
--output=report.html \
|
||||
meson-logs/testlog.json
|
||||
|
||||
exit $exit_code
|
@@ -1,14 +0,0 @@
|
||||
@echo on
|
||||
:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
|
||||
:: specified build architecture
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
@echo on
|
||||
|
||||
:: FIXME: make warnings fatal
|
||||
pip3 install --upgrade --user meson~=0.64 || goto :error
|
||||
meson -Ddebug=false -Dmedia-gstreamer=disabled _build || goto :error
|
||||
ninja -C _build || goto :error
|
||||
|
||||
goto :EOF
|
||||
:error
|
||||
exit /b 1
|
@@ -1,58 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
||||
export MSYS2_ARCH="i686"
|
||||
else
|
||||
export MSYS2_ARCH="x86_64"
|
||||
fi
|
||||
|
||||
# Update everything
|
||||
pacman --noconfirm -Suy
|
||||
|
||||
# Install the required packages
|
||||
pacman --noconfirm -S --needed \
|
||||
base-devel \
|
||||
git \
|
||||
mingw-w64-$MSYS2_ARCH-cc \
|
||||
mingw-w64-$MSYS2_ARCH-ccache \
|
||||
mingw-w64-$MSYS2_ARCH-pkgconf \
|
||||
mingw-w64-$MSYS2_ARCH-gobject-introspection \
|
||||
mingw-w64-$MSYS2_ARCH-meson \
|
||||
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
|
||||
mingw-w64-$MSYS2_ARCH-atk \
|
||||
mingw-w64-$MSYS2_ARCH-cairo \
|
||||
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
|
||||
mingw-w64-$MSYS2_ARCH-glib2 \
|
||||
mingw-w64-$MSYS2_ARCH-graphene \
|
||||
mingw-w64-$MSYS2_ARCH-json-glib \
|
||||
mingw-w64-$MSYS2_ARCH-libepoxy \
|
||||
mingw-w64-$MSYS2_ARCH-pango \
|
||||
mingw-w64-$MSYS2_ARCH-fribidi \
|
||||
mingw-w64-$MSYS2_ARCH-gst-plugins-bad-libs \
|
||||
mingw-w64-$MSYS2_ARCH-shared-mime-info \
|
||||
mingw-w64-$MSYS2_ARCH-python-gobject
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
# Build
|
||||
ccache --zero-stats
|
||||
ccache --show-stats
|
||||
export CCACHE_DISABLE=true
|
||||
meson \
|
||||
-Dx11-backend=false \
|
||||
-Dwayland-backend=false \
|
||||
-Dwin32-backend=true \
|
||||
-Dvulkan=disabled \
|
||||
-Dintrospection=enabled \
|
||||
-Dgtk:werror=true \
|
||||
_build
|
||||
unset CCACHE_DISABLE
|
||||
|
||||
ninja -C _build
|
||||
ccache --show-stats
|
||||
|
||||
tar zcf _build/gtkdll.tar.gz _build/gtk/libgtk*.dll
|
@@ -1,48 +0,0 @@
|
||||
<!--
|
||||
Please, read the CONTRIBUTING.md guide on how to file a new issue.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/CONTRIBUTING.md
|
||||
-->
|
||||
## Steps to reproduce
|
||||
<!--
|
||||
Please, explain the sequence of actions necessary to reproduce the
|
||||
bug
|
||||
-->
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
<!--
|
||||
You should try and reproduce with the demos applications available
|
||||
under the `demos` directory, or the test programs in the `tests` directory.
|
||||
Alternatively, please attach a *small and self-contained* example
|
||||
*written in C* that exhibits the issue.
|
||||
-->
|
||||
|
||||
## Current behavior
|
||||
<!--
|
||||
Please describe the current behaviour
|
||||
-->
|
||||
|
||||
## Expected outcome
|
||||
<!--
|
||||
Please describe the expected outcome
|
||||
-->
|
||||
|
||||
## Version information
|
||||
<!--
|
||||
- Which version of GTK you are using
|
||||
- What operating system and version
|
||||
- For Linux, which distribution
|
||||
- If you built GTK yourself, the list of options used to configure the build
|
||||
-->
|
||||
|
||||
## Additional information
|
||||
<!--
|
||||
- Screenshots or screen recordings are useful for visual errors
|
||||
- Attaching a screenshot or a video without explaining the current
|
||||
behavior and the actions necessary to reproduce the bug will lead
|
||||
to the bug being closed
|
||||
- Please report any warning or message printed on the terminal
|
||||
-->
|
@@ -1,44 +0,0 @@
|
||||
<!--
|
||||
Please, read the CONTRIBUTING.md guide on how to file a new issue.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/CONTRIBUTING.md
|
||||
-->
|
||||
|
||||
## Steps to reproduce
|
||||
<!--
|
||||
Please, explain the sequence of actions necessary to reproduce the
|
||||
crash
|
||||
-->
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
<!--
|
||||
You should try and reproduce with the demos applications available
|
||||
under the `demos` directory, or the test programs in the `tests` directory.
|
||||
Alternatively, please attach a *small and self-contained* example that
|
||||
exhibits the issue.
|
||||
-->
|
||||
|
||||
## Version information
|
||||
<!--
|
||||
- Which version of GTK you are using
|
||||
- What operating system and version
|
||||
- for Linux, which distribution
|
||||
- If you built GTK yourself, the list of options used to configure the build
|
||||
-->
|
||||
|
||||
## Warnings
|
||||
<!--
|
||||
- If the application generates warning messages before crashing please
|
||||
report them here
|
||||
-->
|
||||
|
||||
## Backtrace
|
||||
<!--
|
||||
- Attaching a stack trace obtained using GDB is appreciated; follow the
|
||||
instructions on the wiki:
|
||||
|
||||
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
|
||||
-->
|
63
AUTHORS
63
AUTHORS
@@ -1,14 +1,14 @@
|
||||
Please do not mail any of the authors listed here
|
||||
asking questions about this version of GTK.
|
||||
|
||||
Original Authors
|
||||
----------------
|
||||
Peter Mattis <petm@xcf.berkeley.edu>
|
||||
Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
|
||||
The Team that build GTK 2 (in alphabetical order)
|
||||
-------------------------------------------------
|
||||
Please do not mail the original authors asking questions about this
|
||||
version of GTK+.
|
||||
|
||||
The GTK+ Team (in alphabetical order)
|
||||
-------------------------------------
|
||||
Shawn T. Amundson <amundson@gtk.org>
|
||||
Jerome Bolliet <bolliet@gtk.org>
|
||||
Damon Chaplin <damon@gtk.org>
|
||||
@@ -28,56 +28,5 @@ Jay Painter <jpaint@gtk.org>
|
||||
Manish Singh <manish@gtk.org>
|
||||
Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
The current team (GTK 3 and 4)
|
||||
------------------------------
|
||||
|
||||
Jonas Ådahl <jadahl@gmail.com>
|
||||
Tim Bäder <mail@baedert.org>
|
||||
Emmanuele Bassi <ebassi@gnome.org>
|
||||
Chun-wei Fan <fanchunwei@src.gnome.org>
|
||||
Matthias Clasen <mclasen@redhat.com>
|
||||
Carlos Garnacho <mrgarnacho@gmail.com>
|
||||
Alexander Larsson <alexl@redhat.com>
|
||||
Benjamin Otte <otte@gnome.org>
|
||||
|
||||
|
||||
There are many others who have contributed patches; we thank them,
|
||||
GTK is much better because of them.
|
||||
|
||||
|
||||
Over time, GTK has incorporated some pieces of software which
|
||||
started as independent projects. We list the original authors here:
|
||||
|
||||
|
||||
MS-Windows theme engine
|
||||
-----------------------
|
||||
Raymond Penners
|
||||
Dom Lachowicz
|
||||
|
||||
|
||||
Pixbuf theme engine
|
||||
-------------------
|
||||
Owen Taylor
|
||||
|
||||
|
||||
IME input method
|
||||
----------------
|
||||
Takuro Ashie
|
||||
Kazuki IWAMOTO
|
||||
|
||||
|
||||
Mac OS X backend
|
||||
----------------
|
||||
Anders Carlsson
|
||||
|
||||
|
||||
DirectFB backend
|
||||
----------------
|
||||
Denis Oliver Kropp
|
||||
Sven Neumann
|
||||
Mike Emmel
|
||||
|
||||
|
||||
gtkparasite
|
||||
-----------
|
||||
Christian Hammond
|
||||
GTK+ is much better because of them.
|
||||
|
267
CONTRIBUTING.md
267
CONTRIBUTING.md
@@ -1,267 +0,0 @@
|
||||
# Contribution guidelines
|
||||
|
||||
Thank you for considering contributing to the GTK project!
|
||||
|
||||
These guidelines are meant for new contributors, regardless of their level
|
||||
of proficiency; following them allows the maintainers of the GTK project to
|
||||
more effectively evaluate your contribution, and provide prompt feedback to
|
||||
you. Additionally, by following these guidelines you clearly communicate
|
||||
that you respect the time and effort that the people developing GTK put into
|
||||
managing the project.
|
||||
|
||||
GTK is a complex free software GUI toolkit, and it would not exist without
|
||||
contributions from the free and open source software community. There are
|
||||
many things that we value:
|
||||
|
||||
- bug reporting and fixing
|
||||
- documentation and examples
|
||||
- tests
|
||||
- new features
|
||||
|
||||
Please, do not use the issue tracker for support questions. If you have
|
||||
questions on how to use GTK effectively, you can use:
|
||||
|
||||
- the `#gtk` IRC channel on irc.gnome.org
|
||||
- the [gtk tag on the GNOME Discourse instance](https://discourse.gnome.org/tag/gtk)
|
||||
|
||||
You can also look at the GTK tag on [Stack
|
||||
Overflow](https://stackoverflow.com/questions/tagged/gtk).
|
||||
|
||||
The issue tracker is meant to be used for actionable issues only.
|
||||
|
||||
## How to report bugs
|
||||
|
||||
### Security issues
|
||||
|
||||
You should not open a new issue for security related questions.
|
||||
|
||||
When in doubt, send an email to the [security](mailto:security@gnome.org)
|
||||
mailing list.
|
||||
|
||||
### Bug reports
|
||||
|
||||
If you're reporting a bug make sure to list:
|
||||
|
||||
0. which version of GTK are you using?
|
||||
0. which operating system are you using?
|
||||
0. the necessary steps to reproduce the issue
|
||||
0. the expected outcome
|
||||
0. a description of the behavior; screenshots are also welcome
|
||||
0. a small, self-contained example exhibiting the behavior; if this
|
||||
is not available, try reproducing the issue using the GTK examples
|
||||
or interactive tests
|
||||
|
||||
If the issue includes a crash, you should also include:
|
||||
|
||||
0. the eventual warnings printed on the terminal
|
||||
0. a backtrace, obtained with tools such as GDB or LLDB
|
||||
|
||||
It is fine to include screenshots of screen recordings to demonstrate
|
||||
an issue that is best to understand visually, but please don't just
|
||||
dump screen recordings without further details into issues. It is
|
||||
essential that the problem is described in enough detail to reproduce
|
||||
it without watching a video.
|
||||
|
||||
For small issues, such as:
|
||||
|
||||
- spelling/grammar fixes in the documentation
|
||||
- typo correction
|
||||
- comment clean ups
|
||||
- changes to metadata files (CI, `.gitignore`)
|
||||
- build system changes
|
||||
- source tree clean ups and reorganizations
|
||||
|
||||
You should directly open a merge request instead of filing a new issue.
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
Feature discussion can be open ended and require high bandwidth channels; if
|
||||
you are proposing a new feature on the issue tracker, make sure to make
|
||||
an actionable proposal, and list:
|
||||
|
||||
0. what you're trying to achieve
|
||||
0. prior art, in other toolkits or applications
|
||||
0. design and theming changes
|
||||
|
||||
If you're proposing the integration of new features it helps to have
|
||||
multiple applications using shared or similar code, especially if they have
|
||||
iterated over it various times.
|
||||
|
||||
Each feature should also come fully documented, and with tests.
|
||||
|
||||
## Your first contribution
|
||||
|
||||
### Prerequisites
|
||||
|
||||
If you want to contribute to the GTK project, you will need to have the
|
||||
development tools appropriate for your operating system, including:
|
||||
|
||||
- Python 3.x
|
||||
- Meson
|
||||
- Ninja
|
||||
- Gettext (19.7 or newer)
|
||||
- a [C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
||||
|
||||
Up-to-date instructions about developing GNOME applications and libraries
|
||||
can be found on [the GNOME Developer Center](https://developer.gnome.org).
|
||||
|
||||
The GTK project uses GitLab for code hosting and for tracking issues. More
|
||||
information about using GitLab can be found [on the GNOME
|
||||
wiki](https://wiki.gnome.org/GitLab).
|
||||
|
||||
### Dependencies
|
||||
|
||||
In order to get GTK from Git installed on your system, you need to have the
|
||||
required versions of all the software dependencies required by GTK; typically,
|
||||
this means a recent version of GLib, Cairo, Pango, and ATK, as well as the
|
||||
platform-specific dependencies for the windowing system you are using (Wayland,
|
||||
X11, Windows, or macOS).
|
||||
|
||||
The core dependencies for GTK are:
|
||||
|
||||
- [GLib, GObject, and GIO](https://gitlab.gnome.org/GNOME/glib)
|
||||
- [Cairo](http://cairographics.org)
|
||||
- [Pango](https://gitlab.gnome.org/GNOME/pango)
|
||||
- [GdkPixbuf](https://gitlab.gnome.org/GNOME/gdk-pixbuf)
|
||||
- [Epoxy](https://github.com/anholt/libepoxy)
|
||||
- [ATK](https://gitlab.gnome.org/GNOME/atk)
|
||||
- [Graphene](https://github.com/ebassi/graphene)
|
||||
|
||||
GTK will attempt to download and build some of these dependencies if it
|
||||
cannot find them on your system.
|
||||
|
||||
Additionally, you may want to look at projects that create a development
|
||||
environment for you, like [jhbuild](https://wiki.gnome.org/HowDoI/Jhbuild)
|
||||
and [gvsbuild](https://github.com/wingtk/gvsbuild).
|
||||
|
||||
### Getting started
|
||||
|
||||
You should start by forking the GTK repository from the GitLab web UI, and
|
||||
cloning from your fork:
|
||||
|
||||
```sh
|
||||
$ git clone https://gitlab.gnome.org/yourusername/gtk.git
|
||||
$ cd gtk
|
||||
```
|
||||
|
||||
**Note**: if you plan to push changes to back to the main repository and
|
||||
have a GNOME account, you can skip the fork, and use the following instead:
|
||||
|
||||
```sh
|
||||
$ git clone git@gitlab.gnome.org:GNOME/gtk.git
|
||||
$ cd gtk
|
||||
```
|
||||
|
||||
To compile the Git version of GTK on your system, you will need to
|
||||
configure your build using Meson:
|
||||
|
||||
```sh
|
||||
$ meson _builddir .
|
||||
$ cd _builddir
|
||||
$ ninja
|
||||
```
|
||||
|
||||
Typically, you should work on your own branch:
|
||||
|
||||
```sh
|
||||
$ git checkout -b your-branch
|
||||
```
|
||||
|
||||
Once you've finished working on the bug fix or feature, push the branch
|
||||
to the Git repository and open a new merge request, to let the GTK
|
||||
maintainers review your contribution.
|
||||
|
||||
### Code reviews
|
||||
|
||||
Each contribution is reviewed by the core developers of the GTK project.
|
||||
|
||||
The [CODEOWNERS](./docs/CODEOWNERS) document contains the list of core
|
||||
contributors to GTK and the areas for which they are responsible; you
|
||||
should ensure to receive their review and signoff on your changes.
|
||||
|
||||
### Commit messages
|
||||
|
||||
The expected format for git commit messages is as follows:
|
||||
|
||||
```plain
|
||||
Short explanation of the commit
|
||||
|
||||
Longer explanation explaining exactly what's changed, whether any
|
||||
external or private interfaces changed, what bugs were fixed (with bug
|
||||
tracker reference if applicable) and so forth. Be concise but not too
|
||||
brief.
|
||||
|
||||
Closes #1234
|
||||
```
|
||||
|
||||
- Always add a brief description of the commit to the _first_ line of
|
||||
the commit and terminate by two newlines (it will work without the
|
||||
second newline, but that is not nice for the interfaces).
|
||||
|
||||
- First line (the brief description) must only be one sentence and
|
||||
should start with a capital letter unless it starts with a lowercase
|
||||
symbol or identifier. Don't use a trailing period either. Don't exceed
|
||||
72 characters.
|
||||
|
||||
- The main description (the body) is normal prose and should use normal
|
||||
punctuation and capital letters where appropriate. Consider the commit
|
||||
message as an email sent to the developers (or yourself, six months
|
||||
down the line) detailing **why** you changed something. There's no need
|
||||
to specify the **how**: the changes can be inlined.
|
||||
|
||||
- When committing code on behalf of others use the `--author` option, e.g.
|
||||
`git commit -a --author "Joe Coder <joe@coder.org>"` and `--signoff`.
|
||||
|
||||
- If your commit is addressing an issue, use the
|
||||
[GitLab syntax](https://docs.gitlab.com/ce/user/project/issues/automatic_issue_closing.html)
|
||||
to automatically close the issue when merging the commit with the upstream
|
||||
repository:
|
||||
|
||||
```plain
|
||||
Closes #1234
|
||||
Fixes #1234
|
||||
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1234
|
||||
```
|
||||
|
||||
- If you have a merge request with multiple commits and none of them
|
||||
completely fixes an issue, you should add a reference to the issue in
|
||||
the commit message, e.g. `Bug: #1234`, and use the automatic issue
|
||||
closing syntax in the description of the merge request.
|
||||
|
||||
### Commit access to the GTK repository
|
||||
|
||||
GTK is part of the GNOME infrastructure. At the current time, any
|
||||
person with write access to the GNOME repository can merge changes to
|
||||
GTK. This is a good thing, in that it encourages many people to work
|
||||
on GTK, and progress can be made quickly. However, GTK is a fairly
|
||||
large and complicated project on which many other things depend, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK that has been built up over the years, we'd like to ask
|
||||
people committing to GTK to follow a few rules:
|
||||
|
||||
0. Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've been
|
||||
working on GTK for a while it probably isn't necessary to ask. But when
|
||||
in doubt, ask. Even if your change is correct, somebody may know a
|
||||
better way to do things. If you are making changes to GTK, you should
|
||||
be subscribed to the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list)
|
||||
mailing list; this is a good place to ask about intended changes.
|
||||
The `#gtk` IRC channel on irc.gnome.org is also a good place to find GTK
|
||||
developers to discuss changes, but if you live outside of the EU/US time
|
||||
zones, an email to the gtk-devel mailing list is the most certain and
|
||||
preferred method.
|
||||
|
||||
0. Ask _first_.
|
||||
|
||||
0. Always write a meaningful commit message. Changes without a sufficient
|
||||
commit message will be reverted.
|
||||
|
||||
0. Never push to the `main` branch, or any stable branches, directly; you
|
||||
should always go through a merge request, to ensure that the code is
|
||||
tested on the CI infrastructure at the very least. A merge request is
|
||||
also the proper place to get a comprehensive code review from the core
|
||||
developers of GTK.
|
||||
|
||||
If you have been contributing to GTK for a while and you don't have commit
|
||||
access to the repository, you may ask to obtain it following the [GNOME account
|
||||
process](https://wiki.gnome.org/AccountsTeam/NewAccounts).
|
19
COPYING
19
COPYING
@@ -1,15 +1,15 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -99,7 +99,7 @@ works together with the library.
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
@@ -411,7 +411,7 @@ decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
@@ -434,7 +434,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
@@ -463,8 +463,9 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
|
4961
ChangeLog.pre-1-0
Normal file
4961
ChangeLog.pre-1-0
Normal file
File diff suppressed because it is too large
Load Diff
9106
ChangeLog.pre-1-2
Normal file
9106
ChangeLog.pre-1-2
Normal file
File diff suppressed because it is too large
Load Diff
28743
ChangeLog.pre-2-0
Normal file
28743
ChangeLog.pre-2-0
Normal file
File diff suppressed because it is too large
Load Diff
1115
ChangeLog.pre-2-10
Normal file
1115
ChangeLog.pre-2-10
Normal file
File diff suppressed because it is too large
Load Diff
7358
ChangeLog.pre-2-2
Normal file
7358
ChangeLog.pre-2-2
Normal file
File diff suppressed because it is too large
Load Diff
11857
ChangeLog.pre-2-4
Normal file
11857
ChangeLog.pre-2-4
Normal file
File diff suppressed because it is too large
Load Diff
7235
ChangeLog.pre-2-6
Normal file
7235
ChangeLog.pre-2-6
Normal file
File diff suppressed because it is too large
Load Diff
1115
ChangeLog.pre-2-8
Normal file
1115
ChangeLog.pre-2-8
Normal file
File diff suppressed because it is too large
Load Diff
55
HACKING
Normal file
55
HACKING
Normal file
@@ -0,0 +1,55 @@
|
||||
If you want to hack on the GTK+ project, you'll need to have
|
||||
the following packages installed:
|
||||
|
||||
- GNU autoconf 2.52
|
||||
- GNU automake 1.4
|
||||
- GNU libtool 1.4
|
||||
- indent (GNU indent 1.9.1 is known good)
|
||||
- GNU gettext 10.40
|
||||
|
||||
These should be available by ftp from ftp.gnu.org or any of the
|
||||
fine GNU mirrors. Beta software can be found at alpha.gnu.org.
|
||||
|
||||
In order to get CVS gtk+ installed on your system, you need to have
|
||||
the most recent CVS version of glib, pango, and atk installed as well.
|
||||
The installation process of these libraries is similar to that of gtk+, but
|
||||
needs to be fulfilled prior to installation of gtk+.
|
||||
|
||||
To compile a CVS version of gtk+ on your system, you will need to take
|
||||
several steps to setup the tree for compilation. You can do all these
|
||||
steps at once by running:
|
||||
|
||||
cvsroot/gtk+# ./autogen.sh
|
||||
|
||||
Basically this does the following for you:
|
||||
|
||||
cvsroot/gtk+# aclocal; automake; autoconf
|
||||
|
||||
The above commands create the "configure" script. Now you
|
||||
can run the configure script in cvsroot/gtk+ to create all
|
||||
the Makefiles.
|
||||
|
||||
Before running autogen.sh or configure, make sure you have libtool
|
||||
in your path.
|
||||
|
||||
Note that autogen.sh runs configure for you. If you wish to pass
|
||||
options like --prefix=/usr to configure you can give those options
|
||||
to autogen.sh and they will be passed on to configure.
|
||||
|
||||
If at all possible, please use CVS to get the latest development version of
|
||||
gtk+ and glib. You can do the following to get glib and gtk+ from cvs:
|
||||
|
||||
$ export CVSROOT=':pserver:anonymous@cvs.gnome.org:/cvs/gnome'
|
||||
$ cvs login
|
||||
(there is no password, just hit return)
|
||||
$ cvs -z3 checkout glib
|
||||
$ cvs -z3 checkout pango
|
||||
$ cvs -z3 checkout atk
|
||||
$ cvs -z3 checkout gtk+
|
||||
|
||||
For information about submitting patches and commiting changes
|
||||
to CVS, see the README and README.cvs-commits files. In particular,
|
||||
don't, under any circumstances, commit anything to CVS before
|
||||
reading and understanding README.cvs-commmits.
|
||||
|
||||
|
39
INSTALL
Normal file
39
INSTALL
Normal file
@@ -0,0 +1,39 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, and Atk libraries, available at the same location as GTK+
|
||||
(Either Pango-1.0 or Pango-1.2 can be used with GTK+-2.2;
|
||||
Pango-1.2 is recommended.)
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
these libraries are available from:
|
||||
|
||||
http://www.libtiff.org/
|
||||
http://www.libpng.org/
|
||||
http://www.ijg.org/
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.6.1.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.6.1 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
|
||||
The Details
|
||||
===========
|
||||
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
39
INSTALL.in
Normal file
39
INSTALL.in
Normal file
@@ -0,0 +1,39 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, and Atk libraries, available at the same location as GTK+
|
||||
(Either Pango-1.0 or Pango-1.2 can be used with GTK+-2.2;
|
||||
Pango-1.2 is recommended.)
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
these libraries are available from:
|
||||
|
||||
http://www.libtiff.org/
|
||||
http://www.libpng.org/
|
||||
http://www.ijg.org/
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
|
||||
The Details
|
||||
===========
|
||||
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
191
Makefile.am
Normal file
191
Makefile.am
Normal file
@@ -0,0 +1,191 @@
|
||||
## Makefile.am for GTK+
|
||||
|
||||
SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build m4macros
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
makecopyright \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
ChangeLog.pre-1-2 \
|
||||
ChangeLog.pre-2-0 \
|
||||
ChangeLog.pre-2-2 \
|
||||
ChangeLog.pre-2-4 \
|
||||
ChangeLog.pre-2-6 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
config.h.win32 \
|
||||
makefile.msc \
|
||||
gtk-zip.sh.in \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
examples/Makefile \
|
||||
examples/README.1ST \
|
||||
examples/extract.awk \
|
||||
examples/extract.sh \
|
||||
examples/arrow/Makefile \
|
||||
examples/arrow/arrow.c \
|
||||
examples/base/Makefile \
|
||||
examples/base/base.c \
|
||||
examples/buttonbox/Makefile \
|
||||
examples/buttonbox/buttonbox.c \
|
||||
examples/buttons/Makefile \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/calendar.c \
|
||||
examples/clist/Makefile \
|
||||
examples/clist/clist.c \
|
||||
examples/entry/Makefile \
|
||||
examples/entry/entry.c \
|
||||
examples/eventbox/Makefile \
|
||||
examples/eventbox/eventbox.c \
|
||||
examples/filesel/Makefile \
|
||||
examples/filesel/filesel.c \
|
||||
examples/gtkdial/Makefile \
|
||||
examples/gtkdial/dial_test.c \
|
||||
examples/gtkdial/gtkdial.c \
|
||||
examples/gtkdial/gtkdial.h \
|
||||
examples/helloworld/Makefile \
|
||||
examples/helloworld/helloworld.c \
|
||||
examples/helloworld2/Makefile \
|
||||
examples/helloworld2/helloworld2.c \
|
||||
examples/label/Makefile \
|
||||
examples/label/label.c \
|
||||
examples/list/Makefile \
|
||||
examples/list/list.c \
|
||||
examples/menu/Makefile \
|
||||
examples/menu/menu.c \
|
||||
examples/menu/itemfactory.c \
|
||||
examples/notebook/Makefile \
|
||||
examples/notebook/notebook.c \
|
||||
examples/packbox/Makefile \
|
||||
examples/packbox/packbox.c \
|
||||
examples/paned/Makefile \
|
||||
examples/paned/paned.c \
|
||||
examples/pixmap/Makefile \
|
||||
examples/pixmap/pixmap.c \
|
||||
examples/progressbar/Makefile \
|
||||
examples/progressbar/progressbar.c \
|
||||
examples/radiobuttons/Makefile \
|
||||
examples/radiobuttons/radiobuttons.c \
|
||||
examples/rangewidgets/Makefile \
|
||||
examples/rangewidgets/rangewidgets.c \
|
||||
examples/rulers/Makefile \
|
||||
examples/rulers/rulers.c \
|
||||
examples/scribble-simple/Makefile \
|
||||
examples/scribble-simple/scribble-simple.c \
|
||||
examples/scribble-xinput/Makefile \
|
||||
examples/scribble-xinput/scribble-xinput.c \
|
||||
examples/scrolledwin/Makefile \
|
||||
examples/scrolledwin/scrolledwin.c \
|
||||
examples/selection/Makefile \
|
||||
examples/selection/gettargets.c \
|
||||
examples/selection/setselection.c \
|
||||
examples/statusbar/Makefile \
|
||||
examples/statusbar/statusbar.c \
|
||||
examples/table/Makefile \
|
||||
examples/table/table.c \
|
||||
examples/text/Makefile \
|
||||
examples/text/text.c \
|
||||
examples/tictactoe/Makefile \
|
||||
examples/tictactoe/tictactoe.c \
|
||||
examples/tictactoe/tictactoe.h \
|
||||
examples/tictactoe/ttt_test.c \
|
||||
examples/tree/Makefile \
|
||||
examples/tree/tree.c \
|
||||
examples/wheelbarrow/Makefile \
|
||||
examples/wheelbarrow/wheelbarrow.c \
|
||||
examples/fixed/fixed.c \
|
||||
examples/fixed/Makefile \
|
||||
examples/frame/frame.c \
|
||||
examples/frame/Makefile \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
|
||||
GDKTARGET=@gdktarget@
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-$(GDKTARGET)-2.0.pc: gtk+-2.0.pc
|
||||
rm -f gtk+-$(GDKTARGET)-2.0.pc && \
|
||||
cp gtk+-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
|
||||
|
||||
gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
|
||||
rm -f gdk-$(GDKTARGET)-2.0.pc && \
|
||||
cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
|
||||
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
|
||||
rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
|
||||
cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
|
||||
rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
|
||||
cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
|
||||
|
||||
DISTCLEANFILES = \
|
||||
gtk+-$(GDKTARGET)-2.0.pc \
|
||||
gdk-$(GDKTARGET)-2.0.pc \
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc \
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
|
||||
DEFAULT_GDKTARGET=x11
|
||||
install-data-hook:
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
test -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc && \
|
||||
test -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc && \
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc gtk+-2.0.pc) || \
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gdk-2.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-2.0.pc
|
||||
|
||||
dist-hook:
|
||||
if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi
|
||||
|
||||
.PHONY: files release sanity snapshot
|
||||
|
||||
files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
|
||||
for file in $$files; do \
|
||||
echo $$subdir/$$file; \
|
||||
done; \
|
||||
done
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
sanity:
|
||||
./sanity_check $(VERSION)
|
||||
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
903
NEWS.pre-2.0
903
NEWS.pre-2.0
@@ -1,903 +0,0 @@
|
||||
Overview of Changes in GTK+ 2.0.0
|
||||
=================================
|
||||
|
||||
* GtkTreeView fixes [Jonathan Blandford, Kristian Rietveld, Darin Adler]
|
||||
* Build fixes [Anders Carlsson, Tor Lillqvist, Manish Singh]
|
||||
* Bug fixes. [Thomas Leonard, Owen Taylor]
|
||||
|
||||
Overview of Changes in GTK+ 2.0.0 rc1
|
||||
=====================================
|
||||
|
||||
* GtkTreeView fixes [Kristian Rietveld, Jonathan Blandford, Richard Hult]
|
||||
* Text widget fixes [Havoc Pennington]
|
||||
* Efficiency fixes when using Xft [Owen Taylor]
|
||||
* Key handling fixes and other fixes for Win32 [Hans Breuer, Tor Lillqvist]
|
||||
* Try to fix key handling without XKEYBOARD extension [Owen]
|
||||
* Documentation fixes and improvements
|
||||
[Matthias Clasen, Alexey Malyshev, Akira Tagoh, Vitaly Tishkov]
|
||||
* Widget drawing improvements [Soeren Sandmann]
|
||||
* Allow cycling between multiple menu bars with <Control>Tab [Owen]
|
||||
* Try to build libraries with only shared library dependencies on Xft to
|
||||
deal with transition to Xft2 [Owen]
|
||||
* Portability fixes [Owen, Miroslaw Dobrzanski-Neumann]
|
||||
* Don't use red as the default cursor color [Owen]
|
||||
* Bug fixes, bug fixes, bug fixes.
|
||||
|
||||
Other contributors: Darin Adler, Jacob Berkman, Kevin Breit, Hans Breuer,
|
||||
Anders Carlsson, Damon Chaplin, Finlay Dobbie, Jody Goldberg,
|
||||
Andreas J. Guelzow, Scott Guilbeaux, Vlad Harchev, James Henstridge,
|
||||
Tim Janik, Satyajit Kanungo, Charles Kerr, Sergey Kuzminov, Miles Lane,
|
||||
Alexander Larsson, Paolo Maggi, Skip Montaro, Jan Mynarik, Sven Neumann,
|
||||
Padraig O'Briain, Narayani Pattipati, Mark Patton, Havoc Pennington,
|
||||
Ettore Perazzoli, Guillermo S. Romero, Manish Singh, Morten Welinder
|
||||
|
||||
Overview of Changes in GTK+ 1.3.15
|
||||
==================================
|
||||
|
||||
* New stock and improved icon images
|
||||
[Tuomas Kuosmanen, Jakub Steiner, Anders Carlsson]
|
||||
* Widget drawing improvements for check and radio buttons,
|
||||
spinbuttons [Soeren Sandmann]
|
||||
* Clean up module search path algorithm, use GTK_PATH [Owen Taylor]
|
||||
* Add GtkSetting for font name. [Richard Hestilow]
|
||||
* Much improved key matching code, accelerators work independent
|
||||
of group [Owen]
|
||||
* Make mnemonics work for embedded GtkPlug widgets [Owen]
|
||||
* Keynav improvements for GtkTreeView [Kristian Rietveld]
|
||||
* Fix gtk_tree_view_scroll_to_cell() [Jonathan Blandford]
|
||||
* Rename gtk_tree_view_get_iter_root() and gtk_tree_path_new_root()
|
||||
to gtk_tree_view_get_iter_first() and gtk_tree_path_new_first(),
|
||||
add compatibility macros.
|
||||
* GtkTreeView bug fixes [Kristian, Anders, Damon Chaplin]
|
||||
* GtkTextView bug fixes [Havoc Pennington]
|
||||
* Pad class structures for future binary compatibility [Owen]
|
||||
* Tutorial improvements [Sven Neumann, Matthias Clasen]
|
||||
* Fixes for MULTIPLE selection target [Gregory Merchan, Owen]
|
||||
* Fix problems with initial widget size [Owen]
|
||||
* AIX compilation fixes [Miroslaw Dobrzanski-Neumann]
|
||||
* Win32 fixes [Hans Breuer, Tor Lillqvist]
|
||||
* Miscellaneous bug fixes
|
||||
|
||||
Other contributors: David L. Cooper, Eric Fischer, Jody Goldberg,
|
||||
Satajyit Kanungo, Thomas Leonard, Mark Patton, Manish Singh,
|
||||
Nicolas Setton
|
||||
|
||||
Overview of Changes in GTK+ 1.3.14
|
||||
==================================
|
||||
|
||||
* Keyboard focus improvements [Owen Taylor]
|
||||
* Code cleanup [Matthias Clasen, Manish Singh, Darin Adler]
|
||||
* Fix accidentally exported variables [Mark McLoughlin]
|
||||
* GtkTreeView fixes [Jonathan Blandford, Kristian Rietveld, John Harper, Darin]
|
||||
* Default to yellow tooltips [Owen]
|
||||
* RC file fixes for reloading, priorities [Owen, Matthias]
|
||||
* GtkMenu behavior improvements and bug fixes [Owen, Arnaud Charlet]
|
||||
* GtkTextView fixes [Havoc Pennington, Daniel Elstner, Dennis Bjorklund]
|
||||
* Improve keynav for paned widgets, tooltips, spin buttons, notebooks,
|
||||
scrolled windows [Soeren Sandmann, Padraig, Owen]
|
||||
* Add Emacs/Default key themes [Owen]
|
||||
* Win32 fixes [Hans Breuer, Tor Lillqvist]
|
||||
* Ethiopic input methods [Daniel Yacob]
|
||||
* Opaque paned window resizing [Soeren]
|
||||
* Tweak table expansion behavior [Tim Janik]
|
||||
* Fix GtkCalendar focus drawing [Bill Haneman]
|
||||
* Allow themeable cursor thickness [Bill]
|
||||
* Start of fixing of tutorial for GTK+-2.0 [Matthias]
|
||||
* Add a ::adjust-bounds signal to GtkRange to allow spreadsheet style
|
||||
scrollbars. [Jody Goldberg]
|
||||
* Add the ability to turn on multiple selection for GtkFileSel [Manish]
|
||||
* Bug fixes
|
||||
|
||||
Other contributors: Jacob Berkman, Padraig O'Briain, Anders Carlsson,
|
||||
Johan Dahlin, Richard Hult, Stefan Kost, Alex Larsson, Thomas Leonard,
|
||||
Paolo Maggi, Alexey Malyshev, Federico Mena Quintero, Skip Montaro,
|
||||
Sven Neumann, Havoc Pennington, Laszlo Peter, Christian Rose, Joe Shaw,
|
||||
Kevin Vandersloot, Morten Welinder, Peter Williams
|
||||
|
||||
Overview of Changes in GTK+ 1.3.13
|
||||
==================================
|
||||
|
||||
* Tree view fixes. [Kristian Rietveld, Jonathan Blandford, Anders Carlsson]
|
||||
* Tree view support for low-vision themes [Bill Haneman]
|
||||
* Text view bug fixes. [Havoc Pennington]
|
||||
* Win32 fixes and improvements. [Tor Lillqvist, Hans Breuer,
|
||||
Archaeopteryx Software]
|
||||
* Documentation improvements [Matthias Clasen, Havoc Pennington]
|
||||
* Accelerate alpha compositing using RENDER extension if present,
|
||||
and optimize the non-RENDER case a lot. [Owen Taylor]
|
||||
* Add support for "optional keybindings" (action signal returns FALSE) [Owen]
|
||||
* Fixed the infamous changing directory deletes filename bug
|
||||
[Owen and a cast of thousands]
|
||||
* Add mouse cursor hiding for text widgets [Anders Carlsson]
|
||||
* Simple Hangul input module [Yusuke Tabata]
|
||||
* Removed the scary startup warning.
|
||||
* GdkPixbuf pixel handling fixes [Owen, Michael Hore, Jim Cape]
|
||||
* Converted GtkFileSelection and GtkFontSelection to use GtKTreeView widgets
|
||||
instead of the deprecated GtkCList [Owen]
|
||||
* gtkhsv.h was installed by mistake, fixed that. [reported by Ross Burton]
|
||||
* gdk_pixbuf_render_to_drawable() now also handles alpha pixbufs.
|
||||
* Made Gtkimage draw GtkPixmap, GtkImage, GdkPixbuf insensitive, prelighted,
|
||||
etc. [Havoc, Owen]
|
||||
* Marked gtk_item_factory_path_from_widget() G_CONST_RETURN. [Matt Wilson]
|
||||
* gtk_image_menu_item_new_from_stock() now falls back to
|
||||
new_with_mnemonic, for consistency with gtk_button_new_from_stock()
|
||||
[Havoc Pennington]
|
||||
* GdkModifierType is now consistently used for modifier mask parameters
|
||||
[Mark Patton]
|
||||
* gtk_widget_set_accel_path() is now publically exported.
|
||||
|
||||
Other contributors: Darin Adler, Jeffrey Baker, Damon Chaplin, Brian Cameron,
|
||||
Murray Cumming, James Henstridge, Jacob Berkman, Arnaud Charlet, Jeff Franks,
|
||||
Jeff Garzik, Jody Goldberg, Diego Gonzalez, Melvin Hadasht, Raja Harinath,
|
||||
Tim Janik, Mike Kestner, Mathieu Lacage, Alex Larsson, Ryan Lovett,
|
||||
Mark McLoughlin, Sven Neumann, Padraig O'Briain, Xavier Ordoquy, Chris Phelps,
|
||||
Detlef Reichl, Guillermo S. Romero, Federico Mena Quintero, Manish Singh,
|
||||
HideToshi Tajima, Vitaly Tishkov, Jon Trowbridge, Sergey Vlasov.
|
||||
|
||||
Overview of Changes in GTK+ 1.3.12
|
||||
==================================
|
||||
|
||||
* Fix problems with PNG saving [Michael Natterer]
|
||||
* Cleanups of deprecated usages [Sebastian Wilhelmi]
|
||||
* Win32 fixes [Tor Lillqvist]
|
||||
* Documentation improvements [Matthias Clasen, Havoc Pennington,
|
||||
Vitaly Tishkov]
|
||||
* Frame buffer port fixes [Manish Singh]
|
||||
* GtkTextView bug fixes [Havoc Pennington, Chris Phelps]
|
||||
* Menu behavior improvements [Kristian Rietveld]
|
||||
* Make focus line width configurable, focus color work on
|
||||
dark themes. [Bill Haneman, Owen Taylor]
|
||||
* Add state argument to gtk_paint_focus() [Bill]
|
||||
* Added incremental revalidation to tree view, for better apparent speed
|
||||
[Jonathan Blandford]
|
||||
* Remove useless gtk_tree_view_column_cell_event() [Jonathan]
|
||||
* Display XIM status in a separate window [HideToshi Tajima]
|
||||
* Add GDK_DEBUG=nograbs to disable pointer, keyboard grabs [Jacob Berkman]
|
||||
* Add menu of Unicode control characters to GtkEntry, GtkTextView
|
||||
[Dov Grobgeld, Havoc]
|
||||
* Pass key releases along to input methods [Owen]
|
||||
* Many bug fixes
|
||||
|
||||
Other contributors: Darin Adler, Fabrice Bellet, Chris Blizzard,
|
||||
Hans Breuer, Anders Carlsson, Damon Chaplin, Murray Cumming, Jeff Franks,
|
||||
James Henstridge, Tim Janik, Alex Larsson, George Lebl, Kjartan, Maraas,
|
||||
Sven Neumann, Seth Nickell, Padraig O'Briain, Soeren Sandmann, Manish Singh,
|
||||
Matt Wilson
|
||||
|
||||
Overview of Changes in GTK+ 1.3.11
|
||||
==================================
|
||||
|
||||
* Massive rework of accelerator API and implementation (Tim Janik)
|
||||
* Major fixes to resizing and redrawing to eliminate hysteresis
|
||||
and optimize. (Owen Taylor, Soeren Sandmann)
|
||||
* Make many widgets NO_WINDOW to improve appearance and reduce
|
||||
drawing overhead (Owen)
|
||||
* Text view fixes (Havoc Pennington)
|
||||
* Make child widgets in GtkTextView work (Havoc)
|
||||
* GtkTreeModelSort fixage (Jonathan Blandford, Kristian Rietveld)
|
||||
* Clean up GtkTreeView drag and drop support (Owen)
|
||||
* Misc tree view fixes and improvements (Jonathan, Kristian, Anders, Matt Wilson)
|
||||
* Add gtk_window_get/set_focus(), gtk_window_set_default() as public
|
||||
functions (Owen, Damian Ivereigh)
|
||||
* Fixes to GtkPlug/GtkSocket (Michael Meeks, Owen)
|
||||
* Change button ordering in standard dialogs to correspond to
|
||||
GNOME usability project proposal (Gregory Merchan)
|
||||
* Add support for context sensitivity in input methods (Owen)
|
||||
* Hook up gtk_im_context_set_use_preedit() (Hidetoshi Tajima)
|
||||
* Fix gdk_window_scroll() and other aspects of big windows (Owen)
|
||||
* Remove need for X connection for class initialization (Jacob Berkman)
|
||||
* Propagate key events to parents of focused widget (Owen)
|
||||
* Don't export normal GTK+ marshalers, export deprecated compat marshalers (Owen)
|
||||
* Many Win32 Fixes and improvements (Hans Breuer, Tor Lillqvist)
|
||||
* Bug and documentation fixing (Matthias Clasen, Anders Carlsson,
|
||||
Jacob Berkman, others.)
|
||||
|
||||
Other Contributors:
|
||||
Darin Adler, Marius Andreiana, Erwann Chenede, Murray Cumming, Janet Davis,
|
||||
Daniel Egger, Daniel Elstner, Jeff Franks, Alex Larsson, George Lebl,
|
||||
Sergey Kuzminov, Eric Lemings, Arkadiusz Miskiewicz, Padraig O'Briain, Sven Neumann,
|
||||
Kristian Rietveld, Nicolas Setton, Manish Singh, Vitaly Tishkov, Sebastian Wilhelmi,
|
||||
Michael Natterer
|
||||
|
||||
Overview of Changes in GTK+ 1.3.10
|
||||
==================================
|
||||
|
||||
* GtkTextView fixes [Havoc Pennington]
|
||||
* GtkTreeView fixes and improvements [Jonathan Blandford, Kristian,
|
||||
Manish Singh, Joshua Pritikin, Oleg Maiboroda, James Henstridge]
|
||||
* gtkdemo improvements [Kristian Rietveld]
|
||||
* Drag and drop fixes to generic code and widgets
|
||||
[Owen Taylor, Damian Ivereigh]
|
||||
* Documentation improvement [Havoc Pennington, Matthias Clasen]
|
||||
* Spelling fixes [Jacob Berkman]
|
||||
* Move signals to the GtkEditable interface [Kristian]
|
||||
* Further stock image improvements [Jakub Steiner]
|
||||
* Support text chunks for the PGN loader, add gdk_pixbuf_get_option()
|
||||
[Sven Neumann]
|
||||
* Rename gdk_pixbuf_new_from_stream back to new_from_inline [Owen]
|
||||
* Automatically call setlocale(), unless explicitly disabled [Owen]
|
||||
* Property addition to various widgets [Michael Meeks, Owen]
|
||||
* Support building with automake-1.4 [James]
|
||||
* Make GtkRadioButton groups act as a single focus point [Owen]
|
||||
* Move gdk_window_lookup etc. to be cross-platform [Matthias]
|
||||
* Draw spinbuttons variably sized [Kristian]
|
||||
* Separate GdkAtom out from X atoms for compatibility with future
|
||||
multihead changes [Owen]
|
||||
* Require gdk_threads_init() to be explicitly called instead
|
||||
of piggybacking off of g_thread_init(). [Owen]
|
||||
* Improvements to text-view/label/entry popup menus [Damian, Jacob, Owen]
|
||||
* Bug fixes and cleanup [Matthias, others]
|
||||
|
||||
Other Contributors:
|
||||
Mark McLoughin, Mikael Hermansson, Soeren Sandmann, Anders Carlsson,
|
||||
Tim Janik, Murray Cumming, Hidetoshi Tajima, Padraig O'Briain,
|
||||
Hans Breuer, Vitaly Tishkov, Dov Grobgeld
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 1.3.9
|
||||
=================================
|
||||
|
||||
* Add editable text cells to GtkTreeView.
|
||||
Keynav, drawing fixes in GtkTreeView [Jonathan Blandford]
|
||||
* Text widget no longer always has a \n in it. [Havoc Pennington]
|
||||
* Text widget bug fixes [Havoc, Dov Grobgeld, Hidetoshi Tajima]
|
||||
* Allow -1 for width/height in gdk_pixbuf_render_*(). [Matthias Clasen]
|
||||
* Minor fix for major resizing problems in recent releases [Owen Taylor]
|
||||
* Restore ability to set _set properties to TRUE for
|
||||
GtkCellRendererText, GtkTextTag [Owen]
|
||||
* Cursor drawing improvements [Owen]
|
||||
* Win32 fixes [Hans Breuer]
|
||||
* Mark various functions as deprecated or private.
|
||||
* Misc bug fixes, portability fixes, and cleanups.
|
||||
|
||||
Other Contributors:
|
||||
Vitaly Tishkov, Christian Rose, Frank Belew, Jeff Franks, Sven Neumann,
|
||||
Kristian Rietveld, Vitaly Tishkov, Joshua N. Pritikin, Matt Wilson,
|
||||
James Henstridge, Detlef Reichl
|
||||
|
||||
Overview of Changes in GTK+ 1.3.8
|
||||
=================================
|
||||
|
||||
* GtkTreeView and GtkTreeModel API cleanups/improvements [Jrb]
|
||||
* GtkOptionMenu scrollwheel support [Alex]
|
||||
* GtkModule search paths [Owen]
|
||||
* Documenatation updates [Havoc,Jrb]
|
||||
* Major Gdk cleanup [Owen]
|
||||
* Miscellaneous other fixes/cleanups
|
||||
|
||||
Other Contributors:
|
||||
Joshua N Pritikin, Padraig O'Briain, Jakub Steiner, Matthias Clasen,
|
||||
Matt Wilson, James Henstridge
|
||||
|
||||
Overview of Changes in GTK+ 1.3.7
|
||||
=================================
|
||||
|
||||
* Many Pixbuf (loader) improvements [Matthias Clasen, Soeren Sandmann]
|
||||
* Added publically installed utility gdk-pixbuf-csource to generate
|
||||
inlined pixbufs in C source code [Tim Janik]
|
||||
* Optional movement of button children on press [Soeren, Owen Taylor]
|
||||
* Interactive searching in GtkTreeView [Kristian Rietveld]
|
||||
* Sorting/ordering improvements for GtkTreeView [Kris, Jonathan Blandford]
|
||||
* Animation of expander motion for GtkTreeView [Anders Carlsson]
|
||||
* Lots of misc GtkTreeView fixes and improvements [Jonathan]
|
||||
* New/improved stock icons [Jakub Steiner]
|
||||
* Code and API rework for window resizing [Havoc Pennington]
|
||||
* Converted accel groups to GObject [James Henstridge]
|
||||
* More property support improvements
|
||||
* Add facility for "secondary" buttons in
|
||||
GtkButtonBox/GtkDialog [Gregory Merchan]
|
||||
* Disentangled child visability from MAPPED state [Owen]
|
||||
* Plug/Socket improvements and port to the XEMBED protocol [Owen]
|
||||
* Added priorities for styles in RC files,
|
||||
support multiple parse contents [Owen]
|
||||
* Made GdkVisual and GdkDevice GObjects [Alexander Larsson]
|
||||
* Key binding improvements [Havoc]
|
||||
* Added GtkWidget::event-after signal since normal event handling
|
||||
is now aborted as soon as a handler returned TRUE [Tim]
|
||||
* Dnd fixes and improved icon support [Owen]
|
||||
* Removed GtkPacker widget
|
||||
* Fixing missing paired getters/setters [Kris]
|
||||
* Nuked remaining GtkArg cruft, implemented container/child properties [Tim]
|
||||
* Added window grab groups [Owen]
|
||||
* Many frame buffer improvements [Alex]
|
||||
* Win32 fixes and improvements [Hans Breuer]
|
||||
* Warning fixes [Darin Adler]
|
||||
* Miscellaneous bug and API fixes [Matthias et. al]
|
||||
|
||||
Other Contributors:
|
||||
Joshua N Pritikin, Hidetoshi Tajima, Manish Singh, ERDI Gergo, Jens Finke,
|
||||
Chema Celorio, Lee Mallabone, Vitaly Tishkov, Sebastian Wilhelmi,
|
||||
Nicola Girardi, Sven Neumann, Padraig O'Briain, Michael Natterer,
|
||||
Suresh Chandrasekharan, Jonas Borgström, Jay Cox, Michael Meeks,
|
||||
Mathias Hasselmann, Peter Williams, Thomas Broyer, Kjartan Maraas,
|
||||
Joel Becker, Jeff Franks, Brian Cameron, Skip Montanaro
|
||||
|
||||
Overview of Changes in GTK+ 1.3.6
|
||||
=================================
|
||||
|
||||
* Properly renders strikethrough text
|
||||
* win32 fixes
|
||||
* Added "scale" property to GtkTextTag and GtkCellRendererText to do
|
||||
relative font scaling
|
||||
* Added "format_value" signal to GtkScale to reformat value text
|
||||
* framebuffer fixes
|
||||
* Property support added to lots of widgets
|
||||
* Many GtkTreeView new features and API/implementation fixes
|
||||
* Lots of new_with_mnemonic() convenience functions
|
||||
* Change GtkImageMenuItem API to be more consistent/useful
|
||||
* Added lots of new stock items/icons
|
||||
* Rewrote GtkRange/GtkScale/GtkScrollbar, includes support for
|
||||
enabling/disabling extra scrollbar stepper arrows in gtkrc so NeXT
|
||||
themes won't need broken hacks
|
||||
* Convenience API for GtkRange similar to the one added to GtkSpinButton
|
||||
a while back
|
||||
* Make menubar/toolbar work properly with xthickness/ythickness of 1 or 0,
|
||||
and move some attributes from program settings to user settings.
|
||||
Allows nice 1-pixel-bevel themes.
|
||||
* Moved ::focus virtual function from GtkContainer to GtkWidget
|
||||
* Plenty of bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 1.3.5
|
||||
=================================
|
||||
|
||||
* New default theme based on Raleigh theme for 1.2.x.
|
||||
* Dependency on the ATK library added as a step to
|
||||
providing accessibility-enabling interfaces
|
||||
* XEMBED-based GtkPlug/GtkSocket now basically works.
|
||||
* Drag and drop of column headers in GtkTreeView
|
||||
* GtkColorSelector work: hooks for saving and propagating palette, UI tweaks,
|
||||
and API sanitation
|
||||
* Key binding fixes
|
||||
* Configurable padding/spacing in a lot of places
|
||||
* Invisible text in GtkTextView fixed
|
||||
* SHM segments now created with a mode of 0600
|
||||
* Bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 1.3.4
|
||||
=================================
|
||||
|
||||
* Win32 fixes
|
||||
* GtkTreeView improvements and fixes
|
||||
* Fix glib-2.0.m4
|
||||
* Miscellaneous bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 1.3.3
|
||||
=================================
|
||||
|
||||
[ 5600 lines of ChangeLog ]
|
||||
|
||||
* API cleanups
|
||||
* Win32 work (Tor, Hans Breuer)
|
||||
* Focus improvements (Owen)
|
||||
* Frame buffer improvements (Alex)
|
||||
* Work on GtkTextView (Havoc)
|
||||
* Much work on GtkTreeView (Jonathan)
|
||||
* Selectable labels (Havoc)
|
||||
* Converted many arguments to properties (Lee Mallabone, John Margaglione)
|
||||
* Add exact regions to GdkExposeEvent, propagate it. (Alex)
|
||||
* Added ability to have resize grips in status bars (etc.) using
|
||||
_NET_WM_MOVERESIZE protocol. (Havoc)
|
||||
* Added mnemnonic mechanism to make setting underline accelerators
|
||||
much easier. (Alex)
|
||||
* Add per-style property mechanism to allow themes to change
|
||||
geometry parameters. (Tim)
|
||||
* Added global settings mechanisms for settings such as double-click
|
||||
time. (Tim, Owen)
|
||||
* Various support functions for new and old WM properties (Havoc, Alex)
|
||||
* Add TRUE-stops-returns for boolean-returning signals (Ron Steinke)
|
||||
|
||||
Overview of Changes in GTK+ 1.3.2
|
||||
=================================
|
||||
|
||||
GTK Core:
|
||||
|
||||
* New stock-icon and stock-item system. Use themeable pixbufs in
|
||||
dialogs, buttons, etc. [Havoc]
|
||||
* Theme engines reworked to use derivation and new object system. [Owen]
|
||||
* Added GtkClipboard object for simple selection handling. [Owen]
|
||||
* Make GtkEditable an interface, move implementation to GtkOldEditable for
|
||||
compat. [Owen]
|
||||
* Better handling of default directionality. [Robert]
|
||||
* Use GSignal as backend for GtkSignal and other GObject stuff. [Tim]
|
||||
* Move theme engines to GTypePlugin. [Owen]
|
||||
|
||||
GDK:
|
||||
|
||||
* Beginning of implementation of client parts of new window manager spec. [Owen]
|
||||
* Make gdk_drawable_get_image() work with backing store. [Havoc]
|
||||
|
||||
Widgets:
|
||||
|
||||
* New text widget [Havoc]
|
||||
- Adjustable tab handling.
|
||||
- Ability to have scrolling side areas in new text widget for tabs/line numbers.
|
||||
- Many cleanups and small improvements.
|
||||
* Improvements to submenu navigation [Nils Barth/David Santiago] and
|
||||
scrolling menus. [Alex]
|
||||
* Simplification of progress bar API. [Havoc]
|
||||
* Make GtkImage a generic image-display widget. [Havoc]
|
||||
* New GtkTreeView tree widget. Model/view architecture, flexible rendering,
|
||||
large datasets, etc. [Jonathan]
|
||||
* New GtkMessageBox widget for message display. [Havoc]
|
||||
* Allow labels to have contents set from XML-like markup language. [Havoc]
|
||||
* Make dialogs derive from GtkDialog and use stock buttons. [Havoc]
|
||||
|
||||
Internationalization:
|
||||
|
||||
* Proper character set conversion for clipboard/selection. [Owen]
|
||||
* New input method system via loadable modules; support on-the-spot
|
||||
preedit in GtkEntry and new text widget; allow switching input methods
|
||||
on the fly; include modules for XIM and demo Cyrillic-transliteration
|
||||
module. [Owen]
|
||||
* VIQR, Thai, and Inuktitut input methods. [Robert]
|
||||
* Convert po files to UTF-8. [Robert]
|
||||
|
||||
gdk-pixbuf:
|
||||
|
||||
* Full-alpha compositing for gdk-pixbuf on drawable. [Havoc]
|
||||
* Add simple saving to gdk-pixbuf. [David Welton/Havoc]
|
||||
* Add improved error handling with GError to gdk-pixbuf. [Havoc]
|
||||
|
||||
Ports:
|
||||
|
||||
* Much work on Win32 Port. [Tor/Hans]
|
||||
* Much work on Linux-FB Port. [Elliot/Alex]
|
||||
|
||||
Misc:
|
||||
|
||||
* Start of new gtk-demo demo program. [Owen/Jonathan]
|
||||
* Bug fixes and more bug fixes.
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 1.3.1:
|
||||
|
||||
* GTK+ now uses the Pango library for text manipulation. All
|
||||
strings in GTK+ now are in Unicode, languages written
|
||||
from right-to-left, and complex-text languages are now supported.
|
||||
* The gdk-pixbuf library for image loading and manipulation is
|
||||
has been integrated with GTK+.
|
||||
* The GTK+ object system has mostly been moved to GLib, separating
|
||||
it from the GUI code. Many significant enhancements have been
|
||||
made as part of this.
|
||||
* A new text widget is now included. This started as a port
|
||||
of the Tk text widget, and includes such features of the Tk
|
||||
text widget as tags, marks, and unicode text support. It
|
||||
has been enhanced to support model-view operation and the
|
||||
full power of Pango.
|
||||
* The GDK library has been extensively revised to support multiple
|
||||
windowing systems. The only fully functional backend in 1.3.1
|
||||
is the X11 backend, however, ports to Win32, Linux-framebuffer,
|
||||
Nano-X, BeOS, and MacOS exist in various states of completion,
|
||||
and at least some of these will be finished and integrated in
|
||||
before the final GTK+-2.0 release.
|
||||
* 32-bit coordinates are now supported throughout GDK and GTK+
|
||||
(they are emulated where not supported by the windowing system.)
|
||||
* Many minor bug fixes and enhancements. Incompatible changes
|
||||
are documented in docs/Changes-2.0.txt
|
||||
|
||||
Overview of Changes in GTK+ 1.2.8:
|
||||
|
||||
* GNU Make 3.79 bug workaround
|
||||
* FAQ and tutorial updates and improvements
|
||||
* Miscellaneous bug fixes: CList, Calendar, rc-files, FontSelection
|
||||
|
||||
Overview of Changes in GTK+ 1.2.7:
|
||||
|
||||
* More header cleanups.
|
||||
* Fixed activation bug for insensitive widgets.
|
||||
* Locale fixes to RC file parsing code.
|
||||
* Miscellaneous bugfixes for Item Factory, CList, CTree, X Selections,
|
||||
HScale, VScale, Pixmap, Viewport, OptionMenu, Entry and Notebook.
|
||||
* Upgrade to libtool 1.3.4.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.6:
|
||||
|
||||
* container queue_resize fixes
|
||||
* gtk[vh]scale: minor fixups
|
||||
* rename idle to idle_id in testgtk to avoid conflicts with
|
||||
broken libs
|
||||
* More consistent naming of gtkrc files
|
||||
* Added language support: ro, uk
|
||||
|
||||
Overview of Changes in GTK+ 1.2.5:
|
||||
|
||||
* more GtkCTree and GtkWindow bug fixes.
|
||||
* more redraw/resize queue fixes, better expose event
|
||||
discarding code.
|
||||
* more miscellaneous bugs fixed
|
||||
* new configure.in option --disable-rebuilds to completely disable
|
||||
rebuilds of autogenerated sources.
|
||||
* check for 5.002 now, to avoid failing autogeneration build rules due
|
||||
to old perl versions.
|
||||
* fonts (and fontsets) are cached now.
|
||||
* more autogeneration make rules and dependency fixups, we should be
|
||||
save with autogeneration up to make -j12 now ;)
|
||||
* new window position GTK_WIN_POS_CENTER_ALWAYS, which will recenter the
|
||||
GtkWindow on every size change.
|
||||
* major rework of window manager hints handling code, fixed a bunch of
|
||||
races with the new resizing code.
|
||||
* the new wm hints and resizing code is absolutely perfect and bug free now,
|
||||
it only lacks testing ;)
|
||||
* fixed up various rc style memory problems.
|
||||
* gtk_widget_modify_style() now properly changes the style of realized widgets
|
||||
and references the style passed into it. if people worked around this bug,
|
||||
this will introduce a slight memory leak in their code.
|
||||
The code should typically look like:
|
||||
GtkRcStyle *rc_style = gtk_rc_style_new ();
|
||||
[...]
|
||||
gtk_widget_modify_style (widget, rc_style);
|
||||
gtk_rc_style_unref (rc_style);
|
||||
* fix problems with positioning menus offscreen.
|
||||
* GtkText fixes for some crashes and drawing errors.
|
||||
* Better handling for unexpected window destroys in GDK and GTK+.
|
||||
This should make it possible to use a GtkPlug and catch the
|
||||
case where its parent socket is randomly killed.
|
||||
* FAQ updates.
|
||||
* FileSelection i18n patches, RadioButton fixups.
|
||||
* many translation improvements.
|
||||
* miscellaneous other bugs fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.4:
|
||||
|
||||
* DnD improvements (drags can be canceled with Esc now).
|
||||
* suppressed configure event reordering in Gdk.
|
||||
* rewrite of Gtk's configure event handling.
|
||||
* major improvements for the object argument system (Elena Devdariani).
|
||||
* major bugfixes for threading, GtkNotebook, GtkItemFactory, GtkCList and
|
||||
GtkCTree.
|
||||
* tutorial/FAQ updates, new file generation.txt on autogenerated sources.
|
||||
* configure's --with-glib= is "officially" unsupported.
|
||||
* upgrade to libtool 1.3.3.
|
||||
* various buglets fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.3:
|
||||
|
||||
* Upgrade to libtool 1.3
|
||||
* Check for dgettext (for systems with old versions of GNU Gettext)
|
||||
* Many bug fixes (see ChangeLog for details)
|
||||
|
||||
Overview of Changes in GTK+ 1.2.2:
|
||||
|
||||
* Improved Dnd behaviour with Motif applications.
|
||||
* Bug fixes for the Gtk selection code.
|
||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
||||
* Bug fixes and leak plugs for the Gdk IM code.
|
||||
* Added gtk_object_get() facility to retrieve object arguments easily.
|
||||
The var args list expects ("arg-name", &value) pairs.
|
||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
||||
problems where closed pipes were no longer signaling GDK_INPUT_READ on
|
||||
systems with a native poll().
|
||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
||||
anymore).
|
||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
||||
eXodus (commercial X windows server) from popping up a color dialog every
|
||||
time a transparent pixmap is created.
|
||||
* Fixed bug where Gtk timeout/idle handlers would execute without the global
|
||||
Gdk lock being held.
|
||||
* Other minor bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.1:
|
||||
|
||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
||||
accelerator installation. This is often required to get GtkItemFactory
|
||||
like accelerator propagation between different windows with the same
|
||||
menu hierarchy and for centralized parsing and saving of accelerators.
|
||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
||||
* Miscellaneous other bug fixes.
|
||||
|
||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
||||
|
||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
||||
GtkInvisible, GtkCalendar, GtkLayout, GtkPlug, GtkSocket
|
||||
* Many new features and robustness for existing widgets
|
||||
* Theme support
|
||||
* New DND implementation
|
||||
* Internationalization of standard dialogs
|
||||
* New key binding system
|
||||
* Tearoff menus and menu accelerators
|
||||
* Wide character support for entry and text
|
||||
* Resizing code has been overhauled
|
||||
* Queued redraws of partial areas
|
||||
* Far better support for object arguments
|
||||
* Speed optimizations
|
||||
* Runtime loading of dynamic modules
|
||||
* Support for GLib log domains
|
||||
* Tutorial improvements
|
||||
* A bug fix or two
|
||||
|
||||
Overview of Changes in GTK+ 1.1.16:
|
||||
|
||||
* Major fixes and improvements for handlebox
|
||||
* A change to the way widget->requisition works. Now,
|
||||
widget->requisition is always what the widget requested,
|
||||
unmodified by the usize. See Changes-1.2.txt for details.
|
||||
This correct various bugs with gtk_widget_set_usize().
|
||||
* Fixes for XIM on X11R5 systems
|
||||
* Don't allow cut-and-paste of text in password-style entries
|
||||
* --enable-debug is now on by default for the development release.
|
||||
(When compiling for "production", use --enable-debug=minimum)
|
||||
* Handle systems where Helvetica is not present more gracefully
|
||||
* Fixes for memory leaks
|
||||
* CList and CTree fixes
|
||||
* Bug fixes for drawing problems.
|
||||
* Miscellaneous bug fixes to GtkLabel, GtkCList, GtkCTree,
|
||||
GtkColorsel, Focusing, DND
|
||||
* Tutorial improvements
|
||||
|
||||
Overview of Changes in GTK+ 1.1.15:
|
||||
|
||||
* Tutorial Updates
|
||||
* Added --libs gthread to gtk-config
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.14:
|
||||
|
||||
* Additions to docs/Changes-1.2.txt
|
||||
* Just warn when loading theme engine fails
|
||||
* CLAMP GtkScale digits to a meaningful range
|
||||
* GTK_LOCALDIR is now defined in a better fashion
|
||||
* New functions (feature freeze, we know...):
|
||||
gtk_menu_set_title()
|
||||
gtk_toggle_button_get_active()
|
||||
* Some locale fixups in gtkrc code
|
||||
* Fixes to make gtk_radio_button_set_group() keep only
|
||||
one radio button in the group active
|
||||
* Foreign windows are now always treated as viewable; this fixes
|
||||
a problem where updating didn't occur properly in GtkPlug
|
||||
* DND fixes for 64 bit architectures, and for specifying operations
|
||||
with modifier keys.
|
||||
* Major revisions to GtkLayout: avoid having to create window
|
||||
for NO_WINDOW children, adjust allocations of children as
|
||||
scrolled so queued draws work, and a resize is queued instead
|
||||
of allocating directly in a put() or move()
|
||||
|
||||
What is new in GTK+ 1.1.13:
|
||||
|
||||
* Dnd and selection bug fixes and memory purification.
|
||||
* Widget sensitivity fixups.
|
||||
* Tooltips windows are now named "gtk-tooltips" so rc file rules
|
||||
can match tooltips windows. Fixed interaction of tooltips and NO_WINDOW
|
||||
widgets.
|
||||
* Spin buttons now update their values upon value retrieval.
|
||||
* Overhaul of the resizing vs. redrawing logic to reduce redrawing needs
|
||||
a lot. Gtk makes full use of the draw_area coalescing code now, which
|
||||
got minorly improved as well.
|
||||
* Containers map their Gdk windows after their children now to reduce
|
||||
expose event generation.
|
||||
* Gdk event queue fixups, this solves the double-click problems people were
|
||||
recently having.
|
||||
* Account for the fact that GSource's are only properly reentrant from
|
||||
within dispatch(), thus we don't do Gdk event processing from within
|
||||
check() or prepare() anymore.
|
||||
* Rc files feature a bg_pixmap value of "<none>" now.
|
||||
* Improved session management support in Gdk.
|
||||
* Automatic disabling of NLS if no gettext is found should work now.
|
||||
* Removed deprecated functions, docs/Changes-1.2.txt gives an overview.
|
||||
* Gtk+ development now requires GNU autoconf 2.13, GNU automake 1.4
|
||||
and GNU libtool 1.2d.
|
||||
* More bug fixes all over the place.
|
||||
|
||||
What is new in GTK+ 1.1.12:
|
||||
|
||||
* Korean translation added
|
||||
* Fixed memory leaks
|
||||
* A few other bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.11:
|
||||
|
||||
* Dutch, Japanese, Swedish, Polish, and Norwegian translations
|
||||
* Removed deprecated _interp variants: gtk_container_foreach_interp,
|
||||
gtk_idle_add_interp, gtk_timeout_add_interp, gtk_signal_connect_interp
|
||||
* Lots of cast corrections
|
||||
* Many fixes
|
||||
|
||||
What is new in GTK+ 1.1.9:
|
||||
|
||||
* Check for broken glibc 2.0 mb functions and avoid them
|
||||
* Label and Entry display fixes
|
||||
* Move main thread back to GDK, for locking when translating events
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.8:
|
||||
|
||||
* Added support for gettext and the localization of the standard
|
||||
dialogs.
|
||||
* Added line-wrapping for the label, and JUSTIFY_FILL
|
||||
* Support reordering via drag and drop in CList and CTree.
|
||||
* Replaced GtkDrawWindow widget with a GTK_USER_DRAW flag
|
||||
* Extended gtkpaned API to support minimum sizes and proportional
|
||||
resizing.
|
||||
* Changed the handling of shared memory segments so as to
|
||||
remove the need for GTK+ to set up signal handlers.
|
||||
* Re-implemented event loop in terms of the event loop
|
||||
that has been added to GLib 1.1.8
|
||||
* Added 'grab_focus' signal to allow keyboard accelerators
|
||||
for entries.
|
||||
* Load locale specific RC files if present.
|
||||
* Bug fixes.
|
||||
|
||||
What is new in GTK+ 1.1.7:
|
||||
|
||||
* Fixed memory mis-allocation in default files code
|
||||
* Various event handling fixes
|
||||
* Wide character support for entry and text
|
||||
* Destroy widgets _after_ propagating unrealize signals through
|
||||
widget hierarchy
|
||||
* Only build XIM-support if available
|
||||
* Tutorial and examples updates
|
||||
* Added gtk_drag_source_unset()
|
||||
|
||||
What is new in GTK+ 1.1.6:
|
||||
|
||||
* The signal system now features emission hooks with special semantics,
|
||||
refer to the ChangeLog for this.
|
||||
* Minor? speedups and memory reductions to the emission handling of the
|
||||
signal system.
|
||||
* _interp() function variants are deprecated now. the corresponding *_full()
|
||||
variants are provided for a long time now.
|
||||
* Dnd abort timeout increased to 10 minutes.
|
||||
* GtkScrolledWindow inherits from GtkBin now.
|
||||
* GTK_POLICY_NEVER is implemented for scrolled windows now.
|
||||
* Lots of API clean ups.
|
||||
* Incremental freezing abilities.
|
||||
* Integrated widgets from the GNOME tree: GtkLayout, GtkPlug and GtkSocket.
|
||||
* New window functions for transient relationship, default size, and
|
||||
geometry hints
|
||||
* Default rc files are now read in (<sysconfdir/etc/gtkrc and ~/.gtkrc)
|
||||
GTK_RC_FILES environment variable and functions are provided to configure
|
||||
this behavior
|
||||
* Read doc/Changes-1.2.txt to properly adapt your code.
|
||||
* Bug Fixes.
|
||||
|
||||
What is new in GTK+ 1.1.5:
|
||||
|
||||
* Theme integration
|
||||
* Widget style modification is now handled through GtkRcStyles
|
||||
* GtkPixmaps now grey out pixmaps when insensitive
|
||||
* Notebook enhancements
|
||||
* Shadow configurability for menubars and handleboxes
|
||||
* DND enhancements
|
||||
* gtkfilesel now supports automounters better
|
||||
* Implementation of expose compression
|
||||
* Queued redraws of partial areas
|
||||
* Scrolledwindow (+Viewport) source incompatibilities, children that are added
|
||||
to a scrolled window don't get an automatic viewport anymore. a convenience
|
||||
function gtk_scrolled_window_add_with_viewport() is supplied for this task
|
||||
* Deprecated functions will now issue a message, informing the programmer about
|
||||
the use of this function. These functions will get removed in future versions
|
||||
* Non-functional functions got removed entirely
|
||||
* gtk_widget_new() and gtk_object_new() will now auto-construct new objects.
|
||||
A new function gtk_object_default_construct() is provided now which should
|
||||
be called after every gtk_type_new() to perform the auto-construction
|
||||
* Improved argument support of several widgets
|
||||
* Bug Fixes
|
||||
|
||||
What is new in GTK+ 1.1.3:
|
||||
|
||||
* GtkCList/GtkCTree now have the ability to:
|
||||
- hide/show individual columns
|
||||
- disable/enable column resizing
|
||||
- set min and max for column widths
|
||||
- set expander style of the ctree
|
||||
- set/get row and cell styles
|
||||
- set spacing between tree expander and cell contents in ctree
|
||||
- toggle auto_resize for columns
|
||||
* Must enhanced DND support, removed old DND code
|
||||
* Idle functions are now implemented via GHook, giving a slight speed
|
||||
improvement
|
||||
* An environment variable GTK_MODULES which takes a colon separated
|
||||
list of module names GTK+ will now automatically load at gtk_init() startup
|
||||
* GtkFontSel now has support for an extra 'base' filter
|
||||
* New function gdk_window_set_root_origin to get the real geometry taking
|
||||
into account window manager offsets
|
||||
* New function gtk_text_set_line_wrap to toggle line wrapping
|
||||
* New function gtk_widget_add_events which safely adds additional
|
||||
events to a widget's event mask
|
||||
* New function gdk_event_get_time to get the timestamp from a generic
|
||||
event
|
||||
* New widget GtkCalendar
|
||||
* New widget GtkInvisible - InputOnly offscreen windows used for reliable
|
||||
pointer grabs and selection handling in DND code
|
||||
* New functions gtk_object_remove_no_notify[_by_id] to remove a certain
|
||||
data portion without invocation of its destroy notifier
|
||||
* gtk_spin_button_construct is now deprecated, use gtk_spin_button_configure
|
||||
instead
|
||||
* gtk_clist_set_border is now deprecated, use gtk_clist_set_shadow_type
|
||||
instead
|
||||
* Removed functions gtk_object_set_data_destroy[_by_id]
|
||||
* Documentation additions/updates
|
||||
* HTML and plain text files are now included in the distribution
|
||||
* Bug fixes, typeness corrections, and general fixups
|
||||
|
||||
What is new in GTK+ 1.1.2:
|
||||
|
||||
* Gtk+ is now featuring runtime loading of dynamic modules via the
|
||||
--gtk-modules= command line switch. such modules have to export a
|
||||
G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv);
|
||||
function which will be invoked to initialize the module. since such
|
||||
modules may create new widget types, they are always resident.
|
||||
* The tutorial has been updated again.
|
||||
* Changes to menus including tearoff menus and accelerators.
|
||||
* Better support for modal dialogs.
|
||||
* Removed CAN_FOCUS by default from scrollbars and button children of toolbar.
|
||||
* More improvements and fixes for GtkCList and GtkCTree (i.e. row sorting).
|
||||
* GtkCTree rows can be unselectable now.
|
||||
* The GtkCTree API has undergone major renames (see ChangeLog entry from Lars
|
||||
Hamann on Tue Aug 18 00:29:13 1998).
|
||||
* A bunch of varargs functions changed to get va_lists working on systems that
|
||||
implement va_lists as arrays.
|
||||
* Improvements to the gdkrgb code.
|
||||
* Improvements to Gdk color handling so we greatly reduce server traffic and
|
||||
don't leak colors anymore.
|
||||
* Improved internal widget tree iterators (the GtkContainer::foreach signal
|
||||
vanished because of this).
|
||||
* Option menus can have the keyboard focus now.
|
||||
* More fixups to the text widget.
|
||||
* GtkFileSelection should behave much more nicely in combination with AFS now.
|
||||
* Support for label underlining.
|
||||
* Support for GLib 1.1.3 log domains.
|
||||
* Documentation improvements.
|
||||
* Configuration fixes on various platforms.
|
||||
* Miscellaneous fixes to XInput support.
|
||||
* Build with shared library dependencies on Linux
|
||||
* Fix for a major bug in the type systems memory allocation code that could
|
||||
cause random crashes.
|
||||
* Libtool update to version 1.2b.
|
||||
* Lots of bugfixes and cleanups again ;)
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.1:
|
||||
|
||||
* Tutorial updates and additions.
|
||||
* Key binding support for GtkListItems and GtkList.
|
||||
* Extended selection mode and autoscrolling for GtkLists.
|
||||
* A GtkCtree now operates on GtkCTreeNode* structures rather than GList*.
|
||||
* GtkCTreeNodes can now be created from GNode trees.
|
||||
* Bug fixes for GtkNotebook, GtkCList, GtkCombo and GdkWindow reparentation.
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.0:
|
||||
|
||||
* New widget GtkFontSelector.
|
||||
* New featureful progress bar.
|
||||
* New container widget GtkPacker.
|
||||
* New object GtkItemFactory, GtkMenuFactory is deprecated.
|
||||
* New key binding system, configurable via rcfiles, similar to styles.
|
||||
* New widget GtkCTree with drag selections and keyboard movement and
|
||||
and horizontal scrolling. Features also implemented for GtkCList.
|
||||
* Significant speedups to widget creation and destruction through caching
|
||||
colormap and visual queries to the XServer.
|
||||
* Speedups for type creation and especially gtk_type_is_a() checks.
|
||||
* Speedups in signal lookup, creation and emissions and connection handling.
|
||||
* Minor speedups with object data allocation and destruction.
|
||||
* Additions to the signal handling API (e.g. *_emitv).
|
||||
* Support for rc-file reparsing.
|
||||
* Resizing logic is now implemented on container widget basis, rather than
|
||||
for toplevel GtkWindows only.
|
||||
* Buttons support relief styles now.
|
||||
* Some widgets are now allocated through memchunks to behave more memory wise.
|
||||
* Newly included file gtkfeatures.h which defines compatibility macros to
|
||||
test for certain API features upon program compilation.
|
||||
* Child arguments support for container widgets.
|
||||
* Far better support for object arguments, revamp of the underlying
|
||||
mechanism for speed and reusability. Child/object arguments don't
|
||||
need to be preceded by the "GtkType::" portion anymore.
|
||||
* Removed GtkAcceleratorTable in favour of GtkAccelGroup, accelerator display
|
||||
is now performed by a new widget GtkAccelLabel.
|
||||
* Overhaul of the resizing code. Resizing behaviour can now be specified
|
||||
on GtkContainer basis, so the underlying algorithm isn't only available
|
||||
for GtkWindows.
|
||||
* GtkTables are now fully resizable.
|
||||
* The GtkType system now supports an additional base class initialization
|
||||
function.
|
||||
* GtkStyles and key bindings can now be looked up depending on the base
|
||||
types of a widget, through a new keyword `class' in rc files.
|
||||
* GtkButton derives from GtkBin (finally).
|
||||
* More descriptive error messages on rc parsing.
|
||||
* Runtime information is available to query enum/flag definition values.
|
||||
* Upgrade to libtool-1.2
|
||||
* Legions of bug fixes, memory leaks, segfaults, of-by-something errors...
|
||||
including those that already went into the 1.0.x branch.
|
||||
* A big bunch of features and cosmetic fixups that just got lost in
|
||||
the masses of changesonfigure problem when cross-compiling
|
6951
NEWS.pre-3.0
6951
NEWS.pre-3.0
File diff suppressed because it is too large
Load Diff
9178
NEWS.pre-4.0
9178
NEWS.pre-4.0
File diff suppressed because it is too large
Load Diff
158
README
Normal file
158
README
Normal file
@@ -0,0 +1,158 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.6.1. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
GTK+ is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
||||
developers, including those developing proprietary software, without any
|
||||
license fees or royalties.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailinglists.html
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
Release notes
|
||||
=============
|
||||
|
||||
* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
|
||||
a clipboard manager following the specification at
|
||||
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
|
||||
must be running. A sample implementation of such a clipboard manager
|
||||
is available at
|
||||
http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
|
||||
Applications can use the function gdk_display_supports_clipboard_persistence()
|
||||
to find out if clipboard persistence is available.
|
||||
|
||||
* Notification on clipboard ownership changes via GdkOwnerChange events
|
||||
requires the XFIXES X extension. Applications can use the function
|
||||
gdk_display_supports_selection_notification() to find out if ownerchip
|
||||
change notification is available.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
|
||||
specification. Setting the XDG_DATA_DIRS environtment variable may be
|
||||
necessary if your icons aren't installed in the default location
|
||||
/usr/share/icons.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
|
||||
to avoid a lot of disk searching overhead. GTK+ includes a utility named
|
||||
gtk-update-icon-cache to generate these cache files. For further details,
|
||||
see the gtk-update-icon-cache man page or the GTK+ documentation.
|
||||
|
||||
* To reduce code size and improve efficiency, GTK+, when compiled
|
||||
with the GNU toolchain, has separate internal and external entry
|
||||
points for exported functions. The internal names, which begin with
|
||||
IA__, may be seen when debugging a GTK+ program.
|
||||
|
||||
* The following functions have been deprecated in GTK+ 2.6:
|
||||
gdk_pango_context_set_colormap
|
||||
gtk_cell_renderer_editing_canceled
|
||||
|
||||
* The new GtkFileChooser widget emphasizes simplicity and thus does
|
||||
not provide a navigation entry by default when opening files.
|
||||
Experienced command line users will likely want to make heavy use of
|
||||
the location dialog brought up by the Control-L key shortcut.
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. On some platforms, symbols beginning
|
||||
with prefixes such as _gtk, _gdk, and _pango will be exported
|
||||
from the library, on others not. In no case can applications
|
||||
use these private symbols. In addition to that, GTK+ 2.6 makes several
|
||||
symbols private which were not in any installed header files and
|
||||
were never intended to be exported.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory
|
||||
and the framebuffer GDK backend included in the gdk/linux-fb directory
|
||||
of GTK+ are provided on an as-is basis and have not been tested at all.
|
||||
No guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
|
||||
the filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
the GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then you
|
||||
may want to set the G_FILENAME_ENCODING environment variable:
|
||||
|
||||
G_FILENAME_ENCODING=@locale
|
||||
export G_FILENAME_ENCODING
|
||||
|
||||
(Earlier versions of GLib 2.x required a different environment variable
|
||||
setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
|
||||
is still supported, but G_FILENAME_ENCODING is preferred.)
|
||||
Best integration of GTK+ 2.6 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
On Windows, filenames passed to GTK+ should always be in UTF-8, as
|
||||
in GLib 2.6. This is different than in previous versions of GTK+
|
||||
where the system codepage was used. As in GLib, for DLL ABI
|
||||
stability, applications built against previous versions of GTK+ will
|
||||
use entry points providing the old semantics.
|
||||
|
||||
When compiling against GTK+ 2.6, applications intended to be
|
||||
portable to Windows must take the UTF-8 file name encoding into
|
||||
consideration, and use the gstdio wrappers to access files whose
|
||||
names have been constructed from strings returned from GTK+ or GLib.
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking system.
|
||||
(http://bugzilla.gnome.org, product gtk+.) You will need to create an
|
||||
account for yourself.
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the tests or demos built with GTK+,
|
||||
such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior. As a
|
||||
last resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but is not
|
||||
necessary. If you do send a stack trace, and the error is an X error,
|
||||
it will be more useful if the stacktrace is produced running the test
|
||||
program with the --sync command line option.
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches should also be submitted to bugzilla.gnome.org. If the patch
|
||||
fixes an existing bug, add the patch as an attachment to that bug
|
||||
report.
|
||||
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
54
README.cvs-commits
Normal file
54
README.cvs-commits
Normal file
@@ -0,0 +1,54 @@
|
||||
GTK+ is part of the GNOME CVS repository. At the current time, any
|
||||
person with write access to the GNOME repository, can make changes to
|
||||
GTK+. This is a good thing, in that it encourages many people to work
|
||||
on GTK+, and progress can be made quickly. However, GTK+ is a fairly
|
||||
large and complicated package that many other things depend on, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK+ that has been built up over the last 4 years, we'd like
|
||||
to ask people commiting to GTK+ to follow a few rules:
|
||||
|
||||
0) Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've
|
||||
been working on GTK+ for a while it probably isn't necessary
|
||||
to ask. But when in doubt, ask. Even if your change is correct,
|
||||
somebody may know a better way to do things.
|
||||
|
||||
If you are making changes to GTK+, you should be subscribed
|
||||
to gtk-devel-list@gnome.org. (Subscription address:
|
||||
gtk-devel-list-request@gnome.org.) This is a good place to ask
|
||||
about intended changes.
|
||||
|
||||
#gtk+ on GIMPNet (irc.gimp.org, irc.us.gimp.org, irc.eu.gimp.org, ...)
|
||||
is also a good place to find GTK+ developers to discuss changes with,
|
||||
however, email to gtk-devel-list is the most certain and preferred
|
||||
method.
|
||||
|
||||
1) Ask _first_.
|
||||
|
||||
2) There must be a ChangeLog for every commit. (If you discover that
|
||||
you only committed half the files you meant to and need to fix that
|
||||
up, or something, you don't need a new ChangeLog entry. But in general,
|
||||
ChangeLog entries are mandatory.) Changes with out ChangeLog entries
|
||||
will be reverted.
|
||||
|
||||
3) There _must_ be a ChangeLog for every commit.
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are going to be changing many files in an experimental fashion,
|
||||
it probably is a good idea to create a separate branch for your changes.
|
||||
|
||||
* The ChangeLog entries should preferrably match in date format
|
||||
with the existing entries. You can set how emacs does this
|
||||
by using customize mode:
|
||||
|
||||
- M-x customize
|
||||
- set Programming/Tools/ChangeLog/Add Log Time Format to
|
||||
'Old Format'
|
||||
|
||||
Or, set the add-log-time-format to 'current-time-string in
|
||||
your .emacs file.
|
||||
|
||||
Owen Taylor
|
||||
13 Aug 1998
|
||||
17 Apr 2001
|
158
README.in
Normal file
158
README.in
Normal file
@@ -0,0 +1,158 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version @GTK_VERSION@. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
GTK+ is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
||||
developers, including those developing proprietary software, without any
|
||||
license fees or royalties.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailinglists.html
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
Release notes
|
||||
=============
|
||||
|
||||
* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
|
||||
a clipboard manager following the specification at
|
||||
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
|
||||
must be running. A sample implementation of such a clipboard manager
|
||||
is available at
|
||||
http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
|
||||
Applications can use the function gdk_display_supports_clipboard_persistence()
|
||||
to find out if clipboard persistence is available.
|
||||
|
||||
* Notification on clipboard ownership changes via GdkOwnerChange events
|
||||
requires the XFIXES X extension. Applications can use the function
|
||||
gdk_display_supports_selection_notification() to find out if ownerchip
|
||||
change notification is available.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
|
||||
specification. Setting the XDG_DATA_DIRS environtment variable may be
|
||||
necessary if your icons aren't installed in the default location
|
||||
/usr/share/icons.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
|
||||
to avoid a lot of disk searching overhead. GTK+ includes a utility named
|
||||
gtk-update-icon-cache to generate these cache files. For further details,
|
||||
see the gtk-update-icon-cache man page or the GTK+ documentation.
|
||||
|
||||
* To reduce code size and improve efficiency, GTK+, when compiled
|
||||
with the GNU toolchain, has separate internal and external entry
|
||||
points for exported functions. The internal names, which begin with
|
||||
IA__, may be seen when debugging a GTK+ program.
|
||||
|
||||
* The following functions have been deprecated in GTK+ 2.6:
|
||||
gdk_pango_context_set_colormap
|
||||
gtk_cell_renderer_editing_canceled
|
||||
|
||||
* The new GtkFileChooser widget emphasizes simplicity and thus does
|
||||
not provide a navigation entry by default when opening files.
|
||||
Experienced command line users will likely want to make heavy use of
|
||||
the location dialog brought up by the Control-L key shortcut.
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. On some platforms, symbols beginning
|
||||
with prefixes such as _gtk, _gdk, and _pango will be exported
|
||||
from the library, on others not. In no case can applications
|
||||
use these private symbols. In addition to that, GTK+ 2.6 makes several
|
||||
symbols private which were not in any installed header files and
|
||||
were never intended to be exported.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory
|
||||
and the framebuffer GDK backend included in the gdk/linux-fb directory
|
||||
of GTK+ are provided on an as-is basis and have not been tested at all.
|
||||
No guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
|
||||
the filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
the GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then you
|
||||
may want to set the G_FILENAME_ENCODING environment variable:
|
||||
|
||||
G_FILENAME_ENCODING=@locale
|
||||
export G_FILENAME_ENCODING
|
||||
|
||||
(Earlier versions of GLib 2.x required a different environment variable
|
||||
setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
|
||||
is still supported, but G_FILENAME_ENCODING is preferred.)
|
||||
Best integration of GTK+ 2.6 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
On Windows, filenames passed to GTK+ should always be in UTF-8, as
|
||||
in GLib 2.6. This is different than in previous versions of GTK+
|
||||
where the system codepage was used. As in GLib, for DLL ABI
|
||||
stability, applications built against previous versions of GTK+ will
|
||||
use entry points providing the old semantics.
|
||||
|
||||
When compiling against GTK+ 2.6, applications intended to be
|
||||
portable to Windows must take the UTF-8 file name encoding into
|
||||
consideration, and use the gstdio wrappers to access files whose
|
||||
names have been constructed from strings returned from GTK+ or GLib.
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking system.
|
||||
(http://bugzilla.gnome.org, product gtk+.) You will need to create an
|
||||
account for yourself.
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the tests or demos built with GTK+,
|
||||
such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior. As a
|
||||
last resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but is not
|
||||
necessary. If you do send a stack trace, and the error is an X error,
|
||||
it will be more useful if the stacktrace is produced running the test
|
||||
program with the --sync command line option.
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches should also be submitted to bugzilla.gnome.org. If the patch
|
||||
fixes an existing bug, add the patch as an attachment to that bug
|
||||
report.
|
||||
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
193
README.md
193
README.md
@@ -1,193 +0,0 @@
|
||||
GTK — The GTK toolkit
|
||||
=====================
|
||||
|
||||
[](https://gitlab.gnome.org/GNOME/gtk/-/commits/main)
|
||||
|
||||
General information
|
||||
-------------------
|
||||
|
||||
GTK is a multi-platform toolkit for creating graphical user interfaces.
|
||||
Offering a complete set of widgets, GTK is suitable for projects ranging
|
||||
from small one-off projects to complete application suites.
|
||||
|
||||
GTK is a free and open-source software project. The licensing terms
|
||||
for GTK, the GNU LGPL, allow it to be used by all developers, including those
|
||||
developing proprietary software, without any license fees or royalties.
|
||||
|
||||
GTK is hosted by the GNOME project (thanks!) and used by a wide variety
|
||||
of applications and projects.
|
||||
|
||||
The official download location
|
||||
|
||||
- https://download.gnome.org/sources/gtk/
|
||||
|
||||
The official web site
|
||||
|
||||
- https://www.gtk.org
|
||||
|
||||
The official developers blog
|
||||
|
||||
- https://blog.gtk.org
|
||||
|
||||
Discussion forum
|
||||
|
||||
- https://discourse.gnome.org/c/platform/core/
|
||||
|
||||
Nightly documentation can be found at
|
||||
- Gtk: https://gnome.pages.gitlab.gnome.org/gtk/gtk4/
|
||||
- Gdk: https://gnome.pages.gitlab.gnome.org/gtk/gdk4/
|
||||
- Gsk: https://gnome.pages.gitlab.gnome.org/gtk/gsk4/
|
||||
|
||||
Nightly flatpaks of our demos can be installed from the
|
||||
[GNOME Nightly](https://wiki.gnome.org/Apps/Nightly) repository:
|
||||
- `flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo`
|
||||
- `flatpak install gnome-nightly org.gtk.Demo4`
|
||||
- `flatpak install gnome-nightly org.gtk.WidgetFactory4`
|
||||
- `flatpak install gnome-nightly org.gtk.IconBrowser4`
|
||||
|
||||
Building and installing
|
||||
-----------------------
|
||||
|
||||
In order to build GTK you will need:
|
||||
|
||||
- [a C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
||||
- [Python 3](https://www.python.org/)
|
||||
- [Meson](http://mesonbuild.com)
|
||||
- [Ninja](https://ninja-build.org)
|
||||
|
||||
You will also need various dependencies, based on the platform you are
|
||||
building for:
|
||||
|
||||
- [GLib](https://download.gnome.org/sources/glib/)
|
||||
- [GdkPixbuf](https://download.gnome.org/sources/gdk-pixbuf/)
|
||||
- [GObject-Introspection](https://download.gnome.org/sources/gobject-introspection/)
|
||||
- [Cairo](https://www.cairographics.org/)
|
||||
- [Pango](https://download.gnome.org/sources/pango/)
|
||||
- [Epoxy](https://github.com/anholt/libepoxy)
|
||||
- [Graphene](https://github.com/ebassi/graphene)
|
||||
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
|
||||
|
||||
If you are building the X11 backend, you will also need:
|
||||
|
||||
- Xlib, and the following X extensions:
|
||||
- xrandr
|
||||
- xrender
|
||||
- xi
|
||||
- xext
|
||||
- xfixes
|
||||
- xcursor
|
||||
- xdamage
|
||||
- xcomposite
|
||||
|
||||
If you are building the Wayland backend, you will also need:
|
||||
|
||||
- Wayland-client
|
||||
- Wayland-protocols
|
||||
- Wayland-cursor
|
||||
- Wayland-EGL
|
||||
|
||||
Once you have all the necessary dependencies, you can build GTK by using
|
||||
Meson:
|
||||
|
||||
```sh
|
||||
$ meson _build .
|
||||
$ cd _build
|
||||
$ ninja
|
||||
```
|
||||
|
||||
You can run the test suite using:
|
||||
|
||||
```sh
|
||||
$ meson test
|
||||
```
|
||||
|
||||
And, finally, you can install GTK using:
|
||||
|
||||
```
|
||||
$ sudo ninja install
|
||||
```
|
||||
|
||||
Complete information about installing GTK and related libraries
|
||||
can be found in the file:
|
||||
|
||||
```
|
||||
docs/reference/gtk/html/gtk-building.html
|
||||
```
|
||||
|
||||
Or [online](https://docs.gtk.org/gtk4/building.html)
|
||||
|
||||
Default branch renamed to `main`
|
||||
--------------------------------
|
||||
|
||||
The default development branch of GTK has been renamed to `main`.
|
||||
To update your local checkout, use:
|
||||
```sh
|
||||
git checkout master
|
||||
git branch -m master main
|
||||
git fetch
|
||||
git branch --unset-upstream
|
||||
git branch -u origin/main
|
||||
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
|
||||
```
|
||||
|
||||
How to report bugs
|
||||
------------------
|
||||
|
||||
Bugs should be reported on the [issues page](https://gitlab.gnome.org/GNOME/gtk/issues/new).
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- which version of GTK you are using
|
||||
- what operating system and version
|
||||
- for Linux, which distribution
|
||||
- if you built GTK, the list of options used to configure the build
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the demo applications that are
|
||||
built in the demos/ subdirectory, on one of the test programs that
|
||||
are built in the tests/ subdirectory, that will be most convenient.
|
||||
Otherwise, please include a short test program that exhibits the
|
||||
behavior. As a last resort, you can also provide a pointer to a
|
||||
larger piece of software that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out
|
||||
when the crash occurred.
|
||||
|
||||
* Further information such as stack traces may be useful, but
|
||||
is not necessary.
|
||||
|
||||
Contributing to GTK
|
||||
-------------------
|
||||
|
||||
Please, follow the [contribution guide](./CONTRIBUTING.md) to know how to
|
||||
start contributing to GTK.
|
||||
|
||||
If you want to support GTK financially, please consider donating to
|
||||
the GNOME project, which runs the infrastructure hosting GTK.
|
||||
|
||||
Release notes
|
||||
-------------
|
||||
|
||||
The release notes for GTK are part of the migration guide in the API
|
||||
reference. See:
|
||||
|
||||
- [3.x release notes](https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html)
|
||||
- [4.x release notes](https://docs.gtk.org/gtk4/migrating-3to4.html)
|
||||
|
||||
Licensing terms
|
||||
---------------
|
||||
|
||||
GTK is released under the terms of the GNU Lesser General Public License,
|
||||
version 2.1 or, at your option, any later version, as published by the Free
|
||||
Software Foundation.
|
||||
|
||||
Please, see the [`COPYING`](./COPYING) file for further information.
|
||||
|
||||
GTK includes a small number of source files under the Apache license:
|
||||
- A fork of the roaring bitmaps implementation in [gtk/roaring](./gtk/roaring)
|
||||
- An adaptation of timsort from python in [gtk/timsort](./gtk/timsort)
|
93
README.win32
Normal file
93
README.win32
Normal file
@@ -0,0 +1,93 @@
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11
|
||||
one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://www.gimp.org/win32/downloads.html .
|
||||
|
||||
There is also a gtk-1-3-win32-production branch of GTK+ that was
|
||||
branched off from before the addition of the no-flicker and other
|
||||
functionality that was new in GTK+ 2.0.0. The vesion number used for
|
||||
that branch is 1.3.0. It corresponds most closely to GTK 1.2.7 on
|
||||
Unix. For new code, you shouldn't be using that.
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
There are two ways to build GTK+ for win32.
|
||||
|
||||
1) Use the autoconf-generated configure script, and the resulting
|
||||
Makefiles (which use libtool and gcc to do the compilation). I use
|
||||
this myself, but it can be hard to setup correctly.
|
||||
|
||||
Personally I run configure with:
|
||||
CC='gcc -mpentium -fnative-struct' CPPFLAGS='-I/target/include' CFLAGS=-O2 LDFLAGS='-L/target/lib' ./configure --disable-static --prefix=/target --with-gdktarget=win32 --with-wintab=/src/wtkit126 --with-ie55=/src/workshop/ie55_lib --host=i386-pc-mingw32
|
||||
|
||||
Then, in theory, you can just say "make", like on Unix. In reality,
|
||||
there are a few hickups that require manual intervention, and it's
|
||||
best to run make separately in each subdirectory. At least for me,
|
||||
when libtool creates an .exe file, it puts the real .exe in the .libs
|
||||
directory, and leaves a wrapper .exe in the work directory. For some
|
||||
reason that wrapper doesn't work for me, it doesn't do anything. So, I
|
||||
always do a "cp .libs/*.exe ." after running a make that has produced
|
||||
some exes.
|
||||
|
||||
Another issue is with the gdk-pixbuf.loaders file. It's probably best
|
||||
to do a "make install" in the gdk-pixbuf directory, and let that set
|
||||
up a mostly correct gdk-pixbuf.loaders in the target directory. Then
|
||||
copy that back to the source directory. It's needed in gtk/stock-icons
|
||||
where make runs gdk-pixbuf-csource.
|
||||
|
||||
Etc, you get the idea. It can be a bit of a pain.
|
||||
|
||||
2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
Note that I use method 1 myself. Hans Breuer has been taking care of
|
||||
the MSVC makefiles. At times, we disagree a bit about various issues,
|
||||
and for instance the makefile.msc files will not produce identically
|
||||
named DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
Wintab
|
||||
======
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit can
|
||||
be downloaded from http://www.pointing.com. Pass the --with-wintab
|
||||
flag to configure if you use that. If you use nmake and you don't care
|
||||
for Wintab, undefine HAVE_WINTAB in config.h.win32 and remove
|
||||
references to the wntab32x library from the makefile before building.
|
||||
|
||||
ActiveIMM
|
||||
=========
|
||||
|
||||
If you want to build a GTK+ that supports ActiveIMM (the Input Method
|
||||
Manager for non-EastAsia locales that can be used on Win9x/NT4), you
|
||||
need the dimm.h header file. That is somewhat difficult to find, but
|
||||
http://msdn.microsoft.com/downloads/samples/internet/wizard/ seems to
|
||||
be a good place to look nowadays. If you use "autoconfiscated" build,
|
||||
pass the --with-ie55 flag to configure specifying the location of the
|
||||
ie55_lib directory created by downloading the IE5.5 headers and libs
|
||||
from the above URL.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>
|
78
acconfig.h
Normal file
78
acconfig.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/* acconfig.h
|
||||
This file is in the public domain.
|
||||
|
||||
Descriptive text for the C preprocessor macros that
|
||||
the distributed Autoconf macros can define.
|
||||
No software package will use all of them; autoheader copies the ones
|
||||
your configure.in uses into your configuration header file templates.
|
||||
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). Although this order
|
||||
can split up related entries, it makes it easier to check whether
|
||||
a given entry is in the file.
|
||||
|
||||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
/* Other stuff */
|
||||
#undef ENABLE_NLS
|
||||
#undef GTK_COMPILED_WITH_DEBUGGING
|
||||
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIMM_H
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_PROGRESSIVE_JPEG
|
||||
#undef HAVE_PWD_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_STPCPY
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SOLARIS_XINERAMA
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_XFREE_XINERAMA
|
||||
#undef HAVE_XINERAMA
|
||||
#undef HAVE_WINTAB
|
||||
#undef HAVE_XCONVERTCASE
|
||||
#undef HAVE_XFT
|
||||
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
#undef USE_GMODULE
|
||||
#undef USE_MMX
|
||||
|
||||
/* Define to use XKB extension */
|
||||
#undef HAVE_XKB
|
||||
|
||||
/* Define to use shadowfb in the linux-fb port */
|
||||
#undef ENABLE_SHADOW_FB
|
||||
|
||||
/* Define to use a fb manager in the linux-fb port */
|
||||
#undef ENABLE_FB_MANAGER
|
||||
|
||||
#undef XINPUT_NONE
|
||||
#undef XINPUT_GXI
|
||||
#undef XINPUT_XFREE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Most machines will be happy with int or void. IRIX requires '...' */
|
||||
#undef SIGNAL_ARG_TYPE
|
||||
|
||||
#undef GETTEXT_PACKAGE
|
||||
|
||||
/* #undef PACKAGE */
|
||||
/* #undef VERSION */
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it.
|
||||
If you're adding to this file, keep in mind:
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). */
|
79
acinclude.m4
Normal file
79
acinclude.m4
Normal file
@@ -0,0 +1,79 @@
|
||||
# autoconf 2.13 / 2.50 compatibility macro
|
||||
|
||||
# GLIB_AC_DIVERT_BEFORE_HELP(STUFF)
|
||||
# ---------------------------------
|
||||
# Put STUFF early enough so that they are available for $ac_help expansion.
|
||||
# Handle both classic (<= v2.13) and modern autoconf
|
||||
AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP],
|
||||
[ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])],
|
||||
[ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])],
|
||||
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
$1
|
||||
AC_DIVERT_POP()])])])
|
||||
|
||||
# GTK_ADD_LIB(VAR,LIBNAME)
|
||||
# ---------------------------------
|
||||
# Helper macro to add a -lBlah to a variable, avoiding repeats
|
||||
# Note that this needs to be quoted when used in an enclosing macro
|
||||
AC_DEFUN([GTK_ADD_LIB],
|
||||
[ case "$$1 " in
|
||||
*-l$2[[\ \ ]]*) ;;
|
||||
*) $1="-l$2 $$1" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
# Checks the location of the XML Catalog
|
||||
# Usage:
|
||||
# JH_PATH_XML_CATALOG([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# Defines XMLCATALOG and XML_CATALOG_FILE substitutions
|
||||
AC_DEFUN([JH_PATH_XML_CATALOG],
|
||||
[
|
||||
# check for the presence of the XML catalog
|
||||
AC_ARG_WITH([xml-catalog],
|
||||
AC_HELP_STRING([--with-xml-catalog=CATALOG],
|
||||
[path to xml catalog to use]),,
|
||||
[with_xml_catalog=/etc/xml/catalog])
|
||||
jh_found_xmlcatalog=true
|
||||
XML_CATALOG_FILE="$with_xml_catalog"
|
||||
AC_SUBST([XML_CATALOG_FILE])
|
||||
AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)])
|
||||
if test -f "$XML_CATALOG_FILE"; then
|
||||
AC_MSG_RESULT([found])
|
||||
else
|
||||
jh_found_xmlcatalog=false
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
|
||||
# check for the xmlcatalog program
|
||||
AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
|
||||
if test "x$XMLCATALOG" = xno; then
|
||||
jh_found_xmlcatalog=false
|
||||
fi
|
||||
|
||||
if $jh_found_xmlcatalog; then
|
||||
ifelse([$1],,[:],[$1])
|
||||
else
|
||||
ifelse([$2],,[AC_MSG_ERROR([could not find XML catalog])],[$2])
|
||||
fi
|
||||
])
|
||||
|
||||
# Checks if a particular URI appears in the XML catalog
|
||||
# Usage:
|
||||
# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
AC_DEFUN([JH_CHECK_XML_CATALOG],
|
||||
[
|
||||
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
||||
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
||||
if $jh_found_xmlcatalog && \
|
||||
AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
||||
AC_MSG_RESULT([found])
|
||||
ifelse([$3],,,[$3
|
||||
])dnl
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
ifelse([$4],,
|
||||
[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],
|
||||
[$4])
|
||||
fi
|
||||
])
|
112
autogen.sh
Executable file
112
autogen.sh
Executable file
@@ -0,0 +1,112 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=Gtk+
|
||||
TEST_TYPE=-d
|
||||
FILE=gdk
|
||||
|
||||
DIE=0
|
||||
|
||||
have_libtool=false
|
||||
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*|1.5*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_libtool ; then : ; else
|
||||
echo
|
||||
echo "You must have libtool 1.4 installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have gtk-doc installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
echo
|
||||
echo "You must have automake 1.7.x installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`$ACLOCAL --print-ac-dir`
|
||||
m4list="glib-2.0.m4 glib-gettext.m4"
|
||||
|
||||
for file in $m4list
|
||||
do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
rm -rf autom4te.cache
|
||||
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
gtkdocize || exit $?
|
||||
|
||||
autoheader || exit $?
|
||||
|
||||
$AUTOMAKE --add-missing || exit $?
|
||||
autoconf || exit $?
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
fi
|
@@ -1,43 +0,0 @@
|
||||
diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile
|
||||
--- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100
|
||||
+++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100
|
||||
@@ -23,6 +23,7 @@
|
||||
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
||||
|
||||
LUA_A= liblua.a
|
||||
+LUA_SO= liblua.so
|
||||
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
|
||||
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
|
||||
lundump.o lvm.o lzio.o
|
||||
@@ -36,7 +37,7 @@
|
||||
LUAC_O= luac.o print.o
|
||||
|
||||
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
||||
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
||||
+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
||||
ALL_A= $(LUA_A)
|
||||
|
||||
default: $(PLAT)
|
||||
@@ -51,6 +52,11 @@
|
||||
$(AR) $@ $?
|
||||
$(RANLIB) $@
|
||||
|
||||
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
||||
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
|
||||
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
|
||||
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
|
||||
+
|
||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||
|
||||
--- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200
|
||||
+++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100
|
||||
@@ -53,7 +53,7 @@
|
||||
all: $(PLAT)
|
||||
|
||||
$(PLATS) clean:
|
||||
- cd src && $(MAKE) $@
|
||||
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
|
||||
|
||||
test: dummy
|
||||
src/lua test/hello.lua
|
@@ -1,206 +0,0 @@
|
||||
{
|
||||
"app-id" : "org.gtk.Demo4",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "master",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "gtk4-demo",
|
||||
"tags" : [
|
||||
"devel",
|
||||
"development",
|
||||
"nightly"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"finish-args" : [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs",
|
||||
"--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man",
|
||||
"/share/man",
|
||||
"/share/gtk-doc",
|
||||
"*.la",
|
||||
".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "wayland",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"-Ddocumentation=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.freedesktop.org/wayland/wayland.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "graphene",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dtests=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/ebassi/graphene.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libsass",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/libsass.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "sassc",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/sassc.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "boost",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"./bootstrap.sh --prefix=/app --with-libraries=date_time,filesystem,iostreams,locale,regex,system,thread,python,program_options,test,serialization",
|
||||
"./b2 --build-type=minimal link=shared -j $FLATPAK_BUILDER_N_JOBS",
|
||||
"./b2 --build-type=minimal link=shared install"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2",
|
||||
"sha256": "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lua-5.1",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux",
|
||||
"make INSTALL_TOP=$FLATPAK_DEST TO_LIB='liblua.a liblua.so.5.1.5' install",
|
||||
"ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so",
|
||||
"ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so.5.1",
|
||||
"install -Dm0644 etc/lua.pc $FLATPAK_DEST/lib/pkgconfig/lua.pc",
|
||||
"ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua51.pc",
|
||||
"ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua5.1.pc",
|
||||
"ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua-5.1.pc"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
|
||||
"sha256": "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"path": "lua-5.1.5-so.patch"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"commands": [
|
||||
"sed -i \"s|/usr/local|$FLATPAK_DEST|\" etc/lua.pc src/luaconf.h"
|
||||
]
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"/bin",
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/man"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "highlight",
|
||||
"buildsystem" : "simple",
|
||||
"builddir" : true,
|
||||
"build-commands" : [
|
||||
"sed -i -e 's#^PREFIX = /usr#PREFIX = /app#' makefile",
|
||||
"make",
|
||||
"make install"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "http://www.andre-simon.de/zip/highlight-4.0.tar.bz2",
|
||||
"sha256" : "f40dcba26e011a2c67df874f4d9b0238c2c6b065163ce8de3d8371b9dfce864d"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "pango",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/pango.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gtk",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dvulkan=disabled",
|
||||
"-Dbuildtype=debugoptimized",
|
||||
"-Dprofile=devel"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"build-options" : {
|
||||
"env" : {
|
||||
"GSK_RENDERER" : "opengl"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,134 +0,0 @@
|
||||
{
|
||||
"app-id" : "org.gtk.IconBrowser4",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "master",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "gtk4-icon-browser",
|
||||
"tags" : [
|
||||
"devel",
|
||||
"development",
|
||||
"nightly"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"finish-args" : [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs",
|
||||
"--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man",
|
||||
"/share/man",
|
||||
"/share/gtk-doc",
|
||||
"*.la",
|
||||
".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "wayland",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"-Ddocumentation=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.freedesktop.org/wayland/wayland.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "graphene",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dtests=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/ebassi/graphene.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libsass",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/libsass.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "sassc",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/sassc.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "pango",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/pango.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gtk",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dvulkan=disabled",
|
||||
"-Dbuildtype=debugoptimized",
|
||||
"-Dprofile=devel"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"build-options" : {
|
||||
"env" : {
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,138 +0,0 @@
|
||||
{
|
||||
"app-id" : "org.gtk.WidgetFactory4",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "master",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "gtk4-widget-factory",
|
||||
"tags" : [
|
||||
"devel",
|
||||
"development",
|
||||
"nightly"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"finish-args" : [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs",
|
||||
"--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man",
|
||||
"/share/man",
|
||||
"/share/gtk-doc",
|
||||
"*.la",
|
||||
".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "wayland",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"-Ddocumentation=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.freedesktop.org/wayland/wayland.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "graphene",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dtests=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/ebassi/graphene.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libsass",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/libsass.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "sassc",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/sassc.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "pango",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/pango.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gtk",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dvulkan=disabled",
|
||||
"-Dbuildtype=debugoptimized",
|
||||
"-Dprofile=devel"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"build-options" : {
|
||||
"env" : {
|
||||
"DBUS_SESSION_BUS_ADDRESS" : "''",
|
||||
"GSK_RENDERER" : "opengl",
|
||||
"GDK_DEBUG" : "vulkan-disable",
|
||||
"G_ENABLE_DEBUG" : "true"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,138 +0,0 @@
|
||||
{
|
||||
"app-id" : "org.gtk.gtk4.NodeEditor",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "master",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "gtk4-node-editor",
|
||||
"tags" : [
|
||||
"devel",
|
||||
"development",
|
||||
"nightly"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"finish-args" : [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs",
|
||||
"--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man",
|
||||
"/share/man",
|
||||
"/share/gtk-doc",
|
||||
"*.la",
|
||||
".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "wayland",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"-Ddocumentation=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.freedesktop.org/wayland/wayland.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "graphene",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dtests=false"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/ebassi/graphene.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "libsass",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/libsass.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "sassc",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/lazka/sassc.git",
|
||||
"branch" : "meson"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "pango",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/pango.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gtk",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dvulkan=disabled",
|
||||
"-Dbuildtype=debugoptimized",
|
||||
"-Dprofile=devel"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git",
|
||||
"branch" : "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"build-options" : {
|
||||
"env" : {
|
||||
"DBUS_SESSION_BUS_ADDRESS" : "''",
|
||||
"GSK_RENDERER" : "opengl",
|
||||
"GDK_DEBUG" : "vulkan-disable",
|
||||
"G_ENABLE_DEBUG" : "true"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
from pathlib import PurePath
|
||||
|
||||
|
||||
stylesheets = [
|
||||
'gtk/theme/Default/Default-light.css',
|
||||
'gtk/theme/Default/Default-dark.css',
|
||||
'gtk/theme/Default/Default-hc.css',
|
||||
'gtk/theme/Default/Default-hc-dark.css',
|
||||
]
|
||||
|
||||
references = [
|
||||
'docs/reference/gtk/gtk4',
|
||||
'docs/reference/gsk/gsk4',
|
||||
'docs/reference/gdk/gdk4',
|
||||
'docs/reference/gdk/gdk4-wayland',
|
||||
'docs/reference/gdk/gdk4-x11',
|
||||
]
|
||||
|
||||
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
|
||||
buildroot = os.environ.get('MESON_BUILD_ROOT')
|
||||
distroot = os.environ.get('MESON_DIST_ROOT')
|
||||
|
||||
for stylesheet in stylesheets:
|
||||
stylesheet_path = PurePath(stylesheet)
|
||||
src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
|
||||
dst = PurePath(distroot, stylesheet_path)
|
||||
subprocess.call(['sassc', '-a', '-M', '-t', 'compact', src, dst])
|
||||
|
||||
for reference in references:
|
||||
src_path = os.path.join(buildroot, reference)
|
||||
if os.path.isdir(src_path):
|
||||
dst_path = os.path.join(distroot, reference)
|
||||
shutil.copytree(src_path, dst_path)
|
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
repodir = sys.argv[1]
|
||||
profile = sys.argv[2]
|
||||
|
||||
sys.stdout.write("/* This file is auto-generated. Do not edit. */\n")
|
||||
sys.stdout.write("#pragma once\n")
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.write(f"#define PROFILE \"{profile}\"\n")
|
||||
|
||||
short_sha = os.environ.get('CI_COMMIT_SHORT_SHA')
|
||||
if short_sha is None:
|
||||
cmd = ["git", "-C", repodir, "rev-parse", "--short", "HEAD"]
|
||||
try:
|
||||
with subprocess.Popen(cmd, stdout=subprocess.PIPE) as p:
|
||||
short_sha = p.stdout.read().decode('utf-8').rstrip("\n")
|
||||
except FileNotFoundError:
|
||||
short_sha = ''
|
||||
if profile != 'default':
|
||||
short_sha = 'devel'
|
||||
|
||||
sys.stdout.write(f"#define VCS_TAG \"{short_sha}\"\n")
|
289
config.h.win32.in
Normal file
289
config.h.win32.in
Normal file
@@ -0,0 +1,289 @@
|
||||
/* config.h.win32.in. Merged from two versions generated by configure for gcc and MSVC. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
/* acconfig.h
|
||||
This file is in the public domain.
|
||||
|
||||
Descriptive text for the C preprocessor macros that
|
||||
the distributed Autoconf macros can define.
|
||||
No software package will use all of them; autoheader copies the ones
|
||||
your configure.in uses into your configuration header file templates.
|
||||
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). Although this order
|
||||
can split up related entries, it makes it easier to check whether
|
||||
a given entry is in the file.
|
||||
|
||||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
/* Other stuff */
|
||||
#define ENABLE_NLS 1
|
||||
#define GTK_COMPILED_WITH_DEBUGGING "yes"
|
||||
|
||||
/* #undef HAVE_CATGETS */
|
||||
/* #undef HAVE_DIMM_H */
|
||||
#define HAVE_GETTEXT 1
|
||||
/* #undef HAVE_IPC_H */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
#define HAVE_PROGRESSIVE_JPEG 1
|
||||
/* #undef HAVE_PWD_H */
|
||||
/* #undef HAVE_SHM_H */
|
||||
/* #undef HAVE_STPCPY */
|
||||
/* #undef HAVE_XSHM_H */
|
||||
/* #undef HAVE_SHAPE_EXT */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
#endif /* _MSC_VER */
|
||||
#define HAVE_WINSOCK_H 1
|
||||
#define HAVE_WINTAB 1
|
||||
/* #undef HAVE_XCONVERTCASE */
|
||||
/* #undef HAVE_XFT */
|
||||
|
||||
/* #undef HAVE_SIGSETJMP */
|
||||
|
||||
#define NO_FD_SET 1
|
||||
|
||||
/* #undef RESOURCE_BASE */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define USE_GMODULE 1
|
||||
#define USE_MMX 1
|
||||
#endif
|
||||
|
||||
/* Define to use X11R6 additions to XIM */
|
||||
/* #undef USE_X11R6_XIM */
|
||||
|
||||
/* Define to use XKB extension */
|
||||
/* #undef HAVE_XKB */
|
||||
|
||||
/* Define to use shadowfb in the linux-fb port */
|
||||
/* #undef ENABLE_SHADOW_FB */
|
||||
|
||||
/* Define to use a fb manager in the linux-fb port */
|
||||
/* #undef ENABLE_FB_MANAGER */
|
||||
|
||||
/* #undef XINPUT_NONE */
|
||||
/* #undef XINPUT_GXI */
|
||||
/* #undef XINPUT_XFREE */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Most machines will be happy with int or void. IRIX requires '...' */
|
||||
/* #undef SIGNAL_ARG_TYPE */
|
||||
|
||||
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
|
||||
|
||||
/* #undef PACKAGE */
|
||||
/* #undef VERSION */
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it.
|
||||
If you're adding to this file, keep in mind:
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* always defined to indicate that i18n is enabled */
|
||||
#define ENABLE_NLS 1
|
||||
|
||||
/* Define if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
/* #undef HAVE_ARGZ_H */
|
||||
|
||||
/* Define if you have the `bind_textdomain_codeset' function. */
|
||||
/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
|
||||
|
||||
/* Is the wctype implementation broken */
|
||||
/* #undef HAVE_BROKEN_WCTYPE */
|
||||
|
||||
/* Define if you have the `dcgettext' function. */
|
||||
#define HAVE_DCGETTEXT 1
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the `getpagesize' function. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the `getresuid' function. */
|
||||
/* #undef HAVE_GETRESUID */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#define HAVE_GETTEXT 1
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
/* #undef HAVE_INTTYPES_H */
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the `mkstemp' function. */
|
||||
/* #undef HAVE_MKSTEMP */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if you have the `munmap' function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
/* #undef HAVE_NL_TYPES_H */
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define if you have the `setenv' function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_STDINT_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_STDINT_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the `strcasecmp' function. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_STRCASECMP 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_UNISTD_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Have wchar.h include file */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Have wctype.h include file */
|
||||
#define HAVE_WCTYPE_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#define HAVE_WINSOCK_H 1
|
||||
|
||||
/* Define if you have the `__argz_count' function. */
|
||||
/* #undef HAVE___ARGZ_COUNT */
|
||||
|
||||
/* Define if you have the `__argz_next' function. */
|
||||
/* #undef HAVE___ARGZ_NEXT */
|
||||
|
||||
/* Define if you have the `__argz_stringify' function. */
|
||||
/* #undef HAVE___ARGZ_STRINGIFY */
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if the X Window System is missing or not being used. */
|
||||
/* #undef X_DISPLAY_MISSING */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#define gid_t int
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
/* #undef inline */
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#define uid_t int
|
1713
configure.in
Normal file
1713
configure.in
Normal file
File diff suppressed because it is too large
Load Diff
2
contrib/.cvsignore
Normal file
2
contrib/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
5
contrib/Makefile.am
Normal file
5
contrib/Makefile.am
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
SUBDIRS =
|
||||
if USE_X11
|
||||
SUBDIRS += gdk-pixbuf-xlib
|
||||
endif
|
7
contrib/gdk-pixbuf-xlib/.cvsignore
Normal file
7
contrib/gdk-pixbuf-xlib/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.la
|
||||
*.lo
|
||||
.libs
|
||||
.deps
|
||||
gdk-pixbuf-xlib-2.0.pc
|
153
contrib/gdk-pixbuf-xlib/ChangeLog
Normal file
153
contrib/gdk-pixbuf-xlib/ChangeLog
Normal file
@@ -0,0 +1,153 @@
|
||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.1 ===
|
||||
|
||||
2004-12-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.0 ===
|
||||
|
||||
2004-12-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.6 ===
|
||||
|
||||
2004-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.5 ===
|
||||
|
||||
2004-10-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.4 ===
|
||||
|
||||
2004-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.3 ===
|
||||
|
||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.2 ===
|
||||
|
||||
2004-08-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.1 ===
|
||||
|
||||
Tue Jul 20 23:26:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c: Include config.h first. (#148034)
|
||||
|
||||
Sun Jul 18 20:17:41 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* === released 2.5.0 ==
|
||||
|
||||
Tue Mar 9 09:33:54 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* === Released 2.3.6 ===
|
||||
|
||||
Wed Mar 3 15:50:28 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (libgdk_pixbuf_xlib_2_0_la_LIBADD): Add
|
||||
a shared library dependency on libgdk-pixbuf (#124687)
|
||||
|
||||
Tue Feb 24 14:45:03 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* === Released 2.3.3 ===
|
||||
|
||||
Fri Feb 13 10:32:09 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.h: Remove a couple of unneeded
|
||||
#includes. Isn't unsupported code fun?
|
||||
(133833, Gregory Merchan)
|
||||
|
||||
Tue Oct 7 23:30:00 2003 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk-pixbuf-xlib.h: Add C++ guards. (123955, Harring Figueiredo)
|
||||
|
||||
2002-08-06 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* Makefile.am (lib_LTLIBRARIES): link against xlibs
|
||||
|
||||
2002-01-25 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merge from gdk-pixbuf stable.
|
||||
|
||||
* gdk-pixbuf-xlib-drawable.c (rgb565msb): Fixed the endianness
|
||||
conversion --- swap the individual 16 bit values instead of taking
|
||||
everying as a 32 bit value.
|
||||
(rgb565lsb): Likewise.
|
||||
(rgb555lsb): Likewise.
|
||||
(rgb555msb): Likewise.
|
||||
|
||||
2001-11-26 Akira TAGOH <tagoh@redhat.com>
|
||||
|
||||
* Makefile.am (libgdk_pixbuf_xlib_1_3_la_LDFLAGS):
|
||||
Added -version-info.
|
||||
|
||||
2001-05-19 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c: docs
|
||||
|
||||
2001-06-04 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c (xlib_rgb_init): remove C++ comment,
|
||||
reported by Dan McNichol
|
||||
|
||||
Mon Jan 8 11:41:41 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (INCLUDES): Add @x_cflags@ (#36310)
|
||||
|
||||
2001-01-02 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib-2.0.pc.in (Description): fix up description a bit.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib.c: Put display/screen here, instead of in
|
||||
the main gdk-pixbuf library as it was in 1.0; since the io-xpm
|
||||
loader doesn't use these variables anymore it should be OK
|
||||
|
||||
2000-09-26 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-drawable.c
|
||||
(gdk_pixbuf_xlib_get_from_drawable): Do not use
|
||||
gdk_screen_{width,height}(). Thanks to John Harper for pointing
|
||||
this out.
|
||||
|
||||
2000-08-26 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlibrgb.c: Added API reference docs.
|
||||
|
||||
2000-08-25 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-drawable.c (handle_x_error): Return
|
||||
0.
|
||||
(xlib_window_is_viewable): Return FALSE in the last case.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-render.c: Updated the inline docs.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib.c: Added API docs.
|
||||
|
||||
2000-08-25 John Harper <john@dcs.warwick.ac.uk>
|
||||
|
||||
Work to create an Xlib version of gdk-pixbuf (with the Xlib
|
||||
port of GdkRGB for rendering):
|
||||
|
||||
* configure.in: check for X libraries, set and substitute
|
||||
GDK_PIXBUF_XLIB_{LIBDIR,INCLUDEDIR,LIBS} variables
|
||||
|
||||
* gdk_pixbuf_xlibConf.sh.in: new file -- gnome-config details
|
||||
for the gdk-pixbuf-xlib library
|
||||
* Makefile.am: build and install gdk_pixbuf_xlibConf.sh
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-render.c,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib.c, gdk-pixbuf/gdk-pixbuf-xlib.h,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib-private.h,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib-drawable.c: new files, ported the
|
||||
GDK dependent parts of gdk-pixbuf to use Xlib. Functions that
|
||||
were called gdk_pixbuf_FOO are now gdk_pixbuf_xlib_FOO
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlibrgb.c,
|
||||
gdk-pixbuf/gdk-pixbuf-xlibrgb.h: added Chris Blizzard's Xlib
|
||||
port of GdkRGB (from Mozilla CVS)
|
||||
|
||||
* gdk-pixbuf/Makefile.am: build a library libgdk_pixbuf_xlib.la
|
||||
including the non-GDK dependent objects from libgdk_pixbuf.la
|
||||
plus the Xlib ports and xlibrgb
|
35
contrib/gdk-pixbuf-xlib/Makefile.am
Normal file
35
contrib/gdk-pixbuf-xlib/Makefile.am
Normal file
@@ -0,0 +1,35 @@
|
||||
lib_LTLIBRARIES=libgdk_pixbuf_xlib-2.0.la
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) -I$(top_builddir) \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-I$(top_srcdir)/contrib \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
$(GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
-version-info $(LT_VERSION_INFO)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LIBADD = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(GDK_PIXBUF_XLIB_DEP_LIBS)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_SOURCES = \
|
||||
gdk-pixbuf-xlib-private.h \
|
||||
gdk-pixbuf-xlib.c \
|
||||
gdk-pixbuf-xlib-render.c \
|
||||
gdk-pixbuf-xlib-drawable.c \
|
||||
gdk-pixbuf-xlibrgb.c
|
||||
|
||||
libgdk_pixbuf_xlibincludedir=$(includedir)/gtk-2.0/gdk-pixbuf-xlib
|
||||
|
||||
libgdk_pixbuf_xlibinclude_HEADERS = \
|
||||
gdk-pixbuf-xlib.h \
|
||||
gdk-pixbuf-xlibrgb.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-pixbuf-xlib-2.0.pc
|
||||
|
||||
EXTRA_DIST = gdk-pixbuf-xlib-2.0.pc.in
|
11
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc.in
Normal file
11
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: GdkPixbuf Xlib
|
||||
Description: GdkPixbuf rendering for Xlib
|
||||
Version: @VERSION@
|
||||
Requires: gobject-2.0,gmodule-2.0,gdk-pixbuf-2.0
|
||||
Libs: -L${libdir} -lgdk_pixbuf_xlib-@GTK_API_VERSION@
|
||||
Cflags: -I${includedir}
|
1343
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
Normal file
1343
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
Normal file
File diff suppressed because it is too large
Load Diff
30
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-private.h
Normal file
30
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-private.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* GdkPixbuf library - Xlib header file
|
||||
*
|
||||
* Authors: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef GDK_PIXBUF_XLIB_PRIVATE_H
|
||||
#define GDK_PIXBUF_XLIB_PRIVATE_H
|
||||
|
||||
#include "gdk-pixbuf-xlib.h"
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
extern Display *gdk_pixbuf_dpy;
|
||||
extern int gdk_pixbuf_screen;
|
||||
|
||||
#endif
|
398
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c
Normal file
398
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c
Normal file
@@ -0,0 +1,398 @@
|
||||
/* GdkPixbuf library - Rendering functions
|
||||
*
|
||||
* Copyright (C) 1999 The Free Software Foundation
|
||||
*
|
||||
* Author: Federico Mena-Quintero <federico@gimp.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* Trivially ported to Xlib(RGB) by John Harper. */
|
||||
|
||||
#include <config.h>
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixbuf-xlib-private.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_threshold_alpha:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @bitmap: Bitmap where the bilevel mask will be painted to.
|
||||
* @src_x: Source X coordinate.
|
||||
* @src_y: source Y coordinate.
|
||||
* @dest_x: Destination X coordinate.
|
||||
* @dest_y: Destination Y coordinate.
|
||||
* @width: Width of region to threshold.
|
||||
* @height: Height of region to threshold.
|
||||
* @alpha_threshold: Opacity values below this will be painted as zero; all
|
||||
* other values will be painted as one.
|
||||
*
|
||||
* Takes the opacity values in a rectangular portion of a pixbuf and thresholds
|
||||
* them to produce a bi-level alpha mask that can be used as a clipping mask for
|
||||
* a drawable.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int alpha_threshold)
|
||||
{
|
||||
GC gc;
|
||||
XColor color;
|
||||
int x, y;
|
||||
guchar *p;
|
||||
int start, start_status;
|
||||
int status;
|
||||
XGCValues gcv;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (bitmap != 0);
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
g_return_if_fail (alpha_threshold >= 0 && alpha_threshold <= 255);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, bitmap, 0, &gcv);
|
||||
|
||||
if (!pixbuf->has_alpha) {
|
||||
color.pixel = (alpha_threshold == 255) ? 0 : 1;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
XFillRectangle (gdk_pixbuf_dpy, bitmap, gc,
|
||||
dest_x, dest_y, width, height);
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
return;
|
||||
}
|
||||
|
||||
color.pixel = 0;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
XFillRectangle (gdk_pixbuf_dpy, bitmap, gc,
|
||||
dest_x, dest_y, width, height);
|
||||
|
||||
color.pixel = 1;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
p = (pixbuf->pixels + (y + src_y) * pixbuf->rowstride + src_x * pixbuf->n_channels
|
||||
+ pixbuf->n_channels - 1);
|
||||
|
||||
start = 0;
|
||||
start_status = *p < alpha_threshold;
|
||||
|
||||
for (x = 0; x < width; x++) {
|
||||
status = *p < alpha_threshold;
|
||||
|
||||
if (status != start_status) {
|
||||
if (!start_status)
|
||||
XDrawLine (gdk_pixbuf_dpy, bitmap, gc,
|
||||
start + dest_x, y + dest_y,
|
||||
x - 1 + dest_x, y + dest_y);
|
||||
|
||||
start = x;
|
||||
start_status = status;
|
||||
}
|
||||
|
||||
p += pixbuf->n_channels;
|
||||
}
|
||||
|
||||
if (!start_status)
|
||||
XDrawLine (gdk_pixbuf_dpy, bitmap, gc,
|
||||
start + dest_x, y + dest_y,
|
||||
x - 1 + dest_x, y + dest_y);
|
||||
}
|
||||
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Creates a buffer by stripping the alpha channel of a pixbuf */
|
||||
static guchar *
|
||||
remove_alpha (GdkPixbuf *pixbuf, int x, int y, int width, int height, int *rowstride)
|
||||
{
|
||||
guchar *buf;
|
||||
int xx, yy;
|
||||
guchar *src, *dest;
|
||||
|
||||
g_assert (pixbuf->n_channels == 4);
|
||||
g_assert (pixbuf->has_alpha);
|
||||
g_assert (width > 0 && height > 0);
|
||||
g_assert (x >= 0 && x + width <= pixbuf->width);
|
||||
g_assert (y >= 0 && y + height <= pixbuf->height);
|
||||
|
||||
*rowstride = 4 * ((width * 3 + 3) / 4);
|
||||
|
||||
buf = g_new (guchar, *rowstride * height);
|
||||
|
||||
for (yy = 0; yy < height; yy++) {
|
||||
src = pixbuf->pixels + pixbuf->rowstride * (yy + y) + x * pixbuf->n_channels;
|
||||
dest = buf + *rowstride * yy;
|
||||
|
||||
for (xx = 0; xx < width; xx++) {
|
||||
*dest++ = *src++;
|
||||
*dest++ = *src++;
|
||||
*dest++ = *src++;
|
||||
src++;
|
||||
}
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_to_drawable:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @drawable: Destination drawable.
|
||||
* @gc: GC used for rendering.
|
||||
* @src_x: Source X coordinate within pixbuf.
|
||||
* @src_y: Source Y coordinate within pixbuf.
|
||||
* @dest_x: Destination X coordinate within drawable.
|
||||
* @dest_y: Destination Y coordinate within drawable.
|
||||
* @width: Width of region to render, in pixels.
|
||||
* @height: Height of region to render, in pixels.
|
||||
* @dither: Dithering mode for XlibRGB.
|
||||
* @x_dither: X offset for dither.
|
||||
* @y_dither: Y offset for dither.
|
||||
*
|
||||
* Renders a rectangular portion of a pixbuf to a drawable while using the
|
||||
* specified GC. This is done using XlibRGB, so the specified drawable must
|
||||
* have the XlibRGB visual and colormap. Note that this function will ignore
|
||||
* the opacity information for images with an alpha channel; the GC must already
|
||||
* have the clipping mask set if you want transparent regions to show through.
|
||||
*
|
||||
* For an explanation of dither offsets, see the XlibRGB documentation. In
|
||||
* brief, the dither offset is important when re-rendering partial regions of an
|
||||
* image to a rendered version of the full image, or for when the offsets to a
|
||||
* base position change, as in scrolling. The dither matrix has to be shifted
|
||||
* for consistent visual results. If you do not have any of these cases, the
|
||||
* dither offsets can be both zero.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
Drawable drawable, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
guchar *buf;
|
||||
int rowstride;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != 0);
|
||||
g_return_if_fail (gc != 0);
|
||||
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
/* This will have to be modified once we support other image types.
|
||||
* Also, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we
|
||||
* have to pack the buffer first. Sigh.
|
||||
*/
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
buf = remove_alpha (pixbuf, src_x, src_y, width, height, &rowstride);
|
||||
else {
|
||||
buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
|
||||
rowstride = pixbuf->rowstride;
|
||||
}
|
||||
|
||||
xlib_draw_rgb_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, rowstride,
|
||||
x_dither, y_dither);
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_to_drawable_alpha:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @drawable: Destination drawable.
|
||||
* @src_x: Source X coordinate within pixbuf.
|
||||
* @src_y: Source Y coordinates within pixbuf.
|
||||
* @dest_x: Destination X coordinate within drawable.
|
||||
* @dest_y: Destination Y coordinate within drawable.
|
||||
* @width: Width of region to render, in pixels.
|
||||
* @height: Height of region to render, in pixels.
|
||||
* @alpha_mode: If the image does not have opacity information, this is ignored.
|
||||
* Otherwise, specifies how to handle transparency when rendering.
|
||||
* @alpha_threshold: If the image does have opacity information and @alpha_mode
|
||||
* is GDK_PIXBUF_ALPHA_BILEVEL, specifies the threshold value for opacity
|
||||
* values.
|
||||
* @dither: Dithering mode for XlibRGB.
|
||||
* @x_dither: X offset for dither.
|
||||
* @y_dither: Y offset for dither.
|
||||
*
|
||||
* Renders a rectangular portion of a pixbuf to a drawable. This is done using
|
||||
* XlibRGB, so the specified drawable must have the XlibRGB visual and colormap.
|
||||
*
|
||||
* When used with #GDK_PIXBUF_ALPHA_BILEVEL, this function has to create a bitmap
|
||||
* out of the thresholded alpha channel of the image and, it has to set this
|
||||
* bitmap as the clipping mask for the GC used for drawing. This can be a
|
||||
* significant performance penalty depending on the size and the complexity of
|
||||
* the alpha channel of the image. If performance is crucial, consider handling
|
||||
* the alpha channel yourself (possibly by caching it in your application) and
|
||||
* using gdk_pixbuf_xlib_render_to_drawable() or GdkRGB directly instead.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, Drawable drawable,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
GdkPixbufAlphaMode alpha_mode,
|
||||
int alpha_threshold,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
Pixmap bitmap = 0;
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != 0);
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, drawable, 0, &gcv);
|
||||
|
||||
if (pixbuf->has_alpha) {
|
||||
/* Right now we only support GDK_PIXBUF_ALPHA_BILEVEL, so we
|
||||
* unconditionally create the clipping mask.
|
||||
*/
|
||||
|
||||
bitmap = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
width, height, 1);
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf, bitmap,
|
||||
src_x, src_y,
|
||||
0, 0,
|
||||
width, height,
|
||||
alpha_threshold);
|
||||
|
||||
XSetClipMask (gdk_pixbuf_dpy, gc, bitmap);
|
||||
XSetClipOrigin (gdk_pixbuf_dpy, gc, dest_x, dest_y);
|
||||
}
|
||||
|
||||
gdk_pixbuf_xlib_render_to_drawable (pixbuf, drawable, gc,
|
||||
src_x, src_y,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
x_dither, y_dither);
|
||||
|
||||
if (bitmap)
|
||||
XFreePixmap (gdk_pixbuf_dpy, bitmap);
|
||||
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_pixmap_and_mask:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @pixmap_return: Return value for the created pixmap.
|
||||
* @mask_return: Return value for the created mask.
|
||||
* @alpha_threshold: Threshold value for opacity values.
|
||||
*
|
||||
* Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
|
||||
* and @mask_return arguments, respectively, and renders a pixbuf and its
|
||||
* corresponding tresholded alpha mask to them. This is merely a convenience
|
||||
* function; applications that need to render pixbufs with dither offsets or to
|
||||
* given drawables should use gdk_pixbuf_xlib_render_to_drawable_alpha() or
|
||||
* gdk_pixbuf_xlib_render_to_drawable(), and
|
||||
* gdk_pixbuf_xlib_render_threshold_alpha().
|
||||
*
|
||||
* If the pixbuf does not have an alpha channel, then *@mask_return will be set
|
||||
* to None.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *mask_return,
|
||||
int alpha_threshold)
|
||||
{
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
|
||||
if (pixmap_return) {
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
*pixmap_return = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
xlib_rgb_get_depth ());
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, *pixmap_return, 0, &gcv);
|
||||
gdk_pixbuf_xlib_render_to_drawable (pixbuf, *pixmap_return, gc,
|
||||
0, 0, 0, 0,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
XLIB_RGB_DITHER_NORMAL,
|
||||
0, 0);
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
if (mask_return) {
|
||||
if (pixbuf->has_alpha) {
|
||||
*mask_return = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
pixbuf->width,
|
||||
pixbuf->height, 1);
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf,
|
||||
*mask_return,
|
||||
0, 0, 0, 0,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
alpha_threshold);
|
||||
} else
|
||||
*mask_return = 0;
|
||||
}
|
||||
}
|
63
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c
Normal file
63
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* GdkPixbuf library - Initialization functions
|
||||
*
|
||||
* Author: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf-private.h>
|
||||
#include "gdk-pixbuf-xlib-private.h"
|
||||
|
||||
Display *gdk_pixbuf_dpy = NULL;
|
||||
int gdk_pixbuf_screen = -1;
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_init:
|
||||
* @display: X display to use.
|
||||
* @screen_num: Screen number.
|
||||
*
|
||||
* Initializes the gdk-pixbuf Xlib machinery by calling xlib_rgb_init(). This
|
||||
* function should be called near the beginning of your program, or before using
|
||||
* any of the gdk-pixbuf-xlib functions.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_init (Display *display, int screen_num)
|
||||
{
|
||||
xlib_rgb_init (display, ScreenOfDisplay (display, screen_num));
|
||||
gdk_pixbuf_dpy = display;
|
||||
gdk_pixbuf_screen = screen_num;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_init_with_depth:
|
||||
* @display: X display to use.
|
||||
* @screen_num: Screen number.
|
||||
* @prefDepth: Preferred depth for XlibRGB.
|
||||
*
|
||||
* Similar to gdk_pixbuf_xlib_init(), but also lets you specify the preferred
|
||||
* depth for XlibRGB if you do not want it to use the default depth it picks.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_init_with_depth (Display *display,
|
||||
int screen_num, int prefDepth)
|
||||
{
|
||||
xlib_rgb_init_with_depth (display, ScreenOfDisplay (display, screen_num),
|
||||
prefDepth);
|
||||
gdk_pixbuf_dpy = display;
|
||||
gdk_pixbuf_screen = screen_num;
|
||||
}
|
91
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.h
Normal file
91
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/* GdkPixbuf library - Xlib header file
|
||||
*
|
||||
* Authors: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef GDK_PIXBUF_XLIB_H
|
||||
#define GDK_PIXBUF_XLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
|
||||
|
||||
/* init */
|
||||
|
||||
void gdk_pixbuf_xlib_init (Display *display, int screen_num);
|
||||
|
||||
void gdk_pixbuf_xlib_init_with_depth (Display *display, int screen_num,
|
||||
int prefDepth);
|
||||
|
||||
|
||||
|
||||
/* render */
|
||||
|
||||
void gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int alpha_threshold);
|
||||
|
||||
void gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
Drawable drawable, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither);
|
||||
|
||||
|
||||
void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf,
|
||||
Drawable drawable,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
GdkPixbufAlphaMode alpha_mode,
|
||||
int alpha_threshold,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither);
|
||||
|
||||
void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *mask_return,
|
||||
int alpha_threshold);
|
||||
|
||||
|
||||
|
||||
/* drawable */
|
||||
|
||||
GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
|
||||
Drawable src,
|
||||
Colormap cmap, Visual *visual,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* GDK_PIXBUF_XLIB_H */
|
3724
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
Normal file
3724
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
Normal file
File diff suppressed because it is too large
Load Diff
193
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h
Normal file
193
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h
Normal file
@@ -0,0 +1,193 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "MPL"); you may not use this file except in
|
||||
* compliance with the MPL. You may obtain a copy of the MPL at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the MPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* MPL.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the
|
||||
* terms of the GNU Library General Public License (the "LGPL"), in
|
||||
* which case the provisions of the LGPL are applicable instead of
|
||||
* those above. If you wish to allow use of your version of this file
|
||||
* only under the terms of the LGPL and not to allow others to use
|
||||
* your version of this file under the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and
|
||||
* other provisions required by the LGPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file
|
||||
* under either the MPL or the LGPL.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is derived from GdkRgb.
|
||||
* For more information on GdkRgb, see http://www.levien.com/gdkrgb/
|
||||
* Raph Levien <raph@acm.org>
|
||||
*/
|
||||
|
||||
/* Ported by Christopher Blizzard to Xlib. With permission from the
|
||||
* original authors of this file, the contents of this file are also
|
||||
* redistributable under the terms of the Mozilla Public license. For
|
||||
* information about the Mozilla Public License, please see the
|
||||
* license information at http://www.mozilla.org/MPL/
|
||||
*/
|
||||
|
||||
/* This code is copyright the following authors:
|
||||
* Raph Levien <raph@acm.org>
|
||||
* Manish Singh <manish@gtk.org>
|
||||
* Tim Janik <timj@gtk.org>
|
||||
* Peter Mattis <petm@xcf.berkeley.edu>
|
||||
* Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
* Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
* Christopher Blizzard <blizzard@redhat.com>
|
||||
* Owen Taylor <otaylor@redhat.com>
|
||||
* Shawn T. Amundson <amundson@gtk.org>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XLIB_RGB_H__
|
||||
#define __XLIB_RGB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
typedef struct _XlibRgbCmap XlibRgbCmap;
|
||||
|
||||
struct _XlibRgbCmap {
|
||||
unsigned int colors[256];
|
||||
unsigned char lut[256]; /* for 8-bit modes */
|
||||
};
|
||||
|
||||
void
|
||||
xlib_rgb_init (Display *display, Screen *screen);
|
||||
void
|
||||
xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth);
|
||||
|
||||
unsigned long
|
||||
xlib_rgb_xpixel_from_rgb (guint32 rgb);
|
||||
|
||||
void
|
||||
xlib_rgb_gc_set_foreground (GC gc, guint32 rgb);
|
||||
|
||||
void
|
||||
xlib_rgb_gc_set_background (GC gc, guint32 rgb);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XLIB_RGB_DITHER_NONE,
|
||||
XLIB_RGB_DITHER_NORMAL,
|
||||
XLIB_RGB_DITHER_MAX
|
||||
} XlibRgbDither;
|
||||
|
||||
void
|
||||
xlib_draw_rgb_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *rgb_buf,
|
||||
int rowstride);
|
||||
|
||||
void
|
||||
xlib_draw_rgb_image_dithalign (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *rgb_buf,
|
||||
int rowstride,
|
||||
int xdith,
|
||||
int ydith);
|
||||
|
||||
void
|
||||
xlib_draw_rgb_32_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride);
|
||||
|
||||
void
|
||||
xlib_draw_gray_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride);
|
||||
|
||||
XlibRgbCmap *
|
||||
xlib_rgb_cmap_new (guint32 *colors, int n_colors);
|
||||
|
||||
void
|
||||
xlib_rgb_cmap_free (XlibRgbCmap *cmap);
|
||||
|
||||
void
|
||||
xlib_draw_indexed_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride,
|
||||
XlibRgbCmap *cmap);
|
||||
|
||||
/* Below are some functions which are primarily useful for debugging
|
||||
and experimentation. */
|
||||
Bool
|
||||
xlib_rgb_ditherable (void);
|
||||
|
||||
void
|
||||
xlib_rgb_set_verbose (Bool verbose);
|
||||
|
||||
/* experimental colormap stuff */
|
||||
void
|
||||
xlib_rgb_set_install (Bool install);
|
||||
|
||||
void
|
||||
xlib_rgb_set_min_colors (int min_colors);
|
||||
|
||||
Colormap
|
||||
xlib_rgb_get_cmap (void);
|
||||
|
||||
Visual *
|
||||
xlib_rgb_get_visual (void);
|
||||
|
||||
XVisualInfo *
|
||||
xlib_rgb_get_visual_info (void);
|
||||
|
||||
int
|
||||
xlib_rgb_get_depth (void);
|
||||
|
||||
Display *
|
||||
xlib_rgb_get_display (void);
|
||||
|
||||
Screen *
|
||||
xlib_rgb_get_screen (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __XLIB_RGB_H__ */
|
18
debian/README.debian
vendored
Normal file
18
debian/README.debian
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
libgtk1 for Debian
|
||||
----------------------
|
||||
|
||||
The GIMP Tool Kit (gtk) is a set of widgets to help you program
|
||||
programs for the X Windowing System easily and powerfully.
|
||||
|
||||
gtk is the moving force behind The GNU Image Manipulation Program (The
|
||||
GIMP) -- the number one freely-available image editing and creation
|
||||
program available.
|
||||
|
||||
gtk is rapidly under development, and the source tree has officially
|
||||
been separated from The GIMP now, as other teams of programmers
|
||||
are beginning to write software using its great widget set -- like
|
||||
GNOME, a desktop interface for X, and gzilla, a freely available
|
||||
web browser for X.
|
||||
|
||||
Ben Gertzfield <che@debian.org>, Mon, 29 Sep 1997 13:11:45 -0700
|
||||
|
62
debian/build
vendored
Executable file
62
debian/build
vendored
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Adjust debian/changelog and build a new
|
||||
# Debian package of a CVS archive.
|
||||
|
||||
# Written 17 November 1998 by Ben Gertzfield
|
||||
# <che@debian.org>
|
||||
|
||||
# This work is released under the GNU
|
||||
# General Public License, version 2 or
|
||||
# later.
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use File::Copy;
|
||||
|
||||
my $maintainer = 'Ben Gertzfield <che@debian.org>';
|
||||
|
||||
my @date = localtime;
|
||||
|
||||
my $datestr = sprintf("%d%.2d%.2d", $date[5] + 1900, $date[4] + 1, $date[3]);
|
||||
my $revision = '01';
|
||||
|
||||
open (CHANGELOG, 'debian/changelog') or die "Couldn't open debian/changelog: $!\n";
|
||||
|
||||
$_ = <CHANGELOG>;
|
||||
chomp;
|
||||
|
||||
close CHANGELOG;
|
||||
|
||||
my ($package, $last_date, $last_revision) = /^(.*?) \((.*?)\.(.*)?\)/;
|
||||
|
||||
if ($last_date eq $datestr) {
|
||||
$revision = sprintf("%.2d", $last_revision + 1);
|
||||
}
|
||||
|
||||
my $new_version = "$datestr.$revision";
|
||||
|
||||
copy('debian/changelog', 'debian/changelog.old') or die "Couldn't copy debian/changelog to debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWCHANGELOG, ">debian/changelog") or die "Couldn't open debian/changelog for writing: $!\n";
|
||||
|
||||
print NEWCHANGELOG "$package ($new_version) unstable; urgency=low\n\n * CVS snapshot build at " . scalar localtime() . "\n\n -- $maintainer " . `date -R` . "\n";
|
||||
|
||||
open(OLDCHANGELOG, "debian/changelog.old") or die "Couldn't open debian/changelog.old: $!\n";
|
||||
|
||||
while (<OLDCHANGELOG>) {
|
||||
print NEWCHANGELOG;
|
||||
}
|
||||
|
||||
close OLDCHANGELOG;
|
||||
close NEWCHANGELOG;
|
||||
|
||||
unlink('debian/changelog.old') or die "Couldn't unlink debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWVERSION, '>debian/version') or die "Couldn't open debian/version for writing: $!\n";
|
||||
print NEWVERSION "$new_version\n";
|
||||
close NEWVERSION;
|
||||
|
||||
system('dpkg-buildpackage -b -rfakeroot -us -uc');
|
||||
unlink 'debian/version' or die "Couldn't unlink debian/version: $!\n";
|
||||
|
10
debian/changelog
vendored
Normal file
10
debian/changelog
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
gtk+-cvs (19981116.01) unstable; urgency=low
|
||||
|
||||
* First test build from CVS
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Tue, 17 Nov 1998 12:02:13 -0800
|
||||
|
||||
Local variables:
|
||||
mode: debian-changelog
|
||||
add-log-mailing-address: "che@debian.org"
|
||||
End:
|
81
debian/control
vendored
Normal file
81
debian/control
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
Source: gtk+-cvs
|
||||
Priority: extra
|
||||
Section: libs
|
||||
Maintainer: Ben Gertzfield <che@debian.org>
|
||||
Standards-Version: 2.4.0.0
|
||||
|
||||
Package: libgtk-cvs-1.1
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends}
|
||||
Conflicts: libgtk-dev (<< 1:1.0.2), libgtk1.1
|
||||
Description: CVS build of the GIMP Toolkit set of widgets for X
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
The GIMP Toolkit is a freely available set of widgets for X.
|
||||
GTK is easy to use, and has been implemented in such projects as
|
||||
The GNU Image Manipulation Program (The GIMP), GNOME, a GNU
|
||||
desktop set of utilities for X, and gzilla, a GNU web-browser.
|
||||
.
|
||||
This is the unstable 1.1 branch of GTK. It is not intended for use
|
||||
with stable projects!
|
||||
|
||||
Package: libgtk-cvs-dev
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (=${Source-Version}), libglib-cvs-dev
|
||||
Suggests: libgtk-cvs-doc
|
||||
Provides: libgtk1.1-dev
|
||||
Replaces: libgtk1.1-dev
|
||||
Conflicts: libgtk-dev, libgtk1 (<< 1:1.0.4), libgtk1.1-dev
|
||||
Description: CVS build of development files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the header files and static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to develop your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to compile your own plug-ins for
|
||||
The GIMP.
|
||||
|
||||
Package: libgtk-cvs-doc
|
||||
Architecture: all
|
||||
Section: doc
|
||||
Conflicts: libgtk-dev (<< 1:0.99.4), libgtk-doc, libgtk1.1-doc
|
||||
Description: CVS build of documentation for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains lots of info-files, HTML docs, FAQs, and
|
||||
other handy documentation about the GIMP Toolkit set of widgets
|
||||
for X.
|
||||
.
|
||||
This package documents the unstable 1.1 release of the GIMP Toolkit.
|
||||
.
|
||||
Install this package if you want to have lots of info about the
|
||||
GIMP toolkit when you're programming.
|
||||
|
||||
Package: libgtk-cvs-dbg
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (= ${Source-Version}), libgtk-cvs-dev (= ${Source-Version})
|
||||
Suggests: libgtk-cvs-doc
|
||||
Conflicts: libgtk1.1-dbg
|
||||
Description: CVS build of debugging files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the debugging static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to debug your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to debug your own plug-ins for
|
||||
The GIMP.
|
8
debian/copyright
vendored
Normal file
8
debian/copyright
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
This package was debianized by Ben Gertzfield <che@debian.org> on
|
||||
Tue, 17 Nov 1998 12:07:17 -0800
|
||||
|
||||
It was produced from the CVS repository at cvs.gimp.org.
|
||||
|
||||
It may be redistributed under the terms of the GNU LGPL, Version 2 or
|
||||
later, found on Debian systems in the file /usr/doc/copyright/LGPL.
|
||||
|
9
debian/libgtk-cvs-dev.files
vendored
Normal file
9
debian/libgtk-cvs-dev.files
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
usr/lib/libgdk.so
|
||||
usr/lib/libgdk.a
|
||||
usr/lib/libgtk.so
|
||||
usr/lib/libgtk.a
|
||||
usr/include/gdk/
|
||||
usr/include/gtk/
|
||||
usr/bin/gtk-config
|
||||
usr/man/man1/gtk-config.1
|
||||
usr/share/aclocal/gtk.m4
|
5
debian/libgtk-cvs-dev.postinst
vendored
Normal file
5
debian/libgtk-cvs-dev.postinst
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
6
debian/libgtk-cvs-dev.prerm
vendored
Normal file
6
debian/libgtk-cvs-dev.prerm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
|
||||
#DEBHELPER#
|
8
debian/libgtk-cvs-doc.files
vendored
Normal file
8
debian/libgtk-cvs-doc.files
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
usr/info/gdk.info
|
||||
usr/info/gtk.info
|
||||
usr/info/gtk.info-1
|
||||
usr/info/gtk.info-2
|
||||
usr/info/gtk.info-3
|
||||
usr/info/gtk.info-4
|
||||
usr/info/gtk.info-5
|
||||
|
11
debian/libgtk-cvs-doc.postinst
vendored
Normal file
11
debian/libgtk-cvs-doc.postinst
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
install-info --quiet --description="The GIMP Toolkit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gtk.info.gz
|
||||
|
||||
install-info --quiet --description="The GIMP Drawing Kit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gdk.info.gz
|
||||
|
||||
#DEBHELPER#
|
7
debian/libgtk-cvs-doc.prerm
vendored
Normal file
7
debian/libgtk-cvs-doc.prerm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
install-info --quiet --remove gdk
|
||||
|
||||
#DEBHELPER#
|
7
debian/postinst
vendored
Normal file
7
debian/postinst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
ldconfig
|
||||
|
||||
#DEBHELPER#
|
160
debian/rules
vendored
Executable file
160
debian/rules
vendored
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# debian/rules file for gtk+ Debian package
|
||||
# written April 1998 by Ben Gertzfield <che@debian.org
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
./autogen.sh --prefix=/usr --with-xinput=xfree
|
||||
$(MAKE)
|
||||
cd docs && make distdocs
|
||||
cd ..
|
||||
touch build-stamp
|
||||
|
||||
build-dbg: build-dbg-stamp
|
||||
build-dbg-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --with-xinput=xfree --enable-debug=yes
|
||||
$(MAKE)
|
||||
touch build-dbg-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean
|
||||
|
||||
clean-dbg:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean -k
|
||||
|
||||
install: install-stamp
|
||||
install-stamp: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
$(MAKE) prefix=`pwd`/debian/tmp/usr install
|
||||
touch install-stamp
|
||||
|
||||
install-dbg: install-dbg-stamp
|
||||
install-dbg-stamp: build-dbg
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
$(MAKE) prefix=`pwd`/debian/libgtk-cvs-dbg/usr install
|
||||
touch install-dbg-stamp
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install libgtk-cvs-doc
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install libgtk-cvs-dev libgtk-cvs-1.1 libgtk-cvs-dbg
|
||||
|
||||
libgtk-cvs-1.1: build
|
||||
dh_testdir -plibgtk-cvs-1.1
|
||||
dh_testroot -plibgtk-cvs-1.1
|
||||
dh_installdirs -plibgtk-cvs-1.1
|
||||
# Add here commands to install the files into debian/tmp
|
||||
rm -rf debian/tmp/usr/bin debian/tmp/usr/include debian/tmp/usr/info debian/tmp/usr/lib/glib debian/tmp/usr/share/aclocal debian/tmp/usr/man debian/tmp/usr/lib/*.la
|
||||
dh_installdocs -plibgtk-cvs-1.1
|
||||
dh_installchangelogs -plibgtk-cvs-1.1
|
||||
dh_strip -plibgtk-cvs-1.1
|
||||
dh_compress -plibgtk-cvs-1.1
|
||||
dh_fixperms -plibgtk-cvs-1.1
|
||||
dh_installdeb -plibgtk-cvs-1.1
|
||||
dh_shlibdeps -plibgtk-cvs-1.1
|
||||
dh_gencontrol -plibgtk-cvs-1.1
|
||||
dh_makeshlibs -plibgtk-cvs-1.1 -V 'libgtk-cvs-1.1 (='`cat debian/version`')'
|
||||
dh_md5sums -plibgtk-cvs-1.1
|
||||
dh_builddeb -plibgtk-cvs-1.1
|
||||
|
||||
libgtk-cvs-dev: build
|
||||
dh_testdir -plibgtk-cvs-dev
|
||||
dh_testroot -plibgtk-cvs-dev
|
||||
dh_clean -plibgtk-cvs-dev -k
|
||||
dh_installdirs -plibgtk-cvs-dev
|
||||
# Add here commands to install the files into debian/tmp
|
||||
dh_movefiles -plibgtk-cvs-dev
|
||||
cp gtk-config debian/tmp/usr/bin
|
||||
dh_installdocs -plibgtk-cvs-dev
|
||||
dh_installchangelogs -plibgtk-cvs-dev
|
||||
dh_strip -plibgtk-cvs-dev
|
||||
dh_compress -plibgtk-cvs-dev
|
||||
dh_fixperms -plibgtk-cvs-dev
|
||||
dh_installdeb -plibgtk-cvs-dev
|
||||
dh_shlibdeps -plibgtk-cvs-dev
|
||||
dh_gencontrol -plibgtk-cvs-dev
|
||||
dh_md5sums -plibgtk-cvs-dev
|
||||
dh_builddeb -plibgtk-cvs-dev
|
||||
|
||||
libgtk-cvs-doc:
|
||||
dh_testdir -plibgtk-cvs-doc
|
||||
dh_testroot -plibgtk-cvs-doc
|
||||
dh_clean -plibgtk-cvs-doc -k
|
||||
dh_installdirs -plibgtk-cvs-doc usr/doc/libgtk-cvs-doc/faq-html \
|
||||
usr/doc/libgtk-cvs-doc/tutorial-html usr/doc/libgtk-cvs-doc/italian-tutorial-html usr/doc/libgtk-cvs-doc/french-tutorial-html usr/doc/libgtk-cvs-doc/gdk-html
|
||||
dh_movefiles -plibgtk-cvs-doc
|
||||
cp docs/html/gtkfaq*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/faq-html
|
||||
cp docs/html/gtk_tut-*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut_it*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/gtk_tut_fr*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/gdk* debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/gdk-html
|
||||
cp docs/text/*.txt debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/
|
||||
|
||||
dh_installdocs -plibgtk-cvs-doc docs/{debugging,developers,styles,text_widget,widget_system,gtk-config,refcounting}.txt TODO NEWS
|
||||
dh_installchangelogs -plibgtk-cvs-doc
|
||||
dh_strip -plibgtk-cvs-doc
|
||||
dh_compress -plibgtk-cvs-doc
|
||||
dh_fixperms -plibgtk-cvs-doc
|
||||
dh_installdeb -plibgtk-cvs-doc
|
||||
dh_shlibdeps -plibgtk-cvs-doc
|
||||
dh_gencontrol -plibgtk-cvs-doc
|
||||
dh_md5sums -plibgtk-cvs-doc
|
||||
dh_builddeb -plibgtk-cvs-doc
|
||||
|
||||
libgtk-cvs-dbg: clean-dbg install-dbg
|
||||
dh_testdir -plibgtk-cvs-dbg
|
||||
dh_testroot -plibgtk-cvs-dbg
|
||||
dh_installdirs -plibgtk-cvs-dbg
|
||||
# Add here commands to install the files into debian/libgtk-cvs-dbg
|
||||
rm -rf debian/libgtk-cvs-dbg/usr/bin debian/libgtk-cvs-dbg/usr/include debian/libgtk-cvs-dbg/usr/info debian/libgtk-cvs-dbg/usr/lib/glib debian/libgtk-cvs-dbg/usr/man debian/libgtk-cvs-dbg/usr/share debian/libgtk-cvs-dbg/usr/lib/*.{la,so*}
|
||||
for file in `find debian/libgtk-cvs-dbg/usr/lib -name '*.a'` ; do \
|
||||
mv $$file debian/libgtk-cvs-dbg/usr/lib/`basename $$file .a`_g.a; \
|
||||
done
|
||||
dh_installdocs -plibgtk-cvs-dbg
|
||||
dh_installchangelogs -plibgtk-cvs-dbg
|
||||
dh_compress -plibgtk-cvs-dbg
|
||||
dh_fixperms -plibgtk-cvs-dbg
|
||||
dh_installdeb -plibgtk-cvs-dbg
|
||||
dh_shlibdeps -plibgtk-cvs-dbg
|
||||
dh_gencontrol -plibgtk-cvs-dbg
|
||||
dh_md5sums -plibgtk-cvs-dbg
|
||||
dh_builddeb -plibgtk-cvs-dbg
|
||||
|
||||
source diff:
|
||||
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary
|
11
demos/.cvsignore
Normal file
11
demos/.cvsignore
Normal file
@@ -0,0 +1,11 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
.deps
|
||||
testanimation
|
||||
test-inline-pixbufs.h
|
||||
testpixbuf-drawable
|
||||
testpixbuf-scale
|
||||
testpixbuf-save
|
||||
testpixbuf
|
||||
pixbuf-demo
|
85
demos/Makefile.am
Normal file
85
demos/Makefile.am
Normal file
@@ -0,0 +1,85 @@
|
||||
## Makefile.am for gtk+/demos
|
||||
|
||||
SUBDIRS = gtk-demo
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
testpixbuf-drawable \
|
||||
testanimation \
|
||||
testpixbuf-save \
|
||||
testpixbuf-scale \
|
||||
pixbuf-demo
|
||||
|
||||
# Need to build test-inline-pixbufs.h for testpixbuf
|
||||
if HAVE_PNG
|
||||
noinst_PROGRAMS += testpixbuf
|
||||
BUILT_SOURCES = test-inline-pixbufs.h
|
||||
endif
|
||||
|
||||
if CROSS_COMPILING
|
||||
pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
|
||||
pixbuf_csource_deps=
|
||||
else
|
||||
pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource
|
||||
pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders
|
||||
endif
|
||||
|
||||
test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
|
||||
$(pixbuf_csource) --raw --build-list \
|
||||
apple_red $(srcdir)/apple-red.png \
|
||||
gnome_foot $(srcdir)/gnome-foot.png \
|
||||
> test-inline-pixbufs.h \
|
||||
|| (rm -f test-inline-pixbufs.h && false)
|
||||
|
||||
testpixbuf_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_save_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_scale_DEPENDENCIES = $(DEPS)
|
||||
testanimation_DEPENDENCIES = $(DEPS)
|
||||
pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||
|
||||
testpixbuf_LDADD = $(LDADDS)
|
||||
testpixbuf_drawable_LDADD = $(LDADDS)
|
||||
testpixbuf_save_LDADD = $(LDADDS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS)
|
||||
testanimation_LDADD = $(LDADDS)
|
||||
pixbuf_demo_LDADD = $(LDADDS)
|
||||
|
||||
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
|
||||
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
|
||||
testpixbuf_save_SOURCES = testpixbuf-save.c
|
||||
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
|
||||
testanimation_SOURCES = testanimation.c pixbuf-init.c
|
||||
pixbuf_demo_SOURCES = pixbuf-demo.c pixbuf-init.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
apple-red.png \
|
||||
background.jpg \
|
||||
gnome-applets.png \
|
||||
gnome-calendar.png \
|
||||
gnome-foot.png \
|
||||
gnome-gimp.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png
|
||||
|
||||
DISTCLEANFILES = test-inline-pixbufs.h
|
BIN
demos/apple-red.png
Normal file
BIN
demos/apple-red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
demos/background.jpg
Normal file
BIN
demos/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2019 Red Hat, Inc.
|
||||
*
|
||||
* 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 2.1 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "constraint-editor-application.h"
|
||||
#include "constraint-editor-window.h"
|
||||
|
||||
struct _ConstraintEditorApplication
|
||||
{
|
||||
GtkApplication parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(ConstraintEditorApplication, constraint_editor_application, GTK_TYPE_APPLICATION);
|
||||
|
||||
static void
|
||||
constraint_editor_application_init (ConstraintEditorApplication *app)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
quit_activated (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer data)
|
||||
{
|
||||
g_application_quit (G_APPLICATION (data));
|
||||
}
|
||||
|
||||
static GActionEntry app_entries[] =
|
||||
{
|
||||
{ "quit", quit_activated, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
constraint_editor_application_startup (GApplication *app)
|
||||
{
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *open_accels[2] = { "<Ctrl>O", NULL };
|
||||
GtkCssProvider *provider;
|
||||
|
||||
G_APPLICATION_CLASS (constraint_editor_application_parent_class)->startup (app);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
app);
|
||||
gtk_application_set_accels_for_action (GTK_APPLICATION (app), "app.quit", quit_accels);
|
||||
gtk_application_set_accels_for_action (GTK_APPLICATION (app), "win.open", open_accels);
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/org/gtk/gtk4/constraint-editor/constraint-editor.css");
|
||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_application_activate (GApplication *app)
|
||||
{
|
||||
ConstraintEditorWindow *win;
|
||||
|
||||
win = constraint_editor_window_new (CONSTRAINT_EDITOR_APPLICATION (app));
|
||||
gtk_window_present (GTK_WINDOW (win));
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_application_open (GApplication *app,
|
||||
GFile **files,
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
ConstraintEditorWindow *win;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
{
|
||||
win = constraint_editor_window_new (CONSTRAINT_EDITOR_APPLICATION (app));
|
||||
constraint_editor_window_load (win, files[i]);
|
||||
gtk_window_present (GTK_WINDOW (win));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_application_class_init (ConstraintEditorApplicationClass *class)
|
||||
{
|
||||
GApplicationClass *application_class = G_APPLICATION_CLASS (class);
|
||||
|
||||
application_class->startup = constraint_editor_application_startup;
|
||||
application_class->activate = constraint_editor_application_activate;
|
||||
application_class->open = constraint_editor_application_open;
|
||||
}
|
||||
|
||||
ConstraintEditorApplication *
|
||||
constraint_editor_application_new (void)
|
||||
{
|
||||
return g_object_new (CONSTRAINT_EDITOR_APPLICATION_TYPE,
|
||||
"application-id", "org.gtk.gtk4.ConstraintEditor",
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
NULL);
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2019 Red Hat, Inc.
|
||||
*
|
||||
* 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 2.1 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Matthias Clasen
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define CONSTRAINT_EDITOR_APPLICATION_TYPE (constraint_editor_application_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (ConstraintEditorApplication, constraint_editor_application, CONSTRAINT, EDITOR_APPLICATION, GtkApplication)
|
||||
|
||||
ConstraintEditorApplication *constraint_editor_application_new (void);
|
@@ -1,650 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2019 Red Hat, Inc.
|
||||
*
|
||||
* 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 2.1 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "constraint-editor-window.h"
|
||||
#include "constraint-view.h"
|
||||
#include "constraint-editor.h"
|
||||
#include "guide-editor.h"
|
||||
|
||||
struct _ConstraintEditorWindow
|
||||
{
|
||||
GtkApplicationWindow parent_instance;
|
||||
|
||||
GtkWidget *paned;
|
||||
GtkWidget *view;
|
||||
GtkWidget *list;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(ConstraintEditorWindow, constraint_editor_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||
|
||||
static GtkConstraintTarget *
|
||||
find_target (GListModel *model,
|
||||
GtkConstraintTarget *orig)
|
||||
{
|
||||
const char *name;
|
||||
const char *model_name;
|
||||
gpointer item;
|
||||
int i;
|
||||
|
||||
if (orig == NULL)
|
||||
return NULL;
|
||||
|
||||
if (GTK_IS_LABEL (orig))
|
||||
name = gtk_label_get_label (GTK_LABEL (orig));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (orig))
|
||||
name = gtk_constraint_guide_get_name (GTK_CONSTRAINT_GUIDE (orig));
|
||||
else
|
||||
{
|
||||
g_warning ("Don't know how to handle %s targets", G_OBJECT_TYPE_NAME (orig));
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < g_list_model_get_n_items (model); i++)
|
||||
{
|
||||
item = g_list_model_get_item (model, i);
|
||||
g_object_unref (item);
|
||||
if (GTK_IS_WIDGET (item))
|
||||
model_name = gtk_widget_get_name (GTK_WIDGET (item));
|
||||
else
|
||||
model_name = gtk_constraint_guide_get_name (GTK_CONSTRAINT_GUIDE (item));
|
||||
|
||||
if (strcmp (name, model_name) == 0)
|
||||
return GTK_CONSTRAINT_TARGET (item);
|
||||
}
|
||||
g_warning ("Failed to find target '%s'", name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
constraint_editor_window_load (ConstraintEditorWindow *self,
|
||||
GFile *file)
|
||||
{
|
||||
char *path;
|
||||
GtkBuilder *builder;
|
||||
GError *error = NULL;
|
||||
GtkWidget *view;
|
||||
GtkLayoutManager *layout;
|
||||
GtkWidget *child;
|
||||
const char *name;
|
||||
gpointer item;
|
||||
int i;
|
||||
GListModel *list;
|
||||
|
||||
path = g_file_get_path (file);
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
if (!gtk_builder_add_from_file (builder, path, &error))
|
||||
{
|
||||
g_print ("Could not load %s: %s", path, error->message);
|
||||
g_error_free (error);
|
||||
g_free (path);
|
||||
g_object_unref (builder);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
view = GTK_WIDGET (gtk_builder_get_object (builder, "view"));
|
||||
if (!GTK_IS_BOX (view))
|
||||
{
|
||||
g_print ("Could not load %s: No GtkBox named 'view'", path);
|
||||
g_free (path);
|
||||
g_object_unref (builder);
|
||||
return FALSE;
|
||||
}
|
||||
layout = gtk_widget_get_layout_manager (view);
|
||||
if (!GTK_IS_CONSTRAINT_LAYOUT (layout))
|
||||
{
|
||||
g_print ("Could not load %s: Widget 'view' does not use GtkConstraintLayout", path);
|
||||
g_free (path);
|
||||
g_object_unref (builder);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (child = gtk_widget_get_first_child (view);
|
||||
child;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
if (!GTK_IS_LABEL (child))
|
||||
{
|
||||
g_print ("Skipping non-GtkLabel child\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
name = gtk_label_get_label (GTK_LABEL (child));
|
||||
constraint_view_add_child (CONSTRAINT_VIEW (self->view), name);
|
||||
}
|
||||
|
||||
list = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (layout));
|
||||
for (i = 0; i < g_list_model_get_n_items (list); i++)
|
||||
{
|
||||
GtkConstraintGuide *guide, *clone;
|
||||
int w, h;
|
||||
|
||||
item = g_list_model_get_item (list, i);
|
||||
guide = GTK_CONSTRAINT_GUIDE (item);
|
||||
|
||||
/* need to clone here, to attach to the right targets */
|
||||
clone = gtk_constraint_guide_new ();
|
||||
gtk_constraint_guide_set_name (clone, gtk_constraint_guide_get_name (guide));
|
||||
gtk_constraint_guide_set_strength (clone, gtk_constraint_guide_get_strength (guide));
|
||||
gtk_constraint_guide_get_min_size (guide, &w, &h);
|
||||
gtk_constraint_guide_set_min_size (clone, w, h);
|
||||
gtk_constraint_guide_get_nat_size (guide, &w, &h);
|
||||
gtk_constraint_guide_set_nat_size (clone, w, h);
|
||||
gtk_constraint_guide_get_max_size (guide, &w, &h);
|
||||
gtk_constraint_guide_set_max_size (clone, w, h);
|
||||
constraint_view_add_guide (CONSTRAINT_VIEW (self->view), clone);
|
||||
g_object_unref (guide);
|
||||
g_object_unref (clone);
|
||||
}
|
||||
g_object_unref (list);
|
||||
|
||||
list = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (layout));
|
||||
for (i = 0; i < g_list_model_get_n_items (list); i++)
|
||||
{
|
||||
GtkConstraint *constraint;
|
||||
GtkConstraint *clone;
|
||||
GtkConstraintTarget *target;
|
||||
GtkConstraintTarget *source;
|
||||
GtkConstraintAttribute source_attr;
|
||||
|
||||
item = g_list_model_get_item (list, i);
|
||||
constraint = GTK_CONSTRAINT (item);
|
||||
|
||||
target = gtk_constraint_get_target (constraint);
|
||||
source = gtk_constraint_get_source (constraint);
|
||||
source_attr = gtk_constraint_get_source_attribute (constraint);
|
||||
|
||||
if (source == NULL && source_attr == GTK_CONSTRAINT_ATTRIBUTE_NONE)
|
||||
clone = gtk_constraint_new_constant (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_relation (constraint),
|
||||
gtk_constraint_get_constant (constraint),
|
||||
gtk_constraint_get_strength (constraint));
|
||||
else
|
||||
clone = gtk_constraint_new (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_relation (constraint),
|
||||
find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), source),
|
||||
source_attr,
|
||||
gtk_constraint_get_multiplier (constraint),
|
||||
gtk_constraint_get_constant (constraint),
|
||||
gtk_constraint_get_strength (constraint));
|
||||
|
||||
constraint_view_add_constraint (CONSTRAINT_VIEW (self->view), clone);
|
||||
|
||||
g_object_unref (constraint);
|
||||
g_object_unref (clone);
|
||||
}
|
||||
g_object_unref (list);
|
||||
|
||||
g_free (path);
|
||||
g_object_unref (builder);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
open_response_cb (GObject *source,
|
||||
GAsyncResult *result,
|
||||
void *user_data)
|
||||
{
|
||||
GtkFileDialog *dialog = GTK_FILE_DIALOG (source);
|
||||
ConstraintEditorWindow *self = user_data;
|
||||
GFile *file;
|
||||
|
||||
file = gtk_file_dialog_open_finish (dialog, result, NULL);
|
||||
if (file)
|
||||
{
|
||||
constraint_editor_window_load (self, file);
|
||||
g_object_unref (file);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
open_cb (GtkWidget *button,
|
||||
ConstraintEditorWindow *self)
|
||||
{
|
||||
GtkFileDialog *dialog;
|
||||
GFile *cwd;
|
||||
|
||||
dialog = gtk_file_dialog_new ();
|
||||
gtk_file_dialog_set_title (dialog, "Open file");
|
||||
cwd = g_file_new_for_path (".");
|
||||
gtk_file_dialog_set_initial_folder (dialog, cwd);
|
||||
g_object_unref (cwd);
|
||||
gtk_file_dialog_open (dialog, GTK_WINDOW (self), NULL, open_response_cb, self);
|
||||
g_object_unref (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
serialize_child (GString *str,
|
||||
int indent,
|
||||
GtkWidget *child)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = gtk_widget_get_name (child);
|
||||
g_string_append_printf (str, "%*s<child>\n", indent, "");
|
||||
g_string_append_printf (str, "%*s <object class=\"GtkLabel\" id=\"%s\">\n", indent, "", name);
|
||||
g_string_append_printf (str, "%*s <property name=\"label\">%s</property>\n", indent, "", name);
|
||||
g_string_append_printf (str, "%*s </object>\n", indent, "");
|
||||
g_string_append_printf (str, "%*s</child>\n", indent, "");
|
||||
}
|
||||
|
||||
static char *
|
||||
serialize_model (GListModel *list)
|
||||
{
|
||||
GString *str = g_string_new ("");
|
||||
int i;
|
||||
|
||||
g_string_append (str, "<interface>\n");
|
||||
g_string_append (str, " <object class=\"GtkBox\" id=\"view\">\n");
|
||||
g_string_append (str, " <property name=\"layout-manager\">\n");
|
||||
g_string_append (str, " <object class=\"GtkConstraintLayout\">\n");
|
||||
g_string_append (str, " <constraints>\n");
|
||||
for (i = 0; i < g_list_model_get_n_items (list); i++)
|
||||
{
|
||||
gpointer item = g_list_model_get_item (list, i);
|
||||
g_object_unref (item);
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
constraint_editor_serialize_constraint (str, 10, GTK_CONSTRAINT (item));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
guide_editor_serialize_guide (str, 10, GTK_CONSTRAINT_GUIDE (item));
|
||||
}
|
||||
g_string_append (str, " </constraints>\n");
|
||||
g_string_append (str, " </object>\n");
|
||||
g_string_append (str, " </property>\n");
|
||||
for (i = 0; i < g_list_model_get_n_items (list); i++)
|
||||
{
|
||||
gpointer item = g_list_model_get_item (list, i);
|
||||
g_object_unref (item);
|
||||
if (GTK_IS_WIDGET (item))
|
||||
serialize_child (str, 4, GTK_WIDGET (item));
|
||||
}
|
||||
g_string_append (str, " </object>\n");
|
||||
g_string_append (str, "</interface>\n");
|
||||
|
||||
return g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
save_response_cb (GObject *source,
|
||||
GAsyncResult *result,
|
||||
void *user_data)
|
||||
{
|
||||
GtkFileDialog *dialog = GTK_FILE_DIALOG (source);
|
||||
ConstraintEditorWindow *self = user_data;
|
||||
GFile *file;
|
||||
|
||||
file = gtk_file_dialog_save_finish (dialog, result, NULL);
|
||||
if (file)
|
||||
{
|
||||
GListModel *model;
|
||||
char *text;
|
||||
GError *error = NULL;
|
||||
|
||||
model = constraint_view_get_model (CONSTRAINT_VIEW (self->view));
|
||||
text = serialize_model (model);
|
||||
g_file_replace_contents (file, text, strlen (text),
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
NULL,
|
||||
&error);
|
||||
if (error != NULL)
|
||||
{
|
||||
GtkAlertDialog *alert;
|
||||
|
||||
alert = gtk_alert_dialog_new ("Saving failed");
|
||||
gtk_alert_dialog_set_detail (alert, error->message);
|
||||
gtk_alert_dialog_show (alert,
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))));
|
||||
g_object_unref (alert);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
g_free (text);
|
||||
g_object_unref (file);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
save_cb (GtkWidget *button,
|
||||
ConstraintEditorWindow *self)
|
||||
{
|
||||
GtkFileDialog *dialog;
|
||||
GFile *cwd;
|
||||
|
||||
dialog = gtk_file_dialog_new ();
|
||||
gtk_file_dialog_set_title (dialog, "Save constraints");
|
||||
cwd = g_file_new_for_path (".");
|
||||
gtk_file_dialog_set_initial_folder (dialog, cwd);
|
||||
g_object_unref (cwd);
|
||||
gtk_file_dialog_save (dialog,
|
||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (button))),
|
||||
NULL,
|
||||
save_response_cb, self);
|
||||
g_object_unref (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_window_dispose (GObject *object)
|
||||
{
|
||||
gtk_widget_dispose_template (GTK_WIDGET (object), CONSTRAINT_EDITOR_WINDOW_TYPE);
|
||||
|
||||
G_OBJECT_CLASS (constraint_editor_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static int child_counter;
|
||||
static int guide_counter;
|
||||
|
||||
static void
|
||||
add_child (ConstraintEditorWindow *win)
|
||||
{
|
||||
char *name;
|
||||
|
||||
child_counter++;
|
||||
name = g_strdup_printf ("Child %d", child_counter);
|
||||
constraint_view_add_child (CONSTRAINT_VIEW (win->view), name);
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
static void
|
||||
add_guide (ConstraintEditorWindow *win)
|
||||
{
|
||||
char *name;
|
||||
GtkConstraintGuide *guide;
|
||||
|
||||
guide_counter++;
|
||||
name = g_strdup_printf ("Guide %d", guide_counter);
|
||||
guide = gtk_constraint_guide_new ();
|
||||
gtk_constraint_guide_set_name (guide, name);
|
||||
g_free (name);
|
||||
|
||||
constraint_view_add_guide (CONSTRAINT_VIEW (win->view), guide);
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_done (ConstraintEditor *editor,
|
||||
GtkConstraint *constraint,
|
||||
ConstraintEditorWindow *win)
|
||||
{
|
||||
GtkConstraint *old_constraint;
|
||||
|
||||
g_object_get (editor, "constraint", &old_constraint, NULL);
|
||||
|
||||
if (old_constraint)
|
||||
constraint_view_remove_constraint (CONSTRAINT_VIEW (win->view), old_constraint);
|
||||
|
||||
constraint_view_add_constraint (CONSTRAINT_VIEW (win->view), constraint);
|
||||
|
||||
g_clear_object (&old_constraint);
|
||||
|
||||
gtk_window_destroy (GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW)));
|
||||
}
|
||||
|
||||
static void
|
||||
edit_constraint (ConstraintEditorWindow *win,
|
||||
GtkConstraint *constraint)
|
||||
{
|
||||
GtkWidget *window;
|
||||
ConstraintEditor *editor;
|
||||
GListModel *model;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (win));
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
if (constraint)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Edit Constraint");
|
||||
else
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Create Constraint");
|
||||
|
||||
model = constraint_view_get_model (CONSTRAINT_VIEW (win->view));
|
||||
|
||||
editor = constraint_editor_new (model, constraint);
|
||||
|
||||
gtk_window_set_child (GTK_WINDOW (window), GTK_WIDGET (editor));
|
||||
|
||||
g_signal_connect (editor, "done", G_CALLBACK (constraint_editor_done), win);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
static void
|
||||
add_constraint (ConstraintEditorWindow *win)
|
||||
{
|
||||
edit_constraint (win, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
guide_editor_done (GuideEditor *editor,
|
||||
GtkConstraintGuide *guide,
|
||||
ConstraintEditorWindow *win)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW)));
|
||||
}
|
||||
|
||||
static void
|
||||
edit_guide (ConstraintEditorWindow *win,
|
||||
GtkConstraintGuide *guide)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GuideEditor *editor;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (win));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Edit Guide");
|
||||
|
||||
editor = guide_editor_new (guide);
|
||||
gtk_window_set_child (GTK_WINDOW (window), GTK_WIDGET (editor));
|
||||
|
||||
g_signal_connect (editor, "done", G_CALLBACK (guide_editor_done), win);
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
static void
|
||||
row_activated (GtkListBox *list,
|
||||
GtkListBoxRow *row,
|
||||
ConstraintEditorWindow *win)
|
||||
{
|
||||
GObject *item;
|
||||
|
||||
item = G_OBJECT (g_object_get_data (G_OBJECT (row), "item"));
|
||||
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
edit_constraint (win, GTK_CONSTRAINT (item));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
edit_guide (win, GTK_CONSTRAINT_GUIDE (item));
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_window_class_init (ConstraintEditorWindowClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->dispose = constraint_editor_window_dispose;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class,
|
||||
"/org/gtk/gtk4/constraint-editor/constraint-editor-window.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditorWindow, paned);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditorWindow, view);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditorWindow, list);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, open_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, save_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, add_child);
|
||||
gtk_widget_class_bind_template_callback (widget_class, add_guide);
|
||||
gtk_widget_class_bind_template_callback (widget_class, add_constraint);
|
||||
gtk_widget_class_bind_template_callback (widget_class, row_activated);
|
||||
}
|
||||
|
||||
static void
|
||||
row_edit (GtkButton *button,
|
||||
ConstraintEditorWindow *win)
|
||||
{
|
||||
GtkWidget *row;
|
||||
GObject *item;
|
||||
|
||||
row = gtk_widget_get_ancestor (GTK_WIDGET (button), GTK_TYPE_LIST_BOX_ROW);
|
||||
item = (GObject *)g_object_get_data (G_OBJECT (row), "item");
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
edit_constraint (win, GTK_CONSTRAINT (item));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
edit_guide (win, GTK_CONSTRAINT_GUIDE (item));
|
||||
}
|
||||
|
||||
static void
|
||||
mark_constraints_invalid (ConstraintEditorWindow *win,
|
||||
gpointer removed)
|
||||
{
|
||||
GtkWidget *child;
|
||||
GObject *item;
|
||||
|
||||
for (child = gtk_widget_get_first_child (win->list);
|
||||
child;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
item = (GObject *)g_object_get_data (G_OBJECT (child), "item");
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
{
|
||||
GtkConstraint *constraint = GTK_CONSTRAINT (item);
|
||||
|
||||
if (gtk_constraint_get_target (constraint) == (GtkConstraintTarget *)removed ||
|
||||
gtk_constraint_get_source (constraint) == (GtkConstraintTarget *)removed)
|
||||
{
|
||||
GtkWidget *button;
|
||||
button = (GtkWidget *)g_object_get_data (G_OBJECT (child), "edit");
|
||||
gtk_button_set_icon_name (GTK_BUTTON (button), "dialog-warning-symbolic");
|
||||
gtk_widget_set_tooltip_text (button, "Constraint is invalid");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
row_delete (GtkButton *button,
|
||||
ConstraintEditorWindow *win)
|
||||
{
|
||||
GtkWidget *row;
|
||||
GObject *item;
|
||||
|
||||
row = gtk_widget_get_ancestor (GTK_WIDGET (button), GTK_TYPE_LIST_BOX_ROW);
|
||||
item = (GObject *)g_object_get_data (G_OBJECT (row), "item");
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
constraint_view_remove_constraint (CONSTRAINT_VIEW (win->view),
|
||||
GTK_CONSTRAINT (item));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
{
|
||||
mark_constraints_invalid (win, item);
|
||||
constraint_view_remove_guide (CONSTRAINT_VIEW (win->view),
|
||||
GTK_CONSTRAINT_GUIDE (item));
|
||||
}
|
||||
else if (GTK_IS_WIDGET (item))
|
||||
{
|
||||
mark_constraints_invalid (win, item);
|
||||
constraint_view_remove_child (CONSTRAINT_VIEW (win->view),
|
||||
GTK_WIDGET (item));
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_widget_func (gpointer item,
|
||||
gpointer user_data)
|
||||
{
|
||||
ConstraintEditorWindow *win = user_data;
|
||||
const char *name;
|
||||
char *freeme = NULL;
|
||||
GtkWidget *row, *box, *label, *button;
|
||||
|
||||
if (GTK_IS_WIDGET (item))
|
||||
name = gtk_widget_get_name (GTK_WIDGET (item));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
name = gtk_constraint_guide_get_name (GTK_CONSTRAINT_GUIDE (item));
|
||||
else if (GTK_IS_CONSTRAINT (item))
|
||||
name = freeme = constraint_editor_constraint_to_string (GTK_CONSTRAINT (item));
|
||||
else
|
||||
name = "";
|
||||
|
||||
row = gtk_list_box_row_new ();
|
||||
g_object_set_data_full (G_OBJECT (row), "item", g_object_ref (item), g_object_unref);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
label = gtk_label_new (name);
|
||||
if (GTK_IS_WIDGET (item) || GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
g_object_bind_property (item, "name",
|
||||
label, "label",
|
||||
G_BINDING_DEFAULT);
|
||||
gtk_widget_set_margin_start (label, 10);
|
||||
gtk_widget_set_margin_end (label, 10);
|
||||
gtk_widget_set_margin_top (label, 10);
|
||||
gtk_widget_set_margin_bottom (label, 10);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_list_box_row_set_child (GTK_LIST_BOX_ROW (row), box);
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
if (GTK_IS_CONSTRAINT (item) || GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
{
|
||||
button = gtk_button_new_from_icon_name ("document-edit-symbolic");
|
||||
gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (row_edit), win);
|
||||
g_object_set_data (G_OBJECT (row), "edit", button);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
button = gtk_button_new_from_icon_name ("edit-delete-symbolic");
|
||||
gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (row_delete), win);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
}
|
||||
else if (GTK_IS_WIDGET (item))
|
||||
{
|
||||
button = gtk_button_new_from_icon_name ("edit-delete-symbolic");
|
||||
gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (row_delete), win);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
}
|
||||
|
||||
g_free (freeme);
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_window_init (ConstraintEditorWindow *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
gtk_list_box_bind_model (GTK_LIST_BOX (self->list),
|
||||
constraint_view_get_model (CONSTRAINT_VIEW (self->view)),
|
||||
create_widget_func,
|
||||
self,
|
||||
NULL);
|
||||
}
|
||||
|
||||
ConstraintEditorWindow *
|
||||
constraint_editor_window_new (ConstraintEditorApplication *application)
|
||||
{
|
||||
return g_object_new (CONSTRAINT_EDITOR_WINDOW_TYPE,
|
||||
"application", application,
|
||||
NULL);
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2019 Red Hat, Inc
|
||||
*
|
||||
* 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 2.1 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Matthias Clasen
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "constraint-editor-application.h"
|
||||
|
||||
|
||||
#define CONSTRAINT_EDITOR_WINDOW_TYPE (constraint_editor_window_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (ConstraintEditorWindow, constraint_editor_window, CONSTRAINT, EDITOR_WINDOW, GtkApplicationWindow)
|
||||
|
||||
ConstraintEditorWindow * constraint_editor_window_new (ConstraintEditorApplication *application);
|
||||
|
||||
gboolean constraint_editor_window_load (ConstraintEditorWindow *self,
|
||||
GFile *file);
|
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ConstraintEditorWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">GTK Constraint Editor</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header">
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">document-open-symbolic</property>
|
||||
<property name="tooltip-text">Open ui file</property>
|
||||
<signal name="clicked" handler="open_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">document-save-symbolic</property>
|
||||
<property name="tooltip-text">Save to ui file</property>
|
||||
<signal name="clicked" handler="save_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPaned" id="paned">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">Add Child</property>
|
||||
<signal name="clicked" handler="add_child" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">Add Guide</property>
|
||||
<signal name="clicked" handler="add_guide" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">Add Constraint</property>
|
||||
<signal name="clicked" handler="add_constraint" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="list">
|
||||
<property name="show-separators">1</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<signal name="row-activated" handler="row_activated"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ConstraintView" id="view">
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
@@ -1,683 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2019 Red Hat, Inc.
|
||||
*
|
||||
* 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 2.1 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "constraint-editor.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
struct _ConstraintEditor
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
|
||||
GtkWidget *grid;
|
||||
GtkWidget *target;
|
||||
GtkWidget *target_attr;
|
||||
GtkWidget *relation;
|
||||
GtkWidget *source;
|
||||
GtkWidget *source_attr;
|
||||
GtkWidget *multiplier;
|
||||
GtkWidget *constant;
|
||||
GtkWidget *strength;
|
||||
GtkWidget *preview;
|
||||
GtkWidget *button;
|
||||
|
||||
GtkConstraint *constraint;
|
||||
GListModel *model;
|
||||
|
||||
gboolean constructed;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_MODEL = 1,
|
||||
PROP_CONSTRAINT,
|
||||
LAST_PROP
|
||||
};
|
||||
|
||||
static GParamSpec *pspecs[LAST_PROP];
|
||||
|
||||
enum {
|
||||
DONE,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL];
|
||||
|
||||
G_DEFINE_TYPE(ConstraintEditor, constraint_editor, GTK_TYPE_WIDGET);
|
||||
|
||||
static const char *
|
||||
get_target_name (GtkConstraintTarget *target)
|
||||
{
|
||||
if (target == NULL)
|
||||
return "super";
|
||||
else if (GTK_IS_WIDGET (target))
|
||||
return gtk_widget_get_name (GTK_WIDGET (target));
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (target))
|
||||
return gtk_constraint_guide_get_name (GTK_CONSTRAINT_GUIDE (target));
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_target_combo (GListModel *model,
|
||||
GtkWidget *combo,
|
||||
gboolean is_source)
|
||||
{
|
||||
int i;
|
||||
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "super", "Super");
|
||||
|
||||
if (model)
|
||||
{
|
||||
for (i = 0; i < g_list_model_get_n_items (model); i++)
|
||||
{
|
||||
GObject *item = g_list_model_get_object (model, i);
|
||||
const char *name;
|
||||
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
continue;
|
||||
|
||||
name = get_target_name (GTK_CONSTRAINT_TARGET (item));
|
||||
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), name, name);
|
||||
g_object_unref (item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_attribute_combo (GtkWidget *combo,
|
||||
gboolean is_source)
|
||||
{
|
||||
if (is_source)
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "none", "None");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "left", "Left");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "right", "Right");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "top", "Top");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "bottom", "Bottom");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "start", "Start");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "end", "End");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "width", "Width");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "height", "Height");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "center-x", "Center X");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "center-y", "Center Y");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "baseline", "Baseline");
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_relation_combo (GtkWidget *combo)
|
||||
{
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "le", "≤");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "eq", "=");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "ge", "≥");
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_strength_combo (GtkWidget *combo)
|
||||
{
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "weak", "Weak");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "medium", "Medium");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "strong", "Strong");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "required", "Required");
|
||||
}
|
||||
|
||||
static gpointer
|
||||
get_target (GListModel *model,
|
||||
const char *id)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (id == NULL)
|
||||
return NULL;
|
||||
|
||||
if (strcmp ("super", id) == 0)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < g_list_model_get_n_items (model); i++)
|
||||
{
|
||||
GObject *item = g_list_model_get_object (model, i);
|
||||
g_object_unref (item);
|
||||
if (GTK_IS_CONSTRAINT (item))
|
||||
continue;
|
||||
else if (GTK_IS_WIDGET (item))
|
||||
{
|
||||
if (strcmp (id, gtk_widget_get_name (GTK_WIDGET (item))) == 0)
|
||||
return item;
|
||||
}
|
||||
else if (GTK_IS_CONSTRAINT_GUIDE (item))
|
||||
{
|
||||
if (strcmp (id, gtk_constraint_guide_get_name (GTK_CONSTRAINT_GUIDE (item))) == 0)
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GtkConstraintAttribute
|
||||
get_target_attr (const char *id)
|
||||
{
|
||||
GtkConstraintAttribute attr;
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_ATTRIBUTE);
|
||||
GEnumValue *value = g_enum_get_value_by_nick (class, id);
|
||||
attr = value->value;
|
||||
g_type_class_unref (class);
|
||||
|
||||
return attr;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_attr_nick (GtkConstraintAttribute attr)
|
||||
{
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_ATTRIBUTE);
|
||||
GEnumValue *value = g_enum_get_value (class, attr);
|
||||
const char *nick = value->value_nick;
|
||||
g_type_class_unref (class);
|
||||
|
||||
return nick;
|
||||
}
|
||||
|
||||
static GtkConstraintRelation
|
||||
get_relation (const char *id)
|
||||
{
|
||||
GtkConstraintRelation relation;
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_RELATION);
|
||||
GEnumValue *value = g_enum_get_value_by_nick (class, id);
|
||||
relation = value->value;
|
||||
g_type_class_unref (class);
|
||||
|
||||
return relation;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_relation_nick (GtkConstraintRelation relation)
|
||||
{
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_RELATION);
|
||||
GEnumValue *value = g_enum_get_value (class, relation);
|
||||
const char *nick = value->value_nick;
|
||||
g_type_class_unref (class);
|
||||
|
||||
return nick;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_relation_display_name (GtkConstraintRelation relation)
|
||||
{
|
||||
switch (relation)
|
||||
{
|
||||
case GTK_CONSTRAINT_RELATION_LE:
|
||||
return "≤";
|
||||
case GTK_CONSTRAINT_RELATION_EQ:
|
||||
return "=";
|
||||
case GTK_CONSTRAINT_RELATION_GE:
|
||||
return "≥";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
static GtkConstraintStrength
|
||||
get_strength (const char *id)
|
||||
{
|
||||
GtkConstraintStrength strength;
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_STRENGTH);
|
||||
GEnumValue *value = g_enum_get_value_by_nick (class, id);
|
||||
strength = value->value;
|
||||
g_type_class_unref (class);
|
||||
|
||||
return strength;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_strength_nick (GtkConstraintStrength strength)
|
||||
{
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_STRENGTH);
|
||||
GEnumValue *value = g_enum_get_value (class, strength);
|
||||
const char *nick = value->value_nick;
|
||||
g_type_class_unref (class);
|
||||
|
||||
return nick;
|
||||
}
|
||||
|
||||
void
|
||||
constraint_editor_serialize_constraint (GString *str,
|
||||
int indent,
|
||||
GtkConstraint *constraint)
|
||||
{
|
||||
const char *target;
|
||||
const char *target_attr;
|
||||
const char *relation;
|
||||
const char *source;
|
||||
const char *source_attr;
|
||||
double multiplier;
|
||||
double constant;
|
||||
const char *strength;
|
||||
|
||||
target = get_target_name (gtk_constraint_get_target (constraint));
|
||||
target_attr = get_attr_nick (gtk_constraint_get_target_attribute (constraint));
|
||||
relation = get_relation_nick (gtk_constraint_get_relation (constraint));
|
||||
source = get_target_name (gtk_constraint_get_source (constraint));
|
||||
source_attr = get_attr_nick (gtk_constraint_get_source_attribute (constraint));
|
||||
multiplier = gtk_constraint_get_multiplier (constraint);
|
||||
constant = gtk_constraint_get_constant (constraint);
|
||||
strength = get_strength_nick (gtk_constraint_get_strength (constraint));
|
||||
|
||||
g_string_append_printf (str, "%*s<constraint target=\"%s\" target-attribute=\"%s\"\n", indent, "", target, target_attr);
|
||||
g_string_append_printf (str, "%*s relation=\"%s\"\n", indent, "", relation);
|
||||
if (strcmp (source_attr, "none") != 0)
|
||||
{
|
||||
g_string_append_printf (str, "%*s source=\"%s\" source-attribute=\"%s\"\n", indent, "", source, source_attr);
|
||||
g_string_append_printf (str, "%*s multiplier=\"%g\"\n", indent, "", multiplier);
|
||||
}
|
||||
g_string_append_printf (str, "%*s constant=\"%g\"\n", indent, "", constant);
|
||||
g_string_append_printf (str, "%*s strength=\"%s\" />\n", indent, "", strength);
|
||||
}
|
||||
|
||||
static void
|
||||
create_constraint (GtkButton *button,
|
||||
ConstraintEditor *editor)
|
||||
{
|
||||
const char *id;
|
||||
gpointer target;
|
||||
GtkConstraintAttribute target_attr;
|
||||
gpointer source;
|
||||
GtkConstraintAttribute source_attr;
|
||||
GtkConstraintRelation relation;
|
||||
double multiplier;
|
||||
double constant;
|
||||
int strength;
|
||||
GtkConstraint *constraint;
|
||||
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target));
|
||||
target = get_target (editor->model, id);
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target_attr));
|
||||
target_attr = get_target_attr (id);
|
||||
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source));
|
||||
source = get_target (editor->model, id);
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source_attr));
|
||||
source_attr = get_target_attr (id);
|
||||
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->relation));
|
||||
relation = get_relation (id);
|
||||
|
||||
multiplier = g_ascii_strtod (gtk_editable_get_text (GTK_EDITABLE (editor->multiplier)), NULL);
|
||||
|
||||
constant = g_ascii_strtod (gtk_editable_get_text (GTK_EDITABLE (editor->constant)), NULL);
|
||||
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->strength));
|
||||
strength = get_strength (id);
|
||||
|
||||
constraint = gtk_constraint_new (target, target_attr,
|
||||
relation,
|
||||
source, source_attr,
|
||||
multiplier,
|
||||
constant,
|
||||
strength);
|
||||
g_signal_emit (editor, signals[DONE], 0, constraint);
|
||||
g_object_unref (constraint);
|
||||
}
|
||||
|
||||
static void
|
||||
source_attr_changed (ConstraintEditor *editor)
|
||||
{
|
||||
const char *id;
|
||||
|
||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source_attr));
|
||||
if (strcmp (id, "none") == 0)
|
||||
{
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (editor->source), -1);
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->multiplier), "");
|
||||
gtk_widget_set_sensitive (editor->source, FALSE);
|
||||
gtk_widget_set_sensitive (editor->multiplier, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_set_sensitive (editor->source, TRUE);
|
||||
gtk_widget_set_sensitive (editor->multiplier, TRUE);
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->multiplier), "1");
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
constraint_editor_constraint_to_string (GtkConstraint *constraint)
|
||||
{
|
||||
GString *str;
|
||||
const char *name;
|
||||
const char *attr;
|
||||
const char *relation;
|
||||
double c, m;
|
||||
|
||||
str = g_string_new ("");
|
||||
|
||||
name = get_target_name (gtk_constraint_get_target (constraint));
|
||||
attr = get_attr_nick (gtk_constraint_get_target_attribute (constraint));
|
||||
relation = get_relation_display_name (gtk_constraint_get_relation (constraint));
|
||||
|
||||
if (name == NULL)
|
||||
name = "[ ]";
|
||||
|
||||
g_string_append_printf (str, "%s.%s %s ", name, attr, relation);
|
||||
|
||||
c = gtk_constraint_get_constant (constraint);
|
||||
|
||||
attr = get_attr_nick (gtk_constraint_get_source_attribute (constraint));
|
||||
if (strcmp (attr, "none") != 0)
|
||||
{
|
||||
name = get_target_name (gtk_constraint_get_source (constraint));
|
||||
m = gtk_constraint_get_multiplier (constraint);
|
||||
|
||||
if (name == NULL)
|
||||
name = "[ ]";
|
||||
|
||||
g_string_append_printf (str, "%s.%s", name, attr);
|
||||
|
||||
if (m != 1.0)
|
||||
g_string_append_printf (str, " × %g", m);
|
||||
|
||||
if (c > 0.0)
|
||||
g_string_append_printf (str, " + %g", c);
|
||||
else if (c < 0.0)
|
||||
g_string_append_printf (str, " - %g", -c);
|
||||
}
|
||||
else
|
||||
g_string_append_printf (str, "%g", c);
|
||||
|
||||
return g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
update_preview (ConstraintEditor *editor)
|
||||
{
|
||||
GString *str;
|
||||
const char *name;
|
||||
const char *attr;
|
||||
char *relation;
|
||||
const char *multiplier;
|
||||
const char *constant;
|
||||
double c, m;
|
||||
|
||||
if (!editor->constructed)
|
||||
return;
|
||||
|
||||
str = g_string_new ("");
|
||||
|
||||
name = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target));
|
||||
attr = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target_attr));
|
||||
relation = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (editor->relation));
|
||||
|
||||
if (name == NULL)
|
||||
name = "[ ]";
|
||||
|
||||
g_string_append_printf (str, "%s.%s %s ", name, attr, relation);
|
||||
g_free (relation);
|
||||
|
||||
constant = gtk_editable_get_text (GTK_EDITABLE (editor->constant));
|
||||
c = g_ascii_strtod (constant, NULL);
|
||||
|
||||
attr = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source_attr));
|
||||
if (strcmp (attr, "none") != 0)
|
||||
{
|
||||
name = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source));
|
||||
multiplier = gtk_editable_get_text (GTK_EDITABLE (editor->multiplier));
|
||||
m = g_ascii_strtod (multiplier, NULL);
|
||||
|
||||
if (name == NULL)
|
||||
name = "[ ]";
|
||||
|
||||
g_string_append_printf (str, "%s.%s", name, attr);
|
||||
|
||||
if (m != 1.0)
|
||||
g_string_append_printf (str, " × %g", m);
|
||||
|
||||
if (c > 0.0)
|
||||
g_string_append_printf (str, " + %g", c);
|
||||
else if (c < 0.0)
|
||||
g_string_append_printf (str, " - %g", -c);
|
||||
}
|
||||
else
|
||||
g_string_append_printf (str, "%g", c);
|
||||
|
||||
gtk_label_set_label (GTK_LABEL (editor->preview), str->str);
|
||||
|
||||
g_string_free (str, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
update_button (ConstraintEditor *editor)
|
||||
{
|
||||
const char *target = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target));
|
||||
const char *source = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source));
|
||||
const char *source_attr = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source_attr));
|
||||
|
||||
if (target &&
|
||||
(source || (source_attr && get_target_attr (source_attr) == GTK_CONSTRAINT_ATTRIBUTE_NONE)))
|
||||
gtk_widget_set_sensitive (editor->button, TRUE);
|
||||
else
|
||||
gtk_widget_set_sensitive (editor->button, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_init (ConstraintEditor *editor)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (editor));
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_constructed (GObject *object)
|
||||
{
|
||||
ConstraintEditor *editor = CONSTRAINT_EDITOR (object);
|
||||
|
||||
constraint_target_combo (editor->model, editor->target, FALSE);
|
||||
constraint_attribute_combo (editor->target_attr, FALSE);
|
||||
constraint_relation_combo (editor->relation);
|
||||
constraint_target_combo (editor->model, editor->source, TRUE);
|
||||
constraint_attribute_combo (editor->source_attr, TRUE);
|
||||
|
||||
constraint_strength_combo (editor->strength);
|
||||
|
||||
if (editor->constraint)
|
||||
{
|
||||
GtkConstraintTarget *target;
|
||||
GtkConstraintAttribute attr;
|
||||
GtkConstraintRelation relation;
|
||||
GtkConstraintStrength strength;
|
||||
const char *nick;
|
||||
char *val;
|
||||
double multiplier;
|
||||
double constant;
|
||||
|
||||
target = gtk_constraint_get_target (editor->constraint);
|
||||
nick = get_target_name (target);
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->target), nick);
|
||||
|
||||
attr = gtk_constraint_get_target_attribute (editor->constraint);
|
||||
nick = get_attr_nick (attr);
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->target_attr), nick);
|
||||
|
||||
target = gtk_constraint_get_source (editor->constraint);
|
||||
nick = get_target_name (target);
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->source), nick);
|
||||
|
||||
attr = gtk_constraint_get_source_attribute (editor->constraint);
|
||||
nick = get_attr_nick (attr);
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->source_attr), nick);
|
||||
|
||||
relation = gtk_constraint_get_relation (editor->constraint);
|
||||
nick = get_relation_nick (relation);
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->relation), nick);
|
||||
|
||||
multiplier = gtk_constraint_get_multiplier (editor->constraint);
|
||||
val = g_strdup_printf ("%g", multiplier);
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->multiplier), val);
|
||||
g_free (val);
|
||||
|
||||
constant = gtk_constraint_get_constant (editor->constraint);
|
||||
val = g_strdup_printf ("%g", constant);
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->constant), val);
|
||||
g_free (val);
|
||||
|
||||
strength = gtk_constraint_get_strength (editor->constraint);
|
||||
nick = get_strength_nick (strength);
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->strength), nick);
|
||||
|
||||
gtk_button_set_label (GTK_BUTTON (editor->button), "Apply");
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->target_attr), "left");
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->source_attr), "left");
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->relation), "eq");
|
||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->strength), "required");
|
||||
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->multiplier), "1.0");
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->constant), "0.0");
|
||||
|
||||
gtk_button_set_label (GTK_BUTTON (editor->button), "Create");
|
||||
}
|
||||
|
||||
editor->constructed = TRUE;
|
||||
update_preview (editor);
|
||||
update_button (editor);
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_set_property (GObject *object,
|
||||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ConstraintEditor *self = CONSTRAINT_EDITOR (object);
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_MODEL:
|
||||
self->model = g_value_dup_object (value);
|
||||
break;
|
||||
|
||||
case PROP_CONSTRAINT:
|
||||
self->constraint = g_value_dup_object (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ConstraintEditor *self = CONSTRAINT_EDITOR (object);
|
||||
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_MODEL:
|
||||
g_value_set_object (value, self->model);
|
||||
break;
|
||||
|
||||
case PROP_CONSTRAINT:
|
||||
g_value_set_object (value, self->constraint);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_dispose (GObject *object)
|
||||
{
|
||||
ConstraintEditor *self = (ConstraintEditor *)object;
|
||||
|
||||
g_clear_object (&self->model);
|
||||
g_clear_object (&self->constraint);
|
||||
|
||||
gtk_widget_dispose_template (GTK_WIDGET (object), CONSTRAINT_EDITOR_TYPE);
|
||||
|
||||
G_OBJECT_CLASS (constraint_editor_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
constraint_editor_class_init (ConstraintEditorClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->constructed = constraint_editor_constructed;
|
||||
object_class->dispose = constraint_editor_dispose;
|
||||
object_class->set_property = constraint_editor_set_property;
|
||||
object_class->get_property = constraint_editor_get_property;
|
||||
|
||||
pspecs[PROP_CONSTRAINT] =
|
||||
g_param_spec_object ("constraint", "constraint", "constraint",
|
||||
GTK_TYPE_CONSTRAINT,
|
||||
G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY);
|
||||
|
||||
pspecs[PROP_MODEL] =
|
||||
g_param_spec_object ("model", "model", "model",
|
||||
G_TYPE_LIST_MODEL,
|
||||
G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY);
|
||||
|
||||
g_object_class_install_properties (object_class, LAST_PROP, pspecs);
|
||||
|
||||
signals[DONE] =
|
||||
g_signal_new ("done",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 1, GTK_TYPE_CONSTRAINT);
|
||||
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class,
|
||||
"/org/gtk/gtk4/constraint-editor/constraint-editor.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, grid);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, target);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, target_attr);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, relation);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, source);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, source_attr);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, multiplier);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, constant);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, strength);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, preview);
|
||||
gtk_widget_class_bind_template_child (widget_class, ConstraintEditor, button);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, update_preview);
|
||||
gtk_widget_class_bind_template_callback (widget_class, update_button);
|
||||
gtk_widget_class_bind_template_callback (widget_class, create_constraint);
|
||||
gtk_widget_class_bind_template_callback (widget_class, source_attr_changed);
|
||||
}
|
||||
|
||||
ConstraintEditor *
|
||||
constraint_editor_new (GListModel *model,
|
||||
GtkConstraint *constraint)
|
||||
{
|
||||
return g_object_new (CONSTRAINT_EDITOR_TYPE,
|
||||
"model", model,
|
||||
"constraint", constraint,
|
||||
NULL);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user