Compare commits
606 Commits
dotted-lin
...
state-savi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9ce1959b4 | ||
|
|
a7edd0992e | ||
|
|
9f35250330 | ||
|
|
7e8dfd5bda | ||
|
|
aa0df60606 | ||
|
|
9ee07d3974 | ||
|
|
1f7ca109c9 | ||
|
|
bc2d8bfa33 | ||
|
|
ee0e82610c | ||
|
|
26c5240dcb | ||
|
|
ecf6c354b5 | ||
|
|
fd499188bd | ||
|
|
0c6fb610e6 | ||
|
|
1962f535e8 | ||
|
|
8db1b89ace | ||
|
|
a1789ee2b8 | ||
|
|
ffb7df2cc4 | ||
|
|
c2ca246aee | ||
|
|
80c33ca2dd | ||
|
|
7307c6fdfb | ||
|
|
039fc2e567 | ||
|
|
1dcf9d5c95 | ||
|
|
742482e0e1 | ||
|
|
80497debbb | ||
|
|
bffc6c5b9a | ||
|
|
95747b1a40 | ||
|
|
775dbec2e6 | ||
|
|
25ee6d3f47 | ||
|
|
1f3f2f1dca | ||
|
|
c848a51395 | ||
|
|
7d3c3cb653 | ||
|
|
9c79b8b877 | ||
|
|
c137f4017f | ||
|
|
c92b21b5fd | ||
|
|
44f07f7708 | ||
|
|
b85b4f2cd6 | ||
|
|
d1a7a55d7e | ||
|
|
75868dfee4 | ||
|
|
44bc9a24f8 | ||
|
|
c9785c4cd3 | ||
|
|
9f93883dc9 | ||
|
|
4362f7e6e2 | ||
|
|
90a829f25a | ||
|
|
d0e29cc901 | ||
|
|
8ebdd256a5 | ||
|
|
4b5f8e6ceb | ||
|
|
ffbfafb189 | ||
|
|
994a38c7ad | ||
|
|
0268c9d642 | ||
|
|
f729912913 | ||
|
|
6179886b14 | ||
|
|
3aa34c1211 | ||
|
|
24f0ae1d39 | ||
|
|
c0ca3c642a | ||
|
|
b2b044ce95 | ||
|
|
8f4b0cd30d | ||
|
|
cbe2aa716d | ||
|
|
23ea33b656 | ||
|
|
ee80a22db4 | ||
|
|
d32c343657 | ||
|
|
90d8c94819 | ||
|
|
e13da35d4d | ||
|
|
f50450485c | ||
|
|
264d08abc4 | ||
|
|
8c441756df | ||
|
|
cdf2a9ddce | ||
|
|
a196a35d1d | ||
|
|
aeda5b2f58 | ||
|
|
da1e43c1e6 | ||
|
|
6d06b0f076 | ||
|
|
7da2e86d4b | ||
|
|
1f99723a9f | ||
|
|
c3c16bd2be | ||
|
|
4c2761302a | ||
|
|
3d19b1108a | ||
|
|
4728d7b70b | ||
|
|
cbd34cd239 | ||
|
|
d0ca4a1255 | ||
|
|
16623d4e71 | ||
|
|
dab7ceaa24 | ||
|
|
b05f3f5614 | ||
|
|
808e5421a9 | ||
|
|
f1f225c6b3 | ||
|
|
16f307b305 | ||
|
|
ccdec5da77 | ||
|
|
52d1c0c271 | ||
|
|
943559da67 | ||
|
|
21057fb857 | ||
|
|
281bb5e2c4 | ||
|
|
eb61f0fc63 | ||
|
|
105b12f807 | ||
|
|
882893259d | ||
|
|
052917a67d | ||
|
|
226edf1f91 | ||
|
|
be944053e0 | ||
|
|
71aac48042 | ||
|
|
8bcc6b1d96 | ||
|
|
40f292cb13 | ||
|
|
601a8de422 | ||
|
|
fe564318b6 | ||
|
|
09244edc15 | ||
|
|
f5f8f83e3e | ||
|
|
74a39bbae0 | ||
|
|
3ab34ffdc0 | ||
|
|
13a93489b7 | ||
|
|
b35e02db20 | ||
|
|
6cb4dda5d6 | ||
|
|
2d12a7d9ee | ||
|
|
9a7e4f4304 | ||
|
|
876104835e | ||
|
|
786e28fec0 | ||
|
|
b617ba1c82 | ||
|
|
252edbdbc6 | ||
|
|
0bba3610c5 | ||
|
|
fc9f580fd3 | ||
|
|
91f7b9663f | ||
|
|
2d266d107b | ||
|
|
fff2b3c710 | ||
|
|
5af6c37f8c | ||
|
|
2d0957b732 | ||
|
|
0996552708 | ||
|
|
620787e56b | ||
|
|
f5bd9f721c | ||
|
|
345edb8a89 | ||
|
|
4a0d3d7acc | ||
|
|
7fe0610b68 | ||
|
|
8ba16eb4f1 | ||
|
|
ab6a5be0f8 | ||
|
|
94b0907534 | ||
|
|
0017b4b69a | ||
|
|
430be6f2a9 | ||
|
|
bff7ac4a1d | ||
|
|
fb6c6c85bf | ||
|
|
894adea2f7 | ||
|
|
0e1d6fbbbc | ||
|
|
bad01edd2c | ||
|
|
e9ca8d689f | ||
|
|
c5eb2f5d16 | ||
|
|
7db87a8889 | ||
|
|
12a9a0faf7 | ||
|
|
fc321d8282 | ||
|
|
7d27c615b7 | ||
|
|
7de266a620 | ||
|
|
4cbc5ed20a | ||
|
|
c18a1ac1a1 | ||
|
|
ab6e4bfc8d | ||
|
|
6b7b232114 | ||
|
|
0a5d21ca9e | ||
|
|
f003a4c6cc | ||
|
|
53df32e6cf | ||
|
|
8670034c86 | ||
|
|
c1fbf654a0 | ||
|
|
9066078928 | ||
|
|
4f16e661cf | ||
|
|
45b85767c4 | ||
|
|
d56711b5d8 | ||
|
|
df28a57ae3 | ||
|
|
04bac8ef2a | ||
|
|
7ad193787e | ||
|
|
27e662cfd1 | ||
|
|
661a572d82 | ||
|
|
66b4f0cac4 | ||
|
|
81e0206465 | ||
|
|
cb1babeeba | ||
|
|
67dc778b8f | ||
|
|
bbd4ee2986 | ||
|
|
42b2eae532 | ||
|
|
0902f45d71 | ||
|
|
c51eb7665e | ||
|
|
1a426d6fff | ||
|
|
07b5072c9c | ||
|
|
3a0febfe79 | ||
|
|
8e7bc8d742 | ||
|
|
809299f9e4 | ||
|
|
c391cf38e2 | ||
|
|
8c75e6896e | ||
|
|
b3d6928f35 | ||
|
|
3d8ba93f59 | ||
|
|
889bf83020 | ||
|
|
6c63f7b0e2 | ||
|
|
3872c3a127 | ||
|
|
5be785bff8 | ||
|
|
bf454e948d | ||
|
|
e66ec84c1e | ||
|
|
6537728c7b | ||
|
|
95f3f8f3c4 | ||
|
|
ae9b4f8940 | ||
|
|
8ef353a970 | ||
|
|
6d33e9058c | ||
|
|
78852b181a | ||
|
|
2588f9cee6 | ||
|
|
abc2d7e4a9 | ||
|
|
6189e343f3 | ||
|
|
8bfa182ed9 | ||
|
|
ea162ed016 | ||
|
|
e2aa161590 | ||
|
|
a723baec4b | ||
|
|
6120519e8e | ||
|
|
69856a9aac | ||
|
|
564d835fba | ||
|
|
c35a6725b9 | ||
|
|
a57f79006a | ||
|
|
6600b0b507 | ||
|
|
9a19e3c741 | ||
|
|
8924d614c0 | ||
|
|
03f76eccf5 | ||
|
|
b13c2e17f1 | ||
|
|
7c1c8c53e7 | ||
|
|
497b843e76 | ||
|
|
7745f67583 | ||
|
|
374225ae6a | ||
|
|
7259be35b0 | ||
|
|
1601e204f4 | ||
|
|
43e33b2990 | ||
|
|
7ebd9291d9 | ||
|
|
5d59415c2d | ||
|
|
c5d2d89930 | ||
|
|
0108ffe059 | ||
|
|
087935f160 | ||
|
|
fef9f1187d | ||
|
|
83c9a24855 | ||
|
|
435a8f6337 | ||
|
|
2c8e4573f2 | ||
|
|
b45721373a | ||
|
|
e0ebf4e401 | ||
|
|
dc878f24d2 | ||
|
|
be1f9b2cb0 | ||
|
|
0769dfbd32 | ||
|
|
081e127377 | ||
|
|
17a799aeb2 | ||
|
|
a3f5283018 | ||
|
|
633d783f0c | ||
|
|
451a5fb6d4 | ||
|
|
3ad7d304bd | ||
|
|
7b2b8b86e1 | ||
|
|
1f8985e476 | ||
|
|
efb875daef | ||
|
|
59cc3a9f86 | ||
|
|
febd143ac8 | ||
|
|
e00785e958 | ||
|
|
4a4525a65d | ||
|
|
c98dd1afb9 | ||
|
|
12d591178e | ||
|
|
bd7b29a6c4 | ||
|
|
13b94dab10 | ||
|
|
ba3cbac21a | ||
|
|
d94c386320 | ||
|
|
4e2a263c1f | ||
|
|
6a24e0c7c3 | ||
|
|
c8eeb46aa5 | ||
|
|
d143f76568 | ||
|
|
930ff499ee | ||
|
|
f4dc24c3da | ||
|
|
399fb76652 | ||
|
|
de056a3319 | ||
|
|
bafa23fa2c | ||
|
|
ab725b4ba9 | ||
|
|
d8f44c06e8 | ||
|
|
e40c869d0d | ||
|
|
3591da517a | ||
|
|
014fb41448 | ||
|
|
24072f26ca | ||
|
|
65017a0031 | ||
|
|
dc5aab62c8 | ||
|
|
a3cccbeb53 | ||
|
|
cee6525213 | ||
|
|
4f81dc1eaf | ||
|
|
0e58bfe90e | ||
|
|
e3e0342db7 | ||
|
|
b1f12a0535 | ||
|
|
60f4b07196 | ||
|
|
4c60dac9cb | ||
|
|
8d14bd3339 | ||
|
|
48d95d2d7a | ||
|
|
670a2be782 | ||
|
|
f3633d46ca | ||
|
|
e56754d27c | ||
|
|
40ebed3a03 | ||
|
|
14ac4903b6 | ||
|
|
da613c504b | ||
|
|
7ac3507be2 | ||
|
|
316c783fce | ||
|
|
9e952bc7ff | ||
|
|
e4832a9e94 | ||
|
|
70ee86c951 | ||
|
|
ed97339ef1 | ||
|
|
b012a5c67e | ||
|
|
642f32e14d | ||
|
|
7b735b88b4 | ||
|
|
167134e1a8 | ||
|
|
0fa4b7a249 | ||
|
|
f413d5ef22 | ||
|
|
be4216e051 | ||
|
|
fa10264759 | ||
|
|
5fbfe5203c | ||
|
|
f472cb53ae | ||
|
|
a49ff5a1c4 | ||
|
|
faf56a8abe | ||
|
|
e510538f37 | ||
|
|
b2bf48c3f0 | ||
|
|
cf0330d601 | ||
|
|
2f51f5affe | ||
|
|
a69ae36a99 | ||
|
|
6863528df1 | ||
|
|
e2722f03ac | ||
|
|
1be4684441 | ||
|
|
4a96e790b1 | ||
|
|
f9d6134247 | ||
|
|
dfecc8fe02 | ||
|
|
2b0c474117 | ||
|
|
0f74798a82 | ||
|
|
ead06fdb35 | ||
|
|
687e589950 | ||
|
|
945b32ca1b | ||
|
|
0768cfb7df | ||
|
|
b5e245762d | ||
|
|
4c6c0b9099 | ||
|
|
23af39b5b4 | ||
|
|
a5cab71c9b | ||
|
|
d4f43f1a7c | ||
|
|
7ab8109ef8 | ||
|
|
0f49a5068a | ||
|
|
a6e0b6e5ce | ||
|
|
bf563e0926 | ||
|
|
03ca7081df | ||
|
|
97afffba4e | ||
|
|
6b6246f7b4 | ||
|
|
f1e006c88c | ||
|
|
32280090fe | ||
|
|
cdd8f7cd53 | ||
|
|
d69ac108d4 | ||
|
|
c1b614772c | ||
|
|
ec38e53249 | ||
|
|
e473e7a83a | ||
|
|
5636384449 | ||
|
|
f72ca060b5 | ||
|
|
6482954c6e | ||
|
|
e1a0e4bfbe | ||
|
|
ae3ae428a0 | ||
|
|
be42644091 | ||
|
|
66e7f3b404 | ||
|
|
604d171d56 | ||
|
|
65575fe0d0 | ||
|
|
ac5f0ba341 | ||
|
|
e637ed739f | ||
|
|
29382360ed | ||
|
|
2a610267eb | ||
|
|
1635998ac3 | ||
|
|
82f8fc3bee | ||
|
|
f37662c655 | ||
|
|
1a12ea6e5a | ||
|
|
1be899459c | ||
|
|
f34e3c573b | ||
|
|
b23529d940 | ||
|
|
2c34abed20 | ||
|
|
b3b63a2c8f | ||
|
|
4a1a9b1f44 | ||
|
|
215d4cbfe5 | ||
|
|
8cd8aa2cb3 | ||
|
|
b3b9dd493e | ||
|
|
8909ad1859 | ||
|
|
aa569acaa1 | ||
|
|
1c1c030b8e | ||
|
|
628d5406d7 | ||
|
|
5d563fcde6 | ||
|
|
b2f3a3220e | ||
|
|
4e66e782ea | ||
|
|
d225f14657 | ||
|
|
13f9ca60d5 | ||
|
|
be927d9ce6 | ||
|
|
dcb5a74275 | ||
|
|
8f70f1449d | ||
|
|
b25bc36d33 | ||
|
|
da4e2a2976 | ||
|
|
f8dcda80cf | ||
|
|
01d81ffc17 | ||
|
|
c78ec37d83 | ||
|
|
a2cd21cab6 | ||
|
|
760e60fa04 | ||
|
|
81914f466d | ||
|
|
ebd8338795 | ||
|
|
11d637f869 | ||
|
|
b24fedda49 | ||
|
|
57cc2c4918 | ||
|
|
15483ac9df | ||
|
|
142984cbf7 | ||
|
|
8f9145109b | ||
|
|
5587ee0c30 | ||
|
|
99750ac7ed | ||
|
|
f89bad7f33 | ||
|
|
b97d0a3940 | ||
|
|
639932ad8a | ||
|
|
1a944b2824 | ||
|
|
ae83b79984 | ||
|
|
5f2c08cef1 | ||
|
|
119d0b666c | ||
|
|
ce2a433ca1 | ||
|
|
a455db01a0 | ||
|
|
9e8187bdc4 | ||
|
|
9fbd11e1be | ||
|
|
aa09737d4d | ||
|
|
435ed3158c | ||
|
|
72600516b9 | ||
|
|
fbc8317c5c | ||
|
|
ae7f380396 | ||
|
|
2e031e47dd | ||
|
|
dbe4543969 | ||
|
|
b27ec5ebde | ||
|
|
6622ebb310 | ||
|
|
1530c90e37 | ||
|
|
a804e4bd8c | ||
|
|
a04ce41799 | ||
|
|
5e3e1dd6ba | ||
|
|
379bb6c9f5 | ||
|
|
3df3a0499f | ||
|
|
0d308d09f3 | ||
|
|
1331d5cf97 | ||
|
|
91f3f5c63b | ||
|
|
486a2c9651 | ||
|
|
05af726446 | ||
|
|
36347b21e6 | ||
|
|
db8bf5e7b9 | ||
|
|
5bbdf3a807 | ||
|
|
08b101ace8 | ||
|
|
5e53c0473a | ||
|
|
9d1e5aa0dc | ||
|
|
4d19de4e03 | ||
|
|
153019a794 | ||
|
|
8df32e93be | ||
|
|
14632e11da | ||
|
|
24cd05672e | ||
|
|
74a68a5803 | ||
|
|
9f6b3e179f | ||
|
|
20fb64704d | ||
|
|
9b7f927b3c | ||
|
|
eb3df6a2e8 | ||
|
|
c6483d431f | ||
|
|
e5b0d225de | ||
|
|
d1d009b491 | ||
|
|
4465ee5414 | ||
|
|
6f11165dd1 | ||
|
|
ddeabc7e19 | ||
|
|
f5d90826f3 | ||
|
|
11154ba119 | ||
|
|
c66b030427 | ||
|
|
0c3dd0cf30 | ||
|
|
4164abd9f7 | ||
|
|
b0990aa8e2 | ||
|
|
a871a1bdb5 | ||
|
|
31e08d4629 | ||
|
|
f98353c20b | ||
|
|
13ece4ee9b | ||
|
|
6e40f4f357 | ||
|
|
ecfba2d31b | ||
|
|
367dfee36e | ||
|
|
5e7b5fe085 | ||
|
|
9d3aa2cfce | ||
|
|
8c156e6b80 | ||
|
|
4d1075a082 | ||
|
|
442f485591 | ||
|
|
74238b5429 | ||
|
|
f9fa92766b | ||
|
|
90d187894d | ||
|
|
03db2690e2 | ||
|
|
65b35457fd | ||
|
|
d5ced21264 | ||
|
|
6d6c8c59eb | ||
|
|
46ed7540b2 | ||
|
|
3ad56a762f | ||
|
|
21a1a40555 | ||
|
|
849692b24b | ||
|
|
f3bf4e4876 | ||
|
|
46270d3dcd | ||
|
|
da6096faaf | ||
|
|
2a7b5a5156 | ||
|
|
233e662294 | ||
|
|
ae41697d83 | ||
|
|
e2fb59798e | ||
|
|
d0fc3e166d | ||
|
|
e4ce46e75f | ||
|
|
e2420f62fe | ||
|
|
6712106c25 | ||
|
|
5b55138729 | ||
|
|
1d9c581f10 | ||
|
|
6bfb57db16 | ||
|
|
f8f2f2944f | ||
|
|
aaf17fd3d0 | ||
|
|
678e6fc6d6 | ||
|
|
fcf39170e1 | ||
|
|
187072c3fa | ||
|
|
e6599c6c4f | ||
|
|
87a8ff90d6 | ||
|
|
4a76abffd4 | ||
|
|
715449695c | ||
|
|
d15b0afca9 | ||
|
|
0d6bbc035d | ||
|
|
9313d4b6b4 | ||
|
|
ed412f43d1 | ||
|
|
bfe4aea981 | ||
|
|
0caa28c1de | ||
|
|
d8ba4b4114 | ||
|
|
e7963945bb | ||
|
|
e4a6101ae0 | ||
|
|
5d0a3bd4cb | ||
|
|
1c2238cc2a | ||
|
|
2d7169fd5f | ||
|
|
885a6b8ebc | ||
|
|
9d81c129fc | ||
|
|
38c6fe2ce4 | ||
|
|
7fe7b7ac7d | ||
|
|
ae7f52d301 | ||
|
|
8b1fcb58e8 | ||
|
|
cce36ae701 | ||
|
|
2f0a02eecb | ||
|
|
07167fdf22 | ||
|
|
99c7ba7840 | ||
|
|
5710df685b | ||
|
|
62f10b1b8f | ||
|
|
d50d55228b | ||
|
|
288a5d4151 | ||
|
|
748b8497c9 | ||
|
|
303ff60d5e | ||
|
|
b79eb55b34 | ||
|
|
0ca573142a | ||
|
|
a1ece16143 | ||
|
|
2e18f1b6e3 | ||
|
|
6cf712591f | ||
|
|
b32cd5d328 | ||
|
|
2af99bd65e | ||
|
|
5b0ea70d1c | ||
|
|
d719a3d877 | ||
|
|
b0df8910ba | ||
|
|
5b8bf04035 | ||
|
|
58e44e296f | ||
|
|
0334d002c0 | ||
|
|
d731ce49ad | ||
|
|
a93614409e | ||
|
|
214e2d14be | ||
|
|
67ee6b2740 | ||
|
|
07a3fb833c | ||
|
|
1c419f762b | ||
|
|
8d6c7b81e9 | ||
|
|
fcaadf6724 | ||
|
|
ff38d8cdc0 | ||
|
|
900a4e4d31 | ||
|
|
ee63b84b6a | ||
|
|
2f1ff307da | ||
|
|
a8e8e04496 | ||
|
|
91bcf6f0ba | ||
|
|
a228b2de64 | ||
|
|
cb18437908 | ||
|
|
23dab885cd | ||
|
|
e7284c23da | ||
|
|
1e1f199b56 | ||
|
|
efb5e793a4 | ||
|
|
f2edf40e48 | ||
|
|
7cb99a0866 | ||
|
|
36da7c3075 | ||
|
|
a3b69f1101 | ||
|
|
9f2d1ff264 | ||
|
|
8d603dfe99 | ||
|
|
3ff04976e3 | ||
|
|
54ff4fd45f | ||
|
|
0d135d90f0 | ||
|
|
ffa9814dd0 | ||
|
|
a2fec9134b | ||
|
|
8caadaf404 | ||
|
|
469228fcd7 | ||
|
|
fd329e0ec5 | ||
|
|
7f4041ec30 | ||
|
|
5cb5bdc4eb | ||
|
|
08913deba5 | ||
|
|
aceeef47f4 | ||
|
|
ddda0ca1db | ||
|
|
00923615f4 | ||
|
|
63945bc408 | ||
|
|
076f79745b | ||
|
|
8e9effcc1e | ||
|
|
7f4522a3f1 | ||
|
|
f98abe4400 | ||
|
|
2ee8f676c3 | ||
|
|
7216f71825 | ||
|
|
0bf3e4c25b | ||
|
|
e964e176f9 | ||
|
|
8938b09bc9 | ||
|
|
3654bcfbe8 | ||
|
|
0dcf95b898 | ||
|
|
405fab8b36 | ||
|
|
ef455f5c85 | ||
|
|
05e4cd1579 | ||
|
|
0ea96e3b0c | ||
|
|
1e9e7bf0d9 | ||
|
|
d7a5dedd4f | ||
|
|
2e65416270 | ||
|
|
13c22e4e2f | ||
|
|
65a061f3c2 | ||
|
|
fc63e6856f | ||
|
|
94747d53eb | ||
|
|
7bfff6c51e | ||
|
|
3fdedce8f6 | ||
|
|
5f0fe09423 | ||
|
|
9e402fa064 | ||
|
|
d84440969a | ||
|
|
e7dc82fa32 | ||
|
|
f1b3492700 | ||
|
|
70e26d12fb |
@@ -24,9 +24,9 @@ variables:
|
||||
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true"
|
||||
FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled"
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 3
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v28"
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v31"
|
||||
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
|
||||
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v26"
|
||||
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v31"
|
||||
|
||||
.only-default:
|
||||
only:
|
||||
@@ -77,6 +77,7 @@ fedora-x86_64:
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
|
||||
script:
|
||||
- .gitlab-ci/show-info-linux.sh
|
||||
- meson subprojects update
|
||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
||||
_build
|
||||
@@ -92,6 +93,7 @@ release-build:
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
||||
script:
|
||||
- .gitlab-ci/show-info-linux.sh
|
||||
- meson subprojects update
|
||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
||||
_build
|
||||
@@ -106,6 +108,7 @@ installed-tests:
|
||||
EXTRA_MESON_FLAGS: "--prefix=/usr --libdir=/usr/lib64 -Dinstall-tests=true"
|
||||
G_TEST_ACCESSIBLE: 1
|
||||
script:
|
||||
- .gitlab-ci/show-info-linux.sh
|
||||
- meson subprojects update
|
||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
||||
_build
|
||||
@@ -155,7 +158,7 @@ macos:
|
||||
- macos
|
||||
needs: []
|
||||
before_script:
|
||||
- bash .gitlab-ci/show-execution-environment.sh
|
||||
- bash .gitlab-ci/show-info-osx.sh
|
||||
- pip3 install --user meson==0.56
|
||||
- pip3 install --user ninja
|
||||
- export PATH=/Users/gitlabrunner/Library/Python/3.7/bin:$PATH
|
||||
@@ -172,6 +175,22 @@ macos:
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
||||
|
||||
vs2017-x64:
|
||||
extends: .only-default
|
||||
# TODO: Uncomment this when ready to merge.
|
||||
#only:
|
||||
# - branches@GNOME/gtk
|
||||
stage: build
|
||||
tags:
|
||||
- win32-ps
|
||||
needs: []
|
||||
script:
|
||||
- .gitlab-ci/test-msvc.bat
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
||||
|
||||
.flatpak-defaults:
|
||||
image: $FLATPAK_IMAGE
|
||||
stage: flatpak
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
FROM fedora:33
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
atk-devel \
|
||||
at-spi2-atk-devel \
|
||||
avahi-gobject-devel \
|
||||
cairo-devel \
|
||||
cairo-gobject-devel \
|
||||
ccache \
|
||||
clang \
|
||||
clang-analyzer \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dbus-daemon \
|
||||
dbus-x11 \
|
||||
dejavu-sans-mono-fonts \
|
||||
desktop-file-utils \
|
||||
diffutils \
|
||||
elfutils-libelf-devel \
|
||||
fribidi-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdk-pixbuf2-devel \
|
||||
gdk-pixbuf2-modules \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glib2-static \
|
||||
glibc-devel \
|
||||
glibc-headers \
|
||||
gnome-desktop-testing \
|
||||
gobject-introspection-devel \
|
||||
graphene-devel \
|
||||
gstreamer1-devel \
|
||||
gstreamer1-plugins-good \
|
||||
gstreamer1-plugins-bad-free-devel \
|
||||
gstreamer1-plugins-base-devel \
|
||||
gtk-doc \
|
||||
hicolor-icon-theme \
|
||||
iso-codes \
|
||||
itstool \
|
||||
json-glib-devel \
|
||||
lcov \
|
||||
libasan \
|
||||
libattr-devel \
|
||||
libcloudproviders-devel \
|
||||
libepoxy-devel \
|
||||
libffi-devel \
|
||||
libmount-devel \
|
||||
librsvg2 \
|
||||
libselinux-devel \
|
||||
libubsan \
|
||||
libXcomposite-devel \
|
||||
libXcursor-devel \
|
||||
libXcursor-devel \
|
||||
libXdamage-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libXinerama-devel \
|
||||
libxkbcommon-devel \
|
||||
libXrandr-devel \
|
||||
libXrender-devel \
|
||||
libXtst-devel \
|
||||
libxslt \
|
||||
mesa-dri-drivers \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libGLES-devel \
|
||||
meson \
|
||||
ninja-build \
|
||||
pango-devel \
|
||||
pcre-devel \
|
||||
pcre-static \
|
||||
python3 \
|
||||
python3-jinja2 \
|
||||
python3-pip \
|
||||
python3-pygments \
|
||||
python3-wheel \
|
||||
redhat-rpm-config \
|
||||
sassc \
|
||||
systemtap-sdt-devel \
|
||||
vulkan-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
weston \
|
||||
weston-libs \
|
||||
which \
|
||||
xorg-x11-server-Xvfb \
|
||||
&& dnf clean all
|
||||
@@ -1,17 +0,0 @@
|
||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v28
|
||||
|
||||
RUN dnf -y install \
|
||||
python3-jinja2 \
|
||||
python3-markdown \
|
||||
python3-pygments \
|
||||
python3-toml \
|
||||
python3-typogrify
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV LANG C.UTF-8
|
||||
@@ -1,4 +1,98 @@
|
||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v28
|
||||
FROM fedora:34
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
atk-devel \
|
||||
at-spi2-atk-devel \
|
||||
avahi-gobject-devel \
|
||||
cairo-devel \
|
||||
cairo-gobject-devel \
|
||||
ccache \
|
||||
clang \
|
||||
clang-analyzer \
|
||||
clang-tools-extra \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dbus-daemon \
|
||||
dbus-x11 \
|
||||
dejavu-sans-mono-fonts \
|
||||
desktop-file-utils \
|
||||
diffutils \
|
||||
elfutils-libelf-devel \
|
||||
fribidi-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdk-pixbuf2-devel \
|
||||
gdk-pixbuf2-modules \
|
||||
gettext \
|
||||
git \
|
||||
glib2-devel \
|
||||
glib2-static \
|
||||
glibc-devel \
|
||||
glibc-headers \
|
||||
gnome-desktop-testing \
|
||||
gobject-introspection-devel \
|
||||
graphene-devel \
|
||||
graphviz \
|
||||
gstreamer1-devel \
|
||||
gstreamer1-plugins-good \
|
||||
gstreamer1-plugins-bad-free-devel \
|
||||
gstreamer1-plugins-base-devel \
|
||||
gtk-doc \
|
||||
hicolor-icon-theme \
|
||||
iso-codes \
|
||||
itstool \
|
||||
json-glib-devel \
|
||||
lcov \
|
||||
libasan \
|
||||
libattr-devel \
|
||||
libcloudproviders-devel \
|
||||
libepoxy-devel \
|
||||
libffi-devel \
|
||||
libmount-devel \
|
||||
librsvg2 \
|
||||
libselinux-devel \
|
||||
libubsan \
|
||||
libXcomposite-devel \
|
||||
libXcursor-devel \
|
||||
libXcursor-devel \
|
||||
libXdamage-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libXinerama-devel \
|
||||
libxkbcommon-devel \
|
||||
libXrandr-devel \
|
||||
libXrender-devel \
|
||||
libXtst-devel \
|
||||
libxslt \
|
||||
mesa-dri-drivers \
|
||||
mesa-libEGL-devel \
|
||||
mesa-libGLES-devel \
|
||||
meson \
|
||||
ninja-build \
|
||||
pango-devel \
|
||||
pcre-devel \
|
||||
pcre-static \
|
||||
python3 \
|
||||
python3-gobject \
|
||||
python3-jinja2 \
|
||||
python3-markdown \
|
||||
python3-pip \
|
||||
python3-pygments \
|
||||
python3-toml \
|
||||
python3-typogrify \
|
||||
python3-wheel \
|
||||
redhat-rpm-config \
|
||||
sassc \
|
||||
systemtap-sdt-devel \
|
||||
vulkan-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
weston \
|
||||
weston-libs \
|
||||
which \
|
||||
xorg-x11-server-Xvfb \
|
||||
&& dnf clean all
|
||||
|
||||
# Enable sudo for wheel users
|
||||
RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers
|
||||
|
||||
@@ -24,6 +24,7 @@ flatpak build ${builddir} meson \
|
||||
-Dbuild-examples=false \
|
||||
-Dintrospection=disabled \
|
||||
-Ddemos=true \
|
||||
-Dprofile=devel \
|
||||
_flatpak_build
|
||||
|
||||
flatpak build ${builddir} ninja -C _flatpak_build install
|
||||
|
||||
5
.gitlab-ci/show-info-linux.sh
Executable file
5
.gitlab-ci/show-info-linux.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
echo $PRETTY_NAME
|
||||
14
.gitlab-ci/test-msvc.bat
Normal file
14
.gitlab-ci/test-msvc.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo on
|
||||
:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
|
||||
:: specified build architecture
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
@echo on
|
||||
|
||||
:: FIXME: make warnings fatal
|
||||
pip3 install --upgrade --user meson==0.56.2 || goto :error
|
||||
meson _build || goto :error
|
||||
ninja -C _build || goto :error
|
||||
|
||||
goto :EOF
|
||||
:error
|
||||
exit /b 1
|
||||
105
NEWS
105
NEWS
@@ -1,3 +1,108 @@
|
||||
Overview of Changes in 4.3.0
|
||||
============================
|
||||
|
||||
* GtkVideo:
|
||||
- Detect stream metadata when using gstreamer
|
||||
|
||||
* GtkFileChooser:
|
||||
- Fix a crash
|
||||
|
||||
* GtkButton:
|
||||
- Add back visual feedback for keynav activation
|
||||
|
||||
* GtkFontChooser:
|
||||
- Fix initial font selection
|
||||
|
||||
* Text widgets:
|
||||
- Replace squiggly error underlines by dotted lines
|
||||
- Support translucent selections
|
||||
|
||||
* GtkTextView:
|
||||
- Various improvements to rendering performance
|
||||
|
||||
* GtkScrolledWindow:
|
||||
- Stop using scroll cursors
|
||||
|
||||
* GtkMenuButton:
|
||||
- Make focus-on-click work
|
||||
|
||||
* GtkToggleButton:
|
||||
- Make grouped buttons mutually exclusive
|
||||
|
||||
* GtkPasswordEntry:
|
||||
- Use MADV_DONTDUMP for secure memory
|
||||
|
||||
* GtkListBox:
|
||||
- Allow repeated selection extension for MULTIPLE
|
||||
|
||||
* Themes:
|
||||
- Reorganize and rename included themes. The theme is now
|
||||
called Default, with dark, hc and hc-dark variants.
|
||||
Visually, the themes are unchanged.
|
||||
- The theme variants are also available as standalone
|
||||
themes called Default-dark, etc.
|
||||
- The theme named Adwaita is moving to libadwaita
|
||||
- Fix resize border sizing
|
||||
- Fix solid-csd window decorations
|
||||
|
||||
* Input:
|
||||
- Revert some Compose sequence changes (mainly around dead
|
||||
acute and apostrophe)
|
||||
- Consume all key events during preedit, to avoid unexpected
|
||||
interactions
|
||||
- Ignore more modifiers during preedit, to allow using 3rd and
|
||||
5th level choosers
|
||||
- Fix handling of cursor positions in non-ASCII preedit text
|
||||
- Fix a problem with deferred focus setting
|
||||
|
||||
* GdkClipboard:
|
||||
- Ensure strings are nul-terminated
|
||||
|
||||
* GSK:
|
||||
- Improvements to the ngl renderer
|
||||
- Fix offscreen rendering with transforms
|
||||
- Fix downscaled textures
|
||||
- Avoid huge intermediate textures
|
||||
- Use fp16 for colors
|
||||
- Optimize handling of underlines in text
|
||||
- Fix corner cases of shadow rendering
|
||||
- Reorganize shader resources
|
||||
- Make shadow rendering match across renderers
|
||||
|
||||
* Accessibility:
|
||||
- Various fixes to get Orca to speak (still a work in progress)
|
||||
|
||||
* Wayland:
|
||||
- Improve font settings fallback
|
||||
- Avoid unintentional rendering freezes with popovers
|
||||
- Support the xdg_activation_v1 protocol
|
||||
|
||||
* X11:
|
||||
- Don't beep on untrusted displays
|
||||
- Don't crash when popovers are outside the workarea
|
||||
|
||||
* Windows:
|
||||
- Fix using GL rendering with Mesa drivers
|
||||
|
||||
* Tools:
|
||||
- Add support for copy/paste in gtk4-node-editor
|
||||
- Make syntax highlighting work in the gtk4-demo flatpak
|
||||
|
||||
* Inspector:
|
||||
- Enable the inspector by default, in all cases
|
||||
- Show keyboard layouts
|
||||
- Improve monitor information
|
||||
|
||||
* Translation updates:
|
||||
Catalan
|
||||
Chinese (Taiwan)
|
||||
Dutch
|
||||
Nepali
|
||||
Polish
|
||||
Swedish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in 4.2.0
|
||||
============================
|
||||
|
||||
|
||||
@@ -36,6 +36,13 @@ Nightly documentation can be found at
|
||||
- Gdk: https://gnome.pages.gitlab.gnome.org/gtk/gdk4/
|
||||
- Gsk: https://gnome.pages.gitlab.gnome.org/gtk/gsk4/
|
||||
|
||||
Nightly flatpaks of our demos can be installed from the
|
||||
[GNOME Nightly](https://wiki.gnome.org/Apps/Nightly) repository:
|
||||
- `flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo`
|
||||
- `flatpak install gnome-nightly org.gtk.Demo4`
|
||||
- `flatpak install gnome-nightly org.gtk.WidgetFactory4`
|
||||
- `flatpak install gnome-nightly org.gtk.IconBrowser4`
|
||||
|
||||
Building and installing
|
||||
-----------------------
|
||||
|
||||
|
||||
43
build-aux/flatpak/lua-5.1.5-so.patch
Normal file
43
build-aux/flatpak/lua-5.1.5-so.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile
|
||||
--- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100
|
||||
+++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100
|
||||
@@ -23,6 +23,7 @@
|
||||
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
||||
|
||||
LUA_A= liblua.a
|
||||
+LUA_SO= liblua.so
|
||||
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
|
||||
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
|
||||
lundump.o lvm.o lzio.o
|
||||
@@ -36,7 +37,7 @@
|
||||
LUAC_O= luac.o print.o
|
||||
|
||||
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
||||
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
||||
+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
||||
ALL_A= $(LUA_A)
|
||||
|
||||
default: $(PLAT)
|
||||
@@ -51,6 +52,11 @@
|
||||
$(AR) $@ $?
|
||||
$(RANLIB) $@
|
||||
|
||||
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
||||
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
|
||||
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
|
||||
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
|
||||
+
|
||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||
|
||||
--- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200
|
||||
+++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100
|
||||
@@ -53,7 +53,7 @@
|
||||
all: $(PLAT)
|
||||
|
||||
$(PLATS) clean:
|
||||
- cd src && $(MAKE) $@
|
||||
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
|
||||
|
||||
test: dummy
|
||||
src/lua test/hello.lua
|
||||
@@ -93,6 +93,77 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "boost",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"./bootstrap.sh --prefix=/app --with-libraries=date_time,filesystem,iostreams,locale,regex,system,thread,python,program_options,test,serialization",
|
||||
"./b2 --build-type=minimal link=shared -j $FLATPAK_BUILDER_N_JOBS",
|
||||
"./b2 --build-type=minimal link=shared install"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://boostorg.jfrog.io/artifactory/main/release/1.69.0/source/boost_1_69_0.tar.bz2",
|
||||
"sha256": "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lua-5.1",
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux",
|
||||
"make INSTALL_TOP=$FLATPAK_DEST TO_LIB='liblua.a liblua.so.5.1.5' install",
|
||||
"ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so",
|
||||
"ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so.5.1",
|
||||
"install -Dm0644 etc/lua.pc $FLATPAK_DEST/lib/pkgconfig/lua.pc",
|
||||
"ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua51.pc",
|
||||
"ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua5.1.pc",
|
||||
"ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua-5.1.pc"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
|
||||
"sha256": "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"path": "lua-5.1.5-so.patch"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"commands": [
|
||||
"sed -i \"s|/usr/local|$FLATPAK_DEST|\" etc/lua.pc src/luaconf.h"
|
||||
]
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"/bin",
|
||||
"/include",
|
||||
"/lib/pkgconfig",
|
||||
"/man"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "highlight",
|
||||
"buildsystem" : "simple",
|
||||
"builddir" : true,
|
||||
"build-commands" : [
|
||||
"sed -i -e 's#^PREFIX = /usr#PREFIX = /app#' makefile",
|
||||
"make",
|
||||
"make install"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "archive",
|
||||
"url" : "http://www.andre-simon.de/zip/highlight-4.0.tar.bz2",
|
||||
"sha256" : "f40dcba26e011a2c67df874f4d9b0238c2c6b065163ce8de3d8371b9dfce864d"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "gtk",
|
||||
"buildsystem" : "meson",
|
||||
|
||||
@@ -8,10 +8,10 @@ from pathlib import PurePath
|
||||
|
||||
|
||||
stylesheets = [
|
||||
'gtk/theme/Adwaita/Adwaita.css',
|
||||
'gtk/theme/Adwaita/Adwaita-dark.css',
|
||||
'gtk/theme/HighContrast/HighContrast.css',
|
||||
'gtk/theme/HighContrast/HighContrast-dark.css',
|
||||
'gtk/theme/Default/Default-light.css',
|
||||
'gtk/theme/Default/Default-dark.css',
|
||||
'gtk/theme/Default/Default-hc.css',
|
||||
'gtk/theme/Default/Default-hc-dark.css',
|
||||
]
|
||||
|
||||
references = [
|
||||
|
||||
26
build-aux/meson/gen-demo-header.py
Executable file
26
build-aux/meson/gen-demo-header.py
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
repodir = sys.argv[1]
|
||||
profile = sys.argv[2]
|
||||
|
||||
sys.stdout.write("/* This file is auto-generated. Do not edit. */\n")
|
||||
sys.stdout.write("#pragma once\n")
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.write(f"#define PROFILE \"{profile}\"\n")
|
||||
|
||||
short_sha = os.environ.get('CI_COMMIT_SHORT_SHA')
|
||||
if short_sha is None:
|
||||
cmd = ["git", "-C", repodir, "rev-parse", "--short", "HEAD"]
|
||||
try:
|
||||
with subprocess.Popen(cmd, stdout=subprocess.PIPE) as p:
|
||||
short_sha = p.stdout.read().decode('utf-8').rstrip("\n")
|
||||
except FileNotFoundError:
|
||||
short_sha = ''
|
||||
if profile != 'default':
|
||||
short_sha = 'devel'
|
||||
|
||||
sys.stdout.write(f"#define VCS_TAG \"{short_sha}\"\n")
|
||||
@@ -76,6 +76,9 @@
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#mesondefine HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have a working `madvise' system call. */
|
||||
#mesondefine HAVE_MADVISE
|
||||
|
||||
/* Define to 1 if you have the `posix_fallocate' function. */
|
||||
#mesondefine HAVE_POSIX_FALLOCATE
|
||||
|
||||
@@ -279,3 +282,8 @@
|
||||
|
||||
/* Define if tracker3 is available */
|
||||
#mesondefine HAVE_TRACKER3
|
||||
|
||||
#mesondefine HAVE_F16C
|
||||
|
||||
/* Does the OS support GDesktopAppInfo? */
|
||||
#mesondefine HAVE_DESKTOPAPPINFO
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">pan-start-symbolic</property>
|
||||
<property name="icon-name">go-previous-symbolic</property>
|
||||
<signal name="clicked" handler="fishbowl_prev_button_clicked_cb" object="bowl" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">pan-end-symbolic</property>
|
||||
<property name="icon-name">go-next-symbolic</property>
|
||||
<signal name="clicked" handler="fishbowl_next_button_clicked_cb" object="bowl" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -10,12 +10,8 @@
|
||||
<object class="GtkButton" id="reset">
|
||||
<property name="receives-default">1</property>
|
||||
<property name="tooltip-text">Reset</property>
|
||||
<property name="icon-name">view-refresh-symbolic</property>
|
||||
<signal name="clicked" handler="font_features_reset_features" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">view-refresh-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -1136,7 +1136,7 @@ done:
|
||||
g_free (design_coords);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
font_features_font_changed (void)
|
||||
{
|
||||
update_script_combo ();
|
||||
@@ -1144,14 +1144,14 @@ font_features_font_changed (void)
|
||||
update_font_variations ();
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
font_features_script_changed (void)
|
||||
{
|
||||
update_features ();
|
||||
update_display ();
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
font_features_reset_features (void)
|
||||
{
|
||||
GList *l;
|
||||
@@ -1197,7 +1197,7 @@ switch_to_label (void)
|
||||
update_display ();
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
font_features_toggle_edit (void)
|
||||
{
|
||||
if (strcmp (gtk_stack_get_visible_child_name (GTK_STACK (stack)), "label") == 0)
|
||||
@@ -1206,7 +1206,7 @@ font_features_toggle_edit (void)
|
||||
switch_to_label ();
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
font_features_stop_edit (void)
|
||||
{
|
||||
g_signal_emit_by_name (edit_toggle, "clicked");
|
||||
|
||||
@@ -23,13 +23,10 @@
|
||||
#include "gskshaderpaintable.h"
|
||||
|
||||
/**
|
||||
* SECTION:gskshaderpaintable
|
||||
* @Short_description: Drawing with shaders
|
||||
* @Title: GskShaderPaintable
|
||||
* @see_also: #GdkPaintable
|
||||
* GskShaderPaintable:
|
||||
*
|
||||
* GskShaderPaintable is an implementation of the #GdkPaintable interface
|
||||
* that uses a #GskGLShader to create pixels.
|
||||
* `GskShaderPaintable` is an implementation of the `GdkPaintable` interface
|
||||
* that uses a `GskGLShader` to create pixels.
|
||||
*
|
||||
* You can set the uniform data that the shader needs for rendering
|
||||
* using gsk_shader_paintable_set_args(). This function can
|
||||
@@ -38,7 +35,7 @@
|
||||
*
|
||||
* Commonly, time is passed to shaders as a float uniform containing
|
||||
* the elapsed time in seconds. The convenience API
|
||||
* gsk_shader_paintable_update_time() can be called from a #GtkTickCallback
|
||||
* gsk_shader_paintable_update_time() can be called from a `GtkTickCallback`
|
||||
* to update the time based on the frame time of the frame clock.
|
||||
*/
|
||||
|
||||
@@ -186,7 +183,7 @@ gsk_shader_paintable_init (GskShaderPaintable *self)
|
||||
* pixels. The shader must not require input textures.
|
||||
* If @data is %NULL, all uniform values are set to zero.
|
||||
*
|
||||
* Returns: (transfer full): a new #GskShaderPaintable
|
||||
* Returns: (transfer full): a new `GskShaderPaintable`
|
||||
*/
|
||||
GdkPaintable *
|
||||
gsk_shader_paintable_new (GskGLShader *shader,
|
||||
@@ -215,8 +212,8 @@ gsk_shader_paintable_new (GskGLShader *shader,
|
||||
|
||||
/**
|
||||
* gsk_shader_paintable_set_shader:
|
||||
* @self: a #GskShaderPaintable
|
||||
* @shader: the #GskGLShader to use
|
||||
* @self: a `GskShaderPaintable`
|
||||
* @shader: the `GskGLShader` to use
|
||||
*
|
||||
* Sets the shader that the paintable will use
|
||||
* to create pixels. The shader must not require
|
||||
@@ -241,11 +238,11 @@ gsk_shader_paintable_set_shader (GskShaderPaintable *self,
|
||||
|
||||
/**
|
||||
* gsk_shader_paintable_get_shader:
|
||||
* @self: a #GskShaderPaintable
|
||||
* @self: a `GskShaderPaintable`
|
||||
*
|
||||
* Returns the shader that the paintable is using.
|
||||
*
|
||||
* Returns: (transfer none): the #GskGLShader that is used
|
||||
* Returns: (transfer none): the `GskGLShader` that is used
|
||||
*/
|
||||
GskGLShader *
|
||||
gsk_shader_paintable_get_shader (GskShaderPaintable *self)
|
||||
@@ -257,12 +254,12 @@ gsk_shader_paintable_get_shader (GskShaderPaintable *self)
|
||||
|
||||
/**
|
||||
* gsk_shader_paintable_set_args:
|
||||
* @self: a #GskShaderPaintable
|
||||
* @self: a `GskShaderPaintable`
|
||||
* @data: Data block with uniform data for the shader
|
||||
*
|
||||
* Sets the uniform data that will be passed to the
|
||||
* shader when rendering. The @data will typically
|
||||
* be produced by a #GskUniformDataBuilder.
|
||||
* be produced by a `GskUniformDataBuilder`.
|
||||
*
|
||||
* Note that the @data should be considered immutable
|
||||
* after it has been passed to this function.
|
||||
@@ -284,7 +281,7 @@ gsk_shader_paintable_set_args (GskShaderPaintable *self,
|
||||
|
||||
/**
|
||||
* gsk_shader_paintable_get_args:
|
||||
* @self: a #GskShaderPaintable
|
||||
* @self: a `GskShaderPaintable`
|
||||
*
|
||||
* Returns the uniform data set with
|
||||
* gsk_shader_paintable_get_args().
|
||||
@@ -301,9 +298,9 @@ gsk_shader_paintable_get_args (GskShaderPaintable *self)
|
||||
|
||||
/**
|
||||
* gsk_shader_paintable_update_time:
|
||||
* @self: a #GskShaderPaintable
|
||||
* @self: a `GskShaderPaintable`
|
||||
* @time_idx: the index of the uniform for time in seconds as float
|
||||
* @frame_time: the current frame time, as returned by #GdkFrameClock
|
||||
* @frame_time: the current frame time, as returned by `GdkFrameClock`
|
||||
*
|
||||
* This function is a convenience wrapper for
|
||||
* gsk_shader_paintable_set_args() that leaves all
|
||||
@@ -311,7 +308,7 @@ gsk_shader_paintable_get_args (GskShaderPaintable *self)
|
||||
* index @time_idx, which will be set to the elapsed time
|
||||
* in seconds, since the first call to this function.
|
||||
*
|
||||
* This function is usually called from a #GtkTickCallback.
|
||||
* This function is usually called from a `GtkTickCallback`.
|
||||
*/
|
||||
void
|
||||
gsk_shader_paintable_update_time (GskShaderPaintable *self,
|
||||
|
||||
@@ -74,9 +74,9 @@ gtk_fishbowl_init (GtkFishbowl *fishbowl)
|
||||
/**
|
||||
* gtk_fishbowl_new:
|
||||
*
|
||||
* Creates a new #GtkFishbowl.
|
||||
* Creates a new `GtkFishbowl`.
|
||||
*
|
||||
* Returns: a new #GtkFishbowl.
|
||||
* Returns: a new `GtkFishbowl`.
|
||||
*/
|
||||
GtkWidget*
|
||||
gtk_fishbowl_new (void)
|
||||
|
||||
@@ -18,8 +18,6 @@ do_headerbar (GtkWidget *do_widget)
|
||||
GtkWidget *header;
|
||||
GtkWidget *button;
|
||||
GtkWidget *box;
|
||||
GtkWidget *image;
|
||||
GIcon *icon;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
@@ -32,20 +30,14 @@ do_headerbar (GtkWidget *do_widget)
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
|
||||
button = gtk_button_new ();
|
||||
icon = g_themed_icon_new ("mail-send-receive-symbolic");
|
||||
image = gtk_image_new_from_gicon (icon);
|
||||
g_object_unref (icon);
|
||||
gtk_button_set_child (GTK_BUTTON (button), image);
|
||||
button = gtk_button_new_from_icon_name ("mail-send-receive-symbolic");
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_widget_add_css_class (box, "linked");
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_child (GTK_BUTTON (button), gtk_image_new_from_icon_name ("pan-start-symbolic"));
|
||||
button = gtk_button_new_from_icon_name ("go-previous-symbolic");
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
button = gtk_button_new ();
|
||||
gtk_button_set_child (GTK_BUTTON (button), gtk_image_new_from_icon_name ("pan-end-symbolic"));
|
||||
button = gtk_button_new_from_icon_name ("go-next-symbolic");
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), box);
|
||||
|
||||
@@ -116,20 +116,25 @@ populate_emoji_text (void)
|
||||
GtkWidget *textview;
|
||||
GtkTextBuffer *buffer;
|
||||
GString *s;
|
||||
GtkTextIter iter;
|
||||
|
||||
s = g_string_sized_new (1000 * 30 * 4);
|
||||
s = g_string_sized_new (500 * 30 * 4);
|
||||
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < 500; i++)
|
||||
{
|
||||
if (i % 2)
|
||||
g_string_append (s, "x");
|
||||
g_string_append (s, "<span underline=\"single\" underline_color=\"red\">x</span>");
|
||||
for (int j = 0; j < 30; j++)
|
||||
g_string_append (s, "💓x");
|
||||
{
|
||||
g_string_append (s, "💓");
|
||||
g_string_append (s, "<span underline=\"single\" underline_color=\"red\">x</span>");
|
||||
}
|
||||
g_string_append (s, "\n");
|
||||
}
|
||||
|
||||
buffer = gtk_text_buffer_new (NULL);
|
||||
gtk_text_buffer_set_text (buffer, s->str, s->len);
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
gtk_text_buffer_insert_markup (buffer, &iter, s->str, s->len);
|
||||
|
||||
g_string_free (s, TRUE);
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">pan-start-symbolic</property>
|
||||
<property name="icon-name">go-previous-symbolic</property>
|
||||
<signal name="clicked" handler="iconscroll_prev_clicked_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">pan-end-symbolic</property>
|
||||
<property name="icon-name">go-next-symbolic</property>
|
||||
<signal name="clicked" handler="iconscroll_next_clicked_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* This is the function that creates the #GListModel that we need.
|
||||
* GTK list widgets need a #GListModel to display, as models support change
|
||||
/* This is the function that creates the GListModel that we need.
|
||||
* GTK list widgets need a GListModel to display, as models support change
|
||||
* notifications.
|
||||
* Unfortunately various older APIs do not provide list models, so we create
|
||||
* our own.
|
||||
@@ -20,10 +20,10 @@ create_application_list (void)
|
||||
GListStore *store;
|
||||
GList *apps, *l;
|
||||
|
||||
/* We use a #GListStore here, which is a simple array-like list implementation
|
||||
/* We use a GListStore here, which is a simple array-like list implementation
|
||||
* for manual management.
|
||||
* List models need to know what type of data they provide, so we need to
|
||||
* provide the type here. As we want to do a list of applications, #GAppInfo
|
||||
* provide the type here. As we want to do a list of applications, GAppInfo
|
||||
* is the object we provide.
|
||||
*/
|
||||
store = g_list_store_new (G_TYPE_APP_INFO);
|
||||
@@ -39,7 +39,7 @@ create_application_list (void)
|
||||
}
|
||||
|
||||
/* This is the function we use for setting up new listitems to display.
|
||||
* We add just an #GtkImage and a #GtkLabel here to display the application's
|
||||
* We add just an GtkImage and a GtkLabel here to display the application's
|
||||
* icon and name, as this is just a simple demo.
|
||||
*/
|
||||
static void
|
||||
@@ -61,8 +61,8 @@ setup_listitem_cb (GtkListItemFactory *factory,
|
||||
|
||||
/* Here we need to prepare the listitem for displaying its item. We get the
|
||||
* listitem already set up from the previous function, so we can reuse the
|
||||
* #GtkImage widget we set up above.
|
||||
* We get the item - which we know is a #GAppInfo because it comes out of
|
||||
* GtkImage widget we set up above.
|
||||
* We get the item - which we know is a GAppInfo because it comes out of
|
||||
* the model we set up above, grab its icon and display it.
|
||||
*/
|
||||
static void
|
||||
@@ -85,7 +85,7 @@ bind_listitem_cb (GtkListItemFactory *factory,
|
||||
* the listitem, but this is simple code, so the default implementations are
|
||||
* enough. If we had connected signals, this step would have been necessary.
|
||||
*
|
||||
* The #GtkSignalListItemFactory documentation contains more information about
|
||||
* The GtkSignalListItemFactory documentation contains more information about
|
||||
* this step.
|
||||
*/
|
||||
|
||||
@@ -108,8 +108,8 @@ activate_cb (GtkListView *list,
|
||||
app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
|
||||
|
||||
/* Prepare the context for launching the application and launch it. This
|
||||
* code is explained in detail in the documentation for #GdkAppLaunchContext
|
||||
* and #GAppInfo.
|
||||
* code is explained in detail in the documentation for GdkAppLaunchContext
|
||||
* and GAppInfo.
|
||||
*/
|
||||
context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (list)));
|
||||
if (!g_app_info_launch (app_info,
|
||||
@@ -155,13 +155,13 @@ do_listview_applauncher (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Application Launcher");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
|
||||
|
||||
/* The #GtkListitemFactory is what is used to create #GtkListItems
|
||||
/* The GtkListitemFactory is what is used to create GtkListItems
|
||||
* to display the data from the model. So it is absolutely necessary
|
||||
* to create one.
|
||||
* We will use a #GtkSignalListItemFactory because it is the simplest
|
||||
* We will use a GtkSignalListItemFactory because it is the simplest
|
||||
* one to use. Different ones are available for different use cases.
|
||||
* The most powerful one is #GtkBuilderListItemFactory which uses
|
||||
* #GtkBuilder .ui files, so it requires little code.
|
||||
* The most powerful one is GtkBuilderListItemFactory which uses
|
||||
* GtkBuilder .ui files, so it requires little code.
|
||||
*/
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
|
||||
@@ -184,7 +184,7 @@ do_listview_applauncher (GtkWidget *do_widget)
|
||||
*/
|
||||
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
|
||||
|
||||
/* List widgets should always be contained in a #GtkScrolledWindow,
|
||||
/* List widgets should always be contained in a GtkScrolledWindow,
|
||||
* because otherwise they might get too large or they might not
|
||||
* be scrollable.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,7 @@ enum {
|
||||
};
|
||||
|
||||
#define FILE_BROWSER_TYPE_VIEW (file_browser_view_get_type ())
|
||||
G_MODULE_EXPORT
|
||||
G_DECLARE_FINAL_TYPE (FileBrowserView, file_browser_view, FILE_BROWSER, VIEW, GObject);
|
||||
|
||||
G_DEFINE_TYPE (FileBrowserView, file_browser_view, G_TYPE_OBJECT);
|
||||
@@ -159,7 +160,7 @@ static void file_browser_view_init (FileBrowserView *self)
|
||||
{
|
||||
}
|
||||
|
||||
char *
|
||||
G_MODULE_EXPORT char *
|
||||
filebrowser_get_display_name (GObject *object,
|
||||
GFileInfo *info)
|
||||
{
|
||||
@@ -169,7 +170,7 @@ filebrowser_get_display_name (GObject *object,
|
||||
return g_strdup (g_file_info_get_attribute_string (info, "standard::display-name"));
|
||||
}
|
||||
|
||||
char *
|
||||
G_MODULE_EXPORT char *
|
||||
filebrowser_get_content_type (GObject *object,
|
||||
GFileInfo *info)
|
||||
{
|
||||
@@ -179,7 +180,7 @@ filebrowser_get_content_type (GObject *object,
|
||||
return g_strdup (g_file_info_get_attribute_string (info, "standard::content-type"));
|
||||
}
|
||||
|
||||
char *
|
||||
G_MODULE_EXPORT char *
|
||||
filebrowser_get_size (GObject *object,
|
||||
GFileInfo *info)
|
||||
{
|
||||
@@ -189,7 +190,7 @@ filebrowser_get_size (GObject *object,
|
||||
return g_format_size (g_file_info_get_attribute_uint64 (info, "standard::size"));
|
||||
}
|
||||
|
||||
GIcon *
|
||||
G_MODULE_EXPORT GIcon *
|
||||
filebrowser_get_icon (GObject *object,
|
||||
GFileInfo *info)
|
||||
{
|
||||
@@ -206,7 +207,7 @@ filebrowser_get_icon (GObject *object,
|
||||
return icon;
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
filebrowser_up_clicked_cb (GtkButton *button,
|
||||
GtkDirectoryList *list)
|
||||
{
|
||||
@@ -219,7 +220,7 @@ filebrowser_up_clicked_cb (GtkButton *button,
|
||||
gtk_directory_list_set_file (list, file);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
filebrowser_view_activated_cb (GtkGridView *view,
|
||||
guint pos,
|
||||
GtkDirectoryList *list)
|
||||
|
||||
@@ -751,7 +751,6 @@ demo_filter_by_name (gpointer item,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkTreeListRow *row = item;
|
||||
GtkFilterListModel *model = user_data;
|
||||
GListModel *children;
|
||||
GtkDemo *demo;
|
||||
guint i, n;
|
||||
@@ -762,7 +761,7 @@ demo_filter_by_name (gpointer item,
|
||||
return TRUE;
|
||||
|
||||
g_assert (GTK_IS_TREE_LIST_ROW (row));
|
||||
g_assert (GTK_IS_FILTER_LIST_MODEL (model));
|
||||
g_assert (GTK_IS_FILTER_LIST_MODEL (user_data));
|
||||
|
||||
/* Show a row if itself of any parent matches */
|
||||
for (parent = row; parent; parent = gtk_tree_list_row_get_parent (parent))
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<object class="GtkButton">
|
||||
<property name="valign">center</property>
|
||||
<property name="action-name">win.run</property>
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="label" translatable="yes">Run</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -32,6 +33,7 @@
|
||||
<object class="GtkToggleButton">
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="active" bind-source="searchbar" bind-property="search-mode-enabled" bind-flags="bidirectional|sync-create"/>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Search</property>
|
||||
@@ -41,6 +43,7 @@
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="valign">center</property>
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
<accessibility>
|
||||
|
||||
@@ -205,4 +205,9 @@ install_data('org.gtk.Demo4.gschema.xml', install_dir: gtk_schemasdir)
|
||||
gnome.compile_schemas()
|
||||
|
||||
# appdata
|
||||
install_data('org.gtk.Demo4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
configure_file(
|
||||
input: 'org.gtk.Demo4.appdata.xml.in',
|
||||
output: 'org.gtk.Demo4.appdata.xml',
|
||||
configuration: appdata_config,
|
||||
install_dir: gtk_appdatadir
|
||||
)
|
||||
|
||||
@@ -31,14 +31,9 @@
|
||||
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
||||
<developer_name>Matthias Clasen and others</developer_name>
|
||||
<releases>
|
||||
<release version="3.99.0" date="2020-07-30">
|
||||
<release version="@BUILD_VERSION@" date="@BUILD_DATE@">
|
||||
<description>
|
||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||
</description>
|
||||
</release>
|
||||
<release version="3.94.0" date="2018-06-25">
|
||||
<description>
|
||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||
<p>A new build of GTK.</p>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
@@ -25,43 +25,43 @@ show_shortcuts (GtkWidget *window,
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_builder_shortcuts (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-builder", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_gedit_shortcuts (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-gedit", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_clocks_shortcuts (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-clocks", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_clocks_shortcuts_stopwatch (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-clocks", "stopwatch");
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_boxes_shortcuts (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-boxes", NULL);
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_boxes_shortcuts_wizard (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-boxes", "wizard");
|
||||
}
|
||||
|
||||
void
|
||||
G_MODULE_EXPORT void
|
||||
shortcuts_boxes_shortcuts_display (GtkWidget *window)
|
||||
{
|
||||
show_shortcuts (window, "shortcuts-boxes", "display");
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
#include <glib.h>
|
||||
#include <assert.h>
|
||||
|
||||
/* See Golub and Reinsch,
|
||||
* "Handbook for Automatic Computation vol II - Linear Algebra",
|
||||
@@ -39,6 +40,9 @@ householder_reduction (double *A,
|
||||
double *pu, *pui, *pv, *pvi;
|
||||
double half_norm_squared;
|
||||
|
||||
assert (nrows >= 2);
|
||||
assert (ncols >= 2);
|
||||
|
||||
memcpy (U, A, sizeof (double) * nrows * ncols);
|
||||
|
||||
diagonal[0] = 0.0;
|
||||
@@ -205,6 +209,9 @@ givens_reduction (int nrows,
|
||||
int rotation_test;
|
||||
int iteration_count;
|
||||
|
||||
assert (nrows >= 2);
|
||||
assert (ncols >= 2);
|
||||
|
||||
for (i = 0, x = 0.0; i < ncols; i++)
|
||||
{
|
||||
y = fabs (diagonal[i]) + fabs (superdiagonal[i]);
|
||||
@@ -342,6 +349,9 @@ sort_singular_values (int nrows,
|
||||
double temp;
|
||||
double *p1, *p2;
|
||||
|
||||
assert (nrows >= 2);
|
||||
assert (ncols >= 2);
|
||||
|
||||
for (i = 0; i < ncols - 1; i++)
|
||||
{
|
||||
max_index = i;
|
||||
@@ -433,9 +443,12 @@ singular_value_decomposition_solve (double *U,
|
||||
double d;
|
||||
double tolerance;
|
||||
|
||||
assert (nrows >= 2);
|
||||
assert (ncols >= 2);
|
||||
|
||||
tolerance = DBL_EPSILON * S[0] * (double) ncols;
|
||||
|
||||
for ( i = 0, pv = V; i < ncols; i++, pv += ncols)
|
||||
for (i = 0, pv = V; i < ncols; i++, pv += ncols)
|
||||
{
|
||||
x[i] = 0.0;
|
||||
for (j = 0; j < ncols; j++)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
G_MODULE_EXPORT int
|
||||
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||
double *new_val)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
G_MODULE_EXPORT int
|
||||
spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
@@ -49,7 +49,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
G_MODULE_EXPORT int
|
||||
spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||
double *new_val)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
G_MODULE_EXPORT int
|
||||
spinbutton_time_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
@@ -122,7 +122,7 @@ static const char *month[12] = {
|
||||
"December"
|
||||
};
|
||||
|
||||
int
|
||||
G_MODULE_EXPORT int
|
||||
spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||
double *new_val)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
G_MODULE_EXPORT int
|
||||
spinbutton_month_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
|
||||
@@ -32,5 +32,10 @@ endforeach
|
||||
install_data('org.gtk.IconBrowser4.desktop', install_dir: gtk_applicationsdir)
|
||||
|
||||
# appdata
|
||||
install_data('org.gtk.IconBrowser4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
configure_file(
|
||||
input: 'org.gtk.IconBrowser4.appdata.xml.in',
|
||||
output: 'org.gtk.IconBrowser4.appdata.xml',
|
||||
configuration: appdata_config,
|
||||
install_dir: gtk_appdatadir
|
||||
)
|
||||
|
||||
|
||||
@@ -30,14 +30,9 @@
|
||||
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
||||
<developer_name>Matthias Clasen and others</developer_name>
|
||||
<releases>
|
||||
<release version="3.99.0" date="2020-07-30">
|
||||
<release version="@BUILD_VERSION@" date="@BUILD_DATE@">
|
||||
<description>
|
||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||
</description>
|
||||
</release>
|
||||
<release version="3.94.0" date="2018-06-25">
|
||||
<description>
|
||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||
<p>A new build of GTK.</p>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
@@ -25,12 +25,14 @@
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="normal_radio">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="symbolic_radio">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="label" translatable="yes">Symbolic</property>
|
||||
<property name="group">normal_radio</property>
|
||||
<signal name="notify::active" handler="symbolic_toggled" swapped="yes" after="yes"/>
|
||||
@@ -40,6 +42,7 @@
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
@@ -47,6 +50,7 @@
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="focus-on-click">0</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
|
||||
@@ -1,19 +1,31 @@
|
||||
demo_conf = configuration_data()
|
||||
demo_conf.set_quoted('PROFILE', get_option('profile'))
|
||||
demo_conf.set_quoted('VCS_TAG', '@VCS_TAG@')
|
||||
gen_demo_header = find_program('../build-aux/meson/gen-demo-header.py')
|
||||
demo_profile = get_option('profile')
|
||||
|
||||
demo_conf_h = declare_dependency(
|
||||
sources: vcs_tag(
|
||||
command: [ 'git', 'rev-parse', '--short', 'HEAD' ],
|
||||
fallback: get_option('profile') != 'default' ? 'devel' : '',
|
||||
input: configure_file(
|
||||
output: 'demo_conf.h.in',
|
||||
configuration: demo_conf
|
||||
),
|
||||
output: 'demo_conf.h'
|
||||
)
|
||||
sources: custom_target('demo-header',
|
||||
command: [gen_demo_header, meson.source_root(), demo_profile],
|
||||
capture: true,
|
||||
output: 'demo_conf.h',
|
||||
build_by_default: true,
|
||||
build_always_stale: true,
|
||||
)
|
||||
)
|
||||
|
||||
# appdata
|
||||
today = 'unknown'
|
||||
date = find_program('date',
|
||||
required: false)
|
||||
if date.found()
|
||||
r = run_command(date, '-I')
|
||||
if r.returncode() == 0
|
||||
today = r.stdout().strip()
|
||||
endif
|
||||
endif
|
||||
|
||||
appdata_config = configuration_data()
|
||||
appdata_config.set('BUILD_VERSION', meson.project_version())
|
||||
appdata_config.set('BUILD_DATE', today)
|
||||
|
||||
subdir('constraint-editor')
|
||||
subdir('gtk-demo')
|
||||
subdir('icon-browser')
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">Help</property>
|
||||
<property name="default-width">720</property>
|
||||
<property name="default-height">520</property>
|
||||
<property name="default-width">920</property>
|
||||
<property name="default-height">600</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<child>
|
||||
|
||||
@@ -635,6 +635,24 @@ export_image_cb (GtkWidget *button,
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
clip_image_cb (GtkWidget *button,
|
||||
NodeEditorWindow *self)
|
||||
{
|
||||
GdkTexture *texture;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
texture = create_texture (self);
|
||||
if (texture == NULL)
|
||||
return;
|
||||
|
||||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (self));
|
||||
|
||||
gdk_clipboard_set_texture (clipboard, texture);
|
||||
|
||||
g_object_unref (texture);
|
||||
}
|
||||
|
||||
static void
|
||||
testcase_name_entry_changed_cb (GtkWidget *button,
|
||||
GParamSpec *pspec,
|
||||
@@ -826,6 +844,7 @@ node_editor_window_class_init (NodeEditorWindowClass *class)
|
||||
gtk_widget_class_bind_template_callback (widget_class, open_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, save_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, export_image_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, clip_image_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, testcase_save_clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, testcase_name_entry_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, dark_mode_cb);
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
<object class="GtkHeaderBar" id="header">
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="icon-name">document-open-symbolic</property>
|
||||
<property name="tooltip-text">Open node file</property>
|
||||
<signal name="clicked" handler="open_cb"/>
|
||||
@@ -109,6 +110,7 @@
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="icon-name">document-save-symbolic</property>
|
||||
<property name="tooltip-text">Save to node file</property>
|
||||
<signal name="clicked" handler="save_cb"/>
|
||||
@@ -116,24 +118,30 @@
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkButton">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="icon-name">insert-image-symbolic</property>
|
||||
<property name="tooltip-text">Export to image</property>
|
||||
<signal name="clicked" handler="export_image_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkSeparator">
|
||||
<property name="orientation">vertical</property>
|
||||
<object class="GtkButton">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="icon-name">edit-copy-symbolic</property>
|
||||
<property name="tooltip-text">Copy image to clipboard</property>
|
||||
<signal name="clicked" handler="clip_image_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="label">Save Testcase</property>
|
||||
<property name="popover">testcase_popover</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
@@ -141,6 +149,7 @@
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="dark_bg_button">
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="has-frame">0</property>
|
||||
<property name="icon-name">display-brightness-symbolic</property>
|
||||
|
||||
@@ -159,7 +159,7 @@ save_file (GFile *save_filename)
|
||||
|
||||
error = NULL;
|
||||
g_file_replace_contents (save_filename,
|
||||
text, -1,
|
||||
text, strlen (text),
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
|
||||
@@ -26,4 +26,9 @@ foreach size: ['scalable', 'symbolic']
|
||||
endforeach
|
||||
|
||||
# appdata
|
||||
install_data('org.gtk.WidgetFactory4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
configure_file(
|
||||
input: 'org.gtk.WidgetFactory4.appdata.xml.in',
|
||||
output: 'org.gtk.WidgetFactory4.appdata.xml',
|
||||
configuration: appdata_config,
|
||||
install_dir: gtk_appdatadir
|
||||
)
|
||||
|
||||
@@ -32,14 +32,9 @@
|
||||
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
||||
<developer_name>Matthias Clasen and others</developer_name>
|
||||
<releases>
|
||||
<release version="3.99.0" date="2020-07-30">
|
||||
<release version="@BUILD_VERSION@" date="@BUILD_DATE@">
|
||||
<description>
|
||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||
</description>
|
||||
</release>
|
||||
<release version="3.94.0" date="2018-06-25">
|
||||
<description>
|
||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||
<p>A new build of GTK.</p>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
@@ -50,32 +50,19 @@ change_theme_state (GSimpleAction *action,
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
const char *s;
|
||||
const char *theme;
|
||||
gboolean prefer_dark = FALSE;
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
|
||||
s = g_variant_get_string (state, NULL);
|
||||
|
||||
if (strcmp (s, "adwaita") == 0)
|
||||
{
|
||||
theme = "Adwaita";
|
||||
prefer_dark = FALSE;
|
||||
}
|
||||
else if (strcmp (s, "adwaita-dark") == 0)
|
||||
{
|
||||
theme = "Adwaita";
|
||||
prefer_dark = TRUE;
|
||||
}
|
||||
else if (strcmp (s, "highcontrast") == 0)
|
||||
{
|
||||
theme = "HighContrast";
|
||||
prefer_dark = FALSE;
|
||||
}
|
||||
else if (strcmp (s, "highcontrast-inverse") == 0)
|
||||
{
|
||||
theme = "HighContrastInverse";
|
||||
prefer_dark = FALSE;
|
||||
}
|
||||
if (strcmp (s, "default") == 0)
|
||||
theme = "Default";
|
||||
else if (strcmp (s, "dark") == 0)
|
||||
theme = "Default-dark";
|
||||
else if (strcmp (s, "hc") == 0)
|
||||
theme = "Default-hc";
|
||||
else if (strcmp (s, "hc-dark") == 0)
|
||||
theme = "Default-hc-dark";
|
||||
else if (strcmp (s, "current") == 0)
|
||||
{
|
||||
gtk_settings_reset_property (settings, "gtk-theme-name");
|
||||
@@ -87,7 +74,7 @@ change_theme_state (GSimpleAction *action,
|
||||
|
||||
g_object_set (G_OBJECT (settings),
|
||||
"gtk-theme-name", theme,
|
||||
"gtk-application-prefer-dark-theme", prefer_dark,
|
||||
"gtk-application-prefer-dark-theme", FALSE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -1886,6 +1873,7 @@ set_up_context_popover (GtkWidget *widget,
|
||||
gtk_widget_set_parent (popover, widget);
|
||||
gtk_popover_set_has_arrow (GTK_POPOVER (popover), FALSE);
|
||||
gesture = gtk_gesture_click_new ();
|
||||
gtk_event_controller_set_name (GTK_EVENT_CONTROLLER (gesture), "widget-factory-context-click");
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
||||
g_signal_connect (gesture, "pressed", G_CALLBACK (clicked_cb), popover);
|
||||
gtk_widget_add_controller (widget, GTK_EVENT_CONTROLLER (gesture));
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
<attribute name="target">current</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Adwaita</attribute>
|
||||
<attribute name="label" translatable="yes">Default</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">adwaita</attribute>
|
||||
<attribute name="target">default</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Adwaita dark</attribute>
|
||||
<attribute name="label" translatable="yes">Dark</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">adwaita-dark</attribute>
|
||||
<attribute name="target">dark</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">High contrast</attribute>
|
||||
<attribute name="label" translatable="yes">Highcontrast</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">highcontrast</attribute>
|
||||
<attribute name="target">hc</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">High contrast inverse</attribute>
|
||||
<attribute name="label" translatable="yes">Highcontrast inverse</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">highcontrast-inverse</attribute>
|
||||
<attribute name="target">hc-dark</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
@@ -438,6 +438,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="valign">center</property>
|
||||
<property name="focus-on-click">0</property>
|
||||
<property name="popover">
|
||||
<object class="GtkPopoverMenu" id="gear_menu">
|
||||
<property name="menu-model">gear_menu_model</property>
|
||||
@@ -2605,12 +2606,12 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">pan-start-symbolic</property>
|
||||
<property name="icon-name">go-previous-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="icon-name">pan-end-symbolic</property>
|
||||
<property name="icon-name">go-next-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -21,3 +21,9 @@ show_index_summary = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/master/"
|
||||
|
||||
[extra]
|
||||
content_images = [
|
||||
"images/gtk-logo.svg",
|
||||
]
|
||||
urlmap_file = "urlmap.js"
|
||||
|
||||
@@ -21,3 +21,9 @@ show_index_summary = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/gtk/-/blob/master/"
|
||||
|
||||
[extra]
|
||||
content_images = [
|
||||
"images/gtk-logo.svg",
|
||||
]
|
||||
urlmap_file = "urlmap.js"
|
||||
|
||||
@@ -24,17 +24,17 @@ search_index = true
|
||||
[dependencies."Pango-1.0"]
|
||||
name = "Pango"
|
||||
description = "Text shaping and rendering"
|
||||
docs_url = "https://developer.gnome.org/pango/stable"
|
||||
docs_url = "https://docs.gtk.org/Pango/"
|
||||
|
||||
[dependencies."GdkWayland-4.0"]
|
||||
name = "GdkWayland"
|
||||
description = "GDK Wayland Backend"
|
||||
docs_url = "https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/"
|
||||
docs_url = "https://docs.gtk.org/gdk4-wayland/"
|
||||
|
||||
[dependencies."GdkX11-4.0"]
|
||||
name = "GdkX11"
|
||||
description = "GDK X11 Backend"
|
||||
docs_url = "https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/"
|
||||
docs_url = "https://docs.gtk.org/gdk4-x11/"
|
||||
|
||||
[theme]
|
||||
name = "basic"
|
||||
|
||||
@@ -3,7 +3,7 @@ Title: Key Values
|
||||
## Functions for manipulating keyboard codes
|
||||
|
||||
Key values are the codes which are sent whenever a key is pressed or released.
|
||||
They are included in the data contained in a key press or release #GdkEvent.
|
||||
They are included in the data contained in a key press or release `GdkEvent`.
|
||||
The complete list of key values can be found in the `gdk/gdkkeysyms.h` header
|
||||
file.
|
||||
|
||||
@@ -28,8 +28,8 @@ At the lowest level, physical keys on the keyboard are represented by
|
||||
numeric keycodes, and GDK knows how to translate these keycodes into
|
||||
key values according to the configured keyboard layout and the current
|
||||
state of the keyboard. In the GDK api, the mapping from keycodes to key
|
||||
values is available via [`method@Gdk.Display.map_keycode`], and the reverse
|
||||
mapping is available via [`method@Gdk.Display.map_keyval`]. The results of
|
||||
values is available via [method@Gdk.Display.map_keycode], and the reverse
|
||||
mapping is available via [method@Gdk.Display.map_keyval]. The results of
|
||||
these functions are returned in [struct@Gdk.KeymapKey] structures.
|
||||
|
||||
You can think of a [struct@Gdk.KeymapKey] as a representation of a symbol
|
||||
@@ -45,7 +45,7 @@ information:
|
||||
or the “!” symbol. The letter keys are considered to have a lowercase
|
||||
letter at level 0, and an uppercase letter at level 1, though normally
|
||||
only the uppercase letter is printed on the key
|
||||
1. third, the #GdkKeymapKey contains a group; groups are not used on
|
||||
1. third, the [struct@Gdk.KeymapKey] contains a group; groups are not used on
|
||||
standard US keyboards, but are used in many other countries. On a
|
||||
keyboard with groups, there can be 3 or 4 symbols printed on a single
|
||||
key. The group indicates movement in a horizontal direction. Usually
|
||||
|
||||
@@ -13,6 +13,7 @@ if get_option('gtk_doc')
|
||||
gidocgen,
|
||||
'generate',
|
||||
'--quiet',
|
||||
'--fatal-warnings',
|
||||
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
|
||||
'--config=@INPUT0@',
|
||||
'--output-dir=@OUTPUT@',
|
||||
@@ -34,6 +35,7 @@ if get_option('gtk_doc')
|
||||
gidocgen,
|
||||
'generate',
|
||||
'--quiet',
|
||||
'--fatal-warnings',
|
||||
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
|
||||
'--config=@INPUT0@',
|
||||
'--output-dir=@OUTPUT@',
|
||||
@@ -57,6 +59,7 @@ if get_option('gtk_doc')
|
||||
gidocgen,
|
||||
'generate',
|
||||
'--quiet',
|
||||
'--fatal-warnings',
|
||||
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
|
||||
'--config=@INPUT0@',
|
||||
'--output-dir=@OUTPUT@',
|
||||
|
||||
@@ -14,22 +14,22 @@ search_index = true
|
||||
[dependencies."GObject-2.0"]
|
||||
name = "GObject"
|
||||
description = "The base type system library"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable/"
|
||||
|
||||
[dependencies."Graphene-1.0"]
|
||||
name = "Graphene"
|
||||
description = "A thin layer of mathematical types for 3D libraries"
|
||||
docs_url = "https://ebassi.github.io/graphene/docs"
|
||||
docs_url = "https://ebassi.github.io/graphene/docs/"
|
||||
|
||||
[dependencies."Pango-1.0"]
|
||||
name = "Pango"
|
||||
description = "Text shaping and rendering"
|
||||
docs_url = "https://developer.gnome.org/pango/stable"
|
||||
docs_url = "https://docs.gtk.org/Pango/"
|
||||
|
||||
[dependencies."Gdk-4.0"]
|
||||
name = "GDK"
|
||||
description = "The GTK windowing system abstraction"
|
||||
docs_url = "https://gnome.pages.gitlab.gnome.org/gtk/gdk4/"
|
||||
docs_url = "https://docs.gtk.org/gdk4/"
|
||||
|
||||
[theme]
|
||||
name = "basic"
|
||||
|
||||
@@ -8,6 +8,7 @@ if get_option('gtk_doc')
|
||||
gidocgen,
|
||||
'generate',
|
||||
'--quiet',
|
||||
'--fatal-warnings',
|
||||
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
|
||||
'--config=@INPUT0@',
|
||||
'--output-dir=@OUTPUT@',
|
||||
|
||||
@@ -3,27 +3,29 @@ Slug: broadway
|
||||
|
||||
## Using GTK with Broadway
|
||||
|
||||
The GDK Broadway backend provides support for displaying GTK
|
||||
applications in a web browser, using HTML5 and web sockets. To run
|
||||
your application in this way, select the Broadway backend by setting
|
||||
`GDK_BACKEND=broadway`. Then you can make your application appear in
|
||||
a web browser by pointing it at `http://127.0.0.1:8080`. Note that
|
||||
you need to enable web sockets in your web browser.
|
||||
The GDK Broadway backend provides support for displaying GTK applications in
|
||||
a web browser, using HTML5 and web sockets.
|
||||
|
||||
You can choose a different port from the default 8080 by setting
|
||||
the `BROADWAY_DISPLAY` environment variable to the port that you
|
||||
want to use.
|
||||
To run your application in this way, select the Broadway backend by setting
|
||||
`GDK_BACKEND=broadway`. Then you can make your application appear in a web
|
||||
browser by pointing it at `http://127.0.0.1:8080`. Note that you need to
|
||||
enable web sockets in your web browser.
|
||||
|
||||
It is also possible to use multiple GTK applications in the same
|
||||
web browser window, by using the Broadway server, `broadwayd`, that
|
||||
ships with GTK. To use broadwayd, start it like this:
|
||||
You can choose a different port from the default 8080 by setting the
|
||||
`BROADWAY_DISPLAY` environment variable to the port that you want to use.
|
||||
|
||||
It is also possible to use multiple GTK applications in the same web browser
|
||||
window, by using the Broadway server, `gtk4-broadwayd`, that ships with GTK.
|
||||
To start the Broadway server use:
|
||||
|
||||
```
|
||||
broadwayd :5
|
||||
gtk4-broadwayd :5
|
||||
```
|
||||
|
||||
Then point your web browser at `http://127.0.0.1:8085`.
|
||||
Start your applications like this:
|
||||
|
||||
Once the Broadway server is running, you can start your applications like
|
||||
this:
|
||||
|
||||
```
|
||||
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk4-demo
|
||||
@@ -31,9 +33,13 @@ GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk4-demo
|
||||
|
||||
## Broadway-specific environment variables
|
||||
|
||||
### BROADWAY\_DISPLAY
|
||||
### `BROADWAY_DISPLAY`
|
||||
|
||||
Specifies the Broadway display number. The default display is 0.
|
||||
The display number determines the port to use when connecting
|
||||
to a Broadway application via the following formula:
|
||||
`port = 8080 + display`
|
||||
|
||||
The display number determines the port to use when connecting to a Broadway
|
||||
application via the following formula:
|
||||
|
||||
```
|
||||
port = 8080 + display
|
||||
```
|
||||
|
||||
@@ -76,12 +76,16 @@ and in some cases a number as arguments.
|
||||
|
||||
`lighter(Color)`
|
||||
: produces a brigher variant of Color
|
||||
|
||||
`darker(Color)`
|
||||
: produces a darker variant of Color
|
||||
|
||||
`shade(Color, Number)`
|
||||
: changes the lightness of Color. The number ranges from 0 for black to 2 for white.
|
||||
|
||||
`alpha(Color, Number)`
|
||||
: replaces the alpha value of color with number (between 0 and 1)
|
||||
|
||||
`mix(Color1, Color2, Number)`
|
||||
: interpolates between the two colors
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ The call to [ctor@Gtk.ApplicationWindow.new] will create a new
|
||||
window will have a frame, a title bar, and window controls depending on the
|
||||
platform.
|
||||
|
||||
A window title is set using [`method@Gtk.Window.set_title`]. This function
|
||||
A window title is set using [method@Gtk.Window.set_title]. This function
|
||||
takes a `GtkWindow` pointer and a string as input. As our `window` pointer
|
||||
is a `GtkWidget` pointer, we need to cast it to `GtkWindow`; instead of
|
||||
casting `window` via a typical C cast like `(GtkWindow*)`, `window` can be
|
||||
@@ -115,7 +115,7 @@ pointer is an instance of the `GtkWindow` class, before casting, and emit a
|
||||
warning if the check fails. More information about this convention can be
|
||||
found [here](https://developer.gnome.org/gobject/stable/gtype-conventions.html).
|
||||
|
||||
Finally the window size is set using [`method@Gtk.Window.set_default_size`]
|
||||
Finally the window size is set using [method@Gtk.Window.set_default_size]
|
||||
and the window is then shown by GTK via [method@Gtk.Widget.show].
|
||||
|
||||
When you close the window, by (for example) pressing the X button, the
|
||||
@@ -212,10 +212,10 @@ The `GtkBox` widget is created with [ctor@Gtk.Box.new], which takes a
|
||||
this box will contain can either be laid out horizontally or vertically.
|
||||
This does not matter in this particular case, as we are dealing with only
|
||||
one button. After initializing box with the newly created `GtkBox`, the code
|
||||
adds the box widget to the window widget using [`method@Gtk.Window.set_child`].
|
||||
adds the box widget to the window widget using [method@Gtk.Window.set_child].
|
||||
|
||||
Next the `button` variable is initialized in similar manner.
|
||||
[`ctor@Gtk.Button.new_with_label`] is called which returns a
|
||||
[ctor@Gtk.Button.new_with_label] is called which returns a
|
||||
[class@Gtk.Button] to be stored in `button`. Afterwards `button` is added to
|
||||
our `box`.
|
||||
|
||||
@@ -353,7 +353,7 @@ draw function.
|
||||
The contents of a widget often need to be partially or fully redrawn, e.g.
|
||||
when another window is moved and uncovers part of the widget, or when the
|
||||
window containing it is resized. It is also possible to explicitly cause a
|
||||
widget to be redrawn, by calling [`method@Gtk.Widget.queue_draw`]. GTK takes
|
||||
widget to be redrawn, by calling [method@Gtk.Widget.queue_draw]. GTK takes
|
||||
care of most of the details by providing a ready-to-use cairo context to the
|
||||
draw function.
|
||||
|
||||
@@ -690,16 +690,16 @@ gcc $( pkg-config --cflags gtk4 ) -o example-3 example-3.c $( pkg-config --libs
|
||||
|
||||
Note that `GtkBuilder` can also be used to construct objects that are
|
||||
not widgets, such as tree models, adjustments, etc. That is the reason
|
||||
the method we use here is called [`method@Gtk.Builder.get_object`] and returns
|
||||
the method we use here is called [method@Gtk.Builder.get_object] and returns
|
||||
a `GObject` instead of a `GtkWidget`.
|
||||
|
||||
Normally, you would pass a full path to [`method@Gtk.Builder.add_from_file`] to
|
||||
Normally, you would pass a full path to [method@Gtk.Builder.add_from_file] to
|
||||
make the execution of your program independent of the current directory.
|
||||
A common location to install UI descriptions and similar data is
|
||||
`/usr/share/appname`.
|
||||
|
||||
It is also possible to embed the UI description in the source code as a
|
||||
string and use [`method@Gtk.Builder.add_from_string`] to load it. But keeping the
|
||||
string and use [method@Gtk.Builder.add_from_string] to load it. But keeping the
|
||||
UI description in a separate file has several advantages: It is then possible
|
||||
to make minor adjustments to the UI without recompiling your program, and,
|
||||
more importantly, graphical UI editors such as [Glade](http://glade.gnome.org)
|
||||
@@ -985,7 +985,7 @@ glib-compile-resources exampleapp.gresource.xml --target=resources.c --generate-
|
||||
```
|
||||
|
||||
The gnome module of the [Meson build system](https://mesonbuild.com)
|
||||
provides the [`gnome.compile_resources()`](https://mesonbuild.com/Gnome-module.html#gnomecompile_resources)
|
||||
provides the [gnome.compile_resources()](https://mesonbuild.com/Gnome-module.html#gnomecompile_resources)
|
||||
method for this task.
|
||||
|
||||
Our application now looks like this:
|
||||
@@ -1081,7 +1081,7 @@ tell it to display information about our stack.
|
||||
|
||||
The stack switcher gets all its information it needs to display tabs from
|
||||
the stack that it belongs to. Here, we are passing the label to show for
|
||||
each file as the last argument to the [`method@Gtk.Stack.add_titled`]
|
||||
each file as the last argument to the [method@Gtk.Stack.add_titled]
|
||||
function.
|
||||
|
||||
Our application is beginning to take shape:
|
||||
@@ -1221,7 +1221,7 @@ Before we can make use of this schema in our application, we need to compile
|
||||
it into the binary form that GSettings expects. GIO provides
|
||||
[macros](https://developer.gnome.org/gio/2.36/ch31s06.html) to do this in
|
||||
autotools-based projects, and the gnome module of the Meson build system
|
||||
provides the [`gnome.compile_schemas()`](https://mesonbuild.com/Gnome-module.html#gnomecompile_schemas)
|
||||
provides the [gnome.compile_schemas()](https://mesonbuild.com/Gnome-module.html#gnomecompile_schemas)
|
||||
method for this task.
|
||||
|
||||
Next, we need to connect our settings to the widgets that they are supposed
|
||||
|
||||
@@ -24,17 +24,17 @@ search_index = true
|
||||
[dependencies."Pango-1.0"]
|
||||
name = "Pango"
|
||||
description = "Text shaping and rendering"
|
||||
docs_url = "https://developer.gnome.org/pango/stable"
|
||||
docs_url = "https://docs.gtk.org/Pango/"
|
||||
|
||||
[dependencies."Gdk-4.0"]
|
||||
name = "GDK"
|
||||
description = "The GTK windowing system abstraction"
|
||||
docs_url = "https://gnome.pages.gitlab.gnome.org/gtk/gdk4/"
|
||||
docs_url = "https://docs.gtk.org/gdk4/"
|
||||
|
||||
[dependencies."Gsk-4.0"]
|
||||
name = "GSK"
|
||||
description = "The GTK rendering abstraction"
|
||||
docs_url = "https://gnome.pages.gitlab.gnome.org/gtk/gsk4/"
|
||||
docs_url = "https://docs.gtk.org/gsk4/"
|
||||
|
||||
[theme]
|
||||
name = "basic"
|
||||
|
||||
@@ -7,7 +7,7 @@ Title: Initialization
|
||||
Before using GTK, you need to initialize it using [func@Gtk.init]; this
|
||||
connects to the windowing system, sets up the locale and performs other
|
||||
initialization tasks. [func@Gtk.init] exits the application if errors occur;
|
||||
to avoid this, you can use [`func@Gtk.init_check`], which allows you to recover
|
||||
to avoid this, you can use [func@Gtk.init_check], which allows you to recover
|
||||
from a failed GTK initialization; for instance, you might start up your
|
||||
application in text mode instead.
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ if get_option('gtk_doc')
|
||||
gidocgen,
|
||||
'generate',
|
||||
'--quiet',
|
||||
'--fatal-warnings',
|
||||
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
|
||||
'--config=@INPUT0@',
|
||||
'--output-dir=@OUTPUT@',
|
||||
@@ -70,16 +71,21 @@ if get_option('man-pages') and xsltproc.found()
|
||||
man_files = [
|
||||
[ 'gtk4-broadwayd', '1', ],
|
||||
[ 'gtk4-builder-tool', '1', ],
|
||||
[ 'gtk4-demo', '1', ],
|
||||
[ 'gtk4-demo-application', '1', ],
|
||||
[ 'gtk4-encode-symbolic-svg', '1', ],
|
||||
[ 'gtk4-icon-browser', '1', ],
|
||||
[ 'gtk4-launch', '1', ],
|
||||
[ 'gtk4-query-settings', '1', ],
|
||||
[ 'gtk4-update-icon-cache', '1', ],
|
||||
[ 'gtk4-widget-factory', '1', ],
|
||||
]
|
||||
|
||||
if get_option('demos')
|
||||
man_files += [
|
||||
[ 'gtk4-demo', '1', ],
|
||||
[ 'gtk4-demo-application', '1', ],
|
||||
[ 'gtk4-widget-factory', '1', ],
|
||||
[ 'gtk4-icon-browser', '1', ],
|
||||
]
|
||||
endif
|
||||
|
||||
foreach man: man_files
|
||||
man_name = man.get(0)
|
||||
man_section = man.get(1, '1')
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,13 +33,13 @@ the question you have, this list is a good place to start.
|
||||
|
||||
4. How does memory management work in GTK? Should I free data returned from functions?
|
||||
|
||||
See the documentation for #GObject and #GInitiallyUnowned. For #GObject note
|
||||
specifically g_object_ref() and g_object_unref(). #GInitiallyUnowned is a
|
||||
subclass of #GObject so the same points apply, except that it has a "floating"
|
||||
See the documentation for `GObject` and `GInitiallyUnowned`. For `GObject` note
|
||||
specifically `g_object_ref()` and `g_object_unref()`. `GInitiallyUnowned` is a
|
||||
subclass of `GObject` so the same points apply, except that it has a "floating"
|
||||
state (explained in its documentation).
|
||||
|
||||
For strings returned from functions, they will be declared "const" if they should
|
||||
not be freed. Non-const strings should be freed with g_free(). Arrays follow the
|
||||
not be freed. Non-const strings should be freed with `g_free()`. Arrays follow the
|
||||
same rule. If you find an undocumented exception to the rules, please
|
||||
[file a bug report.](https://gitlab.gnome.org/GNOME/gtk/issues/new).
|
||||
|
||||
@@ -47,7 +47,7 @@ the question you have, this list is a good place to start.
|
||||
documentation can provide useful hints for memory handling semantics as well.
|
||||
|
||||
5. Why does my program leak memory, if I destroy a widget immediately
|
||||
after creating it ?
|
||||
after creating it?
|
||||
|
||||
If `GtkFoo` isn't a toplevel window, then
|
||||
|
||||
@@ -60,7 +60,7 @@ the question you have, this list is a good place to start.
|
||||
want standard reference counting, not floating reference counting.
|
||||
|
||||
To get this, you must acquire a reference to the widget and drop the
|
||||
floating reference (_ref and sink_ in GObject parlance) after creating it:
|
||||
floating reference (_ref and sink_ in `GObject` parlance) after creating it:
|
||||
|
||||
foo = gtk_foo_new ();
|
||||
g_object_ref_sink (foo);
|
||||
@@ -72,12 +72,12 @@ the question you have, this list is a good place to start.
|
||||
6. How do I use GTK with threads?
|
||||
|
||||
GTK requires that all GTK API calls are made from the same thread in which
|
||||
the #GtkApplication was created, or gtk_init() was called (the _main thread_).
|
||||
the `GtkApplication` was created, or `gtk_init()` was called (the _main thread_).
|
||||
|
||||
If you want to take advantage of multi-threading in a GTK application,
|
||||
it is usually best to send long-running tasks to worker threads, and feed
|
||||
the results back to the main thread using g_idle_add() or #GAsyncQueue. GIO
|
||||
offers useful tools for such an approach such as #GTask.
|
||||
the results back to the main thread using `g_idle_add()` or `GAsyncQueue`. GIO
|
||||
offers useful tools for such an approach such as `GTask`.
|
||||
|
||||
7. How do I internationalize a GTK program?
|
||||
|
||||
@@ -239,7 +239,7 @@ the question you have, this list is a good place to start.
|
||||
|
||||
gdk_surface_set_events (gdk_surface,
|
||||
(GdkEventMask) GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
|
||||
|
||||
There are very few functions that require this cast, however.
|
||||
|
||||
10. How do I use GTK with other non-C languages?
|
||||
@@ -250,14 +250,14 @@ the question you have, this list is a good place to start.
|
||||
11. How do I load an image or animation from a file?
|
||||
|
||||
To load an image file straight into a display widget, use
|
||||
gtk_image_new_from_file(). To load an image for another purpose, use
|
||||
gdk_texture_new_from_file(). To load a video from a file, use
|
||||
gtk_media_file_new_for_file().
|
||||
[ctor@Gtk.Image.new_from_file]. To load an image for another purpose, use
|
||||
[ctor@Gdk.Texture.new_from_file]. To load a video from a file, use
|
||||
[ctor@Gtk.MediaFile.new_for_file].
|
||||
|
||||
12. How do I draw text?
|
||||
|
||||
To draw a piece of text onto a cairo surface, use a Pango layout and
|
||||
pango_cairo_show_layout().
|
||||
[func@PangoCairo.show_layout].
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, text);
|
||||
fontdesc = pango_font_description_from_string ("Luxi Mono 12");
|
||||
@@ -265,17 +265,17 @@ the question you have, this list is a good place to start.
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
pango_font_description_free (fontdesc);
|
||||
g_object_unref (layout);
|
||||
|
||||
|
||||
See also the [Cairo Rendering](https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html)
|
||||
section of the [Pango documentation](https://developer.gnome.org/pango/stable/).
|
||||
|
||||
To draw a piece of text in a widget snapshot() implementation, use
|
||||
gtk_snapshot_append_layout().
|
||||
To draw a piece of text in a widget [vfunc@Gtk.Widget.snapshot] implementation,
|
||||
use [method@Gtk.Snapshot.append_layout].
|
||||
|
||||
13. How do I measure the size of a piece of text?
|
||||
|
||||
To obtain the size of a piece of text, use a Pango layout and
|
||||
pango_layout_get_pixel_size(), using code like the following:
|
||||
[method@Pango.Layout.get_pixel_size], using code like the following:
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, text);
|
||||
fontdesc = pango_font_description_from_string ("Luxi Mono 12");
|
||||
@@ -294,7 +294,7 @@ the question you have, this list is a good place to start.
|
||||
compiler to optimize the call away if it appears that the value is not
|
||||
being used.
|
||||
|
||||
GLib provides the g_type_ensure() function to work around this problem.
|
||||
GLib provides the `g_type_ensure()` function to work around this problem.
|
||||
|
||||
g_type_ensure (GTK_TYPE_BLAH);
|
||||
|
||||
@@ -311,34 +311,34 @@ the question you have, this list is a good place to start.
|
||||
and the required formatting flexibility.
|
||||
|
||||
If you want to display a large amount of data in a uniform way, your best
|
||||
option is a #GtkTreeView widget. See the [tree widget overview](#TreeWidget).
|
||||
option is a [class@Gtk.TreeView] widget. See the [tree widget overview](#TreeWidget).
|
||||
A list is just a tree with no branches, so the treeview widget is used for
|
||||
lists as well.
|
||||
|
||||
If you want to display a small amount of items, but need flexible formatting
|
||||
and widgetry inside the list, then you probably want to use a #GtkListBox,
|
||||
and widgetry inside the list, then you probably want to use a [class@Gtk.ListBox],
|
||||
which uses regular widgets for display.
|
||||
|
||||
17. ...for multi-line text display or editing?
|
||||
|
||||
See the [text widget overview](#TextWidget) -- you should use the
|
||||
#GtkTextView widget.
|
||||
[class@Gtk.TextView] widget.
|
||||
|
||||
If you only have a small amount of text, #GtkLabel may also be appropriate
|
||||
of course. It can be made selectable with gtk_label_set_selectable(). For a
|
||||
single-line text entry, see #GtkEntry.
|
||||
If you only have a small amount of text, [class@Gtk.Label] may also be appropriate
|
||||
of course. It can be made selectable with [method@Gtk.Label.set_selectable]. For a
|
||||
single-line text entry, see [class@Gtk.Entry].
|
||||
|
||||
18. ...to display an image or animation?
|
||||
|
||||
GTK has two widgets that are dedicated to displaying images. #GtkImage, for
|
||||
small, fixed-size icons and #GtkPicture for content images.
|
||||
GTK has two widgets that are dedicated to displaying images. [class@Gtk.Image], for
|
||||
small, fixed-size icons and [class@Gtk.Picture] for content images.
|
||||
|
||||
Both can display images in just about any format GTK understands.
|
||||
You can also use #GtkDrawingArea if you need to do something more complex,
|
||||
You can also use [class@Gtk.DrawingArea] if you need to do something more complex,
|
||||
such as draw text or graphics over the top of the image.
|
||||
|
||||
Both GtkImage and GtkPicture can display animations and videos as well.
|
||||
To show an webm file, load it with the GtkMediaFile API and then use
|
||||
Both [class@Gtk.Image] and [class@Gtk.Picture] can display animations and videos as well.
|
||||
To show an webm file, load it with the [class@Gtk.MediaFile] API and then use
|
||||
it as a paintable:
|
||||
|
||||
mediafile = gtk_media_file_new_for_filename ("example.webm");
|
||||
@@ -347,8 +347,10 @@ the question you have, this list is a good place to start.
|
||||
19. ...for presenting a set of mutually-exclusive choices, where Windows
|
||||
would use a combo box?
|
||||
|
||||
With GTK, a #GtkComboBox is the recommended widget to use for this use case.
|
||||
If you need an editable text entry, use the #GtkComboBox:has-entry property.
|
||||
With GTK, a [class@Gtk.ComboBox] is the recommended widget to use for this use case.
|
||||
If you need an editable text entry, use the [property@Gtk.ComboBox:has-entry] property.
|
||||
|
||||
A newer alternative is [class@Gtk.DropDown].
|
||||
|
||||
## Questions about GtkWidget
|
||||
|
||||
@@ -357,8 +359,8 @@ the question you have, this list is a good place to start.
|
||||
The background color of a widget is determined by the CSS style that applies
|
||||
to it. To change that, you can set style classes on the widget, and provide
|
||||
custom CSS to change the appearance. Such CSS can be loaded with
|
||||
gtk_css_provider_load_from_file() and its variants.
|
||||
See gtk_style_context_add_provider().
|
||||
[method@Gtk.CssProvider.load_from_file] and its variants.
|
||||
See [method@Gtk.StyleContext.add_provider].
|
||||
|
||||
21. How do I change the font of a widget?
|
||||
|
||||
@@ -368,7 +370,7 @@ the question you have, this list is a good place to start.
|
||||
gtk_label_set_markup (label, "<big>big tex</big>");
|
||||
|
||||
This is preferred for many apps because it's a relative size to the
|
||||
user's chosen font size. See g_markup_escape_text() if you are
|
||||
user's chosen font size. See `g_markup_escape_text()` if you are
|
||||
constructing such strings on the fly.
|
||||
|
||||
You can also change the font of a widget by putting
|
||||
@@ -377,24 +379,24 @@ the question you have, this list is a good place to start.
|
||||
font: Sans 30;
|
||||
}
|
||||
|
||||
in a CSS file, loading it with gtk_css_provider_load_from_file(), and
|
||||
adding the provider with gtk_style_context_add_provider_for_display().
|
||||
in a CSS file, loading it with [method@Gtk.CssProvider.load_from_file], and
|
||||
adding the provider with [func@Gtk.StyleContext.add_provider_for_display].
|
||||
To associate this style information with your widget, set a style class
|
||||
on its #GtkStyleContext using gtk_style_context_add_class(). The advantage
|
||||
on the widget using [method@Gtk.Widget.add_css_class]. The advantage
|
||||
of this approach is that users can then override the font you have chosen.
|
||||
See the #GtkStyleContext documentation for more discussion.
|
||||
See the `GtkStyleContext` documentation for more discussion.
|
||||
|
||||
22. How do I disable/ghost/desensitize a widget?
|
||||
|
||||
In GTK a disabled widget is termed _insensitive_.
|
||||
See gtk_widget_set_sensitive().
|
||||
See [method@Gtk.Widget.set_sensitive].
|
||||
|
||||
## GtkTextView questions
|
||||
|
||||
23. How do I get the contents of the entire text widget as a string?
|
||||
|
||||
See gtk_text_buffer_get_bounds() and gtk_text_buffer_get_text()
|
||||
or gtk_text_iter_get_text().
|
||||
See [method@Gtk.TextBuffer.get_bounds] and [method@Gtk.TextBuffer.get_text]
|
||||
or [method@Gtk.TextIter.get_text].
|
||||
|
||||
GtkTextIter start, end;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -405,10 +407,10 @@ the question you have, this list is a good place to start.
|
||||
text = gtk_text_iter_get_text (&start, &end);
|
||||
/* use text */
|
||||
g_free (text);
|
||||
|
||||
|
||||
24. How do I make a text widget display its complete contents in a specific font?
|
||||
|
||||
If you use gtk_text_buffer_insert_with_tags() with appropriate tags to
|
||||
If you use [method@Gtk.TextBuffer.insert_with_tags] with appropriate tags to
|
||||
select the font, the inserted text will have the desired appearance, but
|
||||
text typed in by the user before or after the tagged block will appear in
|
||||
the default style.
|
||||
@@ -421,40 +423,40 @@ the question you have, this list is a good place to start.
|
||||
*before*, keeping the mark at the end.
|
||||
|
||||
To ensure that the end of the buffer remains visible, use
|
||||
gtk_text_view_scroll_to_mark() to scroll to the mark after
|
||||
[method@Gtk.TextView.scroll_to_mark] to scroll to the mark after
|
||||
inserting new text.
|
||||
|
||||
The gtk-demo application contains an example of this technique.
|
||||
The gtk4-demo application contains an example of this technique.
|
||||
|
||||
## GtkTreeView questions
|
||||
|
||||
26. How do I associate some data with a row in the tree?
|
||||
|
||||
Remember that the #GtkTreeModel columns don't necessarily have to be
|
||||
Remember that the [class@Gtk.TreeModel] columns don't necessarily have to be
|
||||
displayed. So you can put non-user-visible data in your model just
|
||||
like any other data, and retrieve it with gtk_tree_model_get().
|
||||
See the [tree widget overview](#TreeWidget).
|
||||
like any other data, and retrieve it with [method@Gtk.TreeModel.get].
|
||||
See the [tree widget overview](#TreeWidget).
|
||||
|
||||
27. How do I put an image and some text in the same column?
|
||||
|
||||
You can pack more than one #GtkCellRenderer into a single #GtkTreeViewColumn
|
||||
using gtk_tree_view_column_pack_start() or gtk_tree_view_column_pack_end().
|
||||
So pack both a #GtkCellRendererPixbuf and a #GtkCellRendererText into the
|
||||
You can pack more than one [class@Gtk.CellRenderer] into a single [class@Gtk.TreeViewColumn]
|
||||
using [method@Gtk.TreeViewColumn.pack_start] or [method@Gtk.TreeViewColumn.pack_end].
|
||||
So pack both a [class@Gtk.CellRendererPixbuf] and a [class@Gtk.CellRendererText] into the
|
||||
column.
|
||||
|
||||
28. I can set data easily on my #GtkTreeStore or #GtkListStore models using
|
||||
gtk_list_store_set() and gtk_tree_store_set(), but can't read it back?
|
||||
28. I can set data easily on my [class@Gtk.TreeStore] or [class@Gtk.ListStore] models using
|
||||
[method@Gtk.ListStore.set] and [method@Gtk.TreeStore.set], but can't read it back?
|
||||
|
||||
Both the #GtkTreeStore and the #GtkListStore implement the #GtkTreeModel
|
||||
Both the [class@Gtk.TreeStore] and the [class@Gtk.ListStore] implement the [class@Gtk.TreeModel]
|
||||
interface. As a consequence, you can use any function this interface
|
||||
implements. The easiest way to read a set of data back is to use
|
||||
gtk_tree_model_get().
|
||||
[method@Gtk.TreeModel.get].
|
||||
|
||||
29. How do I change the way that numbers are formatted by #GtkTreeView?
|
||||
29. How do I change the way that numbers are formatted by `GtkTreeView`?
|
||||
|
||||
Use gtk_tree_view_insert_column_with_data_func() or
|
||||
gtk_tree_view_column_set_cell_data_func() and do the conversion
|
||||
from number to string yourself (with, say, g_strdup_printf()).
|
||||
Use [method@Gtk.TreeView.insert_column_with_data_func] or
|
||||
[method@Gtk.TreeViewColumn.set_cell_data_func] and do the conversion
|
||||
from number to string yourself (with, say, `g_strdup_printf()`).
|
||||
|
||||
The following example demonstrates this:
|
||||
|
||||
@@ -527,29 +529,29 @@ the question you have, this list is a good place to start.
|
||||
30. How do I hide the expander arrows in my tree view?
|
||||
|
||||
Set the expander-column property of the tree view to a hidden column.
|
||||
See gtk_tree_view_set_expander_column() and gtk_tree_view_column_set_visible().
|
||||
See [method@Gtk.TreeView.set_expander_column] and [method@Gtk.TreeViewColumn.set_visible].
|
||||
|
||||
## Using cairo with GTK
|
||||
|
||||
31. How do I use cairo to draw in GTK applications?
|
||||
|
||||
Use gtk_snapshot_append_cairo() in your #GtkWidgetClass.snapshot() vfunc
|
||||
Use [method@Gtk.Snapshot.append_cairo] in your [vfunc@Gtk.Widget.snapshot] vfunc
|
||||
to obtain a cairo context and draw with that.
|
||||
|
||||
|
||||
32. Can I improve the performance of my application by using another backend
|
||||
of cairo (such as GL)?
|
||||
|
||||
No. Most drawing in GTK is not done via cairo anymore (but instead
|
||||
by the GL or Vulkan renderers of GSK).
|
||||
|
||||
If you use cairo for drawing your own widgets, gtk_snapshot_append_cairo()
|
||||
If you use cairo for drawing your own widgets, [method@Gtk.Snapshot.append_cairo]
|
||||
will choose the most appropriate surface type for you.
|
||||
|
||||
If you are interested in using GL for your own drawing, see #GtkGLArea.
|
||||
If you are interested in using GL for your own drawing, see [class@Gtk.GLArea].
|
||||
|
||||
33. Can I use cairo to draw on a #GdkPixbuf?
|
||||
33. Can I use cairo to draw on a `GdkPixbuf`?
|
||||
|
||||
No. The cairo image surface does not support the pixel format used by GdkPixbuf.
|
||||
No. The cairo image surface does not support the pixel format used by `GdkPixbuf`.
|
||||
|
||||
If you need to get cairo drawing into a format that can be displayed efficiently
|
||||
by GTK, you may want to use an image surface and gdk_memory_texture_new().
|
||||
by GTK, you may want to use an image surface and [ctor@Gdk.MemoryTexture.new].
|
||||
|
||||
@@ -22,20 +22,26 @@ are only available when GTK has been configured with `-Ddebug=true`.
|
||||
`builder`
|
||||
: GtkBuilder support
|
||||
|
||||
`builder-objects`
|
||||
: Unused GtkBuilder objects
|
||||
|
||||
`geometry`
|
||||
: Size allocation
|
||||
|
||||
`icontheme`
|
||||
: Icon themes
|
||||
|
||||
`iconfallback`
|
||||
: Information about icon fallback
|
||||
|
||||
`keybindings`
|
||||
: Keybindings
|
||||
: Keyboard shortcuts
|
||||
|
||||
`modules`
|
||||
: Loading of modules
|
||||
: Modules and extensions
|
||||
|
||||
`printing`
|
||||
: Printing support
|
||||
: Printing
|
||||
|
||||
`size-request`
|
||||
: Size requests
|
||||
@@ -46,6 +52,15 @@ are only available when GTK has been configured with `-Ddebug=true`.
|
||||
`tree`
|
||||
: Tree widget internals
|
||||
|
||||
`constraints`
|
||||
: Constraints and the constraint solver
|
||||
|
||||
`layout`
|
||||
: Layout managers
|
||||
|
||||
`acccessibility`
|
||||
: Accessibility state changs
|
||||
|
||||
A number of keys are influencing behavior instead of just logging:
|
||||
|
||||
`interactive`
|
||||
@@ -57,15 +72,6 @@ A number of keys are influencing behavior instead of just logging:
|
||||
`touchscreen`
|
||||
: Pretend the pointer is a touchscreen device
|
||||
|
||||
`updates`
|
||||
: Visual feedback about window updates
|
||||
|
||||
`resize`
|
||||
: Highlight resizing widgets
|
||||
|
||||
`layout`
|
||||
: Show layout borders
|
||||
|
||||
`snapshot`
|
||||
: Include debug render nodes in the generated snapshots
|
||||
|
||||
@@ -324,9 +330,15 @@ using and the GDK backend supports them:
|
||||
`cairo`
|
||||
: Selects the fallback Cairo renderer
|
||||
|
||||
`gl`
|
||||
`opengl`
|
||||
: Selects the default OpenGL renderer
|
||||
|
||||
`gl`
|
||||
: Selects the "gl" OpenGL renderer
|
||||
|
||||
`ngl`
|
||||
: Selects the "ngl" OpenGL renderer
|
||||
|
||||
`vulkan`
|
||||
: Selects the Vulkan renderer
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ an application's user interface elements. Assistive technology (AT)
|
||||
applications, like Orca, convey this information to users with disabilities,
|
||||
or reduced abilities, to help them use the application.
|
||||
|
||||
Standard GTK controls implement the #GtkAccessible interface and are thus
|
||||
Standard GTK controls implement the `GtkAccessible` interface and are thus
|
||||
accessible to ATs by default. This means that if you use GTK controls such
|
||||
as `GtkButton`, `GtkEntry`, or `GtkListView`, you only need to supply
|
||||
application-specific details when the defaults values are incomplete. You
|
||||
@@ -103,39 +103,39 @@ for instance:
|
||||
|
||||
- a toggle button will change its %GTK_ACCESSIBLE_STATE_CHECKED state every
|
||||
time it is toggled, either by the user or programmatically
|
||||
- setting the mnemonic widget on a #GtkLabel will update the
|
||||
- setting the mnemonic widget on a `GtkLabel` will update the
|
||||
%GTK_ACCESSIBLE_RELATION_LABELLED_BY relation on the widget with a
|
||||
reference to the label
|
||||
- changing the #GtkAdjustment instance on a #GtkScrollbar will change the
|
||||
- changing the `GtkAdjustment` instance on a `GtkScrollbar` will change the
|
||||
%GTK_ACCESSIBLE_PROPERTY_VALUE_MAX, %GTK_ACCESSIBLE_PROPERTY_VALUE_MIN,
|
||||
and %GTK_ACCESSIBLE_PROPERTY_VALUE_NOW properties with the upper, lower,
|
||||
and value properties of the #GtkAdjustment
|
||||
and value properties of the `GtkAdjustment`
|
||||
|
||||
See the [WAI-ARIA](https://www.w3.org/WAI/PF/aria/appendices#quickref) list
|
||||
of attributes for additional information.
|
||||
|
||||
#### List of accessible states
|
||||
|
||||
Each state name is part of the #GtkAccessibleState enumeration.
|
||||
Each state name is part of the `GtkAccessibleState` enumeration.
|
||||
|
||||
| State name | ARIA attribute | Value type | Notes |
|
||||
|------------|----------------|------------|-------|
|
||||
| %GTK_ACCESSIBLE_STATE_BUSY | “aria-busy” | boolean |
|
||||
| %GTK_ACCESSIBLE_STATE_CHECKED | “aria-checked” | #GtkAccessibleTristate | Indicates the current state of a [class@Gtk.CheckButton] |
|
||||
| %GTK_ACCESSIBLE_STATE_CHECKED | “aria-checked” | `GtkAccessibleTristate` | Indicates the current state of a [class@Gtk.CheckButton] |
|
||||
| %GTK_ACCESSIBLE_STATE_DISABLED | “aria-disabled” | boolean | Corresponds to the [property@Gtk.Widget:sensitive] property on [class@Gtk.Widget] |
|
||||
| %GTK_ACCESSIBLE_STATE_EXPANDED | “aria-expanded” | boolean or undefined | Corresponds to the [property@Gtk.Expander:expanded] property on [class@Gtk.Expander] |
|
||||
| %GTK_ACCESSIBLE_STATE_HIDDEN | “aria-hidden” | boolean | Corresponds to the [property@Gtk.Widget:visible] property on [class@Gtk.Widget] |
|
||||
| %GTK_ACCESSIBLE_STATE_INVALID | “aria-invalid” | #GtkAccessibleInvalidState | Set when a widget is showing an error |
|
||||
| %GTK_ACCESSIBLE_STATE_PRESSED | “aria-pressed” | #GtkAccessibleTristate | Indicates the current state of a [class@Gtk.ToggleButton] |
|
||||
| %GTK_ACCESSIBLE_STATE_INVALID | “aria-invalid” | `GtkAccessibleInvalidState` | Set when a widget is showing an error |
|
||||
| %GTK_ACCESSIBLE_STATE_PRESSED | “aria-pressed” | `GtkAccessibleTristate` | Indicates the current state of a [class@Gtk.ToggleButton] |
|
||||
| %GTK_ACCESSIBLE_STATE_SELECTED | “aria-selected” | boolean or undefined | Set when a widget is selected |
|
||||
|
||||
#### List of accessible properties
|
||||
|
||||
Each property name is part of the #GtkAccessibleProperty enumeration.
|
||||
Each property name is part of the `GtkAccessibleProperty` enumeration.
|
||||
|
||||
| State name | ARIA attribute | Value type |
|
||||
|------------|----------------|------------|
|
||||
| %GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE | “aria-autocomplete” | #GtkAccessibleAutocomplete |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE | “aria-autocomplete” | `GtkAccessibleAutocomplete` |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_DESCRIPTION | “aria-description” | translatable string |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_HAS_POPUP | “aria-haspopup” | boolean |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_KEY_SHORTCUTS | “aria-keyshortcuts” | string |
|
||||
@@ -144,12 +144,12 @@ Each property name is part of the #GtkAccessibleProperty enumeration.
|
||||
| %GTK_ACCESSIBLE_PROPERTY_MODAL | “aria-modal” | boolean |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_MULTI_LINE | “aria-multiline” | boolean |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE | “aria-multiselectable” | boolean |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_ORIENTATION | “aria-orientation” | #GtkOrientation |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_ORIENTATION | “aria-orientation” | `GtkOrientation` |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER | “aria-placeholder” | translatable string |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_READ_ONLY | “aria-readonly” | boolean |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_REQUIRED | “aria-required” | boolean |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_ROLE_DESCRIPTION | “aria-roledescription” | translatable string |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_SORT | “aria-sort” | #GtkAccessibleSort |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_SORT | “aria-sort” | `GtkAccessibleSort` |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_VALUE_MAX | “aria-valuemax” | double |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_VALUE_MIN | “aria-valuemin” | double |
|
||||
| %GTK_ACCESSIBLE_PROPERTY_VALUE_NOW | “aria-valuenow” | double |
|
||||
@@ -157,22 +157,22 @@ Each property name is part of the #GtkAccessibleProperty enumeration.
|
||||
|
||||
#### List of accessible relations
|
||||
|
||||
Each relation name is part of the #GtkAccessibleRelation enumeration.
|
||||
Each relation name is part of the `GtkAccessibleRelation` enumeration.
|
||||
|
||||
| State name | ARIA attribute | Value type |
|
||||
|------------|----------------|------------|
|
||||
| %GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT | “aria-activedescendant” | #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_ACTIVE_DESCENDANT | “aria-activedescendant” | `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_COUNT | “aria-colcount” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_INDEX | “aria-colindex” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT | “aria-colindextext” | translatable string |
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_SPAN | “aria-colspan” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_CONTROLS | “aria-controls” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_DESCRIBED_BY | “aria-describedby” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_DETAILS | “aria-details” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE | “aria-errormessage” | #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_FLOW_TO | “aria-flowto” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_LABELLED_BY | “aria-labelledby” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_OWNS | “aria-owns” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_CONTROLS | “aria-controls” | a list of `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_DESCRIBED_BY | “aria-describedby” | a list of `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_DETAILS | “aria-details” | a list of `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE | “aria-errormessage” | `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_FLOW_TO | “aria-flowto” | a list of `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_LABELLED_BY | “aria-labelledby” | a list of `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_OWNS | “aria-owns” | a list of `GtkAccessible` |
|
||||
| %GTK_ACCESSIBLE_RELATION_POS_IN_SET | “aria-posinset” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_ROW_COUNT | “aria-rowcount” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_ROW_INDEX | “aria-rowindex” | integer |
|
||||
@@ -219,11 +219,11 @@ be used as part of the application's test suite to avoid regressions.
|
||||
|
||||
## Implementations
|
||||
|
||||
Each UI control implements the #GtkAccessible interface to allow widget and
|
||||
Each UI control implements the `GtkAccessible` interface to allow widget and
|
||||
application developers to specify the roles, state, and relations between UI
|
||||
controls. This API is purely descriptive.
|
||||
|
||||
Each `GtkAccessible` implementation must provide a #GtkATContext instance,
|
||||
Each `GtkAccessible` implementation must provide a `GtkATContext` instance,
|
||||
which acts as a proxy to the specific platform's accessibility API:
|
||||
|
||||
* AT-SPI on Linux/BSD
|
||||
@@ -256,7 +256,7 @@ is a promise that the widget being created will provide the same keyboard
|
||||
interactions expected for a button. An accessible role of a button will not
|
||||
turn automatically any widget into a `GtkButton`; but if your widget behaves
|
||||
like a button, using the %GTK_ACCESSIBLE_ROLE_BUTTON will allow any
|
||||
assistive technology to handle it like they would a #GtkButton.
|
||||
assistive technology to handle it like they would a `GtkButton`.
|
||||
|
||||
### Attributes can both hide and enhance
|
||||
|
||||
@@ -308,7 +308,7 @@ interface.
|
||||
|
||||
A "presentation" role should not be confused with the
|
||||
%GTK_ACCESSIBLE_STATE_HIDDEN state; the "hidden" state is transient, and is
|
||||
typically controlled by showing and hiding a widget using the #GtkWidget
|
||||
typically controlled by showing and hiding a widget using the `GtkWidget`
|
||||
API.
|
||||
|
||||
## Design patterns and custom widgets
|
||||
@@ -322,7 +322,7 @@ as well.
|
||||
A button is a widget that enables users to trigger an action. While it is
|
||||
recommended you use `GtkButton` for anything that looks and behaves like a
|
||||
button, it is possible to apply a button behavior to UI elements like images
|
||||
by using a #GtkGestureClick gesture. When doing so, you should:
|
||||
by using a `GtkGestureClick` gesture. When doing so, you should:
|
||||
|
||||
- Give your widget the role %GTK_ACCESSIBLE_ROLE_BUTTON
|
||||
- Install an action with no parameters, which will activate the widget
|
||||
@@ -336,7 +336,7 @@ in the same way as a `GtkSpinButton` or `GtkSearchEntry`.
|
||||
|
||||
### Tab-based UI
|
||||
|
||||
If you make a tab-based interface, you should consider using #GtkStack
|
||||
If you make a tab-based interface, you should consider using `GtkStack`
|
||||
as the core, and just make a custom tab widget to control the active
|
||||
stack page. When doing so, the following extra steps will ensure that
|
||||
your tabs are accessible in the same way as `GtkStackSwitcher` or `GtkNotebook`:
|
||||
@@ -344,7 +344,7 @@ your tabs are accessible in the same way as `GtkStackSwitcher` or `GtkNotebook`:
|
||||
- Give your tab container the role %GTK_ACCESSIBLE_ROLE_TAB_LIST
|
||||
- Give your tab widgets the role %GTK_ACCESSIBLE_ROLE_TAB
|
||||
- Set up the %GTK_ACCESSIBLE_RELATION_CONTROLS relation between each
|
||||
tab and the #GtkStackPage object for its page
|
||||
tab and the `GtkStackPage` object for its page
|
||||
- Set the %GTK_ACCESSIBLE_PROPERTY_SELECTED property on each tab, with
|
||||
the active tab getting the value %TRUE, all others %FALSE
|
||||
|
||||
@@ -357,7 +357,7 @@ or add a `activate-tab` action on each tab.
|
||||
### Value controls
|
||||
|
||||
A value control (ie a widget that controls a one-dimensional quantity
|
||||
that can be represented by a #GtkAdjustment) can be represented to
|
||||
that can be represented by a `GtkAdjustment`) can be represented to
|
||||
accessible technologies by setting the %GTK_ACCESSIBLE_PROPERTY_VALUE_MIN,
|
||||
%GTK_ACCESSIBLE_PROPERTY_VALUE_MAX, and %GTK_ACCESSIBLE_PROPERTY_VALUE_NOW
|
||||
properties.
|
||||
|
||||
@@ -24,25 +24,25 @@ you should be aware of what they refer to. These are often generic terms that
|
||||
have a specific meaning in this context.
|
||||
|
||||
**_Views_** or **_list widgets_** are the widgets that hold and manage the lists.
|
||||
Examples of these widgets would be #GtkListView or #GtkGridView.
|
||||
Examples of these widgets would be `GtkListView` or `GtkGridView`.
|
||||
|
||||
Views display data from a **_model_**. A model is a #GListModel and models can
|
||||
Views display data from a **_model_**. A model is a `GListModel` and models can
|
||||
be provided in 3 ways or combinations thereof:
|
||||
|
||||
* Many list models implementations already exist. There are models that provide
|
||||
specific data, like #GtkDirectoryList. And there are models like #GListStore
|
||||
specific data, like `GtkDirectoryList`. And there are models like `GListStore`
|
||||
that allow building lists manually.
|
||||
|
||||
* Wrapping list models like #GtkFilterListModel or #GtkSortListModel
|
||||
* Wrapping list models like `GtkFilterListModel` or `GtkSortListModel`
|
||||
modify, adapt or combine other models.
|
||||
|
||||
* Last but not least, developers are encouraged to create their own #GListModel
|
||||
* Last but not least, developers are encouraged to create their own `GListModel`
|
||||
implementations. The interface is kept deliberately small to make this easy.
|
||||
|
||||
The same model can be used in multiple different views and wrapped with
|
||||
multiple different models at once.
|
||||
|
||||
The elements in a model are called **_items_**. All items are #GObjects.
|
||||
The elements in a model are called **_items_**. All items are `GObjects`.
|
||||
|
||||
Every item in a model has a **_position_** which is the unsigned integer that
|
||||
describes where in the model the item is located. The first item in a model is
|
||||
@@ -56,11 +56,11 @@ with models. Oftentimes some things are really hard to do one way but very easy
|
||||
the other way.
|
||||
|
||||
The other important part of a view is a **_factory_**. Each factory is
|
||||
a #GtkListItemFactory implementation that takes care of mapping the items
|
||||
a `GtkListItemFactory` implementation that takes care of mapping the items
|
||||
of the model to widgets that can be shown in the view.
|
||||
|
||||
The way factories do this is by creating a **_listitem_** for each item that
|
||||
is currently in use. Listitems are always #GtkListItem objects. They are only
|
||||
is currently in use. Listitems are always `GtkListItem` objects. They are only
|
||||
ever created by GTK and provide information about what item they are meant
|
||||
to display.
|
||||
|
||||
@@ -71,28 +71,28 @@ for the data displayed, the programming language and development environment
|
||||
is an important task that can simplify setting up the view tremendously.
|
||||
|
||||
Views support selections via a **_selection model_**. A selection model is an
|
||||
implementation of the #GtkSelectionModel interface on top of the #GListModel
|
||||
implementation of the `GtkSelectionModel` interface on top of the `GListModel`
|
||||
interface that allows marking each item in a model as either selected or not
|
||||
selected. Just like regular models, this can be implemented either by
|
||||
implementing #GtkSelectionModel directly or by wrapping a model with one of
|
||||
the GTK models provided for this purposes, such as #GtkNoSelection
|
||||
or #GtkSingleSelection.
|
||||
implementing `GtkSelectionModel` directly or by wrapping a model with one of
|
||||
the GTK models provided for this purposes, such as `GtkNoSelection`
|
||||
or `GtkSingleSelection`.
|
||||
|
||||
The behavior of selection models - ie which items they allow selecting and
|
||||
what effect this has on other items - is completely up to the selection model.
|
||||
As such, single-selections, multi-selections or sharing selection state between
|
||||
different selection models and/or views is possible. The selection state of an
|
||||
item is exposed in the listitem via the #GtkListItem:selected property.
|
||||
item is exposed in the listitem via the `GtkListItem:selected` property.
|
||||
|
||||
Views and listitems also support activation. Activation means that double
|
||||
clicking or pressing enter while inside a focused row will cause the view
|
||||
to emit and activation signal such as #GtkListView::activate. This provides
|
||||
to emit and activation signal such as `GtkListView::activate`. This provides
|
||||
an easy way to set up lists, but can also be turned off on listitems if undesired.
|
||||
|
||||
Both selections and activation are supported among other things via widget
|
||||
[actions](#actions-overview). This allows developers to add widgets to their
|
||||
lists that cause selections to change or to trigger activation via
|
||||
the #GtkActionable interface. For a list of all supported actions see the
|
||||
the `GtkActionable` interface. For a list of all supported actions see the
|
||||
relevant documentation.
|
||||
|
||||
## Behind the scenes
|
||||
@@ -114,8 +114,8 @@ new position at any time causing any state to be lost.
|
||||
|
||||
Another important requirement for views is that they need to know which items
|
||||
are not visible so they can be recycled. Views achieve that by implementing
|
||||
the #GtkScrollable interface and expecting to be placed directly into
|
||||
a #GtkScrolledWindow.
|
||||
the `GtkScrollable` interface and expecting to be placed directly into
|
||||
a `GtkScrolledWindow`.
|
||||
|
||||
Of course, if you are only using models with few items, this is not important
|
||||
and you can treat views like any other widget. But if you use large lists and
|
||||
@@ -128,8 +128,8 @@ tradeoffs of those and experiment with them.
|
||||
|
||||
GTK offers a wide variety of wrapping models which change or supplement an
|
||||
existing model (or models) in some way. But when it comes to storing your
|
||||
actual data, there are only a few ready-made choices available: #GListStore
|
||||
and #GtkStringList.
|
||||
actual data, there are only a few ready-made choices available: `GListStore`
|
||||
and `GtkStringList`.
|
||||
|
||||
GListStore is backed by a balanced tree and has performance characteristics
|
||||
that are expected for that data structure. It works reasonably well for dataset
|
||||
@@ -143,7 +143,7 @@ place where you would otherwise use `char*[]` and works best if the dataset
|
||||
is not very dynamic.
|
||||
|
||||
If these models don't fit your use case or scalability requirements, you
|
||||
should make a custom #GListModel. It is a small interface and not very hard
|
||||
should make a custom `GListModel`. It is a small interface and not very hard
|
||||
to implement.
|
||||
|
||||
For asymptotic performance comparisons between tree- and array-based
|
||||
@@ -152,23 +152,23 @@ implementations, see this
|
||||
|
||||
## Displaying trees
|
||||
|
||||
While #GtkTreeView provided built-in support for trees, the list widgets, and
|
||||
in particular #GListModel do not. This was a design choice because the common
|
||||
While `GtkTreeView` provided built-in support for trees, the list widgets, and
|
||||
in particular `GListModel` do not. This was a design choice because the common
|
||||
use case is displaying lists and not trees and it greatly simplifies the API
|
||||
interface provided.
|
||||
|
||||
However, GTK provides functionality to make trees look and behave like lists
|
||||
for the people who still want to display lists. This is achieved by using
|
||||
the #GtkTreeListModel model to flatten a tree into a list. The #GtkTreeExpander
|
||||
the `GtkTreeListModel` model to flatten a tree into a list. The `GtkTreeExpander`
|
||||
widget can then be used inside a listitem to allow users to expand and collapse
|
||||
rows and provide a similar experience to #GtkTreeView.
|
||||
rows and provide a similar experience to `GtkTreeView`.
|
||||
|
||||
Developers should refer to those objects' API reference for more discussion
|
||||
on the topic.
|
||||
|
||||
## List styles
|
||||
|
||||
One of the advantages of the new list widgets over #GtkTreeViews and cell
|
||||
One of the advantages of the new list widgets over `GtkTreeViews` and cell
|
||||
renderers is that they are fully themable using GTK CSS. This provides a
|
||||
lot of flexibility. The themes that ship with GTK provide a few predefined
|
||||
list styles that can be used in many situations:
|
||||
@@ -192,7 +192,7 @@ style class.
|
||||
|
||||
## Comparison to GtkTreeView
|
||||
|
||||
Developers familiar with #GtkTreeView may wonder how this way of doing lists
|
||||
Developers familiar with `GtkTreeView` may wonder how this way of doing lists
|
||||
compares to the way they know. This section will try to outline the similarities
|
||||
and differences between the two.
|
||||
|
||||
@@ -200,26 +200,26 @@ This new approach tries to provide roughly the same functionality as the old
|
||||
approach but often uses a very different approach to achieve these goals.
|
||||
|
||||
The main difference and one of the primary reasons for this new development is
|
||||
that items can be displayed using regular widgets and #GtkCellRenderer is no
|
||||
that items can be displayed using regular widgets and `GtkCellRenderer` is no
|
||||
longer necessary. This allows all benefits that widgets provide, such as complex
|
||||
layout and animating widgets and not only makes cell renderers obsolete, but
|
||||
also #GtkCellArea.
|
||||
also `GtkCellArea`.
|
||||
|
||||
The other big difference is the massive change to the data model. #GtkTreeModel
|
||||
was a rather complex interface for a tree data structure and #GListModel was
|
||||
The other big difference is the massive change to the data model. `GtkTreeModel`
|
||||
was a rather complex interface for a tree data structure and `GListModel` was
|
||||
deliberately designed to be a simple data structure for lists only. (See
|
||||
[above](#displaying-trees)) for how to still do trees with this new model.)
|
||||
Another big change is that the new model allows for bulk changes via
|
||||
the #GListModel:items-changed signal while #GtkTreeModel only allows a single
|
||||
the `GListModel:items-changed` signal while `GtkTreeModel` only allows a single
|
||||
item to change at once. The goal here is of course to encourage implementation
|
||||
of custom list models.
|
||||
|
||||
Another consequence of the new model is that it is now easily possible to
|
||||
refer to the contents of a row in the model directly by keeping the item,
|
||||
while #GtkTreeRowReference was a very slow mechanism to achieve the same.
|
||||
while `GtkTreeRowReference` was a very slow mechanism to achieve the same.
|
||||
And because the items are real objects, developers can make them emit change
|
||||
signals causing listitems and their children to update, which wasn't possible
|
||||
with #GtkTreeModel.
|
||||
with `GtkTreeModel`.
|
||||
|
||||
The selection handling is also different. While selections used to be managed
|
||||
via custom code in each widget, selection state is now meant to be managed by
|
||||
@@ -229,24 +229,24 @@ specialized requirements.
|
||||
Finally here's a quick list of equivalent functionality to look for when
|
||||
transitioning code for easy lookup:
|
||||
|
||||
| Old | New |
|
||||
| ------------------- | ----------------------------------- |
|
||||
| #GtkTreeModel | #GListModel |
|
||||
| #GtkTreePath | #guint position, #GtkTreeListRow |
|
||||
| #GtkTreeIter | #guint position |
|
||||
| #GtkTreeRowReference | #GObject item |
|
||||
| #GtkListStore | #GListStore |
|
||||
| #GtkTreeStore | #GtkTreeListModel, #GtkTreeExpander |
|
||||
| #GtkTreeSelection | #GtkSelectionModel |
|
||||
| #GtkTreeViewColumn | #GtkColumnView |
|
||||
| #GtkTreeView | #GtkListView, #GtkColumnView |
|
||||
| #GtkCellView | #GtkListItemWidget |
|
||||
| #GtkComboBox | #GtkDropDown |
|
||||
| #GtkIconView | #GtkGridView |
|
||||
| #GtkTreeSortable | #GtkColumnView |
|
||||
| #GtkTreeModelSort | #GtkSortListModel |
|
||||
| #GtkTreeModelFilter | #GtkFilterListModel |
|
||||
| #GtkCellLayout | #GtkListItemFactory |
|
||||
| #GtkCellArea | #GtkWidget |
|
||||
| #GtkCellRenderer | #GtkWidget |
|
||||
| Old | New |
|
||||
| -------------------- | ------------------------------------ |
|
||||
| `GtkTreeModel` | `GListModel` |
|
||||
| `GtkTreePath` | `guint` position, `GtkTreeListRow` |
|
||||
| `GtkTreeIter` | `guint` position |
|
||||
| `GtkTreeRowReference`| `GObject` item |
|
||||
| `GtkListStore` | `GListStore` |
|
||||
| `GtkTreeStore` | `GtkTreeListModel`, `GtkTreeExpander`|
|
||||
| `GtkTreeSelection` | `GtkSelectionModel` |
|
||||
| `GtkTreeViewColumn` | `GtkColumnView` |
|
||||
| `GtkTreeView` | `GtkListView`, `GtkColumnView` |
|
||||
| `GtkCellView` | `GtkListItemWidget` |
|
||||
| `GtkComboBox` | `GtkDropDown` |
|
||||
| `GtkIconView` | `GtkGridView` |
|
||||
| `GtkTreeSortable` | `GtkColumnView` |
|
||||
| `GtkTreeModelSort` | `GtkSortListModel` |
|
||||
| `GtkTreeModelFilter` | `GtkFilterListModel` |
|
||||
| `GtkCellLayout` | `GtkListItemFactory` |
|
||||
| `GtkCellArea` | `GtkWidget` |
|
||||
| `GtkCellRenderer` | `GtkWidget` |
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@ Title: Text Widget Overview
|
||||
Slug: gtk-textview
|
||||
|
||||
GTK has an extremely powerful framework for multiline text editing. The
|
||||
primary objects involved in the process are #GtkTextBuffer, which represents the
|
||||
text being edited, and #GtkTextView, a widget which can display a #GtkTextBuffer.
|
||||
primary objects involved in the process are `GtkTextBuffer`, which represents the
|
||||
text being edited, and `GtkTextView`, a widget which can display a `GtkTextBuffer`.
|
||||
Each buffer can be displayed by any number of views.
|
||||
|
||||
One of the important things to remember about text in GTK is that it's in
|
||||
the UTF-8 encoding. This means that one character can be encoded as multiple
|
||||
bytes. Character counts are usually referred to as _offsets_, while byte
|
||||
counts are called _indexes_. If you confuse these two, things will work fine
|
||||
with ASCII, but as soon as your buffer contains multibyte characters, bad
|
||||
with ASCII, but as soon as your buffer contains multibyte characters, bad
|
||||
things will happen.
|
||||
|
||||
Text in a buffer can be marked with _tags_. A tag is an attribute that can
|
||||
@@ -19,10 +19,10 @@ and make the text inside the tag bold. However, the tag concept is more
|
||||
general than that; tags don't have to affect appearance. They can instead
|
||||
affect the behavior of mouse and key presses, "lock" a range of text so the
|
||||
user can't edit it, or countless other things. A tag is represented by a
|
||||
#GtkTextTag object. One #GtkTextTag can be applied to any number of text
|
||||
`GtkTextTag` object. One `GtkTextTag` can be applied to any number of text
|
||||
ranges in any number of buffers.
|
||||
|
||||
Each tag is stored in a #GtkTextTagTable. A tag table defines a set of
|
||||
Each tag is stored in a `GtkTextTagTable`. A tag table defines a set of
|
||||
tags that can be used together. Each buffer has one tag table associated with
|
||||
it; only tags from that tag table can be used with the buffer. A single tag
|
||||
table can be shared between multiple buffers, however.
|
||||
@@ -32,36 +32,36 @@ your tag that makes things bold "bold"), but they can also be anonymous (which
|
||||
is convenient if you're creating tags on-the-fly).
|
||||
|
||||
Most text manipulation is accomplished with _iterators_, represented by a
|
||||
#GtkTextIter. An iterator represents a position between two characters in
|
||||
the text buffer. #GtkTextIter is a struct designed to be allocated on the
|
||||
`GtkTextIter`. An iterator represents a position between two characters in
|
||||
the text buffer. `GtkTextIter` is a struct designed to be allocated on the
|
||||
stack; it's guaranteed to be copiable by value and never contain any
|
||||
heap-allocated data. Iterators are not valid indefinitely; whenever the
|
||||
buffer is modified in a way that affects the number of characters in the
|
||||
buffer, all outstanding iterators become invalid. (Note that deleting 5
|
||||
characters and then reinserting 5 still invalidates iterators, though you
|
||||
end up with the same number of characters you pass through a state with a
|
||||
characters and then reinserting 5 still invalidates iterators, though you
|
||||
end up with the same number of characters you pass through a state with a
|
||||
different number).
|
||||
|
||||
Because of this, iterators can't be used to preserve positions across buffer
|
||||
modifications. To preserve a position, the #GtkTextMark object is ideal. You
|
||||
can think of a mark as an invisible cursor or insertion point; it floats in
|
||||
the buffer, saving a position. If the text surrounding the mark is deleted,
|
||||
the mark remains in the position the text once occupied; if text is inserted
|
||||
at the mark, the mark ends up either to the left or to the right of the new
|
||||
modifications. To preserve a position, the `GtkTextMark` object is ideal. You
|
||||
can think of a mark as an invisible cursor or insertion point; it floats in
|
||||
the buffer, saving a position. If the text surrounding the mark is deleted,
|
||||
the mark remains in the position the text once occupied; if text is inserted
|
||||
at the mark, the mark ends up either to the left or to the right of the new
|
||||
text, depending on its _gravity_. The standard text cursor in left-to-right
|
||||
languages is a mark with right gravity, because it stays to the right of
|
||||
inserted text.
|
||||
|
||||
Like tags, marks can be either named or anonymous. There are two marks
|
||||
built-in to #GtkTextBuffer; these are named "insert" and "selection_bound"
|
||||
built-in to `GtkTextBuffer`; these are named "insert" and "selection_bound"
|
||||
and refer to the insertion point and the boundary of the selection which
|
||||
is not the insertion point, respectively. If no text is selected, these
|
||||
two marks will be in the same position. You can manipulate what is selected
|
||||
and where the cursor appears by moving these marks around.
|
||||
|
||||
If you want to place the cursor in response to a user action, be sure to use
|
||||
gtk_text_buffer_place_cursor(), which moves both at once without causing a
|
||||
temporary selection (moving one then the other temporarily selects the range in
|
||||
gtk_text_buffer_place_cursor(), which moves both at once without causing a
|
||||
temporary selection (moving one then the other temporarily selects the range in
|
||||
between the old and new positions).
|
||||
|
||||
Text buffers always contain at least one line, but may be empty (that
|
||||
@@ -69,7 +69,7 @@ is, buffers can contain zero characters). The last line in the text
|
||||
buffer never ends in a line separator (such as newline); the other
|
||||
lines in the buffer always end in a line separator. Line separators
|
||||
count as characters when computing character counts and character
|
||||
offsets. Note that some Unicode line separators are represented with
|
||||
offsets. Note that some Unicode line separators are represented with
|
||||
multiple bytes in UTF-8, and the two-character sequence "\r\n" is also
|
||||
considered a line separator.
|
||||
|
||||
@@ -83,7 +83,7 @@ gtk_text_buffer_end_irreversible_action().
|
||||
|
||||
## Simple Example
|
||||
|
||||
The simplest usage of #GtkTextView might look like this:
|
||||
The simplest usage of `GtkTextView` might look like this:
|
||||
|
||||
``` {.c}
|
||||
GtkWidget *view;
|
||||
@@ -101,17 +101,17 @@ gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);
|
||||
*/
|
||||
```
|
||||
|
||||
In many cases it's also convenient to first create the buffer with
|
||||
gtk_text_buffer_new(), then create a widget for that buffer with
|
||||
gtk_text_view_new_with_buffer(). Or you can change the buffer the widget
|
||||
In many cases it's also convenient to first create the buffer with
|
||||
gtk_text_buffer_new(), then create a widget for that buffer with
|
||||
gtk_text_view_new_with_buffer(). Or you can change the buffer the widget
|
||||
displays after the widget is created with gtk_text_view_set_buffer().
|
||||
|
||||
## Example of Changing Text Attributes
|
||||
|
||||
The way to affect text attributes in #GtkTextView is to
|
||||
The way to affect text attributes in `GtkTextView` is to
|
||||
apply tags that change the attributes for a region of text.
|
||||
For text features that come from the theme — such as font and
|
||||
foreground color -- use CSS to override their default values.
|
||||
For text features that come from the theme — such as font and
|
||||
foreground color — use CSS to override their default values.
|
||||
|
||||
```
|
||||
GtkWidget *view;
|
||||
@@ -148,11 +148,11 @@ gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
|
||||
/* Use a tag to change the color for just one part of the widget */
|
||||
tag = gtk_text_buffer_create_tag (buffer, "blue_foreground",
|
||||
"foreground", "blue",
|
||||
NULL);
|
||||
NULL);
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &start, 7);
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &end, 12);
|
||||
gtk_text_buffer_apply_tag (buffer, tag, &start, &end);
|
||||
```
|
||||
|
||||
The `gtk4-demo` application that comes with
|
||||
GTK contains more example code for #GtkTextView.
|
||||
GTK contains more example code for `GtkTextView`.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Title: Tree and List Widget Overview
|
||||
Slug: gtk-treeview
|
||||
|
||||
To create a tree or list in GTK, use the #GtkTreeModel interface in
|
||||
conjunction with the #GtkTreeView widget. This widget is designed around
|
||||
To create a tree or list in GTK, use the `GtkTreeModel` interface in
|
||||
conjunction with the `GtkTreeView` widget. This widget is designed around
|
||||
a _Model/View/Controller_ design and consists of four major parts:
|
||||
|
||||
- The tree view widget (GtkTreeView)
|
||||
@@ -25,9 +25,9 @@ it be rendered as a checkbox?
|
||||
|
||||
## Creating a model
|
||||
|
||||
GTK provides two simple models that can be used: the #GtkListStore
|
||||
and the #GtkTreeStore. GtkListStore is used to model list widgets,
|
||||
while the GtkTreeStore models trees. It is possible to develop a new
|
||||
GTK provides two simple models that can be used: the `GtkListStore`
|
||||
and the `GtkTreeStore`. `GtkListStore` is used to model list widgets,
|
||||
while the `GtkTreeStore` models trees. It is possible to develop a new
|
||||
type of model, but the existing models should be satisfactory for all
|
||||
but the most specialized of situations. Creating the model is quite
|
||||
|
||||
@@ -59,7 +59,7 @@ GtkTreeStore *store = gtk_tree_store_new (N_COLUMNS, /* Total number of co
|
||||
|
||||
Adding data to the model is done using gtk_tree_store_set() or
|
||||
gtk_list_store_set(), depending upon which sort of model was
|
||||
created. To do this, a #GtkTreeIter must be acquired. The iterator
|
||||
created. To do this, a `GtkTreeIter` must be acquired. The iterator
|
||||
points to the location where data will be added.
|
||||
|
||||
Once an iterator has been acquired, gtk_tree_store_set() is used to
|
||||
@@ -119,8 +119,8 @@ gtk_tree_store_set (store, &iter2,
|
||||
|
||||
While there are several different models to choose from, there is
|
||||
only one view widget to deal with. It works with either the list
|
||||
or the tree store. Setting up a #GtkTreeView is not a difficult
|
||||
matter. It needs a #GtkTreeModel to know where to retrieve its data
|
||||
or the tree store. Setting up a `GtkTreeView` is not a difficult
|
||||
matter. It needs a `GtkTreeModel` to know where to retrieve its data
|
||||
from.
|
||||
|
||||
``` {.c}
|
||||
@@ -131,16 +131,16 @@ tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
|
||||
|
||||
## Columns and cell renderers
|
||||
|
||||
Once the #GtkTreeView widget has a model, it will need to know how
|
||||
Once the `GtkTreeView` widget has a model, it will need to know how
|
||||
to display the model. It does this with columns and cell renderers.
|
||||
|
||||
Cell renderers are used to draw the data in the tree model in a
|
||||
way. There are a number of cell renderers that come with GTK,
|
||||
including the #GtkCellRendererText, #GtkCellRendererPixbuf and
|
||||
the #GtkCellRendererToggle. It is relatively easy to write a
|
||||
including the `GtkCellRendererText`, `GtkCellRendererPixbuf` and
|
||||
the `GtkCellRendererToggle`. It is relatively easy to write a
|
||||
custom renderer.
|
||||
|
||||
A #GtkTreeViewColumn is the object that GtkTreeView uses to organize
|
||||
A `GtkTreeViewColumn` is the object that `GtkTreeView` uses to organize
|
||||
the vertical columns in the tree view. It needs to know the name of
|
||||
the column to label for the user, what type of cell renderer to use,
|
||||
and which piece of data to retrieve from the model for a given row.
|
||||
@@ -166,7 +166,7 @@ created and columns are added to it.
|
||||
Most applications will need to not only deal with displaying data,
|
||||
but also receiving input events from users. To do this, simply get
|
||||
a reference to a selection object and connect to the
|
||||
#GtkTreeSelection::changed signal.
|
||||
`GtkTreeSelection::changed` signal.
|
||||
|
||||
``` {.c}
|
||||
/* Prototype for selection handler callback */
|
||||
@@ -205,11 +205,11 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
|
||||
|
||||
## Simple Example
|
||||
|
||||
Here is a simple example of using a #GtkTreeView widget in context
|
||||
Here is a simple example of using a `GtkTreeView` widget in context
|
||||
of the other widgets. It simply creates a simple model and view,
|
||||
and puts them together. Note that the model is never populated
|
||||
with data — that is left as an exercise for the reader.
|
||||
More information can be found on this in the #GtkTreeModel section.
|
||||
with data — that is left as an exercise for the reader.
|
||||
More information can be found on this in the `GtkTreeModel` section.
|
||||
|
||||
``` {.c}
|
||||
enum
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Title: Widget Gallery
|
||||
|
||||
<style>p { display: flex; flex-flow: row wrap; }</style>
|
||||
|
||||
## Display widgets
|
||||
|
||||
[](class.Label.html)
|
||||
|
||||
@@ -18,3 +18,8 @@ or wayland-1.
|
||||
### XDG_RUNTIME_DIR
|
||||
|
||||
Used to locate the Wayland socket to use.
|
||||
|
||||
## Wayland-specific APIs
|
||||
|
||||
See the [documentation](https://docs.gtk.org/gdk4-wayland/) for
|
||||
Wayland-specific GDK APIs.
|
||||
|
||||
@@ -25,6 +25,11 @@ high-dpi displays. Normally, GDK will pick up a suitable scale factor
|
||||
for each monitor from the display system. This environment variable
|
||||
allows to override that.
|
||||
|
||||
## X11-specific APIs
|
||||
|
||||
See the [documentation](https://docs.gtk.org/gdk4-x11/) for
|
||||
X11-specific GDK APIs.
|
||||
|
||||
## Understanding the X11 architecture
|
||||
|
||||
People coming from a Windows or MacOS background often find certain
|
||||
|
||||
@@ -3,7 +3,7 @@ toml_conf.set('version', meson.project_version())
|
||||
|
||||
gidocgen = find_program('gi-docgen', required: get_option('gtk_doc'))
|
||||
|
||||
docs_dir = gtk_datadir / 'doc/gtk4/reference'
|
||||
docs_dir = gtk_datadir / 'doc'
|
||||
|
||||
subdir('gdk')
|
||||
subdir('gsk')
|
||||
|
||||
@@ -59,12 +59,14 @@ example_app_startup (GApplication *app)
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_activate (GApplication *app)
|
||||
example_app_create_window (GtkApplication *app,
|
||||
const char *save_id)
|
||||
{
|
||||
ExampleAppWindow *win;
|
||||
|
||||
win = example_app_window_new (EXAMPLE_APP (app));
|
||||
gtk_window_present (GTK_WINDOW (win));
|
||||
gtk_widget_set_save_id (GTK_WIDGET (win), save_id);
|
||||
/* FIXME: differentiate save ids */
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -93,8 +95,8 @@ static void
|
||||
example_app_class_init (ExampleAppClass *class)
|
||||
{
|
||||
G_APPLICATION_CLASS (class)->startup = example_app_startup;
|
||||
G_APPLICATION_CLASS (class)->activate = example_app_activate;
|
||||
G_APPLICATION_CLASS (class)->open = example_app_open;
|
||||
GTK_APPLICATION_CLASS (class)->create_window = example_app_create_window;
|
||||
}
|
||||
|
||||
ExampleApp *
|
||||
@@ -103,5 +105,7 @@ example_app_new (void)
|
||||
return g_object_new (EXAMPLE_APP_TYPE,
|
||||
"application-id", "org.gtk.exampleapp",
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
"register-session", TRUE,
|
||||
"save-state", TRUE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ struct _ExampleAppWindow
|
||||
GtkWidget *words;
|
||||
GtkWidget *lines;
|
||||
GtkWidget *lines_label;
|
||||
|
||||
GList *files;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (ExampleAppWindow, example_app_window, GTK_TYPE_APPLICATION_WINDOW)
|
||||
@@ -211,14 +213,68 @@ example_app_window_dispose (GObject *object)
|
||||
|
||||
g_clear_object (&win->settings);
|
||||
|
||||
g_list_free_full (win->files, g_object_unref);
|
||||
win->files = NULL;
|
||||
|
||||
G_OBJECT_CLASS (example_app_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
example_app_window_save_state (GtkWidget *widget,
|
||||
GVariantDict *dict,
|
||||
gboolean *save_children)
|
||||
{
|
||||
ExampleAppWindow *win = EXAMPLE_APP_WINDOW (widget);
|
||||
GVariantBuilder builder;
|
||||
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
|
||||
for (GList *l = win->files; l; l = l->next)
|
||||
{
|
||||
g_variant_builder_add (&builder, "s", g_file_peek_path (G_FILE (l->data)));
|
||||
}
|
||||
|
||||
g_variant_dict_insert_value (dict, "files", g_variant_builder_end (&builder));
|
||||
|
||||
/* Save window state */
|
||||
GTK_WIDGET_CLASS (example_app_window_parent_class)->save_state (widget, dict, save_children);
|
||||
|
||||
*save_children = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
example_app_window_restore_state (GtkWidget *widget,
|
||||
GVariant *state)
|
||||
{
|
||||
ExampleAppWindow *win = EXAMPLE_APP_WINDOW (widget);
|
||||
GVariantIter *iter;
|
||||
|
||||
/* Restore window state */
|
||||
GTK_WIDGET_CLASS (example_app_window_parent_class)->restore_state (widget, state);
|
||||
|
||||
if (g_variant_lookup (state, "files", "as", &iter))
|
||||
{
|
||||
const char *path;
|
||||
|
||||
while (g_variant_iter_next (iter, "&s", &path))
|
||||
{
|
||||
GFile *file = g_file_new_for_path (path);
|
||||
example_app_window_open (win, file);
|
||||
g_object_unref (file);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_window_class_init (ExampleAppWindowClass *class)
|
||||
{
|
||||
G_OBJECT_CLASS (class)->dispose = example_app_window_dispose;
|
||||
|
||||
GTK_WIDGET_CLASS (class)->save_state = example_app_window_save_state;
|
||||
GTK_WIDGET_CLASS (class)->restore_state = example_app_window_restore_state;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
|
||||
"/org/gtk/exampleapp/window.ui");
|
||||
|
||||
@@ -288,4 +344,6 @@ example_app_window_open (ExampleAppWindow *win,
|
||||
|
||||
update_words (win);
|
||||
update_lines (win);
|
||||
|
||||
win->files = g_list_append (win->files, g_object_ref (file));
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<property name="title" translatable="yes">Example Application</property>
|
||||
<property name="default-width">600</property>
|
||||
<property name="default-height">400</property>
|
||||
<property name="save-id">window</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header">
|
||||
<child>
|
||||
@@ -26,6 +27,7 @@
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
<property name="save-id">search</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
@@ -38,6 +40,7 @@
|
||||
<child>
|
||||
<object class="GtkBox" id="content_box">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="save-id">content_box</property>
|
||||
<child>
|
||||
<object class="GtkSearchBar" id="searchbar">
|
||||
<child>
|
||||
@@ -49,8 +52,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="hbox">
|
||||
<property name="save-id">hbox</property>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="sidebar">
|
||||
<property name="save-id">sidebar</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="sidebar-sw">
|
||||
@@ -66,6 +71,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="save-id">stack</property>
|
||||
<signal name="notify::visible-child" handler="visible_child_changed"/>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -48,6 +48,10 @@ void gdk_broadway_display_show_keyboard (GdkBroadwayDis
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_broadway_display_hide_keyboard (GdkBroadwayDisplay *display);
|
||||
|
||||
GDK_AVAILABLE_IN_4_4
|
||||
void gdk_broadway_display_set_surface_scale (GdkDisplay *display,
|
||||
int scale);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DISPLAY_H__ */
|
||||
|
||||
@@ -94,10 +94,12 @@ _gdk_broadway_display_size_changed (GdkDisplay *display,
|
||||
|
||||
if (msg->width == current_size.width &&
|
||||
msg->height == current_size.height &&
|
||||
msg->scale == broadway_display->scale_factor)
|
||||
(msg->scale == broadway_display->scale_factor ||
|
||||
broadway_display->fixed_scale))
|
||||
return;
|
||||
|
||||
broadway_display->scale_factor = msg->scale;
|
||||
if (!broadway_display->fixed_scale)
|
||||
broadway_display->scale_factor = msg->scale;
|
||||
|
||||
gdk_monitor_set_geometry (monitor, &(GdkRectangle) { 0, 0, msg->width, msg->height });
|
||||
gdk_monitor_set_scale_factor (monitor, msg->scale);
|
||||
@@ -112,7 +114,8 @@ _gdk_broadway_display_size_changed (GdkDisplay *display,
|
||||
gdk_broadway_surface_move_resize (GDK_SURFACE (toplevel),
|
||||
0, 0,
|
||||
msg->width, msg->height);
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
create_core_pointer (GdkDisplay *display)
|
||||
@@ -327,6 +330,37 @@ gdk_broadway_display_hide_keyboard (GdkBroadwayDisplay *display)
|
||||
_gdk_broadway_server_set_show_keyboard (display->server, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_broadway_display_set_surface_scale:
|
||||
* @display: (type GdkBroadwayDisplay): the display
|
||||
* @scale: The new scale value, as an integer >= 1
|
||||
*
|
||||
* Forces a specific window scale for all windows on this display,
|
||||
* instead of using the default or user configured scale. This
|
||||
* is can be used to disable scaling support by setting @scale to
|
||||
* 1, or to programmatically set the window scale.
|
||||
*
|
||||
* Once the scale is set by this call it will not change in
|
||||
* response to later user configuration changes.
|
||||
*
|
||||
* Since: 4.4
|
||||
*/
|
||||
void
|
||||
gdk_broadway_display_set_surface_scale (GdkDisplay *display,
|
||||
int scale)
|
||||
{
|
||||
GdkBroadwayDisplay *self;
|
||||
|
||||
g_return_if_fail (GDK_IS_BROADWAY_DISPLAY (display));
|
||||
g_return_if_fail (scale > 0);
|
||||
|
||||
self = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
self->scale_factor = scale;
|
||||
self->fixed_scale = TRUE;
|
||||
gdk_monitor_set_scale_factor (self->monitor, scale);
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
gdk_broadway_display_get_monitors (GdkDisplay *display)
|
||||
{
|
||||
|
||||
@@ -57,6 +57,7 @@ struct _GdkBroadwayDisplay
|
||||
GListStore *monitors;
|
||||
GdkMonitor *monitor;
|
||||
int scale_factor;
|
||||
gboolean fixed_scale;
|
||||
|
||||
GHashTable *texture_cache;
|
||||
|
||||
|
||||
10
gdk/gdk.c
10
gdk/gdk.c
@@ -50,7 +50,7 @@
|
||||
/**
|
||||
* GDK_WINDOWING_X11:
|
||||
*
|
||||
* The #GDK_WINDOWING_X11 macro is defined if the X11 backend
|
||||
* The `GDK_WINDOWING_X11` macro is defined if the X11 backend
|
||||
* is supported.
|
||||
*
|
||||
* Use this macro to guard code that is specific to the X11 backend.
|
||||
@@ -59,7 +59,7 @@
|
||||
/**
|
||||
* GDK_WINDOWING_WIN32:
|
||||
*
|
||||
* The #GDK_WINDOWING_WIN32 macro is defined if the Win32 backend
|
||||
* The `GDK_WINDOWING_WIN32` macro is defined if the Win32 backend
|
||||
* is supported.
|
||||
*
|
||||
* Use this macro to guard code that is specific to the Win32 backend.
|
||||
@@ -68,7 +68,7 @@
|
||||
/**
|
||||
* GDK_WINDOWING_MACOS:
|
||||
*
|
||||
* The #GDK_WINDOWING_MACOS macro is defined if the MacOS backend
|
||||
* The `GDK_WINDOWING_MACOS` macro is defined if the MacOS backend
|
||||
* is supported.
|
||||
*
|
||||
* Use this macro to guard code that is specific to the MacOS backend.
|
||||
@@ -77,7 +77,7 @@
|
||||
/**
|
||||
* GDK_WINDOWING_WAYLAND:
|
||||
*
|
||||
* The #GDK_WINDOWING_WAYLAND macro is defined if the Wayland backend
|
||||
* The `GDK_WINDOWING_WAYLAND` macro is defined if the Wayland backend
|
||||
* is supported.
|
||||
*
|
||||
* Use this macro to guard code that is specific to the Wayland backend.
|
||||
@@ -87,6 +87,7 @@
|
||||
* GDK_DISABLE_DEPRECATION_WARNINGS:
|
||||
*
|
||||
* A macro that should be defined before including the gdk.h header.
|
||||
*
|
||||
* If it is defined, no compiler warnings will be produced for uses
|
||||
* of deprecated GDK APIs.
|
||||
*/
|
||||
@@ -126,6 +127,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context" },
|
||||
{ "gl-gles", GDK_DEBUG_GL_GLES, "Use a GLES OpenGL context" },
|
||||
{ "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
|
||||
{ "gl-glx", GDK_DEBUG_GL_GLX, "Use GLX on X11" },
|
||||
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE, "Disable Vulkan support" },
|
||||
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" },
|
||||
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings" },
|
||||
|
||||
@@ -237,7 +237,7 @@ gdk_app_launch_context_set_timestamp (GdkAppLaunchContext *context,
|
||||
/**
|
||||
* gdk_app_launch_context_set_icon:
|
||||
* @context: a `GdkAppLaunchContext`
|
||||
* @icon: (allow-none): a #GIcon, or %NULL
|
||||
* @icon: (nullable): a `GIcon`
|
||||
*
|
||||
* Sets the icon for applications that are launched with this
|
||||
* context.
|
||||
@@ -267,12 +267,12 @@ gdk_app_launch_context_set_icon (GdkAppLaunchContext *context,
|
||||
/**
|
||||
* gdk_app_launch_context_set_icon_name:
|
||||
* @context: a `GdkAppLaunchContext`
|
||||
* @icon_name: (allow-none): an icon name, or %NULL
|
||||
* @icon_name: (nullable): an icon name
|
||||
*
|
||||
* Sets the icon for applications that are launched with this context.
|
||||
*
|
||||
* The @icon_name will be interpreted in the same way as the Icon field
|
||||
* in desktop files. See also [method@Gdk.AppLaunchContext.set_icon()].
|
||||
* in desktop files. See also [method@Gdk.AppLaunchContext.set_icon].
|
||||
*
|
||||
* If both @icon and @icon_name are set, the @icon_name takes priority.
|
||||
* If neither @icon or @icon_name is set, the icon is taken from either
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
/**
|
||||
* gdk_cairo_set_source_rgba:
|
||||
* @cr: a cairo context
|
||||
* @rgba: a #GdkRGBA
|
||||
* @rgba: a `GdkRGBA`
|
||||
*
|
||||
* Sets the specified #GdkRGBA as the source color of @cr.
|
||||
* Sets the specified `GdkRGBA` as the source color of @cr.
|
||||
*/
|
||||
void
|
||||
gdk_cairo_set_source_rgba (cairo_t *cr,
|
||||
@@ -47,7 +47,7 @@ gdk_cairo_set_source_rgba (cairo_t *cr,
|
||||
/**
|
||||
* gdk_cairo_rectangle:
|
||||
* @cr: a cairo context
|
||||
* @rectangle: a #GdkRectangle
|
||||
* @rectangle: a `GdkRectangle`
|
||||
*
|
||||
* Adds the given rectangle to the current path of @cr.
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ gdk_cairo_rectangle (cairo_t *cr,
|
||||
/**
|
||||
* gdk_cairo_region:
|
||||
* @cr: a cairo context
|
||||
* @region: a #cairo_region_t
|
||||
* @region: a `cairo_region_t`
|
||||
*
|
||||
* Adds the given region to the current path of @cr.
|
||||
*/
|
||||
@@ -185,7 +185,7 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
|
||||
/**
|
||||
* gdk_cairo_set_source_pixbuf:
|
||||
* @cr: a cairo context
|
||||
* @pixbuf: a #GdkPixbuf
|
||||
* @pixbuf: a `GdkPixbuf`
|
||||
* @pixbuf_x: X coordinate of location to place upper left corner of @pixbuf
|
||||
* @pixbuf_y: Y coordinate of location to place upper left corner of @pixbuf
|
||||
*
|
||||
@@ -232,7 +232,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
|
||||
* You must explicitly check the return value of you want to handle
|
||||
* that case.
|
||||
*
|
||||
* Returns: %TRUE if the extents fit in a #GdkRectangle, %FALSE if not
|
||||
* Returns: %TRUE if the extents fit in a `GdkRectangle`, %FALSE if not
|
||||
*/
|
||||
gboolean
|
||||
_gdk_cairo_surface_extents (cairo_surface_t *surface,
|
||||
@@ -287,7 +287,7 @@ _gdk_cairo_surface_extents (cairo_surface_t *surface,
|
||||
* This function takes into account device offsets that might be
|
||||
* set with cairo_surface_set_device_offset().
|
||||
*
|
||||
* Returns: A `cairo_region_t`; must be freed with cairo_region_destroy()
|
||||
* Returns: (transfer full): A `cairo_region_t`
|
||||
*/
|
||||
cairo_region_t *
|
||||
gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
* draw context.
|
||||
*
|
||||
* `GdkCairoContext`s are created for a surface using
|
||||
* [method@Gdk.Surface.create_cairo_context], and the context can then be used
|
||||
* to draw on that surface.
|
||||
* [method@Gdk.Surface.create_cairo_context], and the context
|
||||
* can then be used to draw on that surface.
|
||||
*/
|
||||
|
||||
typedef struct _GdkCairoContextPrivate GdkCairoContextPrivate;
|
||||
@@ -59,7 +59,7 @@ gdk_cairo_context_init (GdkCairoContext *self)
|
||||
|
||||
/**
|
||||
* gdk_cairo_context_cairo_create:
|
||||
* @self: a #GdkCairoContext that is currently drawing
|
||||
* @self: a `GdkCairoContext` that is currently drawing
|
||||
*
|
||||
* Retrieves a Cairo context to be used to draw on the `GdkSurface`
|
||||
* of @context.
|
||||
@@ -70,9 +70,8 @@ gdk_cairo_context_init (GdkCairoContext *self)
|
||||
* The returned context is guaranteed to be valid until
|
||||
* [method@Gdk.DrawContext.end_frame] is called.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a Cairo context to be used
|
||||
* to draw the contents of the `GdkSurface`. %NULL is returned
|
||||
* when @context is not drawing.
|
||||
* Returns: (transfer full) (nullable): a Cairo context
|
||||
* to draw on `GdkSurface
|
||||
*/
|
||||
cairo_t *
|
||||
gdk_cairo_context_cairo_create (GdkCairoContext *self)
|
||||
|
||||
@@ -504,8 +504,8 @@ gdk_clipboard_is_local (GdkClipboard *clipboard)
|
||||
* If the @clipboard is empty or its contents are not owned by the
|
||||
* current process, %NULL will be returned.
|
||||
*
|
||||
* Returns: (transfer none) (nullable): The content of a clipboard or %NULL
|
||||
* if the clipboard does not maintain any content.
|
||||
* Returns: (transfer none) (nullable): The content of a clipboard
|
||||
* if the clipboard does not maintain any content
|
||||
*/
|
||||
GdkContentProvider *
|
||||
gdk_clipboard_get_content (GdkClipboard *clipboard)
|
||||
@@ -520,8 +520,8 @@ gdk_clipboard_get_content (GdkClipboard *clipboard)
|
||||
/**
|
||||
* gdk_clipboard_store_async:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @io_priority: the I/O priority of the request.
|
||||
* @cancellable: (nullable): optional `GCancellable` object, %NULL to ignore.
|
||||
* @io_priority: the I/O priority of the request
|
||||
* @cancellable: (nullable): optional `GCancellable` object
|
||||
* @callback: (scope async): callback to call when the request is satisfied
|
||||
* @user_data: (closure): the data to pass to callback function
|
||||
*
|
||||
@@ -554,19 +554,19 @@ gdk_clipboard_store_async (GdkClipboard *clipboard,
|
||||
|
||||
if (priv->local)
|
||||
{
|
||||
return GDK_CLIPBOARD_GET_CLASS (clipboard)->store_async (clipboard,
|
||||
io_priority,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data);
|
||||
GDK_CLIPBOARD_GET_CLASS (clipboard)->store_async (clipboard,
|
||||
io_priority,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
return gdk_clipboard_store_default_async (clipboard,
|
||||
io_priority,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data);
|
||||
gdk_clipboard_store_default_async (clipboard,
|
||||
io_priority,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ gdk_clipboard_store_async (GdkClipboard *clipboard,
|
||||
* gdk_clipboard_store_finish:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @result: a `GAsyncResult`
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore.
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an asynchronous clipboard store.
|
||||
*
|
||||
@@ -637,7 +637,7 @@ gdk_clipboard_read_internal (GdkClipboard *clipboard,
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @mime_types: a %NULL-terminated array of mime types to choose from
|
||||
* @io_priority: the I/O priority of the request
|
||||
* @cancellable: (nullable): optional `GCancellable` object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional `GCancellable` object
|
||||
* @callback: (scope async): callback to call when the request is satisfied
|
||||
* @user_data: (closure): the data to pass to callback function
|
||||
*
|
||||
@@ -676,15 +676,15 @@ gdk_clipboard_read_async (GdkClipboard *clipboard,
|
||||
* gdk_clipboard_read_finish:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @result: a `GAsyncResult`
|
||||
* @out_mime_type: (out) (allow-none) (transfer none): pointer to store
|
||||
* the chosen mime type in or %NULL
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore.
|
||||
* @out_mime_type: (out) (optional) (transfer none): location to store
|
||||
* the chosen mime type
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an asynchronous clipboard read.
|
||||
*
|
||||
* See [method@Gdk.Clipboard.read_async].
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a `GInputStream` or %NULL on error.
|
||||
* Returns: (transfer full) (nullable): a `GInputStream`
|
||||
*/
|
||||
GInputStream *
|
||||
gdk_clipboard_read_finish (GdkClipboard *clipboard,
|
||||
@@ -833,7 +833,7 @@ gdk_clipboard_read_value_internal (GdkClipboard *clipboard,
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @type: a `GType` to read
|
||||
* @io_priority: the I/O priority of the request
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
|
||||
* @cancellable: (nullable): optional `GCancellable` object
|
||||
* @callback: (scope async): callback to call when the request is satisfied
|
||||
* @user_data: (closure): the data to pass to callback function
|
||||
*
|
||||
@@ -872,7 +872,7 @@ gdk_clipboard_read_value_async (GdkClipboard *clipboard,
|
||||
* gdk_clipboard_read_value_finish:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @result: a `GAsyncResult`
|
||||
* @error: a GError` location to store the error occurring, or %NULL to ignore
|
||||
* @error: a GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an asynchronous clipboard read.
|
||||
*
|
||||
@@ -905,7 +905,7 @@ gdk_clipboard_read_value_finish (GdkClipboard *clipboard,
|
||||
* call [method@Gdk.Clipboard.read_texture_finish] to get the result.
|
||||
*
|
||||
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
|
||||
* Use that function or [methos@Gdk.Clipboard.read_async] directly if you
|
||||
* Use that function or [method@Gdk.Clipboard.read_async] directly if you
|
||||
* need more control over the operation.
|
||||
*/
|
||||
void
|
||||
@@ -931,13 +931,13 @@ gdk_clipboard_read_texture_async (GdkClipboard *clipboard,
|
||||
* gdk_clipboard_read_texture_finish:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @result: a `GAsyncResult`
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an asynchronous clipboard read.
|
||||
*
|
||||
* See [method@Gdk.Clipboard.read_texture_async].
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a new `GdkTexture` or %NULL on error
|
||||
* Returns: (transfer full) (nullable): a new `GdkTexture`
|
||||
*/
|
||||
GdkTexture *
|
||||
gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
|
||||
@@ -960,7 +960,7 @@ gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
|
||||
/**
|
||||
* gdk_clipboard_read_text_async:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @cancellable: (nullable): optional `GCancellable` object, %NULL to ignore
|
||||
* @cancellable: (nullable): optional `GCancellable` object
|
||||
* @callback: (scope async): callback to call when the request is satisfied
|
||||
* @user_data: (closure): the data to pass to callback function
|
||||
*
|
||||
@@ -996,13 +996,13 @@ gdk_clipboard_read_text_async (GdkClipboard *clipboard,
|
||||
* gdk_clipboard_read_text_finish:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @result: a `GAsyncResult`
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an asynchronous clipboard read.
|
||||
*
|
||||
* See [method@Gdk.Clipboard.read_text_async].
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a new string or %NULL on error
|
||||
* Returns: (transfer full) (nullable): a new string
|
||||
*/
|
||||
char *
|
||||
gdk_clipboard_read_text_finish (GdkClipboard *clipboard,
|
||||
@@ -1194,8 +1194,8 @@ gdk_clipboard_claim_remote (GdkClipboard *clipboard,
|
||||
/**
|
||||
* gdk_clipboard_set_content:
|
||||
* @clipboard: a `GdkClipboard`
|
||||
* @provider: (transfer none) (allow-none): the new contents of @clipboard or
|
||||
* %NULL to clear the clipboard
|
||||
* @provider: (transfer none) (nullable): the new contents of @clipboard
|
||||
* or %NULL to clear the clipboard
|
||||
*
|
||||
* Sets a new content provider on @clipboard.
|
||||
*
|
||||
|
||||
@@ -190,9 +190,9 @@ gdk_content_deserializer_get_mime_type (GdkContentDeserializer *deserializer)
|
||||
* gdk_content_deserializer_get_gtype:
|
||||
* @deserializer: a `GdkContentDeserializer`
|
||||
*
|
||||
* Gets the GType to create an instance of.
|
||||
* Gets the `GType` to create an instance of.
|
||||
*
|
||||
* Returns: the GType for the current operation
|
||||
* Returns: the `GType` for the current operation
|
||||
*/
|
||||
GType
|
||||
gdk_content_deserializer_get_gtype (GdkContentDeserializer *deserializer)
|
||||
@@ -224,7 +224,7 @@ gdk_content_deserializer_get_value (GdkContentDeserializer *deserializer)
|
||||
*
|
||||
* Gets the input stream for the current operation.
|
||||
*
|
||||
* This is the stream that was passed to [func@content_deserialize_async].
|
||||
* This is the stream that was passed to [func@Gdk.content_deserialize_async].
|
||||
*
|
||||
* Returns: (transfer none): the input stream for the current operation
|
||||
*/
|
||||
@@ -242,7 +242,7 @@ gdk_content_deserializer_get_input_stream (GdkContentDeserializer *deserializer)
|
||||
*
|
||||
* Gets the I/O priority for the current operation.
|
||||
*
|
||||
* This is the priority that was passed to [funccontent_deserialize_async].
|
||||
* This is the priority that was passed to [func@Gdk.content_deserialize_async].
|
||||
*
|
||||
* Returns: the I/O priority for the current operation
|
||||
*/
|
||||
@@ -260,7 +260,7 @@ gdk_content_deserializer_get_priority (GdkContentDeserializer *deserializer)
|
||||
*
|
||||
* Gets the cancellable for the current operation.
|
||||
*
|
||||
* This is the `GCancellable` that was passed to [func@content_deserialize_async].
|
||||
* This is the `GCancellable` that was passed to [func@Gdk.content_deserialize_async].
|
||||
*
|
||||
* Returns: (transfer none): the cancellable for the current operation
|
||||
*/
|
||||
@@ -364,7 +364,7 @@ gdk_content_deserializer_return_success (GdkContentDeserializer *deserializer)
|
||||
/**
|
||||
* gdk_content_deserializer_return_error:
|
||||
* @deserializer: a `GdkContentDeserializer`
|
||||
* @error: a `GError`
|
||||
* @error: (transfer full): a `GError`
|
||||
*
|
||||
* Indicate that the deserialization has ended with an error.
|
||||
*
|
||||
@@ -539,7 +539,7 @@ deserialize_not_found (GdkContentDeserializer *deserializer)
|
||||
* indicate a higher priority.
|
||||
*
|
||||
* When the operation is finished, @callback will be called. You must then
|
||||
* call [func@content_deserialize_finish] to get the result of the operation.
|
||||
* call [func@Gdk.content_deserialize_finish] to get the result of the operation.
|
||||
*/
|
||||
void
|
||||
gdk_content_deserialize_async (GInputStream *stream,
|
||||
@@ -672,9 +672,18 @@ string_deserializer_finish (GObject *source,
|
||||
}
|
||||
else
|
||||
{
|
||||
GOutputStream *mem_stream = g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (stream));
|
||||
|
||||
/* write a terminating NULL byte */
|
||||
if (g_output_stream_write (mem_stream, "", 1, NULL, &error) < 0 ||
|
||||
!g_output_stream_close (mem_stream, NULL, &error))
|
||||
{
|
||||
gdk_content_deserializer_return_error (deserializer, error);
|
||||
return;
|
||||
}
|
||||
|
||||
g_value_take_string (gdk_content_deserializer_get_value (deserializer),
|
||||
g_memory_output_stream_steal_data (G_MEMORY_OUTPUT_STREAM (
|
||||
g_filter_output_stream_get_base_stream (G_FILTER_OUTPUT_STREAM (stream)))));
|
||||
g_memory_output_stream_steal_data (G_MEMORY_OUTPUT_STREAM (mem_stream)));
|
||||
}
|
||||
gdk_content_deserializer_return_success (deserializer);
|
||||
}
|
||||
@@ -703,7 +712,7 @@ string_deserializer (GdkContentDeserializer *deserializer)
|
||||
|
||||
g_output_stream_splice_async (filter,
|
||||
gdk_content_deserializer_get_input_stream (deserializer),
|
||||
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
|
||||
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
|
||||
gdk_content_deserializer_get_priority (deserializer),
|
||||
gdk_content_deserializer_get_cancellable (deserializer),
|
||||
string_deserializer_finish,
|
||||
@@ -731,7 +740,8 @@ file_uri_deserializer_finish (GObject *source,
|
||||
}
|
||||
|
||||
/* write terminating NULL */
|
||||
if (!g_output_stream_write (stream, "", 1, NULL, &error))
|
||||
if (g_output_stream_write (stream, "", 1, NULL, &error) < 0 ||
|
||||
!g_output_stream_close (stream, NULL, &error))
|
||||
{
|
||||
gdk_content_deserializer_return_error (deserializer, error);
|
||||
return;
|
||||
@@ -771,7 +781,7 @@ file_uri_deserializer (GdkContentDeserializer *deserializer)
|
||||
|
||||
g_output_stream_splice_async (output,
|
||||
gdk_content_deserializer_get_input_stream (deserializer),
|
||||
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
|
||||
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE,
|
||||
gdk_content_deserializer_get_priority (deserializer),
|
||||
gdk_content_deserializer_get_cancellable (deserializer),
|
||||
file_uri_deserializer_finish,
|
||||
@@ -921,7 +931,7 @@ init (void)
|
||||
gdk_content_register_deserializer (mime,
|
||||
G_TYPE_STRING,
|
||||
string_deserializer,
|
||||
mime,
|
||||
(gpointer) charset,
|
||||
g_free);
|
||||
}
|
||||
gdk_content_register_deserializer ("text/plain",
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef struct _GdkContentDeserializer GdkContentDeserializer;
|
||||
|
||||
/**
|
||||
* GdkContentDeserializeFunc:
|
||||
* @deserializer: a #GdkContentDeserializer
|
||||
* @deserializer: a `GdkContentDeserializer`
|
||||
*
|
||||
* The type of a function that can be registered with gdk_content_register_deserializer().
|
||||
*
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
*
|
||||
* `GdkContentFormats` is an immutable struct. After creation, you cannot change
|
||||
* the types it represents. Instead, new `GdkContentFormats` have to be created.
|
||||
* The [struct@Gdk.ContentFormatsBuilder]` structure is meant to help in this
|
||||
* The [struct@Gdk.ContentFormatsBuilder] structure is meant to help in this
|
||||
* endeavor.
|
||||
*/
|
||||
|
||||
@@ -84,8 +84,8 @@ G_DEFINE_BOXED_TYPE (GdkContentFormats, gdk_content_formats,
|
||||
* If @string is not a valid mime type, %NULL is returned instead.
|
||||
* See RFC 2048 for the syntax if mime types.
|
||||
*
|
||||
* Returns: An interned string for the canonicalized mime type
|
||||
* or %NULL if the string wasn't a valid mime type
|
||||
* Returns: (nullable): An interned string for the canonicalized
|
||||
* mime type or %NULL if the string wasn't a valid mime type
|
||||
*/
|
||||
const char *
|
||||
gdk_intern_mime_type (const char *string)
|
||||
@@ -125,7 +125,7 @@ gdk_content_formats_new_take (GType * gtypes,
|
||||
|
||||
/**
|
||||
* gdk_content_formats_new:
|
||||
* @mime_types: (array length=n_mime_types) (allow-none): Pointer to an
|
||||
* @mime_types: (array length=n_mime_types) (nullable): Pointer to an
|
||||
* array of mime types
|
||||
* @n_mime_types: number of entries in @mime_types.
|
||||
*
|
||||
@@ -133,7 +133,7 @@ gdk_content_formats_new_take (GType * gtypes,
|
||||
*
|
||||
* The mime types must be valid and different from each other or the
|
||||
* behavior of the return value is undefined. If you cannot guarantee
|
||||
* this, use `GdkContentFormatsBuilder` instead.
|
||||
* this, use [struct@Gdk.ContentFormatsBuilder] instead.
|
||||
*
|
||||
* Returns: (transfer full): the new `GdkContentFormats`.
|
||||
*/
|
||||
@@ -384,7 +384,7 @@ gdk_content_formats_match_gtype (const GdkContentFormats *first,
|
||||
*
|
||||
* If no matching mime type is found, %NULL is returned.
|
||||
*
|
||||
* Returns: (nullable): The first common mime type or %NULL if none.
|
||||
* Returns: (nullable): The first common mime type or %NULL if none
|
||||
*/
|
||||
const char *
|
||||
gdk_content_formats_match_mime_type (const GdkContentFormats *first,
|
||||
@@ -411,7 +411,7 @@ gdk_content_formats_match_mime_type (const GdkContentFormats *first,
|
||||
*
|
||||
* Checks if a given `GType` is part of the given @formats.
|
||||
*
|
||||
* Returns: %TRUE if the #GType was found
|
||||
* Returns: %TRUE if the `GType` was found
|
||||
*/
|
||||
gboolean
|
||||
gdk_content_formats_contain_gtype (const GdkContentFormats *formats,
|
||||
@@ -454,16 +454,15 @@ gdk_content_formats_contain_mime_type (const GdkContentFormats *formats,
|
||||
* gdk_content_formats_get_gtypes:
|
||||
* @formats: a `GdkContentFormats`
|
||||
* @n_gtypes: (out) (optional): optional pointer to take the
|
||||
* number of #GTypes contained in the return value
|
||||
* number of `GType`s contained in the return value
|
||||
*
|
||||
* Gets the `GTypes` included in @formats.
|
||||
* Gets the `GType`s included in @formats.
|
||||
*
|
||||
* Note that @formats may not contain any #GTypes, in particular when
|
||||
* Note that @formats may not contain any `GType`s, in particular when
|
||||
* they are empty. In that case %NULL will be returned.
|
||||
*
|
||||
* Returns: (transfer none) (nullable) (array length=n_gtypes):
|
||||
* %G_TYPE_INVALID-terminated array of types included in @formats or
|
||||
* %NULL if none.
|
||||
* Returns: (transfer none) (nullable) (array length=n_gtypes zero-terminated=1):
|
||||
* %G_TYPE_INVALID-terminated array of types included in @formats
|
||||
*/
|
||||
const GType *
|
||||
gdk_content_formats_get_gtypes (const GdkContentFormats *formats,
|
||||
@@ -480,17 +479,17 @@ gdk_content_formats_get_gtypes (const GdkContentFormats *formats,
|
||||
/**
|
||||
* gdk_content_formats_get_mime_types:
|
||||
* @formats: a `GdkContentFormats`
|
||||
* @n_mime_types: (out) (allow-none): optional pointer to take the
|
||||
* number of mime types contained in the return value
|
||||
* @n_mime_types: (out) (optional): optional pointer to take the
|
||||
* number of mime types contained in the return value
|
||||
*
|
||||
* Gets the mime types included in @formats.
|
||||
*
|
||||
* Note that @formats may not contain any mime types, in particular
|
||||
* when they are empty. In that case %NULL will be returned.
|
||||
*
|
||||
* Returns: (transfer none) (nullable): %NULL-terminated array of
|
||||
* interned strings of mime types included in @formats or %NULL
|
||||
* if none.
|
||||
* Returns: (transfer none) (nullable) (array length=n_mime_types zero-terminated=1):
|
||||
* %NULL-terminated array of interned strings of mime types included
|
||||
* in @formats
|
||||
*/
|
||||
const char * const *
|
||||
gdk_content_formats_get_mime_types (const GdkContentFormats *formats,
|
||||
|
||||
@@ -218,7 +218,7 @@ gdk_content_provider_init (GdkContentProvider *provider)
|
||||
|
||||
/**
|
||||
* gdk_content_provider_ref_formats: (attributes org.gtk.Method.get_property=formats)
|
||||
* @provider: a #GdkContentProvider
|
||||
* @provider: a `GdkContentProvider`
|
||||
*
|
||||
* Gets the formats that the provider can provide its current contents in.
|
||||
*
|
||||
@@ -234,7 +234,7 @@ gdk_content_provider_ref_formats (GdkContentProvider *provider)
|
||||
|
||||
/**
|
||||
* gdk_content_provider_ref_storable_formats: (attributes org.gtk.Method.get_property=storable-formats)
|
||||
* @provider: a #GdkContentProvider
|
||||
* @provider: a `GdkContentProvider`
|
||||
*
|
||||
* Gets the formats that the provider suggests other applications to store
|
||||
* the data in.
|
||||
@@ -288,7 +288,7 @@ gdk_content_provider_content_changed (GdkContentProvider *provider)
|
||||
*
|
||||
* The given mime type does not need to be listed in the formats returned by
|
||||
* [method@Gdk.ContentProvider.ref_formats]. However, if the given `GType` is
|
||||
* not supported, #G_IO_ERROR_NOT_SUPPORTED will be reported.
|
||||
* not supported, `G_IO_ERROR_NOT_SUPPORTED` will be reported.
|
||||
*
|
||||
* The given @stream will not be closed.
|
||||
*/
|
||||
@@ -319,14 +319,14 @@ gdk_content_provider_write_mime_type_async (GdkContentProvider *provider,
|
||||
* gdk_content_provider_write_mime_type_finish:
|
||||
* @provider: a `GdkContentProvider`
|
||||
* @result: a `GAsyncResult`
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an asynchronous write operation.
|
||||
*
|
||||
* See [method@Gdk.ContentProvider.write_mime_type_async].
|
||||
*
|
||||
* Returns: %TRUE if the operation was completed successfully. Otherwise
|
||||
* @error will be set to describe the failure.
|
||||
* @error will be set to describe the failure.
|
||||
*/
|
||||
gboolean
|
||||
gdk_content_provider_write_mime_type_finish (GdkContentProvider *provider,
|
||||
@@ -343,7 +343,7 @@ gdk_content_provider_write_mime_type_finish (GdkContentProvider *provider,
|
||||
* gdk_content_provider_get_value:
|
||||
* @provider: a `GdkContentProvider`
|
||||
* @value: the `GValue` to fill
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Gets the contents of @provider stored in @value.
|
||||
*
|
||||
@@ -351,10 +351,10 @@ gdk_content_provider_write_mime_type_finish (GdkContentProvider *provider,
|
||||
* provided in. This given `GType` does not need to be listed in the formats
|
||||
* returned by [method@Gdk.ContentProvider.ref_formats]. However, if the
|
||||
* given `GType` is not supported, this operation can fail and
|
||||
* #G_IO_ERROR_NOT_SUPPORTED will be reported.
|
||||
* `G_IO_ERROR_NOT_SUPPORTED` will be reported.
|
||||
*
|
||||
* Returns: %TRUE if the value was set successfully. Otherwise
|
||||
* @error will be set to describe the failure.
|
||||
* @error will be set to describe the failure.
|
||||
*/
|
||||
gboolean
|
||||
gdk_content_provider_get_value (GdkContentProvider *provider,
|
||||
@@ -377,7 +377,7 @@ gdk_content_provider_attach_clipboard (GdkContentProvider *provider,
|
||||
g_return_if_fail (GDK_IS_CONTENT_PROVIDER (provider));
|
||||
g_return_if_fail (GDK_IS_CLIPBOARD (clipboard));
|
||||
|
||||
return GDK_CONTENT_PROVIDER_GET_CLASS (provider)->attach_clipboard (provider, clipboard);
|
||||
GDK_CONTENT_PROVIDER_GET_CLASS (provider)->attach_clipboard (provider, clipboard);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -387,5 +387,5 @@ gdk_content_provider_detach_clipboard (GdkContentProvider *provider,
|
||||
g_return_if_fail (GDK_IS_CONTENT_PROVIDER (provider));
|
||||
g_return_if_fail (GDK_IS_CLIPBOARD (clipboard));
|
||||
|
||||
return GDK_CONTENT_PROVIDER_GET_CLASS (provider)->detach_clipboard (provider, clipboard);
|
||||
GDK_CONTENT_PROVIDER_GET_CLASS (provider)->detach_clipboard (provider, clipboard);
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ struct _GdkContentProvider
|
||||
|
||||
/**
|
||||
* GdkContentProviderClass:
|
||||
* @content_changed: Signal class closure for #GdkContentProvider::content-changed
|
||||
* @content_changed: Signal class closure for `GdkContentProvider::content-changed`
|
||||
*
|
||||
* Class structure for #GdkContentProvider.
|
||||
* Class structure for `GdkContentProvider`.
|
||||
*/
|
||||
struct _GdkContentProviderClass
|
||||
{
|
||||
|
||||
@@ -394,7 +394,7 @@ gdk_content_provider_union_init (GdkContentProviderUnion *self)
|
||||
/**
|
||||
* gdk_content_provider_new_union:
|
||||
* @providers: (nullable) (array length=n_providers) (transfer full):
|
||||
* The #GdkContentProviders to present the union of
|
||||
* The `GdkContentProvider`s to present the union of
|
||||
* @n_providers: the number of providers
|
||||
*
|
||||
* Creates a content provider that represents all the given @providers.
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
*
|
||||
* GTK provides serializers and deserializers for common data types
|
||||
* such as text, colors, images or file lists. To register your own
|
||||
* serialization functions, use [func@content_register_serializer].
|
||||
* serialization functions, use [func@Gdk.content_register_serializer].
|
||||
*
|
||||
* Also see [class@Gdk.ContentDeserializer].
|
||||
*/
|
||||
@@ -264,7 +264,7 @@ gdk_content_serializer_get_priority (GdkContentSerializer *serializer)
|
||||
*
|
||||
* Gets the cancellable for the current operation.
|
||||
*
|
||||
* This is the `GCancellable` that was passed to [content_serialize_async].
|
||||
* This is the `GCancellable` that was passed to [func@content_serialize_async].
|
||||
*
|
||||
* Returns: (transfer none): the cancellable for the current operation
|
||||
*/
|
||||
@@ -368,7 +368,7 @@ gdk_content_serializer_return_success (GdkContentSerializer *serializer)
|
||||
/**
|
||||
* gdk_content_serializer_return_error:
|
||||
* @serializer: a `GdkContentSerializer`
|
||||
* @error: a `GError`
|
||||
* @error: (transfer full): a `GError`
|
||||
*
|
||||
* Indicate that the serialization has ended with an error.
|
||||
*
|
||||
@@ -533,7 +533,7 @@ serialize_not_found (GdkContentSerializer *serializer)
|
||||
* @mime_type: the mime type to serialize to
|
||||
* @value: the content to serialize
|
||||
* @io_priority: the I/O priority of the operation
|
||||
* @cancellable: (nullable): optional #GCancellable object
|
||||
* @cancellable: (nullable): optional `GCancellable` object
|
||||
* @callback: (scope async): callback to call when the operation is done
|
||||
* @user_data: (closure): data to pass to the callback function
|
||||
*
|
||||
@@ -543,7 +543,7 @@ serialize_not_found (GdkContentSerializer *serializer)
|
||||
* indicate a higher priority.
|
||||
*
|
||||
* When the operation is finished, @callback will be called. You must then
|
||||
* call [func@content_serialize_finish] to get the result of the operation.
|
||||
* call [func@Gdk.content_serialize_finish] to get the result of the operation.
|
||||
*/
|
||||
void
|
||||
gdk_content_serialize_async (GOutputStream *stream,
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef struct _GdkContentSerializer GdkContentSerializer;
|
||||
|
||||
/**
|
||||
* GdkContentSerializeFunc:
|
||||
* @serializer: a #GdkContentSerializer
|
||||
* @serializer: a `GdkContentSerializer`
|
||||
*
|
||||
* The type of a function that can be registered with gdk_content_register_serializer().
|
||||
*
|
||||
|
||||
@@ -298,8 +298,8 @@ gdk_cursor_equal (gconstpointer a,
|
||||
/**
|
||||
* gdk_cursor_new_from_name:
|
||||
* @name: the name of the cursor
|
||||
* @fallback: (allow-none): %NULL or the `GdkCursor` to fall back to when
|
||||
* this one cannot be supported
|
||||
* @fallback: (nullable): %NULL or the `GdkCursor` to fall back to when
|
||||
* this one cannot be supported
|
||||
*
|
||||
* Creates a new cursor by looking up @name in the current cursor
|
||||
* theme.
|
||||
@@ -340,8 +340,8 @@ gdk_cursor_new_from_name (const char *name,
|
||||
* @texture: the texture providing the pixel data
|
||||
* @hotspot_x: the horizontal offset of the “hotspot” of the cursor
|
||||
* @hotspot_y: the vertical offset of the “hotspot” of the cursor
|
||||
* @fallback: (allow-none): %NULL or the `GdkCursor` to fall back to when
|
||||
* this one cannot be supported
|
||||
* @fallback: (nullable): %NULL or the `GdkCursor` to fall back to when
|
||||
* this one cannot be supported
|
||||
*
|
||||
* Creates a new cursor from a `GdkTexture`.
|
||||
*
|
||||
@@ -379,7 +379,7 @@ gdk_cursor_new_from_texture (GdkTexture *texture,
|
||||
* it is used on does not support textured cursors.
|
||||
*
|
||||
* Returns: (transfer none) (nullable): the fallback of the cursor or %NULL
|
||||
* to use the default cursor as fallback.
|
||||
* to use the default cursor as fallback
|
||||
*/
|
||||
GdkCursor *
|
||||
gdk_cursor_get_fallback (GdkCursor *cursor)
|
||||
@@ -410,7 +410,7 @@ gdk_cursor_get_name (GdkCursor *cursor)
|
||||
|
||||
/**
|
||||
* gdk_cursor_get_texture:
|
||||
* @cursor: a #GdkCursor.
|
||||
* @cursor: a `GdkCursor`
|
||||
*
|
||||
* Returns the texture for the cursor.
|
||||
*
|
||||
|
||||
@@ -41,9 +41,10 @@ typedef enum {
|
||||
GDK_DEBUG_GL_LEGACY = 1 << 15,
|
||||
GDK_DEBUG_GL_GLES = 1 << 16,
|
||||
GDK_DEBUG_GL_DEBUG = 1 << 17,
|
||||
GDK_DEBUG_VULKAN_DISABLE = 1 << 18,
|
||||
GDK_DEBUG_VULKAN_VALIDATE = 1 << 19,
|
||||
GDK_DEBUG_DEFAULT_SETTINGS= 1 << 20
|
||||
GDK_DEBUG_GL_GLX = 1 << 18,
|
||||
GDK_DEBUG_VULKAN_DISABLE = 1 << 19,
|
||||
GDK_DEBUG_VULKAN_VALIDATE = 1 << 20,
|
||||
GDK_DEBUG_DEFAULT_SETTINGS= 1 << 21
|
||||
} GdkDebugFlags;
|
||||
|
||||
extern guint _gdk_debug_flags;
|
||||
|
||||
@@ -107,7 +107,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
/**
|
||||
* GdkDevice:display: (attributes org.gtk.Property.get=gdk_device_get_display)
|
||||
*
|
||||
* The #GdkDisplay the #GdkDevice pertains to.
|
||||
* The `GdkDisplay` the `GdkDevice` pertains to.
|
||||
*/
|
||||
device_props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
@@ -520,19 +520,19 @@ gdk_device_get_property (GObject *object,
|
||||
/**
|
||||
* gdk_device_get_surface_at_position:
|
||||
* @device: pointer `GdkDevice` to query info to
|
||||
* @win_x: (out) (allow-none): return location for the X coordinate of the device location,
|
||||
* relative to the surface origin, or %NULL.
|
||||
* @win_y: (out) (allow-none): return location for the Y coordinate of the device location,
|
||||
* relative to the surface origin, or %NULL.
|
||||
* @win_x: (out) (optional): return location for the X coordinate
|
||||
* of the device location relative to the surface origin
|
||||
* @win_y: (out) (optional): return location for the Y coordinate
|
||||
* of the device location relative to the surface origin
|
||||
*
|
||||
* Obtains the surface underneath @device, returning the location of the
|
||||
* device in @win_x and @win_y
|
||||
* device in @win_x and @win_y.
|
||||
*
|
||||
* Returns %NULL if the surface tree under @device is not known to GDK
|
||||
* (for example, belongs to another application).
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the `GdkSurface` under the
|
||||
* device position, or %NULL
|
||||
* device position
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_device_get_surface_at_position (GdkDevice *device,
|
||||
@@ -1145,7 +1145,7 @@ _gdk_device_surface_at_position (GdkDevice *device,
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Returns: (nullable): the vendor ID, or %NULL
|
||||
* Returns: (nullable): the vendor ID
|
||||
*/
|
||||
const char *
|
||||
gdk_device_get_vendor_id (GdkDevice *device)
|
||||
@@ -1164,7 +1164,7 @@ gdk_device_get_vendor_id (GdkDevice *device)
|
||||
* This ID is retrieved from the device, and does not change.
|
||||
* See [method@Gdk.Device.get_vendor_id] for more information.
|
||||
*
|
||||
* Returns: (nullable): the product ID, or %NULL
|
||||
* Returns: (nullable): the product ID
|
||||
*/
|
||||
const char *
|
||||
gdk_device_get_product_id (GdkDevice *device)
|
||||
@@ -1190,7 +1190,7 @@ gdk_device_set_seat (GdkDevice *device,
|
||||
|
||||
/**
|
||||
* gdk_device_get_seat: (attributes org.gtk.Method.get_property=seat)
|
||||
* @device: A #GdkDevice
|
||||
* @device: A `GdkDevice`
|
||||
*
|
||||
* Returns the `GdkSeat` the device belongs to.
|
||||
*
|
||||
@@ -1239,7 +1239,7 @@ gdk_device_get_num_touches (GdkDevice *device)
|
||||
*
|
||||
* Retrieves the current tool for @device.
|
||||
*
|
||||
* Returns: (transfer none): the `GdkDeviceTool`, or %NULL
|
||||
* Returns: (transfer none): the `GdkDeviceTool`
|
||||
*/
|
||||
GdkDeviceTool *
|
||||
gdk_device_get_device_tool (GdkDevice *device)
|
||||
@@ -1368,8 +1368,7 @@ gdk_device_get_direction (GdkDevice *device)
|
||||
*
|
||||
* This is only relevant for keyboard devices.
|
||||
*
|
||||
* Returns: %TRUE if there are layouts with both directions,
|
||||
* %FALSE otherwise
|
||||
* Returns: %TRUE if there are layouts with both directions, %FALSE otherwise
|
||||
*/
|
||||
gboolean
|
||||
gdk_device_has_bidi_layouts (GdkDevice *device)
|
||||
|
||||
@@ -38,16 +38,16 @@ typedef struct _GdkTimeCoord GdkTimeCoord;
|
||||
/**
|
||||
* GdkInputSource:
|
||||
* @GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
|
||||
* pointer, even if it is something else, such as a trackball.)
|
||||
* pointer, even if it is something else, such as a trackball.)
|
||||
* @GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device.
|
||||
* @GDK_SOURCE_KEYBOARD: the device is a keyboard.
|
||||
* @GDK_SOURCE_TOUCHSCREEN: the device is a direct-input touch device, such
|
||||
* as a touchscreen or tablet
|
||||
* as a touchscreen or tablet
|
||||
* @GDK_SOURCE_TOUCHPAD: the device is an indirect touch device, such
|
||||
* as a touchpad
|
||||
* as a touchpad
|
||||
* @GDK_SOURCE_TRACKPOINT: the device is a trackpoint
|
||||
* @GDK_SOURCE_TABLET_PAD: the device is a "pad", a collection of buttons,
|
||||
* rings and strips found in drawing tablets
|
||||
* rings and strips found in drawing tablets
|
||||
*
|
||||
* An enumeration describing the type of an input device in general terms.
|
||||
*/
|
||||
@@ -64,11 +64,11 @@ typedef enum
|
||||
|
||||
/**
|
||||
* GdkTimeCoord:
|
||||
* @time: The timestamp for this event.
|
||||
* @time: The timestamp for this event
|
||||
* @flags: Flags indicating what axes are present
|
||||
* @axes: (array fixed-size=12): axis values
|
||||
*
|
||||
* A #GdkTimeCoord stores a single event in a motion history.
|
||||
* A `GdkTimeCoord` stores a single event in a motion history.
|
||||
*/
|
||||
struct _GdkTimeCoord
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* (current) for each given group, different groups may have different
|
||||
* current modes. The number of available modes in a group can be found
|
||||
* out through [method@Gdk.DevicePad.get_group_n_modes], and the current mode
|
||||
* for a given group will be notified through events of type #GDK_PAD_GROUP_MODE.
|
||||
* for a given group will be notified through events of type `GDK_PAD_GROUP_MODE`.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -1036,8 +1036,7 @@ gdk_display_real_get_app_launch_context (GdkDisplay *display)
|
||||
* Returns a `GdkAppLaunchContext` suitable for launching
|
||||
* applications on the given display.
|
||||
*
|
||||
* Returns: (transfer full): a new `GdkAppLaunchContext` for @display.
|
||||
* Free with g_object_unref() when done
|
||||
* Returns: (transfer full): a new `GdkAppLaunchContext` for @display
|
||||
*/
|
||||
GdkAppLaunchContext *
|
||||
gdk_display_get_app_launch_context (GdkDisplay *display)
|
||||
@@ -1053,8 +1052,9 @@ gdk_display_get_app_launch_context (GdkDisplay *display)
|
||||
*
|
||||
* Opens a display.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a `GdkDisplay`, or %NULL if the
|
||||
* display could not be opened
|
||||
* If opening the display fails, `NULL` is returned.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a `GdkDisplay`
|
||||
*/
|
||||
GdkDisplay *
|
||||
gdk_display_open (const char *display_name)
|
||||
@@ -1073,7 +1073,7 @@ _gdk_display_get_next_serial (GdkDisplay *display)
|
||||
* gdk_display_notify_startup_complete:
|
||||
* @display: a `GdkDisplay`
|
||||
* @startup_id: a startup-notification identifier, for which
|
||||
* notification process should be completed
|
||||
* notification process should be completed
|
||||
*
|
||||
* Indicates to the GUI environment that the application has
|
||||
* finished loading, using a given identifier.
|
||||
@@ -1099,7 +1099,7 @@ gdk_display_notify_startup_complete (GdkDisplay *display,
|
||||
* Gets the startup notification ID for a Wayland display, or %NULL
|
||||
* if no ID has been defined.
|
||||
*
|
||||
* Returns: (nullable): the startup notification ID for @display, or %NULL
|
||||
* Returns: (nullable): the startup notification ID for @display
|
||||
*/
|
||||
const char *
|
||||
gdk_display_get_startup_notification_id (GdkDisplay *display)
|
||||
@@ -1141,13 +1141,13 @@ gdk_display_create_surface (GdkDisplay *display,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
/*< private >
|
||||
* gdk_display_get_keymap:
|
||||
* @display: the `GdkDisplay`
|
||||
*
|
||||
* Returns the #GdkKeymap attached to @display.
|
||||
* Returns the `GdkKeymap` attached to @display.
|
||||
*
|
||||
* Returns: (transfer none): the #GdkKeymap attached to @display.
|
||||
* Returns: (transfer none): the `GdkKeymap` attached to @display.
|
||||
*/
|
||||
GdkKeymap *
|
||||
gdk_display_get_keymap (GdkDisplay *display)
|
||||
@@ -1159,8 +1159,8 @@ gdk_display_get_keymap (GdkDisplay *display)
|
||||
|
||||
/*< private >
|
||||
* gdk_display_make_gl_context_current:
|
||||
* @display: a #GdkDisplay
|
||||
* @context: (optional): a #GdkGLContext, or %NULL
|
||||
* @display: a `GdkDisplay`
|
||||
* @context: (optional): a `GdkGLContext`
|
||||
*
|
||||
* Makes the given @context the current GL context, or unsets
|
||||
* the current GL context if @context is %NULL.
|
||||
@@ -1243,7 +1243,7 @@ gdk_display_set_composited (GdkDisplay *display,
|
||||
* On modern displays, this value is always %TRUE.
|
||||
*
|
||||
* Returns: %TRUE if surfaces are created with an alpha channel or
|
||||
* %FALSE if the display does not support this functionality.
|
||||
* %FALSE if the display does not support this functionality.
|
||||
*/
|
||||
gboolean
|
||||
gdk_display_is_rgba (GdkDisplay *display)
|
||||
@@ -1343,8 +1343,8 @@ gdk_display_get_default_seat (GdkDisplay *display)
|
||||
* Returns the list of seats known to @display.
|
||||
*
|
||||
* Returns: (transfer container) (element-type GdkSeat): the
|
||||
* list of seats known to the `GdkDisplay`
|
||||
**/
|
||||
* list of seats known to the `GdkDisplay`
|
||||
*/
|
||||
GList *
|
||||
gdk_display_list_seats (GdkDisplay *display)
|
||||
{
|
||||
@@ -1365,7 +1365,7 @@ gdk_display_list_seats (GdkDisplay *display)
|
||||
* You can listen to the GListModel::items-changed signal on
|
||||
* this list to monitor changes to the monitor of this display.
|
||||
*
|
||||
* Returns: (transfer none): a #GListModel of `GdkMonitor`
|
||||
* Returns: (transfer none): a `GListModel` of `GdkMonitor`
|
||||
*/
|
||||
GListModel *
|
||||
gdk_display_get_monitors (GdkDisplay *self)
|
||||
@@ -1502,7 +1502,7 @@ gdk_display_set_cursor_theme (GdkDisplay *display,
|
||||
* @display: a `GdkDisplay`
|
||||
* @keyval: a keyval, such as %GDK_KEY_a, %GDK_KEY_Up, %GDK_KEY_Return, etc.
|
||||
* @keys: (out) (array length=n_keys) (transfer full): return location
|
||||
* for an array of `GdkKeymapKey`
|
||||
* for an array of `GdkKeymapKey`
|
||||
* @n_keys: return location for number of elements in returned array
|
||||
*
|
||||
* Obtains a list of keycode/group/level combinations that will
|
||||
@@ -1540,9 +1540,9 @@ gdk_display_map_keyval (GdkDisplay *display,
|
||||
* @display: a `GdkDisplay`
|
||||
* @keycode: a keycode
|
||||
* @keys: (out) (array length=n_entries) (transfer full) (optional): return
|
||||
* location for array of `GdkKeymapKey`, or %NULL
|
||||
* location for array of `GdkKeymapKey`
|
||||
* @keyvals: (out) (array length=n_entries) (transfer full) (optional): return
|
||||
* location for array of keyvals, or %NULL
|
||||
* location for array of keyvals
|
||||
* @n_entries: length of @keys and @keyvals
|
||||
*
|
||||
* Returns the keyvals bound to @keycode.
|
||||
@@ -1577,12 +1577,11 @@ gdk_display_map_keycode (GdkDisplay *display,
|
||||
* @keycode: a keycode
|
||||
* @state: a modifier state
|
||||
* @group: active keyboard group
|
||||
* @keyval: (out) (optional): return location for keyval, or %NULL
|
||||
* @effective_group: (out) (optional): return location for effective
|
||||
* group, or %NULL
|
||||
* @level: (out) (optional): return location for level, or %NULL
|
||||
* @consumed: (out) (optional): return location for modifiers
|
||||
* that were used to determine the group or level, or %NULL
|
||||
* @keyval: (out) (optional): return location for keyval
|
||||
* @effective_group: (out) (optional): return location for effective group
|
||||
* @level: (out) (optional): return location for level
|
||||
* @consumed: (out) (optional): return location for modifiers that were used
|
||||
* to determine the group or level
|
||||
*
|
||||
* Translates the contents of a `GdkEventKey` into a keyval, effective group,
|
||||
* and level.
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
*
|
||||
* When writing backend-specific code that is supposed to work with
|
||||
* multiple GDK backends, you have to consider both compile time and
|
||||
* runtime. At compile time, use the #GDK_WINDOWING_X11, #GDK_WINDOWING_WIN32
|
||||
* runtime. At compile time, use the `GDK_WINDOWING_X11`, `GDK_WINDOWING_WIN32`
|
||||
* macros, etc. to find out which backends are present in the GDK library
|
||||
* you are building your application against. At runtime, use type-check
|
||||
* macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:
|
||||
@@ -309,8 +309,7 @@ gdk_display_manager_get (void)
|
||||
*
|
||||
* Gets the default `GdkDisplay`.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a `GdkDisplay`, or %NULL if
|
||||
* there is no default display.
|
||||
* Returns: (nullable) (transfer none): a `GdkDisplay`
|
||||
*/
|
||||
GdkDisplay *
|
||||
gdk_display_manager_get_default_display (GdkDisplayManager *manager)
|
||||
@@ -361,8 +360,7 @@ gdk_display_manager_set_default_display (GdkDisplayManager *manager,
|
||||
* List all currently open displays.
|
||||
*
|
||||
* Returns: (transfer container) (element-type GdkDisplay): a newly
|
||||
* allocated `GSList` of `GdkDisplay` objects. Free with g_slist_free()
|
||||
* when you are done with it.
|
||||
* allocated `GSList` of `GdkDisplay` objects
|
||||
*/
|
||||
GSList *
|
||||
gdk_display_manager_list_displays (GdkDisplayManager *manager)
|
||||
|
||||
@@ -692,7 +692,7 @@ gdk_drag_set_selected_action (GdkDrag *drag,
|
||||
* drag operation. The surface is owned by @drag and will be destroyed
|
||||
* when the drag operation is over.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the drag surface, or %NULL
|
||||
* Returns: (nullable) (transfer none): the drag surface
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_drag_get_drag_surface (GdkDrag *drag)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/**
|
||||
* GdkDragSurface:
|
||||
*
|
||||
* A #GdkDragSurface is an interface for surfaces used during DND.
|
||||
* A `GdkDragSurface` is an interface for surfaces used during DND.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -188,7 +188,7 @@ gdk_draw_context_init (GdkDrawContext *self)
|
||||
* may be effecting the contents of the @context's surface.
|
||||
*
|
||||
* Returns: %TRUE if the context is between [method@Gdk.DrawContext.begin_frame]
|
||||
* and [method@Gdk.DrawContext.end_frame] calls.
|
||||
* and [method@Gdk.DrawContext.end_frame] calls.
|
||||
*/
|
||||
gboolean
|
||||
gdk_draw_context_is_in_frame (GdkDrawContext *context)
|
||||
@@ -219,7 +219,7 @@ gdk_draw_context_surface_resized (GdkDrawContext *context)
|
||||
*
|
||||
* Retrieves the `GdkDisplay` the @context is created for
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a `GdkDisplay` or %NULL
|
||||
* Returns: (nullable) (transfer none): the `GdkDisplay`
|
||||
*/
|
||||
GdkDisplay *
|
||||
gdk_draw_context_get_display (GdkDrawContext *context)
|
||||
@@ -237,7 +237,7 @@ gdk_draw_context_get_display (GdkDrawContext *context)
|
||||
*
|
||||
* Retrieves the surface that @context is bound to.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GdkSurface or %NULL
|
||||
* Returns: (nullable) (transfer none): a `GdkSurface`
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_draw_context_get_surface (GdkDrawContext *context)
|
||||
@@ -271,7 +271,7 @@ gdk_draw_context_get_surface (GdkDrawContext *context)
|
||||
* Note that the @region passed to this function is the minimum region that
|
||||
* needs to be drawn and depending on implementation, windowing system and
|
||||
* hardware in use, it might be necessary to draw a larger region. Drawing
|
||||
* implementation must use [method@Gdk.DrawContext.get_frame_region() to
|
||||
* implementation must use [method@Gdk.DrawContext.get_frame_region] to
|
||||
* query the region that must be drawn.
|
||||
*
|
||||
* When using GTK, the widget system automatically places calls to
|
||||
@@ -382,7 +382,7 @@ gdk_draw_context_end_frame (GdkDrawContext *context)
|
||||
|
||||
/**
|
||||
* gdk_draw_context_get_frame_region:
|
||||
* @context: a #GdkDrawContext
|
||||
* @context: a `GdkDrawContext`
|
||||
*
|
||||
* Retrieves the region that is currently being repainted.
|
||||
*
|
||||
@@ -393,8 +393,7 @@ gdk_draw_context_end_frame (GdkDrawContext *context)
|
||||
* If @context is not in between calls to [method@Gdk.DrawContext.begin_frame]
|
||||
* and [method@Gdk.DrawContext.end_frame], %NULL will be returned.
|
||||
*
|
||||
* Returns: (transfer none) (nullable): a Cairo region or %NULL if not drawing
|
||||
* a frame.
|
||||
* Returns: (transfer none) (nullable): a Cairo region
|
||||
*/
|
||||
const cairo_region_t *
|
||||
gdk_draw_context_get_frame_region (GdkDrawContext *context)
|
||||
|
||||
@@ -657,12 +657,11 @@ gdk_drop_read_internal (GdkDrop *self,
|
||||
* gdk_drop_read_async:
|
||||
* @self: a `GdkDrop`
|
||||
* @mime_types: (array zero-terminated=1) (element-type utf8):
|
||||
* pointer to an array of mime types
|
||||
* pointer to an array of mime types
|
||||
* @io_priority: the I/O priority for the read operation
|
||||
* @cancellable: (allow-none): optional `GCancellable` object,
|
||||
* %NULL to ignore
|
||||
* @cancellable: (nullable): optional `GCancellable` object
|
||||
* @callback: (scope async): a `GAsyncReadyCallback` to call when
|
||||
* the request is satisfied
|
||||
* the request is satisfied
|
||||
* @user_data: (closure): the data to pass to @callback
|
||||
*
|
||||
* Asynchronously read the dropped data from a `GdkDrop`
|
||||
@@ -695,7 +694,7 @@ gdk_drop_read_async (GdkDrop *self,
|
||||
* @self: a `GdkDrop`
|
||||
* @result: a `GAsyncResult`
|
||||
* @out_mime_type: (out) (type utf8): return location for the used mime type
|
||||
* @error: (allow-none): location to store error information on failure, or %NULL
|
||||
* @error: (nullable): location to store error information on failure
|
||||
*
|
||||
* Finishes an async drop read operation.
|
||||
*
|
||||
@@ -706,7 +705,7 @@ gdk_drop_read_async (GdkDrop *self,
|
||||
*
|
||||
* See [method@Gdk.Drop.read_async].
|
||||
*
|
||||
* Returns: (nullable) (transfer full): the `GInputStream`, or %NULL
|
||||
* Returns: (nullable) (transfer full): the `GInputStream`
|
||||
*/
|
||||
GInputStream *
|
||||
gdk_drop_read_finish (GdkDrop *self,
|
||||
@@ -892,7 +891,7 @@ gdk_drop_read_value_async (GdkDrop *self,
|
||||
* gdk_drop_read_value_finish:
|
||||
* @self: a `GdkDrop`
|
||||
* @result: a `GAsyncResult`
|
||||
* @error: a `GError` location to store the error occurring, or %NULL to ignore
|
||||
* @error: a `GError` location to store the error occurring
|
||||
*
|
||||
* Finishes an async drop read.
|
||||
*
|
||||
|
||||
@@ -258,7 +258,7 @@ gdk_event_get_type (void)
|
||||
* @instance_size: the size of the instance of a GdkEvent subclass
|
||||
* @instance_init: (nullable): the function to initialize the instance data
|
||||
* @finalize: (nullable): the function to free the instance data
|
||||
* @get_state: (nullable): the function to retrieve the #GdkModifierType
|
||||
* @get_state: (nullable): the function to retrieve the `GdkModifierType`:w
|
||||
* associated to the event
|
||||
* @get_position: (nullable): the function to retrieve the event coordinates
|
||||
* @get_sequence: (nullable): the function to retrieve the event sequence
|
||||
@@ -358,7 +358,7 @@ static GType gdk_event_types[GDK_EVENT_LAST];
|
||||
* Similarly to %G_DEFINE_TYPE_WITH_CODE, this macro will generate a `get_type()`
|
||||
* function that registers the event type.
|
||||
*
|
||||
* You can specify code to be run after the type registration; the #GType of
|
||||
* You can specify code to be run after the type registration; the `GType` of
|
||||
* the event is available in the `gdk_define_event_type_id` variable.
|
||||
*/
|
||||
#define GDK_DEFINE_EVENT_TYPE(TypeName, type_name, type_info, _C_) \
|
||||
@@ -382,8 +382,8 @@ type_name ## _get_type (void) \
|
||||
/*< private >
|
||||
* gdk_event_alloc:
|
||||
* @event_type: the `GdkEvent`Type to allocate
|
||||
* @surface: (nullable): the #GdkSurface of the event
|
||||
* @device: (nullable): the #GdkDevice of the event
|
||||
* @surface: (nullable): the `GdkSurface` of the event
|
||||
* @device: (nullable): the `GdkDevice` of the event
|
||||
* @time_: the event serial
|
||||
*
|
||||
* Allocates a `GdkEvent` for the given @event_type, and sets its
|
||||
@@ -496,14 +496,13 @@ _gdk_event_emit (GdkEvent *event)
|
||||
|
||||
/**
|
||||
* _gdk_event_queue_find_first:
|
||||
* @display: a #GdkDisplay
|
||||
*
|
||||
* @display: a `GdkDisplay`
|
||||
*
|
||||
* Find the first event on the queue that is not still
|
||||
* being filled in.
|
||||
*
|
||||
* Returns: (nullable): Pointer to the list node for that event, or
|
||||
* %NULL.
|
||||
**/
|
||||
*
|
||||
* Returns: (nullable): Pointer to the list node for that event
|
||||
*/
|
||||
GList*
|
||||
_gdk_event_queue_find_first (GdkDisplay *display)
|
||||
{
|
||||
@@ -537,13 +536,13 @@ _gdk_event_queue_find_first (GdkDisplay *display)
|
||||
|
||||
/**
|
||||
* _gdk_event_queue_append:
|
||||
* @display: a #GdkDisplay
|
||||
* @event: Event to append.
|
||||
*
|
||||
* @display: a `GdkDisplay`
|
||||
* @event: Event to append
|
||||
*
|
||||
* Appends an event onto the tail of the event queue.
|
||||
*
|
||||
* Returns: the newly appended list node.
|
||||
**/
|
||||
*/
|
||||
GList *
|
||||
_gdk_event_queue_append (GdkDisplay *display,
|
||||
GdkEvent *event)
|
||||
@@ -555,11 +554,11 @@ _gdk_event_queue_append (GdkDisplay *display,
|
||||
|
||||
/*
|
||||
* _gdk_event_queue_remove_link:
|
||||
* @display: a #GdkDisplay
|
||||
* @display: a `GdkDisplay`
|
||||
* @node: node to remove
|
||||
*
|
||||
* Removes a specified list node from the event queue.
|
||||
**/
|
||||
*/
|
||||
void
|
||||
_gdk_event_queue_remove_link (GdkDisplay *display,
|
||||
GList *node)
|
||||
@@ -569,14 +568,13 @@ _gdk_event_queue_remove_link (GdkDisplay *display,
|
||||
|
||||
/*
|
||||
* _gdk_event_unqueue:
|
||||
* @display: a #GdkDisplay
|
||||
* @display: a `GdkDisplay`
|
||||
*
|
||||
* Removes and returns the first event from the event
|
||||
* queue that is not still being filled in.
|
||||
*
|
||||
* Returns: (nullable): the event, or %NULL. Ownership is transferred
|
||||
* to the caller.
|
||||
**/
|
||||
* Returns: (nullable): the event
|
||||
*/
|
||||
GdkEvent*
|
||||
_gdk_event_unqueue (GdkDisplay *display)
|
||||
{
|
||||
@@ -1181,7 +1179,7 @@ gdk_event_get_event_type (GdkEvent *event)
|
||||
*
|
||||
* Extracts the surface associated with an event.
|
||||
*
|
||||
* Returns: (transfer none): The #GdkSurface associated with the event
|
||||
* Returns: (transfer none): The `GdkSurface` associated with the event
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_event_get_surface (GdkEvent *event)
|
||||
@@ -1197,7 +1195,7 @@ gdk_event_get_surface (GdkEvent *event)
|
||||
*
|
||||
* Returns the seat that originated the event.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GdkSeat.
|
||||
* Returns: (nullable) (transfer none): a `GdkSeat`.
|
||||
*/
|
||||
GdkSeat *
|
||||
gdk_event_get_seat (GdkEvent *event)
|
||||
@@ -1213,7 +1211,7 @@ gdk_event_get_seat (GdkEvent *event)
|
||||
*
|
||||
* Returns the device of an event.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GdkDevice.
|
||||
* Returns: (nullable) (transfer none): a `GdkDevice`
|
||||
*/
|
||||
GdkDevice *
|
||||
gdk_event_get_device (GdkEvent *event)
|
||||
@@ -1238,8 +1236,8 @@ gdk_event_get_device (GdkEvent *event)
|
||||
* the application lifetime, if settings must be stored
|
||||
* persistently across runs, see [method@Gdk.DeviceTool.get_serial].
|
||||
*
|
||||
* Returns: (transfer none) (nullable): The current device tool, or %NULL
|
||||
**/
|
||||
* Returns: (transfer none) (nullable): The current device tool
|
||||
*/
|
||||
GdkDeviceTool *
|
||||
gdk_event_get_device_tool (GdkEvent *event)
|
||||
{
|
||||
@@ -1273,7 +1271,7 @@ gdk_event_get_time (GdkEvent *event)
|
||||
*
|
||||
* Retrieves the display associated to the @event.
|
||||
*
|
||||
* Returns: (transfer none) (nullable): a #GdkDisplay
|
||||
* Returns: (transfer none) (nullable): a `GdkDisplay`
|
||||
*/
|
||||
GdkDisplay *
|
||||
gdk_event_get_display (GdkEvent *event)
|
||||
|
||||
@@ -491,7 +491,7 @@ gboolean gdk_events_get_center (GdkEvent *event1,
|
||||
* GdkKeyMatch:
|
||||
* @GDK_KEY_MATCH_NONE: The key event does not match
|
||||
* @GDK_KEY_MATCH_PARTIAL: The key event matches if keyboard state
|
||||
* (specifically, the currently active group) is ignored
|
||||
* (specifically, the currently active group) is ignored
|
||||
* @GDK_KEY_MATCH_EXACT: The key event matches
|
||||
*
|
||||
* Describes how well an event matches a given keyval and modifiers.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user