Compare commits
452 Commits
new-harfbu
...
gtk3-remov
Author | SHA1 | Date | |
---|---|---|---|
|
184424ae40 | ||
|
9711c2ad45 | ||
|
d449a9e657 | ||
|
ac490ee8a4 | ||
|
6536646720 | ||
|
4d7d44c717 | ||
|
9c33adf118 | ||
|
1a29a2f03f | ||
|
9cde2186bf | ||
|
d942a31750 | ||
|
be271db028 | ||
|
4e804ff4a7 | ||
|
a7e207abe2 | ||
|
9236ee0564 | ||
|
91cc9b58f3 | ||
|
7bd9cdc8fb | ||
|
02d4fbe29e | ||
|
8af587c189 | ||
|
60f9dbf676 | ||
|
b1b9de6836 | ||
|
2957b86f72 | ||
|
4f9ea5e54b | ||
|
4273b6ad92 | ||
|
b558f7c9ee | ||
|
c860a2db85 | ||
|
fbf88d285e | ||
|
56cfc65909 | ||
|
c734c7e918 | ||
|
09bdd4531a | ||
|
370d8242e7 | ||
|
0dcbbc3344 | ||
|
c073a062b6 | ||
|
abb43f3364 | ||
|
b7ec3b163f | ||
|
a7c5f26d24 | ||
|
e9757b9afc | ||
|
ceeb55eac2 | ||
|
ac739b2a72 | ||
|
983e82b750 | ||
|
0fcfa1f266 | ||
|
ec1e8fb20f | ||
|
849b7faac8 | ||
|
1f64689c31 | ||
|
81c8efc863 | ||
|
b819fcac74 | ||
|
df6ea75a04 | ||
|
77c1424582 | ||
|
014320bfb0 | ||
|
0f957ca4f7 | ||
|
6bdc1137f2 | ||
|
a4410e9c01 | ||
|
9d9b023166 | ||
|
f5408e5061 | ||
|
1373bf1d76 | ||
|
cc7f9c44e4 | ||
|
ce86b411f8 | ||
|
a04fef4b9e | ||
|
3246d6a738 | ||
|
bcb9babc5f | ||
|
e96c6c40f8 | ||
|
9f1b954fff | ||
|
651715b8e8 | ||
|
b6b15508d5 | ||
|
5aba13f62d | ||
|
749a58ab26 | ||
|
3462fcf9a0 | ||
|
0432b22e02 | ||
|
33589f154e | ||
|
d2ef356f1d | ||
|
c5789127a7 | ||
|
28833783cc | ||
|
2d31112a7f | ||
|
52edd6b192 | ||
|
940126c427 | ||
|
8cfbf63c5a | ||
|
068f7f7423 | ||
|
65f2fe828c | ||
|
b5a8bd5fe3 | ||
|
2445f46e01 | ||
|
1d40ba250f | ||
|
e47440def5 | ||
|
6a37e2d19e | ||
|
7391a078b3 | ||
|
d52dad2042 | ||
|
26d32f3bd0 | ||
|
e41ec3c62e | ||
|
cb89ad18a2 | ||
|
fd758bb2e9 | ||
|
1882ff9be3 | ||
|
fb9e3e1830 | ||
|
310dc4b6c4 | ||
|
b1bc86e905 | ||
|
59055fd9f7 | ||
|
a33bf3da56 | ||
|
490cf8dff6 | ||
|
331a92d559 | ||
|
1bbd244517 | ||
|
c9d4f53cfc | ||
|
dbf7e1d23b | ||
|
212efbdd81 | ||
|
5a84730b4a | ||
|
1ee995fd0f | ||
|
9709d7eb61 | ||
|
7bc1aeef8e | ||
|
73fcf0d3d4 | ||
|
fb083b6de2 | ||
|
09fe0b0edc | ||
|
857b9a55a4 | ||
|
dc5698ad55 | ||
|
b185f69334 | ||
|
ca33855793 | ||
|
74f6832001 | ||
|
6db8e62ae7 | ||
|
c1e40a5fbd | ||
|
7586e88204 | ||
|
5e8edec254 | ||
|
6b079afa0a | ||
|
e24e0dd8a5 | ||
|
1cd99d63d1 | ||
|
0e24d35e3b | ||
|
92206fe23b | ||
|
7d0364a127 | ||
|
988d2dd077 | ||
|
397471d604 | ||
|
b0a31fefd7 | ||
|
4da82356bc | ||
|
ac1f66a35b | ||
|
2912363104 | ||
|
1e7988531a | ||
|
2d2ad0a997 | ||
|
8dc95560e2 | ||
|
dbce9ee870 | ||
|
ead77a4628 | ||
|
20c29fd8c0 | ||
|
a8ffb42739 | ||
|
d9000a0740 | ||
|
3b246fbc56 | ||
|
ca63c98447 | ||
|
215c2be76f | ||
|
4eb2f297f1 | ||
|
89d5c543ac | ||
|
cde5a3f4b4 | ||
|
9109efb19e | ||
|
ea6e3b3ddf | ||
|
00842f4d4e | ||
|
a4fe15d9f0 | ||
|
8caa937739 | ||
|
8ec004cc08 | ||
|
c19ae9635e | ||
|
152e65f07a | ||
|
adbd9b22d6 | ||
|
5428379fad | ||
|
08e20ce597 | ||
|
bc0b9840de | ||
|
af58e05531 | ||
|
d151223b1b | ||
|
6cb72d7f8c | ||
|
d1a9ba2c93 | ||
|
7af43fb98c | ||
|
d875ef88ff | ||
|
3f77da62bd | ||
|
8b85f38093 | ||
|
b9e91b9419 | ||
|
7c10ed9193 | ||
|
505a177398 | ||
|
e47865dba6 | ||
|
3f250959b6 | ||
|
9fe71ccdc1 | ||
|
47c797f63d | ||
|
3a770b1b80 | ||
|
3770defce7 | ||
|
741a32ff7c | ||
|
a6eb593370 | ||
|
89e38ba343 | ||
|
2d3936cbe6 | ||
|
1b52b48814 | ||
|
6ed7d60a20 | ||
|
892abdd41b | ||
|
35c4627fac | ||
|
59a272fdef | ||
|
7b3f1fd233 | ||
|
446659e80f | ||
|
426a0be531 | ||
|
09e0881a51 | ||
|
3d7fd8c897 | ||
|
e20b7a3a8d | ||
|
ae69bc53f2 | ||
|
8a15a7bd5f | ||
|
15a7a93d10 | ||
|
8034ba4803 | ||
|
352c8180d0 | ||
|
cd4b6a77a4 | ||
|
6b8c08525d | ||
|
8dfb33fb5f | ||
|
f9e19dca49 | ||
|
08da4a2377 | ||
|
a3e070f59c | ||
|
a6f35772e7 | ||
|
5058f4ef7d | ||
|
d8b558ead2 | ||
|
30f34ba224 | ||
|
2c4c47fe42 | ||
|
567cc15132 | ||
|
1e2bd15b22 | ||
|
0c948802cd | ||
|
339e20f598 | ||
|
2b768edd43 | ||
|
c605a23346 | ||
|
f264e0dbf9 | ||
|
f34709807f | ||
|
ecf3431d3f | ||
|
bfcd062e8e | ||
|
1bb106012a | ||
|
bbb70857be | ||
|
f35ce26336 | ||
|
fc3317138e | ||
|
55e73682cc | ||
|
df5d18a5b1 | ||
|
c33f9a2769 | ||
|
cddd88064c | ||
|
2e1a55118a | ||
|
3b244c9f11 | ||
|
024cb267dd | ||
|
17665f06e3 | ||
|
17dc55474b | ||
|
e60b55626e | ||
|
5d224a1827 | ||
|
e7e31a4835 | ||
|
c9cfdf7a91 | ||
|
430caaa167 | ||
|
91f2ad4a2f | ||
|
93bf85e92f | ||
|
5c039a1aa0 | ||
|
aac83b20c1 | ||
|
ed9a6f755d | ||
|
224a53d97b | ||
|
967c5f7f7f | ||
|
05bc2f4dc1 | ||
|
3a959e984f | ||
|
0b4e511d05 | ||
|
a533d106af | ||
|
7b2c731fae | ||
|
9e658cb51d | ||
|
3fe8b66b3b | ||
|
67f1113370 | ||
|
094d85f293 | ||
|
7771869ab3 | ||
|
1edf11774c | ||
|
a8bbcf33ec | ||
|
d9a382d689 | ||
|
f88e8ea6fe | ||
|
c3e065374f | ||
|
34e64ce5c2 | ||
|
2ceff6df9c | ||
|
e910ee2c19 | ||
|
728f6869cb | ||
|
ff6b519286 | ||
|
a58d7573f6 | ||
|
9d7c7e8a67 | ||
|
942a2dede5 | ||
|
75b8abbf24 | ||
|
0f5603e74f | ||
|
0524362721 | ||
|
261f1dc395 | ||
|
3bd9a3453f | ||
|
28848176e5 | ||
|
9a0e40b6da | ||
|
db84dc8e58 | ||
|
e74622b0b8 | ||
|
e8e2f5163c | ||
|
593025a917 | ||
|
ba216dea1c | ||
|
5b75be73d5 | ||
|
31a33593cd | ||
|
22d9241ab4 | ||
|
29ab9926a2 | ||
|
54899a369e | ||
|
1d960d7028 | ||
|
44fcc0435c | ||
|
625a0e3d6c | ||
|
0b61d6f6ae | ||
|
28ea04efca | ||
|
c91ca69c2c | ||
|
03c5b92da2 | ||
|
23eca11c3f | ||
|
c830ab2d55 | ||
|
af6dd6bf35 | ||
|
93e7c60bd2 | ||
|
3abb57a9e7 | ||
|
5e89e1d0a9 | ||
|
deba92f729 | ||
|
95e2e48582 | ||
|
dc927ee698 | ||
|
2cd62574ac | ||
|
1a91c953eb | ||
|
344baa18e9 | ||
|
6e641932ac | ||
|
288a9341fd | ||
|
12770e505e | ||
|
0c81e7a2e6 | ||
|
d6840ad3dd | ||
|
e5b83f1a87 | ||
|
8ed0471785 | ||
|
5d7183ee0c | ||
|
2ca4a3cb41 | ||
|
864e1ca526 | ||
|
736dbfef42 | ||
|
1a4d396d6f | ||
|
638b136e34 | ||
|
512da66761 | ||
|
f3b1704a99 | ||
|
34d6c028b0 | ||
|
2934482aee | ||
|
6afd174162 | ||
|
9d12953ccf | ||
|
347d0de65b | ||
|
d7a4143a68 | ||
|
65edea0406 | ||
|
6058495f50 | ||
|
68a7da71e3 | ||
|
9f3141fc5c | ||
|
38a4c4dd37 | ||
|
03394c559d | ||
|
1d4eac211c | ||
|
57300b4960 | ||
|
7298e73c44 | ||
|
461f5fde03 | ||
|
edb57a9202 | ||
|
5b360f2198 | ||
|
43980583e3 | ||
|
8f8b68f847 | ||
|
df77965153 | ||
|
eb732b3f68 | ||
|
c2ddb932b2 | ||
|
d9d3ec7cad | ||
|
1bbff35383 | ||
|
9b394d8753 | ||
|
47e4a111c2 | ||
|
f533ef8650 | ||
|
bf60bf15de | ||
|
224213dad6 | ||
|
1661e2888a | ||
|
7c325ed852 | ||
|
950480cea4 | ||
|
57ba052522 | ||
|
af3bcc6adc | ||
|
391469e365 | ||
|
cca1cf03df | ||
|
ffa8fef2fa | ||
|
13c126b277 | ||
|
148650c23a | ||
|
8c973bd837 | ||
|
3e5a7bb898 | ||
|
53767ce1d3 | ||
|
806e98d67e | ||
|
377b2872be | ||
|
e28c7a41ee | ||
|
7644c0866b | ||
|
933765204f | ||
|
43b6541eae | ||
|
3937fb4ebe | ||
|
df890474ed | ||
|
a3f1e02b9b | ||
|
c23e07f60f | ||
|
3da6497d9f | ||
|
998314b8ba | ||
|
417c57e5b7 | ||
|
99d013994b | ||
|
ff4dcf5fa4 | ||
|
a7ea8248ce | ||
|
7395160e5b | ||
|
cfad43b80d | ||
|
2c15e59c16 | ||
|
0a9aa768d8 | ||
|
a0129f556b | ||
|
64c28f40a0 | ||
|
b522c59880 | ||
|
519ff2ac6a | ||
|
6f1e611c3b | ||
|
17ab084f28 | ||
|
4d08be5d03 | ||
|
b6082efdc0 | ||
|
aa1e565fb5 | ||
|
fec7874d0e | ||
|
72010d7894 | ||
|
25bf546eee | ||
|
24e6995d92 | ||
|
079aef0b8d | ||
|
7da52e5255 | ||
|
568ea3b7f9 | ||
|
0f764eb16e | ||
|
de1f87b1f4 | ||
|
86acf52032 | ||
|
c514cf75e4 | ||
|
5c67d7d7b1 | ||
|
5a7fc7e352 | ||
|
3b81932981 | ||
|
71cfb8e077 | ||
|
37c47d70f6 | ||
|
0e95206697 | ||
|
99a48fe7e7 | ||
|
60230b4653 | ||
|
9b820cde49 | ||
|
15bd30d222 | ||
|
8d205fd518 | ||
|
b06712d3c9 | ||
|
83a45d3bb0 | ||
|
aa1593505d | ||
|
501bce47ea | ||
|
585569f66e | ||
|
5541152724 | ||
|
1c5071c346 | ||
|
7e623b4f12 | ||
|
3215c0a3a9 | ||
|
d82edf0c91 | ||
|
cde6ae938e | ||
|
e7d7cb580e | ||
|
f2c3481b5c | ||
|
393a016c5a | ||
|
1f9ee936e8 | ||
|
254719ee50 | ||
|
dc144d1266 | ||
|
c82d6f9872 | ||
|
6ff9e5ab7d | ||
|
b8d142f8b8 | ||
|
e66c0a45d4 | ||
|
83dcdaa402 | ||
|
091b189ce3 | ||
|
0fc284bf61 | ||
|
e51f08bda0 | ||
|
1efa376b83 | ||
|
6d391b89b8 | ||
|
4300a5c609 | ||
|
914813c44a | ||
|
c529de1765 | ||
|
71a97accf2 | ||
|
7a51da1e69 | ||
|
2badd5f45a | ||
|
92ebd74101 | ||
|
df40f2cc2b | ||
|
2dd73b7f76 | ||
|
034103b078 | ||
|
9f885ba16c | ||
|
d5fcc8d522 | ||
|
213aeffd62 | ||
|
25148ac344 | ||
|
8fc57f144c | ||
|
8a7023fe33 | ||
|
6ef7c2ef29 | ||
|
3fa0e4b0be | ||
|
ea286fe8f9 | ||
|
bbcc832393 |
@@ -1,4 +1,4 @@
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2
|
||||
|
||||
stages:
|
||||
- build
|
||||
@@ -7,12 +7,38 @@ cache:
|
||||
paths:
|
||||
- _ccache/
|
||||
|
||||
build:
|
||||
fedora-autotools:
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker.sh
|
||||
- bash -x ./.gitlab-ci/test-docker-autotools.sh
|
||||
|
||||
msys2-mingw32:
|
||||
fedora-meson:
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
|
||||
msys2-mingw32-meson:
|
||||
variables:
|
||||
MSYSTEM: "MINGW32"
|
||||
CHERE_INVOKING: "yes"
|
||||
stage: build
|
||||
tags:
|
||||
- win32
|
||||
script:
|
||||
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh"
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
|
||||
msys2-mingw32-autotools:
|
||||
when: manual
|
||||
variables:
|
||||
MSYSTEM: "MINGW32"
|
||||
@@ -22,4 +48,4 @@ msys2-mingw32:
|
||||
- win32
|
||||
script:
|
||||
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-autotools.sh"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FROM fedora:28
|
||||
FROM fedora:29
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
@@ -10,6 +10,7 @@ RUN dnf -y install \
|
||||
ccache \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dbus-x11 \
|
||||
fribidi-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
@@ -23,8 +24,10 @@ RUN dnf -y install \
|
||||
graphene-devel \
|
||||
gtk-doc \
|
||||
hicolor-icon-theme \
|
||||
iso-codes \
|
||||
itstool \
|
||||
json-glib-devel \
|
||||
libcloudproviders-devel \
|
||||
libepoxy-devel \
|
||||
libmount-devel \
|
||||
librsvg2 \
|
||||
@@ -42,12 +45,19 @@ RUN dnf -y install \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libwayland-egl-devel \
|
||||
meson \
|
||||
ninja-build \
|
||||
pango-devel \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-wheel \
|
||||
redhat-rpm-config \
|
||||
rest-devel \
|
||||
sassc \
|
||||
vulkan-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
xorg-x11-server-Xvfb
|
||||
xorg-x11-server-Xvfb \
|
||||
&& dnf clean all
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1"
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v2"
|
||||
|
||||
# HOST_USER_ID gets used to create a user with the same ID so that files
|
||||
# created in the mounted volume have the same owner
|
||||
|
16
.gitlab-ci/test-docker-autotools.sh
Executable file
16
.gitlab-ci/test-docker-autotools.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
mkdir _build
|
||||
cd _build
|
||||
../autogen.sh \
|
||||
--enable-cloudproviders \
|
||||
--enable-broadway-backend \
|
||||
--enable-xinerama \
|
||||
--enable-gtk-doc
|
||||
make -j8
|
29
.gitlab-ci/test-docker-meson.sh
Executable file
29
.gitlab-ci/test-docker-meson.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
python3 -m pip install --user meson==0.49.2
|
||||
|
||||
meson \
|
||||
-Dgtk_doc=true \
|
||||
-Dman=true \
|
||||
-Dbroadway_backend=true \
|
||||
-Dxinerama=yes \
|
||||
-Dprint_backends="file,lpr,test,cloudprint,cups" \
|
||||
_build
|
||||
|
||||
cd _build
|
||||
ninja
|
||||
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test \
|
||||
--timeout-multiplier 4 \
|
||||
--print-errorlogs \
|
||||
--suite=gtk+-3.0 \
|
||||
|
||||
ninja gail-libgail-util3-doc gdk3-doc gtk3-doc
|
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
./autogen.sh
|
||||
make -j8
|
@@ -14,7 +14,6 @@ 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 \
|
49
.gitlab-ci/test-msys2-meson.sh
Normal file
49
.gitlab-ci/test-msys2-meson.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/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 \
|
||||
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-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-json-glib \
|
||||
mingw-w64-$MSYS2_ARCH-libepoxy \
|
||||
mingw-w64-$MSYS2_ARCH-pango \
|
||||
mingw-w64-$MSYS2_ARCH-shared-mime-info \
|
||||
mingw-w64-$MSYS2_ARCH-meson \
|
||||
mingw-w64-$MSYS2_ARCH-ninja \
|
||||
mingw-w64-$MSYS2_ARCH-gtk-doc \
|
||||
mingw-w64-$MSYS2_ARCH-sassc
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
# Build
|
||||
ccache --zero-stats
|
||||
ccache --show-stats
|
||||
|
||||
meson \
|
||||
-Dman=true \
|
||||
-Dbroadway_backend=true \
|
||||
_build
|
||||
|
||||
ninja -C _build
|
||||
|
||||
ccache --show-stats
|
@@ -22,7 +22,13 @@ EXTRA_DIST += \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/po2tbl.sed.in \
|
||||
make-pot
|
||||
make-pot \
|
||||
meson_options.txt \
|
||||
meson.build \
|
||||
po/meson.build \
|
||||
po-properties/meson.build \
|
||||
build-aux/meson/post-install.py \
|
||||
config.h.meson
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
|
||||
|
97
NEWS
97
NEWS
@@ -1,3 +1,100 @@
|
||||
Overview of Changes in GTK+ 3.24.8
|
||||
==================================
|
||||
|
||||
* Color editor: don't warn if editing is cancelled
|
||||
|
||||
* Always redraw on allocate - not doing so is
|
||||
not safe when any widget can have a background
|
||||
|
||||
* Use GLSL 3.30 for shaders
|
||||
|
||||
* Quartz: add a preliminary GdkGLContext implementation
|
||||
|
||||
* Win32: Fix a bug that prevented storing printer driver prefs
|
||||
|
||||
* Wayland: properly place window menus
|
||||
|
||||
* GtkApplication: support session state changes in
|
||||
sandboxes, using the inhibit portal
|
||||
|
||||
* Fix a problem with autostart notification
|
||||
|
||||
* Places: Show loop devices as reported by gvfs
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
Czech
|
||||
German
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Polish
|
||||
Romanian
|
||||
Spanish
|
||||
Swedish
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.7
|
||||
==================================
|
||||
|
||||
* Undeprecate gtk_window_present
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.6
|
||||
==================================
|
||||
|
||||
* Link against fribidi
|
||||
|
||||
* Broadway: Ensure focus on click
|
||||
|
||||
* Fix some compiler warnings
|
||||
|
||||
* Improve menu positioning with move-to-rect
|
||||
|
||||
* Improve activation of the onscreen keyboard
|
||||
|
||||
* Use C locale when generating code
|
||||
|
||||
* Treeview: Make sure separator nodes have height > 0
|
||||
|
||||
* theme
|
||||
- Fix some inconsistences for radii
|
||||
|
||||
* quartz:
|
||||
- Full-screen only normal windows
|
||||
- Restore key-window switching when changing windows
|
||||
- Change monitor geometry calculation
|
||||
- search: Limit the cop of Spotlight search
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Dutch
|
||||
Finnish
|
||||
Icelandic
|
||||
Kazakh
|
||||
Korean
|
||||
Romanian
|
||||
Serbian
|
||||
Slovenian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.5
|
||||
==================================
|
||||
|
||||
* Adwaita: Refresh the theme
|
||||
|
||||
* HighContrast: Refresh the theme
|
||||
|
||||
* Wayland: Implement gdk_window_present
|
||||
|
||||
* GtkSwitch: Use icons instead of glyphs
|
||||
|
||||
* Translation updates:
|
||||
Hungarian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.4
|
||||
==================================
|
||||
|
||||
|
90
README.win32
90
README.win32
@@ -181,6 +181,96 @@ instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
3) Using Meson (for Visual Studio and MinGW builds)
|
||||
---
|
||||
|
||||
Meson can now be used to build GTK+-3.x with either MinGW or Visual Studio.
|
||||
You will need the following items in addition to all the dependencies
|
||||
listed above:
|
||||
|
||||
- Python 3.5 or later
|
||||
- Meson build system, 0.48.0 or later
|
||||
- Ninja (if not using the Visual Studio project generator for
|
||||
Visual Studio 2010, 2015, 2017, 2019)
|
||||
- CMake (optional, used for dependency searching)
|
||||
- pkg-config (optional, or some compatible tool, highly recommended)
|
||||
|
||||
For all Windows builds, note that unless -Dbuiltin_immodules=no is specified,
|
||||
the input modules (immodules) are built directly into the GTK DLL.
|
||||
|
||||
For building with Meson using Visual Studio, do the following:
|
||||
|
||||
Create an empty build directory somewhere that is on the same drive
|
||||
as the source tree, and launch the Visual Studio command prompt that
|
||||
matches the build configuration (Visual Studio version and architecture),
|
||||
and run the following:
|
||||
|
||||
- Ensure that both the installation directory of Python and its script
|
||||
directory is in your PATH, as well as the Ninja, CMake and pkg-config
|
||||
executables (if used). If a pkg-config compatible drop-in replacement
|
||||
tool is being used, ensure that PKG_CONFIG is set to point to the
|
||||
executable of that tool as well.
|
||||
|
||||
- For non-GNOME dependencies (such as Cairo and Harfbuzz), where pkg-config
|
||||
files or CMake files could not be properly located, set INCLUDE and LIB
|
||||
to ensure that their header files and .lib files can be found respectively.
|
||||
The DLLs of those dependencies should also be in the PATH during the build
|
||||
as well, especially if introspection files are to be built.
|
||||
|
||||
- For GNOME dependencies, the pkg-config files for those dependencies should
|
||||
be searchable by pkg-config (or a compatible tool). Verify this by running
|
||||
$(PKG_CONFIG) --modversion <dependency>.
|
||||
|
||||
- Run the following:
|
||||
meson <path_to_directory_of_this_file> --buildtype=... --prefix=...,
|
||||
where buildtype can be release, debugoptimized, debug or plain. Please
|
||||
refer to the Meson documentation for more details. You may also wish to
|
||||
pass in -Dbroadway_backend=true if building the Broadway GDK backend is
|
||||
desired, and/or pass in -Dbuiltin_immodules=no to build the immodules as
|
||||
standalone DLLs that can be loaded by GTK dynamically. For Visual Studio
|
||||
2010, 2015, 2017 and 2019 builds, you may pass in --backend=vs to generate
|
||||
Visual Studio project files to be used to carry out the builds.
|
||||
|
||||
If you are building with Visual Studio 2008, note the following items as well:
|
||||
|
||||
- For x64 builds, the compiler may hang when building the certain files, due
|
||||
to optimization issues in the compiler. If this happens, use the Windows
|
||||
Task Manager and terminate all cl.exe processes, and the build will fail
|
||||
with the source files that did not finish compiling due to the hang.
|
||||
Look for them in build.ninja in the build directory, and change their compiler
|
||||
flag "/O2" to "/O1", and the compilation and linking should proceed normally.
|
||||
At this time of writing, the following files are known to cause this hang:
|
||||
|
||||
gtk\gtkfilechoosernativewin32.c
|
||||
gtk\gtkfilesystemmodel.c
|
||||
gtk\gtktextsegment.c
|
||||
gtk\gtktextbtree.c
|
||||
gtk\gtkrbtree.c
|
||||
testsuite\gtk\treemodel.c
|
||||
testsuite\gtk\textbuffer.c
|
||||
testsuite\gtk\rbtree.c
|
||||
testsuite\gtk\icontheme.c
|
||||
|
||||
- Upon running install (via "ninja install"), it is likely that
|
||||
gtk-query-immodules-3.0.exe will fail to run as it cannot find msvcr90.dll or
|
||||
msvcr90D.dll. You can ignore this if you did not specify -Dbuiltin_immodules=no
|
||||
when configuring via Meson. If -Dbuiltin_immodules=no is specified, you need to
|
||||
run the following after embedding the manifests as outlined in the next point:
|
||||
|
||||
<gtk_install_prefix>\bin\gtk-query-immodules-3.0.exe > <gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules.cache
|
||||
|
||||
- You will need to run the following upon completing install, from the build
|
||||
directory in the Visual Studio 2008/SDK 6.0 command prompt (third line is not
|
||||
needed unless -Dbuiltin_immodules=no is specified) so that the built binaries
|
||||
can run:
|
||||
|
||||
for /r %f in (*.dll.manifest) do if exist <gtk_install_prefix>\bin\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\bin\%~nf;2
|
||||
for /r %f in (*.exe.manifest) do if exist <gtk_install_prefix>\bin\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\bin\%~nf;1
|
||||
for /r %f in (*.dll.manifest) do if exist <gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules\%~nf;2
|
||||
|
||||
- The more modern visual style for the print dialog is not applied for Visual
|
||||
Studio 2008 builds. Any solutions to this is really appreciated.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
|
45
build-aux/meson/post-install.py
Normal file
45
build-aux/meson/post-install.py
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
if 'DESTDIR' not in os.environ:
|
||||
gtk_api_version = sys.argv[1]
|
||||
gtk_abi_version = sys.argv[2]
|
||||
gtk_bindir = sys.argv[3]
|
||||
gtk_libdir = sys.argv[4]
|
||||
gtk_datadir = sys.argv[5]
|
||||
gtk_query_immodules = os.path.join(gtk_bindir, 'gtk-query-immodules-' + gtk_api_version)
|
||||
|
||||
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
|
||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
|
||||
|
||||
if os.name == 'nt':
|
||||
for lib in ['gdk', 'gtk', 'gailutil']:
|
||||
# Make copy for MSVC-built .lib files, e.g. xxx-3.lib->xxx-3.0.lib
|
||||
installed_lib = os.path.join(gtk_libdir, lib + '-' + gtk_api_version.split('.')[0] + '.lib')
|
||||
installed_lib_dst = os.path.join(gtk_libdir, lib + '-' + gtk_api_version + '.lib')
|
||||
if os.path.isfile(installed_lib):
|
||||
shutil.copyfile(installed_lib, installed_lib_dst)
|
||||
|
||||
print('Compiling GSettings schemas...')
|
||||
subprocess.call(['glib-compile-schemas',
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
subprocess.call(['gtk-update-icon-cache', '-q', '-t' ,'-f',
|
||||
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
||||
|
||||
print('Updating module cache for input methods...')
|
||||
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
||||
immodule_cache_file = open(os.path.join(gtk_moduledir, 'immodules.cache'), 'w')
|
||||
subprocess.call([gtk_query_immodules], stdout=immodule_cache_file)
|
||||
immodule_cache_file.close()
|
||||
|
||||
# Untested!
|
||||
print('Updating module cache for print backends...')
|
||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||
subprocess.call(['gio-querymodules', gtk_printmodule_dir])
|
@@ -10,7 +10,7 @@
|
||||
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
|
||||
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
|
||||
<GtkGdkCommonLibs>pangowin32-1.0.lib;imm32.lib</GtkGdkCommonLibs>
|
||||
<GtkGdkCommonLibs>pangowin32-1.0.lib;fribidi.lib;imm32.lib</GtkGdkCommonLibs>
|
||||
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
|
||||
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
|
||||
<GtkAdditionalLibs>atk-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
|
||||
@@ -26,7 +26,7 @@ nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstall
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\fribidi;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\fribidi;$(GlibEtcInstallRoot)\include"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
AdditionalOptions="/MP"
|
||||
@@ -45,7 +45,7 @@
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGdkCommonLibs"
|
||||
Value="pangowin32-1.0.lib imm32.lib"
|
||||
Value="pangowin32-1.0.lib fribidi.lib imm32.lib"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkBroadwayAdditionalLibs"
|
||||
|
292
config.h.meson
Normal file
292
config.h.meson
Normal file
@@ -0,0 +1,292 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#mesondefine ENABLE_NLS
|
||||
|
||||
/* The prefix for our gettext translation domains. */
|
||||
#mesondefine GETTEXT_PACKAGE
|
||||
|
||||
/* Disable deprecation warnings from glib */
|
||||
#mesondefine GLIB_DISABLE_DEPRECATION_WARNINGS
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
|
||||
|
||||
/* Define if libcloudproviders is available */
|
||||
#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 if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#mesondefine HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
|
||||
*/
|
||||
#mesondefine HAVE_DECL_ISINF
|
||||
|
||||
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
|
||||
*/
|
||||
#mesondefine HAVE_DECL_ISNAN
|
||||
|
||||
/* Define to 1 if you have the <dev/evdev/input.h> header file. */
|
||||
#mesondefine HAVE_DEV_EVDEV_INPUT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#mesondefine HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `exp2' function. */
|
||||
#mesondefine HAVE_EXP2
|
||||
|
||||
/* Define to 1 if you have the `flockfile' function. */
|
||||
#mesondefine HAVE_FLOCKFILE
|
||||
|
||||
/* 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
|
||||
|
||||
/* defines whether we have HarfBuzz */
|
||||
#mesondefine HAVE_HARFBUZZ
|
||||
|
||||
/* Define to 1 if you have the `httpGetAuthString' function. */
|
||||
#mesondefine HAVE_HTTPGETAUTHSTRING
|
||||
|
||||
/* Define if cups http_t authstring field is accessible */
|
||||
#mesondefine HAVE_HTTP_AUTHSTRING
|
||||
|
||||
/* 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 <linux/input.h> header file. */
|
||||
#mesondefine HAVE_LINUX_INPUT_H
|
||||
|
||||
/* Define to 1 if you have the <linux/memfd.h> header file. */
|
||||
#mesondefine HAVE_LINUX_MEMFD_H
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#mesondefine HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if you have the `log2' function. */
|
||||
#mesondefine HAVE_LOG2
|
||||
|
||||
/* 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 a working `mmap' system call. */
|
||||
#mesondefine HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the `nearbyint' function. */
|
||||
#mesondefine HAVE_NEARBYINT
|
||||
|
||||
/* defines whether we have pangoft2 */
|
||||
#mesondefine HAVE_PANGOFT
|
||||
|
||||
/* Define to 1 if libpapi available */
|
||||
#mesondefine HAVE_PAPI
|
||||
|
||||
/* 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 `rint' function. */
|
||||
#mesondefine HAVE_RINT
|
||||
|
||||
/* Define to 1 if you have the `round' function. */
|
||||
#mesondefine HAVE_ROUND
|
||||
|
||||
/* Define to 1 if you have the `sincos' function. */
|
||||
#mesondefine HAVE_SINCOS
|
||||
|
||||
/* Define to 1 if solaris xinerama is available */
|
||||
#mesondefine HAVE_SOLARIS_XINERAMA
|
||||
|
||||
/* 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
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#mesondefine HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if sys/sysinfo.h is available */
|
||||
#mesondefine HAVE_SYS_SYSINFO_H
|
||||
|
||||
/* Define to 1 if sys/systeminfo.h is available */
|
||||
#mesondefine HAVE_SYS_SYSTEMINFO_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 `trunc' function. */
|
||||
#mesondefine HAVE_TRUNC
|
||||
|
||||
/* 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 1 if xinerama is available */
|
||||
#mesondefine HAVE_XINERAMA
|
||||
|
||||
/* 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 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 1 if you have the `_NSGetEnviron' function. */
|
||||
#mesondefine HAVE__NSGETENVIRON
|
||||
|
||||
/* Define if <X11/extensions/XIproto.h> needed for xReply */
|
||||
#mesondefine NEED_XIPROTO_H_FOR_XREPLY
|
||||
|
||||
/* 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
|
||||
|
||||
/* The size of `DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY', as computed by sizeof.
|
||||
*/
|
||||
#mesondefine SIZEOF_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY
|
||||
|
||||
/* Define to 1 if XInput 2.0 is available */
|
||||
#mesondefine XINPUT_2
|
||||
|
||||
/* Define to 1 if XInput 2.2 is available */
|
||||
#mesondefine XINPUT_2_2
|
||||
|
||||
/* 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
|
||||
|
||||
#mesondefine GTK_DATADIR
|
||||
|
||||
#mesondefine GTK_LIBDIR
|
||||
|
||||
#mesondefine GTK_PRINT_BACKENDS
|
||||
|
||||
/* Define the location where the catalogs will be installed */
|
||||
#mesondefine GTK_LOCALEDIR
|
||||
|
||||
#mesondefine ISO_CODES_PREFIX
|
@@ -29,9 +29,6 @@
|
||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||
/* #undef HAVE_CRT_EXTERNS_H */
|
||||
|
||||
/* Define to 1 if CUPS 1.2 API is available */
|
||||
/* #undef HAVE_CUPS_API_1_2 */
|
||||
|
||||
/* Define to 1 if you have the `dcgettext' function. */
|
||||
#define HAVE_DCGETTEXT 1
|
||||
|
||||
@@ -77,9 +74,6 @@
|
||||
/* Define if gio-unix is available */
|
||||
/* #undef HAVE_GIO_UNIX */
|
||||
|
||||
/* Have GNU ftw */
|
||||
/* #undef HAVE_GNU_FTW */
|
||||
|
||||
/* Define to 1 if you have the `httpGetAuthString' function. */
|
||||
/* #undef HAVE_HTTPGETAUTHSTRING */
|
||||
|
||||
@@ -157,9 +151,6 @@
|
||||
/* Define to 1 if sincos() is available */
|
||||
/* #undef HAVE_SINCOS */
|
||||
|
||||
/* Have the sockaddr_un.sun_len member */
|
||||
/* #undef HAVE_SOCKADDR_UN_SUN_LEN */
|
||||
|
||||
/* Define to 1 if solaris xinerama is available */
|
||||
/* #undef HAVE_SOLARIS_XINERAMA */
|
||||
|
||||
|
92
configure.ac
92
configure.ac
@@ -10,8 +10,8 @@
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [24])
|
||||
m4_define([gtk_micro_version], [4])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_micro_version], [8])
|
||||
m4_define([gtk_interface_age], [4])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -55,6 +55,7 @@ m4_define([glib_max_allowed_version], m4_join([_], [GLIB_VERSION], glib_required
|
||||
GLIB_VERSION_CFLAGS="-DGLIB_MIN_REQUIRED_VERSION=glib_min_required_version -DGLIB_MAX_ALLOWED_VERSION=glib_max_allowed_version"
|
||||
|
||||
m4_define([pango_required_version], [1.41.0])
|
||||
m4_define([fribidi_required_version], [0.19.7])
|
||||
m4_define([atk_required_version], [2.15.1])
|
||||
m4_define([cairo_required_version], [1.14.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
||||
@@ -585,6 +586,7 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
[glib-2.0 >= glib_required_version dnl
|
||||
atk >= atk_required_version dnl
|
||||
pango >= pango_required_version dnl
|
||||
fribidi >= fribidi_required_version dnl
|
||||
cairo >= cairo_required_version dnl
|
||||
cairo-gobject >= cairo_required_version dnl
|
||||
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
|
||||
@@ -749,32 +751,6 @@ AS_CASE([$host_os],
|
||||
[AC_MSG_ERROR([DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY is unavailable])],
|
||||
[AC_MSG_RESULT([DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY is not OK])]
|
||||
)
|
||||
AC_MSG_CHECKING([for SetupDiGetDevicePropertyW])
|
||||
gtk_save_LIBS="$LIBS"
|
||||
LIBS="-lsetupapi $LIBS"
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#include <windows.h>
|
||||
#include <devpropdef.h>
|
||||
#include <setupapi.h>
|
||||
],
|
||||
[return SetupDiGetDevicePropertyW(NULL, NULL, NULL, NULL, NULL, 0, NULL, 0);],
|
||||
[have_SetupDiGetDevicePropertyW=yes],
|
||||
[have_SetupDiGetDevicePropertyW=no]
|
||||
)
|
||||
AS_IF(
|
||||
[test x$have_SetupDiGetDevicePropertyW = xyes],
|
||||
[
|
||||
AC_DEFINE(
|
||||
[HAVE_SETUP_DI_GET_DEVICE_PROPERTY_W],
|
||||
[1],
|
||||
[Define to 1 if SetupDiGetDevicePropertyW() is available]
|
||||
)
|
||||
]
|
||||
)
|
||||
AC_MSG_RESULT([$have_SetupDiGetDevicePropertyW])
|
||||
LIBS="$gtk_save_LIBS"
|
||||
],
|
||||
[]
|
||||
)
|
||||
@@ -839,19 +815,6 @@ AC_CHECK_HEADERS(ftw.h,
|
||||
AC_DEFINE(HAVE_FTW_H, 1,
|
||||
[Define to 1 if ftw.h is available]))
|
||||
|
||||
AC_MSG_CHECKING([for GNU ftw extensions])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _XOPEN_SOURCE 500
|
||||
#define _GNU_SOURCE
|
||||
#include <ftw.h>]],
|
||||
[[int flags = FTW_ACTIONRETVAL;]])],
|
||||
[gtk_ok=yes],[gtk_ok=no])
|
||||
if test $gtk_ok = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
#
|
||||
# Disable deprecation checks for all libraries we depend on on stable branches.
|
||||
# This is so newer versions of those libraries don't cause more warnings with
|
||||
@@ -1375,7 +1338,7 @@ CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
|
||||
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES"
|
||||
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES fribidi >= fribidi_required_version"
|
||||
|
||||
PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
|
||||
@@ -1409,7 +1372,7 @@ fi
|
||||
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
|
||||
|
||||
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
|
||||
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
|
||||
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version fribidi >= fribidi_required_version"
|
||||
if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
|
||||
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
|
||||
fi
|
||||
@@ -1514,37 +1477,6 @@ AC_SUBST(GTK_XIM_FLAGS)
|
||||
GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
|
||||
AC_SUBST(GDK_PIXBUF_LIBS)
|
||||
|
||||
########################
|
||||
# Checks needed for gail
|
||||
########################
|
||||
|
||||
old_LIBS="$LIBS"
|
||||
dnl Checks for inet libraries:
|
||||
AC_SEARCH_LIBS(gethostent, nsl)
|
||||
AC_SEARCH_LIBS(setsockopt, socket)
|
||||
AC_SEARCH_LIBS(connect, inet)
|
||||
|
||||
dnl check for the sockaddr_un.sun_len member
|
||||
AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
|
||||
[struct_sockaddr_un_sun_len=true],
|
||||
[struct_sockaddr_un_suin_len=false],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/un.h>]
|
||||
)
|
||||
case $struct_sockaddr_un_sun_len in
|
||||
true)
|
||||
AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
|
||||
[Have the sockaddr_un.sun_len member])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
GAIL_INET_LIBS="$LIBS"
|
||||
AC_SUBST([GAIL_INET_LIBS])
|
||||
|
||||
LIBS="$old_LIBS"
|
||||
|
||||
################################################################
|
||||
# Printing system checks
|
||||
################################################################
|
||||
@@ -1576,15 +1508,8 @@ else
|
||||
CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
|
||||
CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
|
||||
|
||||
if test $CUPS_API_MAJOR -lt 1 -o \
|
||||
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 2; then
|
||||
AC_MSG_ERROR([CUPS >= 1.2 not found])
|
||||
fi
|
||||
if test $CUPS_API_MAJOR -gt 1 -o \
|
||||
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
|
||||
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
|
||||
[Define to 1 if CUPS 1.6 API is available])
|
||||
have_cups_api_1_6=yes
|
||||
if test $CUPS_API_MAJOR -lt 2; then
|
||||
AC_MSG_ERROR([CUPS >= 2.0 not found])
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_API_MAJOR)
|
||||
@@ -2025,6 +1950,7 @@ docs/reference/gdk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
docs/reference/gtk/gtk3.types
|
||||
docs/reference/gtk/version.xml
|
||||
docs/reference/gtk/getting_started.xml
|
||||
docs/reference/libgail-util/Makefile
|
||||
docs/reference/libgail-util/version.xml
|
||||
docs/tools/Makefile
|
||||
|
@@ -3,4 +3,7 @@ include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = gtk-demo widget-factory icon-browser
|
||||
|
||||
EXTRA_DIST = \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -117,7 +117,9 @@ EXTRA_DIST += \
|
||||
demo.gresource.xml \
|
||||
$(resource_files) \
|
||||
org.gtk.Demo.gschema.xml \
|
||||
demos.h.win32
|
||||
demos.h.win32 \
|
||||
meson.build \
|
||||
geninclude.py
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.Demo.gschema.xml
|
||||
|
@@ -50,7 +50,6 @@
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="font">Sans 12</property>
|
||||
<property name="level">style|size|variations|features</property>
|
||||
<signal name="font-set" handler="font_changed" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
|
108
demos/gtk-demo/geninclude.py
Executable file
108
demos/gtk-demo/geninclude.py
Executable file
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
from collections import *
|
||||
|
||||
out_file = sys.argv[1]
|
||||
in_files = sys.argv[2:]
|
||||
|
||||
|
||||
file_output = """
|
||||
typedef GtkWidget *(*GDoDemoFunc) (GtkWidget *do_widget);
|
||||
|
||||
typedef struct _Demo Demo;
|
||||
|
||||
struct _Demo
|
||||
{
|
||||
gchar *name;
|
||||
gchar *title;
|
||||
gchar *filename;
|
||||
GDoDemoFunc func;
|
||||
Demo *children;
|
||||
};
|
||||
|
||||
"""
|
||||
|
||||
# Demo = namedtuple('Demo', ['name', 'title', 'file', 'func'])
|
||||
|
||||
demos = []
|
||||
|
||||
for demo_file in in_files:
|
||||
filename = demo_file[demo_file.rfind('/')+1:]
|
||||
demo_name = filename.replace(".c", "")
|
||||
with open(demo_file, 'r') as f:
|
||||
title = f.readline().replace("/*", "").strip()
|
||||
|
||||
|
||||
file_output += "GtkWidget *do_" + demo_name + " (GtkWidget *do_widget);\n"
|
||||
# demos += Demo(name = demo_name,
|
||||
# title = title,
|
||||
# file = demo_file,
|
||||
# func = "do_" + title)
|
||||
demos.append((demo_name, title, filename, "do_" + demo_name, -1))
|
||||
|
||||
# Generate a List of "Parent names"
|
||||
parents = []
|
||||
parent_ids = []
|
||||
parent_index = 0
|
||||
for demo in demos:
|
||||
if "/" in demo[1]:
|
||||
slash_index = demo[1].index('/')
|
||||
parent_name = demo[1][:slash_index]
|
||||
do_break = False
|
||||
|
||||
# Check for duplicates
|
||||
if not parent_name in parents:
|
||||
parents.append(parent_name)
|
||||
parent_ids.append(parent_index)
|
||||
demos.append(("NULL", parent_name, "NULL", "NULL", parent_index))
|
||||
|
||||
parent_index = parent_index + 1
|
||||
|
||||
|
||||
# For every child with a parent, generate a list of child demos
|
||||
i = 0
|
||||
for parent in parents:
|
||||
id = parent_ids[i]
|
||||
file_output += "\nDemo child" + str(id) + "[] = {\n"
|
||||
# iterate over all demos and check if the name starts with the given parent name
|
||||
for child in demos:
|
||||
if child[1].startswith(parent + "/"):
|
||||
title = child[1][child[1].rfind('/') + 1:]
|
||||
file_output += " { \"" + child[0] + "\", \"" + title + "\", \"" + child[2] + "\", " + child[3] + ", NULL },\n"
|
||||
|
||||
|
||||
file_output += " { NULL }\n};\n"
|
||||
i = i + 1
|
||||
|
||||
|
||||
# Sort demos by title
|
||||
demos = sorted(demos, key=lambda x: x[1])
|
||||
|
||||
file_output += "\nDemo gtk_demos[] = {\n"
|
||||
for demo in demos:
|
||||
# Do not generate one of these for demos with a parent demo
|
||||
if "/" not in demo[1]:
|
||||
child_array = "NULL"
|
||||
name = demo[0];
|
||||
title = demo[1];
|
||||
file = demo[2]
|
||||
if name != "NULL":
|
||||
name = "\"" + name + "\""
|
||||
if title != "NULL":
|
||||
title = "\"" + title + "\""
|
||||
if file != "NULL":
|
||||
file = "\"" + file + "\""
|
||||
|
||||
if demo[4] != -1:
|
||||
child_array = "child" + str(demo[4])
|
||||
file_output += " { " + name + ", " + title + ", " + file + ", " + demo[3] + ", " + child_array + " },\n"
|
||||
|
||||
file_output += " { NULL }\n};\n"
|
||||
|
||||
ofile = open(out_file, "w")
|
||||
ofile.write(file_output)
|
||||
ofile.close()
|
148
demos/gtk-demo/meson.build
Normal file
148
demos/gtk-demo/meson.build
Normal file
@@ -0,0 +1,148 @@
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
demos = files([
|
||||
'application_demo.c',
|
||||
'assistant.c',
|
||||
'builder.c',
|
||||
'button_box.c',
|
||||
'changedisplay.c',
|
||||
'clipboard.c',
|
||||
'colorsel.c',
|
||||
'combobox.c',
|
||||
'css_accordion.c',
|
||||
'css_basics.c',
|
||||
'css_blendmodes.c',
|
||||
'css_multiplebgs.c',
|
||||
'css_pixbufs.c',
|
||||
'css_shadows.c',
|
||||
'cursors.c',
|
||||
'dialog.c',
|
||||
'drawingarea.c',
|
||||
'editable_cells.c',
|
||||
'entry_buffer.c',
|
||||
'entry_completion.c',
|
||||
'event_axes.c',
|
||||
'expander.c',
|
||||
'filtermodel.c',
|
||||
'fishbowl.c',
|
||||
'foreigndrawing.c',
|
||||
'gestures.c',
|
||||
'glarea.c',
|
||||
'headerbar.c',
|
||||
'hypertext.c',
|
||||
'iconview.c',
|
||||
'iconview_edit.c',
|
||||
'images.c',
|
||||
'infobar.c',
|
||||
'links.c',
|
||||
'listbox.c',
|
||||
'flowbox.c',
|
||||
'list_store.c',
|
||||
'markup.c',
|
||||
'menus.c',
|
||||
'modelbutton.c',
|
||||
'offscreen_window.c',
|
||||
'offscreen_window2.c',
|
||||
'overlay.c',
|
||||
'overlay2.c',
|
||||
'paint.c',
|
||||
'panes.c',
|
||||
'pickers.c',
|
||||
'pixbufs.c',
|
||||
'popover.c',
|
||||
'printing.c',
|
||||
'revealer.c',
|
||||
'rotated_text.c',
|
||||
'scale.c',
|
||||
'search_entry.c',
|
||||
'search_entry2.c',
|
||||
'shortcuts.c',
|
||||
'sidebar.c',
|
||||
'sizegroup.c',
|
||||
'spinbutton.c',
|
||||
'spinner.c',
|
||||
'stack.c',
|
||||
'tabs.c',
|
||||
'textmask.c',
|
||||
'textview.c',
|
||||
'textscroll.c',
|
||||
'theming_style_classes.c',
|
||||
'toolpalette.c',
|
||||
'transparent.c',
|
||||
'tree_store.c',
|
||||
])
|
||||
|
||||
|
||||
gtkdemo_deps = [libgtk_dep]
|
||||
|
||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||
demos += files('font_features.c')
|
||||
gtkdemo_deps += [harfbuzz_dep, pangoft_dep]
|
||||
endif
|
||||
|
||||
if os_unix
|
||||
demos += files('pagesetup.c')
|
||||
endif
|
||||
|
||||
gtkdemo_sources = demos + files([
|
||||
'gtkfishbowl.c',
|
||||
'gtkfishbowl.h',
|
||||
'main.c',
|
||||
])
|
||||
|
||||
|
||||
geninclude = find_program('geninclude.py')
|
||||
demos_h = custom_target(
|
||||
'gtk3 demo header',
|
||||
output : 'demos.h',
|
||||
input : demos,
|
||||
command : [geninclude, '@OUTPUT@', '@INPUT@'],
|
||||
)
|
||||
|
||||
gtkdemo_resources = gnome.compile_resources(
|
||||
'gtkdemo_resources',
|
||||
'demo.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
gtkdemo = executable(
|
||||
'gtk3-demo',
|
||||
gtkdemo_sources,
|
||||
demos_h,
|
||||
gtkdemo_resources,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories : confinc,
|
||||
install: true
|
||||
)
|
||||
|
||||
gtkapplicationdemo = executable(
|
||||
'gtk3-demo-application',
|
||||
'application.c',
|
||||
demos_h,
|
||||
gtkdemo_resources,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories : confinc,
|
||||
install: true
|
||||
)
|
||||
|
||||
gtk_settings_schemas = [
|
||||
'org.gtk.Settings.FileChooser.gschema.xml',
|
||||
'org.gtk.Settings.ColorChooser.gschema.xml',
|
||||
'org.gtk.Settings.EmojiChooser.gschema.xml',
|
||||
'org.gtk.Settings.Debug.gschema.xml',
|
||||
]
|
||||
|
||||
foreach s: [ '16', '22', '24', '32', '48', '256']
|
||||
icon_destdir = join_paths(gtk_datadir, 'icons', 'hicolor', '@0@x@0@'.format(s), 'apps')
|
||||
icons = [join_paths('data', '@0@x@0@'.format(s), 'gtk3-demo.png'),
|
||||
join_paths('data', '@0@x@0@'.format(s), 'gtk3-demo-symbolic.symbolic.png')]
|
||||
install_data(icons, install_dir: icon_destdir)
|
||||
endforeach
|
||||
|
||||
# desktop file
|
||||
install_data('gtk3-demo.desktop', install_dir: gtk_applicationsdir)
|
||||
|
||||
# GSettings
|
||||
install_data('org.gtk.Demo.gschema.xml', install_dir: gtk_schemasdir)
|
||||
gnome.compile_schemas(depend_files: files(['org.gtk.Demo.gschema.xml']))
|
@@ -34,7 +34,8 @@ EXTRA_DIST = \
|
||||
menus.ui \
|
||||
iconbrowser.gresource.xml \
|
||||
window.ui \
|
||||
icon.list
|
||||
icon.list \
|
||||
meson.build
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gtk3-icon-browser
|
||||
|
24
demos/icon-browser/meson.build
Normal file
24
demos/icon-browser/meson.build
Normal file
@@ -0,0 +1,24 @@
|
||||
iconbrowser_sources = [
|
||||
'main.c',
|
||||
'iconbrowserapp.c',
|
||||
'iconbrowserwin.c',
|
||||
'iconstore.c'
|
||||
]
|
||||
|
||||
iconbrowser_resources = gnome.compile_resources(
|
||||
'iconbrowser_resources',
|
||||
'iconbrowser.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
iconbrowser = executable(
|
||||
'gtk3-icon-browser',
|
||||
iconbrowser_sources,
|
||||
iconbrowser_resources,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories : confinc,
|
||||
install: true
|
||||
)
|
||||
|
||||
# desktop file
|
||||
install_data('gtk3-icon-browser.desktop', install_dir: gtk_applicationsdir)
|
3
demos/meson.build
Normal file
3
demos/meson.build
Normal file
@@ -0,0 +1,3 @@
|
||||
subdir('icon-browser')
|
||||
subdir('widget-factory')
|
||||
subdir('gtk-demo')
|
@@ -66,6 +66,7 @@ EXTRA_DIST += \
|
||||
help-overlay.ui \
|
||||
widget-factory.gresource.xml \
|
||||
data/source.svg \
|
||||
data/symbolic-source.svg
|
||||
data/symbolic-source.svg \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
29
demos/widget-factory/meson.build
Normal file
29
demos/widget-factory/meson.build
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
widgetfactory_sources = [
|
||||
'widget-factory.c'
|
||||
]
|
||||
|
||||
widgetfactory_resources = gnome.compile_resources(
|
||||
'widgetfactory_resources',
|
||||
'widget-factory.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
foreach s: [ '16', '22', '24', '32', '48', '256']
|
||||
icon_destdir = join_paths(gtk_datadir, 'icons', 'hicolor', '@0@x@0@'.format(s), 'apps')
|
||||
icons = [join_paths('data', '@0@x@0@'.format(s), 'gtk3-widget-factory.png'),
|
||||
join_paths('data', '@0@x@0@'.format(s), 'gtk3-widget-factory-symbolic.symbolic.png')]
|
||||
install_data(icons, install_dir: icon_destdir)
|
||||
endforeach
|
||||
|
||||
widget_factory = executable(
|
||||
'gtk3-widget-factory',
|
||||
widgetfactory_sources,
|
||||
widgetfactory_resources,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories : confinc,
|
||||
install: true
|
||||
)
|
||||
|
||||
# desktop file
|
||||
install_data('gtk3-widget-factory.desktop', install_dir: gtk_applicationsdir)
|
@@ -211,15 +211,15 @@ activate_about (GSimpleAction *action,
|
||||
gtk_get_micro_version ());
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
||||
"program-name", "GTK+ Widget Factory",
|
||||
"program-name", "GTK Widget Factory",
|
||||
"version", version,
|
||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
||||
"copyright", "© 1997—2019 The GTK Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ themes and widgets",
|
||||
"comments", "Program to demonstrate GTK themes and widgets",
|
||||
"authors", authors,
|
||||
"logo-icon-name", "gtk3-widget-factory",
|
||||
"title", "About GTK+ Widget Factory",
|
||||
"title", "About GTK Widget Factory",
|
||||
NULL);
|
||||
|
||||
g_free (version);
|
||||
@@ -246,6 +246,14 @@ activate_quit (GSimpleAction *action,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_inspector (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
gtk_window_set_interactive_debugging (TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
|
||||
{
|
||||
@@ -1968,6 +1976,7 @@ main (int argc, char *argv[])
|
||||
static GActionEntry app_entries[] = {
|
||||
{ "about", activate_about, NULL, NULL, NULL },
|
||||
{ "quit", activate_quit, NULL, NULL, NULL },
|
||||
{ "inspector", activate_inspector, NULL, NULL, NULL },
|
||||
{ "main", NULL, "s", "'steak'", NULL },
|
||||
{ "wine", NULL, NULL, "false", NULL },
|
||||
{ "beer", NULL, NULL, "false", NULL },
|
||||
|
@@ -17,6 +17,10 @@
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Inspector</attribute>
|
||||
<attribute name="action">app.inspector</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
||||
<attribute name="action">win.show-help-overlay</attribute>
|
||||
|
@@ -5,4 +5,7 @@ SUBDIRS = gdk gtk libgail-util
|
||||
|
||||
GITIGNOREFILES = */*.1
|
||||
|
||||
EXTRA_DIST += \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -198,7 +198,9 @@ endif
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
EXTRA_DIST += \
|
||||
version.xml.in \
|
||||
meson.build
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
TESTS_ENVIRONMENT = cd $(srcdir) && \
|
||||
|
@@ -1,8 +1,9 @@
|
||||
|
||||
# GdkAtom is an opaque typedef
|
||||
<STRUCT>
|
||||
<TYPEDEF>
|
||||
<NAME>GdkAtom</NAME>
|
||||
</STRUCT>
|
||||
typedef struct _GdkAtom *GdkAtom;
|
||||
</TYPEDEF>
|
||||
|
||||
<MACRO>
|
||||
<NAME>GDK_WINDOWING_X11</NAME>
|
||||
|
180
docs/reference/gdk/meson.build
Normal file
180
docs/reference/gdk/meson.build
Normal file
@@ -0,0 +1,180 @@
|
||||
private_headers = [
|
||||
'gdkintl.h',
|
||||
'gdkmarshalers.h',
|
||||
'gdkkeysyms.h',
|
||||
'gdkinternals.h',
|
||||
'gdkprivate.h',
|
||||
'gdk-private.h',
|
||||
'gdkapplaunchcontextprivate.h',
|
||||
'gdkcursorprivate.h',
|
||||
'gdkdevicemanagerprivate.h',
|
||||
'gdkdeviceprivate.h',
|
||||
'gdkdisplaymanagerprivate.h',
|
||||
'gdkdisplayprivate.h',
|
||||
'gdkdndprivate.h',
|
||||
'gdkframeclockprivate.h',
|
||||
'gdkglcontextprivate.h',
|
||||
'gdkkeysprivate.h',
|
||||
'gdkscreenprivate.h',
|
||||
'gdkseatdefaultprivate.h',
|
||||
'gdkseatprivate.h',
|
||||
'gdkvisualprivate.h',
|
||||
'keyname-table.h',
|
||||
'win32',
|
||||
'x11',
|
||||
'quartz',
|
||||
'broadway',
|
||||
'wayland',
|
||||
]
|
||||
|
||||
images = [
|
||||
'images/rotated-text.png',
|
||||
'images/X_cursor.png',
|
||||
'images/arrow.png',
|
||||
'images/based_arrow_down.png',
|
||||
'images/based_arrow_up.png',
|
||||
'images/boat.png',
|
||||
'images/bogosity.png',
|
||||
'images/bottom_left_corner.png',
|
||||
'images/bottom_right_corner.png',
|
||||
'images/bottom_side.png',
|
||||
'images/bottom_tee.png',
|
||||
'images/box_spiral.png',
|
||||
'images/center_ptr.png',
|
||||
'images/circle.png',
|
||||
'images/clock.png',
|
||||
'images/coffee_mug.png',
|
||||
'images/cross.png',
|
||||
'images/cross_reverse.png',
|
||||
'images/crosshair.png',
|
||||
'images/diamond_cross.png',
|
||||
'images/dot.png',
|
||||
'images/dotbox.png',
|
||||
'images/double_arrow.png',
|
||||
'images/draft_large.png',
|
||||
'images/draft_small.png',
|
||||
'images/draped_box.png',
|
||||
'images/exchange.png',
|
||||
'images/fleur.png',
|
||||
'images/gobbler.png',
|
||||
'images/gumby.png',
|
||||
'images/hand1.png',
|
||||
'images/hand2.png',
|
||||
'images/heart.png',
|
||||
'images/icon.png',
|
||||
'images/iron_cross.png',
|
||||
'images/left_ptr.png',
|
||||
'images/left_side.png',
|
||||
'images/left_tee.png',
|
||||
'images/leftbutton.png',
|
||||
'images/ll_angle.png',
|
||||
'images/lr_angle.png',
|
||||
'images/man.png',
|
||||
'images/middlebutton.png',
|
||||
'images/mouse.png',
|
||||
'images/pencil.png',
|
||||
'images/pirate.png',
|
||||
'images/plus.png',
|
||||
'images/question_arrow.png',
|
||||
'images/right_ptr.png',
|
||||
'images/right_side.png',
|
||||
'images/right_tee.png',
|
||||
'images/rightbutton.png',
|
||||
'images/rtl_logo.png',
|
||||
'images/sailboat.png',
|
||||
'images/sb_down_arrow.png',
|
||||
'images/sb_h_double_arrow.png',
|
||||
'images/sb_left_arrow.png',
|
||||
'images/sb_right_arrow.png',
|
||||
'images/sb_up_arrow.png',
|
||||
'images/sb_v_double_arrow.png',
|
||||
'images/shuttle.png',
|
||||
'images/sizing.png',
|
||||
'images/spider.png',
|
||||
'images/spraycan.png',
|
||||
'images/star.png',
|
||||
'images/target.png',
|
||||
'images/tcross.png',
|
||||
'images/top_left_arrow.png',
|
||||
'images/top_left_corner.png',
|
||||
'images/top_right_corner.png',
|
||||
'images/top_side.png',
|
||||
'images/top_tee.png',
|
||||
'images/trek.png',
|
||||
'images/ul_angle.png',
|
||||
'images/umbrella.png',
|
||||
'images/ur_angle.png',
|
||||
'images/watch.png',
|
||||
'images/xterm.png',
|
||||
'images/alias_cursor.png',
|
||||
'images/all_scroll_cursor.png',
|
||||
'images/cell_cursor.png',
|
||||
'images/col_resize_cursor.png',
|
||||
'images/copy_cursor.png',
|
||||
'images/crosshair_cursor.png',
|
||||
'images/default_cursor.png',
|
||||
'images/e_resize_cursor.png',
|
||||
'images/ew_resize_cursor.png',
|
||||
'images/grabbing_cursor.png',
|
||||
'images/grab_cursor.png',
|
||||
'images/hand_cursor.png',
|
||||
'images/context_menu_cursor.png',
|
||||
'images/help_cursor.png',
|
||||
'images/move_cursor.png',
|
||||
'images/ne_resize_cursor.png',
|
||||
'images/nesw_resize_cursor.png',
|
||||
'images/no_drop_cursor.png',
|
||||
'images/not_allowed_cursor.png',
|
||||
'images/n_resize_cursor.png',
|
||||
'images/ns_resize_cursor.png',
|
||||
'images/nw_resize_cursor.png',
|
||||
'images/nwse_resize_cursor.png',
|
||||
'images/pointer_cursor.png',
|
||||
'images/progress_cursor.png',
|
||||
'images/row_resize_cursor.png',
|
||||
'images/se_resize_cursor.png',
|
||||
'images/s_resize_cursor.png',
|
||||
'images/sw_resize_cursor.png',
|
||||
'images/text_cursor.png',
|
||||
'images/vertical_text_cursor.png',
|
||||
'images/wait_cursor.png',
|
||||
'images/w_resize_cursor.png',
|
||||
'images/X_cursor.png',
|
||||
'images/zoom_in_cursor.png',
|
||||
'images/zoom_out_cursor.png',
|
||||
]
|
||||
|
||||
src_dir = [ gdkinc ]
|
||||
|
||||
if x11_enabled
|
||||
src_dir += [ gdkx11_inc ]
|
||||
endif
|
||||
|
||||
if wayland_enabled
|
||||
src_dir += [ gdkwayland_inc ]
|
||||
endif
|
||||
|
||||
if get_option('gtk_doc')
|
||||
|
||||
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
|
||||
|
||||
gnome.gtkdoc('gdk3',
|
||||
mode: 'none',
|
||||
main_xml: 'gdk-docs.sgml',
|
||||
src_dir: src_dir,
|
||||
dependencies: libgdk_dep,
|
||||
gobject_typesfile: join_paths(meson.current_source_dir(), 'gdk3.types'),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
],
|
||||
html_assets: images,
|
||||
install: true)
|
||||
endif
|
@@ -276,7 +276,7 @@ GTKDOC_LIBS = \
|
||||
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--output-format=xml --name-space=gtk
|
||||
MKDB_OPTIONS=--output-format=xml --name-space=gtk --default-includes=gtk/gtk.h
|
||||
|
||||
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
|
||||
content_files = \
|
||||
@@ -287,7 +287,7 @@ content_files = \
|
||||
css-overview.xml \
|
||||
css-properties.xml \
|
||||
drawing-model.xml \
|
||||
getting_started.xml \
|
||||
$(builddir)/getting_started.xml \
|
||||
glossary.xml \
|
||||
gtk3-demo-application.xml \
|
||||
gtk3-demo.xml \
|
||||
@@ -324,7 +324,7 @@ content_files = \
|
||||
expand_content_files = \
|
||||
compiling.sgml \
|
||||
drawing-model.xml \
|
||||
getting_started.xml \
|
||||
$(builddir)/getting_started.xml \
|
||||
glossary.xml \
|
||||
input-handling.xml \
|
||||
migrating-2to3.xml \
|
||||
@@ -496,7 +496,7 @@ endif
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in gtk3.types.in
|
||||
EXTRA_DIST += version.xml.in gtk3.types.in getting_started.xml.in
|
||||
|
||||
########################################################################
|
||||
|
||||
@@ -543,7 +543,9 @@ endif
|
||||
|
||||
MAINTAINERCLEANFILES = $(man_MANS) $(BUILT_SOURCES)
|
||||
|
||||
EXTRA_DIST += $(man_MANS)
|
||||
EXTRA_DIST += \
|
||||
$(man_MANS) \
|
||||
meson.build
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
TESTS_ENVIRONMENT = cd $(srcdir) && \
|
||||
|
@@ -44,7 +44,7 @@
|
||||
|
||||
<informalexample>
|
||||
<para>Create a new file with the following content named <filename>example-0.c.</filename></para>
|
||||
<programlisting><xi:include href="../../../../examples/window-default.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/window-default.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>
|
||||
@@ -153,7 +153,7 @@
|
||||
<example id="gtk-getting-started-hello-world">
|
||||
<title>Hello World in GTK+</title>
|
||||
<para>Create a new file with the following content named example-1.c.</para>
|
||||
<programlisting><xi:include href="../../../../examples/hello-world.c" parse="text">
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/hello-world.c" parse="text">
|
||||
<xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</example>
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<example id="gtk-getting-started-grid-packing">
|
||||
<title>Packing buttons</title>
|
||||
<para>Create a new file with the following content named example-2.c.</para>
|
||||
<programlisting><xi:include href="../../../../examples/grid-packing.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/grid-packing.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</example>
|
||||
<para>
|
||||
You can compile the program above with GCC using:
|
||||
@@ -257,9 +257,9 @@
|
||||
<example>
|
||||
<title>Packing buttons with GtkBuilder</title>
|
||||
<para>Create a new file with the following content named example-3.c.</para>
|
||||
<programlisting><xi:include href="../../../../examples/builder.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/builder.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<para>Create a new file with the following content named builder.ui.</para>
|
||||
<programlisting><xi:include href="../../../../examples/builder.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/builder.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</example>
|
||||
<para>
|
||||
You can compile the program above with GCC using:
|
||||
@@ -346,7 +346,7 @@
|
||||
of our application class.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application1/main.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application1/main.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>All the application logic is in the application class, which
|
||||
@@ -364,7 +364,7 @@
|
||||
GIO <ulink url="https://developer.gnome.org/gio/2.36/GApplication.html#GApplication.description">documentation</ulink>.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application1/exampleapp.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application1/exampleapp.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>Another important class that is part of the application support
|
||||
@@ -373,7 +373,7 @@
|
||||
window.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application1/exampleappwin.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application1/exampleappwin.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>As part of the initial setup of our application, we also
|
||||
@@ -388,7 +388,7 @@
|
||||
</informalfigure>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application1/exampleapp.desktop" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application1/exampleapp.desktop" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>Note that <replaceable>@<!-- -->bindir@</replaceable> needs to be replaced
|
||||
@@ -420,7 +420,7 @@
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application2/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application2/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>To make use of this file in our application, we revisit
|
||||
@@ -460,7 +460,7 @@ example_app_window_class_init (ExampleAppWindowClass *class)
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application2/exampleapp.gresource.xml" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application2/exampleapp.gresource.xml" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>This file has to be converted into a C source file that will be
|
||||
@@ -598,7 +598,7 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
in a ui file, and add it as a resource to our binary.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application4/app-menu.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application4/app-menu.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>To associate the app menu with the application, we have to call
|
||||
@@ -697,7 +697,7 @@ example_app_class_init (ExampleAppClass *class)
|
||||
GSettings requires a schema that describes our settings:</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application5/org.gtk.exampleapp.gschema.xml" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application5/org.gtk.exampleapp.gschema.xml" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>Before we can make use of this schema in our application,
|
||||
@@ -749,13 +749,13 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
<para>Lets start with the template.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application6/prefs.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application6/prefs.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>Next comes the dialog subclass.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application6/exampleappprefs.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application6/exampleappprefs.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>Now we revisit the <literal>preferences_activated(<!-- -->)</literal> function in our
|
||||
@@ -807,7 +807,7 @@ preferences_activated (GSimpleAction *action,
|
||||
to slide out the search bar below the header bar.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application7/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application7/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>Implementing the search needs quite a few code changes that
|
||||
@@ -887,7 +887,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
which demonstrates #GtkMenuButton, #GtkRevealer and #GtkListBox.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application8/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application8/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>The code to populate the sidebar with buttons for the words
|
||||
@@ -898,7 +898,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
ui file.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application8/gears-menu.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application8/gears-menu.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>To connect the menuitem to the show-words setting, we use
|
||||
@@ -957,7 +957,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
triggers the show-lines action:</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application9/gears-menu.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application9/gears-menu.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>To make this menu item do something, we create a property
|
||||
@@ -1017,7 +1017,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
be a direct child of the window, and set its type to be titlebar.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application10/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/application10/window.ui" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>A small extra bonus of using a header bar is that we get
|
||||
@@ -1073,7 +1073,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
<example id="gtk-getting-started-drawing">
|
||||
<title>Drawing in response to input</title>
|
||||
<para>Create a new file with the following content named example-4.c.</para>
|
||||
<programlisting><xi:include href="../../../../examples/drawing.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
<programlisting><xi:include href="@abs_top_srcdir@/examples/drawing.c" parse="text"><xi:fallback>MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</example>
|
||||
<para>
|
||||
You can compile the program above with GCC using:
|
@@ -1,6 +1,3 @@
|
||||
|
||||
<INCLUDE>gtk/gtk.h</INCLUDE>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkaboutdialog</FILE>
|
||||
<TITLE>GtkAboutDialog</TITLE>
|
||||
@@ -7089,7 +7086,6 @@ GtkPrintOperationPrivate
|
||||
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||
<FILE>gtkprintunixdialog</FILE>
|
||||
<TITLE>GtkPrintUnixDialog</TITLE>
|
||||
GtkPrintUnixDialog
|
||||
@@ -7436,7 +7432,6 @@ gtk_print_context_get_type
|
||||
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||
<FILE>gtkprintjob</FILE>
|
||||
<TITLE>GtkPrintJob</TITLE>
|
||||
GtkPrintJob
|
||||
@@ -7488,7 +7483,6 @@ gtk_print_job_get_type
|
||||
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gtk/gtkunixprint.h</INCLUDE>
|
||||
<FILE>gtkpagesetupunixdialog</FILE>
|
||||
<TITLE>GtkPageSetupUnixDialog</TITLE>
|
||||
GtkPageSetupUnixDialog
|
||||
|
535
docs/reference/gtk/meson.build
Normal file
535
docs/reference/gtk/meson.build
Normal file
@@ -0,0 +1,535 @@
|
||||
private_headers = [
|
||||
'inspector',
|
||||
'a11y',
|
||||
'gtkaccelgroupprivate.h',
|
||||
'gtkaccelmapprivate.h',
|
||||
'gtkadjustmentprivate.h',
|
||||
'gtkallocatedbitmaskprivate.h',
|
||||
'gtkappchooserprivate.h',
|
||||
'gtkapplicationaccelsprivate.h',
|
||||
'gtkapplicationprivate.h',
|
||||
'gtkbindingsprivate.h',
|
||||
'gtkbitmaskprivate.h',
|
||||
'gtkboxprivate.h',
|
||||
'gtkbuilderprivate.h',
|
||||
'gtkbuttonprivate.h',
|
||||
'gtkcairoblurprivate.h',
|
||||
'gtkcellareaboxcontextprivate.h',
|
||||
'gtkclipboardprivate.h',
|
||||
'gtkcolorchooserprivate.h',
|
||||
'gtkcoloreditorprivate.h',
|
||||
'gtkcolorplaneprivate.h',
|
||||
'gtkcolorscaleprivate.h',
|
||||
'gtkcolorswatchprivate.h',
|
||||
'gtkcomboboxprivate.h',
|
||||
'gtkcontainerprivate.h',
|
||||
'gtkcssanimatedstyleprivate.h',
|
||||
'gtkcssanimationprivate.h',
|
||||
'gtkcssarrayvalueprivate.h',
|
||||
'gtkcssbgsizevalueprivate.h',
|
||||
'gtkcssbordervalueprivate.h',
|
||||
'gtkcsscolorvalueprivate.h',
|
||||
'gtkcsscornervalueprivate.h',
|
||||
'gtkcsscustompropertyprivate.h',
|
||||
'gtkcsseasevalueprivate.h',
|
||||
'gtkcssenginevalueprivate.h',
|
||||
'gtkcssenumvalueprivate.h',
|
||||
'gtkcssiconthemevalueprivate.h',
|
||||
'gtkcssimagebuiltinprivate.h',
|
||||
'gtkcssimagecrossfadeprivate.h',
|
||||
'gtkcssimagegradientprivate.h',
|
||||
'gtkcssimageiconthemeprivate.h',
|
||||
'gtkcssimagelinearprivate.h',
|
||||
'gtkcssimageprivate.h',
|
||||
'gtkcssimagescaledprivate.h',
|
||||
'gtkcssimagesurfaceprivate.h',
|
||||
'gtkcssimageurlprivate.h',
|
||||
'gtkcssimagevalueprivate.h',
|
||||
'gtkcssimagewin32private.h',
|
||||
'gtkcssinheritvalueprivate.h',
|
||||
'gtkcssinitialvalueprivate.h',
|
||||
'gtkcsskeyframesprivate.h',
|
||||
'gtkcsslookupprivate.h',
|
||||
'gtkcssmatcherprivate.h',
|
||||
'gtkcssnodeprivate.h',
|
||||
'gtkcssnodedeclarationprivate.h',
|
||||
'gtkcssnumbervalueprivate.h',
|
||||
'gtkcsspathnodeprivate.h',
|
||||
'gtkcssparserprivate.h',
|
||||
'gtkcsspositionvalueprivate.h',
|
||||
'gtkcssproviderprivate.h',
|
||||
'gtkcssrepeatvalueprivate.h',
|
||||
'gtkcssrgbavalueprivate.h',
|
||||
'gtkcsssectionprivate.h',
|
||||
'gtkcssselectorprivate.h',
|
||||
'gtkcssshadowsvalueprivate.h',
|
||||
'gtkcssshadowvalueprivate.h',
|
||||
'gtkcssshorthandpropertyprivate.h',
|
||||
'gtkcssstaticstyleprivate.h',
|
||||
'gtkcssstringvalueprivate.h',
|
||||
'gtkcssstylefuncsprivate.h',
|
||||
'gtkcssstyleprivate.h',
|
||||
'gtkcssstylepropertyprivate.h',
|
||||
'gtkcsstransformvalueprivate.h',
|
||||
'gtkcsstransientnodeprivate.h',
|
||||
'gtkcsstransitionprivate.h',
|
||||
'gtkcsstypedvalueprivate.h',
|
||||
'gtkcsstypesprivate.h',
|
||||
'gtkcssunsetvalueprivate.h',
|
||||
'gtkcssvalueprivate.h',
|
||||
'gtkcsswidgetnodeprivate.h',
|
||||
'gtkdialogprivate.h',
|
||||
'gtkentryprivate.h',
|
||||
'gtkeventcontrollerprivate.h',
|
||||
'gtkfilechooserprivate.h',
|
||||
'gtkfilechooserwidgetprivate.h',
|
||||
'gtkfontchooserprivate.h',
|
||||
'gtkgesturedragprivate.h',
|
||||
'gtkgesturelongpressprivate.h',
|
||||
'gtkgesturemultipressprivate.h',
|
||||
'gtkgesturepanprivate.h',
|
||||
'gtkgestureprivate.h',
|
||||
'gtkgesturerotateprivate.h',
|
||||
'gtkgesturesingleprivate.h',
|
||||
'gtkgestureswipeprivate.h',
|
||||
'gtkgesturezoomprivate.h',
|
||||
'gtkheaderbarprivate.h',
|
||||
'gtkhslaprivate.h',
|
||||
'gtkiconhelperprivate.h',
|
||||
'gtkiconviewprivate.h',
|
||||
'gtkimageprivate.h',
|
||||
'gtkimmoduleprivate.h',
|
||||
'gtklabelprivate.h',
|
||||
'gtklockbuttonprivate.h',
|
||||
'gtkmagnifierprivate.h',
|
||||
'gtkmenubuttonprivate.h',
|
||||
'gtkmenuitemprivate.h',
|
||||
'gtkmenuprivate.h',
|
||||
'gtkmenushellprivate.h',
|
||||
'gtkmodulesprivate.h',
|
||||
'gtkmountoperationprivate.h',
|
||||
'gtkorientableprivate.h',
|
||||
'gtkpixelcacheprivate.h',
|
||||
'gtkplacessidebarprivate.h',
|
||||
'gtkplacesviewprivate.h',
|
||||
'gtkplacesviewrowprivate.h',
|
||||
'gtkpopoverprivate.h',
|
||||
'gtkprinter-private.h',
|
||||
'gtkprintoperation-private.h',
|
||||
'gtkprivate.h',
|
||||
'gtkrangeprivate.h',
|
||||
'gtkrecentchooserprivate.h',
|
||||
'gtkrenderbackgroundprivate.h',
|
||||
'gtkrenderborderprivate.h',
|
||||
'gtkrendericonprivate.h',
|
||||
'gtkrenderprivate.h',
|
||||
'gtkroundedboxprivate.h',
|
||||
'gtkscaleprivate.h',
|
||||
'gtksearchengine.h',
|
||||
'gtksearchenginemodel.h',
|
||||
'gtksearchenginequartz.h',
|
||||
'gtksearchenginesimple.h',
|
||||
'gtksearchenginetracker.h',
|
||||
'gtksearchentryprivate.h',
|
||||
'gtkselectionprivate.h',
|
||||
'gtksettingsprivate.h',
|
||||
'gtksidebarrowprivate.h',
|
||||
'gtksizegroup-private.h',
|
||||
'gtksizerequestcacheprivate.h',
|
||||
'gtksocketprivate.h',
|
||||
'gtkstyleanimationprivate.h',
|
||||
'gtkstylecascadeprivate.h',
|
||||
'gtkstylecontextprivate.h',
|
||||
'gtkstylepropertyprivate.h',
|
||||
'gtkstyleproviderprivate.h',
|
||||
'gtktextattributesprivate.h',
|
||||
'gtktextchildprivate.h',
|
||||
'gtktexthandleprivate.h',
|
||||
'gtktextiterprivate.h',
|
||||
'gtktextmarkprivate.h',
|
||||
'gtktexttagprivate.h',
|
||||
'gtktogglebuttonprivate.h',
|
||||
'gtktoolbarprivate.h',
|
||||
'gtktoolpaletteprivate.h',
|
||||
'gtktooltipprivate.h',
|
||||
'gtktooltipwindowprivate.h',
|
||||
'gtktreeprivate.h',
|
||||
'gtkwidgetprivate.h',
|
||||
'gtkwin32themeprivate.h',
|
||||
'gtkwindowprivate.h',
|
||||
'fnmatch.h',
|
||||
'gtkactionmuxer.h',
|
||||
'gtkactionobserver.h',
|
||||
'gtkactionobservable.h',
|
||||
'gtk9slice.h',
|
||||
'gtkanimationdescription.h',
|
||||
'gtkbitmaskprivateimpl.h',
|
||||
'gtkbookmarksmanager.h',
|
||||
'gtkdbusgenerated.c',
|
||||
'gtkdbusgenerated.h',
|
||||
'gtkdebug.h',
|
||||
'gtkactionhelper.h',
|
||||
'gtkdndcursors.h',
|
||||
'gtkfilechooserdefault.h',
|
||||
'gtkfilechooserembed.h',
|
||||
'gtkfilechooserentry.h',
|
||||
'gtkfilechoosersettings.h',
|
||||
'gtkfilechooserutils.h',
|
||||
'gtkfilesystem.h',
|
||||
'gtkfilesystemmodel.h',
|
||||
'gtkfilesystemunix.h',
|
||||
'gtkfilesystemwin32.h',
|
||||
'gtkfontchooserutils.h',
|
||||
'gtkiconcache.h',
|
||||
'gtkiconcachevalidator.h',
|
||||
'gtkiconthemeparser.h',
|
||||
'gtkintl.h',
|
||||
'gtkkeyhash.h',
|
||||
'gtkkineticscrolling.h',
|
||||
'gtkmarshal.h',
|
||||
'gtkmnemonichash.h',
|
||||
'gtkmenutracker.h',
|
||||
'gtkmenutrackeritem.h',
|
||||
'gtkmenusectionbox.h',
|
||||
'gtkmodelmenu.h',
|
||||
'gtkmodelmenuitem.h',
|
||||
'gtkmodifierstyle.h',
|
||||
'gtkpathbar.h',
|
||||
'gtkprintbackend.h',
|
||||
'gtkprinteroption.h',
|
||||
'gtkprinteroptionset.h',
|
||||
'gtkprinteroptionwidget.h',
|
||||
'gtkprint-win32.h',
|
||||
'gtkprintutils.h',
|
||||
'gtkprivate.h',
|
||||
'gtkprivatetypebuiltins.h',
|
||||
'gtkquery.h',
|
||||
'gtkrbtree.h',
|
||||
'gtkrecentchooserdefault.h',
|
||||
'gtkrecentchooserutils.h',
|
||||
'gtksearchengine.h',
|
||||
'gtksearchenginetracker.h',
|
||||
'gtksearchenginesimple.h',
|
||||
'gtksearchenginequartz.h',
|
||||
'gtksequence.h',
|
||||
'gtksocketprivate.h',
|
||||
'gtktextbtree.h',
|
||||
'gtktextbufferserialize.h',
|
||||
'gtktextdisplay.h',
|
||||
'gtktextlayout.h',
|
||||
'gtktextsegment.h',
|
||||
'gtktexttypes.h',
|
||||
'gtktextutil.h',
|
||||
'gtktimeline.h',
|
||||
'gtkthemes.h',
|
||||
'gtktrashmonitor.h',
|
||||
'gtktrayicon.h',
|
||||
'gtktreedatalist.h',
|
||||
'gtktreemenu.h',
|
||||
'gtktypebuiltins.h',
|
||||
'gtkxembed.h',
|
||||
'gtkwin32embed.h',
|
||||
'gtkwin32embedwidget.h',
|
||||
'gtkwindow-decorate.h',
|
||||
'xdgmime',
|
||||
'xembed.h',
|
||||
]
|
||||
|
||||
images = [
|
||||
'images/aboutdialog.png',
|
||||
'images/accel-label.png',
|
||||
'images/action-bar.png',
|
||||
'images/appchooserbutton.png',
|
||||
'images/appchooserdialog.png',
|
||||
'images/assistant.png',
|
||||
'images/box-packing.png',
|
||||
'images/box-expand.png',
|
||||
'images/button.png',
|
||||
'images/check-button.png',
|
||||
'images/color-button.png',
|
||||
'images/colorchooser.png',
|
||||
'images/combo-box.png',
|
||||
'images/combo-box-entry.png',
|
||||
'images/combo-box-text.png',
|
||||
'images/entry.png',
|
||||
'images/figure-hierarchical-drawing.png',
|
||||
'images/figure-windowed-label.png',
|
||||
'images/file-button.png',
|
||||
'images/filechooser.png',
|
||||
'images/font-button.png',
|
||||
'images/fontchooser.png',
|
||||
'images/frame.png',
|
||||
'images/glarea.png',
|
||||
'images/headerbar.png',
|
||||
'images/icon-view.png',
|
||||
'images/image.png',
|
||||
'images/info-bar.png',
|
||||
'images/label.png',
|
||||
'images/levelbar.png',
|
||||
'images/link-button.png',
|
||||
'images/list-and-tree.png',
|
||||
'images/lock-button.png',
|
||||
'images/lockbutton.png',
|
||||
'images/lockbutton-locked.png',
|
||||
'images/lockbutton-unlocked.png',
|
||||
'images/lockbutton-sorry.png',
|
||||
'images/menubar.png',
|
||||
'images/menu-button.png',
|
||||
'images/messagedialog.png',
|
||||
'images/multiline-text.png',
|
||||
'images/notebook.png',
|
||||
'images/panes.png',
|
||||
'images/pagesetupdialog.png',
|
||||
'images/placessidebar.png',
|
||||
'images/popup-anchors.png',
|
||||
'images/popup-flip.png',
|
||||
'images/popup-slide.png',
|
||||
'images/printdialog.png',
|
||||
'images/progressbar.png',
|
||||
'images/radio-group.png',
|
||||
'images/recentchooserdialog.png',
|
||||
'images/scales.png',
|
||||
'images/scrollbar.png',
|
||||
'images/scrolledwindow.png',
|
||||
'images/search-bar.png',
|
||||
'images/search-entry.png',
|
||||
'images/separator.png',
|
||||
'images/sidebar.png',
|
||||
'images/spinbutton.png',
|
||||
'images/spinner.png',
|
||||
'images/stack.png',
|
||||
'images/stackswitcher.png',
|
||||
'images/statusbar.png',
|
||||
'images/toggle-button.png',
|
||||
'images/toolbar.png',
|
||||
'images/toolpalette.png',
|
||||
'images/tree-view-coordinates.png',
|
||||
'images/volumebutton.png',
|
||||
'images/window.png',
|
||||
'images/layout-btlr.png',
|
||||
'images/layout-btrl.png',
|
||||
'images/layout-lrbt.png',
|
||||
'images/layout-lrtb.png',
|
||||
'images/layout-rlbt.png',
|
||||
'images/layout-rltb.png',
|
||||
'images/layout-tblr.png',
|
||||
'images/layout-tbrl.png',
|
||||
'images/widget-hvalign.png',
|
||||
'images/window-default.png',
|
||||
'images/hello-world.png',
|
||||
'images/grid-packing.png',
|
||||
'images/drawing.png',
|
||||
'images/switch.png',
|
||||
'images/linear.png',
|
||||
'images/ease.png',
|
||||
'images/ease-in-out.png',
|
||||
'images/ease-in.png',
|
||||
'images/ease-out.png',
|
||||
'images/gradient1.png',
|
||||
'images/gradient2.png',
|
||||
'images/gradient3.png',
|
||||
'images/gradient4.png',
|
||||
'images/border1.png',
|
||||
'images/border2.png',
|
||||
'images/border3.png',
|
||||
'images/slices.png',
|
||||
'images/checks.png',
|
||||
'images/options.png',
|
||||
'images/arrows.png',
|
||||
'images/expanders.png',
|
||||
'images/background.png',
|
||||
'images/frames.png',
|
||||
'images/frame-gap.png',
|
||||
'images/sliders.png',
|
||||
'images/focus.png',
|
||||
'images/handles.png',
|
||||
'images/extensions.png',
|
||||
'images/numerableicon.png',
|
||||
'images/numerableicon2.png',
|
||||
'images/bloatpad-osx.png',
|
||||
'images/bloatpad-gnome.png',
|
||||
'images/bloatpad-xfce.png',
|
||||
'images/down-center.png',
|
||||
'images/down-end.png',
|
||||
'images/down-start.png',
|
||||
'images/left-center.png',
|
||||
'images/left-end.png',
|
||||
'images/left-start.png',
|
||||
'images/right-center.png',
|
||||
'images/right-end.png',
|
||||
'images/right-start.png',
|
||||
'images/up-center.png',
|
||||
'images/up-end.png',
|
||||
'images/up-start.png',
|
||||
'images/list-box.png',
|
||||
'images/getting-started-app1.png',
|
||||
'images/getting-started-app2.png',
|
||||
'images/getting-started-app3.png',
|
||||
'images/getting-started-app4.png',
|
||||
'images/getting-started-app6.png',
|
||||
'images/getting-started-app7.png',
|
||||
'images/getting-started-app8.png',
|
||||
'images/getting-started-app9.png',
|
||||
'images/getting-started-app10.png',
|
||||
'images/exampleapp.png',
|
||||
'images/flow-box.png',
|
||||
'images/inspector.png',
|
||||
'images/gedit-shortcuts.png',
|
||||
'images/clocks-shortcuts.png',
|
||||
'images/builder-shortcuts.png',
|
||||
]
|
||||
|
||||
content_files = [
|
||||
'broadway.xml',
|
||||
'broadwayd.xml',
|
||||
'building.sgml',
|
||||
'css-overview.xml',
|
||||
'css-properties.xml',
|
||||
'gtk3-demo-application.xml',
|
||||
'gtk3-demo.xml',
|
||||
'gtk3-icon-browser.xml',
|
||||
'gtk3-widget-factory.xml',
|
||||
'gtk-builder-tool.xml',
|
||||
'gtk-encode-symbolic-svg.xml',
|
||||
'gtk-launch.xml',
|
||||
'gtk-query-immodules-3.0.xml',
|
||||
'gtk-query-settings.xml',
|
||||
'gtk-update-icon-cache.xml',
|
||||
'mir.xml',
|
||||
'osx.sgml',
|
||||
'overview.xml',
|
||||
'resources.sgml',
|
||||
'running.sgml',
|
||||
'visual_index.xml',
|
||||
'wayland.xml',
|
||||
'windows.sgml',
|
||||
'x11.sgml',
|
||||
]
|
||||
|
||||
expand_content_files = [
|
||||
'compiling.sgml',
|
||||
'drawing-model.xml',
|
||||
join_paths(meson.current_build_dir(), 'getting_started.xml'),
|
||||
'glossary.xml',
|
||||
'input-handling.xml',
|
||||
'migrating-2to3.xml',
|
||||
'migrating-3xtoy.xml',
|
||||
'migrating-checklist.sgml',
|
||||
'migrating-GtkGrid.xml',
|
||||
'migrating-GtkStyleContext.xml',
|
||||
'migrating-smclient-GtkApplication.xml',
|
||||
'migrating-unique-GtkApplication.xml',
|
||||
'question_index.sgml',
|
||||
'text_widget.sgml',
|
||||
'tree_widget.sgml',
|
||||
]
|
||||
|
||||
content_files += expand_content_files
|
||||
|
||||
types_conf = configuration_data()
|
||||
if os_win32
|
||||
types_conf.set('DISABLE_ON_W32', '%')
|
||||
else
|
||||
types_conf.set('DISABLE_ON_W32', '')
|
||||
endif
|
||||
|
||||
if os_darwin
|
||||
types_conf.set('DISABLE_ON_QUARTZ', '%')
|
||||
else
|
||||
types_conf.set('DISABLE_ON_QUARTZ', '')
|
||||
endif
|
||||
|
||||
if x11_enabled
|
||||
types_conf.set('ENABLE_ON_X11', '')
|
||||
else
|
||||
types_conf.set('ENABLE_ON_X11', '%')
|
||||
endif
|
||||
|
||||
if get_option('gtk_doc')
|
||||
|
||||
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
|
||||
configure_file(input: 'getting_started.xml.in', output: 'getting_started.xml', configuration: src_dir_conf)
|
||||
|
||||
gnome.gtkdoc('gtk3',
|
||||
mode: 'none',
|
||||
main_xml: 'gtk-docs.sgml',
|
||||
src_dir: [
|
||||
gtkinc,
|
||||
],
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: configure_file(
|
||||
input: 'gtk3.types.in',
|
||||
output: 'gtk3.types',
|
||||
configuration: types_conf,
|
||||
),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
mkdb_args: [
|
||||
'--default-includes=gtk/gtk.h',
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
'--extra-dir=@0@'.format(gdkpixbuf_docpath),
|
||||
'--extra-dir=../gdk',
|
||||
],
|
||||
content_files: content_files,
|
||||
expand_content_files: expand_content_files,
|
||||
html_assets: images,
|
||||
install: true)
|
||||
endif
|
||||
|
||||
xsltproc = find_program('xsltproc', required: false)
|
||||
if get_option('man') and not xsltproc.found()
|
||||
error('No xsltproc found, but man pages were explicitly enabled')
|
||||
endif
|
||||
|
||||
if get_option('man') and xsltproc.found()
|
||||
xlstproc_flags = [
|
||||
'--nonet',
|
||||
'--stringparam', 'man.output.quietly', '1',
|
||||
'--stringparam', 'funcsynopsis.style', 'ansi',
|
||||
'--stringparam', 'man.th.extra1.suppress', '1',
|
||||
'--stringparam', 'man.authors.section.enabled', '0',
|
||||
'--stringparam', 'man.copyright.section.enabled', '0',
|
||||
]
|
||||
|
||||
man_files = [
|
||||
[ 'gtk-query-immodules-3.0', '1', ],
|
||||
[ 'gtk-update-icon-cache', '1', ],
|
||||
[ 'gtk-encode-symbolic-svg', '1', ],
|
||||
[ 'gtk-launch', '1', ],
|
||||
[ 'gtk3-demo', '1', ],
|
||||
[ 'gtk3-demo-application', '1', ],
|
||||
[ 'gtk3-widget-factory', '1', ],
|
||||
[ 'gtk3-icon-browser', '1', ],
|
||||
[ 'gtk-builder-tool', '1', ],
|
||||
[ 'gtk-query-settings', '1', ],
|
||||
]
|
||||
|
||||
if broadway_enabled
|
||||
man_files += [[ 'broadwayd', '1', ]]
|
||||
endif
|
||||
|
||||
foreach man: man_files
|
||||
man_name = man.get(0)
|
||||
man_section = man.get(1, '1')
|
||||
custom_target('@0@.@1@'.format(man_name, man_section),
|
||||
input: '@0@.xml'.format(man_name),
|
||||
output: '@0@.@1@'.format(man_name, man_section),
|
||||
command: [
|
||||
xsltproc,
|
||||
xlstproc_flags,
|
||||
'-o', '@OUTPUT@',
|
||||
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
|
||||
'@INPUT@',
|
||||
],
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(man_section)))
|
||||
endforeach
|
||||
endif
|
@@ -34,6 +34,8 @@ HTML_IMAGES =
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
EXTRA_DIST += \
|
||||
version.xml.in \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
21
docs/reference/libgail-util/meson.build
Normal file
21
docs/reference/libgail-util/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
if get_option('gtk_doc')
|
||||
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
|
||||
|
||||
gnome.gtkdoc('gail-libgail-util3',
|
||||
mode: 'none',
|
||||
main_xml: 'gail-libgail-util-docs.sgml',
|
||||
src_dir: libgailutilinc,
|
||||
dependencies: [libgtk_dep, libgailutil],
|
||||
gobject_typesfile: join_paths(meson.current_source_dir(), 'gail-libgail-util3.types'),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=../gtk',
|
||||
],
|
||||
install: true)
|
||||
endif
|
22
docs/reference/meson.build
Normal file
22
docs/reference/meson.build
Normal file
@@ -0,0 +1,22 @@
|
||||
if get_option('gtk_doc')
|
||||
glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
|
||||
glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
|
||||
|
||||
cairo_prefix = dependency('cairo-gobject').get_pkgconfig_variable('prefix')
|
||||
cairo_docpath = join_paths(cairo_prefix, 'share', 'gtk-doc', 'html', 'cairo')
|
||||
|
||||
gdkpixbuf_prefix = dependency('gdk-pixbuf-2.0').get_pkgconfig_variable('prefix')
|
||||
gdkpixbuf_docpath = join_paths(gdkpixbuf_prefix, 'share', 'gtk-doc', 'html', 'gdk-pixbuf')
|
||||
|
||||
docpath = join_paths(gtk_datadir, 'gtk-doc', 'html')
|
||||
|
||||
version_conf = configuration_data()
|
||||
version_conf.set('GTK_VERSION', meson.project_version())
|
||||
|
||||
src_dir_conf = configuration_data()
|
||||
src_dir_conf.set('abs_top_srcdir', meson.source_root())
|
||||
endif
|
||||
|
||||
subdir('gdk')
|
||||
subdir('gtk')
|
||||
subdir('libgail-util')
|
@@ -20,6 +20,9 @@ LDADDS = \
|
||||
$(GDK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
EXTRA_DIST += \
|
||||
meson.build
|
||||
|
||||
if USE_X11
|
||||
noinst_PROGRAMS = \
|
||||
doc-shooter
|
||||
|
12
docs/tools/meson.build
Normal file
12
docs/tools/meson.build
Normal file
@@ -0,0 +1,12 @@
|
||||
if x11_enabled
|
||||
doc_shooter_sources = [
|
||||
'shadow.c',
|
||||
'shooter.c',
|
||||
'widgets.c',
|
||||
'../../tests/gtkgears.c',
|
||||
]
|
||||
|
||||
doc_shooter = executable('doc-shooter', doc_shooter_sources,
|
||||
include_directories: [ confinc, gdkinc, gtkinc, testinc, ],
|
||||
dependencies: libgtk_dep)
|
||||
endif
|
@@ -31,6 +31,8 @@ noinst_PROGRAMS = \
|
||||
search-bar \
|
||||
listbox-dnd
|
||||
|
||||
EXTRA_DIST = builder.ui
|
||||
EXTRA_DIST = \
|
||||
builder.ui \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -17,4 +17,7 @@ exampleapp_SOURCES = \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
11
examples/application1/meson.build
Normal file
11
examples/application1/meson.build
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
app1 = executable(
|
||||
'exampleapp',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -41,7 +41,8 @@ EXTRA_DIST = \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
org.gtk.exampleapp.gschema.xml \
|
||||
meson.build
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
23
examples/application10/meson.build
Normal file
23
examples/application10/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
app10_resources = gnome.compile_resources(
|
||||
'exampleapp10 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app10_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app10 = executable(
|
||||
'exampleapp10',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app10_resources,
|
||||
app10_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -26,6 +26,7 @@ resources.c: exampleapp.gresource.xml window.ui
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
exampleapp.gresource.xml
|
||||
exampleapp.gresource.xml \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
17
examples/application2/meson.build
Normal file
17
examples/application2/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
app2_resources = gnome.compile_resources(
|
||||
'exampleapp2 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app2 = executable(
|
||||
'exampleapp2',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app2_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -26,6 +26,7 @@ resources.c: exampleapp.gresource.xml window.ui
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
exampleapp.gresource.xml
|
||||
exampleapp.gresource.xml \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
17
examples/application3/meson.build
Normal file
17
examples/application3/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
app3_resources = gnome.compile_resources(
|
||||
'exampleapp3 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app3 = executable(
|
||||
'exampleapp3',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app3_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -27,6 +27,7 @@ resources.c: exampleapp.gresource.xml window.ui app-menu.ui
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
exampleapp.gresource.xml
|
||||
exampleapp.gresource.xml \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
17
examples/application4/meson.build
Normal file
17
examples/application4/meson.build
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
app4_resources = gnome.compile_resources(
|
||||
'exampleapp4 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app4 = executable(
|
||||
'exampleapp4',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app4_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -38,7 +38,8 @@ EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
org.gtk.exampleapp.gschema.xml \
|
||||
meson.build
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
21
examples/application5/meson.build
Normal file
21
examples/application5/meson.build
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
app5_resources = gnome.compile_resources(
|
||||
'exampleapp5 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app5_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app5 = executable(
|
||||
'exampleapp5',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
app5_resources,
|
||||
app5_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -40,7 +40,8 @@ EXTRA_DIST = \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
org.gtk.exampleapp.gschema.xml \
|
||||
meson.build
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
23
examples/application6/meson.build
Normal file
23
examples/application6/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
app6_resources = gnome.compile_resources(
|
||||
'exampleapp6 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app6_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app6 = executable(
|
||||
'exampleapp6',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app6_resources,
|
||||
app6_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -40,7 +40,8 @@ EXTRA_DIST = \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
org.gtk.exampleapp.gschema.xml \
|
||||
meson.build
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
23
examples/application7/meson.build
Normal file
23
examples/application7/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
app7_resources = gnome.compile_resources(
|
||||
'exampleapp7 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app7_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app7 = executable(
|
||||
'exampleapp7',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app7_resources,
|
||||
app7_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -41,7 +41,8 @@ EXTRA_DIST = \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
org.gtk.exampleapp.gschema.xml \
|
||||
meson.build
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
23
examples/application8/meson.build
Normal file
23
examples/application8/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
app8_resources = gnome.compile_resources(
|
||||
'exampleapp8 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app8_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app8 = executable(
|
||||
'exampleapp8',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app8_resources,
|
||||
app8_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -41,7 +41,8 @@ EXTRA_DIST = \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
org.gtk.exampleapp.gschema.xml \
|
||||
meson.build
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
23
examples/application9/meson.build
Normal file
23
examples/application9/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
app9_resources = gnome.compile_resources(
|
||||
'exampleapp9 resources',
|
||||
'exampleapp.gresource.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
app9_schemas = gnome.compile_schemas()
|
||||
|
||||
|
||||
app9 = executable(
|
||||
'exampleapp9',
|
||||
'main.c',
|
||||
'exampleapp.c',
|
||||
'exampleapp.h',
|
||||
'exampleappwin.c',
|
||||
'exampleappwin.h',
|
||||
'exampleappprefs.c',
|
||||
'exampleappprefs.h',
|
||||
app9_resources,
|
||||
app9_schemas,
|
||||
dependencies: libgtk_dep
|
||||
)
|
@@ -27,6 +27,8 @@ bloatpad-gresources.c: $(resource_files)
|
||||
|
||||
CLEANFILES = bloatpad-gresources.c
|
||||
|
||||
EXTRA_DIST = $(resource_files)
|
||||
EXTRA_DIST = \
|
||||
$(resource_files) \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -537,6 +537,7 @@ bloat_pad_startup (GApplication *application)
|
||||
{ "win.justify::center", { "<Primary>m", NULL } },
|
||||
{ "win.justify::right", { "<Primary>r", NULL } }
|
||||
};
|
||||
const gchar *new_accels[] = { "<Primary>n", "<Primary>t", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (bloat_pad_parent_class)
|
||||
->startup (application);
|
||||
@@ -604,7 +605,6 @@ bloat_pad_startup (GApplication *application)
|
||||
g_object_unref (item);
|
||||
g_object_unref (icon);
|
||||
|
||||
const gchar *new_accels[] = { "<Primary>n", "<Primary>t", NULL };
|
||||
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels);
|
||||
|
||||
dump_accels (GTK_APPLICATION (application));
|
||||
|
13
examples/bp/meson.build
Normal file
13
examples/bp/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
bp_resources = gnome.compile_resources(
|
||||
'bloatpad resources',
|
||||
'bloatpad.gresources.xml',
|
||||
source_dir: '.'
|
||||
)
|
||||
|
||||
bloatpad = executable(
|
||||
'bloatpad',
|
||||
'bloatpad.c',
|
||||
bp_resources,
|
||||
dependencies: libgtk_dep
|
||||
)
|
60
examples/meson.build
Normal file
60
examples/meson.build
Normal file
@@ -0,0 +1,60 @@
|
||||
builder_example = executable(
|
||||
'builder_example',
|
||||
'builder.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
drawing = executable(
|
||||
'drawing',
|
||||
'drawing.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
grid_packing = executable(
|
||||
'grid-packing',
|
||||
'grid-packing.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
hello_world = executable(
|
||||
'hello-world',
|
||||
'hello-world.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
plugman = executable(
|
||||
'plugman',
|
||||
'plugman.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
search_bar = executable(
|
||||
'search-bar',
|
||||
'search-bar.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
sunny = executable(
|
||||
'sunny',
|
||||
'sunny.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
window_default = executable(
|
||||
'window-default',
|
||||
'window-default.c',
|
||||
dependencies: libgtk_dep
|
||||
)
|
||||
|
||||
|
||||
subdir('bp')
|
||||
subdir('application1')
|
||||
subdir('application2')
|
||||
subdir('application3')
|
||||
subdir('application4')
|
||||
subdir('application5')
|
||||
subdir('application6')
|
||||
subdir('application7')
|
||||
subdir('application8')
|
||||
subdir('application9')
|
||||
subdir('application10')
|
@@ -31,7 +31,10 @@ EXTRA_DIST += \
|
||||
makefile.msc \
|
||||
gdkenumtypes.c.template \
|
||||
gdkenumtypes.h.template \
|
||||
gdkversionmacros.h.in
|
||||
gdkversionmacros.h.in \
|
||||
meson.build \
|
||||
gen-gdk-gresources-xml.py \
|
||||
gdkconfig.h.meson
|
||||
|
||||
GDK_CFLAGS_DEFINES = \
|
||||
-DG_LOG_USE_STRUCTURED=1 \
|
||||
@@ -112,6 +115,7 @@ gdk_h_sources = \
|
||||
gdk_private_headers = \
|
||||
gdk-private.h \
|
||||
gdkapplaunchcontextprivate.h \
|
||||
gdkconstructor.h \
|
||||
gdkcursorprivate.h \
|
||||
gdkdevicemanagerprivate.h \
|
||||
gdkdeviceprivate.h \
|
||||
@@ -243,8 +247,7 @@ if HAVE_INTROSPECTION
|
||||
introspection_files = \
|
||||
$(filter-out gdkkeysyms-compat.h, $(gdk_h_sources)) \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkenumtypes.h
|
||||
$(gdk_built_sources)
|
||||
|
||||
Gdk-3.0.gir: libgdk-3.la Makefile
|
||||
Gdk_3_0_gir_SCANNERFLAGS = \
|
||||
@@ -274,8 +277,10 @@ x11_introspection_files = \
|
||||
x11/gdkeventsource.c \
|
||||
x11/gdkeventtranslator.c \
|
||||
x11/gdkgeometry-x11.c \
|
||||
x11/gdkglcontext-x11.c \
|
||||
x11/gdkkeys-x11.c \
|
||||
x11/gdkmain-x11.c \
|
||||
x11/gdkmonitor-x11.c \
|
||||
x11/gdkproperty-x11.c \
|
||||
x11/gdkscreen-x11.c \
|
||||
x11/gdkselection-x11.c \
|
||||
@@ -298,7 +303,9 @@ x11_introspection_files = \
|
||||
x11/gdkx11display.h \
|
||||
x11/gdkx11displaymanager.h \
|
||||
x11/gdkx11dnd.h \
|
||||
x11/gdkx11glcontext.h \
|
||||
x11/gdkx11keys.h \
|
||||
x11/gdkx11monitor.h \
|
||||
x11/gdkx11property.h \
|
||||
x11/gdkx11screen.h \
|
||||
x11/gdkx11selection.h \
|
||||
|
@@ -108,6 +108,10 @@ EXTRA_DIST += $(broadway_built_sources)
|
||||
|
||||
BUILT_SOURCES = $(broadway_built_sources)
|
||||
|
||||
EXTRA_DIST += \
|
||||
meson.build \
|
||||
gen-c-array.py
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gdk3-broadway broadwayd
|
||||
|
||||
|
@@ -10,6 +10,6 @@ body { overflow: hidden; }
|
||||
<script type="text/javascript" src="broadway.js"></script>
|
||||
</head>
|
||||
|
||||
<body onload="connect()">
|
||||
<body onload="connect()" onclick="if (!document.hasFocus() && window.topElement !== window.self) { window.focus(); }">
|
||||
</body>
|
||||
</html>
|
||||
|
22
gdk/broadway/gen-c-array.py
Normal file
22
gdk/broadway/gen-c-array.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--array-name', help='The name of the array variable')
|
||||
parser.add_argument('--output', metavar='FILE', help='Output file',
|
||||
type=argparse.FileType('w'),
|
||||
default=sys.stdout)
|
||||
parser.add_argument('input', metavar='FILE', help='The input file',
|
||||
type=argparse.FileType('r'), nargs='+')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
args.output.write('static const char {}[] = {{\n'.format(args.array_name))
|
||||
for input in args.input:
|
||||
for line in input:
|
||||
for ch in line:
|
||||
args.output.write(' 0x{:02x},\n'.format(ord(ch)))
|
||||
|
||||
args.output.write('};')
|
78
gdk/broadway/meson.build
Normal file
78
gdk/broadway/meson.build
Normal file
@@ -0,0 +1,78 @@
|
||||
gdk_broadway_sources = files(
|
||||
'gdkcursor-broadway.c',
|
||||
'gdkdevice-broadway.c',
|
||||
'gdkdevicemanager-broadway.c',
|
||||
'gdkdisplay-broadway.c',
|
||||
'gdkdnd-broadway.c',
|
||||
'gdkeventsource.c',
|
||||
'gdkglobals-broadway.c',
|
||||
'gdkkeys-broadway.c',
|
||||
'gdkmonitor-broadway.c',
|
||||
'gdkproperty-broadway.c',
|
||||
'gdkscreen-broadway.c',
|
||||
'gdkselection-broadway.c',
|
||||
'gdktestutils-broadway.c',
|
||||
'gdkvisual-broadway.c',
|
||||
'gdkwindow-broadway.c',
|
||||
'gdkbroadway-server.c',
|
||||
)
|
||||
|
||||
gdk_broadway_public_headers = files(
|
||||
'gdkbroadwaydisplay.h',
|
||||
'gdkbroadwaywindow.h',
|
||||
'gdkbroadwaycursor.h',
|
||||
'gdkbroadwaymonitor.h',
|
||||
'gdkbroadwayvisual.h',
|
||||
)
|
||||
|
||||
install_headers(gdk_broadway_public_headers, subdir: 'gtk-3.0/gdk/broadway/')
|
||||
install_headers('gdkbroadway.h', subdir: 'gtk-3.0/gdk/')
|
||||
|
||||
gdk_broadway_deps = [shmlib]
|
||||
|
||||
gen_c_array = find_program('gen-c-array.py')
|
||||
|
||||
clienthtml_h = custom_target('clienthtml.h',
|
||||
input : 'client.html',
|
||||
output : 'clienthtml.h',
|
||||
command : [
|
||||
gen_c_array,
|
||||
'--array-name=client_html',
|
||||
'--output=@OUTPUT@',
|
||||
'@INPUT@',
|
||||
],
|
||||
)
|
||||
|
||||
broadwayjs_h = custom_target('broadwayjs.h',
|
||||
input : ['broadway.js', 'rawinflate.min.js'],
|
||||
output : 'broadwayjs.h',
|
||||
command : [
|
||||
gen_c_array,
|
||||
'--array-name=broadway_js',
|
||||
'--output=@OUTPUT@',
|
||||
'@INPUT0@','@INPUT1@',
|
||||
],
|
||||
)
|
||||
|
||||
libgdk_broadway = static_library('gdk-broadway',
|
||||
clienthtml_h, broadwayjs_h,
|
||||
gdk_broadway_sources, gdkconfig, gdkenum_h,
|
||||
include_directories: [confinc, gdkinc],
|
||||
c_args: [
|
||||
'-DGDK_COMPILATION',
|
||||
'-DG_LOG_DOMAIN="Gdk"',
|
||||
] + common_cflags,
|
||||
link_args: common_ldflags,
|
||||
dependencies: [gdk_deps, gdk_broadway_deps])
|
||||
|
||||
# gtk4-broadwayd
|
||||
|
||||
broadwayd_syslib = os_win32 ? cc.find_library('ws2_32') : shmlib
|
||||
|
||||
executable('broadwayd',
|
||||
clienthtml_h, broadwayjs_h,
|
||||
'broadwayd.c', 'broadway-server.c', 'broadway-buffer.c', 'broadway-output.c',
|
||||
include_directories: [confinc, gdkinc, include_directories('.')],
|
||||
c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', ],
|
||||
dependencies : [broadwayd_syslib, gdk_deps],
|
||||
install : true)
|
@@ -17,6 +17,8 @@ gdk__private__ (void)
|
||||
gdk_display_set_rendering_mode,
|
||||
gdk_display_get_debug_updates,
|
||||
gdk_display_set_debug_updates,
|
||||
gdk_get_desktop_startup_id,
|
||||
gdk_get_desktop_autostart_id,
|
||||
};
|
||||
|
||||
return &table;
|
||||
|
@@ -31,6 +31,9 @@ gboolean gdk_display_get_debug_updates (GdkDisplay *display);
|
||||
void gdk_display_set_debug_updates (GdkDisplay *display,
|
||||
gboolean debug_updates);
|
||||
|
||||
const gchar * gdk_get_desktop_startup_id (void);
|
||||
const gchar * gdk_get_desktop_autostart_id (void);
|
||||
|
||||
typedef struct {
|
||||
/* add all private functions here, initialize them in gdk-private.c */
|
||||
gboolean (* gdk_device_grab_info) (GdkDisplay *display,
|
||||
@@ -56,6 +59,9 @@ typedef struct {
|
||||
gboolean (* gdk_display_get_debug_updates) (GdkDisplay *display);
|
||||
void (* gdk_display_set_debug_updates) (GdkDisplay *display,
|
||||
gboolean debug_updates);
|
||||
|
||||
const gchar * (* gdk_get_desktop_startup_id) (void);
|
||||
const gchar * (* gdk_get_desktop_autostart_id) (void);
|
||||
} GdkPrivateVTable;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
99
gdk/gdk.c
99
gdk/gdk.c
@@ -38,9 +38,13 @@
|
||||
#include "gdkkeysyms.h"
|
||||
#endif
|
||||
|
||||
#include "gdkconstructor.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <fribidi.h>
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:general
|
||||
@@ -1113,3 +1117,98 @@ gdk_disable_multidevice (void)
|
||||
|
||||
_gdk_disable_multidevice = TRUE;
|
||||
}
|
||||
|
||||
PangoDirection
|
||||
gdk_unichar_direction (gunichar ch)
|
||||
{
|
||||
FriBidiCharType fribidi_ch_type;
|
||||
|
||||
G_STATIC_ASSERT (sizeof (FriBidiChar) == sizeof (gunichar));
|
||||
|
||||
fribidi_ch_type = fribidi_get_bidi_type (ch);
|
||||
|
||||
if (!FRIBIDI_IS_STRONG (fribidi_ch_type))
|
||||
return PANGO_DIRECTION_NEUTRAL;
|
||||
else if (FRIBIDI_IS_RTL (fribidi_ch_type))
|
||||
return PANGO_DIRECTION_RTL;
|
||||
else
|
||||
return PANGO_DIRECTION_LTR;
|
||||
}
|
||||
|
||||
#ifdef G_HAS_CONSTRUCTORS
|
||||
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
|
||||
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(stash_startup_id)
|
||||
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(stash_autostart_id)
|
||||
#endif
|
||||
G_DEFINE_CONSTRUCTOR(stash_startup_id)
|
||||
G_DEFINE_CONSTRUCTOR(stash_autostart_id)
|
||||
#endif
|
||||
|
||||
static char *desktop_startup_id = NULL;
|
||||
static char *desktop_autostart_id = NULL;
|
||||
|
||||
static void
|
||||
stash_startup_id (void)
|
||||
{
|
||||
const char *startup_id = g_getenv ("DESKTOP_STARTUP_ID");
|
||||
|
||||
if (startup_id == NULL || startup_id[0] == '\0')
|
||||
return;
|
||||
|
||||
if (!g_utf8_validate (startup_id, -1, NULL))
|
||||
{
|
||||
g_warning ("DESKTOP_STARTUP_ID contains invalid UTF-8");
|
||||
return;
|
||||
}
|
||||
|
||||
desktop_startup_id = g_strdup (startup_id);
|
||||
}
|
||||
|
||||
static void
|
||||
stash_autostart_id (void)
|
||||
{
|
||||
const char *autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
|
||||
desktop_autostart_id = g_strdup (autostart_id ? autostart_id : "");
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gdk_get_desktop_startup_id (void)
|
||||
{
|
||||
static gsize init = 0;
|
||||
|
||||
if (g_once_init_enter (&init))
|
||||
{
|
||||
#ifndef G_HAS_CONSTRUCTORS
|
||||
stash_startup_id ();
|
||||
#endif
|
||||
/* Clear the environment variable so it won't be inherited by
|
||||
* child processes and confuse things.
|
||||
*/
|
||||
g_unsetenv ("DESKTOP_STARTUP_ID");
|
||||
|
||||
g_once_init_leave (&init, 1);
|
||||
}
|
||||
|
||||
return desktop_startup_id;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gdk_get_desktop_autostart_id (void)
|
||||
{
|
||||
static gsize init = 0;
|
||||
|
||||
if (g_once_init_enter (&init))
|
||||
{
|
||||
#ifndef G_HAS_CONSTRUCTORS
|
||||
stash_autostart_id ();
|
||||
#endif
|
||||
/* Clear the environment variable so it won't be inherited by
|
||||
* child processes and confuse things.
|
||||
*/
|
||||
g_unsetenv ("DESKTOP_AUTOSTART_ID");
|
||||
|
||||
g_once_init_leave (&init, 1);
|
||||
}
|
||||
|
||||
return desktop_autostart_id;
|
||||
}
|
||||
|
20
gdk/gdkconfig.h.meson
Normal file
20
gdk/gdkconfig.h.meson
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef __GDKCONFIG_H__
|
||||
#define __GDKCONFIG_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#mesondefine GDK_WINDOWING_X11
|
||||
#mesondefine GDK_WINDOWING_BROADWAY
|
||||
#mesondefine GDK_WINDOWING_WAYLAND
|
||||
#mesondefine GDK_WINDOWING_WIN32
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDKCONFIG_H__ */
|
120
gdk/gdkconstructor.h
Normal file
120
gdk/gdkconstructor.h
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
|
||||
destructors, in a sane way, including e.g. on library unload. If not you're on
|
||||
your own.
|
||||
|
||||
Some compilers need #pragma to handle this, which does not work with macros,
|
||||
so the way you need to use this is (for constructors):
|
||||
|
||||
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
|
||||
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
|
||||
#endif
|
||||
G_DEFINE_CONSTRUCTOR(my_constructor)
|
||||
static void my_constructor(void) {
|
||||
...
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __GTK_DOC_IGNORE__
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
|
||||
|
||||
#define G_HAS_CONSTRUCTORS 1
|
||||
|
||||
#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
|
||||
#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
|
||||
|
||||
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
|
||||
/* Visual studio 2008 and later has _Pragma */
|
||||
|
||||
#define G_HAS_CONSTRUCTORS 1
|
||||
|
||||
/* We do some weird things to avoid the constructors being optimized
|
||||
* away on VS2015 if WholeProgramOptimization is enabled. First we
|
||||
* make a reference to the array from the wrapper to make sure its
|
||||
* references. Then we use a pragma to make sure the wrapper function
|
||||
* symbol is always included at the link stage. Also, the symbols
|
||||
* need to be extern (but not dllexport), even though they are not
|
||||
* really used from another object file.
|
||||
*/
|
||||
|
||||
/* We need to account for differences between the mangling of symbols
|
||||
* for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed
|
||||
* with an underscore but symbols on x64 are not.
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
#define G_MSVC_SYMBOL_PREFIX ""
|
||||
#else
|
||||
#define G_MSVC_SYMBOL_PREFIX "_"
|
||||
#endif
|
||||
|
||||
#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
|
||||
#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
|
||||
|
||||
#define G_MSVC_CTOR(_func,_sym_prefix) \
|
||||
static void _func(void); \
|
||||
extern int (* _array ## _func)(void); \
|
||||
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
|
||||
__pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
|
||||
__pragma(section(".CRT$XCU",read)) \
|
||||
__declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;
|
||||
|
||||
#define G_MSVC_DTOR(_func,_sym_prefix) \
|
||||
static void _func(void); \
|
||||
extern int (* _array ## _func)(void); \
|
||||
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
|
||||
__pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
|
||||
__pragma(section(".CRT$XCU",read)) \
|
||||
__declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;
|
||||
|
||||
#elif defined (_MSC_VER)
|
||||
|
||||
#define G_HAS_CONSTRUCTORS 1
|
||||
|
||||
/* Pre Visual studio 2008 must use #pragma section */
|
||||
#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
|
||||
#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
|
||||
|
||||
#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
|
||||
section(".CRT$XCU",read)
|
||||
#define G_DEFINE_CONSTRUCTOR(_func) \
|
||||
static void _func(void); \
|
||||
static int _func ## _wrapper(void) { _func(); return 0; } \
|
||||
__declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;
|
||||
|
||||
#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
|
||||
section(".CRT$XCU",read)
|
||||
#define G_DEFINE_DESTRUCTOR(_func) \
|
||||
static void _func(void); \
|
||||
static int _func ## _constructor(void) { atexit (_func); return 0; } \
|
||||
__declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
|
||||
/* This is not tested, but i believe it should work, based on:
|
||||
* http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
|
||||
*/
|
||||
|
||||
#define G_HAS_CONSTRUCTORS 1
|
||||
|
||||
#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
|
||||
#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
|
||||
|
||||
#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
|
||||
init(_func)
|
||||
#define G_DEFINE_CONSTRUCTOR(_func) \
|
||||
static void _func(void);
|
||||
|
||||
#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
|
||||
fini(_func)
|
||||
#define G_DEFINE_DESTRUCTOR(_func) \
|
||||
static void _func(void);
|
||||
|
||||
#else
|
||||
|
||||
/* constructors not supported for this compiler */
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __GTK_DOC_IGNORE__ */
|
@@ -14,7 +14,7 @@ G_BEGIN_DECLS
|
||||
|
||||
/*** BEGIN file-production ***/
|
||||
|
||||
/* enumerations from "@filename@" */
|
||||
/* enumerations from "@basename@" */
|
||||
/*** END file-production ***/
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
|
@@ -442,8 +442,8 @@ _gdk_frame_clock_begin_frame (GdkFrameClock *frame_clock)
|
||||
* for the current frame or a recent frame. The #GdkFrameTimings
|
||||
* object may not yet be complete: see gdk_frame_timings_get_complete().
|
||||
*
|
||||
* Returns: (nullable): the #GdkFrameTimings object for the specified
|
||||
* frame, or %NULL if it is not available. See
|
||||
* Returns: (nullable) (transfer none): the #GdkFrameTimings object for
|
||||
* the specified frame, or %NULL if it is not available. See
|
||||
* gdk_frame_clock_get_history_start().
|
||||
* Since: 3.8
|
||||
*/
|
||||
@@ -475,10 +475,10 @@ gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
|
||||
*
|
||||
* Gets the frame timings for the current frame.
|
||||
*
|
||||
* Returns: (nullable): the #GdkFrameTimings for the frame currently
|
||||
* being processed, or even no frame is being processed, for the
|
||||
* previous frame. Before any frames have been processed, returns
|
||||
* %NULL.
|
||||
* Returns: (nullable) (transfer none): the #GdkFrameTimings for the
|
||||
* frame currently being processed, or even no frame is being
|
||||
* processed, for the previous frame. Before any frames have been
|
||||
* processed, returns %NULL.
|
||||
* Since: 3.8
|
||||
*/
|
||||
GdkFrameTimings *
|
||||
|
@@ -37,9 +37,6 @@
|
||||
|
||||
struct _GdkFrameClockIdlePrivate
|
||||
{
|
||||
GTimer *timer;
|
||||
/* timer_base is used to avoid ever going backward */
|
||||
gint64 timer_base;
|
||||
gint64 frame_time;
|
||||
gint64 min_next_frame_time;
|
||||
gint64 sleep_serial;
|
||||
@@ -160,22 +157,12 @@ compute_frame_time (GdkFrameClockIdle *idle)
|
||||
{
|
||||
GdkFrameClockIdlePrivate *priv = idle->priv;
|
||||
gint64 computed_frame_time;
|
||||
gint64 elapsed;
|
||||
|
||||
elapsed = g_get_monotonic_time () + priv->timer_base;
|
||||
if (elapsed < priv->frame_time)
|
||||
{
|
||||
/* clock went backward. adapt to that by forevermore increasing
|
||||
* timer_base. For now, assume we've gone forward in time 1ms.
|
||||
*/
|
||||
/* hmm. just fix GTimer? */
|
||||
computed_frame_time = g_get_monotonic_time ();
|
||||
|
||||
/* ensure monotonicity of frame time */
|
||||
if (computed_frame_time <= priv->frame_time)
|
||||
computed_frame_time = priv->frame_time + 1;
|
||||
priv->timer_base += (priv->frame_time - elapsed) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
computed_frame_time = elapsed;
|
||||
}
|
||||
|
||||
return computed_frame_time;
|
||||
}
|
||||
|
@@ -558,6 +558,8 @@ cairo_surface_t * _gdk_offscreen_window_create_surface (GdkWindow *window,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
PangoDirection gdk_unichar_direction (gunichar ch);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_INTERNALS_H__ */
|
||||
|
@@ -10275,7 +10275,7 @@ gdk_window_create_similar_image_surface (GdkWindow * window,
|
||||
* @window: a #GdkWindow
|
||||
* @timestamp: timestamp of the event triggering the window focus
|
||||
*
|
||||
* Sets keyboard focus to @window. In most cases, gtk_window_present()
|
||||
* Sets keyboard focus to @window. In most cases, gtk_window_present_with_time()
|
||||
* should be used on a #GtkWindow, rather than calling this function.
|
||||
*
|
||||
**/
|
||||
@@ -10500,7 +10500,10 @@ void
|
||||
gdk_window_set_startup_id (GdkWindow *window,
|
||||
const gchar *startup_id)
|
||||
{
|
||||
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_startup_id (window, startup_id);
|
||||
GdkWindowImplClass *klass = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
||||
|
||||
if (klass->set_startup_id)
|
||||
klass->set_startup_id (window, startup_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10749,7 +10752,7 @@ gdk_window_iconify (GdkWindow *window)
|
||||
* Attempt to deiconify (unminimize) @window. On X11 the window manager may
|
||||
* choose to ignore the request to deiconify. When using GTK+,
|
||||
* use gtk_window_deiconify() instead of the #GdkWindow variant. Or better yet,
|
||||
* you probably want to use gtk_window_present(), which raises the window, focuses it,
|
||||
* you probably want to use gtk_window_present_with_time(), which raises the window, focuses it,
|
||||
* unminimizes it, and puts it on the current desktop.
|
||||
*
|
||||
**/
|
||||
|
33
gdk/gen-gdk-gresources-xml.py
Normal file
33
gdk/gen-gdk-gresources-xml.py
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Generate gdk.gresources.xml
|
||||
#
|
||||
# Usage: gen-gdk-gresources-xml SRCDIR_GDK [OUTPUT-FILE]
|
||||
|
||||
import os, sys
|
||||
|
||||
srcdir = sys.argv[1]
|
||||
|
||||
xml = '''<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gresources>
|
||||
<gresource prefix='/org/gtk/libgdk'>
|
||||
|
||||
'''
|
||||
|
||||
def get_files(subdir,extension):
|
||||
return sorted(filter(lambda x: x.endswith((extension)), os.listdir(os.path.join(srcdir,subdir))))
|
||||
|
||||
for f in get_files('resources/glsl', '.glsl'):
|
||||
xml += ' <file alias=\'glsl/{0}\'>resources/glsl/{0}</file>\n'.format(f)
|
||||
|
||||
xml += '''
|
||||
</gresource>
|
||||
</gresources>'''
|
||||
|
||||
if len(sys.argv) > 2:
|
||||
outfile = sys.argv[2]
|
||||
f = open(outfile, 'w')
|
||||
f.write(xml)
|
||||
f.close()
|
||||
else:
|
||||
print(xml)
|
377
gdk/meson.build
Normal file
377
gdk/meson.build
Normal file
@@ -0,0 +1,377 @@
|
||||
deprecated_gdk_sources = files('deprecated/gdkcolor.c')
|
||||
gdk_sources = files(
|
||||
'gdk-private.c',
|
||||
'gdk.c',
|
||||
'gdkapplaunchcontext.c',
|
||||
'gdkcairo.c',
|
||||
'gdkcursor.c',
|
||||
'gdkdeprecated.c',
|
||||
'gdkdevice.c',
|
||||
'gdkdevicemanager.c',
|
||||
'gdkdevicepad.c',
|
||||
'gdkdisplay.c',
|
||||
'gdkdisplaymanager.c',
|
||||
'gdkdnd.c',
|
||||
'gdkevents.c',
|
||||
'gdkframetimings.c',
|
||||
'gdkgl.c',
|
||||
'gdkglcontext.c',
|
||||
'gdkglobals.c',
|
||||
'gdkkeys.c',
|
||||
'gdkkeyuni.c',
|
||||
'gdkoffscreenwindow.c',
|
||||
'gdkframeclock.c',
|
||||
'gdkframeclockidle.c',
|
||||
'gdkpango.c',
|
||||
'gdkpixbuf-drawable.c',
|
||||
'gdkproperty.c',
|
||||
'gdkrectangle.c',
|
||||
'gdkrgba.c',
|
||||
'gdkscreen.c',
|
||||
'gdkselection.c',
|
||||
'gdkvisual.c',
|
||||
'gdkwindow.c',
|
||||
'gdkwindowimpl.c',
|
||||
'gdkseat.c',
|
||||
'gdkseatdefault.c',
|
||||
'gdkdevicetool.c',
|
||||
'gdkdrawingcontext.c',
|
||||
'gdkmonitor.c'
|
||||
)
|
||||
|
||||
gdk_gir_public_headers = files(
|
||||
'gdk.h',
|
||||
'gdk-autocleanup.h',
|
||||
'gdkapplaunchcontext.h',
|
||||
'gdkcairo.h',
|
||||
'gdkcursor.h',
|
||||
'gdkdevice.h',
|
||||
'gdkdevicetool.h',
|
||||
'gdkdevicemanager.h',
|
||||
'gdkdevicepad.h',
|
||||
'gdkdisplay.h',
|
||||
'gdkdisplaymanager.h',
|
||||
'gdkdnd.h',
|
||||
'gdkdrawingcontext.h',
|
||||
'gdkevents.h',
|
||||
'gdkframetimings.h',
|
||||
'gdkglcontext.h',
|
||||
'gdkkeys.h',
|
||||
'gdkkeysyms.h',
|
||||
'gdkmain.h',
|
||||
'gdkmonitor.h',
|
||||
'gdkpango.h',
|
||||
'gdkframeclock.h',
|
||||
'gdkpixbuf.h',
|
||||
'gdkprivate.h',
|
||||
'gdkproperty.h',
|
||||
'gdkrectangle.h',
|
||||
'gdkrgba.h',
|
||||
'gdkscreen.h',
|
||||
'gdkseat.h',
|
||||
'gdkselection.h',
|
||||
'gdktestutils.h',
|
||||
'gdkthreads.h',
|
||||
'gdktypes.h',
|
||||
'gdkvisual.h',
|
||||
'gdkwindow.h',
|
||||
)
|
||||
gdk_nogir_public_headers = [files('gdkkeysyms-compat.h')]
|
||||
gdk_public_headers = gdk_gir_public_headers + gdk_nogir_public_headers
|
||||
install_headers(gdk_public_headers, subdir : 'gtk-3.0/gdk')
|
||||
|
||||
deprecated_h_sources = files('deprecated/gdkcolor.h')
|
||||
install_headers(deprecated_h_sources, subdir : 'gtk-3.0/gdk/deprecated')
|
||||
|
||||
# This variable is unused, but added just for completeness
|
||||
gdk_private_headers = files(
|
||||
'gdkseatdefaultprivate.h',
|
||||
'gdkdevicetoolprivate.h',
|
||||
'gdkdrawingcontextprivate.h',
|
||||
'gdkmonitorprivate.h',
|
||||
'gdkprivate.h',
|
||||
)
|
||||
|
||||
gdk_wayland_sources = files(
|
||||
'wayland/gdkapplaunchcontext-wayland.c',
|
||||
'wayland/gdkcursor-wayland.c',
|
||||
'wayland/gdkdevice-wayland.c',
|
||||
'wayland/gdkdisplay-wayland.c',
|
||||
'wayland/gdkdnd-wayland.c',
|
||||
'wayland/gdkeventsource.c',
|
||||
'wayland/gdkglcontext-wayland.c',
|
||||
'wayland/gdkkeys-wayland.c',
|
||||
'wayland/gdkmonitor-wayland.c',
|
||||
'wayland/gdkscreen-wayland.c',
|
||||
'wayland/gdkselection-wayland.c',
|
||||
'wayland/gdkwindow-wayland.c',
|
||||
'wayland/wm-button-layout-translation.c',
|
||||
)
|
||||
|
||||
gdk_broadway_sources = files([
|
||||
'broadway/gdkdisplay-broadway.c',
|
||||
'broadway/gdkscreen-broadway.c',
|
||||
'broadway/broadway-output.c',
|
||||
'broadway/broadway-server.c',
|
||||
'broadway/gdkbroadway-server.c',
|
||||
'broadway/gdkcursor-broadway.c',
|
||||
'broadway/gdkvisual-broadway.c',
|
||||
'broadway/gdkselection-broadway.c',
|
||||
'broadway/gdkwindow-broadway.c',
|
||||
'broadway/gdkmonitor-broadway.c',
|
||||
'broadway/gdkkeys-broadway.c',
|
||||
'broadway/gdkglobals-broadway.c',
|
||||
'broadway/gdkeventsource.c',
|
||||
'broadway/gdkdnd-broadway.c',
|
||||
'broadway/broadwayd.c',
|
||||
'broadway/gdkdevicemanager-broadway.c',
|
||||
'broadway/gdkdevice-broadway.c',
|
||||
'broadway/broadway-buffer.c',
|
||||
'broadway/gdktestutils-broadway.c',
|
||||
'broadway/gdkproperty-broadway.c'
|
||||
])
|
||||
|
||||
gdk_gresource_xml = configure_file(output : 'gdk.gresource.xml',
|
||||
input : 'gen-gdk-gresources-xml.py',
|
||||
command : [find_program('gen-gdk-gresources-xml.py'),
|
||||
meson.current_source_dir(), '@OUTPUT@'])
|
||||
|
||||
gdkresources = gnome.compile_resources('gdkresources',
|
||||
gdk_gresource_xml,
|
||||
source_dir: '.',
|
||||
c_name: '_gdk',
|
||||
extra_args: '--manual-register'
|
||||
)
|
||||
|
||||
gdk_enums = gnome.mkenums('gdkenumtypes',
|
||||
sources: gdk_public_headers,
|
||||
c_template : 'gdkenumtypes.c.template',
|
||||
h_template : 'gdkenumtypes.h.template',
|
||||
install_dir: join_paths(gtk_includedir, 'gtk-3.0/gdk'),
|
||||
install_header : true)
|
||||
|
||||
gdkenum_h = gdk_enums[1]
|
||||
|
||||
gdk_marshalers = gnome.genmarshal('gdkmarshalers',
|
||||
sources : 'gdkmarshalers.list',
|
||||
prefix : '_gdk_marshal',
|
||||
valist_marshallers : true)
|
||||
|
||||
gdkmarshal_h = gdk_marshalers[1]
|
||||
|
||||
gdkconfig_cdata = configuration_data()
|
||||
gdkconfig_cdata.set('GDK_WINDOWING_X11', x11_enabled)
|
||||
gdkconfig_cdata.set('GDK_WINDOWING_WAYLAND', wayland_enabled)
|
||||
gdkconfig_cdata.set('GDK_WINDOWING_WIN32', win32_enabled)
|
||||
gdkconfig_cdata.set('GDK_WINDOWING_BROADWAY', broadway_enabled)
|
||||
|
||||
gdkconfig = configure_file(
|
||||
input : 'gdkconfig.h.meson',
|
||||
output : 'gdkconfig.h',
|
||||
configuration : gdkconfig_cdata,
|
||||
install_dir: join_paths(gtk_includedir, 'gtk-3.0/gdk'))
|
||||
|
||||
|
||||
gdkversion_cdata = configuration_data()
|
||||
gdkversion_cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
|
||||
gdkversion_cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
|
||||
gdkversion_cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
|
||||
gdkversion_cdata.set('GTK_API_VERSION', gtk_api_version)
|
||||
gdkversion_cdata.set('GTK_BINARY_VERSION', gtk_binary_version)
|
||||
gdkversion_cdata.set('GTK_VERSION', meson.project_version())
|
||||
gdkversion_cdata.set('LT_CURRENT_MINUS_AGE', gtk_soversion)
|
||||
|
||||
gdkversionmacros = configure_file(
|
||||
input : 'gdkversionmacros.h.in',
|
||||
output : 'gdkversionmacros.h',
|
||||
configuration: gdkversion_cdata,
|
||||
install_dir: join_paths(gtk_includedir, 'gtk-3.0/gdk'))
|
||||
|
||||
gdkinc = include_directories('.')
|
||||
gdkx11_inc = include_directories('x11')
|
||||
gdkwayland_inc = include_directories('wayland')
|
||||
|
||||
wlinc = include_directories('.')
|
||||
|
||||
gdk_gen_headers = [gdkenum_h, gdkmarshal_h, gdkconfig, gdkversionmacros]
|
||||
|
||||
gdk_deps = [
|
||||
libm,
|
||||
pixbuf_dep,
|
||||
cairo_dep,
|
||||
pango_dep,
|
||||
fribidi_dep,
|
||||
cairogobj_dep,
|
||||
glib_dep,
|
||||
epoxy_dep,
|
||||
fontconfig_dep,
|
||||
platform_gio_dep,
|
||||
pangocairo_dep
|
||||
]
|
||||
|
||||
if win32_enabled
|
||||
gdk_deps += [cc.find_library('advapi32'),
|
||||
cc.find_library('comctl32'),
|
||||
cc.find_library('dwmapi'),
|
||||
cc.find_library('imm32'),
|
||||
cc.find_library('setupapi'),
|
||||
cc.find_library('winmm')]
|
||||
|
||||
gdk_rc = configure_file(
|
||||
input: 'win32/rc/gdk.rc.in',
|
||||
output: 'gdk.rc',
|
||||
configuration: gdkversion_cdata,
|
||||
)
|
||||
gdk_res = import('windows').compile_resources(gdk_rc, include_directories: include_directories('win32/rc'))
|
||||
gdk_sources += gdk_res
|
||||
endif
|
||||
|
||||
gdk_sources = [
|
||||
# Generated
|
||||
gdkconfig,
|
||||
gdk_enums,
|
||||
gdk_marshalers,
|
||||
gdkresources,
|
||||
gdkversionmacros,
|
||||
# Static
|
||||
gdk_sources,
|
||||
deprecated_gdk_sources,
|
||||
]
|
||||
|
||||
if wayland_enabled or broadway_enabled
|
||||
if cc.has_function('shm_open')
|
||||
shmlib = []
|
||||
elif cc.has_function('shm_open', args : '-lrt')
|
||||
shmlib = cc.find_library('rt')
|
||||
else
|
||||
shmlib = []
|
||||
endif
|
||||
endif
|
||||
|
||||
gdk_backends = []
|
||||
gdk_backends_gen_headers = [] # non-public generated headers
|
||||
foreach backend : ['broadway', 'quartz', 'wayland', 'win32', 'x11']
|
||||
if get_variable('@0@_enabled'.format(backend))
|
||||
subdir(backend)
|
||||
gdk_deps += get_variable('gdk_@0@_deps'.format(backend))
|
||||
gdk_backends += get_variable('libgdk_@0@'.format(backend))
|
||||
# Special-case this for now to work around Meson bug with get_variable()
|
||||
# fallback being an empty array, or any array (#1481)
|
||||
if backend == 'wayland'
|
||||
gdk_backends_gen_headers += get_variable('gdk_@0@_gen_headers'.format(backend))
|
||||
endif
|
||||
if backend == 'quartz'
|
||||
common_cflags += ['-DGDK_WINDOWING_QUARTZ', '-xobjective-c']
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if gdk_backends.length() == 0
|
||||
error('No backends enabled')
|
||||
endif
|
||||
|
||||
gdk_link_args = common_ldflags
|
||||
|
||||
# Somehow gdk_win32_display_manager_get_type is not being exported as it
|
||||
# seems that it was optimized out by the MSVC linker. Force-export it here.
|
||||
if cc.get_id() == 'msvc'
|
||||
gdk_link_args += [ '-export:gdk_win32_display_manager_get_type' ]
|
||||
endif
|
||||
|
||||
libgdk = shared_library('gdk-3',
|
||||
soversion: gtk_soversion,
|
||||
version: gtk_library_version,
|
||||
sources: [gdk_sources, gdk_backends_gen_headers, gdkconfig],
|
||||
dependencies: gdk_deps,
|
||||
include_directories: [confinc, gdkx11_inc, wlinc],
|
||||
c_args: [
|
||||
'-DGDK_COMPILATION',
|
||||
'-DG_LOG_DOMAIN="Gdk"',
|
||||
] + common_cflags,
|
||||
link_whole: gdk_backends,
|
||||
link_args: gdk_link_args,
|
||||
darwin_versions : gtk_osxversions,
|
||||
install: true)
|
||||
|
||||
gdk_dep_sources = [gdkconfig, gdkenum_h]
|
||||
# Introspection
|
||||
if build_gir
|
||||
gir_args = ['--quiet']
|
||||
|
||||
# We may build some of the dependencies as sub-projects; this means
|
||||
# that we need to depend on the built introspection data, instead of
|
||||
# the installed one
|
||||
gdk_gir_inc = [ 'cairo-1.0', 'Gio-2.0', ]
|
||||
|
||||
if pixbuf_dep.type_name() == 'internal'
|
||||
gdk_gir_inc += subproject('gdk-pixbuf').get_variable('gdkpixbuf_gir').get(0)
|
||||
else
|
||||
gdk_gir_inc += 'GdkPixbuf-2.0'
|
||||
endif
|
||||
|
||||
if pango_dep.type_name() == 'internal'
|
||||
gdk_gir_inc += subproject('pango').get_variable('pango_gir').get(0)
|
||||
else
|
||||
gdk_gir_inc += 'Pango-1.0'
|
||||
endif
|
||||
|
||||
gdk_gir_sources = gdk_gir_public_headers + deprecated_h_sources
|
||||
gdk_gir_sources += gdk_sources + gdk_enums + [gdkconfig]
|
||||
gdk_gir = gnome.generate_gir(libgdk,
|
||||
sources: gdk_gir_sources,
|
||||
namespace: 'Gdk',
|
||||
nsversion: gtk_api_version,
|
||||
identifier_prefix: 'Gdk',
|
||||
symbol_prefix: 'gdk',
|
||||
export_packages: 'gdk-3.0',
|
||||
includes: gdk_gir_inc,
|
||||
header: 'gdk/gdk.h',
|
||||
install: true,
|
||||
extra_args: gir_args + [
|
||||
'-DGDK_COMPILATION',
|
||||
])
|
||||
gdk_gir_dep = declare_dependency(sources: gdk_gir)
|
||||
gdk_dep_sources += gdk_gir
|
||||
|
||||
if x11_enabled
|
||||
gdk_x11_gir = gnome.generate_gir(libgdk,
|
||||
sources: gdk_x11_public_headers + gdk_x11_sources,
|
||||
namespace: 'GdkX11',
|
||||
nsversion: gtk_api_version,
|
||||
identifier_prefix: 'Gdk',
|
||||
symbol_prefix: 'gdk',
|
||||
export_packages: 'gdk-x11-3.0',
|
||||
includes: gdk_gir_inc + [ gdk_gir[0], 'xlib-2.0', ],
|
||||
install: true,
|
||||
dependencies: gdk_gir_dep,
|
||||
header: 'gdk/gdkx.h',
|
||||
extra_args: gir_args + [
|
||||
'-DGDK_COMPILATION',
|
||||
])
|
||||
gdk_dep_sources += gdk_x11_gir
|
||||
endif
|
||||
|
||||
if win32_enabled
|
||||
gdk_win32_gir = gnome.generate_gir(libgdk,
|
||||
sources: gdk_win32_public_headers + gdk_win32_sources,
|
||||
namespace: 'GdkWin32',
|
||||
nsversion: gtk_api_version,
|
||||
identifier_prefix: 'Gdk',
|
||||
symbol_prefix: 'gdk',
|
||||
export_packages: 'gdk-win32-3.0',
|
||||
includes: gdk_gir_inc + [gdk_gir[0]],
|
||||
install: true,
|
||||
dependencies: gdk_gir_dep,
|
||||
header: 'gdk/gdkwin32.h',
|
||||
extra_args: gir_args + [
|
||||
'-DGDK_COMPILATION',
|
||||
])
|
||||
gdk_dep_sources += gdk_win32_gir
|
||||
endif
|
||||
endif
|
||||
|
||||
libgdk_dep = declare_dependency(
|
||||
link_with: libgdk,
|
||||
sources: gdk_dep_sources,
|
||||
include_directories: [confinc, gdkx11_inc, wlinc],
|
||||
dependencies: gdk_deps)
|
@@ -278,7 +278,7 @@
|
||||
screen:screen];
|
||||
|
||||
[self setAcceptsMouseMovedEvents:YES];
|
||||
[self setDelegate:self];
|
||||
[self setDelegate:(id<NSWindowDelegate>)self];
|
||||
[self setReleasedWhenClosed:YES];
|
||||
|
||||
return self;
|
||||
@@ -384,40 +384,34 @@
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
|
||||
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE)
|
||||
{
|
||||
return [super convertPointToScreen: point];
|
||||
}
|
||||
return [super convertPointToScreen: point];
|
||||
#endif
|
||||
if (gdk_quartz_osx_version () >= GDK_OSX_LION)
|
||||
{
|
||||
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
|
||||
NSRect outrect = [self convertRectToScreen: inrect];
|
||||
return (NSPoint)((CGRect)outrect).origin;
|
||||
}
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
return [self convertBaseToScreen:point];
|
||||
if (gdk_quartz_osx_version () < GDK_OSX_LION)
|
||||
return [self convertBaseToScreen:point];
|
||||
#endif
|
||||
{
|
||||
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
|
||||
NSRect outrect = [self convertRectToScreen: inrect];
|
||||
return outrect.origin;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSPoint)convertPointFromScreen:(NSPoint)point
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
|
||||
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE)
|
||||
{
|
||||
return [super convertPointFromScreen: point];
|
||||
}
|
||||
return [super convertPointFromScreen: point];
|
||||
#endif
|
||||
if (gdk_quartz_osx_version () >= GDK_OSX_LION)
|
||||
{
|
||||
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
|
||||
NSRect outrect = [self convertRectFromScreen: inrect];
|
||||
return (NSPoint)((CGRect)outrect).origin;
|
||||
}
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
return [self convertScreenToBase:point];
|
||||
if (gdk_quartz_osx_version () < GDK_OSX_LION)
|
||||
return [self convertScreenToBase:point];
|
||||
#endif
|
||||
{
|
||||
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
|
||||
NSRect outrect = [self convertRectFromScreen: inrect];
|
||||
return outrect.origin;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)trackManualMove
|
||||
@@ -794,7 +788,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
wh = gdk_window_get_height (win);
|
||||
|
||||
if (gx > wx && gy > wy && gx <= wx + ww && gy <= wy + wh)
|
||||
event->dnd.context->dest_window = win;
|
||||
event->dnd.context->dest_window = g_object_ref (win);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -31,8 +31,9 @@
|
||||
if ((self = [super initWithFrame: frameRect]))
|
||||
{
|
||||
markedRange = NSMakeRange (NSNotFound, 0);
|
||||
selectedRange = NSMakeRange (NSNotFound, 0);
|
||||
selectedRange = NSMakeRange (0, 0);
|
||||
}
|
||||
[self setValue: @(YES) forKey: @"postsFrameChangedNotifications"];
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -57,6 +58,16 @@
|
||||
|
||||
-(void) keyDown: (NSEvent *) theEvent
|
||||
{
|
||||
/* NOTE: When user press Cmd+A, interpretKeyEvents: will call noop:
|
||||
method. When user press and hold A to show the accented char window,
|
||||
it consumed repeating key down events for key 'A' do NOT call
|
||||
any other method. We use this behavior to determine if this key
|
||||
down event is filtered by interpretKeyEvents.
|
||||
*/
|
||||
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
|
||||
|
||||
GDK_NOTE (EVENTS, g_message ("keyDown"));
|
||||
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];
|
||||
}
|
||||
@@ -124,7 +135,8 @@
|
||||
-(void)unmarkText
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("unmarkText"));
|
||||
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
|
||||
selectedRange = NSMakeRange (0, 0);
|
||||
markedRange = NSMakeRange (NSNotFound, 0);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL, g_free);
|
||||
}
|
||||
@@ -209,8 +221,15 @@
|
||||
else
|
||||
{
|
||||
str = [string UTF8String];
|
||||
selectedRange = NSMakeRange ([string length], 0);
|
||||
}
|
||||
|
||||
if (replacementRange.length > 0)
|
||||
{
|
||||
g_object_set_data (G_OBJECT (gdk_window), TIC_INSERT_TEXT_REPLACE_LEN,
|
||||
GINT_TO_POINTER (replacementRange.length));
|
||||
}
|
||||
|
||||
g_object_set_data_full (G_OBJECT (gdk_window), TIC_INSERT_TEXT, g_strdup (str), g_free);
|
||||
GDK_NOTE (EVENTS, g_message ("insertText: set %s (%p, nsview %p): %s",
|
||||
TIC_INSERT_TEXT, gdk_window, self,
|
||||
@@ -537,6 +556,8 @@
|
||||
-(void)noop: (id)sender
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_message ("noop"));
|
||||
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
|
||||
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------- */
|
||||
@@ -707,6 +728,9 @@
|
||||
|
||||
-(void)setFrame: (NSRect)frame
|
||||
{
|
||||
if (GDK_WINDOW_DESTROYED (gdk_window))
|
||||
return;
|
||||
|
||||
[super setFrame: frame];
|
||||
|
||||
if ([self window])
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#define TIC_SELECTED_POS "tic-selected-pos"
|
||||
#define TIC_SELECTED_LEN "tic-selected-len"
|
||||
#define TIC_INSERT_TEXT "tic-insert-text"
|
||||
#define TIC_INSERT_TEXT_REPLACE_LEN "tic-insert-text-replace-len"
|
||||
#define TIC_IN_KEY_DOWN "tic-in-key-down"
|
||||
|
||||
/* GtkIMContext */
|
||||
|
@@ -64,6 +64,7 @@ libgdkquartzinclude_HEADERS = \
|
||||
gdkquartzdisplay.h \
|
||||
gdkquartzdisplaymanager.h \
|
||||
gdkquartzdnd.h \
|
||||
gdkquartzglcontext.h \
|
||||
gdkquartzkeys.h \
|
||||
gdkquartzmonitor.h \
|
||||
gdkquartzscreen.h \
|
||||
@@ -71,5 +72,7 @@ libgdkquartzinclude_HEADERS = \
|
||||
gdkquartzvisual.h \
|
||||
gdkquartzwindow.h
|
||||
|
||||
EXTRA_DIST += \
|
||||
meson.build
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -31,6 +31,35 @@
|
||||
#include "gdkmonitorprivate.h"
|
||||
#include "gdkdisplay-quartz.h"
|
||||
#include "gdkmonitor-quartz.h"
|
||||
#include "gdkglcontext-quartz.h"
|
||||
|
||||
/* Note about coordinates: There are three coordinate systems at play:
|
||||
*
|
||||
* 1. Core Graphics starts at the origin at the upper right of the
|
||||
* main window (the one with the menu bar when you look at arrangement
|
||||
* in System Preferences>Displays) and increases down and to the
|
||||
* right; up and to the left are negative values of y and x
|
||||
* respectively.
|
||||
*
|
||||
* 2. AppKit (functions beginning with "NS" for NextStep) coordinates
|
||||
* also have their origin at the main window, but it's the *lower*
|
||||
* left corner and coordinates increase up and to the
|
||||
* right. Coordinates below or left of the origin are negative.
|
||||
*
|
||||
* 3. Gdk coordinates origin is at the upper left corner of the
|
||||
* imaginary rectangle enclosing all monitors and like Core Graphics
|
||||
* increase down and to the right. There are no negative coordinates.
|
||||
*
|
||||
* We need to deal with all three because AppKit's NSScreen array is
|
||||
* recomputed with new pointers whenever the monitor arrangement
|
||||
* changes so we can't cache the references it provides. CoreGraphics
|
||||
* screen IDs are constant between reboots so those are what we use to
|
||||
* map GdkMonitors and screens, but the sizes and origins must be
|
||||
* converted to Gdk coordinates to make sense to Gdk and we must
|
||||
* frequently convert between Gdk and AppKit coordinates when
|
||||
* determining the drawable area of a monitor and placing windows and
|
||||
* views (the latter containing our cairo surfaces for drawing on).
|
||||
*/
|
||||
|
||||
static gint MONITORS_CHANGED = 0;
|
||||
|
||||
@@ -220,32 +249,45 @@ gdk_quartz_display_pop_error_trap (GdkDisplay *display, gboolean ignore)
|
||||
*/
|
||||
|
||||
int
|
||||
get_active_displays (CGDirectDisplayID **screens)
|
||||
get_active_displays (CGDirectDisplayID **displays)
|
||||
{
|
||||
unsigned int displays = 0;
|
||||
unsigned int n_displays = 0;
|
||||
|
||||
CGGetActiveDisplayList (0, NULL, &displays);
|
||||
if (screens)
|
||||
CGGetActiveDisplayList (0, NULL, &n_displays);
|
||||
if (displays)
|
||||
{
|
||||
*screens = g_new0 (CGDirectDisplayID, displays);
|
||||
CGGetActiveDisplayList (displays, *screens, &displays);
|
||||
*displays = g_new0 (CGDirectDisplayID, n_displays);
|
||||
CGGetActiveDisplayList (n_displays, *displays, &n_displays);
|
||||
}
|
||||
|
||||
return displays;
|
||||
return n_displays;
|
||||
}
|
||||
|
||||
static inline GdkRectangle
|
||||
cgrect_to_gdkrect (CGRect cgrect)
|
||||
{
|
||||
GdkRectangle gdkrect = {(int)trunc (cgrect.origin.x),
|
||||
(int)trunc (cgrect.origin.y),
|
||||
(int)trunc (cgrect.size.width),
|
||||
(int)trunc (cgrect.size.height)};
|
||||
return gdkrect;
|
||||
}
|
||||
|
||||
static void
|
||||
configure_monitor (GdkMonitor *monitor)
|
||||
configure_monitor (GdkMonitor *monitor,
|
||||
GdkQuartzDisplay *display)
|
||||
{
|
||||
GdkQuartzMonitor *quartz_monitor = GDK_QUARTZ_MONITOR (monitor);
|
||||
CGSize disp_size = CGDisplayScreenSize (quartz_monitor->id);
|
||||
gint width = (int)trunc (disp_size.width);
|
||||
gint height = (int)trunc (disp_size.height);
|
||||
CGRect disp_bounds = CGDisplayBounds (quartz_monitor->id);
|
||||
GdkRectangle disp_geometry = {(int)trunc (disp_bounds.origin.x),
|
||||
(int)trunc (disp_bounds.origin.y),
|
||||
(int)trunc (disp_bounds.size.width),
|
||||
(int)trunc (disp_bounds.size.height)};
|
||||
CGRect main_bounds = CGDisplayBounds (CGMainDisplayID());
|
||||
/* Change origin to Gdk coordinates. */
|
||||
disp_bounds.origin.x = disp_bounds.origin.x + display->geometry.origin.x;
|
||||
disp_bounds.origin.y =
|
||||
display->geometry.origin.y - main_bounds.size.height + disp_bounds.origin.y;
|
||||
GdkRectangle disp_geometry = cgrect_to_gdkrect (disp_bounds);
|
||||
CGDisplayModeRef mode = CGDisplayCopyDisplayMode (quartz_monitor->id);
|
||||
gint refresh_rate = (int)trunc (CGDisplayModeGetRefreshRate (mode));
|
||||
|
||||
@@ -265,13 +307,58 @@ configure_monitor (GdkMonitor *monitor)
|
||||
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN;
|
||||
}
|
||||
|
||||
static void
|
||||
display_rect (GdkQuartzDisplay *display)
|
||||
{
|
||||
uint32_t disp, n_displays = 0;
|
||||
float min_x = 0.0, max_x = 0.0, min_y = 0.0, max_y = 0.0;
|
||||
float min_x_mm = 0.0, max_x_mm = 0.0, min_y_mm = 0.0, max_y_mm = 0.0;
|
||||
float main_height;
|
||||
CGDirectDisplayID *displays;
|
||||
|
||||
n_displays = get_active_displays (&displays);
|
||||
for (disp = 0; disp < n_displays; ++disp)
|
||||
{
|
||||
CGRect bounds = CGDisplayBounds (displays[disp]);
|
||||
CGSize disp_size = CGDisplayScreenSize (displays[disp]);
|
||||
float x_scale = disp_size.width / bounds.size.width;
|
||||
float y_scale = disp_size.height / bounds.size.height;
|
||||
if (disp == 0)
|
||||
main_height = bounds.size.height;
|
||||
min_x = MIN (min_x, bounds.origin.x);
|
||||
min_y = MIN (min_y, bounds.origin.y);
|
||||
|
||||
max_x = MAX (max_x, bounds.origin.x + bounds.size.width);
|
||||
max_y = MAX (max_y, bounds.origin.y + bounds.size.height);
|
||||
min_x_mm = MIN (min_x_mm, bounds.origin.x / x_scale);
|
||||
min_y_mm = MIN (min_y_mm, main_height - (bounds.size.height + bounds.origin.y) / y_scale);
|
||||
max_x_mm = MAX (max_x_mm, (bounds.origin.x + bounds.size.width) / x_scale);
|
||||
max_y_mm = MAX (max_y_mm, (bounds.origin.y + bounds.size.height) / y_scale);
|
||||
|
||||
}
|
||||
g_free (displays);
|
||||
/* Adjusts the origin to AppKit coordinates. */
|
||||
display->geometry = NSMakeRect (-min_x, main_height - min_y,
|
||||
max_x - min_x, max_y - min_y);
|
||||
display->size = NSMakeSize (max_x_mm - min_x_mm, max_y_mm - min_y_mm);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
same_monitor (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
GdkQuartzMonitor *mon_a = GDK_QUARTZ_MONITOR (a);
|
||||
CGDirectDisplayID disp_id = (CGDirectDisplayID)GPOINTER_TO_INT (b);
|
||||
if (!mon_a)
|
||||
return FALSE;
|
||||
return mon_a->id == disp_id;
|
||||
}
|
||||
|
||||
static void
|
||||
display_reconfiguration_callback (CGDirectDisplayID cg_display,
|
||||
CGDisplayChangeSummaryFlags flags,
|
||||
void *data)
|
||||
{
|
||||
GdkQuartzDisplay *display = data;
|
||||
GdkQuartzMonitor *monitor;
|
||||
|
||||
/* Ignore the begin configuration signal. */
|
||||
if (flags & kCGDisplayBeginConfigurationFlag)
|
||||
@@ -281,27 +368,44 @@ display_reconfiguration_callback (CGDirectDisplayID cg_display,
|
||||
kCGDisplaySetMainFlag | kCGDisplayDesktopShapeChangedFlag |
|
||||
kCGDisplayMirrorFlag | kCGDisplayUnMirrorFlag))
|
||||
{
|
||||
monitor = g_hash_table_lookup (display->monitors,
|
||||
GINT_TO_POINTER (cg_display));
|
||||
if (!monitor)
|
||||
GdkQuartzMonitor *monitor = NULL;
|
||||
guint index;
|
||||
|
||||
if (!g_ptr_array_find_with_equal_func (display->monitors,
|
||||
GINT_TO_POINTER (cg_display),
|
||||
same_monitor,
|
||||
&index))
|
||||
{
|
||||
monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
|
||||
"display", display, NULL);
|
||||
monitor->id = cg_display;
|
||||
g_hash_table_insert (display->monitors, GINT_TO_POINTER (monitor->id),
|
||||
monitor);
|
||||
g_ptr_array_add (display->monitors, monitor);
|
||||
gdk_display_monitor_added (GDK_DISPLAY (display),
|
||||
GDK_MONITOR (monitor));
|
||||
}
|
||||
configure_monitor (GDK_MONITOR (monitor));
|
||||
else
|
||||
{
|
||||
monitor = g_ptr_array_index (display->monitors, index);
|
||||
}
|
||||
|
||||
display_rect (display);
|
||||
configure_monitor (GDK_MONITOR (monitor), display);
|
||||
}
|
||||
else if (flags & (kCGDisplayRemoveFlag | kCGDisplayDisabledFlag))
|
||||
{
|
||||
GdkMonitor *monitor = g_hash_table_lookup (display->monitors,
|
||||
GINT_TO_POINTER (cg_display));
|
||||
gdk_display_monitor_removed (GDK_DISPLAY (display),
|
||||
GDK_MONITOR (monitor));
|
||||
g_hash_table_remove (display->monitors, GINT_TO_POINTER (cg_display));
|
||||
guint index;
|
||||
|
||||
if (g_ptr_array_find_with_equal_func (display->monitors,
|
||||
GINT_TO_POINTER (cg_display),
|
||||
same_monitor,
|
||||
&index))
|
||||
{
|
||||
GdkQuartzMonitor *monitor = g_ptr_array_index (display->monitors,
|
||||
index);
|
||||
gdk_display_monitor_removed (GDK_DISPLAY (display),
|
||||
GDK_MONITOR (monitor));
|
||||
g_ptr_array_remove_fast (display->monitors, monitor);
|
||||
}
|
||||
}
|
||||
|
||||
g_signal_emit (display, MONITORS_CHANGED, 0);
|
||||
@@ -311,7 +415,8 @@ display_reconfiguration_callback (CGDirectDisplayID cg_display,
|
||||
static int
|
||||
gdk_quartz_display_get_n_monitors (GdkDisplay *display)
|
||||
{
|
||||
return get_active_displays (NULL);
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
return quartz_display->monitors->len;
|
||||
}
|
||||
|
||||
static GdkMonitor *
|
||||
@@ -319,13 +424,10 @@ gdk_quartz_display_get_monitor (GdkDisplay *display,
|
||||
int monitor_num)
|
||||
{
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
CGDirectDisplayID *screens = NULL;
|
||||
int n_displays = gdk_quartz_display_get_n_monitors (display);
|
||||
|
||||
int count = get_active_displays (&screens);
|
||||
|
||||
if (monitor_num >= 0 && monitor_num < count)
|
||||
return g_hash_table_lookup (quartz_display->monitors,
|
||||
GINT_TO_POINTER (screens[monitor_num]));
|
||||
if (monitor_num >= 0 && monitor_num < n_displays)
|
||||
return g_ptr_array_index (quartz_display->monitors, monitor_num);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -335,9 +437,15 @@ gdk_quartz_display_get_primary_monitor (GdkDisplay *display)
|
||||
{
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
CGDirectDisplayID primary_id = CGMainDisplayID ();
|
||||
GdkMonitor *monitor = NULL;
|
||||
guint index;
|
||||
|
||||
return g_hash_table_lookup (quartz_display->monitors,
|
||||
GINT_TO_POINTER (primary_id));
|
||||
if (g_ptr_array_find_with_equal_func (quartz_display->monitors,
|
||||
GINT_TO_POINTER (primary_id),
|
||||
same_monitor, &index))
|
||||
monitor = g_ptr_array_index (quartz_display->monitors, index);
|
||||
|
||||
return monitor;
|
||||
}
|
||||
|
||||
static GdkMonitor *
|
||||
@@ -347,10 +455,27 @@ gdk_quartz_display_get_monitor_at_window (GdkDisplay *display,
|
||||
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
NSWindow *nswindow = impl->toplevel;
|
||||
NSScreen *screen = [nswindow screen];
|
||||
CGDirectDisplayID id = [[[screen deviceDescription]
|
||||
objectForKey: @"NSScreenNumber"] unsignedIntValue];
|
||||
return g_hash_table_lookup (GDK_QUARTZ_DISPLAY (display)->monitors,
|
||||
GINT_TO_POINTER (id));
|
||||
GdkMonitor *monitor = NULL;
|
||||
if (screen)
|
||||
{
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
|
||||
guint index;
|
||||
CGDirectDisplayID disp_id =
|
||||
[[[screen deviceDescription]
|
||||
objectForKey: @"NSScreenNumber"] unsignedIntValue];
|
||||
if (g_ptr_array_find_with_equal_func (quartz_display->monitors,
|
||||
GINT_TO_POINTER (disp_id),
|
||||
same_monitor, &index))
|
||||
monitor = g_ptr_array_index (quartz_display->monitors, index);
|
||||
}
|
||||
if (!monitor)
|
||||
{
|
||||
GdkRectangle rect = cgrect_to_gdkrect (NSRectToCGRect ([nswindow frame]));
|
||||
monitor = gdk_display_get_monitor_at_point (display,
|
||||
rect.x + rect.width/2,
|
||||
rect.y + rect.height /2);
|
||||
}
|
||||
return monitor;
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
|
||||
@@ -358,36 +483,35 @@ G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
|
||||
static void
|
||||
gdk_quartz_display_init (GdkQuartzDisplay *display)
|
||||
{
|
||||
uint32_t max_displays = 0, disp;
|
||||
uint32_t n_displays = 0, disp;
|
||||
CGDirectDisplayID *displays;
|
||||
|
||||
CGGetActiveDisplayList (0, NULL, &max_displays);
|
||||
display->monitors = g_hash_table_new_full (g_direct_hash, NULL,
|
||||
NULL, g_object_unref);
|
||||
displays = g_new0 (CGDirectDisplayID, max_displays);
|
||||
CGGetActiveDisplayList (max_displays, displays, &max_displays);
|
||||
for (disp = 0; disp < max_displays; ++disp)
|
||||
display_rect(display); /* Initialize the overall display coordinates. */
|
||||
n_displays = get_active_displays (&displays);
|
||||
display->monitors = g_ptr_array_new_full (n_displays, g_object_unref);
|
||||
for (disp = 0; disp < n_displays; ++disp)
|
||||
{
|
||||
GdkQuartzMonitor *monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
|
||||
"display", display, NULL);
|
||||
monitor->id = displays[disp];
|
||||
g_hash_table_insert (display->monitors, GINT_TO_POINTER (monitor->id),
|
||||
monitor);
|
||||
configure_monitor (GDK_MONITOR (monitor));
|
||||
g_ptr_array_add (display->monitors, monitor);
|
||||
configure_monitor (GDK_MONITOR (monitor), display);
|
||||
}
|
||||
g_free (displays);
|
||||
CGDisplayRegisterReconfigurationCallback (display_reconfiguration_callback,
|
||||
display);
|
||||
/* So that monitors changed will keep display->geometry syncronized. */
|
||||
g_signal_emit (display, MONITORS_CHANGED, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_display_dispose (GObject *object)
|
||||
{
|
||||
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
|
||||
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (object);
|
||||
|
||||
g_hash_table_destroy (display_quartz->monitors);
|
||||
g_ptr_array_free (quartz_display->monitors, TRUE);
|
||||
CGDisplayRemoveReconfigurationCallback (display_reconfiguration_callback,
|
||||
display_quartz);
|
||||
quartz_display);
|
||||
|
||||
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -461,6 +585,7 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
|
||||
display_class->get_monitor = gdk_quartz_display_get_monitor;
|
||||
display_class->get_primary_monitor = gdk_quartz_display_get_primary_monitor;
|
||||
display_class->get_monitor_at_window = gdk_quartz_display_get_monitor_at_window;
|
||||
display_class->make_gl_context_current = gdk_quartz_display_make_gl_context_current;
|
||||
|
||||
/**
|
||||
* GdkQuartzDisplay::monitors-changed:
|
||||
|
@@ -32,7 +32,9 @@ G_BEGIN_DECLS
|
||||
struct _GdkQuartzDisplay
|
||||
{
|
||||
GdkDisplay parent_instance;
|
||||
GHashTable *monitors;
|
||||
NSRect geometry; /* In AppKit coordinates. */
|
||||
NSSize size; /* Aggregate size of displays in millimeters. */
|
||||
GPtrArray *monitors;
|
||||
};
|
||||
|
||||
struct _GdkQuartzDisplayClass
|
||||
|
@@ -608,11 +608,26 @@ find_toplevel_under_pointer (GdkDisplay *display,
|
||||
|
||||
info = _gdk_display_get_pointer_info (display, gdk_seat_get_pointer (seat));
|
||||
toplevel = info->toplevel_under_pointer;
|
||||
if (toplevel && WINDOW_IS_TOPLEVEL (toplevel))
|
||||
get_window_point_from_screen_point (toplevel, screen_point, x, y);
|
||||
|
||||
if (!(toplevel && WINDOW_IS_TOPLEVEL (toplevel)))
|
||||
{
|
||||
gint gdk_x = 0, gdk_y = 0;
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (screen_point, &gdk_x, &gdk_y);
|
||||
toplevel = gdk_display_get_window_at_pointer (display, &gdk_x, &gdk_y);
|
||||
|
||||
if (toplevel && ! WINDOW_IS_TOPLEVEL (toplevel))
|
||||
toplevel = gdk_window_get_toplevel (toplevel);
|
||||
|
||||
if (toplevel)
|
||||
info->toplevel_under_pointer = g_object_ref (toplevel);
|
||||
else
|
||||
info->toplevel_under_pointer = NULL;
|
||||
|
||||
}
|
||||
|
||||
if (toplevel)
|
||||
{
|
||||
get_window_point_from_screen_point (toplevel, screen_point, x, y);
|
||||
/* If the coordinates are out of window bounds, this toplevel is not
|
||||
* under the pointer and we thus return NULL. This can occur when
|
||||
* toplevel under pointer has not yet been updated due to a very recent
|
||||
@@ -629,33 +644,15 @@ find_toplevel_under_pointer (GdkDisplay *display,
|
||||
static GdkWindow *
|
||||
find_toplevel_for_keyboard_event (NSEvent *nsevent)
|
||||
{
|
||||
GList *list, *l;
|
||||
GdkWindow *window;
|
||||
GdkDisplay *display;
|
||||
GdkQuartzView *view;
|
||||
GdkSeat *seat;
|
||||
GdkQuartzView *view = (GdkQuartzView *)[[nsevent window] contentView];
|
||||
GdkWindow *window = [view gdkWindow];
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkSeat *seat = gdk_display_get_default_seat (display);
|
||||
GdkDevice *device = gdk_seat_get_keyboard (seat);
|
||||
GdkDeviceGrabInfo *grab = _gdk_display_get_last_device_grab (display, device);
|
||||
|
||||
view = (GdkQuartzView *)[[nsevent window] contentView];
|
||||
window = [view gdkWindow];
|
||||
|
||||
display = gdk_window_get_display (window);
|
||||
seat = gdk_display_get_default_seat (display);
|
||||
|
||||
list = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_KEYBOARD);
|
||||
for (l = list; l; l = l->next)
|
||||
{
|
||||
GdkDeviceGrabInfo *grab;
|
||||
GdkDevice *device = l->data;
|
||||
|
||||
grab = _gdk_display_get_last_device_grab (display, device);
|
||||
if (grab && grab->window && !grab->owner_events)
|
||||
{
|
||||
window = gdk_window_get_effective_toplevel (grab->window);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (list);
|
||||
if (grab && grab->window && !grab->owner_events)
|
||||
window = gdk_window_get_effective_toplevel (grab->window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1540,6 +1537,9 @@ gdk_event_translate (GdkEvent *event,
|
||||
|
||||
grab = _gdk_display_get_last_device_grab (_gdk_display,
|
||||
gdk_seat_get_pointer (seat));
|
||||
if (!grab)
|
||||
[impl->toplevel makeKeyWindow];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -24,16 +24,175 @@
|
||||
|
||||
#include "gdkglcontext-quartz.h"
|
||||
|
||||
#include "gdkquartzdisplay.h"
|
||||
#include "gdkquartzglcontext.h"
|
||||
#include "gdkquartzwindow.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
|
||||
#include "gdkinternals.h"
|
||||
|
||||
#include "gdkintl.h"
|
||||
|
||||
G_DEFINE_TYPE (GdkQuartzGLContext, gdk_quartz_gl_context, GDK_TYPE_GL_CONTEXT)
|
||||
|
||||
static void gdk_quartz_gl_context_dispose (GObject *gobject);
|
||||
|
||||
void
|
||||
gdk_quartz_window_invalidate_for_new_frame (GdkWindow *window,
|
||||
cairo_region_t *update_area)
|
||||
{
|
||||
cairo_rectangle_int_t window_rect;
|
||||
|
||||
/* Minimal update is ok if we're not drawing with gl */
|
||||
if (window->gl_paint_context == NULL)
|
||||
return;
|
||||
|
||||
window_rect.x = 0;
|
||||
window_rect.y = 0;
|
||||
window_rect.width = gdk_window_get_width (window);
|
||||
window_rect.height = gdk_window_get_height (window);
|
||||
|
||||
/* If nothing else is known, repaint everything so that the back
|
||||
buffer is fully up-to-date for the swapbuffer */
|
||||
cairo_region_union_rectangle (update_area, &window_rect);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_quartz_gl_context_realize (GdkGLContext *context,
|
||||
GError **error)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_gl_context_end_frame (GdkGLContext *context,
|
||||
cairo_region_t *painted,
|
||||
cairo_region_t *damage)
|
||||
{
|
||||
GdkQuartzGLContext *context_quartz = GDK_QUARTZ_GL_CONTEXT (context);
|
||||
|
||||
[context_quartz->gl_context flushBuffer];
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_gl_context_class_init (GdkQuartzGLContextClass *klass)
|
||||
{
|
||||
GdkGLContextClass *context_class = GDK_GL_CONTEXT_CLASS (klass);
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
context_class->realize = gdk_quartz_gl_context_realize;
|
||||
context_class->end_frame = gdk_quartz_gl_context_end_frame;
|
||||
gobject_class->dispose = gdk_quartz_gl_context_dispose;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_gl_context_init (GdkQuartzGLContext *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_quartz_display_init_gl (GdkDisplay *display)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GdkGLContext *
|
||||
gdk_quartz_window_create_gl_context (GdkWindow *window,
|
||||
gboolean attached,
|
||||
GdkGLContext *share,
|
||||
GError **error)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
g_set_error_literal (error, GDK_GL_ERROR, GDK_GL_ERROR_NOT_AVAILABLE,
|
||||
_("Not implemented on OS X"));
|
||||
return NULL;
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkQuartzGLContext *context;
|
||||
NSOpenGLContext *ctx;
|
||||
NSOpenGLPixelFormatAttribute attrs[] =
|
||||
{
|
||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
|
||||
NSOpenGLPFADoubleBuffer,
|
||||
NSOpenGLPFAColorSize, 24,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
0
|
||||
};
|
||||
NSOpenGLPixelFormat *format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
|
||||
|
||||
if (format == NULL)
|
||||
{
|
||||
g_set_error_literal (error, GDK_GL_ERROR,
|
||||
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||
_("Unable to create a GL pixel format"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ctx = [[NSOpenGLContext alloc] initWithFormat:format
|
||||
shareContext:share ? GDK_QUARTZ_GL_CONTEXT (share)->gl_context : nil];
|
||||
if (ctx == NULL)
|
||||
{
|
||||
g_set_error_literal (error, GDK_GL_ERROR,
|
||||
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||
_("Unable to create a GL context"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
[format release];
|
||||
|
||||
if (attached)
|
||||
{
|
||||
NSView *view = gdk_quartz_window_get_nsview (window);
|
||||
|
||||
if ([view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)])
|
||||
[view setWantsBestResolutionOpenGLSurface:YES];
|
||||
|
||||
GLint sync_to_framerate = 1;
|
||||
[ctx setValues:&sync_to_framerate forParameter:NSOpenGLCPSwapInterval];
|
||||
|
||||
[ctx setView:view];
|
||||
}
|
||||
|
||||
GDK_NOTE (OPENGL,
|
||||
g_print ("Created NSOpenGLContext[%p]\n", ctx));
|
||||
|
||||
context = g_object_new (GDK_TYPE_QUARTZ_GL_CONTEXT,
|
||||
"window", window,
|
||||
"display", display,
|
||||
"shared-context", share,
|
||||
NULL);
|
||||
|
||||
context->gl_context = ctx;
|
||||
context->is_attached = attached;
|
||||
|
||||
return GDK_GL_CONTEXT (context);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_gl_context_dispose (GObject *gobject)
|
||||
{
|
||||
GdkQuartzGLContext *context_quartz = GDK_QUARTZ_GL_CONTEXT (gobject);
|
||||
|
||||
if (context_quartz->gl_context != NULL)
|
||||
{
|
||||
[context_quartz->gl_context clearDrawable];
|
||||
[context_quartz->gl_context release];
|
||||
context_quartz->gl_context = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gdk_quartz_gl_context_parent_class)->dispose (gobject);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_quartz_display_make_gl_context_current (GdkDisplay *display,
|
||||
GdkGLContext *context)
|
||||
{
|
||||
GdkQuartzGLContext *context_quartz;
|
||||
|
||||
if (context == NULL)
|
||||
{
|
||||
[NSOpenGLContext clearCurrentContext];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
context_quartz = GDK_QUARTZ_GL_CONTEXT (context);
|
||||
|
||||
[context_quartz->gl_context makeCurrentContext];
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -24,17 +24,40 @@
|
||||
#define __GDK_QUARTZ_GL_CONTEXT__
|
||||
|
||||
#include "gdkglcontextprivate.h"
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkvisual.h"
|
||||
#include "gdkwindow.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkmain.h"
|
||||
|
||||
#import <OpenGL/OpenGL.h>
|
||||
#import <OpenGL/gl.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
struct _GdkQuartzGLContext
|
||||
{
|
||||
GdkGLContext parent_instance;
|
||||
|
||||
NSOpenGLContext *gl_context;
|
||||
gboolean is_attached;
|
||||
};
|
||||
|
||||
struct _GdkQuartzGLContextClass
|
||||
{
|
||||
GdkGLContextClass parent_class;
|
||||
};
|
||||
|
||||
gboolean gdk_quartz_display_init_gl (GdkDisplay *display);
|
||||
GdkGLContext * gdk_quartz_window_create_gl_context (GdkWindow *window,
|
||||
gboolean attach,
|
||||
GdkGLContext *share,
|
||||
GError **error);
|
||||
void gdk_quartz_window_invalidate_for_new_frame (GdkWindow *window,
|
||||
cairo_region_t *update_area);
|
||||
gboolean gdk_quartz_display_make_gl_context_current (GdkDisplay *display,
|
||||
GdkGLContext *context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "gdkmonitor-quartz.h"
|
||||
#include "gdkscreen-quartz.h"
|
||||
#include "gdkdisplay-quartz.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GdkQuartzMonitor, gdk_quartz_monitor, GDK_TYPE_MONITOR)
|
||||
@@ -30,19 +30,30 @@ static void
|
||||
gdk_quartz_monitor_get_workarea (GdkMonitor *monitor,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
GdkQuartzScreen *quartz_screen = GDK_QUARTZ_SCREEN(gdk_display_get_default_screen (monitor->display));
|
||||
GdkQuartzMonitor *quartz_monitor = GDK_QUARTZ_MONITOR(monitor);
|
||||
|
||||
GDK_QUARTZ_ALLOC_POOL;
|
||||
|
||||
NSArray *array = [NSScreen screens];
|
||||
if (quartz_monitor->monitor_num < [array count])
|
||||
NSScreen* screen;
|
||||
for (id obj in array)
|
||||
{
|
||||
NSScreen *screen = [array objectAtIndex:quartz_monitor->monitor_num];
|
||||
NSRect rect = [screen visibleFrame];
|
||||
CGDirectDisplayID screen_id =
|
||||
[[[obj deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue];
|
||||
GdkQuartzMonitor *q_mon = GDK_QUARTZ_MONITOR (monitor);
|
||||
if (screen_id == q_mon->id)
|
||||
{
|
||||
screen = obj;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dest->x = rect.origin.x - quartz_screen->min_x;
|
||||
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
|
||||
if (screen)
|
||||
{
|
||||
GdkQuartzDisplay *display =
|
||||
GDK_QUARTZ_DISPLAY (gdk_monitor_get_display (monitor));
|
||||
NSRect rect = [screen visibleFrame];
|
||||
dest->x = (int)trunc (display->geometry.origin.x + rect.origin.x);
|
||||
dest->y = (int)trunc (display->geometry.origin.y -
|
||||
rect.origin.y - rect.size.height);
|
||||
dest->width = rect.size.width;
|
||||
dest->height = rect.size.height;
|
||||
}
|
||||
|
@@ -29,7 +29,6 @@
|
||||
struct _GdkQuartzMonitor
|
||||
{
|
||||
GdkMonitor parent;
|
||||
gint monitor_num;
|
||||
CGDirectDisplayID id;
|
||||
};
|
||||
|
||||
|
45
gdk/quartz/gdkquartzglcontext.h
Normal file
45
gdk/quartz/gdkquartzglcontext.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
*
|
||||
* gdkquartzglcontext.h: Quartz specific OpenGL wrappers
|
||||
*
|
||||
* Copyright © 2014 Emmanuele Bassi
|
||||
* Copyright © 2014 Brion Vibber
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_GL_CONTEXT_H__
|
||||
#define __GDK_QUARTZ_GL_CONTEXT_H__
|
||||
|
||||
#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkquartz.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_QUARTZ_GL_CONTEXT (gdk_quartz_gl_context_get_type ())
|
||||
#define GDK_QUARTZ_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_QUARTZ_GL_CONTEXT, GdkQuartzGLContext))
|
||||
#define GDK_QUARTZ_IS_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_QUARTZ_GL_CONTEXT))
|
||||
|
||||
typedef struct _GdkQuartzGLContext GdkQuartzGLContext;
|
||||
typedef struct _GdkQuartzGLContextClass GdkQuartzGLContextClass;
|
||||
|
||||
GDK_AVAILABLE_IN_3_24
|
||||
GType gdk_quartz_gl_context_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_QUARTZ_GL_CONTEXT_H__ */
|
@@ -60,11 +60,12 @@
|
||||
* but GDK coordinates can *not*!
|
||||
*/
|
||||
|
||||
static void gdk_quartz_screen_dispose (GObject *object);
|
||||
static void gdk_quartz_screen_finalize (GObject *object);
|
||||
static void gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen);
|
||||
static void gdk_quartz_screen_reconfigure (GdkQuartzDisplay *dispplay,
|
||||
GdkQuartzScreen *screen);
|
||||
static void gdk_quartz_screen_dispose (GObject *object);
|
||||
static void gdk_quartz_screen_finalize (GObject *object);
|
||||
static void gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen,
|
||||
GdkQuartzDisplay *display);
|
||||
static void gdk_quartz_screen_reconfigure (GdkQuartzDisplay *display,
|
||||
GdkQuartzScreen *screen);
|
||||
|
||||
static const double dpi = 72.0;
|
||||
|
||||
@@ -88,7 +89,7 @@ gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
|
||||
G_CALLBACK (gdk_quartz_screen_reconfigure), quartz_screen);
|
||||
/* The first monitors-changed should have fired already. */
|
||||
_gdk_screen_set_resolution (screen, dpi);
|
||||
gdk_quartz_screen_calculate_layout (quartz_screen);
|
||||
gdk_quartz_screen_calculate_layout (quartz_screen, NULL);
|
||||
quartz_screen->emit_monitors_changed = FALSE;
|
||||
}
|
||||
|
||||
@@ -118,45 +119,24 @@ gdk_quartz_screen_finalize (GObject *object)
|
||||
@end
|
||||
|
||||
static void
|
||||
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
|
||||
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen,
|
||||
GdkQuartzDisplay *display)
|
||||
{
|
||||
int i, monitors;
|
||||
int max_x, max_y;
|
||||
GdkDisplay *display = gdk_screen_get_display (GDK_SCREEN (screen));
|
||||
|
||||
screen->width = 0;
|
||||
screen->height = 0;
|
||||
screen->min_x = 0;
|
||||
screen->min_y = 0;
|
||||
max_x = max_y = 0;
|
||||
screen->mm_width = 0;
|
||||
screen->mm_height = 0;
|
||||
if (!display)
|
||||
display = GDK_QUARTZ_DISPLAY (gdk_screen_get_display (GDK_SCREEN (screen)));
|
||||
|
||||
/* We determine the minimum and maximum x and y coordinates
|
||||
* covered by the monitors. From this we can deduce the width
|
||||
* and height of the root screen.
|
||||
*/
|
||||
monitors = gdk_display_get_n_monitors (display);
|
||||
for (i = 0; i < monitors; ++i)
|
||||
{
|
||||
GdkQuartzMonitor *monitor =
|
||||
GDK_QUARTZ_MONITOR (gdk_display_get_monitor (display, i));
|
||||
GdkRectangle rect;
|
||||
/* Display geometry is the origin and size in AppKit coordinates. AppKit computes */
|
||||
screen->width = (int)trunc (display->geometry.size.width);
|
||||
screen->height = (int)trunc (display->geometry.size.height);
|
||||
screen->orig_x = -(int)trunc (display->geometry.origin.x);
|
||||
screen->orig_y = (int)trunc (display->geometry.origin.y);
|
||||
screen->mm_width = (int)trunc (display->size.width);
|
||||
screen->mm_height = (int)trunc (display->size.height);
|
||||
|
||||
gdk_monitor_get_geometry (GDK_MONITOR (monitor), &rect);
|
||||
screen->min_x = MIN (screen->min_x, rect.x);
|
||||
max_x = MAX (max_x, rect.x + rect.width);
|
||||
|
||||
screen->min_y = MIN (screen->min_y, rect.y);
|
||||
max_y = MAX (max_y, rect.y + rect.height);
|
||||
|
||||
screen->mm_height += GDK_MONITOR (monitor)->height_mm;
|
||||
screen->mm_width += GDK_MONITOR (monitor)->width_mm;
|
||||
}
|
||||
|
||||
screen->width = max_x - screen->min_x;
|
||||
screen->height = max_y - screen->min_y;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_quartz_screen_update_window_sizes (GdkScreen *screen)
|
||||
@@ -201,7 +181,7 @@ gdk_quartz_screen_reconfigure (GdkQuartzDisplay *display, GdkQuartzScreen *scree
|
||||
width = gdk_screen_get_width (GDK_SCREEN (screen));
|
||||
height = gdk_screen_get_height (GDK_SCREEN (screen));
|
||||
|
||||
gdk_quartz_screen_calculate_layout (GDK_QUARTZ_SCREEN (screen));
|
||||
gdk_quartz_screen_calculate_layout (screen, display);
|
||||
|
||||
_gdk_quartz_screen_update_window_sizes (GDK_SCREEN (screen));
|
||||
|
||||
|
@@ -29,9 +29,9 @@ struct _GdkQuartzScreen
|
||||
|
||||
GdkDisplay *display;
|
||||
|
||||
/* Origin of "root window" in Cocoa coordinates */
|
||||
gint min_x;
|
||||
gint min_y;
|
||||
/* Origin of "root window" in AppKit coordinates */
|
||||
gint orig_x;
|
||||
gint orig_y;
|
||||
|
||||
gint width;
|
||||
gint height;
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "gdkwindowimpl.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkglcontext-quartz.h"
|
||||
#include "gdkquartzglcontext.h"
|
||||
#include "gdkquartzscreen.h"
|
||||
#include "gdkquartzcursor.h"
|
||||
|
||||
@@ -208,6 +209,11 @@ gdk_window_impl_quartz_finalize (GObject *object)
|
||||
if (impl->transient_for)
|
||||
g_object_unref (impl->transient_for);
|
||||
|
||||
if (impl->view)
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: impl->toplevel
|
||||
name: @"NSViewFrameDidChangeNotification"
|
||||
object: impl->view];
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@@ -430,7 +436,6 @@ _gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
|
||||
void
|
||||
_gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
|
||||
{
|
||||
GSList *old_update_nswindows = update_nswindows;
|
||||
GSList *tmp_list = update_nswindows;
|
||||
|
||||
update_nswindows = NULL;
|
||||
@@ -448,11 +453,9 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
|
||||
#endif
|
||||
[nswindow release];
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
tmp_list = g_slist_remove_link (tmp_list, tmp_list);
|
||||
}
|
||||
|
||||
g_slist_free (old_update_nswindows);
|
||||
|
||||
in_process_all_updates = FALSE;
|
||||
|
||||
if (gdk_quartz_osx_version() >= GDK_OSX_EL_CAPITAN)
|
||||
@@ -612,10 +615,10 @@ _gdk_quartz_window_gdk_xy_to_xy (gint gdk_x,
|
||||
GdkQuartzScreen *screen_quartz = GDK_QUARTZ_SCREEN (_gdk_screen);
|
||||
|
||||
if (ns_y)
|
||||
*ns_y = screen_quartz->height - gdk_y + screen_quartz->min_y;
|
||||
*ns_y = screen_quartz->orig_y - gdk_y;
|
||||
|
||||
if (ns_x)
|
||||
*ns_x = gdk_x + screen_quartz->min_x;
|
||||
*ns_x = gdk_x + screen_quartz->orig_x;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -627,10 +630,10 @@ _gdk_quartz_window_xy_to_gdk_xy (gint ns_x,
|
||||
GdkQuartzScreen *screen_quartz = GDK_QUARTZ_SCREEN (_gdk_screen);
|
||||
|
||||
if (gdk_y)
|
||||
*gdk_y = screen_quartz->height - ns_y + screen_quartz->min_y;
|
||||
*gdk_y = screen_quartz->orig_y - ns_y;
|
||||
|
||||
if (gdk_x)
|
||||
*gdk_x = ns_x - screen_quartz->min_x;
|
||||
*gdk_x = ns_x - screen_quartz->orig_x;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -912,6 +915,10 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
impl->view = [[GdkQuartzView alloc] initWithFrame:content_rect];
|
||||
[impl->view setGdkWindow:window];
|
||||
[impl->toplevel setContentView:impl->view];
|
||||
[[NSNotificationCenter defaultCenter] addObserver: impl->toplevel
|
||||
selector: @selector (windowDidResize:)
|
||||
name: @"NSViewFrameDidChangeNotification"
|
||||
object: impl->view];
|
||||
[impl->view release];
|
||||
}
|
||||
break;
|
||||
@@ -1318,6 +1325,9 @@ move_resize_window_internal (GdkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
if (window->gl_paint_context != NULL)
|
||||
[GDK_QUARTZ_GL_CONTEXT (window->gl_paint_context)->gl_context update];
|
||||
|
||||
GDK_QUARTZ_RELEASE_POOL;
|
||||
}
|
||||
|
||||
@@ -2172,6 +2182,46 @@ _gdk_quartz_window_update_has_shadow (GdkWindowImplQuartz *impl)
|
||||
[impl->toplevel setHasShadow: has_shadow];
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_quartz_window_set_collection_behavior (NSWindow *nswindow,
|
||||
GdkWindowTypeHint hint)
|
||||
{
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 10110
|
||||
#define GDK_QUARTZ_ALLOWS_TILING NSWindowCollectionBehaviorFullScreenAllowsTiling
|
||||
#define GDK_QUARTZ_DISALLOWS_TILING NSWindowCollectionBehaviorFullScreenDisallowsTiling
|
||||
#else
|
||||
#define GDK_QUARTZ_ALLOWS_TILING 1 << 11
|
||||
#define GDK_QUARTZ_DISALLOWS_TILING 1 << 12
|
||||
#endif
|
||||
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
|
||||
{
|
||||
/* Fullscreen Collection Behavior */
|
||||
NSWindowCollectionBehavior behavior = [nswindow collectionBehavior];
|
||||
switch (hint)
|
||||
{
|
||||
case GDK_WINDOW_TYPE_HINT_NORMAL:
|
||||
case GDK_WINDOW_TYPE_HINT_SPLASHSCREEN:
|
||||
behavior &= ~(NSWindowCollectionBehaviorFullScreenAuxiliary &
|
||||
GDK_QUARTZ_DISALLOWS_TILING);
|
||||
behavior |= (NSWindowCollectionBehaviorFullScreenPrimary |
|
||||
GDK_QUARTZ_ALLOWS_TILING);
|
||||
|
||||
break;
|
||||
default:
|
||||
behavior &= ~(NSWindowCollectionBehaviorFullScreenPrimary &
|
||||
GDK_QUARTZ_ALLOWS_TILING);
|
||||
behavior |= (NSWindowCollectionBehaviorFullScreenAuxiliary |
|
||||
GDK_QUARTZ_DISALLOWS_TILING);
|
||||
break;
|
||||
}
|
||||
[nswindow setCollectionBehavior:behavior];
|
||||
}
|
||||
#undef GDK_QUARTZ_ALLOWS_TILING
|
||||
#undef GDK_QUARTZ_DISALLOWS_TILING
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_quartz_window_set_type_hint (GdkWindow *window,
|
||||
GdkWindowTypeHint hint)
|
||||
@@ -2191,6 +2241,8 @@ gdk_quartz_window_set_type_hint (GdkWindow *window,
|
||||
return;
|
||||
|
||||
_gdk_quartz_window_update_has_shadow (impl);
|
||||
if (impl->toplevel)
|
||||
_gdk_quartz_window_set_collection_behavior (impl->toplevel, hint);
|
||||
[impl->toplevel setLevel: window_type_hint_to_level (hint)];
|
||||
[impl->toplevel setHidesOnDeactivate: window_type_hint_to_hides_on_deactivate (hint)];
|
||||
}
|
||||
@@ -2442,7 +2494,6 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
|
||||
if (new_mask == GDK_QUARTZ_BORDERLESS_WINDOW)
|
||||
{
|
||||
[impl->toplevel setContentSize:rect.size];
|
||||
[impl->toplevel setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
}
|
||||
else
|
||||
[impl->toplevel setFrame:rect display:YES];
|
||||
@@ -2701,6 +2752,9 @@ _gdk_quartz_window_update_fullscreen_state (GdkWindow *window)
|
||||
gboolean is_fullscreen;
|
||||
gboolean was_fullscreen;
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) || !WINDOW_IS_TOPLEVEL (window))
|
||||
return;
|
||||
|
||||
is_fullscreen = window_is_fullscreen (window);
|
||||
was_fullscreen = (gdk_window_get_state (window) & GDK_WINDOW_STATE_FULLSCREEN) != 0;
|
||||
|
||||
@@ -3023,6 +3077,7 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
|
||||
impl_class->delete_property = _gdk_quartz_window_delete_property;
|
||||
|
||||
impl_class->create_gl_context = gdk_quartz_window_create_gl_context;
|
||||
impl_class->invalidate_for_new_frame = gdk_quartz_window_invalidate_for_new_frame;
|
||||
|
||||
impl_quartz_class->get_context = gdk_window_impl_quartz_get_context;
|
||||
impl_quartz_class->release_context = gdk_window_impl_quartz_release_context;
|
||||
|
57
gdk/quartz/meson.build
Normal file
57
gdk/quartz/meson.build
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
add_languages(['objc'])
|
||||
|
||||
gdk_quartz_sources = files(
|
||||
'GdkQuartzView.c',
|
||||
'GdkQuartzNSWindow.c',
|
||||
'gdkcursor-quartz.c',
|
||||
'gdkdevice-core-quartz.c',
|
||||
'gdkdevicemanager-core-quartz.c',
|
||||
'gdkdisplay-quartz.c',
|
||||
'gdkdisplaymanager-quartz.c',
|
||||
'gdkdnd-quartz.c',
|
||||
'gdkevents-quartz.c',
|
||||
'gdkeventloop-quartz.c',
|
||||
'gdkglcontext-quartz.c',
|
||||
'gdkglobals-quartz.c',
|
||||
'gdkkeys-quartz.c',
|
||||
'gdkmonitor-quartz.c',
|
||||
'gdkproperty-quartz.c',
|
||||
'gdkscreen-quartz.c',
|
||||
'gdkselection-quartz.c',
|
||||
'gdktestutils-quartz.c',
|
||||
'gdkutils-quartz.c',
|
||||
'gdkvisual-quartz.c',
|
||||
'gdkwindow-quartz.c',
|
||||
)
|
||||
|
||||
gdk_quartz_public_headers = files(
|
||||
'gdkquartzcursor.h',
|
||||
'gdkquartzdevice-core.h',
|
||||
'gdkquartzdevicemanager-core.h',
|
||||
'gdkquartzdisplay.h',
|
||||
'gdkquartzdisplaymanager.h',
|
||||
'gdkquartzdnd.h',
|
||||
'gdkquartzkeys.h',
|
||||
'gdkquartzmonitor.h',
|
||||
'gdkquartzscreen.h',
|
||||
'gdkquartzutils.h',
|
||||
'gdkquartzvisual.h',
|
||||
'gdkquartzwindow.h',
|
||||
)
|
||||
|
||||
install_headers(gdk_quartz_public_headers, subdir: 'gtk-3.0/gdk/quartz')
|
||||
install_headers('gdkquartz.h', subdir: 'gtk-3.0/gdk')
|
||||
|
||||
core_graphics_dep = dependency('appleframeworks', modules : 'CoreGraphics', required : true)
|
||||
appkit_dep = dependency('appleframeworks', modules : 'AppKit', required : true)
|
||||
cocoa_dep = dependency('appleframeworks', modules : 'Cocoa', required : true)
|
||||
carbon_dep = dependency('appleframeworks', modules : 'Carbon', required : true)
|
||||
|
||||
gdk_quartz_deps = [ core_graphics_dep, appkit_dep, cocoa_dep, carbon_dep ]
|
||||
|
||||
libgdk_quartz = static_library('gdk-quartz',
|
||||
gdk_quartz_sources, gdkconfig, gdkenum_h,
|
||||
include_directories: [confinc, gdkinc],
|
||||
c_args: ['-DGDK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', '-xobjective-c'],
|
||||
dependencies: [gdk_deps, gdk_quartz_deps])
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user