Compare commits
13 Commits
a11y/stack
...
gtk-new-im
Author | SHA1 | Date | |
---|---|---|---|
|
257e0f26ef | ||
|
f787ebb03f | ||
|
5d24f08d0a | ||
|
f3eb790c9e | ||
|
9624060bda | ||
|
d24b426b92 | ||
|
f109da8d74 | ||
|
e31ae4384b | ||
|
850653e8c7 | ||
|
cc7c62e0e2 | ||
|
0dcf14976d | ||
|
4ca0a710cd | ||
|
6ae1449a66 |
@@ -1,11 +0,0 @@
|
|||||||
# See https://wiki.apertis.org/Guidelines/Coding_conventions#Code_formatting
|
|
||||||
BasedOnStyle: GNU
|
|
||||||
AlwaysBreakAfterDefinitionReturnType: All
|
|
||||||
BreakBeforeBinaryOperators: None
|
|
||||||
BinPackParameters: false
|
|
||||||
SpaceAfterCStyleCast: true
|
|
||||||
# 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
|
|
20
.cvsignore
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
*.lo
|
||||||
|
config.log
|
||||||
|
config.h
|
||||||
|
config.h.in
|
||||||
|
libtool
|
||||||
|
config.status
|
||||||
|
stamp-h
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
configure
|
||||||
|
gtk-config-2.0
|
||||||
|
config.cache
|
||||||
|
ABOUT-NLS
|
||||||
|
intl
|
||||||
|
stamp-h.in
|
||||||
|
gtk+.spec
|
||||||
|
missing
|
||||||
|
install-sh
|
||||||
|
mkinstalldirs
|
1
.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/subprojects/*/
|
|
260
.gitlab-ci.yml
@@ -1,260 +0,0 @@
|
|||||||
stages:
|
|
||||||
- build
|
|
||||||
- analysis
|
|
||||||
- docs
|
|
||||||
- flatpak
|
|
||||||
- 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 -Dglib:werror=false -Dpango:werror=false -Dgtk-doc:werror=false -Dwayland-protocols:werror=false -Dsysprof:werror=false"
|
|
||||||
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true"
|
|
||||||
FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled"
|
|
||||||
MESON_TEST_TIMEOUT_MULTIPLIER: 3
|
|
||||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v25"
|
|
||||||
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
|
|
||||||
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v25"
|
|
||||||
|
|
||||||
.only-default:
|
|
||||||
only:
|
|
||||||
- branches
|
|
||||||
except:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
style-check-diff:
|
|
||||||
extends: .only-default
|
|
||||||
image: $FEDORA_IMAGE
|
|
||||||
stage: .pre
|
|
||||||
allow_failure: true
|
|
||||||
script:
|
|
||||||
- .gitlab-ci/run-style-check-diff.sh
|
|
||||||
|
|
||||||
.build-fedora-default:
|
|
||||||
image: $FEDORA_IMAGE
|
|
||||||
artifacts:
|
|
||||||
when: always
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- "${CI_PROJECT_DIR}/_build/report-x11.xml"
|
|
||||||
- "${CI_PROJECT_DIR}/_build/report-wayland.xml"
|
|
||||||
- "${CI_PROJECT_DIR}/_build/report-broadway.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/gsk/compare/*/*/*.png"
|
|
||||||
- "${CI_PROJECT_DIR}/_build/testsuite/css/output/*/*.syscap"
|
|
||||||
cache:
|
|
||||||
key: "$CI_JOB_NAME"
|
|
||||||
paths:
|
|
||||||
- _ccache/
|
|
||||||
- subprojects/gdk-pixbuf/
|
|
||||||
- subprojects/glib/
|
|
||||||
- subprojects/graphene/
|
|
||||||
- subprojects/libepoxy/
|
|
||||||
- subprojects/pango/
|
|
||||||
|
|
||||||
fedora-x86_64:
|
|
||||||
extends: .build-fedora-default
|
|
||||||
stage: build
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
|
|
||||||
script:
|
|
||||||
- meson subprojects update
|
|
||||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
|
||||||
_build
|
|
||||||
- ninja -C _build
|
|
||||||
- .gitlab-ci/run-tests.sh _build x11
|
|
||||||
- .gitlab-ci/run-tests.sh _build wayland
|
|
||||||
- .gitlab-ci/run-tests.sh _build broadway
|
|
||||||
|
|
||||||
release-build:
|
|
||||||
extends: .build-fedora-default
|
|
||||||
stage: build
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
|
||||||
script:
|
|
||||||
- meson subprojects update
|
|
||||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
|
||||||
_build
|
|
||||||
- ninja -C _build
|
|
||||||
- .gitlab-ci/run-tests.sh _build x11
|
|
||||||
|
|
||||||
installed-tests:
|
|
||||||
extends: .build-fedora-default
|
|
||||||
stage: build
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
EXTRA_MESON_FLAGS: "--prefix=/usr --libdir=/usr/lib64 -Dinstall-tests=true"
|
|
||||||
G_TEST_ACCESSIBLE: 1
|
|
||||||
script:
|
|
||||||
- meson subprojects update
|
|
||||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
|
||||||
_build
|
|
||||||
- ninja -C _build
|
|
||||||
- sudo ninja -C _build install
|
|
||||||
- dbus-run-session xvfb-run -a -s "-screen 0 1024x768x24"
|
|
||||||
gnome-desktop-testing-runner
|
|
||||||
--report-directory=_build/installed-tests-report/failed/
|
|
||||||
--parallel=0
|
|
||||||
gtk-4.0
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- "_build/installed-tests-report/"
|
|
||||||
|
|
||||||
|
|
||||||
.mingw-defaults:
|
|
||||||
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"
|
|
||||||
|
|
||||||
.flatpak-defaults:
|
|
||||||
image: $FLATPAK_IMAGE
|
|
||||||
stage: flatpak
|
|
||||||
allow_failure: true
|
|
||||||
tags:
|
|
||||||
- flatpak
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- "${APPID}-dev.flatpak"
|
|
||||||
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 master
|
|
||||||
.flatpak-master:
|
|
||||||
extends: .flatpak-defaults
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
flatpak-manual:demo:
|
|
||||||
extends: .flatpak-manual
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
APPID: org.gtk.Demo4
|
|
||||||
|
|
||||||
flatpak-master:demo:
|
|
||||||
extends: .flatpak-master
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
APPID: org.gtk.Demo4
|
|
||||||
|
|
||||||
flatpak-manual:widget-factory:
|
|
||||||
extends: .flatpak-manual
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
APPID: org.gtk.WidgetFactory4
|
|
||||||
|
|
||||||
flatpak-master:widget-factory:
|
|
||||||
extends: .flatpak-master
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
APPID: org.gtk.WidgetFactory4
|
|
||||||
|
|
||||||
flatpak-manual:icon-browser:
|
|
||||||
extends: .flatpak-manual
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
APPID: org.gtk.IconBrowser4
|
|
||||||
|
|
||||||
flatpak-master:icon-browser:
|
|
||||||
extends: .flatpak-master
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
APPID: org.gtk.IconBrowser4
|
|
||||||
|
|
||||||
static-scan:
|
|
||||||
image: $FEDORA_IMAGE
|
|
||||||
stage: analysis
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=debug"
|
|
||||||
script:
|
|
||||||
- meson ${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,
|
|
||||||
# since it is incompatible with asan
|
|
||||||
asan-build:
|
|
||||||
image: $FEDORA_IMAGE
|
|
||||||
tags: [ asan ]
|
|
||||||
stage: analysis
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
script:
|
|
||||||
- CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=disabled _build
|
|
||||||
- ninja -C _build
|
|
||||||
- .gitlab-ci/run-tests.sh _build wayland
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- _build/meson-logs
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
reference:
|
|
||||||
image: $DOCS_IMAGE
|
|
||||||
stage: docs
|
|
||||||
needs: []
|
|
||||||
variables:
|
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
|
||||||
script:
|
|
||||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Dgtk_doc=true _build
|
|
||||||
- ninja -C _build gdk4-doc gsk4-doc gtk4-doc
|
|
||||||
- mkdir -p _reference/
|
|
||||||
- mv _build/docs/reference/gdk/html/ _reference/gdk/
|
|
||||||
- mv _build/docs/reference/gsk/html/ _reference/gsk/
|
|
||||||
- mv _build/docs/reference/gtk/html/ _reference/gtk/
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- _reference
|
|
||||||
|
|
||||||
pages:
|
|
||||||
stage: deploy
|
|
||||||
needs: ['reference']
|
|
||||||
script:
|
|
||||||
- mv _reference/ public/
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- public
|
|
||||||
only:
|
|
||||||
- master
|
|
@@ -1,47 +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.
|
|
||||||
|
|
||||||
### Checklist for Updating a CI image
|
|
||||||
|
|
||||||
- [ ] Update the `${image}.Dockerfile` file with the dependencies
|
|
||||||
- [ ] Run `./run-docker.sh build --base ${image} --base-version ${number}`
|
|
||||||
- [ ] Run `./run-docker.sh push --base ${image} --base-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} --base-version ${number}`
|
|
||||||
- [ ] Run `./run-docker.sh push --base ${image} --base-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,91 +0,0 @@
|
|||||||
FROM fedora:31
|
|
||||||
|
|
||||||
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 \
|
|
||||||
colord-devel \
|
|
||||||
cups-devel \
|
|
||||||
dbus-daemon \
|
|
||||||
dbus-x11 \
|
|
||||||
dejavu-sans-mono-fonts \
|
|
||||||
desktop-file-utils \
|
|
||||||
diffutils \
|
|
||||||
elfutils-libelf-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 \
|
|
||||||
gobject-introspection-devel \
|
|
||||||
graphene-devel \
|
|
||||||
gstreamer1-devel \
|
|
||||||
gstreamer1-plugins-good \
|
|
||||||
gstreamer1-plugins-bad-free-devel \
|
|
||||||
gstreamer1-plugins-base-devel \
|
|
||||||
gtk-doc \
|
|
||||||
hicolor-icon-theme \
|
|
||||||
iso-codes \
|
|
||||||
itstool \
|
|
||||||
json-glib-devel \
|
|
||||||
lcov \
|
|
||||||
libasan \
|
|
||||||
libattr-devel \
|
|
||||||
libcloudproviders-devel \
|
|
||||||
libepoxy-devel \
|
|
||||||
libffi-devel \
|
|
||||||
libmount-devel \
|
|
||||||
librsvg2 \
|
|
||||||
libselinux-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-libwayland-egl-devel \
|
|
||||||
ninja-build \
|
|
||||||
pango-devel \
|
|
||||||
pcre-devel \
|
|
||||||
pcre-static \
|
|
||||||
python3 \
|
|
||||||
python3-jinja2 \
|
|
||||||
python3-pip \
|
|
||||||
python3-pygments \
|
|
||||||
python3-wheel \
|
|
||||||
redhat-rpm-config \
|
|
||||||
sassc \
|
|
||||||
systemtap-sdt-devel \
|
|
||||||
vulkan-devel \
|
|
||||||
wayland-devel \
|
|
||||||
wayland-protocols-devel \
|
|
||||||
weston \
|
|
||||||
weston-libs \
|
|
||||||
which \
|
|
||||||
xorg-x11-server-Xvfb \
|
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
RUN pip3 install meson==0.55.3
|
|
||||||
|
|
@@ -1,12 +0,0 @@
|
|||||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v25
|
|
||||||
|
|
||||||
RUN dnf -y install pandoc
|
|
||||||
|
|
||||||
ARG HOST_USER_ID=5555
|
|
||||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
|
||||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
|
||||||
|
|
||||||
USER user
|
|
||||||
WORKDIR /home/user
|
|
||||||
|
|
||||||
ENV LANG C.UTF-8
|
|
@@ -1,13 +0,0 @@
|
|||||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v25
|
|
||||||
|
|
||||||
# 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,42 +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=release \
|
|
||||||
-Dx11-backend=true \
|
|
||||||
-Dwayland-backend=true \
|
|
||||||
-Dprint-backends=file \
|
|
||||||
-Dbuild-tests=false \
|
|
||||||
-Dbuild-examples=false \
|
|
||||||
-Dintrospection=disabled \
|
|
||||||
-Ddemos=true \
|
|
||||||
_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}
|
|
@@ -1,371 +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>
|
|
||||||
</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='master')
|
|
||||||
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)),
|
|
||||||
'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='master')
|
|
||||||
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,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;;
|
|
||||||
--base-version) 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,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# We need to add a new remote for the upstream master, since this script could
|
|
||||||
# be running in a personal fork of the repository which has out of date branches.
|
|
||||||
if [ "${CI_PROJECT_NAMESPACE}" != "GNOME" ]; then
|
|
||||||
echo "Retrieving the current upstream repository from ${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}..."
|
|
||||||
git remote add upstream https://gitlab.gnome.org/GNOME/gtk.git
|
|
||||||
git fetch upstream
|
|
||||||
ORIGIN="upstream"
|
|
||||||
else
|
|
||||||
echo "Reusing the existing repository on ${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}"
|
|
||||||
ORIGIN="origin"
|
|
||||||
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/master` or `upstream/gtk-3-24`).
|
|
||||||
#
|
|
||||||
# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` is only defined if we’re running in
|
|
||||||
# a merge request pipeline; fall back to `${CI_DEFAULT_BRANCH}` otherwise.
|
|
||||||
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${ORIGIN}/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent HEAD) | head -1)
|
|
||||||
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/master/docs/CODING-STYLE"
|
|
||||||
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,82 +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
|
|
||||||
|
|
||||||
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=gsk-compare-broadway
|
|
||||||
|
|
||||||
# Store the exit code for the CI run, but always
|
|
||||||
# generate the reports
|
|
||||||
exit_code=$?
|
|
||||||
;;
|
|
||||||
|
|
||||||
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=gsk-compare-broadway
|
|
||||||
|
|
||||||
exit_code=$?
|
|
||||||
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=gsk-compare-opengl
|
|
||||||
|
|
||||||
# don't let Broadway failures fail the run, for now
|
|
||||||
exit_code=0
|
|
||||||
kill ${server}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
cd ${builddir}
|
|
||||||
|
|
||||||
$srcdir/.gitlab-ci/meson-junit-report.py \
|
|
||||||
--project-name=gtk \
|
|
||||||
--backend=${backend} \
|
|
||||||
--job-id="${CI_JOB_NAME}" \
|
|
||||||
--output=report-${backend}.xml \
|
|
||||||
meson-logs/testlog-${backend}.json
|
|
||||||
$srcdir/.gitlab-ci/meson-html-report.py \
|
|
||||||
--project-name=gtk \
|
|
||||||
--backend=${backend} \
|
|
||||||
--job-id="${CI_JOB_NAME}" \
|
|
||||||
--reftest-output-dir="testsuite/reftests/output/${backend}" \
|
|
||||||
--output=report-${backend}.html \
|
|
||||||
meson-logs/testlog-${backend}.json
|
|
||||||
|
|
||||||
exit $exit_code
|
|
@@ -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=yes \
|
|
||||||
-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,74 +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-toolchain \
|
|
||||||
mingw-w64-$MSYS2_ARCH-ccache \
|
|
||||||
mingw-w64-$MSYS2_ARCH-pkg-config \
|
|
||||||
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 \
|
|
||||||
mingw-w64-$MSYS2_ARCH-shared-mime-info
|
|
||||||
|
|
||||||
mkdir -p _ccache
|
|
||||||
export CCACHE_BASEDIR="$(pwd)"
|
|
||||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
|
||||||
|
|
||||||
# https://gitlab.gnome.org/GNOME/gtk/-/issues/2243
|
|
||||||
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3002
|
|
||||||
|
|
||||||
if ! pkg-config --atleast-version=2.65.0 glib-2.0; then
|
|
||||||
git clone https://gitlab.gnome.org/GNOME/glib.git _glib
|
|
||||||
meson setup _glib_build _glib
|
|
||||||
meson compile -C _glib_build
|
|
||||||
meson install -C _glib_build
|
|
||||||
fi
|
|
||||||
pkg-config --modversion glib-2.0
|
|
||||||
|
|
||||||
if ! pkg-config --atleast-version=1.47.0 pango; then
|
|
||||||
git clone https://gitlab.gnome.org/GNOME/pango.git _pango
|
|
||||||
meson setup _pango_build _pango
|
|
||||||
meson compile -C _pango_build
|
|
||||||
meson install -C _pango_build
|
|
||||||
fi
|
|
||||||
pkg-config --modversion pango
|
|
||||||
|
|
||||||
# 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
|
|
@@ -1,36 +0,0 @@
|
|||||||
## Steps to reproduce
|
|
||||||
|
|
||||||
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
|
|
||||||
- Please report any warning or message printed on the terminal
|
|
||||||
-->
|
|
@@ -1,34 +0,0 @@
|
|||||||
## Steps to reproduce
|
|
||||||
|
|
||||||
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
@@ -1,14 +1,14 @@
|
|||||||
Please do not mail any of the authors listed here
|
|
||||||
asking questions about this version of GTK.
|
|
||||||
|
|
||||||
Original Authors
|
Original Authors
|
||||||
----------------
|
----------------
|
||||||
Peter Mattis <petm@xcf.berkeley.edu>
|
Peter Mattis <petm@xcf.berkeley.edu>
|
||||||
Spencer Kimball <spencer@xcf.berkeley.edu>
|
Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||||
Josh MacDonald <jmacd@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>
|
Shawn T. Amundson <amundson@gtk.org>
|
||||||
Jerome Bolliet <bolliet@gtk.org>
|
Jerome Bolliet <bolliet@gtk.org>
|
||||||
Damon Chaplin <damon@gtk.org>
|
Damon Chaplin <damon@gtk.org>
|
||||||
@@ -28,56 +28,5 @@ Jay Painter <jpaint@gtk.org>
|
|||||||
Manish Singh <manish@gtk.org>
|
Manish Singh <manish@gtk.org>
|
||||||
Owen Taylor <otaylor@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,
|
There are many others who have contributed patches; we thank them,
|
||||||
GTK is much better because of 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
|
|
||||||
|
261
CONTRIBUTING.md
@@ -1,261 +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
|
|
||||||
|
|
||||||
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 `master` 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
@@ -1,15 +1,15 @@
|
|||||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
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
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
[This is the first released version of the library GPL. It is
|
[This is the first released version of the library GPL. It is
|
||||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
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
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
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
|
Note that it is possible for a library to be covered by the ordinary
|
||||||
General Public License rather than by this special one.
|
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
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License Agreement applies to any software library which
|
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
|
of all derivatives of our free software and of promoting the sharing
|
||||||
and reuse of software generally.
|
and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
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
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
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.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
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.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
4961
ChangeLog.pre-1-0
Normal file
9106
ChangeLog.pre-1-2
Normal file
7471
ChangeLog.pre-2-0
Normal file
7471
ChangeLog.pre-2-10
Normal file
7471
ChangeLog.pre-2-2
Normal file
7471
ChangeLog.pre-2-4
Normal file
7471
ChangeLog.pre-2-6
Normal file
7471
ChangeLog.pre-2-8
Normal file
56
HACKING
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
If you want to hack on the Gtk+ project, it will make you life easier
|
||||||
|
to have the following packages installed:
|
||||||
|
|
||||||
|
- GNU autoconf 2.13
|
||||||
|
- GNU automake 1.4
|
||||||
|
(Beta releases are at ftp://ftp.cygnus.com/pub/tromey)
|
||||||
|
- GNU libtool 1.2d
|
||||||
|
- indent (GNU indent 1.9.1 is known good)
|
||||||
|
- GNU gettext 10.35
|
||||||
|
Available in ftp://alpha.gnu.org/gnu
|
||||||
|
|
||||||
|
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 installed as well.
|
||||||
|
The installation process of glib 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.gimp.org:/debian/home/gnomecvs'
|
||||||
|
$ cvs login
|
||||||
|
(there is no password, just hit return)
|
||||||
|
$ cvs -z9 checkout glib
|
||||||
|
$ cvs -z9 checkout gtk+
|
||||||
|
|
||||||
|
Please submit patches to the gtk-list@redhat.com mailing list (you must
|
||||||
|
subscribe before you post, e-mail gtk-list-request@redhat.com with a
|
||||||
|
subject of "subscribe"). All kinds of contributions are accepted.
|
||||||
|
Patches that you wish to go into the distribution should also be uploaded
|
||||||
|
to ftp://ftp.gimp.org/incoming. Follow the rules there for naming your
|
||||||
|
patches.
|
||||||
|
|
208
INSTALL
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
Prerequisites
|
||||||
|
=============
|
||||||
|
|
||||||
|
GTK+ requires the following packages:
|
||||||
|
|
||||||
|
- The GLIB library, available at the same location as GTK+
|
||||||
|
|
||||||
|
- The Pango library, available from:
|
||||||
|
|
||||||
|
http://www.pango.org/download.shtml
|
||||||
|
|
||||||
|
Pango also requires the FriBidi library, available from:
|
||||||
|
|
||||||
|
http://imagic.weizmann.ac.il/~dov/freesw/FriBidi/
|
||||||
|
|
||||||
|
- 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/
|
||||||
|
ftp://swrinde.nde.swri.edu/pub/png/src/
|
||||||
|
ftp://ftp.uu.net/graphics/jpeg/
|
||||||
|
|
||||||
|
If these libraries are not available, the corresponding
|
||||||
|
image loaders will simply not be built. However, this
|
||||||
|
may cause applications using GTK+ not to function properly.
|
||||||
|
|
||||||
|
Simple install procedure
|
||||||
|
========================
|
||||||
|
|
||||||
|
% gzip -cd gtk+-1.3.1.tar.gz | tar xvf - # unpack the sources
|
||||||
|
% cd gtk+-1.3.1 # change to the toplevel directory
|
||||||
|
% ./configure # run the `configure' script
|
||||||
|
% make # build GTK
|
||||||
|
[ Become root if necessary ]
|
||||||
|
% make install # install GTK
|
||||||
|
|
||||||
|
The Nitty-Gritty
|
||||||
|
================
|
||||||
|
|
||||||
|
The 'configure' script can be given a number of options to enable
|
||||||
|
and disable various features. For a complete list, type:
|
||||||
|
|
||||||
|
./configure --help
|
||||||
|
|
||||||
|
A few of the more important ones:
|
||||||
|
|
||||||
|
* --prefix=PREFIX install architecture-independent files in PREFIX
|
||||||
|
[ Defaults to /usr/local ]
|
||||||
|
|
||||||
|
* --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||||
|
[ Defaults to the value given to --prefix ]
|
||||||
|
|
||||||
|
* --with-xinput=[no/gxi/xfree] support XInput [default=no]
|
||||||
|
|
||||||
|
The --with-xinput flag specifies whether to compile with support
|
||||||
|
for the XInput extension (mainly used for graphics tablets), and
|
||||||
|
which form of support to use:
|
||||||
|
|
||||||
|
no : no support
|
||||||
|
gxi : Use generic XInput support
|
||||||
|
xfree : Use special features in the Wacom drivers in XFree86 3.3.1
|
||||||
|
and later.
|
||||||
|
|
||||||
|
For more information, follow the link from http://www.gtk.org
|
||||||
|
|
||||||
|
* --disable-nls do not use Native Language Support
|
||||||
|
|
||||||
|
If this flag is not specified, GTK+ will try to find
|
||||||
|
and use the gettext() set of functions to provide translations
|
||||||
|
of the strings in the standard dialogs into the
|
||||||
|
user's native language.
|
||||||
|
|
||||||
|
* --enable-xim support XIM [default=yes]
|
||||||
|
|
||||||
|
Specifying --disable-xim will disable support for entering
|
||||||
|
internationalized text using X Input Methods. This will give some
|
||||||
|
slight savings in speed and memory use and might be necessary
|
||||||
|
with older versions of X.
|
||||||
|
|
||||||
|
* --with-locale=LOCALE locale name you want to use
|
||||||
|
|
||||||
|
The --with-locale options is used to determine if your operating
|
||||||
|
system has support for the locale you will be using. If not, X's
|
||||||
|
built in locale support will be used.
|
||||||
|
|
||||||
|
Because of bugs in autoconf, it is necessary to specify this
|
||||||
|
option even if your LANG environment variable is correctly set.
|
||||||
|
|
||||||
|
This option does not determine which locale GTK will use at
|
||||||
|
runtime. That will be determined from the usual environment
|
||||||
|
variables. If you will be using multiple locales with GTK,
|
||||||
|
specify the one for which your operating system has the worst
|
||||||
|
support for the --with-locale option.
|
||||||
|
|
||||||
|
|
||||||
|
Options can be given to the compiler and linker by setting
|
||||||
|
environment variables before running configure. A few of the more
|
||||||
|
important ones:
|
||||||
|
|
||||||
|
CC : The C compiler to use
|
||||||
|
CPPFLAGS : Flags for the C preprocesser such as -I and -D
|
||||||
|
CFLAGS : C compiler flags
|
||||||
|
|
||||||
|
The most important use of this is to set the
|
||||||
|
optimization/debugging flags. For instance, to compile with no
|
||||||
|
debugging information at all, run configure as:
|
||||||
|
|
||||||
|
CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
|
||||||
|
|
||||||
|
or,
|
||||||
|
|
||||||
|
setenv CFLAGS -O2 ; ./configure # csh and variants
|
||||||
|
|
||||||
|
Native-Language Support and gettext()
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
To provide native-language support (NLS) GTK+ uses the
|
||||||
|
gettext() set of functions. These functions are found
|
||||||
|
in the C library on many systems, such as the Solaris
|
||||||
|
C library and the GNU C Library, version 2.
|
||||||
|
|
||||||
|
If your C library does not provide the necessary functionality,
|
||||||
|
you may wish to install the GNU gettext package. You'll
|
||||||
|
need version 0.10.35 or better. Version 0.10.35 is
|
||||||
|
available from ftp://alpha.gnu.org/pub/gnu
|
||||||
|
|
||||||
|
Generally, GTK+ will properly detect what is installed
|
||||||
|
on your system and enable or disable NLS as appropriate.
|
||||||
|
However, in rare cases, it may be necessary to disable
|
||||||
|
NLS manually to get GTK+ to compile. You can do this
|
||||||
|
by specifying the --disable-nls flag when configuring
|
||||||
|
GTK+.
|
||||||
|
|
||||||
|
Using an uninstalled copy of GLIB [ Unsupported ]
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
You can compile GTK+ against a copy of GLIB that you have not
|
||||||
|
yet installed. To do this, give the --with-glib=DIR options
|
||||||
|
to ./configure. For instance:
|
||||||
|
|
||||||
|
./configure --with-glib=../glib-1.3.1
|
||||||
|
|
||||||
|
This, however, will not work if you built GLIB with different
|
||||||
|
source and build directories.
|
||||||
|
|
||||||
|
It is recommended that you install GLIB before compiling
|
||||||
|
GTK+. The --with-glib option is not regularly tested
|
||||||
|
and may not function correctly. In addition,
|
||||||
|
inter-library dependencies won't be generated when
|
||||||
|
using --with-glib=.
|
||||||
|
|
||||||
|
Installation directories
|
||||||
|
========================
|
||||||
|
|
||||||
|
The location of the installed files is determined by the --prefix
|
||||||
|
and --exec-prefix options given to configure. There are also more
|
||||||
|
detailed flags to control individual directories. However, the
|
||||||
|
use of these flags is not tested.
|
||||||
|
|
||||||
|
One particular detail to note, is that the architecture-dependent
|
||||||
|
include file glibconfig.h is installed in:
|
||||||
|
|
||||||
|
$exec_pref/lib/glib/include/
|
||||||
|
|
||||||
|
if you have a version in $prefix/include, this is out of date
|
||||||
|
and should be deleted.
|
||||||
|
|
||||||
|
A shell script gtk-config is created during the configure
|
||||||
|
process, and installed in the bin/ directory
|
||||||
|
($exec_prefix/bin). This is used to determine the location of GTK
|
||||||
|
when building applications. If you move GTK after installation,
|
||||||
|
it will be necessary to edit this file.
|
||||||
|
|
||||||
|
For complete details, see the file docs/gtk-config.txt
|
||||||
|
|
||||||
|
|
||||||
|
Notes for using XIM support for Japanese input
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
* There is a bug in older versions of kinput2 that will cause GTK+
|
||||||
|
to hang when destroying a text entry. The latest versions of
|
||||||
|
kinput is available from:
|
||||||
|
|
||||||
|
ftp://ftp.sra.co.jp/pub/x11/kinput2
|
||||||
|
|
||||||
|
* The locale information file for the ja_JP EUC locale
|
||||||
|
distributed with some recent versions of X11 specifies to use the
|
||||||
|
C library multibyte functions. Unless your C library has support
|
||||||
|
for Japanese locales, this is incorrect, and will cause problems
|
||||||
|
for GTK's internationalization.
|
||||||
|
|
||||||
|
(In particular, this occurs with GNU libc 2.0 in which
|
||||||
|
the multibyte functions always translate to and from UTF-8; but
|
||||||
|
the problem may occur for other C libraries, and other operating
|
||||||
|
systems as well.)
|
||||||
|
|
||||||
|
To fix this, change the line:
|
||||||
|
|
||||||
|
use_stdc_env True
|
||||||
|
|
||||||
|
to
|
||||||
|
|
||||||
|
use_stdc_env False
|
||||||
|
|
||||||
|
in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
|
||||||
|
|
||||||
|
|
208
INSTALL.in
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
Prerequisites
|
||||||
|
=============
|
||||||
|
|
||||||
|
GTK+ requires the following packages:
|
||||||
|
|
||||||
|
- The GLIB library, available at the same location as GTK+
|
||||||
|
|
||||||
|
- The Pango library, available from:
|
||||||
|
|
||||||
|
http://www.pango.org/download.shtml
|
||||||
|
|
||||||
|
Pango also requires the FriBidi library, available from:
|
||||||
|
|
||||||
|
http://imagic.weizmann.ac.il/~dov/freesw/FriBidi/
|
||||||
|
|
||||||
|
- 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/
|
||||||
|
ftp://swrinde.nde.swri.edu/pub/png/src/
|
||||||
|
ftp://ftp.uu.net/graphics/jpeg/
|
||||||
|
|
||||||
|
If these libraries are not available, the corresponding
|
||||||
|
image loaders will simply not be built. However, this
|
||||||
|
may cause applications using GTK+ not to function properly.
|
||||||
|
|
||||||
|
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 Nitty-Gritty
|
||||||
|
================
|
||||||
|
|
||||||
|
The 'configure' script can be given a number of options to enable
|
||||||
|
and disable various features. For a complete list, type:
|
||||||
|
|
||||||
|
./configure --help
|
||||||
|
|
||||||
|
A few of the more important ones:
|
||||||
|
|
||||||
|
* --prefix=PREFIX install architecture-independent files in PREFIX
|
||||||
|
[ Defaults to /usr/local ]
|
||||||
|
|
||||||
|
* --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||||
|
[ Defaults to the value given to --prefix ]
|
||||||
|
|
||||||
|
* --with-xinput=[no/gxi/xfree] support XInput [default=no]
|
||||||
|
|
||||||
|
The --with-xinput flag specifies whether to compile with support
|
||||||
|
for the XInput extension (mainly used for graphics tablets), and
|
||||||
|
which form of support to use:
|
||||||
|
|
||||||
|
no : no support
|
||||||
|
gxi : Use generic XInput support
|
||||||
|
xfree : Use special features in the Wacom drivers in XFree86 3.3.1
|
||||||
|
and later.
|
||||||
|
|
||||||
|
For more information, follow the link from http://www.gtk.org
|
||||||
|
|
||||||
|
* --disable-nls do not use Native Language Support
|
||||||
|
|
||||||
|
If this flag is not specified, GTK+ will try to find
|
||||||
|
and use the gettext() set of functions to provide translations
|
||||||
|
of the strings in the standard dialogs into the
|
||||||
|
user's native language.
|
||||||
|
|
||||||
|
* --enable-xim support XIM [default=yes]
|
||||||
|
|
||||||
|
Specifying --disable-xim will disable support for entering
|
||||||
|
internationalized text using X Input Methods. This will give some
|
||||||
|
slight savings in speed and memory use and might be necessary
|
||||||
|
with older versions of X.
|
||||||
|
|
||||||
|
* --with-locale=LOCALE locale name you want to use
|
||||||
|
|
||||||
|
The --with-locale options is used to determine if your operating
|
||||||
|
system has support for the locale you will be using. If not, X's
|
||||||
|
built in locale support will be used.
|
||||||
|
|
||||||
|
Because of bugs in autoconf, it is necessary to specify this
|
||||||
|
option even if your LANG environment variable is correctly set.
|
||||||
|
|
||||||
|
This option does not determine which locale GTK will use at
|
||||||
|
runtime. That will be determined from the usual environment
|
||||||
|
variables. If you will be using multiple locales with GTK,
|
||||||
|
specify the one for which your operating system has the worst
|
||||||
|
support for the --with-locale option.
|
||||||
|
|
||||||
|
|
||||||
|
Options can be given to the compiler and linker by setting
|
||||||
|
environment variables before running configure. A few of the more
|
||||||
|
important ones:
|
||||||
|
|
||||||
|
CC : The C compiler to use
|
||||||
|
CPPFLAGS : Flags for the C preprocesser such as -I and -D
|
||||||
|
CFLAGS : C compiler flags
|
||||||
|
|
||||||
|
The most important use of this is to set the
|
||||||
|
optimization/debugging flags. For instance, to compile with no
|
||||||
|
debugging information at all, run configure as:
|
||||||
|
|
||||||
|
CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
|
||||||
|
|
||||||
|
or,
|
||||||
|
|
||||||
|
setenv CFLAGS -O2 ; ./configure # csh and variants
|
||||||
|
|
||||||
|
Native-Language Support and gettext()
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
To provide native-language support (NLS) GTK+ uses the
|
||||||
|
gettext() set of functions. These functions are found
|
||||||
|
in the C library on many systems, such as the Solaris
|
||||||
|
C library and the GNU C Library, version 2.
|
||||||
|
|
||||||
|
If your C library does not provide the necessary functionality,
|
||||||
|
you may wish to install the GNU gettext package. You'll
|
||||||
|
need version 0.10.35 or better. Version 0.10.35 is
|
||||||
|
available from ftp://alpha.gnu.org/pub/gnu
|
||||||
|
|
||||||
|
Generally, GTK+ will properly detect what is installed
|
||||||
|
on your system and enable or disable NLS as appropriate.
|
||||||
|
However, in rare cases, it may be necessary to disable
|
||||||
|
NLS manually to get GTK+ to compile. You can do this
|
||||||
|
by specifying the --disable-nls flag when configuring
|
||||||
|
GTK+.
|
||||||
|
|
||||||
|
Using an uninstalled copy of GLIB [ Unsupported ]
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
You can compile GTK+ against a copy of GLIB that you have not
|
||||||
|
yet installed. To do this, give the --with-glib=DIR options
|
||||||
|
to ./configure. For instance:
|
||||||
|
|
||||||
|
./configure --with-glib=../glib-@GTK_VERSION@
|
||||||
|
|
||||||
|
This, however, will not work if you built GLIB with different
|
||||||
|
source and build directories.
|
||||||
|
|
||||||
|
It is recommended that you install GLIB before compiling
|
||||||
|
GTK+. The --with-glib option is not regularly tested
|
||||||
|
and may not function correctly. In addition,
|
||||||
|
inter-library dependencies won't be generated when
|
||||||
|
using --with-glib=.
|
||||||
|
|
||||||
|
Installation directories
|
||||||
|
========================
|
||||||
|
|
||||||
|
The location of the installed files is determined by the --prefix
|
||||||
|
and --exec-prefix options given to configure. There are also more
|
||||||
|
detailed flags to control individual directories. However, the
|
||||||
|
use of these flags is not tested.
|
||||||
|
|
||||||
|
One particular detail to note, is that the architecture-dependent
|
||||||
|
include file glibconfig.h is installed in:
|
||||||
|
|
||||||
|
$exec_pref/lib/glib/include/
|
||||||
|
|
||||||
|
if you have a version in $prefix/include, this is out of date
|
||||||
|
and should be deleted.
|
||||||
|
|
||||||
|
A shell script gtk-config is created during the configure
|
||||||
|
process, and installed in the bin/ directory
|
||||||
|
($exec_prefix/bin). This is used to determine the location of GTK
|
||||||
|
when building applications. If you move GTK after installation,
|
||||||
|
it will be necessary to edit this file.
|
||||||
|
|
||||||
|
For complete details, see the file docs/gtk-config.txt
|
||||||
|
|
||||||
|
|
||||||
|
Notes for using XIM support for Japanese input
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
* There is a bug in older versions of kinput2 that will cause GTK+
|
||||||
|
to hang when destroying a text entry. The latest versions of
|
||||||
|
kinput is available from:
|
||||||
|
|
||||||
|
ftp://ftp.sra.co.jp/pub/x11/kinput2
|
||||||
|
|
||||||
|
* The locale information file for the ja_JP EUC locale
|
||||||
|
distributed with some recent versions of X11 specifies to use the
|
||||||
|
C library multibyte functions. Unless your C library has support
|
||||||
|
for Japanese locales, this is incorrect, and will cause problems
|
||||||
|
for GTK's internationalization.
|
||||||
|
|
||||||
|
(In particular, this occurs with GNU libc 2.0 in which
|
||||||
|
the multibyte functions always translate to and from UTF-8; but
|
||||||
|
the problem may occur for other C libraries, and other operating
|
||||||
|
systems as well.)
|
||||||
|
|
||||||
|
To fix this, change the line:
|
||||||
|
|
||||||
|
use_stdc_env True
|
||||||
|
|
||||||
|
to
|
||||||
|
|
||||||
|
use_stdc_env False
|
||||||
|
|
||||||
|
in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
|
||||||
|
|
||||||
|
|
149
Makefile.am
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
## Makefile.am for GTK+
|
||||||
|
|
||||||
|
SRC_SUBDIRS = gdk-pixbuf gdk modules gtk demos
|
||||||
|
SUBDIRS = po $(SRC_SUBDIRS) docs build
|
||||||
|
|
||||||
|
bin_SCRIPTS = gtk-config-2.0
|
||||||
|
|
||||||
|
# require automake 1.4
|
||||||
|
AUTOMAKE_OPTIONS = 1.4
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
HACKING \
|
||||||
|
gtk+.spec.in \
|
||||||
|
gtk-2.0.m4 \
|
||||||
|
makecopyright \
|
||||||
|
TODO \
|
||||||
|
TODO.xml \
|
||||||
|
NEWS.pre-1-0 \
|
||||||
|
ChangeLog.pre-1-0 \
|
||||||
|
ChangeLog.pre-1-2 \
|
||||||
|
README.cvs-commits \
|
||||||
|
README.win32 \
|
||||||
|
README.nanox \
|
||||||
|
intl/libgettext.h \
|
||||||
|
intl/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/packer/Makefile \
|
||||||
|
examples/packer/pack.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
|
||||||
|
|
||||||
|
dist-hook: gtk+.spec
|
||||||
|
if test -e $(srcdir)/INSTALL.in && test -e $(srcdir)/README.in ; then \
|
||||||
|
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||||
|
CONFIG_HEADERS= \
|
||||||
|
$(SHELL) config.status \
|
||||||
|
&& cp INSTALL README $(distdir) ; \
|
||||||
|
fi \
|
||||||
|
&& cp gtk+.spec $(distdir)
|
||||||
|
|
||||||
|
m4datadir = $(datadir)/aclocal
|
||||||
|
m4data_DATA = gtk-2.0.m4
|
||||||
|
|
||||||
|
.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"`
|
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
101
README
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
General Information
|
||||||
|
===================
|
||||||
|
|
||||||
|
This is GTK+ version 1.3.1. GTK+, which stands for the Gimp ToolKit,
|
||||||
|
is a library for creating graphical user interfaces for the X Window
|
||||||
|
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||||
|
written in C with a very object-oriented approach.
|
||||||
|
|
||||||
|
The official ftp site is:
|
||||||
|
ftp://ftp.gtk.org/pub/gtk
|
||||||
|
|
||||||
|
The official web site is:
|
||||||
|
http://www.gtk.org/
|
||||||
|
|
||||||
|
A mailing list is located at:
|
||||||
|
gtk-list@redhat.com
|
||||||
|
|
||||||
|
To subscribe: mail -s subscribe gtk-list-request@redhat.com < /dev/null
|
||||||
|
(Send mail to gtk-list-request@redhat.com with the subject "subscribe")
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
See the file 'INSTALL'
|
||||||
|
|
||||||
|
How to report bugs
|
||||||
|
==================
|
||||||
|
|
||||||
|
Bugs should be reported to the GNOME bug tracking
|
||||||
|
system. (http://bugs.gnome.org). To report a problem
|
||||||
|
about GTK+, send mail to submit@bugs.gnome.org.
|
||||||
|
|
||||||
|
The subject of the mail should describe your problem.
|
||||||
|
In the body of the mail, you should first include
|
||||||
|
a "pseudo-header" that gives the package and
|
||||||
|
version number. This should be separated by a blank
|
||||||
|
line from the actual headers.
|
||||||
|
|
||||||
|
Package: gtk+
|
||||||
|
Version: 1.3.1
|
||||||
|
|
||||||
|
[ Please substitute 1.3.1 with the version of GTK+ that
|
||||||
|
you have installed ]
|
||||||
|
|
||||||
|
Then describe the bug. 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 the testgtk program that is built
|
||||||
|
in the gtk/ 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.
|
||||||
|
|
||||||
|
(Bugs that can be reproduced within the GIMP are almost as good
|
||||||
|
as bugs that can be reproduced in testgtk. If you are reporting a
|
||||||
|
bug found with the GIMP, please include the version number of the GIMP
|
||||||
|
you are using)
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
An example of a bug report:
|
||||||
|
|
||||||
|
====
|
||||||
|
To: submit@bugs.gnome.org
|
||||||
|
From: yourname@your.address.org
|
||||||
|
Subject: handlebox test in testgtk is misnamed.
|
||||||
|
|
||||||
|
Package: gtk+
|
||||||
|
Version: 1.3.1
|
||||||
|
|
||||||
|
When I run gtk/testgtk, the button "handle box"
|
||||||
|
is misnamed. There are multiple handle boxes in
|
||||||
|
the demo, so it should be "handle boxes", to
|
||||||
|
be like "buttons" or "check buttons".
|
||||||
|
===
|
||||||
|
|
||||||
|
Patches
|
||||||
|
=======
|
||||||
|
|
||||||
|
Patches can be uploaded to the incoming/ directory on
|
||||||
|
ftp.gtk.org. Please follow the instructions there, and include
|
||||||
|
your name and email address in the README file.
|
||||||
|
|
||||||
|
If the patch fixes a bug, it is usually a good idea to include
|
||||||
|
all the information described in "How to Report Bugs".
|
63
README.cvs-commits
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
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 18 months, 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@redhat.com. (Subscription address:
|
||||||
|
gtk-devel-list-request@redhat.com.) This is a good place to ask
|
||||||
|
about intended changes.
|
||||||
|
|
||||||
|
If you just want to make a trivial change, and don't want to subscribe,
|
||||||
|
you can also mail gtk-bugs@gtk.org. Or, alternatively, you can look in
|
||||||
|
the ChangeLog for somebody who has been making changes to the file
|
||||||
|
you want to change and email them.
|
||||||
|
|
||||||
|
#gimp on byxnet (irc.gimp.org, irc2.gimp.org, irc3.gimp.org,
|
||||||
|
irc.germany.gimp.org...)s 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
101
README.in
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
General Information
|
||||||
|
===================
|
||||||
|
|
||||||
|
This is GTK+ version @GTK_VERSION@. GTK+, which stands for the Gimp ToolKit,
|
||||||
|
is a library for creating graphical user interfaces for the X Window
|
||||||
|
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||||
|
written in C with a very object-oriented approach.
|
||||||
|
|
||||||
|
The official ftp site is:
|
||||||
|
ftp://ftp.gtk.org/pub/gtk
|
||||||
|
|
||||||
|
The official web site is:
|
||||||
|
http://www.gtk.org/
|
||||||
|
|
||||||
|
A mailing list is located at:
|
||||||
|
gtk-list@redhat.com
|
||||||
|
|
||||||
|
To subscribe: mail -s subscribe gtk-list-request@redhat.com < /dev/null
|
||||||
|
(Send mail to gtk-list-request@redhat.com with the subject "subscribe")
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
See the file 'INSTALL'
|
||||||
|
|
||||||
|
How to report bugs
|
||||||
|
==================
|
||||||
|
|
||||||
|
Bugs should be reported to the GNOME bug tracking
|
||||||
|
system. (http://bugs.gnome.org). To report a problem
|
||||||
|
about GTK+, send mail to submit@bugs.gnome.org.
|
||||||
|
|
||||||
|
The subject of the mail should describe your problem.
|
||||||
|
In the body of the mail, you should first include
|
||||||
|
a "pseudo-header" that gives the package and
|
||||||
|
version number. This should be separated by a blank
|
||||||
|
line from the actual headers.
|
||||||
|
|
||||||
|
Package: gtk+
|
||||||
|
Version: @GTK_VERSION@
|
||||||
|
|
||||||
|
[ Please substitute @GTK_VERSION@ with the version of GTK+ that
|
||||||
|
you have installed ]
|
||||||
|
|
||||||
|
Then describe the bug. 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 the testgtk program that is built
|
||||||
|
in the gtk/ 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.
|
||||||
|
|
||||||
|
(Bugs that can be reproduced within the GIMP are almost as good
|
||||||
|
as bugs that can be reproduced in testgtk. If you are reporting a
|
||||||
|
bug found with the GIMP, please include the version number of the GIMP
|
||||||
|
you are using)
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
An example of a bug report:
|
||||||
|
|
||||||
|
====
|
||||||
|
To: submit@bugs.gnome.org
|
||||||
|
From: yourname@your.address.org
|
||||||
|
Subject: handlebox test in testgtk is misnamed.
|
||||||
|
|
||||||
|
Package: gtk+
|
||||||
|
Version: @GTK_VERSION@
|
||||||
|
|
||||||
|
When I run gtk/testgtk, the button "handle box"
|
||||||
|
is misnamed. There are multiple handle boxes in
|
||||||
|
the demo, so it should be "handle boxes", to
|
||||||
|
be like "buttons" or "check buttons".
|
||||||
|
===
|
||||||
|
|
||||||
|
Patches
|
||||||
|
=======
|
||||||
|
|
||||||
|
Patches can be uploaded to the incoming/ directory on
|
||||||
|
ftp.gtk.org. Please follow the instructions there, and include
|
||||||
|
your name and email address in the README file.
|
||||||
|
|
||||||
|
If the patch fixes a bug, it is usually a good idea to include
|
||||||
|
all the information described in "How to Report Bugs".
|
167
README.md
@@ -1,167 +0,0 @@
|
|||||||
GTK — The GTK toolkit
|
|
||||||
=====================
|
|
||||||
|
|
||||||
[](https://gitlab.gnome.org/GNOME/gtk/-/commits/master)
|
|
||||||
|
|
||||||
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 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 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/gtk/
|
|
||||||
- Gdk: https://gnome.pages.gitlab.gnome.org/gtk/gdk/
|
|
||||||
- Gsk: https://gnome.pages.gitlab.gnome.org/gtk/gsk/
|
|
||||||
|
|
||||||
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://developer.gnome.org/gtk4/stable/gtk-building.html)
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
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/unstable/gtk-migrating-2-to-3.html)
|
|
||||||
- [4.x release notes](https://developer.gnome.org/gtk4/unstable/gtk-migrating-3-to-4.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)
|
|
32
README.nanox
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Gtk port to nano-X
|
||||||
|
|
||||||
|
STATUS
|
||||||
|
|
||||||
|
Once upon a time I got a few apps working, then started merging
|
||||||
|
the new features added by Owen (32 bit sizes for windows and buffering).
|
||||||
|
Since then I haven't found the time to work on it:-/
|
||||||
|
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
Finish internal window manager abstraction or add proper support in nano-X.
|
||||||
|
Fix event polling.
|
||||||
|
Implement GdkImage, GdkRgb stuff.
|
||||||
|
Put generic region code in generic gdk and/or use the region code from nano-X.
|
||||||
|
Fix ugly automake stuff for make dist.
|
||||||
|
|
||||||
|
TODO in nano-X
|
||||||
|
|
||||||
|
We need to be able to clip and change the background of windows at runtime
|
||||||
|
for apps to not look so ugly!
|
||||||
|
Fonts: wait for better nano-X font implementation.
|
||||||
|
Properties on windows.
|
||||||
|
Provide a pango module.
|
||||||
|
|
||||||
|
If you want to work on this port or get additional informnation, get in
|
||||||
|
touch with me.
|
||||||
|
Configure gtk with the --with-gdktarget=nanox to compile with nano-X support.
|
||||||
|
|
||||||
|
Paolo Molaro
|
||||||
|
lupus@linuxcare.com
|
||||||
|
|
47
README.win32
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
This current (CVS) version of the Win32 backend does *not* even
|
||||||
|
compile properly. A zipfile with an older snapshot (from before the
|
||||||
|
merge of the no-flicker branch, and the other recent additions), is
|
||||||
|
available from http://www.gimp.org/win32/. That should be use by
|
||||||
|
"production" code until this CVS version is useable. (But note, the
|
||||||
|
Win32 backend has never been claimed to be "production quality",
|
||||||
|
although it works OK for the GIMP.)
|
||||||
|
|
||||||
|
The Win32 port of GTk+ is a work in progress, and not as stable or
|
||||||
|
correct as the Unix/X11 version. For more information about the Win32
|
||||||
|
port, see http://www.gimp.org/win32/ or
|
||||||
|
http://www.iki.fi/tml/gimp/win32/ .
|
||||||
|
|
||||||
|
To build GTk+ on Win32, you need either the Microsoft compiler and
|
||||||
|
tools, or gcc-2.95 or later. The mingw setup of gcc is preferred, but
|
||||||
|
you can run gcc also under cygwin-b20.1 or later. Compile in
|
||||||
|
gdk\win32, gdk and gtk with `nmake -f makefile.msc` or `make -f
|
||||||
|
makefile.cygwin`. The name makefile.cygwin is misleading, it should
|
||||||
|
really be called makefile.mingw.
|
||||||
|
|
||||||
|
See the README.win32 file in the GLib distribution for instructions
|
||||||
|
how to build with gcc.
|
||||||
|
|
||||||
|
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. The
|
||||||
|
same instructions on how to set up a correct version of gcc should
|
||||||
|
also be followed if you want to build applications that use GTk+ with
|
||||||
|
gcc.
|
||||||
|
|
||||||
|
The tablet support uses the Wintab API. The Wintab development kit can
|
||||||
|
be downloaded from http://www.pointing.com. If you don't care for
|
||||||
|
that, undefine HAVE_WINTAB in config.h.win32 and remove references to
|
||||||
|
the wntab32x library from the makefile before building.
|
||||||
|
|
||||||
|
GTk+ wants to be built with the GNU "intl" library for
|
||||||
|
internationalisation (i18n). Get the version ported to Win32 (not a
|
||||||
|
very big deal) from tml's web site mentioned above. We build the
|
||||||
|
"intl" library as a DLL called gnu-intl.dll (the "gnu" prefix is used
|
||||||
|
to reduce name clash risks). If you don't want any i18n stuff,
|
||||||
|
undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
|
||||||
|
config.h.win32 file, and remove references to the gnu-intl library
|
||||||
|
from the makefiles.
|
||||||
|
|
||||||
|
Note that while the GNU gettext package is under the GPL license, the
|
||||||
|
"intl" part of it is also distributed as part of the GNU C library
|
||||||
|
(glibc) where it is under the LGPL license (as is GTk+ or GLib). We
|
||||||
|
want the LGPL licensed version. The code is more or less the same.
|
200
TODO
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
|
||||||
|
Outstanding items:
|
||||||
|
|
||||||
|
* focus handling for GtkOptionMenu (needs the previous)
|
||||||
|
|
||||||
|
* implement gtk_default_draw_oval and other missing things in gtkstyle.c.
|
||||||
|
|
||||||
|
* enforce invariants on *_RESIZE* and *_REDRAW* flags.
|
||||||
|
|
||||||
|
* GtkToolTips: allocate GtkTooltipsData from memchunks
|
||||||
|
|
||||||
|
* Make all widget attributes configurable after the widget is created (timj).
|
||||||
|
|
||||||
|
* Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator
|
||||||
|
is TRUE. (Radio buttons do not need to CAN_DEFAULT! OWT)
|
||||||
|
|
||||||
|
* More dialogs: Print, maybe others...
|
||||||
|
|
||||||
|
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||||
|
|
||||||
|
* Check return values on all calls to XIC[Get/Set]Values
|
||||||
|
|
||||||
|
* The "--geometry" option should be supported
|
||||||
|
|
||||||
|
- Having gdk_init() parse the geometry option. (putting it into
|
||||||
|
GDK means you can use XParseGeometry() without wrapping it)
|
||||||
|
|
||||||
|
- Add a call gdk_get_geometry() that retrieves the results
|
||||||
|
in a form like that returned by XParseGeometry()
|
||||||
|
|
||||||
|
- The application then can modify the results (as would gemvt)
|
||||||
|
then call a routine gtk_window_set_geometry() on whatever
|
||||||
|
it considers to be its main window.
|
||||||
|
|
||||||
|
- Then in some manner GtkWindow takes that into account when
|
||||||
|
setting its hints. (Probably it uses the size and position
|
||||||
|
as the current uposition and usize, and modulates that
|
||||||
|
be the equivalents of the X flags
|
||||||
|
|
||||||
|
XValue, YValue, WidthValue, HeightValue, XNegative, or YNegative
|
||||||
|
|
||||||
|
( You'd have to extend gdk_window_set_hints to accept the
|
||||||
|
window gravity option to get it right. )
|
||||||
|
|
||||||
|
* Allow moving the separator for paned widgets by dragging
|
||||||
|
it directly instead of using the handle.
|
||||||
|
|
||||||
|
* Check into XAddConnectionWatch - is this needed for XIM?
|
||||||
|
|
||||||
|
* Places where a _full variant is needed:
|
||||||
|
|
||||||
|
gtk_init_add
|
||||||
|
gtk_menu_popup
|
||||||
|
gtk_toolbar_prepend_element
|
||||||
|
gtk_toolbar_insert_element
|
||||||
|
|
||||||
|
* Try to rationally deal with someone else deleting one of our
|
||||||
|
windows??? This would mean keeping track of our window heirarchy
|
||||||
|
ourselves, for one thing, and will never be safe, because of
|
||||||
|
race conditions.
|
||||||
|
|
||||||
|
* Should all the default handlers really return FALSE? This can
|
||||||
|
cause confusing presses to be sent to containers that actually
|
||||||
|
want to get events on themselves.
|
||||||
|
|
||||||
|
* The menu code should skip separators during keyboard navigation,
|
||||||
|
whether they are sensitive or insensitive.
|
||||||
|
|
||||||
|
* OwnerButtonPressGrab needs to go!
|
||||||
|
|
||||||
|
Text/Edit widget:
|
||||||
|
|
||||||
|
Bugs:
|
||||||
|
|
||||||
|
- Really big font (150 pt), plus lots of editing caused segfault
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
|
||||||
|
- Unify the key binding support in some fashion between the
|
||||||
|
Entry and Text widget widgets, use GtkBindings for this.
|
||||||
|
|
||||||
|
- Figure out a way not to recompute the geometry on insertions/deletions
|
||||||
|
which are large, but not a significant fraction of the
|
||||||
|
entire text. (e.g., compute the changes as when the widget
|
||||||
|
is not frozen, but without the actual scrolling)
|
||||||
|
|
||||||
|
- Prune the line start cache. But since it is only 68 bytes
|
||||||
|
per line, and it is a lot faster when lines are in the cache,
|
||||||
|
it may be better not to, at least for now.
|
||||||
|
|
||||||
|
- Show the non-editable state by changing colors. (Use the
|
||||||
|
style entries for insensitive?)
|
||||||
|
|
||||||
|
- Multibyte support for the Text widget.
|
||||||
|
|
||||||
|
- Unicode support to do the multi-byte right.
|
||||||
|
|
||||||
|
- Support an .inputrc. (The readline one doesn't really work,
|
||||||
|
unless it is extended because it can't represent X keysyms,
|
||||||
|
just terminal type input)
|
||||||
|
|
||||||
|
- A vi mode
|
||||||
|
|
||||||
|
- Word wrap, instead of line folding. (Should the continuation
|
||||||
|
characters be shown?)
|
||||||
|
|
||||||
|
- Horizontal scrolling
|
||||||
|
|
||||||
|
- Disable pasting compound text
|
||||||
|
|
||||||
|
- When showing background pixmap (not editable) actually set
|
||||||
|
the background pixmap as the windows bg pixmap, to improve
|
||||||
|
appearance on exposes. But this would require using another
|
||||||
|
window to get the origins.
|
||||||
|
|
||||||
|
- In word wrap mode, break:
|
||||||
|
|
||||||
|
aaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||||
|
|
||||||
|
as:
|
||||||
|
| Maximum column
|
||||||
|
aaaaaaaaaaa bbbbbbbbbbb|
|
||||||
|
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||||
|
bbbbbbbbb |
|
||||||
|
|
||||||
|
Instead of:
|
||||||
|
|
|
||||||
|
aaaaaaaaaaa |
|
||||||
|
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||||
|
bbbbbbbbbbbbbbbbbbbb |
|
||||||
|
|
||||||
|
- Blinking cursor
|
||||||
|
|
||||||
|
- API's : gtk_text_clear, gtk_text_delete_lines (gint start, gint end),
|
||||||
|
gtk_text_append/prepend, gtk_text_insert_at (gint row, gint column),
|
||||||
|
some function to get the row/column from the x/y-coordinates of a
|
||||||
|
mouse click, some function to get the word/line under the mouse pointer
|
||||||
|
[ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ]
|
||||||
|
|
||||||
|
- "changed" emitted when doing deletes on empty Text widget.
|
||||||
|
|
||||||
|
- Delete IC in editable->unrealize, not editable->finalize?
|
||||||
|
|
||||||
|
Themes
|
||||||
|
======
|
||||||
|
|
||||||
|
- When a scale gets shown/hidden only queue a redraw on the
|
||||||
|
non-window portion, not the whole area.
|
||||||
|
|
||||||
|
- In various places, to avoid shaping windows excessively,
|
||||||
|
we set parent relative backgrounds. This is an ugly
|
||||||
|
hack and needs a better solution. Plus, I don't think
|
||||||
|
these parent-relative backgrounds always persist to
|
||||||
|
when they are actually needed.
|
||||||
|
|
||||||
|
Such calls exist in: GtkButton, GtkHandeBox, GtkItem,
|
||||||
|
GtkListItem, GtkMenu, GtkMenuItem, GtkMisc,
|
||||||
|
GtkNoteBook, GtkOptionMenu, GtkPaned, GtkPreview,
|
||||||
|
GtkSpinButton and GtkTreeItem.
|
||||||
|
|
||||||
|
- For menus and for GtkWindow's, the realize() function
|
||||||
|
calls paint(), so that background pixmaps can be set
|
||||||
|
ahead of time, and prevent flashing when the window is
|
||||||
|
shown. This is an ugly hack and needs a better solution.
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
Calendar Widget:
|
||||||
|
|
||||||
|
- The widget should be nicely resizeable vertical too.
|
||||||
|
|
||||||
|
- CALENDAR_MARGIN should be removed, uses INNER_BORDER and
|
||||||
|
style->class->[xy]thickness insted.
|
||||||
|
|
||||||
|
- Flag to choose between using standard three letter abbreviated
|
||||||
|
weekday name or just the first character from it. It looks like
|
||||||
|
that is what most other calendar-widgets do.
|
||||||
|
|
||||||
|
- Arrows should resize with the header-font.
|
||||||
|
|
||||||
|
- The keyboard support has to be finished.
|
||||||
|
|
||||||
|
DND
|
||||||
|
===
|
||||||
|
|
||||||
|
- Use a cursor instead of an ICON when over Motif windows,
|
||||||
|
to get rid of the current junk that Motif leaves because
|
||||||
|
of its XCopyArea stupidity for doing highlighting.
|
||||||
|
|
||||||
|
- Add a GTK_DRAG_VERIFY target flag and a "drag_data_verify"
|
||||||
|
signal so that apps can easily check if a, say,
|
||||||
|
text/uri-list URL looks OK during the drop.
|
||||||
|
|
||||||
|
- Check more for memory leaks.
|
||||||
|
|
||||||
|
- Drag and drop for Entry and Text widgets.
|
||||||
|
|
||||||
|
- Send synthetic motion events on structure changes so
|
||||||
|
drag_enter/leave get sent properly. (See the popup
|
||||||
|
in testdnd)
|
739
TODO.xml
Normal file
@@ -0,0 +1,739 @@
|
|||||||
|
<!-- This is used to generate the online TODO list for GTK+ using
|
||||||
|
the script docs/make-todo. Whenever a change to this file is
|
||||||
|
committed to CVS,the file is run through make-todo and the online
|
||||||
|
version updated. If you modify this file, you should check for
|
||||||
|
parse errors by running:
|
||||||
|
|
||||||
|
$ docs/make-todo TODO.xml > /dev/null
|
||||||
|
|
||||||
|
before committing, or you may screw up the online version -->
|
||||||
|
<todo logourl="gtk-logo-rgb.gif">
|
||||||
|
<title>GTK+ TODO list</title>
|
||||||
|
<section>
|
||||||
|
<title>GDK</title>
|
||||||
|
|
||||||
|
<entry size="medium" status="90%" target="2.0">
|
||||||
|
<title>Add backing store support</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GTK+'s drawing model involves clearing to a background, and
|
||||||
|
then drawing widgets on top of this. Without having
|
||||||
|
backing-store support, this results in flickering in various
|
||||||
|
situations. Backing store cannot be added widget-by-widget,
|
||||||
|
because the drawing in a particular window is not confined
|
||||||
|
to a single widget. Instead it needs to be added per GDK
|
||||||
|
window.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The way this is done is by having
|
||||||
|
<tt>gdk_window_begin_paint()</tt>
|
||||||
|
and <tt>gdk_window_end_paint()</tt> functions that
|
||||||
|
redirect all drawing to a particular window to an offscreen
|
||||||
|
pixmap, and then copy that offscreen pixmap back onto the
|
||||||
|
screen when the paint operation is done. The implementation
|
||||||
|
of this is mostly complete in the <tt>gtk-no-flicker</tt> branch of
|
||||||
|
GTK+.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||||
|
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="90%" target="2.0">
|
||||||
|
<title>32 Bit Coordinates</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GTK+-1.2 and earlier share X's limitation on the
|
||||||
|
size of coordinates and restrict all dimensions
|
||||||
|
to 16 bit quantities. By clever use of X it is
|
||||||
|
possible to lift this restriction and present a
|
||||||
|
full 32-bit space to the user.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
There are some difficulties with performance in this
|
||||||
|
approach - mostly because scrolling can involve mapping and
|
||||||
|
unmapping lots of widgets, but in general, current
|
||||||
|
trials in this area seem to work pretty well.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||||
|
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Customizable double-click timeout</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The current fixed double-click timeout in GTK+
|
||||||
|
is too small for some users. This needs to be
|
||||||
|
customizable
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
<bugs>#3958</bugs>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Make color handling more convenient</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Add some color convenience functions; such as a way to get an
|
||||||
|
allocated GdkColor from GdkRGB, and export functions from gtkstyle.c
|
||||||
|
that lighten/darken a given color, and set a color from HSV in
|
||||||
|
addition to RGB. Also, consider having static variables that contain
|
||||||
|
preallocated common colors (gdk_blue, gdk_red, etc.), the problem
|
||||||
|
being colormap issues.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Cursors</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Two tasks: 1) move the cursors in the cursor font that people actually
|
||||||
|
care about to the top of the gdkcursor.h header file, and put a nice
|
||||||
|
list of the 15 cursors people actually care about in the docs 2) if
|
||||||
|
the cursor font lacks some commonly-useful cursors (like magnifying
|
||||||
|
glass), add these cursors to gdkcursor.h and then emulate them in
|
||||||
|
gdk_cursor_new by transparently creating the cursor from a bitmap.
|
||||||
|
The list of Qt cursors is worth http://doc.trolltech.com/qcursor.html
|
||||||
|
looking at for this task.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="100%" target="2.0">
|
||||||
|
<title>Make GdkRGB work on any visual</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GdkRGB should be able to render to an arbitrary visual
|
||||||
|
(i.e. the visual shouldn't be fixed at gdk_rgb_init()
|
||||||
|
time). This will break gdk_rgb_gc_set_foreground() and
|
||||||
|
friends, though.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
</section> <!-- GDK -->
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>Internationalization</title>
|
||||||
|
|
||||||
|
<entry size="big" status="90%" target="2.0">
|
||||||
|
<title>Integrate Pango</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The purpose of the Pango project is to provide a system for
|
||||||
|
layout and rendering of internationalized text. It handles
|
||||||
|
most of the issues necessary to
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<url>http://www.pango.org</url>
|
||||||
|
<contact>gtk-i18n-list@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="90%" target="2.0">
|
||||||
|
<title>Switch to using UTF-8</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
This is closely related to Pango integration. Pango deals
|
||||||
|
with all strings in terms of UTF-8; by switching GTK+ over
|
||||||
|
to UTF-8 we make it considerably simpler for developers to
|
||||||
|
support multiple languages properly while still retaining
|
||||||
|
a large degree of compatibility with existing programs.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Some work has already been done on this as part of the Win32
|
||||||
|
port, since the Win32 port is currently using UTF-8 for all
|
||||||
|
strings. In general, this should be an easy job; the hardest
|
||||||
|
parts are places like GtkFileSelection, cut and paste, and
|
||||||
|
input method support where there is interaction between GTK+
|
||||||
|
and the operating system.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-i18n-list@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="60%" target="2.0">
|
||||||
|
<title>Rewrite Input Method Support</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Support for Input Methods is GTK+-1.2 is done via XIM, with
|
||||||
|
supported styles being over-the-spot and the root-window
|
||||||
|
styles. However, the over-the-spot style is not going to
|
||||||
|
work well with the Pango integration, since it relies on the
|
||||||
|
text rendering in the program being done in the standard
|
||||||
|
Xlib style, so it will be necessary to also support
|
||||||
|
on-the-spot input. On-the-spot input is done by supplying a
|
||||||
|
set of callbacks that are invoked by the input methods.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
GTK+-2.0 will have a new system with loadable input method
|
||||||
|
modules. These modules can either be implemented using XIM,
|
||||||
|
or written from scratch.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-i18n-list@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
</section> <!-- i18n -->
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>GTK+ Core</title>
|
||||||
|
|
||||||
|
<entry size="big" status="60%" target="2.0">
|
||||||
|
<title>GLib based object and type system</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The GTK+ object system is already in use in quite a few different
|
||||||
|
non-GUI applications; it would be desirable for these uses
|
||||||
|
to have the object and type systems separated from the GUI portions
|
||||||
|
of GTK+ and be generalized for non-GUI usage.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>Tim Janik <timj@gtk.org></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="1%" target="2.0">
|
||||||
|
<title>Overall callback improvements</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The GTK+ type and signal systems need significant improvements to
|
||||||
|
allow signal creation with default handlers from language bindings
|
||||||
|
and to aid language bindings in deriving new objects.
|
||||||
|
One aspect of this is the Closure support, recently suggested by
|
||||||
|
Karl Nelson <kenelson@ece.ucdavis.edu>, but this also
|
||||||
|
requires a GLib based type and parameter system (ties in with
|
||||||
|
"GLib based object and type system").
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="0%" target="2.0">
|
||||||
|
<title>State change notification</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GTK+ objects emit various types of signals, some to perform
|
||||||
|
arbitrary actions, some to allow customization from user code,
|
||||||
|
and some signals are emitted to notify of certain changes
|
||||||
|
of an object. For the latter, what really is required is a
|
||||||
|
gneneric signal that can be used to monitor *any* kind of object
|
||||||
|
changes. For that, all object changes need to be routed through
|
||||||
|
a central point (otherwise the signal emissions are spread all
|
||||||
|
over the object implementation), i.e. an object argument setter.
|
||||||
|
The state change notification signal doesn't need to be emitted
|
||||||
|
syncronously, in fact, it's probably most effective to always
|
||||||
|
emit this asynchronously, so subsequent changes are accumulated.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>Tim Janik <timj@gtk.org></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="5%" target="2.0">
|
||||||
|
<title>Widget as sensitivity/grab state machine</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Maintenance of pointer and keybnoard grabs is currently very
|
||||||
|
tedious and error-prone, most widget's cook up their own stuff
|
||||||
|
in this regard.
|
||||||
|
By moving the general concept of "Grabs" to the GTK+ level as
|
||||||
|
a widget state, and providing a new signal for alterations of
|
||||||
|
a widget's state ("visible", "visible+insensitive",
|
||||||
|
"visible+grab", "hidden", "hidden+insensitive", etc.), things
|
||||||
|
can be unified and more stabelize. A couple of bugs, such as
|
||||||
|
insensitive widgets still holding a grab, or buttons that
|
||||||
|
still think they are depressed when hidden, will be squeezed
|
||||||
|
automatically with that.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>Tim Janik <timj@gtk.org></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="0%" target="2.0">
|
||||||
|
<title>Allow argument customization</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Many types of object arguments (expander style in the CList,
|
||||||
|
default padding in button boxes, etc), conceptually go with
|
||||||
|
the theme, or as user preferences; they should not be set by
|
||||||
|
a particular program.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
There needs to be a mechanism for themes to be able to
|
||||||
|
control these arguments from the RC file.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="0%" target="2.0">
|
||||||
|
<title>Allow global customization</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
There are a number of global parameters in GTK+ and GDK that should be
|
||||||
|
customizable by the user, such as the double-click timeout,
|
||||||
|
or whether widgets should be backing-stored by default.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
If we had argument customization from an RC file, it might
|
||||||
|
be possible to do this simply with a global object with
|
||||||
|
arguments for the various global parameters that was
|
||||||
|
customized in the same fashion as object arguments.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Gtk+ Modules installation directory</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Gtk+ needs to support an extra lib/ directory, to search
|
||||||
|
for dynamically loadable modules, it also needs to support
|
||||||
|
an environment variable to specify module search paths.
|
||||||
|
This has quite some cross-platform issues with the GModule
|
||||||
|
code (especially on AIX).
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
|
||||||
|
<entry size="small" status="20%" target="2.0">
|
||||||
|
<title>Convenient widget setup</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Make it simpler to set all the basic attributes of a widget. Might
|
||||||
|
want set_tooltip(), set_accel(), set_color(FOREGROUND, color),
|
||||||
|
set_min_size() (usize does this, but needs a rename), set_whatsthis(),
|
||||||
|
etc. set_accel() may not work for all widgets, may need a convenience
|
||||||
|
API for button and label accelerators specifically.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The idea is that it should be easy, out of the box, to set up a widget
|
||||||
|
with all the nice touches and features the widget really should
|
||||||
|
have. Users shouldn't need to do their own convenience functions for
|
||||||
|
this.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="0%" target="> 2.0">
|
||||||
|
<title>Make selections/clipboard more convenient</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Make GtkSelectionData more like the MIME blobs in Swing and Qt.
|
||||||
|
Consider a GtkClipboard object to simplify cut-and-paste handling.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
|
||||||
|
<entry size="small" status="80%" target="2.0">
|
||||||
|
<title>Stock label/icon system</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
A system like GnomeStock for getting a standard labels/icons
|
||||||
|
for menus and toolbars. Should be extensible by themes, and
|
||||||
|
by libgnomeui. Some work already done on this.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>hp@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
|
||||||
|
<entry size="big" status="0%" target="> 2.0">
|
||||||
|
<title>Session Management</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Look in to session management. Consider whether to use
|
||||||
|
X11R6 SM, or some custom spec shared with KDE. Create
|
||||||
|
GTK+ API for this.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="0%" target="> 2.0">
|
||||||
|
<title>Online help enhancements</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Look at a small "What's This" popup widget,
|
||||||
|
and a What's This system in general (this part
|
||||||
|
could maybe be done for 2.0). A more difficult, probably
|
||||||
|
a post-2.0 task, is to integrate a very simple little
|
||||||
|
help browser gizmo into GTK.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
|
||||||
|
<entry size="medium" status="0%" target="2.0">
|
||||||
|
<title>GUI-editable means of user configuration</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Need to be able to set double click time, whether cursors
|
||||||
|
blink, etc., from a control panel type of deal.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
</section> <!-- Core -->
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<title>GTK+ Widgets</title>
|
||||||
|
|
||||||
|
<entry size="small" status="100%" target="2.0">
|
||||||
|
<title>Make GtkFrame use a label</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The title of a frame should simply be another child widget
|
||||||
|
which, by default, holds a label widget. This will important
|
||||||
|
with Pango where proper text behavior will be more complex to
|
||||||
|
implement, but is also useful for certain user-interface
|
||||||
|
designs. (It can be useful, for example, to put a checkbutton
|
||||||
|
in that slot.)
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="90%" target="2.0">
|
||||||
|
<title>Replace GtkText Widget</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The GtkText widget is badly in need of replacement, since it
|
||||||
|
is buggy and insufficiently feature rich. This is being done
|
||||||
|
using Havoc Pennington's port of the Tk Text widget.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
As part of this job <a href="http://www.pango.org">Pango</a>
|
||||||
|
support is being added to the replacement. The structure of
|
||||||
|
the Tk text widget port is suited to this as it works
|
||||||
|
paragraph-by-paragraph, and Pango works at a sub-paragraph
|
||||||
|
scale. The main remaining tasks here are to implement
|
||||||
|
incremental reflow to make performance acceptable and to
|
||||||
|
implement embedded pixmaps and widgets.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="20%" target="2.0">
|
||||||
|
<title>Improve Radio/Checkbutton Look</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
The default look for the radio and checkbuttons is both
|
||||||
|
unattractive and not friendly to the user . Motif did not
|
||||||
|
get this one right, and we should not keep on following the
|
||||||
|
Motif look. The right thing here is probably to copy the
|
||||||
|
Windows appearance for these controls fairly closely. This
|
||||||
|
will fit in with well with the rest of the GTK+ look.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="99%" target="2.0">
|
||||||
|
<title>Improve Submenu Navigation</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Navigating through a deep menu tree in GTK+ is currently
|
||||||
|
quite tricky, because as soon as one leaves a menu item,
|
||||||
|
the submenu disappears. The way that the Macintosh is
|
||||||
|
reputed to handle this is that to pop down the current
|
||||||
|
submenu, you have to leave the triangle defined by the
|
||||||
|
upper left hand corner of the menu item and right
|
||||||
|
side of the submenu.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0 ?">
|
||||||
|
<title>Improve Spinbutton Look</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Spinbuttons currently appear to have lumpy boundaries,
|
||||||
|
because sides of the arrows aren't at an angle that
|
||||||
|
meshes well with the pixel grid. However, fixing this
|
||||||
|
would require making the spinbuttons narrower and
|
||||||
|
harder to hit. This points out a general problem with
|
||||||
|
the spinbutton (and the arrows on the scrollbars) - the
|
||||||
|
target area for clicks actually the bounding box of the
|
||||||
|
arrows, but the user thinks that they must click on the
|
||||||
|
arrows themselves. It would probably be more friendly
|
||||||
|
to use a square button with an arrow drawn on top instead
|
||||||
|
of a arrow-shaped button, the approach taken by most other
|
||||||
|
windowing systems.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="90%" target="2.0">
|
||||||
|
<title>Supply horizontable/vertical wrapping boxes</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
An often requested feature are wrapping containers, at this
|
||||||
|
point, gimp's development version already uses such widgets:
|
||||||
|
horizontable/vertical wrap boxes, that need to go into 2.0
|
||||||
|
proper at some point.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>Tim Janik <timj@gtk.org></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="90%" target="2.0">
|
||||||
|
<title>Improved generic combo support</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Gtk+'s combo box has several drawbacks in design and
|
||||||
|
implementation. An new attempt at providing the combo box
|
||||||
|
functionality with improved flexibility has been made with
|
||||||
|
the GtkClueHunter widget, sitting in the CVS module "gle".
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>Tim Janik <timj@gtk.org></contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="40%" target="2.0?">
|
||||||
|
<title>Add unified set of List/Tree/Grid widgets</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Currently, GTK+ has a large number of list and tree widgets
|
||||||
|
(GtkList, GtkTree, GtkCList, GtkCTree), none of which are
|
||||||
|
ideal. The GtkList and GtkTree widgets perform badly on large
|
||||||
|
number of items. (GtkTree widget is also quite buggy.) GtkCList
|
||||||
|
and GtkCTree mostly solve the size problem, but are quite
|
||||||
|
complex and, despite that, not very flexible. They are limited to
|
||||||
|
displaying pixmaps and text, and can neither support arbitrary
|
||||||
|
widgets nor custom drawing functions.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
In addition to list and tree widgets, a closely related need
|
||||||
|
is a sheet widget that displays a (possibly editable) 2-D grid.
|
||||||
|
It would be desirable to have a complete set of widgets that
|
||||||
|
could be presented as the one-true-solution for these needs.
|
||||||
|
Model/View techniques could be used effectively to increase
|
||||||
|
both the simplicity and power of the interfaces.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>GtkImage</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
gdk-pixbuf is moving to become a GTK+ dependency, a new image-display
|
||||||
|
widget is thus needed.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>hp@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Attempt to fix GtkStatusbar</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GtkStatusbar is too inconvenient to use.
|
||||||
|
The only non-breakage-inducing fix we could
|
||||||
|
come up with is to permit 0 as a context ID, so you
|
||||||
|
don't have to use gtk_statusbar_get_context_id().
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="95%" target="2.0">
|
||||||
|
<title>Decruft GtkProgress, GtkProgressbar</title>
|
||||||
|
<description>
|
||||||
|
<p>UPDATE: this is done, just need to apply the patch.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This interface is just a disaster of overcomplexity;
|
||||||
|
it should pretty much just be set_percentage(),
|
||||||
|
pulse() (to move during activity mode), and set_text().
|
||||||
|
There's no reason that there are two objects, should
|
||||||
|
just be one interface. Almost all the functions
|
||||||
|
that currently exist should be deprecated.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>hp@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Entry validation hooks</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Simple hooks for validation in a GtkEntry. Pretty much just a
|
||||||
|
"validate" callback which takes a string (current entry contents) and
|
||||||
|
returns either VALID, INVALID, or COULDBEVALID. Then the
|
||||||
|
GtkEntry calls this function if it's set, and does the appropriate
|
||||||
|
UI things. GTK should come with validators for int and float,
|
||||||
|
see GtkSpinButton where these are already implemented.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="0%" target="> 2.0">
|
||||||
|
<title>pseudo-MDI Widget</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Add a widget that lets you rearrange various views (similar to many
|
||||||
|
IDEs, like Visual SlickEdit or JBuilder). Basically there should be a
|
||||||
|
central slot and 4 slots around the sides; each slot holds one or more
|
||||||
|
views. If two views are dropped in the same slot, then a notebook is
|
||||||
|
created displaying both views. If a view is dropped outside the
|
||||||
|
application window, it becomes a standalone window. It should be
|
||||||
|
possible to restrict whether a view can be dropped on the sides,
|
||||||
|
horizontal/vertical sides only, in the central content area, or in
|
||||||
|
any of those places.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
(Havoc has a proposed interface for this, mail hp@redhat.com)
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="0%" target="> 2.0">
|
||||||
|
<title>Icon List Widget</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
A simple icon list widget, suitable for creating a file selector or
|
||||||
|
the like.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="0%" target="> 2.0">
|
||||||
|
<title>Dock widget</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Add a widget like GnomeDock (perhaps based on GnomeDock)
|
||||||
|
that allows people to put rearrangeable toolbars, menubars, etc.
|
||||||
|
around a central content area. The widget should have hooks for
|
||||||
|
saving the current positions of the various docked bars.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="big" status="0%" target="> 2.0">
|
||||||
|
<title>Canvas widget</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Figure out how to get GnomeCanvas or a derived work into GTK+ itself.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="40%" target="2.0">
|
||||||
|
<title>Menu scroll</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
When menus are bigger than the screen, allow scrolling
|
||||||
|
as on the Mac.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="20%" target="2.0">
|
||||||
|
<title>Toolbar/menubar wrap</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
When toolbars and menubars are too wide, do some sort of
|
||||||
|
wrapping or drop-down deal. (See Windows/Mac apps for examples.)
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Blink cursor in GtkEntry</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Make the cursor optionally blink in GtkEntry. Beware, the entry code
|
||||||
|
is somewhat in flux; mail Owen and ask.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>otaylor@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="100%" target="2.0">
|
||||||
|
<title>Don't highlight first menu item when menus come up</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Keep GtkMenu from prelighting the first menu item.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="100%" target="2.0">
|
||||||
|
<title>Integrate new color selector</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
There's a new color selector in CVS (module gnome-colorsel),
|
||||||
|
it needs to be folded in to GTK and any remaining issues resolved.
|
||||||
|
(This new selector is API-compatible with the old one, and
|
||||||
|
still called GtkColorSelector).
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="medium" status="70%" target="2.0">
|
||||||
|
<title>Write new font selector</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Pango introduces a new font handling system,
|
||||||
|
replacing the XLFD system. Need a font selector for this.
|
||||||
|
The XLFD selector should probably remain, for apps where
|
||||||
|
it makes sense (like gnome-terminal probably).
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Stack Widget</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
Jonathan has a widget like a tabless/frameless notebook, used for
|
||||||
|
something like the GNOME control center where you want to toggle which
|
||||||
|
widget is visible to the user. Needs to be cleaned up and considered
|
||||||
|
for GTK.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org, jrb@redhat.com</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
<entry size="small" status="0%" target="2.0">
|
||||||
|
<title>Clean up GtkNotebook</title>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GtkNotebook currently breaks GTK invariants about
|
||||||
|
mapping/visibility/etc., needs fixing.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<contact>gtk-devel-list@gnome.org</contact>
|
||||||
|
</entry>
|
||||||
|
|
||||||
|
</section> <!-- GTK+ -->
|
||||||
|
</todo>
|
||||||
|
|
66
acconfig.h
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
/* 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_DIRENT_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_SYS_SELECT_H
|
||||||
|
#undef HAVE_SYS_TIME_H
|
||||||
|
#undef HAVE_XCONVERTCASE
|
||||||
|
|
||||||
|
#undef NO_FD_SET
|
||||||
|
|
||||||
|
#undef RESOURCE_BASE
|
||||||
|
|
||||||
|
#undef USE_GMODULE
|
||||||
|
#undef USE_MMX
|
||||||
|
|
||||||
|
/* Define to use X11R6 additions to XIM */
|
||||||
|
#undef USE_X11R6_XIM
|
||||||
|
|
||||||
|
|
||||||
|
#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). */
|
768
acinclude.m4
Normal file
@@ -0,0 +1,768 @@
|
|||||||
|
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||||
|
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||||
|
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||||
|
##
|
||||||
|
## This program is free software; you can redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation; either version 2 of the License, or
|
||||||
|
## (at your option) any later version.
|
||||||
|
##
|
||||||
|
## This program is distributed in the hope that it will be useful, but
|
||||||
|
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
## General Public License for more details.
|
||||||
|
##
|
||||||
|
## You should have received a copy of the GNU General Public License
|
||||||
|
## along with this program; if not, write to the Free Software
|
||||||
|
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
##
|
||||||
|
## As a special exception to the GNU General Public License, if you
|
||||||
|
## distribute this file as part of a program that contains a
|
||||||
|
## configuration script generated by Autoconf, you may include it under
|
||||||
|
## the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# serial 40 AC_PROG_LIBTOOL
|
||||||
|
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||||
|
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||||
|
|
||||||
|
# Save cache, so that ltconfig can load it
|
||||||
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||||
|
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||||
|
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||||
|
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||||
|
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||||
|
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||||
|
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||||
|
|| AC_MSG_ERROR([libtool configure failed])
|
||||||
|
|
||||||
|
# Reload cache, that may have been modified by ltconfig
|
||||||
|
AC_CACHE_LOAD
|
||||||
|
|
||||||
|
# This can be used to rebuild libtool when needed
|
||||||
|
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||||
|
|
||||||
|
# Always use our own libtool.
|
||||||
|
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||||
|
AC_SUBST(LIBTOOL)dnl
|
||||||
|
|
||||||
|
# Redirect the config.log output again, so that the ltconfig log is not
|
||||||
|
# clobbered by the next message.
|
||||||
|
exec 5>>./config.log
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||||
|
[AC_PREREQ(2.13)dnl
|
||||||
|
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||||
|
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||||
|
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_LD])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_NM])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||||
|
dnl
|
||||||
|
|
||||||
|
case "$target" in
|
||||||
|
NONE) lt_target="$host" ;;
|
||||||
|
*) lt_target="$target" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Check for any special flags to pass to ltconfig.
|
||||||
|
libtool_flags="--cache-file=$cache_file"
|
||||||
|
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||||
|
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||||
|
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||||
|
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||||
|
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||||
|
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||||
|
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||||
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||||
|
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||||
|
AC_ARG_ENABLE(libtool-lock,
|
||||||
|
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||||
|
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||||
|
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||||
|
|
||||||
|
# Some flags need to be propagated to the compiler or linker for good
|
||||||
|
# libtool support.
|
||||||
|
case "$lt_target" in
|
||||||
|
*-*-irix6*)
|
||||||
|
# Find out which ABI we are using.
|
||||||
|
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||||
|
if AC_TRY_EVAL(ac_compile); then
|
||||||
|
case "`/usr/bin/file conftest.o`" in
|
||||||
|
*32-bit*)
|
||||||
|
LD="${LD-ld} -32"
|
||||||
|
;;
|
||||||
|
*N32*)
|
||||||
|
LD="${LD-ld} -n32"
|
||||||
|
;;
|
||||||
|
*64-bit*)
|
||||||
|
LD="${LD-ld} -64"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
rm -rf conftest*
|
||||||
|
;;
|
||||||
|
|
||||||
|
*-*-sco3.2v5*)
|
||||||
|
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||||
|
SAVE_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -belf"
|
||||||
|
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||||
|
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||||
|
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||||
|
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||||
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||||
|
[*-*-cygwin* | *-*-mingw*)
|
||||||
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||||
|
AC_CHECK_TOOL(AS, as, false)
|
||||||
|
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||||
|
;;
|
||||||
|
])
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||||
|
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||||
|
|
||||||
|
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||||
|
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||||
|
|
||||||
|
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||||
|
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||||
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||||
|
# `yes'.
|
||||||
|
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||||
|
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||||
|
AC_ARG_ENABLE(shared,
|
||||||
|
changequote(<<, >>)dnl
|
||||||
|
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||||
|
changequote([, ])dnl
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case "$enableval" in
|
||||||
|
yes) enable_shared=yes ;;
|
||||||
|
no) enable_shared=no ;;
|
||||||
|
*)
|
||||||
|
enable_shared=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_shared=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||||
|
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_ENABLE_SHARED(no)])
|
||||||
|
|
||||||
|
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||||
|
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||||
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||||
|
# `yes'.
|
||||||
|
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||||
|
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||||
|
AC_ARG_ENABLE(static,
|
||||||
|
changequote(<<, >>)dnl
|
||||||
|
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||||
|
changequote([, ])dnl
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case "$enableval" in
|
||||||
|
yes) enable_static=yes ;;
|
||||||
|
no) enable_static=no ;;
|
||||||
|
*)
|
||||||
|
enable_static=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_static=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||||
|
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_ENABLE_STATIC(no)])
|
||||||
|
|
||||||
|
|
||||||
|
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||||
|
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||||
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||||
|
# `yes'.
|
||||||
|
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||||
|
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||||
|
AC_ARG_ENABLE(fast-install,
|
||||||
|
changequote(<<, >>)dnl
|
||||||
|
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||||
|
changequote([, ])dnl
|
||||||
|
[p=${PACKAGE-default}
|
||||||
|
case "$enableval" in
|
||||||
|
yes) enable_fast_install=yes ;;
|
||||||
|
no) enable_fast_install=no ;;
|
||||||
|
*)
|
||||||
|
enable_fast_install=no
|
||||||
|
# Look at the argument we got. We use all the common list separators.
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_fast_install=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||||
|
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_ENABLE_FAST_INSTALL(no)])
|
||||||
|
|
||||||
|
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||||
|
AC_DEFUN(AC_PROG_LD,
|
||||||
|
[AC_ARG_WITH(gnu-ld,
|
||||||
|
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||||
|
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||||
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||||
|
ac_prog=ld
|
||||||
|
if test "$ac_cv_prog_gcc" = yes; then
|
||||||
|
# Check if gcc -print-prog-name=ld gives a path.
|
||||||
|
AC_MSG_CHECKING([for ld used by GCC])
|
||||||
|
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||||
|
case "$ac_prog" in
|
||||||
|
# Accept absolute paths.
|
||||||
|
changequote(,)dnl
|
||||||
|
[\\/]* | [A-Za-z]:[\\/]*)
|
||||||
|
re_direlt='/[^/][^/]*/\.\./'
|
||||||
|
changequote([,])dnl
|
||||||
|
# Canonicalize the path of ld
|
||||||
|
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||||
|
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||||
|
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||||
|
done
|
||||||
|
test -z "$LD" && LD="$ac_prog"
|
||||||
|
;;
|
||||||
|
"")
|
||||||
|
# If it fails, then pretend we aren't using GCC.
|
||||||
|
ac_prog=ld
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# If it is relative, then search for the first ld in PATH.
|
||||||
|
with_gnu_ld=unknown
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
elif test "$with_gnu_ld" = yes; then
|
||||||
|
AC_MSG_CHECKING([for GNU ld])
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING([for non-GNU ld])
|
||||||
|
fi
|
||||||
|
AC_CACHE_VAL(ac_cv_path_LD,
|
||||||
|
[if test -z "$LD"; then
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||||
|
for ac_dir in $PATH; do
|
||||||
|
test -z "$ac_dir" && ac_dir=.
|
||||||
|
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||||
|
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||||
|
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||||
|
# but apparently some GNU ld's only accept -v.
|
||||||
|
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||||
|
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||||
|
test "$with_gnu_ld" != no && break
|
||||||
|
else
|
||||||
|
test "$with_gnu_ld" != yes && break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
else
|
||||||
|
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||||
|
fi])
|
||||||
|
LD="$ac_cv_path_LD"
|
||||||
|
if test -n "$LD"; then
|
||||||
|
AC_MSG_RESULT($LD)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||||
|
AC_PROG_LD_GNU
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN(AC_PROG_LD_GNU,
|
||||||
|
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||||
|
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||||
|
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||||
|
ac_cv_prog_gnu_ld=yes
|
||||||
|
else
|
||||||
|
ac_cv_prog_gnu_ld=no
|
||||||
|
fi])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||||
|
AC_DEFUN(AC_PROG_NM,
|
||||||
|
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||||
|
AC_CACHE_VAL(ac_cv_path_NM,
|
||||||
|
[if test -n "$NM"; then
|
||||||
|
# Let the user override the test.
|
||||||
|
ac_cv_path_NM="$NM"
|
||||||
|
else
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||||
|
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||||
|
test -z "$ac_dir" && ac_dir=.
|
||||||
|
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||||
|
# Check to see if the nm accepts a BSD-compat flag.
|
||||||
|
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||||
|
# nm: unknown option "B" ignored
|
||||||
|
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||||
|
ac_cv_path_NM="$ac_dir/nm -B"
|
||||||
|
break
|
||||||
|
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||||
|
ac_cv_path_NM="$ac_dir/nm -p"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||||
|
continue # so that we can try to find one that supports BSD flags
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||||
|
fi])
|
||||||
|
NM="$ac_cv_path_NM"
|
||||||
|
AC_MSG_RESULT([$NM])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_CHECK_LIBM - check for math library
|
||||||
|
AC_DEFUN(AC_CHECK_LIBM,
|
||||||
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
LIBM=
|
||||||
|
case "$lt_target" in
|
||||||
|
*-*-beos* | *-*-cygwin*)
|
||||||
|
# These system don't have libm
|
||||||
|
;;
|
||||||
|
*-ncr-sysv4.3*)
|
||||||
|
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||||
|
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||||
|
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||||
|
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||||
|
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||||
|
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||||
|
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||||
|
# flat, and, if you're not using automake, define top_builddir as
|
||||||
|
# appropriate in the Makefiles.
|
||||||
|
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
case "$enable_ltdl_convenience" in
|
||||||
|
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||||
|
"") enable_ltdl_convenience=yes
|
||||||
|
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||||
|
esac
|
||||||
|
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||||
|
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||||
|
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||||
|
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||||
|
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||||
|
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||||
|
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||||
|
# flat, and, if you're not using automake, define top_builddir as
|
||||||
|
# appropriate in the Makefiles.
|
||||||
|
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||||
|
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_CHECK_LIB(ltdl, main,
|
||||||
|
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||||
|
[if test x"$enable_ltdl_install" = xno; then
|
||||||
|
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||||
|
else
|
||||||
|
enable_ltdl_install=yes
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test x"$enable_ltdl_install" = x"yes"; then
|
||||||
|
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||||
|
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||||
|
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||||
|
else
|
||||||
|
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||||
|
LIBLTDL="-lltdl"
|
||||||
|
INCLTDL=
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl old names
|
||||||
|
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||||
|
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||||
|
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||||
|
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||||
|
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||||
|
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||||
|
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||||
|
|
||||||
|
dnl This is just to silence aclocal about the macro not being used
|
||||||
|
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||||
|
|
||||||
|
# Macro to add for using GNU gettext.
|
||||||
|
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
|
#
|
||||||
|
# Modified to never use included libintl.
|
||||||
|
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This file can be copied and used freely without restrictions. It can
|
||||||
|
# be used in projects which are not available under the GNU Public License
|
||||||
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
|
# Please note that the actual code is *not* freely available.
|
||||||
|
|
||||||
|
# serial 5
|
||||||
|
|
||||||
|
AC_DEFUN(AM_GTK_WITH_NLS,
|
||||||
|
[AC_MSG_CHECKING([whether NLS is requested])
|
||||||
|
dnl Default is enabled NLS
|
||||||
|
AC_ARG_ENABLE(nls,
|
||||||
|
[ --disable-nls do not use Native Language Support],
|
||||||
|
USE_NLS=$enableval, USE_NLS=yes)
|
||||||
|
AC_MSG_RESULT($USE_NLS)
|
||||||
|
AC_SUBST(USE_NLS)
|
||||||
|
|
||||||
|
USE_INCLUDED_LIBINTL=no
|
||||||
|
|
||||||
|
dnl If we use NLS figure out what method
|
||||||
|
if test "$USE_NLS" = "yes"; then
|
||||||
|
# AC_DEFINE(ENABLE_NLS)
|
||||||
|
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||||
|
# AC_ARG_WITH(included-gettext,
|
||||||
|
# [ --with-included-gettext use the GNU gettext library included here],
|
||||||
|
# nls_cv_force_use_gnu_gettext=$withval,
|
||||||
|
# nls_cv_force_use_gnu_gettext=no)
|
||||||
|
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||||
|
nls_cv_force_use_gnu_gettext="no"
|
||||||
|
|
||||||
|
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||||
|
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||||
|
dnl User does not insist on using GNU NLS library. Figure out what
|
||||||
|
dnl to use. If gettext or catgets are available (in this order) we
|
||||||
|
dnl use this. Else we have to fall back to GNU NLS library.
|
||||||
|
dnl catgets is only used if permitted by option --with-catgets.
|
||||||
|
nls_cv_header_intl=
|
||||||
|
nls_cv_header_libgt=
|
||||||
|
CATOBJEXT=NONE
|
||||||
|
|
||||||
|
AC_CHECK_HEADER(libintl.h,
|
||||||
|
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||||
|
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
||||||
|
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
||||||
|
|
||||||
|
if test "$gt_cv_func_dgettext_libc" != "yes"; then
|
||||||
|
AC_CHECK_LIB(intl, bindtextdomain,
|
||||||
|
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||||
|
gt_cv_func_dgettext_libintl,
|
||||||
|
[AC_CHECK_LIB(intl, dgettext,
|
||||||
|
gt_cv_func_dgettext_libintl=yes,
|
||||||
|
gt_cv_func_dgettext_libintl=no)],
|
||||||
|
gt_cv_func_dgettext_libintl=no)])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||||
|
LIBS="$LIBS -lintl";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||||
|
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_GETTEXT)
|
||||||
|
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||||
|
if test "$MSGFMT" != "no"; then
|
||||||
|
AC_CHECK_FUNCS(dcgettext)
|
||||||
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
|
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||||
|
return _nl_msg_cat_cntr],
|
||||||
|
[CATOBJEXT=.gmo
|
||||||
|
DATADIRNAME=share],
|
||||||
|
[CATOBJEXT=.mo
|
||||||
|
DATADIRNAME=lib])
|
||||||
|
INSTOBJEXT=.mo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Added by Martin Baulig 12/15/98 for libc5 systems
|
||||||
|
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||||
|
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||||
|
INTLLIBS=-lintl
|
||||||
|
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "$CATOBJEXT" = "NONE"; then
|
||||||
|
AC_MSG_CHECKING([whether catgets can be used])
|
||||||
|
AC_ARG_WITH(catgets,
|
||||||
|
[ --with-catgets use catgets functions if available],
|
||||||
|
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||||
|
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||||
|
|
||||||
|
if test "$nls_cv_use_catgets" = "yes"; then
|
||||||
|
dnl No gettext in C library. Try catgets next.
|
||||||
|
AC_CHECK_LIB(i, main)
|
||||||
|
AC_CHECK_FUNC(catgets,
|
||||||
|
[AC_DEFINE(HAVE_CATGETS)
|
||||||
|
INTLOBJS="\$(CATOBJS)"
|
||||||
|
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||||
|
# if test "$GENCAT" != "no"; then
|
||||||
|
# AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||||
|
# if test "$GMSGFMT" = "no"; then
|
||||||
|
# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||||
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||||
|
# fi
|
||||||
|
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
|
# USE_INCLUDED_LIBINTL=yes
|
||||||
|
# CATOBJEXT=.cat
|
||||||
|
# INSTOBJEXT=.cat
|
||||||
|
# DATADIRNAME=lib
|
||||||
|
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||||
|
# INTLLIBS=$INTLDEPS
|
||||||
|
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||||
|
# nls_cv_header_intl=intl/libintl.h
|
||||||
|
# nls_cv_header_libgt=intl/libgettext.h
|
||||||
|
# fi
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$CATOBJEXT" = "NONE"; then
|
||||||
|
dnl Neither gettext nor catgets in included in the C library.
|
||||||
|
dnl Fall back on GNU gettext library.
|
||||||
|
nls_cv_use_gnu_gettext=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$nls_cv_use_gnu_gettext" != "yes"; then
|
||||||
|
AC_DEFINE(ENABLE_NLS)
|
||||||
|
else
|
||||||
|
# Unset this variable since we use the non-zero value as a flag.
|
||||||
|
CATOBJEXT=
|
||||||
|
# dnl Mark actions used to generate GNU NLS library.
|
||||||
|
# INTLOBJS="\$(GETTOBJS)"
|
||||||
|
# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||||
|
# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
|
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
|
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
|
# AC_SUBST(MSGFMT)
|
||||||
|
# USE_INCLUDED_LIBINTL=yes
|
||||||
|
# CATOBJEXT=.gmo
|
||||||
|
# INSTOBJEXT=.mo
|
||||||
|
# DATADIRNAME=share
|
||||||
|
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||||
|
# INTLLIBS=$INTLDEPS
|
||||||
|
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||||
|
# nls_cv_header_intl=intl/libintl.h
|
||||||
|
# nls_cv_header_libgt=intl/libgettext.h
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Test whether we really found GNU xgettext.
|
||||||
|
if test "$XGETTEXT" != ":"; then
|
||||||
|
dnl If it is no GNU xgettext we define it as : so that the
|
||||||
|
dnl Makefiles still can work.
|
||||||
|
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||||
|
: ;
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(
|
||||||
|
[found xgettext program is not GNU xgettext; ignore it])
|
||||||
|
XGETTEXT=":"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We need to process the po/ directory.
|
||||||
|
POSUB=po
|
||||||
|
else
|
||||||
|
DATADIRNAME=share
|
||||||
|
nls_cv_header_intl=intl/libintl.h
|
||||||
|
nls_cv_header_libgt=intl/libgettext.h
|
||||||
|
fi
|
||||||
|
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||||
|
AC_OUTPUT_COMMANDS(
|
||||||
|
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||||
|
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||||
|
esac])
|
||||||
|
|
||||||
|
|
||||||
|
# # If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||||
|
# # because some of the sources are only built for this goal.
|
||||||
|
# if test "$PACKAGE" = gettext; then
|
||||||
|
# USE_NLS=yes
|
||||||
|
# USE_INCLUDED_LIBINTL=yes
|
||||||
|
# fi
|
||||||
|
|
||||||
|
dnl These rules are solely for the distribution goal. While doing this
|
||||||
|
dnl we only have to keep exactly one list of the available catalogs
|
||||||
|
dnl in configure.in.
|
||||||
|
for lang in $ALL_LINGUAS; do
|
||||||
|
GMOFILES="$GMOFILES $lang.gmo"
|
||||||
|
POFILES="$POFILES $lang.po"
|
||||||
|
done
|
||||||
|
|
||||||
|
dnl Make all variables we use known to autoconf.
|
||||||
|
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||||
|
AC_SUBST(CATALOGS)
|
||||||
|
AC_SUBST(CATOBJEXT)
|
||||||
|
AC_SUBST(DATADIRNAME)
|
||||||
|
AC_SUBST(GMOFILES)
|
||||||
|
AC_SUBST(INSTOBJEXT)
|
||||||
|
AC_SUBST(INTLDEPS)
|
||||||
|
AC_SUBST(INTLLIBS)
|
||||||
|
AC_SUBST(INTLOBJS)
|
||||||
|
AC_SUBST(POFILES)
|
||||||
|
AC_SUBST(POSUB)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN(AM_GTK_GNU_GETTEXT,
|
||||||
|
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||||
|
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||||
|
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||||
|
AC_REQUIRE([AC_C_CONST])dnl
|
||||||
|
AC_REQUIRE([AC_C_INLINE])dnl
|
||||||
|
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||||
|
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||||
|
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||||
|
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||||
|
unistd.h sys/param.h])
|
||||||
|
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||||
|
strdup __argz_count __argz_stringify __argz_next])
|
||||||
|
|
||||||
|
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||||
|
AC_CHECK_FUNCS(stpcpy)
|
||||||
|
fi
|
||||||
|
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_STPCPY)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_LC_MESSAGES
|
||||||
|
AM_GTK_WITH_NLS
|
||||||
|
|
||||||
|
if test "x$CATOBJEXT" != "x"; then
|
||||||
|
if test "x$ALL_LINGUAS" = "x"; then
|
||||||
|
LINGUAS=
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING(for catalogs to be installed)
|
||||||
|
NEW_LINGUAS=
|
||||||
|
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||||
|
case "$ALL_LINGUAS" in
|
||||||
|
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
LINGUAS=$NEW_LINGUAS
|
||||||
|
AC_MSG_RESULT($LINGUAS)
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Construct list of names of catalog files to be constructed.
|
||||||
|
if test -n "$LINGUAS"; then
|
||||||
|
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||||
|
dnl must be resolved because we cannot expect the users of this
|
||||||
|
dnl to define HAVE_LOCALE_H.
|
||||||
|
if test $ac_cv_header_locale_h = yes; then
|
||||||
|
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||||
|
else
|
||||||
|
INCLUDE_LOCALE_H="\
|
||||||
|
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||||
|
fi
|
||||||
|
AC_SUBST(INCLUDE_LOCALE_H)
|
||||||
|
|
||||||
|
dnl Determine which catalog format we have (if any is needed)
|
||||||
|
dnl For now we know about two different formats:
|
||||||
|
dnl Linux libc-5 and the normal X/Open format
|
||||||
|
test -d intl || mkdir intl
|
||||||
|
if test "$CATOBJEXT" = ".cat"; then
|
||||||
|
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||||
|
|
||||||
|
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||||
|
dnl cannot handle comments.
|
||||||
|
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||||
|
fi
|
||||||
|
dnl po2tbl.sed is always needed.
|
||||||
|
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||||
|
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||||
|
|
||||||
|
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||||
|
dnl only sense for gettext. We comment this out for non-gettext
|
||||||
|
dnl packages.
|
||||||
|
if test "$PACKAGE" = "gettext"; then
|
||||||
|
GT_NO="#NO#"
|
||||||
|
GT_YES=
|
||||||
|
else
|
||||||
|
GT_NO=
|
||||||
|
GT_YES="#YES#"
|
||||||
|
fi
|
||||||
|
AC_SUBST(GT_NO)
|
||||||
|
AC_SUBST(GT_YES)
|
||||||
|
|
||||||
|
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||||
|
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||||
|
dnl Try to locate is.
|
||||||
|
MKINSTALLDIRS=
|
||||||
|
if test -n "$ac_aux_dir"; then
|
||||||
|
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||||
|
fi
|
||||||
|
if test -z "$MKINSTALLDIRS"; then
|
||||||
|
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||||
|
fi
|
||||||
|
AC_SUBST(MKINSTALLDIRS)
|
||||||
|
|
||||||
|
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||||
|
l=
|
||||||
|
AC_SUBST(l)
|
||||||
|
|
||||||
|
dnl Generate list of files to be processed by xgettext which will
|
||||||
|
dnl be included in po/Makefile.
|
||||||
|
test -d po || mkdir po
|
||||||
|
if test "x$srcdir" != "x."; then
|
||||||
|
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||||
|
posrcprefix="$srcdir/"
|
||||||
|
else
|
||||||
|
posrcprefix="../$srcdir/"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
posrcprefix="../"
|
||||||
|
fi
|
||||||
|
rm -f po/POTFILES
|
||||||
|
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||||
|
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||||
|
])
|
||||||
|
|
92
autogen.sh
Executable file
@@ -0,0 +1,92 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo
|
||||||
|
echo "You must have autoconf installed to compile $PROJECT."
|
||||||
|
echo "Download the appropriate package for your distribution,"
|
||||||
|
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||||
|
DIE=1
|
||||||
|
}
|
||||||
|
|
||||||
|
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
|
echo
|
||||||
|
echo "You must have automake installed to compile $PROJECT."
|
||||||
|
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
|
||||||
|
echo "(or a newer version if it is available)"
|
||||||
|
DIE=1
|
||||||
|
}
|
||||||
|
|
||||||
|
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 "$*"; 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
|
||||||
|
|
||||||
|
case $CC in
|
||||||
|
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test -z "$ACLOCAL_FLAGS"; then
|
||||||
|
|
||||||
|
acdir=`aclocal --print-ac-dir`
|
||||||
|
m4list="glib.m4 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
|
||||||
|
|
||||||
|
echo "Running gettextize... Ignore non-fatal messages."
|
||||||
|
# Hmm, we specify --force here, since otherwise things dont'
|
||||||
|
# get added reliably, but we don't want to overwrite intl
|
||||||
|
# while making dist.
|
||||||
|
echo "no" | gettextize --copy --force
|
||||||
|
|
||||||
|
#
|
||||||
|
# Really bad hack
|
||||||
|
echo "Munging po/Makefile.in.in"
|
||||||
|
sed s%@PACKAGE@%@GETTEXT_PACKAGE@% < po/Makefile.in.in > po/Makefile.in.in.new
|
||||||
|
mv po/Makefile.in.in.new po/Makefile.in.in
|
||||||
|
|
||||||
|
aclocal $ACLOCAL_FLAGS
|
||||||
|
|
||||||
|
# optionally feature autoheader
|
||||||
|
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
||||||
|
|
||||||
|
automake -a $am_opt
|
||||||
|
autoconf
|
||||||
|
cd $ORIGDIR
|
||||||
|
|
||||||
|
$srcdir/configure --enable-maintainer-mode "$@"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Now type 'make' to compile $PROJECT."
|
@@ -1,118 +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" : "autotools",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--disable-documentation"
|
|
||||||
],
|
|
||||||
"sources" : [
|
|
||||||
{
|
|
||||||
"type" : "git",
|
|
||||||
"url" : "https://github.com/wayland-project/wayland.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "graphene",
|
|
||||||
"buildsystem" : "meson",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--libdir=/app/lib",
|
|
||||||
"-Dtests=false",
|
|
||||||
"-Dbenchmarks=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" : "gtk",
|
|
||||||
"buildsystem" : "meson",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--libdir=/app/lib",
|
|
||||||
"-Denable_vulkan=no",
|
|
||||||
"-Dbuildtype=debugoptimized"
|
|
||||||
],
|
|
||||||
"sources" : [
|
|
||||||
{
|
|
||||||
"type" : "git",
|
|
||||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"build-options" : {
|
|
||||||
"env" : {
|
|
||||||
"GSK_RENDERER" : "opengl"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,117 +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" : "autotools",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--disable-documentation"
|
|
||||||
],
|
|
||||||
"sources" : [
|
|
||||||
{
|
|
||||||
"type" : "git",
|
|
||||||
"url" : "https://github.com/wayland-project/wayland.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "graphene",
|
|
||||||
"buildsystem" : "meson",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--libdir=/app/lib",
|
|
||||||
"-Dtests=false",
|
|
||||||
"-Dbenchmarks=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" : "gtk",
|
|
||||||
"buildsystem" : "meson",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--libdir=/app/lib",
|
|
||||||
"-Denable_vulkan=no",
|
|
||||||
"-Dbuildtype=debugoptimized"
|
|
||||||
],
|
|
||||||
"sources" : [
|
|
||||||
{
|
|
||||||
"type" : "git",
|
|
||||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"build-options" : {
|
|
||||||
"env" : {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,121 +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" : "autotools",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--disable-documentation"
|
|
||||||
],
|
|
||||||
"sources" : [
|
|
||||||
{
|
|
||||||
"type" : "git",
|
|
||||||
"url" : "https://github.com/wayland-project/wayland.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "graphene",
|
|
||||||
"buildsystem" : "meson",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--libdir=/app/lib",
|
|
||||||
"-Dtests=false",
|
|
||||||
"-Dbenchmarks=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" : "gtk",
|
|
||||||
"buildsystem" : "meson",
|
|
||||||
"builddir" : true,
|
|
||||||
"config-opts" : [
|
|
||||||
"--libdir=/app/lib",
|
|
||||||
"-Denable_vulkan=no",
|
|
||||||
"-Dbuildtype=debugoptimized"
|
|
||||||
],
|
|
||||||
"sources" : [
|
|
||||||
{
|
|
||||||
"type" : "git",
|
|
||||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"build-options" : {
|
|
||||||
"env" : {
|
|
||||||
"DBUS_SESSION_BUS_ADDRESS" : "''",
|
|
||||||
"GSK_RENDERER" : "opengl",
|
|
||||||
"GDK_DEBUG" : "vulkan-disable",
|
|
||||||
"G_ENABLE_DEBUG" : "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
if 'DESTDIR' not in os.environ:
|
|
||||||
gtk_api_version = sys.argv[1]
|
|
||||||
gtk_abi_version = sys.argv[2]
|
|
||||||
gtk_libdir = sys.argv[3]
|
|
||||||
gtk_datadir = sys.argv[4]
|
|
||||||
|
|
||||||
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
|
|
||||||
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
|
|
||||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
|
||||||
|
|
||||||
print('Compiling GSettings schemas...')
|
|
||||||
glib_compile_schemas = subprocess.check_output(['pkg-config',
|
|
||||||
'--variable=glib_compile_schemas',
|
|
||||||
'gio-2.0']).strip()
|
|
||||||
if not os.path.exists(glib_compile_schemas):
|
|
||||||
# pkg-config variables only available since GLib 2.62.0.
|
|
||||||
glib_compile_schemas = 'glib-compile-schemas'
|
|
||||||
subprocess.call([glib_compile_schemas,
|
|
||||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
|
||||||
|
|
||||||
print('Updating icon cache...')
|
|
||||||
subprocess.call(['gtk4-update-icon-cache', '-q', '-t' ,'-f',
|
|
||||||
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
|
||||||
|
|
||||||
print('Updating module cache for print backends...')
|
|
||||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
|
||||||
gio_querymodules = subprocess.check_output(['pkg-config',
|
|
||||||
'--variable=gio_querymodules',
|
|
||||||
'gio-2.0']).strip()
|
|
||||||
if not os.path.exists(gio_querymodules):
|
|
||||||
# pkg-config variables only available since GLib 2.62.0.
|
|
||||||
gio_querymodules = 'gio-querymodules'
|
|
||||||
subprocess.call([gio_querymodules, gtk_printmodule_dir])
|
|
||||||
|
|
||||||
print('Updating module cache for input methods...')
|
|
||||||
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
|
||||||
subprocess.call([gio_querymodules, gtk_immodule_dir])
|
|
1121
config.guess
vendored
Executable file
280
config.h.meson
@@ -1,280 +0,0 @@
|
|||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* always defined to indicate that i18n is enabled */
|
|
||||||
#define ENABLE_NLS 1
|
|
||||||
|
|
||||||
/* The prefix for our gettext translation domains. */
|
|
||||||
#mesondefine GETTEXT_PACKAGE
|
|
||||||
|
|
||||||
/* Disable deprecation warnings from glib */
|
|
||||||
#mesondefine GLIB_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
|
|
||||||
/* Define the location where the catalogs will be installed */
|
|
||||||
#mesondefine GTK_LOCALEDIR
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
|
||||||
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
|
|
||||||
|
|
||||||
/* Have the cloudproviders library */
|
|
||||||
#mesondefine HAVE_CLOUDPROVIDERS
|
|
||||||
|
|
||||||
/* define if we have colord */
|
|
||||||
#mesondefine HAVE_COLORD
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
|
||||||
#mesondefine HAVE_CRT_EXTERNS_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `dcgettext' function. */
|
|
||||||
#mesondefine HAVE_DCGETTEXT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
||||||
#mesondefine HAVE_DLFCN_H
|
|
||||||
|
|
||||||
/* Have the ffmpeg library */
|
|
||||||
#mesondefine HAVE_FFMPEG
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <ftw.h> header file. */
|
|
||||||
#mesondefine HAVE_FTW_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `getpagesize' function. */
|
|
||||||
#mesondefine HAVE_GETPAGESIZE
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `getresuid' function. */
|
|
||||||
#mesondefine HAVE_GETRESUID
|
|
||||||
|
|
||||||
/* Define if gio-unix is available */
|
|
||||||
#mesondefine HAVE_GIO_UNIX
|
|
||||||
|
|
||||||
/* Define if GStreamer support is available */
|
|
||||||
#mesondefine HAVE_GSTREAMER
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#mesondefine HAVE_INTTYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `IPrintDialogCallback'. */
|
|
||||||
#mesondefine HAVE_IPRINTDIALOGCALLBACK
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <locale.h> header file. */
|
|
||||||
#mesondefine HAVE_LOCALE_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `lstat' function. */
|
|
||||||
#mesondefine HAVE_LSTAT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mallinfo' function. */
|
|
||||||
#mesondefine HAVE_MALLINFO
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#mesondefine HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkstemp' function. */
|
|
||||||
#mesondefine HAVE_MKSTEMP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mlock` function. */
|
|
||||||
#mesondefine HAVE_MLOCK
|
|
||||||
|
|
||||||
/* Define to 1 if you have a working `mmap' system call. */
|
|
||||||
#mesondefine HAVE_MMAP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `posix_fallocate' function. */
|
|
||||||
#mesondefine HAVE_POSIX_FALLOCATE
|
|
||||||
|
|
||||||
/* Have the Xrandr extension library */
|
|
||||||
#mesondefine HAVE_RANDR
|
|
||||||
|
|
||||||
/* Have the Xrandr 1.5 extension library */
|
|
||||||
#mesondefine HAVE_RANDR15
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `sincos' function. */
|
|
||||||
#mesondefine HAVE_SINCOS
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#mesondefine HAVE_STDINT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#mesondefine HAVE_STDLIB_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#mesondefine HAVE_STRINGS_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#mesondefine HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_MMAN_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_PARAM_H
|
|
||||||
|
|
||||||
/* Have the sysprof-capture library */
|
|
||||||
#mesondefine HAVE_SYSPROF
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_STAT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_TIME_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_TYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#mesondefine HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* Have the XCOMPOSITE X extension */
|
|
||||||
#mesondefine HAVE_XCOMPOSITE
|
|
||||||
|
|
||||||
/* Have the Xcursor library */
|
|
||||||
#mesondefine HAVE_XCURSOR
|
|
||||||
|
|
||||||
/* Have the XDAMAGE X extension */
|
|
||||||
#mesondefine HAVE_XDAMAGE
|
|
||||||
|
|
||||||
/* Have the XFIXES X extension */
|
|
||||||
#mesondefine HAVE_XFIXES
|
|
||||||
|
|
||||||
/* Define to 1 if XFree Xinerama is available */
|
|
||||||
#mesondefine HAVE_XFREE_XINERAMA
|
|
||||||
|
|
||||||
/* Have XGenericEvent */
|
|
||||||
#mesondefine HAVE_XGENERICEVENTS
|
|
||||||
|
|
||||||
/* Define to use XKB extension */
|
|
||||||
#mesondefine HAVE_XKB
|
|
||||||
|
|
||||||
/* Have the SYNC extension library */
|
|
||||||
#mesondefine HAVE_XSYNC
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `_lock_file' function */
|
|
||||||
#mesondefine HAVE__LOCK_FILE
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `flockfile' function */
|
|
||||||
#mesondefine HAVE_FLOCKFILE
|
|
||||||
|
|
||||||
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
|
|
||||||
#mesondefine HAVE__NL_MEASUREMENT_MEASUREMENT
|
|
||||||
|
|
||||||
/* Define if _NL_PAPER_HEIGHT is available */
|
|
||||||
#mesondefine HAVE__NL_PAPER_HEIGHT
|
|
||||||
|
|
||||||
/* Define if _NL_PAPER_WIDTH is available */
|
|
||||||
#mesondefine HAVE__NL_PAPER_WIDTH
|
|
||||||
|
|
||||||
/* Define if _NL_TIME_FIRST_WEEKDAY is available */
|
|
||||||
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
|
|
||||||
|
|
||||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
|
||||||
#mesondefine LT_OBJDIR
|
|
||||||
|
|
||||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
|
||||||
#mesondefine NO_MINUS_C_MINUS_O
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#mesondefine PACKAGE_BUGREPORT
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#mesondefine PACKAGE_NAME
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#mesondefine PACKAGE_STRING
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#mesondefine PACKAGE_TARNAME
|
|
||||||
|
|
||||||
/* Define to the home page for this package. */
|
|
||||||
#mesondefine PACKAGE_URL
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#mesondefine PACKAGE_VERSION
|
|
||||||
|
|
||||||
/* Use NSBundle functions to determine load paths for libraries, translations,
|
|
||||||
etc. */
|
|
||||||
#mesondefine QUARTZ_RELOCATION
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
#mesondefine STDC_HEADERS
|
|
||||||
|
|
||||||
/* Enable extensions on AIX 3, Interix. */
|
|
||||||
#ifndef _ALL_SOURCE
|
|
||||||
# undef _ALL_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable GNU extensions on systems that have them. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable threading extensions on Solaris. */
|
|
||||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
# undef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
#endif
|
|
||||||
/* Enable extensions on HP NonStop. */
|
|
||||||
#ifndef _TANDEM_SOURCE
|
|
||||||
# undef _TANDEM_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable general extensions on Solaris. */
|
|
||||||
#ifndef __EXTENSIONS__
|
|
||||||
# undef __EXTENSIONS__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if XInput 2.2 is available */
|
|
||||||
#mesondefine XINPUT_2_2
|
|
||||||
|
|
||||||
/* Define to 1 if the X Window System is missing or not being used. */
|
|
||||||
#mesondefine X_DISPLAY_MISSING
|
|
||||||
|
|
||||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
|
||||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
|
||||||
# define _DARWIN_USE_64_BIT_INODE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
|
||||||
#mesondefine _FILE_OFFSET_BITS
|
|
||||||
|
|
||||||
/* defines how to decorate public symbols while building */
|
|
||||||
#mesondefine _GDK_EXTERN
|
|
||||||
|
|
||||||
/* Define for large files, on AIX-style hosts. */
|
|
||||||
#mesondefine _LARGE_FILES
|
|
||||||
|
|
||||||
/* Define to 1 if on MINIX. */
|
|
||||||
#mesondefine _MINIX
|
|
||||||
|
|
||||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
|
||||||
this defined. */
|
|
||||||
#mesondefine _POSIX_1_SOURCE
|
|
||||||
|
|
||||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
|
||||||
#mesondefine _POSIX_SOURCE
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#mesondefine gid_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#mesondefine uid_t
|
|
||||||
|
|
||||||
/* Define to 1 if linux/memfd.h exists */
|
|
||||||
#mesondefine HAVE_LINUX_MEMFD_H
|
|
||||||
|
|
||||||
#mesondefine HAVE_LINUX_INPUT_H
|
|
||||||
|
|
||||||
#mesondefine HAVE_DEV_EVDEV_INPUT_H
|
|
||||||
|
|
||||||
#mesondefine GTK_SYSCONFDIR
|
|
||||||
|
|
||||||
#mesondefine GTK_LOCALEDIR
|
|
||||||
|
|
||||||
#mesondefine GTK_DATADIR
|
|
||||||
|
|
||||||
#mesondefine GTK_LIBDIR
|
|
||||||
|
|
||||||
#mesondefine GTK_PRINT_BACKENDS
|
|
||||||
|
|
||||||
#mesondefine HAVE_CAIRO_SCRIPT_INTERPRETER
|
|
||||||
|
|
||||||
#mesondefine HAVE_HARFBUZZ
|
|
||||||
|
|
||||||
#mesondefine HAVE_PANGOFT
|
|
||||||
|
|
||||||
#mesondefine ISO_CODES_PREFIX
|
|
||||||
|
|
||||||
/* Define if tracker3 is available */
|
|
||||||
#mesondefine HAVE_TRACKER3
|
|
199
config.h.win32
Executable file
@@ -0,0 +1,199 @@
|
|||||||
|
/* config.h.win32. Handcrafted for Microsoft C and gcc -mno-cygwin */
|
||||||
|
|
||||||
|
#if ! (defined(_MSC_VER) || defined(__GNUC__))
|
||||||
|
#error Unrecognized Win32 compiler, edit config.h.win32 by hand
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define if using alloca.c. */
|
||||||
|
/* #undef C_ALLOCA */
|
||||||
|
|
||||||
|
/* Define to empty if the keyword does not work. */
|
||||||
|
/* #undef const */
|
||||||
|
|
||||||
|
/* 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 you have alloca, as a function or macro. */
|
||||||
|
#define HAVE_ALLOCA 1
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define alloca _alloca
|
||||||
|
#elif defined (__GNUC__)
|
||||||
|
#define alloca __builtin_alloca
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||||
|
/* #undef HAVE_ALLOCA_H */
|
||||||
|
|
||||||
|
/* Define if you have a working `mmap' system call. */
|
||||||
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
|
/* Define to empty, or __inline if that's what your compiler wants. */
|
||||||
|
#define inline __inline
|
||||||
|
|
||||||
|
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||||
|
/* #undef off_t */
|
||||||
|
|
||||||
|
/* Define if you need to in order for stat and other things to work. */
|
||||||
|
/* #undef _POSIX_SOURCE*/
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (int or void). */
|
||||||
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||||
|
/* #undef size_t */
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/* Other stuff */
|
||||||
|
#define ENABLE_NLS 1
|
||||||
|
#define GTK_COMPILED_WITH_DEBUGGING "minimum"
|
||||||
|
|
||||||
|
/* #undef HAVE_CATGETS */
|
||||||
|
/* #undef HAVE_DIRENT_H */
|
||||||
|
#define HAVE_GETTEXT 1
|
||||||
|
/* #undef HAVE_IPC_H */
|
||||||
|
/* #undef HAVE_LC_MESSAGES */
|
||||||
|
/* #undef HAVE_PWD_H */
|
||||||
|
/* #undef HAVE_SHM_H */
|
||||||
|
/* #undef HAVE_STPCPY */
|
||||||
|
/* #undef HAVE_XSHM_H */
|
||||||
|
#define HAVE_SHAPE_EXT 1
|
||||||
|
/* #undef HAVE_SYS_SELECT_H */
|
||||||
|
/* #undef HAVE_SYS_TIME_H */
|
||||||
|
/* #undef HAVE_XCONVERTCASE */
|
||||||
|
|
||||||
|
/* #undef NO_FD_SET */
|
||||||
|
|
||||||
|
/* #undef XINPUT_NONE */
|
||||||
|
/* #undef XINPUT_GXI */
|
||||||
|
/* #undef XINPUT_XFREE */
|
||||||
|
#define XINPUT_WIN32 1
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (int or void). */
|
||||||
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
|
/* 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 if you have the broken_wctype function. */
|
||||||
|
/* #undef HAVE_BROKEN_WCTYPE */
|
||||||
|
|
||||||
|
/* Define if you have the dcgettext function. */
|
||||||
|
/* #undef HAVE_DCGETTEXT */
|
||||||
|
|
||||||
|
/* Define if you have the getcwd function. */
|
||||||
|
#define HAVE_GETCWD 1
|
||||||
|
|
||||||
|
/* Define if you have the getpagesize function. */
|
||||||
|
#define HAVE_GETPAGESIZE 1
|
||||||
|
|
||||||
|
/* Define if you have the lstat function. */
|
||||||
|
/* #undef HAVE_LSTAT */
|
||||||
|
|
||||||
|
/* Define if you have the munmap function. */
|
||||||
|
/* #undef HAVE_MUNMAP */
|
||||||
|
|
||||||
|
/* Define if you have the putenv function. */
|
||||||
|
#define HAVE_PUTENV 1
|
||||||
|
#define putenv _putenv
|
||||||
|
|
||||||
|
/* 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 stpcpy function. */
|
||||||
|
/* #undef HAVE_STPCPY */
|
||||||
|
|
||||||
|
/* Define if you have the strcasecmp function. */
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
#define strcasecmp _stricmp
|
||||||
|
|
||||||
|
/* 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 <argz.h> header file. */
|
||||||
|
/* #undef HAVE_ARGZ_H */
|
||||||
|
|
||||||
|
/* Define if you have the <dirent.h> header file. */
|
||||||
|
/* #undef HAVE_DIRENT_H */
|
||||||
|
|
||||||
|
/* 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 <malloc.h> header file. */
|
||||||
|
#define HAVE_MALLOC_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <nl_types.h> header file. */
|
||||||
|
/* #undef HAVE_NL_TYPES_H */
|
||||||
|
|
||||||
|
/* Define if you have the <pwd.h> header file. */
|
||||||
|
/* #undef HAVE_PWD_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/time.h> header file. */
|
||||||
|
/* #undef HAVE_SYS_TIME_H */
|
||||||
|
|
||||||
|
/* Define if you have the <unistd.h> header file. */
|
||||||
|
/* #undef HAVE_UNISTD_H */
|
||||||
|
|
||||||
|
/* Define if you have the <wchar.h> header file. */
|
||||||
|
#define HAVE_WCHAR_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <wctype.h> header file. */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define HAVE_WCTYPE_H 1
|
||||||
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
|
/* Define if you have the i library (-li). */
|
||||||
|
/* #undef HAVE_LIBI */
|
||||||
|
|
||||||
|
/* Define if you have the intl library (-lintl). */
|
||||||
|
#define HAVE_LIBINTL 1
|
||||||
|
|
||||||
|
/* define if compiled symbols have a leading underscore */
|
||||||
|
/* #undef WITH_SYMBOL_UNDERSCORE */
|
||||||
|
|
||||||
|
/* Define if you have the Wintab programmer's kit */
|
||||||
|
#define HAVE_WINTAB 1
|
||||||
|
|
||||||
|
/* Define if you have the <dimm.h> header file
|
||||||
|
* (available in the Platform SDK)
|
||||||
|
*/
|
||||||
|
/* #define HAVE_DIMM_H 1 */
|
||||||
|
|
||||||
|
#define USE_GMODULE 1
|
||||||
|
#define USE_MMX 1
|
||||||
|
|
||||||
|
/* #undef HAVE_SIGSETJMP */
|
||||||
|
|
||||||
|
#define GETTEXT_PACKAGE "gtk20"
|
1232
config.sub
vendored
Executable file
1037
configure.in
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#DEBHELPER#
|
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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ldconfig
|
||||||
|
|
||||||
|
#DEBHELPER#
|
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
|
9
demos/.cvsignore
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
.libs
|
||||||
|
.deps
|
||||||
|
testanimation
|
||||||
|
testpixbuf-drawable
|
||||||
|
testpixbuf-scale
|
||||||
|
testpixbuf
|
||||||
|
pixbuf-demo
|
67
demos/Makefile.am
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
## Makefile.am for gtk+/demos
|
||||||
|
|
||||||
|
INCLUDES = @STRIP_BEGIN@ \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_builddir)/gdk \
|
||||||
|
-DGTK_DISABLE_COMPAT_H \
|
||||||
|
@GTK_DEBUG_FLAGS@ \
|
||||||
|
@GTK_XIM_FLAGS@ \
|
||||||
|
@GTK_LOCALE_FLAGS@ \
|
||||||
|
@PANGO_CFLAGS@ \
|
||||||
|
@GLIB_CFLAGS@ \
|
||||||
|
@more_cflags@ \
|
||||||
|
@STRIP_END@
|
||||||
|
|
||||||
|
DEPS = \
|
||||||
|
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
|
||||||
|
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||||
|
$(top_builddir)/gtk/@gtktargetlib@
|
||||||
|
|
||||||
|
LDADDS = @STRIP_BEGIN@ \
|
||||||
|
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-1.3.la \
|
||||||
|
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||||
|
$(top_builddir)/gtk/@gtktargetlib@ \
|
||||||
|
@more_ldflags@ \
|
||||||
|
@more_libs@ \
|
||||||
|
@GDK_WLIBS@ \
|
||||||
|
@PANGO_LIBS@ \
|
||||||
|
@GLIB_LIBS@ \
|
||||||
|
@GTK_LIBS_EXTRA@ \
|
||||||
|
-lm \
|
||||||
|
@STRIP_END@
|
||||||
|
|
||||||
|
noinst_PROGRAMS = \
|
||||||
|
testpixbuf \
|
||||||
|
testpixbuf-drawable \
|
||||||
|
testanimation \
|
||||||
|
testpixbuf-scale \
|
||||||
|
pixbuf-demo
|
||||||
|
|
||||||
|
testpixbuf_DEPENDENCIES = $(DEPS)
|
||||||
|
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
|
||||||
|
testpixbuf_scale_DEPENDENCIES = $(DEPS)
|
||||||
|
testanimation_DEPENDENCIES = $(DEPS)
|
||||||
|
pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||||
|
|
||||||
|
testpixbuf_LDADD = $(LDADDS)
|
||||||
|
testpixbuf_drawable_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_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
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 22 KiB 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,654 +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;
|
|
||||||
|
|
||||||
item = g_list_model_get_item (list, i);
|
|
||||||
constraint = GTK_CONSTRAINT (item);
|
|
||||||
|
|
||||||
target = gtk_constraint_get_target (constraint);
|
|
||||||
source = gtk_constraint_get_source (constraint);
|
|
||||||
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),
|
|
||||||
gtk_constraint_get_target_attribute (constraint),
|
|
||||||
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 (GtkNativeDialog *dialog,
|
|
||||||
int response,
|
|
||||||
ConstraintEditorWindow *self)
|
|
||||||
{
|
|
||||||
gtk_native_dialog_hide (dialog);
|
|
||||||
|
|
||||||
if (response == GTK_RESPONSE_ACCEPT)
|
|
||||||
{
|
|
||||||
GFile *file;
|
|
||||||
|
|
||||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
|
||||||
constraint_editor_window_load (self, file);
|
|
||||||
g_object_unref (file);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_native_dialog_destroy (dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
open_cb (GtkWidget *button,
|
|
||||||
ConstraintEditorWindow *self)
|
|
||||||
{
|
|
||||||
GtkFileChooserNative *dialog;
|
|
||||||
|
|
||||||
dialog = gtk_file_chooser_native_new ("Open file",
|
|
||||||
GTK_WINDOW (self),
|
|
||||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
|
||||||
"_Load",
|
|
||||||
"_Cancel");
|
|
||||||
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
|
|
||||||
|
|
||||||
GFile *cwd = g_file_new_for_path (".");
|
|
||||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), cwd, NULL);
|
|
||||||
g_object_unref (cwd);
|
|
||||||
|
|
||||||
g_signal_connect (dialog, "response", G_CALLBACK (open_response_cb), self);
|
|
||||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (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 (GtkNativeDialog *dialog,
|
|
||||||
int response,
|
|
||||||
ConstraintEditorWindow *self)
|
|
||||||
{
|
|
||||||
gtk_native_dialog_hide (dialog);
|
|
||||||
|
|
||||||
if (response == GTK_RESPONSE_ACCEPT)
|
|
||||||
{
|
|
||||||
GListModel *model;
|
|
||||||
GFile *file;
|
|
||||||
char *text;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
model = constraint_view_get_model (CONSTRAINT_VIEW (self->view));
|
|
||||||
text = serialize_model (model);
|
|
||||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
|
||||||
g_file_replace_contents (file, text, -1,
|
|
||||||
NULL, FALSE,
|
|
||||||
G_FILE_CREATE_NONE,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
&error);
|
|
||||||
if (error != NULL)
|
|
||||||
{
|
|
||||||
GtkWidget *message_dialog;
|
|
||||||
|
|
||||||
message_dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
|
||||||
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
||||||
GTK_MESSAGE_INFO,
|
|
||||||
GTK_BUTTONS_OK,
|
|
||||||
"Saving failed");
|
|
||||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
|
|
||||||
"%s", error->message);
|
|
||||||
g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
|
|
||||||
gtk_widget_show (message_dialog);
|
|
||||||
g_error_free (error);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (text);
|
|
||||||
g_object_unref (file);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_native_dialog_destroy (dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
save_cb (GtkWidget *button,
|
|
||||||
ConstraintEditorWindow *self)
|
|
||||||
{
|
|
||||||
GtkFileChooserNative *dialog;
|
|
||||||
|
|
||||||
dialog = gtk_file_chooser_native_new ("Save constraints",
|
|
||||||
GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (button))),
|
|
||||||
GTK_FILE_CHOOSER_ACTION_SAVE,
|
|
||||||
"_Save",
|
|
||||||
"_Cancel");
|
|
||||||
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
|
|
||||||
|
|
||||||
GFile *cwd = g_file_new_for_path (".");
|
|
||||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), cwd, NULL);
|
|
||||||
g_object_unref (cwd);
|
|
||||||
|
|
||||||
g_signal_connect (dialog, "response", G_CALLBACK (save_response_cb), self);
|
|
||||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (dialog));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_editor_window_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
//ConstraintEditorWindow *self = (ConstraintEditorWindow *)object;
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (constraint_editor_window_parent_class)->finalize (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_widget_show (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_widget_show (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->finalize = constraint_editor_window_finalize;
|
|
||||||
|
|
||||||
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,80 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
|
||||||
<template class="ConstraintEditorWindow" parent="GtkApplicationWindow">
|
|
||||||
<style>
|
|
||||||
<class name="devel"/>
|
|
||||||
</style>
|
|
||||||
<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,656 +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"
|
|
||||||
|
|
||||||
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 (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 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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_nick (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)
|
|
||||||
{
|
|
||||||
if (gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target)) != NULL &&
|
|
||||||
gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source)) != NULL)
|
|
||||||
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_pointer (&self->grid, gtk_widget_unparent);
|
|
||||||
g_clear_object (&self->model);
|
|
||||||
g_clear_object (&self->constraint);
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
@@ -1,12 +0,0 @@
|
|||||||
constraintview {
|
|
||||||
background: black;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
constraintview .child {
|
|
||||||
background: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
constraintview .guide {
|
|
||||||
background: blue;
|
|
||||||
}
|
|
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<gresources>
|
|
||||||
<gresource prefix="/org/gtk/gtk4/constraint-editor">
|
|
||||||
<file preprocess="xml-stripblanks">constraint-editor-window.ui</file>
|
|
||||||
<file preprocess="xml-stripblanks">constraint-editor.ui</file>
|
|
||||||
<file preprocess="xml-stripblanks">guide-editor.ui</file>
|
|
||||||
<file>constraint-editor.css</file>
|
|
||||||
</gresource>
|
|
||||||
</gresources>
|
|
@@ -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>
|
|
||||||
|
|
||||||
#define CONSTRAINT_EDITOR_TYPE (constraint_editor_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintEditor, constraint_editor, CONSTRAINT, EDITOR, GtkWidget)
|
|
||||||
|
|
||||||
ConstraintEditor * constraint_editor_new (GListModel *model,
|
|
||||||
GtkConstraint *constraint);
|
|
||||||
|
|
||||||
void constraint_editor_serialize_constraint (GString *str,
|
|
||||||
int indent,
|
|
||||||
GtkConstraint *constraint);
|
|
||||||
char *constraint_editor_constraint_to_string (GtkConstraint *constraint);
|
|
@@ -1,166 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
|
||||||
<template class="ConstraintEditor" parent="GtkWidget">
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="grid">
|
|
||||||
<property name="margin-start">20</property>
|
|
||||||
<property name="margin-end">20</property>
|
|
||||||
<property name="margin-top">20</property>
|
|
||||||
<property name="margin-bottom">20</property>
|
|
||||||
<property name="row-spacing">10</property>
|
|
||||||
<property name="column-spacing">10</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Target</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="target">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<signal name="changed" handler="update_button" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="target_attr">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Relation</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="relation">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Source</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="source">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<signal name="changed" handler="update_button" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="source_attr">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<signal name="changed" handler="source_attr_changed" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Multiplier</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">4</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="multiplier">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">4</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Constant</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">5</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="constant">
|
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">5</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Strength</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">6</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="strength">
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">6</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="preview">
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">7</property>
|
|
||||||
<property name="column-span">2</property>
|
|
||||||
</layout>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="scale" value="1.44"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button">
|
|
||||||
<property name="label">Create</property>
|
|
||||||
<signal name="clicked" handler="create_constraint"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">8</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
@@ -1,93 +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 "constraint-view-child.h"
|
|
||||||
|
|
||||||
struct _ConstraintViewChild
|
|
||||||
{
|
|
||||||
GObject parent_instance;
|
|
||||||
|
|
||||||
char *name;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_NAME = 1,
|
|
||||||
LAST_PROP
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec props[LAST_PROP];
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (ConstraintViewChild, constraint_view_child, G_TYPE_OBJECT)
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_child_init (ConstraintViewChild *child)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_child_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
ConstraintViewChild *child = CONSTRAINT_VIEW_CHILD (object);
|
|
||||||
|
|
||||||
g_free (child->name);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (constraint_view_child_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_child_set_property (GObject *object,
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_child_class_init (ConstraintViewChildClass *class)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
|
||||||
|
|
||||||
object_class->finalize = constraint_view_child_finalize;
|
|
||||||
object_class->get_property = constraint_view_child_get_property;
|
|
||||||
object_class->set_property = constraint_view_child_set_property;
|
|
||||||
|
|
||||||
props[PROP_NAME] =
|
|
||||||
g_param_spec_string ("name", "name", "name",
|
|
||||||
NULL,
|
|
||||||
G_PARAM_READWRITE);
|
|
||||||
|
|
||||||
g_object_class_install_properties (object_class, LAST_PROP, props);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_CHILD_TYPE (constraint_view_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_TYPE (ConstraintViewChild, constraint_view_child, CONSTRAINT, VIEW_CHILD, GObject)
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_WIDGET_TYPE (constraint_view_widget_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintViewWidget, constraint_view_widget, CONSTRAINT, VIEW_WIDGET, ConstraintViewChild)
|
|
||||||
|
|
||||||
ConstraintViewWidget * constraint_view_widget_new (void);
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_GUIDE_TYPE (constraint_view_guide_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintViewGuide, constraint_view_guide, CONSTRAINT, VIEW_GUIDE, ConstraintViewChild)
|
|
||||||
|
|
||||||
ConstraintViewGuide * constraint_view_guide_new (void);
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_CONSTRAINT_TYPE (constraint_view_constraint_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintViewConstraint, constraint_view_constraint, CONSTRAINT, VIEW_CONSTRAINT, ConstraintViewChild)
|
|
||||||
|
|
||||||
ConstraintViewGuide * constraint_view_constraint_new (void);
|
|
@@ -1,44 +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_VIEW_CHILD_TYPE (constraint_view_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_TYPE (ConstraintViewChild, constraint_view_child, CONSTRAINT, VIEW_CHILD, GObject)
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_WIDGET_TYPE (constraint_view_widget_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintViewWidget, constraint_view_widget, CONSTRAINT, VIEW_WIDGET, ConstraintViewChild)
|
|
||||||
|
|
||||||
ConstraintViewWidget * constraint_view_widget_new (void);
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_GUIDE_TYPE (constraint_view_guide_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintViewGuide, constraint_view_guide, CONSTRAINT, VIEW_GUIDE, ConstraintViewChild)
|
|
||||||
|
|
||||||
ConstraintViewGuide * constraint_view_guide_new (void);
|
|
||||||
|
|
||||||
#define CONSTRAINT_VIEW_CONSTRAINT_TYPE (constraint_view_constraint_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintViewConstraint, constraint_view_constraint, CONSTRAINT, VIEW_CONSTRAINT, ConstraintViewChild)
|
|
||||||
|
|
||||||
ConstraintViewGuide * constraint_view_constraint_new (void);
|
|
@@ -1,345 +0,0 @@
|
|||||||
/* Copyright (C) 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 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include "constraint-view.h"
|
|
||||||
|
|
||||||
struct _ConstraintView
|
|
||||||
{
|
|
||||||
GtkWidget parent;
|
|
||||||
|
|
||||||
GListModel *model;
|
|
||||||
|
|
||||||
GtkWidget *drag_widget;
|
|
||||||
};
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (ConstraintView, constraint_view, GTK_TYPE_WIDGET);
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_dispose (GObject *object)
|
|
||||||
{
|
|
||||||
ConstraintView *view = CONSTRAINT_VIEW (object);
|
|
||||||
GtkWidget *child;
|
|
||||||
|
|
||||||
while ((child = gtk_widget_get_first_child (GTK_WIDGET (view))) != NULL)
|
|
||||||
gtk_widget_unparent (child);
|
|
||||||
|
|
||||||
g_clear_object (&view->model);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (constraint_view_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_class_init (ConstraintViewClass *klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
|
||||||
|
|
||||||
object_class->dispose = constraint_view_dispose;
|
|
||||||
|
|
||||||
gtk_widget_class_set_css_name (widget_class, "constraintview");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
update_weak_position (ConstraintView *self,
|
|
||||||
GtkWidget *child,
|
|
||||||
double x,
|
|
||||||
double y)
|
|
||||||
{
|
|
||||||
GtkLayoutManager *manager;
|
|
||||||
GtkConstraint *constraint;
|
|
||||||
|
|
||||||
manager = gtk_widget_get_layout_manager (GTK_WIDGET (self));
|
|
||||||
constraint = (GtkConstraint *)g_object_get_data (G_OBJECT (child), "x-constraint");
|
|
||||||
if (constraint)
|
|
||||||
{
|
|
||||||
gtk_constraint_layout_remove_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
|
||||||
constraint);
|
|
||||||
g_object_set_data (G_OBJECT (child), "x-constraint", NULL);
|
|
||||||
}
|
|
||||||
if (x != -100)
|
|
||||||
{
|
|
||||||
constraint = gtk_constraint_new_constant (child,
|
|
||||||
GTK_CONSTRAINT_ATTRIBUTE_CENTER_X,
|
|
||||||
GTK_CONSTRAINT_RELATION_EQ,
|
|
||||||
x,
|
|
||||||
GTK_CONSTRAINT_STRENGTH_WEAK);
|
|
||||||
g_object_set_data (G_OBJECT (constraint), "internal", (char *)"yes");
|
|
||||||
gtk_constraint_layout_add_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
|
||||||
constraint);
|
|
||||||
g_object_set_data (G_OBJECT (child), "x-constraint", constraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
constraint = (GtkConstraint *)g_object_get_data (G_OBJECT (child), "y-constraint");
|
|
||||||
if (constraint)
|
|
||||||
{
|
|
||||||
gtk_constraint_layout_remove_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
|
||||||
constraint);
|
|
||||||
g_object_set_data (G_OBJECT (child), "y-constraint", NULL);
|
|
||||||
}
|
|
||||||
if (y != -100)
|
|
||||||
{
|
|
||||||
constraint = gtk_constraint_new_constant (child,
|
|
||||||
GTK_CONSTRAINT_ATTRIBUTE_CENTER_Y,
|
|
||||||
GTK_CONSTRAINT_RELATION_EQ,
|
|
||||||
y,
|
|
||||||
GTK_CONSTRAINT_STRENGTH_WEAK);
|
|
||||||
g_object_set_data (G_OBJECT (constraint), "internal", (char *)"yes");
|
|
||||||
gtk_constraint_layout_add_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
|
||||||
constraint);
|
|
||||||
g_object_set_data (G_OBJECT (child), "y-constraint", constraint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
drag_begin (GtkGestureDrag *drag,
|
|
||||||
double start_x,
|
|
||||||
double start_y,
|
|
||||||
ConstraintView *self)
|
|
||||||
{
|
|
||||||
GtkWidget *widget;
|
|
||||||
|
|
||||||
widget = gtk_widget_pick (GTK_WIDGET (self), start_x, start_y, GTK_PICK_DEFAULT);
|
|
||||||
|
|
||||||
if (GTK_IS_LABEL (widget))
|
|
||||||
{
|
|
||||||
widget = gtk_widget_get_ancestor (widget, GTK_TYPE_FRAME);
|
|
||||||
if (widget &&
|
|
||||||
gtk_widget_get_parent (widget) == (GtkWidget *)self)
|
|
||||||
{
|
|
||||||
self->drag_widget = widget;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
drag_update (GtkGestureDrag *drag,
|
|
||||||
double offset_x,
|
|
||||||
double offset_y,
|
|
||||||
ConstraintView *self)
|
|
||||||
{
|
|
||||||
double x, y;
|
|
||||||
|
|
||||||
if (!self->drag_widget)
|
|
||||||
return;
|
|
||||||
|
|
||||||
gtk_gesture_drag_get_start_point (drag, &x, &y);
|
|
||||||
update_weak_position (self, self->drag_widget, x + offset_x, y + offset_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
drag_end (GtkGestureDrag *drag,
|
|
||||||
double offset_x,
|
|
||||||
double offset_y,
|
|
||||||
ConstraintView *self)
|
|
||||||
{
|
|
||||||
self->drag_widget = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
omit_internal (gpointer item, gpointer user_data)
|
|
||||||
{
|
|
||||||
if (g_object_get_data (G_OBJECT (item), "internal"))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
constraint_view_init (ConstraintView *self)
|
|
||||||
{
|
|
||||||
GtkLayoutManager *manager;
|
|
||||||
GtkEventController *controller;
|
|
||||||
GListStore *list;
|
|
||||||
GListModel *all_children;
|
|
||||||
GListModel *all_constraints;
|
|
||||||
GListModel *guides;
|
|
||||||
GListModel *children;
|
|
||||||
GListModel *constraints;
|
|
||||||
GtkFilter *filter;
|
|
||||||
|
|
||||||
manager = gtk_constraint_layout_new ();
|
|
||||||
gtk_widget_set_layout_manager (GTK_WIDGET (self), manager);
|
|
||||||
|
|
||||||
guides = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (manager));
|
|
||||||
|
|
||||||
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
|
|
||||||
filter = GTK_FILTER (gtk_custom_filter_new (omit_internal, NULL, NULL));
|
|
||||||
constraints = (GListModel *)gtk_filter_list_model_new (all_constraints, filter);
|
|
||||||
|
|
||||||
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
|
|
||||||
filter = GTK_FILTER (gtk_custom_filter_new (omit_internal, NULL, NULL));
|
|
||||||
children = (GListModel *)gtk_filter_list_model_new (all_children, filter);
|
|
||||||
|
|
||||||
list = g_list_store_new (G_TYPE_LIST_MODEL);
|
|
||||||
g_list_store_append (list, children);
|
|
||||||
g_list_store_append (list, guides);
|
|
||||||
g_list_store_append (list, constraints);
|
|
||||||
g_object_unref (children);
|
|
||||||
g_object_unref (guides);
|
|
||||||
g_object_unref (constraints);
|
|
||||||
|
|
||||||
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
|
|
||||||
|
|
||||||
controller = (GtkEventController *)gtk_gesture_drag_new ();
|
|
||||||
g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self);
|
|
||||||
g_signal_connect (controller, "drag-update", G_CALLBACK (drag_update), self);
|
|
||||||
g_signal_connect (controller, "drag-end", G_CALLBACK (drag_end), self);
|
|
||||||
gtk_widget_add_controller (GTK_WIDGET (self), controller);
|
|
||||||
}
|
|
||||||
|
|
||||||
ConstraintView *
|
|
||||||
constraint_view_new (void)
|
|
||||||
{
|
|
||||||
return g_object_new (CONSTRAINT_VIEW_TYPE, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
constraint_view_add_child (ConstraintView *view,
|
|
||||||
const char *name)
|
|
||||||
{
|
|
||||||
GtkWidget *frame;
|
|
||||||
GtkWidget *label;
|
|
||||||
|
|
||||||
label = gtk_label_new (name);
|
|
||||||
frame = gtk_frame_new (NULL);
|
|
||||||
gtk_widget_add_css_class (frame, "child");
|
|
||||||
gtk_widget_set_name (frame, name);
|
|
||||||
gtk_frame_set_child (GTK_FRAME (frame), label);
|
|
||||||
gtk_widget_set_parent (frame, GTK_WIDGET (view));
|
|
||||||
|
|
||||||
update_weak_position (view, frame, 100, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
constraint_view_remove_child (ConstraintView *view,
|
|
||||||
GtkWidget *child)
|
|
||||||
{
|
|
||||||
update_weak_position (view, child, -100, -100);
|
|
||||||
gtk_widget_unparent (child);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
constraint_view_add_guide (ConstraintView *view,
|
|
||||||
GtkConstraintGuide *guide)
|
|
||||||
{
|
|
||||||
GtkConstraintLayout *layout;
|
|
||||||
GtkWidget *frame;
|
|
||||||
GtkWidget *label;
|
|
||||||
const char *name;
|
|
||||||
GtkConstraint *constraint;
|
|
||||||
struct {
|
|
||||||
const char *name;
|
|
||||||
GtkConstraintAttribute attr;
|
|
||||||
} names[] = {
|
|
||||||
{ "left-constraint", GTK_CONSTRAINT_ATTRIBUTE_LEFT },
|
|
||||||
{ "top-constraint", GTK_CONSTRAINT_ATTRIBUTE_TOP },
|
|
||||||
{ "width-constraint", GTK_CONSTRAINT_ATTRIBUTE_WIDTH },
|
|
||||||
{ "height-constraint", GTK_CONSTRAINT_ATTRIBUTE_HEIGHT },
|
|
||||||
};
|
|
||||||
int i;
|
|
||||||
|
|
||||||
name = gtk_constraint_guide_get_name (guide);
|
|
||||||
label = gtk_label_new (name);
|
|
||||||
g_object_bind_property (guide, "name",
|
|
||||||
label, "label",
|
|
||||||
G_BINDING_DEFAULT);
|
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
|
||||||
gtk_widget_add_css_class (frame, "guide");
|
|
||||||
g_object_set_data (G_OBJECT (frame), "internal", (char *)"yes");
|
|
||||||
gtk_frame_set_child (GTK_FRAME (frame), label);
|
|
||||||
gtk_widget_insert_after (frame, GTK_WIDGET (view), NULL);
|
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (guide), "frame", frame);
|
|
||||||
|
|
||||||
layout = GTK_CONSTRAINT_LAYOUT (gtk_widget_get_layout_manager (GTK_WIDGET (view)));
|
|
||||||
gtk_constraint_layout_add_guide (layout, g_object_ref (guide));
|
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (names); i++)
|
|
||||||
{
|
|
||||||
constraint = gtk_constraint_new (frame,
|
|
||||||
names[i].attr,
|
|
||||||
GTK_CONSTRAINT_RELATION_EQ,
|
|
||||||
guide,
|
|
||||||
names[i].attr,
|
|
||||||
1.0, 0.0,
|
|
||||||
GTK_CONSTRAINT_STRENGTH_REQUIRED);
|
|
||||||
g_object_set_data (G_OBJECT (constraint), "internal", (char *)"yes");
|
|
||||||
gtk_constraint_layout_add_constraint (layout, constraint);
|
|
||||||
g_object_set_data (G_OBJECT (guide), names[i].name, constraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
update_weak_position (view, frame, 150, 150);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
constraint_view_remove_guide (ConstraintView *view,
|
|
||||||
GtkConstraintGuide *guide)
|
|
||||||
{
|
|
||||||
GtkConstraintLayout *layout;
|
|
||||||
GtkWidget *frame;
|
|
||||||
GtkConstraint *constraint;
|
|
||||||
const char *names[] = {
|
|
||||||
"left-constraint",
|
|
||||||
"top-constraint",
|
|
||||||
"width-constraint",
|
|
||||||
"height-constraint"
|
|
||||||
};
|
|
||||||
int i;
|
|
||||||
|
|
||||||
layout = GTK_CONSTRAINT_LAYOUT (gtk_widget_get_layout_manager (GTK_WIDGET (view)));
|
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (names); i++)
|
|
||||||
{
|
|
||||||
constraint = (GtkConstraint*)g_object_get_data (G_OBJECT (guide), names[i]);
|
|
||||||
gtk_constraint_layout_remove_constraint (layout, constraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
frame = (GtkWidget *)g_object_get_data (G_OBJECT (guide), "frame");
|
|
||||||
update_weak_position (view, frame, -100, -100);
|
|
||||||
gtk_widget_unparent (frame);
|
|
||||||
|
|
||||||
gtk_constraint_layout_remove_guide (layout, guide);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
constraint_view_add_constraint (ConstraintView *view,
|
|
||||||
GtkConstraint *constraint)
|
|
||||||
{
|
|
||||||
GtkLayoutManager *manager;
|
|
||||||
|
|
||||||
manager = gtk_widget_get_layout_manager (GTK_WIDGET (view));
|
|
||||||
gtk_constraint_layout_add_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
|
||||||
g_object_ref (constraint));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
constraint_view_remove_constraint (ConstraintView *view,
|
|
||||||
GtkConstraint *constraint)
|
|
||||||
{
|
|
||||||
GtkLayoutManager *manager;
|
|
||||||
|
|
||||||
manager = gtk_widget_get_layout_manager (GTK_WIDGET (view));
|
|
||||||
gtk_constraint_layout_remove_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
|
||||||
constraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
GListModel *
|
|
||||||
constraint_view_get_model (ConstraintView *view)
|
|
||||||
{
|
|
||||||
return view->model;
|
|
||||||
}
|
|
@@ -1,45 +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_VIEW_TYPE (constraint_view_get_type ())
|
|
||||||
|
|
||||||
G_MODULE_EXPORT
|
|
||||||
G_DECLARE_FINAL_TYPE (ConstraintView, constraint_view, CONSTRAINT, VIEW, GtkWidget)
|
|
||||||
|
|
||||||
ConstraintView * constraint_view_new (void);
|
|
||||||
|
|
||||||
void constraint_view_add_child (ConstraintView *view,
|
|
||||||
const char *name);
|
|
||||||
void constraint_view_remove_child (ConstraintView *view,
|
|
||||||
GtkWidget *child);
|
|
||||||
void constraint_view_add_guide (ConstraintView *view,
|
|
||||||
GtkConstraintGuide *guide);
|
|
||||||
void constraint_view_remove_guide (ConstraintView *view,
|
|
||||||
GtkConstraintGuide *guide);
|
|
||||||
void constraint_view_guide_changed (ConstraintView *view,
|
|
||||||
GtkConstraintGuide *guide);
|
|
||||||
void constraint_view_add_constraint (ConstraintView *view,
|
|
||||||
GtkConstraint *constraint);
|
|
||||||
void constraint_view_remove_constraint (ConstraintView *view,
|
|
||||||
GtkConstraint *constraint);
|
|
||||||
GListModel * constraint_view_get_model (ConstraintView *view);
|
|
@@ -1,355 +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 "guide-editor.h"
|
|
||||||
|
|
||||||
struct _GuideEditor
|
|
||||||
{
|
|
||||||
GtkWidget parent_instance;
|
|
||||||
|
|
||||||
GtkWidget *grid;
|
|
||||||
GtkWidget *name;
|
|
||||||
GtkWidget *min_width;
|
|
||||||
GtkWidget *min_height;
|
|
||||||
GtkWidget *nat_width;
|
|
||||||
GtkWidget *nat_height;
|
|
||||||
GtkWidget *max_width;
|
|
||||||
GtkWidget *max_height;
|
|
||||||
GtkWidget *strength;
|
|
||||||
GtkWidget *button;
|
|
||||||
|
|
||||||
GtkConstraintGuide *guide;
|
|
||||||
|
|
||||||
gboolean constructed;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_GUIDE = 1,
|
|
||||||
LAST_PROP
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec *pspecs[LAST_PROP];
|
|
||||||
|
|
||||||
enum {
|
|
||||||
DONE,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static guint signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
G_DEFINE_TYPE(GuideEditor, guide_editor, GTK_TYPE_WIDGET);
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_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 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
|
|
||||||
guide_editor_serialize_guide (GString *str,
|
|
||||||
int indent,
|
|
||||||
GtkConstraintGuide *guide)
|
|
||||||
{
|
|
||||||
int min_width, min_height;
|
|
||||||
int nat_width, nat_height;
|
|
||||||
int max_width, max_height;
|
|
||||||
const char *name;
|
|
||||||
const char *strength;
|
|
||||||
|
|
||||||
gtk_constraint_guide_get_min_size (guide, &min_width, &min_height);
|
|
||||||
gtk_constraint_guide_get_nat_size (guide, &nat_width, &nat_height);
|
|
||||||
gtk_constraint_guide_get_max_size (guide, &max_width, &max_height);
|
|
||||||
name = gtk_constraint_guide_get_name (guide);
|
|
||||||
strength = get_strength_nick (gtk_constraint_guide_get_strength (guide));
|
|
||||||
|
|
||||||
g_string_append_printf (str, "%*s<guide min-width=\"%d\" min-height=\"%d\"\n", indent, "", min_width, min_height);
|
|
||||||
g_string_append_printf (str, "%*s nat-width=\"%d\" nat-height=\"%d\"\n", indent, "", nat_width, nat_height);
|
|
||||||
g_string_append_printf (str, "%*s max-width=\"%d\" max-height=\"%d\"\n", indent, "", max_width, max_height);
|
|
||||||
g_string_append_printf (str, "%*s name=\"%s\" strength=\"%s\" />\n", indent, "", name, strength);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
create_guide (GtkButton *button,
|
|
||||||
GuideEditor *editor)
|
|
||||||
{
|
|
||||||
const char *id;
|
|
||||||
int strength;
|
|
||||||
const char *name;
|
|
||||||
int w, h;
|
|
||||||
GtkConstraintGuide *guide;
|
|
||||||
|
|
||||||
if (editor->guide)
|
|
||||||
guide = g_object_ref (editor->guide);
|
|
||||||
else
|
|
||||||
guide = gtk_constraint_guide_new ();
|
|
||||||
|
|
||||||
name = gtk_editable_get_text (GTK_EDITABLE (editor->name));
|
|
||||||
gtk_constraint_guide_set_name (guide, name);
|
|
||||||
|
|
||||||
w = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (editor->min_width));
|
|
||||||
h = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (editor->min_height));
|
|
||||||
gtk_constraint_guide_set_min_size (guide, w, h);
|
|
||||||
|
|
||||||
w = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (editor->nat_width));
|
|
||||||
h = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (editor->nat_height));
|
|
||||||
gtk_constraint_guide_set_nat_size (guide, w, h);
|
|
||||||
|
|
||||||
w = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (editor->max_width));
|
|
||||||
h = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (editor->max_height));
|
|
||||||
gtk_constraint_guide_set_max_size (guide, w, h);
|
|
||||||
|
|
||||||
id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->strength));
|
|
||||||
strength = get_strength (id);
|
|
||||||
gtk_constraint_guide_set_strength (guide, strength);
|
|
||||||
|
|
||||||
g_signal_emit (editor, signals[DONE], 0, guide);
|
|
||||||
g_object_unref (guide);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_editor_init (GuideEditor *editor)
|
|
||||||
{
|
|
||||||
gtk_widget_init_template (GTK_WIDGET (editor));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int guide_counter;
|
|
||||||
|
|
||||||
static int
|
|
||||||
min_input (GtkSpinButton *spin_button,
|
|
||||||
double *new_val)
|
|
||||||
{
|
|
||||||
if (strcmp (gtk_editable_get_text (GTK_EDITABLE (spin_button)), "") == 0)
|
|
||||||
{
|
|
||||||
*new_val = 0.0;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
max_input (GtkSpinButton *spin_button,
|
|
||||||
double *new_val)
|
|
||||||
{
|
|
||||||
if (strcmp (gtk_editable_get_text (GTK_EDITABLE (spin_button)), "") == 0)
|
|
||||||
{
|
|
||||||
*new_val = G_MAXINT;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_editor_constructed (GObject *object)
|
|
||||||
{
|
|
||||||
GuideEditor *editor = GUIDE_EDITOR (object);
|
|
||||||
|
|
||||||
guide_strength_combo (editor->strength);
|
|
||||||
|
|
||||||
g_signal_connect (editor->min_width, "input", G_CALLBACK (min_input), NULL);
|
|
||||||
|
|
||||||
g_signal_connect (editor->min_height, "input", G_CALLBACK (min_input), NULL);
|
|
||||||
|
|
||||||
g_signal_connect (editor->max_width, "input", G_CALLBACK (max_input), NULL);
|
|
||||||
|
|
||||||
g_signal_connect (editor->max_height, "input", G_CALLBACK (max_input), NULL);
|
|
||||||
|
|
||||||
if (editor->guide)
|
|
||||||
{
|
|
||||||
GtkConstraintStrength strength;
|
|
||||||
const char *nick;
|
|
||||||
int w, h;
|
|
||||||
|
|
||||||
nick = gtk_constraint_guide_get_name (editor->guide);
|
|
||||||
if (nick)
|
|
||||||
gtk_editable_set_text (GTK_EDITABLE (editor->name), nick);
|
|
||||||
|
|
||||||
gtk_constraint_guide_get_min_size (editor->guide, &w, &h);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->min_width), w);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->min_height), h);
|
|
||||||
|
|
||||||
gtk_constraint_guide_get_nat_size (editor->guide, &w, &h);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->nat_width), w);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->nat_height), h);
|
|
||||||
|
|
||||||
gtk_constraint_guide_get_max_size (editor->guide, &w, &h);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->max_width), w);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->max_height), h);
|
|
||||||
|
|
||||||
strength = gtk_constraint_guide_get_strength (editor->guide);
|
|
||||||
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
|
|
||||||
{
|
|
||||||
char *name;
|
|
||||||
|
|
||||||
guide_counter++;
|
|
||||||
name = g_strdup_printf ("Guide %d", guide_counter);
|
|
||||||
gtk_editable_set_text (GTK_EDITABLE (editor->name), name);
|
|
||||||
g_free (name);
|
|
||||||
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->min_width), 0.0);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->min_height), 0.0);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->nat_width), 0.0);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->nat_height), 0.0);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->max_width), G_MAXINT);
|
|
||||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (editor->max_height), G_MAXINT);
|
|
||||||
|
|
||||||
gtk_combo_box_set_active_id (GTK_COMBO_BOX (editor->strength), "medium");
|
|
||||||
|
|
||||||
gtk_button_set_label (GTK_BUTTON (editor->button), "Create");
|
|
||||||
}
|
|
||||||
|
|
||||||
editor->constructed = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_editor_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GuideEditor *self = GUIDE_EDITOR (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_GUIDE:
|
|
||||||
self->guide = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_editor_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GuideEditor *self = GUIDE_EDITOR (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_GUIDE:
|
|
||||||
g_value_set_object (value, self->guide);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_editor_dispose (GObject *object)
|
|
||||||
{
|
|
||||||
GuideEditor *self = (GuideEditor *)object;
|
|
||||||
|
|
||||||
g_clear_pointer (&self->grid, gtk_widget_unparent);
|
|
||||||
g_clear_object (&self->guide);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (guide_editor_parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
guide_editor_class_init (GuideEditorClass *class)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
|
||||||
|
|
||||||
object_class->constructed = guide_editor_constructed;
|
|
||||||
object_class->dispose = guide_editor_dispose;
|
|
||||||
object_class->set_property = guide_editor_set_property;
|
|
||||||
object_class->get_property = guide_editor_get_property;
|
|
||||||
|
|
||||||
pspecs[PROP_GUIDE] =
|
|
||||||
g_param_spec_object ("guide", "guide", "guide",
|
|
||||||
GTK_TYPE_CONSTRAINT_GUIDE,
|
|
||||||
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_GUIDE);
|
|
||||||
|
|
||||||
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/guide-editor.ui");
|
|
||||||
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, grid);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, name);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, min_width);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, min_height);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, nat_width);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, nat_height);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, max_width);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, max_height);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, strength);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GuideEditor, button);
|
|
||||||
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, create_guide);
|
|
||||||
}
|
|
||||||
|
|
||||||
GuideEditor *
|
|
||||||
guide_editor_new (GtkConstraintGuide *guide)
|
|
||||||
{
|
|
||||||
return g_object_new (GUIDE_EDITOR_TYPE,
|
|
||||||
"guide", guide,
|
|
||||||
NULL);
|
|
||||||
}
|
|
@@ -1,32 +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 GUIDE_EDITOR_TYPE (guide_editor_get_type ())
|
|
||||||
|
|
||||||
G_DECLARE_FINAL_TYPE (GuideEditor, guide_editor, GUIDE, EDITOR, GtkWidget)
|
|
||||||
|
|
||||||
GuideEditor * guide_editor_new (GtkConstraintGuide *guide);
|
|
||||||
|
|
||||||
void guide_editor_serialize_guide (GString *str,
|
|
||||||
int indent,
|
|
||||||
GtkConstraintGuide *guide);
|
|
@@ -1,191 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
|
||||||
<object class="GtkAdjustment" id="min_width_adj">
|
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">2147483647</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
<property name="page-size">0</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="min_height_adj">
|
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">2147483647</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
<property name="page-size">0</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="nat_width_adj">
|
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">2147483647</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
<property name="page-size">0</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="nat_height_adj">
|
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">2147483647</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
<property name="page-size">0</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="max_width_adj">
|
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">2147483647</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
<property name="page-size">0</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="max_height_adj">
|
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">2147483647</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
<property name="page-size">0</property>
|
|
||||||
</object>
|
|
||||||
<template class="GuideEditor" parent="GtkWidget">
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="grid">
|
|
||||||
<property name="margin-start">20</property>
|
|
||||||
<property name="margin-end">20</property>
|
|
||||||
<property name="margin-top">20</property>
|
|
||||||
<property name="margin-bottom">20</property>
|
|
||||||
<property name="row-spacing">10</property>
|
|
||||||
<property name="column-spacing">10</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Name</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">0</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="name">
|
|
||||||
<property name="max-width-chars">20</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">0</property>
|
|
||||||
<property name="column-span">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Min Size</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="min_width">
|
|
||||||
<property name="adjustment">min_width_adj</property>
|
|
||||||
<property name="max-width-chars">5</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="min_height">
|
|
||||||
<property name="adjustment">min_height_adj</property>
|
|
||||||
<property name="max-width-chars">5</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">1</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Nat Size</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="nat_width">
|
|
||||||
<property name="adjustment">nat_width_adj</property>
|
|
||||||
<property name="max-width-chars">5</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="nat_height">
|
|
||||||
<property name="adjustment">nat_height_adj</property>
|
|
||||||
<property name="max-width-chars">5</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Max Size</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="max_width">
|
|
||||||
<property name="adjustment">max_width_adj</property>
|
|
||||||
<property name="max-width-chars">5</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="max_height">
|
|
||||||
<property name="adjustment">max_height_adj</property>
|
|
||||||
<property name="max-width-chars">5</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label">Strength</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">4</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="strength">
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">4</property>
|
|
||||||
<property name="column-span">2</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="button">
|
|
||||||
<property name="label">Create</property>
|
|
||||||
<signal name="clicked" handler="create_guide"/>
|
|
||||||
<layout>
|
|
||||||
<property name="column">2</property>
|
|
||||||
<property name="row">5</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</template>
|
|
||||||
</interface>
|
|
@@ -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 <mclasen@redhat.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <constraint-editor-application.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main (int argc, char *argv[])
|
|
||||||
{
|
|
||||||
return g_application_run (G_APPLICATION (constraint_editor_application_new ()), argc, argv);
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
constraint_editor_sources = [
|
|
||||||
'main.c',
|
|
||||||
'constraint-editor-application.c',
|
|
||||||
'constraint-editor-window.c',
|
|
||||||
'constraint-view.c',
|
|
||||||
'constraint-editor.c',
|
|
||||||
'guide-editor.c',
|
|
||||||
]
|
|
||||||
|
|
||||||
constraint_editor_resources = gnome.compile_resources('constraint_editor_resources',
|
|
||||||
'constraint-editor.gresource.xml',
|
|
||||||
source_dir: '.')
|
|
||||||
|
|
||||||
executable('gtk4-constraint-editor',
|
|
||||||
constraint_editor_sources, constraint_editor_resources,
|
|
||||||
c_args: common_cflags,
|
|
||||||
dependencies: libgtk_dep,
|
|
||||||
include_directories: confinc,
|
|
||||||
gui_app: true,
|
|
||||||
link_args: extra_demo_ldflags,
|
|
||||||
install: false)
|
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |