Compare commits
815 Commits
label-cach
...
text-to-pa
Author | SHA1 | Date | |
---|---|---|---|
|
f088650181 | ||
|
aadcc60583 | ||
|
2a70b590f1 | ||
|
e9d01c1a63 | ||
|
e235392894 | ||
|
73904f3034 | ||
|
c2ed71af7a | ||
|
aa2f6345c8 | ||
|
cef1bc9098 | ||
|
828ccc51d9 | ||
|
8397d10c20 | ||
|
78d06e58d0 | ||
|
a5e13cc96b | ||
|
776dc54c8a | ||
|
ee6879fba8 | ||
|
14f9395476 | ||
|
1349cf2454 | ||
|
d47ebd388c | ||
|
61214221b3 | ||
|
7eb4ed8f86 | ||
|
92b472fec1 | ||
|
7a6b008479 | ||
|
d8c26172a5 | ||
|
da835321a5 | ||
|
30635d1cac | ||
|
a60b72ba58 | ||
|
36347892d8 | ||
|
924f0bc2c5 | ||
|
23c5318de1 | ||
|
678405bd22 | ||
|
946b76881b | ||
|
061683344f | ||
|
af9a85616d | ||
|
0f332de3d3 | ||
|
15e8f2bacc | ||
|
25f9eadb0d | ||
|
ced2959cdd | ||
|
3c363f00d5 | ||
|
a9ad37ed89 | ||
|
acdf04287d | ||
|
34725c1207 | ||
|
cb10cf07e6 | ||
|
a7ba2bde86 | ||
|
87b3cb1df8 | ||
|
2478963cbb | ||
|
abbbaef7e8 | ||
|
69177416a0 | ||
|
ff47bfdbcf | ||
|
120e449bdd | ||
|
237c37f6c2 | ||
|
683729c388 | ||
|
9fe71e7dae | ||
|
c74970e6c1 | ||
|
5225d01504 | ||
|
916d950069 | ||
|
76d6fed248 | ||
|
7ff6235ae6 | ||
|
9b957c26cb | ||
|
445b2382e6 | ||
|
790a4201c3 | ||
|
00b9af65b5 | ||
|
f7c367338c | ||
|
5d69887618 | ||
|
b658c26a3e | ||
|
e4c147cf2f | ||
|
fc2c6f1566 | ||
|
b0d6130905 | ||
|
a0b9238a15 | ||
|
801c63494c | ||
|
d2cfe74140 | ||
|
a3ac003546 | ||
|
483a4773cd | ||
|
c82ad0214e | ||
|
207feeb7a9 | ||
|
9a2e4ac9a9 | ||
|
2bd3aa3cbe | ||
|
118e41f432 | ||
|
2d7897a769 | ||
|
c279e1aa1e | ||
|
3c91d0be91 | ||
|
e7bbed54b5 | ||
|
4eb7d68970 | ||
|
98337f7115 | ||
|
08ee6c7acf | ||
|
c815496fe3 | ||
|
9c84fa127a | ||
|
84c6708366 | ||
|
f7e3016949 | ||
|
dd1110ca5c | ||
|
28c4adac24 | ||
|
7e579bb59a | ||
|
96e1b85c2c | ||
|
71e616d17e | ||
|
f85d939e5e | ||
|
8d014d6cb0 | ||
|
f7f8990f7a | ||
|
d6f288427a | ||
|
2a8f371643 | ||
|
dee863dbb2 | ||
|
7d6877ec80 | ||
|
f426d23690 | ||
|
e128a77eed | ||
|
5cd2ee927a | ||
|
e854b90293 | ||
|
6d042d9e61 | ||
|
4310f24a4e | ||
|
aebf8e3c29 | ||
|
fcd449f0d4 | ||
|
ab1b117d91 | ||
|
1253296387 | ||
|
466484176f | ||
|
20289ad8e1 | ||
|
0abb8c6862 | ||
|
147386189f | ||
|
9cec9e4ce2 | ||
|
26119af7a6 | ||
|
478d1f71e3 | ||
|
b1d952b8a2 | ||
|
b9bcdbbfdc | ||
|
6c31ed53f4 | ||
|
aa95ae774f | ||
|
65adfd9243 | ||
|
c4a8c0893b | ||
|
e90f5e8a20 | ||
|
526c76181e | ||
|
cf352374ae | ||
|
98b99201b0 | ||
|
bce4d669ee | ||
|
e7a326e230 | ||
|
9eaeaa8452 | ||
|
2031c5bf90 | ||
|
9fefa7b44c | ||
|
a2a70c3b65 | ||
|
0b4ed8d791 | ||
|
c34f98931e | ||
|
2feac2772f | ||
|
fdda4e4e99 | ||
|
e1cf0cff26 | ||
|
634fa772c9 | ||
|
4b3bbe0ecd | ||
|
cde43541d0 | ||
|
186287ecfb | ||
|
bd5d1615ac | ||
|
21299cc7e4 | ||
|
e747ea7dfd | ||
|
810cd7881e | ||
|
a8213d7f45 | ||
|
e6f6d1e478 | ||
|
933d241bba | ||
|
7249c3a09b | ||
|
d13f8ac3a9 | ||
|
fa35e3b874 | ||
|
853883c6e5 | ||
|
b467279c7d | ||
|
c6a5ac1d16 | ||
|
e41288de4f | ||
|
b886988a54 | ||
|
bb8a459fe2 | ||
|
d5143a1bf0 | ||
|
12611fa142 | ||
|
3e319b409b | ||
|
f2b16836c2 | ||
|
14bf45a0d5 | ||
|
0c6a6b3370 | ||
|
9521f609d8 | ||
|
7533369695 | ||
|
f31765d5dd | ||
|
d33062795c | ||
|
2da8d9b0ac | ||
|
3f56e8191f | ||
|
bf4c3dc2c5 | ||
|
a5365ec8cb | ||
|
ec94ec0286 | ||
|
af0973c847 | ||
|
e71f6b0bc0 | ||
|
1738724e4a | ||
|
e9e09be37e | ||
|
8a923e02a1 | ||
|
4f12e2f711 | ||
|
addcf57b4d | ||
|
db08bccb11 | ||
|
02f0681344 | ||
|
62dbadd536 | ||
|
0588db8a69 | ||
|
58b1a13453 | ||
|
df70dbbae4 | ||
|
81c55b06d2 | ||
|
591c2f0595 | ||
|
9c5a42be0d | ||
|
45b7fa15e5 | ||
|
e3de92f1ea | ||
|
2ffa2be64e | ||
|
387078b40c | ||
|
5203bf0b83 | ||
|
fb93baeae4 | ||
|
9fa4c2f5b8 | ||
|
cc9528eaec | ||
|
73dda96711 | ||
|
d711acc954 | ||
|
ab59c47880 | ||
|
e4b7847904 | ||
|
308115ebae | ||
|
1cb72536ea | ||
|
f24429e84a | ||
|
fc4402b456 | ||
|
077aec5d32 | ||
|
548949214c | ||
|
2aec47f56f | ||
|
344eb21bee | ||
|
4fb55b3270 | ||
|
75764c284d | ||
|
c95a32def8 | ||
|
142f7862ed | ||
|
b6412adc32 | ||
|
7eece7e769 | ||
|
7f6608cbed | ||
|
f816a8fb82 | ||
|
3c2484142d | ||
|
2192bb3dde | ||
|
e1df9a043f | ||
|
338d3ffa13 | ||
|
6039a36183 | ||
|
c551f693c2 | ||
|
5d2278a5ca | ||
|
ea5e186bb8 | ||
|
69b181f263 | ||
|
3132b10bc0 | ||
|
7335e166b7 | ||
|
91bba794a6 | ||
|
a6bd0c7eed | ||
|
ff351721b2 | ||
|
538aa6c200 | ||
|
f546e03d31 | ||
|
bdbea0d037 | ||
|
474b4ac1af | ||
|
99e0929d6c | ||
|
e75e44bdcc | ||
|
7975bbfcaa | ||
|
11bca98a29 | ||
|
618186723a | ||
|
a5986f0dcd | ||
|
c162d7148f | ||
|
7e1a210ae0 | ||
|
bf5e3efd54 | ||
|
08d52bee14 | ||
|
a6e9a9b644 | ||
|
dc96542742 | ||
|
e2afb59a0b | ||
|
daa5d5aead | ||
|
fd0a03cf78 | ||
|
34d99ea1d0 | ||
|
90355c0b27 | ||
|
538cf9e294 | ||
|
8e3f2b879e | ||
|
8fa6a25aa5 | ||
|
96a300b2de | ||
|
aeca9cb7ba | ||
|
c2727e6e04 | ||
|
8be0918d7e | ||
|
612d3bca7d | ||
|
e9fe270e94 | ||
|
8402665c55 | ||
|
79090f1755 | ||
|
3d84a38867 | ||
|
5155fac94f | ||
|
7a4d15dc67 | ||
|
e4d8d50a8b | ||
|
3c9a13e6cf | ||
|
2c97d44281 | ||
|
2d3a398678 | ||
|
d380ed2b3a | ||
|
644a45714a | ||
|
324683993e | ||
|
f6f6241627 | ||
|
6a33bed353 | ||
|
f83ee0be23 | ||
|
7442bdc383 | ||
|
82950528ed | ||
|
97eaef8308 | ||
|
92189cf96a | ||
|
b8a651df47 | ||
|
c0ed89be9a | ||
|
ade4bcb125 | ||
|
c5dd34344f | ||
|
c90cc976a5 | ||
|
bd9bcd5905 | ||
|
0ddcbb52e6 | ||
|
2457f3d54c | ||
|
1cc207af32 | ||
|
f4a0d57c07 | ||
|
a76ee61e97 | ||
|
fac367495b | ||
|
76177b6065 | ||
|
433f305fa9 | ||
|
fce824e78f | ||
|
c4b768a4ec | ||
|
6d1be832d9 | ||
|
a828d4318e | ||
|
a36ccd7f42 | ||
|
b4a7fe8d8f | ||
|
43e4848872 | ||
|
80d4a08e30 | ||
|
47d0b5ad0c | ||
|
c59b433395 | ||
|
18d06a1cd5 | ||
|
f13041360a | ||
|
0236fe80c1 | ||
|
2caf283323 | ||
|
6fb66e299a | ||
|
398a74d871 | ||
|
08ca8a361e | ||
|
1f141c1953 | ||
|
1e14a91cb9 | ||
|
074b933ae4 | ||
|
7b7f3342d8 | ||
|
adc4bcbd24 | ||
|
130ff5f841 | ||
|
fea1b151e6 | ||
|
6e0fffa0f8 | ||
|
d2c95a1b13 | ||
|
8f8c5040db | ||
|
3b69facf0b | ||
|
a6bc4c95b1 | ||
|
59fd171515 | ||
|
3db0d06901 | ||
|
d7d738d745 | ||
|
ac17217c69 | ||
|
2e5eeb6b92 | ||
|
eb0eac0f03 | ||
|
27077d5be8 | ||
|
fd01723470 | ||
|
994aa41ccc | ||
|
c791185c20 | ||
|
e7ddaf5ed1 | ||
|
2217cf8ea2 | ||
|
3bbeb891c4 | ||
|
ff23a2a582 | ||
|
8396bdb759 | ||
|
351d88f7ae | ||
|
dfb7ab3352 | ||
|
8e3ee58e3f | ||
|
40a9baa2db | ||
|
4b2aae9950 | ||
|
9d3f497a21 | ||
|
517bc0db84 | ||
|
369b03a3d8 | ||
|
2cddec7798 | ||
|
f7fceab40b | ||
|
3b66f63523 | ||
|
96450ed9cc | ||
|
5eee1dfcd1 | ||
|
19d2a4ab94 | ||
|
6ee7535af0 | ||
|
b738054344 | ||
|
b8fa892b70 | ||
|
ca65ee8d50 | ||
|
5eca548acc | ||
|
42679f2903 | ||
|
b431e39d4e | ||
|
606cb51293 | ||
|
62e0c0de59 | ||
|
30f789650f | ||
|
3f96d4b6da | ||
|
0dcd4a5bdb | ||
|
8a599b2582 | ||
|
a798edc360 | ||
|
e51c32b9c1 | ||
|
048a0172a0 | ||
|
64f6118af4 | ||
|
14b5a5a4c7 | ||
|
4083f7e47f | ||
|
2854d0339c | ||
|
98fffe6f23 | ||
|
f083849ebb | ||
|
deb58339b9 | ||
|
65ad9d6d96 | ||
|
e0f13ecae7 | ||
|
880ceebae4 | ||
|
8c014e63af | ||
|
ecd40fa265 | ||
|
3b140a05a4 | ||
|
d38f81999e | ||
|
efcfd23652 | ||
|
70b83c9a70 | ||
|
4779e4e488 | ||
|
13931463bd | ||
|
ecc861bf06 | ||
|
475c07e935 | ||
|
0c8d97e3f7 | ||
|
8d4f8f0cfc | ||
|
289b50785b | ||
|
68c14242b2 | ||
|
4af54fb410 | ||
|
13b4a4b24c | ||
|
e07fde5c81 | ||
|
8f27b3fcf6 | ||
|
251bd15597 | ||
|
dd738d2787 | ||
|
18d92c3f16 | ||
|
f4c36fe1ce | ||
|
23d7392eb9 | ||
|
996eeec16c | ||
|
641915974b | ||
|
528ec4dded | ||
|
366b946f5b | ||
|
9e6a55a086 | ||
|
285781724f | ||
|
2d103cf80c | ||
|
c8d991e4de | ||
|
a165bb9f46 | ||
|
33ed42d985 | ||
|
1ee4f6138b | ||
|
7b61ef9e0f | ||
|
b46d077b3a | ||
|
e32331d002 | ||
|
05928608ec | ||
|
d8c9a67d20 | ||
|
c352fe9ab0 | ||
|
e396874f3c | ||
|
f6c53ced0d | ||
|
ee26e282cc | ||
|
894f893223 | ||
|
67d7e2007f | ||
|
3a9cca74fc | ||
|
fe9c0db603 | ||
|
fde32c5219 | ||
|
213024a560 | ||
|
e5e18ddffb | ||
|
b3e03fa6f0 | ||
|
c0586ca6e2 | ||
|
4430314514 | ||
|
4087055b18 | ||
|
a47c0065fb | ||
|
6883c2214b | ||
|
7f6fdd6e7b | ||
|
24124452d5 | ||
|
0dff89d9fb | ||
|
f0f64f42ee | ||
|
d278afc85b | ||
|
423b8209a1 | ||
|
559f74e0c1 | ||
|
66c3a43e96 | ||
|
d83554121f | ||
|
2688b94133 | ||
|
e035baee8a | ||
|
f1ff8f9aad | ||
|
115ea624d9 | ||
|
6ecae6c5f8 | ||
|
6d76b587cf | ||
|
8e62ff50fe | ||
|
0daa905a27 | ||
|
d1a4ad3db6 | ||
|
2c1bd399d2 | ||
|
fac5fba0dc | ||
|
c907ad83b0 | ||
|
585ba777c2 | ||
|
f8ee4cfea5 | ||
|
35d2cbefe6 | ||
|
004f0a6596 | ||
|
b68e0bb3fb | ||
|
92f0216605 | ||
|
e317b9be00 | ||
|
2e52386be5 | ||
|
9431c70a6a | ||
|
6e67d44aa3 | ||
|
e622013f7e | ||
|
3886f0c530 | ||
|
eb9c204535 | ||
|
ab9e99218f | ||
|
714c610d6b | ||
|
8706d69e60 | ||
|
55a242bd81 | ||
|
61b40c47f9 | ||
|
710d0620a4 | ||
|
71cb7c2063 | ||
|
a482d870dd | ||
|
bc4992fef9 | ||
|
b38d0d7d9e | ||
|
853a9c7a8c | ||
|
26b9254ac7 | ||
|
a51f11999a | ||
|
f11c23f407 | ||
|
0c8de4e561 | ||
|
13f9993007 | ||
|
b2b451d762 | ||
|
2e146a56f7 | ||
|
34197d4f8a | ||
|
39dbd91bb0 | ||
|
901d99d7c5 | ||
|
8f6e3848f6 | ||
|
3548350dfa | ||
|
caae240bc7 | ||
|
f5f6ceece5 | ||
|
4caceb5dd4 | ||
|
3da41b6021 | ||
|
9b9fb4d7a3 | ||
|
ca8b00e871 | ||
|
4434889e41 | ||
|
475352fbc0 | ||
|
ad30ac3932 | ||
|
9d52ca1887 | ||
|
ec537d75e4 | ||
|
b47ea9421f | ||
|
845d2e5433 | ||
|
50310f7b14 | ||
|
af944aa74c | ||
|
b5077d02ed | ||
|
6a3bd1c4d1 | ||
|
2fcd0e21bd | ||
|
5127726bbc | ||
|
db456a70ee | ||
|
770e848953 | ||
|
9e1dd15e31 | ||
|
27b9a9e7ef | ||
|
a020c901ba | ||
|
cdad68e858 | ||
|
ef36028526 | ||
|
69b1b19315 | ||
|
516f71bbdc | ||
|
d820fea7a4 | ||
|
3e8d157118 | ||
|
67f45940ce | ||
|
95400e6451 | ||
|
d46fe31f54 | ||
|
4f67be1c8e | ||
|
c13e164f25 | ||
|
eba8f36d4f | ||
|
37f11ab77d | ||
|
8b898818c2 | ||
|
0f62ab6c42 | ||
|
c524b72d13 | ||
|
b5313dbd4d | ||
|
b9a1827da7 | ||
|
1057189ea2 | ||
|
879b2845ad | ||
|
ecce3756d4 | ||
|
6e4dd5811d | ||
|
598e1304f6 | ||
|
e3fbc0ee9c | ||
|
4021734047 | ||
|
5a307fa7f3 | ||
|
617d12fd77 | ||
|
837f398a9b | ||
|
e18211deca | ||
|
32a547cc3e | ||
|
365afa381a | ||
|
b7d3c073f8 | ||
|
56b0095622 | ||
|
39f0c48eb2 | ||
|
7d24e1405e | ||
|
3680ae220a | ||
|
f309fa21c9 | ||
|
61e7326f22 | ||
|
dc13ff97e2 | ||
|
af28237569 | ||
|
ff8de0a93f | ||
|
aefabcc056 | ||
|
1d6c6fc3b8 | ||
|
8645773fc6 | ||
|
d663909159 | ||
|
e3ff92bc87 | ||
|
2d43ecf8ca | ||
|
5f4beb711f | ||
|
da514187f5 | ||
|
6bd9ce7b55 | ||
|
ec21d354b9 | ||
|
8cf4ce5d9e | ||
|
09b6c37e1d | ||
|
3161dbfff2 | ||
|
8412928a14 | ||
|
60a7830ba5 | ||
|
ac473282a2 | ||
|
20f9e0f144 | ||
|
71a9e5d8c2 | ||
|
a605fcc2bd | ||
|
3eaebf1e0b | ||
|
e540ccbd34 | ||
|
55ce61d1a8 | ||
|
8e14f43398 | ||
|
bbbcc72460 | ||
|
c2b1b00e52 | ||
|
05c2e35c5d | ||
|
8efde9c48c | ||
|
247fc2e471 | ||
|
9d2ca90b4c | ||
|
3a5f8b6192 | ||
|
16b5a88097 | ||
|
fdf2e046c3 | ||
|
531d57f30c | ||
|
841bf67bb9 | ||
|
399b457f54 | ||
|
fed734edfc | ||
|
c84c014536 | ||
|
1e994419ee | ||
|
7b22c44b39 | ||
|
2e744260e0 | ||
|
7190a31b5f | ||
|
729f007379 | ||
|
b75b359f19 | ||
|
d7de720275 | ||
|
ef86e46238 | ||
|
0a46baeb56 | ||
|
fd3a6299ce | ||
|
803b147483 | ||
|
1f44319588 | ||
|
505478bc59 | ||
|
de7833b6a0 | ||
|
3a1b2083d6 | ||
|
3e996f61ae | ||
|
56eac4f846 | ||
|
61dcb685b2 | ||
|
bd0d75e237 | ||
|
179fc68355 | ||
|
9828756e05 | ||
|
40f2b49c0d | ||
|
8e81cbef2c | ||
|
47d572834b | ||
|
46601325f1 | ||
|
0abc7a3361 | ||
|
1e01b9079d | ||
|
be688c46f2 | ||
|
ab163f168d | ||
|
e937f7eac8 | ||
|
b84945e43f | ||
|
b3dba1dca6 | ||
|
060cfc713f | ||
|
6be575992f | ||
|
4bec75c66b | ||
|
8e4cc59a7a | ||
|
c17227966d | ||
|
a2ce6268b2 | ||
|
5ab14ff7f6 | ||
|
8482b956d6 | ||
|
562c7b1ff3 | ||
|
8099de22f9 | ||
|
a4c3bee4a1 | ||
|
5afa985e85 | ||
|
e600a07237 | ||
|
8fa58c2e17 | ||
|
d436c2e839 | ||
|
b37634dcd5 | ||
|
2d636fdda0 | ||
|
28095641c5 | ||
|
d58b06ceeb | ||
|
82b4c34eca | ||
|
ee47ddf5fd | ||
|
f32ae2964a | ||
|
eae5eaeb21 | ||
|
09fd2d61c4 | ||
|
86d7ab7c50 | ||
|
88be92ceee | ||
|
04c4b387a0 | ||
|
7551f85d4c | ||
|
184886f893 | ||
|
36ef94b002 | ||
|
831ebe3ef2 | ||
|
76b8676955 | ||
|
b3243132a0 | ||
|
de461712a1 | ||
|
dd7f52c59a | ||
|
3f1bc740e4 | ||
|
9128ad105b | ||
|
745cbc6c91 | ||
|
b635736ac2 | ||
|
ba081bf119 | ||
|
3003f37e9d | ||
|
c1e05e7c52 | ||
|
6b475aacd2 | ||
|
bc4969ec42 | ||
|
1c7daece7a | ||
|
37a8c138f9 | ||
|
34d547a2aa | ||
|
163c04c101 | ||
|
f2284ff40f | ||
|
eded9459df | ||
|
8fd1530848 | ||
|
77f9efa747 | ||
|
109ec523cb | ||
|
5cc5022a8f | ||
|
3c769bb11d | ||
|
33b07e4825 | ||
|
714e5c72f6 | ||
|
153c6424d3 | ||
|
b76e514322 | ||
|
1501aa0603 | ||
|
cf5a173a4f | ||
|
2b8c3731c1 | ||
|
ade2f1030a | ||
|
4f12df5f1c | ||
|
9941799449 | ||
|
5a938ad83d | ||
|
835c807d7a | ||
|
2ef72442ec | ||
|
3bc2bf40a8 | ||
|
cd4c0b6127 | ||
|
fa79e8651e | ||
|
9a29487e25 | ||
|
fceff93994 | ||
|
acd8b08d35 | ||
|
2abee57421 | ||
|
437f902c9d | ||
|
a7befc647e | ||
|
121e61cf01 | ||
|
f7ac13b78f | ||
|
c2ae73f247 | ||
|
4b0b6100d6 | ||
|
2c9bf55eea | ||
|
1d11d42aa0 | ||
|
361407201b | ||
|
50c29398e6 | ||
|
dff8a9eb46 | ||
|
1bb4e660fd | ||
|
ded6ec6424 | ||
|
47e49acc7d | ||
|
0996b178dc | ||
|
4befd13744 | ||
|
bb1463871c | ||
|
12a9164414 | ||
|
108fe033aa | ||
|
9de2b4b0e1 | ||
|
ee056fd8bd | ||
|
bc4f71a107 | ||
|
125442297f | ||
|
eec92b40ea | ||
|
d392f6f2a4 | ||
|
41a9c46ec8 | ||
|
0530aeec17 | ||
|
22741a74ff | ||
|
23331c1919 | ||
|
d266bd62de | ||
|
57c95937b1 | ||
|
1d86086434 | ||
|
e2f26b0d9a | ||
|
7816fc2b83 | ||
|
04d802f7f4 | ||
|
994cc32d7b | ||
|
f14ca28c4e | ||
|
da9d32e472 | ||
|
08d6db4ab6 | ||
|
6891f40110 | ||
|
cdbf24c3af | ||
|
b30715da6a | ||
|
5e9883453d | ||
|
b97b95b0c7 | ||
|
dd0a854bbb | ||
|
b8d0ad8643 | ||
|
65d57877a8 | ||
|
afc73c38ce | ||
|
f4e1c271ea | ||
|
8e42239439 | ||
|
5b4ac5456e | ||
|
f1db73379e | ||
|
20918dbe8e | ||
|
b5ec20db88 | ||
|
d347df431d | ||
|
25e6988d95 | ||
|
a7f05b8d91 | ||
|
fe690265eb | ||
|
f45ea3fa90 | ||
|
bdc28cd870 | ||
|
c648c1f235 | ||
|
8a92ee03ea | ||
|
e3c72f8f09 | ||
|
1f472104ad | ||
|
4b41580041 | ||
|
c136f84584 | ||
|
80de00a248 | ||
|
50a7e59623 | ||
|
92ca3a3419 | ||
|
8203d9cc40 | ||
|
abc9b403f8 | ||
|
b9ad3172a4 | ||
|
0d7fcdda28 | ||
|
75f9b83b1e | ||
|
61e980bfb6 | ||
|
ebda736a09 | ||
|
d4ddfdc265 | ||
|
f8bb206034 | ||
|
87f92a93d3 | ||
|
e49e084f4c | ||
|
995daa1e29 | ||
|
d34936c1ea | ||
|
a59889a274 | ||
|
bfb054a023 | ||
|
e940704018 | ||
|
429c7fc039 | ||
|
0d6e4f7a6e | ||
|
1f9eb5c64c | ||
|
056a073061 | ||
|
e46522e4b5 | ||
|
7ac7919697 | ||
|
5d9799d4e3 | ||
|
f95943a752 | ||
|
ef88e9ffcc | ||
|
49613dca8e | ||
|
a651a0ce69 | ||
|
08d59d3f68 | ||
|
afff39c503 | ||
|
a2897e1868 | ||
|
9ac4a7d99f | ||
|
8157717e03 | ||
|
9052f6dafe | ||
|
292576f312 | ||
|
2285382074 | ||
|
526f1e315b | ||
|
877a7f98ca | ||
|
73b14a3c3a | ||
|
40c0826921 | ||
|
27b9b2e76c | ||
|
04c4d293a7 | ||
|
033791b374 | ||
|
95ee5ff424 | ||
|
65d29e00c7 | ||
|
3b2cd972d5 | ||
|
428ec29598 |
@@ -1,3 +1,7 @@
|
||||
include:
|
||||
- project: 'gnome/citemplates'
|
||||
file: 'flatpak/flatpak_ci_initiative.yml'
|
||||
|
||||
stages:
|
||||
- build
|
||||
- analysis
|
||||
@@ -149,6 +153,7 @@ msys2-mingw64:
|
||||
artifacts:
|
||||
paths:
|
||||
- "${APPID}-dev.flatpak"
|
||||
- 'repo.tar'
|
||||
expire_in: 1 day
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/flatpak-build.sh "${APPID}"
|
||||
@@ -200,6 +205,24 @@ flatpak-master:icon-browser:
|
||||
variables:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
|
||||
# Publish the demo apps to the GNOME Nightly repo
|
||||
# https://wiki.gnome.org/Apps/Nightly
|
||||
# https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/DevOps-with-Flatpak
|
||||
nightly demo:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-master:demo']
|
||||
needs: ['flatpak-master:demo']
|
||||
|
||||
nightly factory:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-master:widget-factory']
|
||||
needs: ['flatpak-master:widget-factory']
|
||||
|
||||
nightly icon-browser:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-master:icon-browser']
|
||||
needs: ['flatpak-master:icon-browser']
|
||||
|
||||
static-scan:
|
||||
image: $FEDORA_IMAGE
|
||||
stage: analysis
|
||||
|
@@ -40,3 +40,8 @@ flatpak build-bundle \
|
||||
${appid}-dev.flatpak \
|
||||
--runtime-repo=https://nightly.gnome.org/gnome-nightly.flatpakrepo \
|
||||
${appid}
|
||||
|
||||
# to be consumed by the nightly publish jobs
|
||||
if [[ $CI_COMMIT_BRANCH == master ]]; then
|
||||
tar cf repo.tar ${repodir}
|
||||
fi
|
||||
|
@@ -56,6 +56,12 @@ If the issue includes a crash, you should also include:
|
||||
0. the eventual warnings printed on the terminal
|
||||
0. a backtrace, obtained with tools such as GDB or LLDB
|
||||
|
||||
It is fine to include screenshots of screen recordings to demonstrate
|
||||
an issue that is best to understand visually, but please don't just
|
||||
dump screen recordings without further details into issues. It is
|
||||
essential that the problem is described in enough detail to reproduce
|
||||
it without watching a video.
|
||||
|
||||
For small issues, such as:
|
||||
|
||||
- spelling/grammar fixes in the documentation
|
||||
|
138
NEWS
138
NEWS
@@ -1,3 +1,141 @@
|
||||
Overview of Changes in GTK 4.0
|
||||
==============================
|
||||
|
||||
* Fix problems with synthetic motion events affecting frame rates
|
||||
|
||||
* Fix problems with implicit grabs affecting widget states
|
||||
|
||||
* Fix problems with zoom mode on scales getting stuck
|
||||
|
||||
* Fix submenu closing by outside clicks
|
||||
|
||||
* Rename GtkWindow:fullscreen to :fullscreened to help
|
||||
language bindings
|
||||
|
||||
* Bump the soname. Stable GTK 4 releases use libgtk-4.0.so.1.xxxx.y
|
||||
|
||||
* Adwaita:
|
||||
- Reduce hover transition effects in lists
|
||||
- Special-case header buttons
|
||||
|
||||
* Demos:
|
||||
- Remove NoDisplay from desktop files
|
||||
- Autoplay the video in widget-factory
|
||||
|
||||
* Translation updates:
|
||||
Catalan
|
||||
Norwegian Bokmål
|
||||
Polish
|
||||
Spanish
|
||||
Swedish
|
||||
Romanian
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in 3.99.5
|
||||
=============================
|
||||
|
||||
* Accessibility:
|
||||
- Map presentation role according to Core-AAM
|
||||
- Use presentation role for spacers in list views
|
||||
- Set proper roles, relations and descriptions on more widgets
|
||||
- Expand the documentation
|
||||
- Use a single GTK_A11Y environment variable and document it
|
||||
- Serveral memory leak and crash fixes
|
||||
- Initialize AT contexts lazily
|
||||
- Improve the API for storing lists in relations
|
||||
- Implement more of the Component interface
|
||||
- Implement the Cache interface
|
||||
- Implement ScrollSubstringTo for GtkTextView
|
||||
|
||||
* Introspection:
|
||||
- Add many missing annotations to APIs
|
||||
- In particular, nullability annotation fixes for rust
|
||||
|
||||
* Touch support:
|
||||
- Fix issues with text handles
|
||||
- Fix interaction between touch scrolling and focus
|
||||
- Fix active state updates for touch events
|
||||
- Allow pressing buttons with multiple fingers
|
||||
|
||||
* GtkScrolledWindow:
|
||||
- Accumulate velocity with kinetic scrolling
|
||||
|
||||
* GtkSearchEntry:
|
||||
- Use a better clear icon
|
||||
|
||||
* GtkTreeView:
|
||||
- Remove the deprecated GtkCellRendererClass.get_size vfunc
|
||||
|
||||
* GtkBuilder:
|
||||
- Be stricter about <requires>
|
||||
- Make gtk-builder-tool simplify update <requires>
|
||||
|
||||
* GtkFileChooser:
|
||||
- Remove GtkFileChooserButton
|
||||
|
||||
* GtkWindow:
|
||||
- Replace gtk_window_get_size with gtk_window_get_default_size
|
||||
- Add maximized and fullscreen properties
|
||||
|
||||
* Make the inspector available in non-debug builds
|
||||
|
||||
* CSS:
|
||||
- Support conic gradients
|
||||
|
||||
* Adwaita:
|
||||
- Round all window corners
|
||||
- Round submenus
|
||||
- Remove the 'chin' on menus
|
||||
- Industrial style menuitems
|
||||
- Improved tooltip styling
|
||||
- Unified sidebar styles
|
||||
- Dark prelight
|
||||
- Don't backdrop labels
|
||||
|
||||
* GSK:
|
||||
- Rename render node apis from peek to get
|
||||
|
||||
* Make GLES work in the absence of GL_ARB_timer_query
|
||||
|
||||
* Rework the way size allocation is integrated in the
|
||||
frame cycle
|
||||
|
||||
* Wayland:
|
||||
- Support gtk_shell1 version 3 (startup notification
|
||||
and activation)
|
||||
- Implmement minimization
|
||||
|
||||
* OS X:
|
||||
- Mostly working GL renderer
|
||||
- Search engine updates
|
||||
- Fix rendering artifacts with hover transitions
|
||||
- Fix kinetic scrolling deceleration
|
||||
|
||||
* Windows:
|
||||
- Fix key event generation, making text input work
|
||||
|
||||
* Documentation:
|
||||
- Add missing enumerations, symbols and types
|
||||
- Lots of smaller fixes
|
||||
|
||||
* Demos:
|
||||
- Make the constraints demo more useful
|
||||
- Make search more obvious
|
||||
- Add a suggestion entry demo
|
||||
- Consistency improvements
|
||||
- Use native file choosers
|
||||
- Drop 'devel' styling
|
||||
|
||||
* Translation updates:
|
||||
Belarusian
|
||||
Catalan
|
||||
Polish
|
||||
Spanish
|
||||
Swedish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in 3.99.4
|
||||
=============================
|
||||
|
||||
|
12
README.md
12
README.md
@@ -17,7 +17,7 @@ license fees or royalties.
|
||||
|
||||
The official download location
|
||||
|
||||
- https://download.gnome.org/sources/gtk+
|
||||
- https://download.gnome.org/sources/gtk/
|
||||
|
||||
The official web site
|
||||
|
||||
@@ -49,11 +49,11 @@ In order to build GTK you will need:
|
||||
You will also need various dependencies, based on the platform you are
|
||||
building for:
|
||||
|
||||
- [GLib](https://download.gnome.org/sources/glib)
|
||||
- [GdkPixbuf](https://download.gnome.org/sources/gdk-pixbuf)
|
||||
- [GObject-Introspection](https://download.gnome.org/sources/gobject-introspection)
|
||||
- [Cairo](https://www.cairographics.org)
|
||||
- [Pango](https://download.gnome.org/sources/pango)
|
||||
- [GLib](https://download.gnome.org/sources/glib/)
|
||||
- [GdkPixbuf](https://download.gnome.org/sources/gdk-pixbuf/)
|
||||
- [GObject-Introspection](https://download.gnome.org/sources/gobject-introspection/)
|
||||
- [Cairo](https://www.cairographics.org/)
|
||||
- [Pango](https://download.gnome.org/sources/pango/)
|
||||
- [Epoxy](https://github.com/anholt/libepoxy)
|
||||
- [Graphene](https://github.com/ebassi/graphene)
|
||||
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
|
||||
|
@@ -1,20 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
if 'DESTDIR' not in os.environ:
|
||||
gtk_api_version = sys.argv[1]
|
||||
gtk_abi_version = sys.argv[2]
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
if 'DESTDIR' not in os.environ:
|
||||
gtk_api_version = sys.argv[1]
|
||||
gtk_abi_version = sys.argv[2]
|
||||
gtk_libdir = sys.argv[3]
|
||||
gtk_datadir = sys.argv[4]
|
||||
|
||||
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
|
||||
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
|
||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||
|
||||
print('Compiling GSettings schemas...')
|
||||
gtk_bindir = sys.argv[5]
|
||||
|
||||
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
|
||||
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
|
||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||
|
||||
print('Compiling GSettings schemas...')
|
||||
glib_compile_schemas = subprocess.check_output(['pkg-config',
|
||||
'--variable=glib_compile_schemas',
|
||||
'gio-2.0']).strip()
|
||||
@@ -22,13 +23,14 @@ if 'DESTDIR' not in os.environ:
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
glib_compile_schemas = 'glib-compile-schemas'
|
||||
subprocess.call([glib_compile_schemas,
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
subprocess.call(['gtk4-update-icon-cache', '-q', '-t' ,'-f',
|
||||
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
||||
|
||||
print('Updating module cache for print backends...')
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
update_icon_cache = os.path.join(gtk_bindir, 'gtk4-update-icon-cache')
|
||||
subprocess.call([update_icon_cache, '-q', '-t' ,'-f',
|
||||
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
||||
|
||||
print('Updating module cache for print backends...')
|
||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||
gio_querymodules = subprocess.check_output(['pkg-config',
|
||||
'--variable=gio_querymodules',
|
||||
@@ -37,7 +39,7 @@ if 'DESTDIR' not in os.environ:
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
gio_querymodules = 'gio-querymodules'
|
||||
subprocess.call([gio_querymodules, gtk_printmodule_dir])
|
||||
|
||||
print('Updating module cache for input methods...')
|
||||
|
||||
print('Updating module cache for input methods...')
|
||||
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
||||
subprocess.call([gio_querymodules, gtk_immodule_dir])
|
||||
|
@@ -36,7 +36,7 @@ struct _ConstraintEditorWindow
|
||||
G_DEFINE_TYPE(ConstraintEditorWindow, constraint_editor_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||
|
||||
static GtkConstraintTarget *
|
||||
find_target (GListModel *model,
|
||||
find_target (GListModel *model,
|
||||
GtkConstraintTarget *orig)
|
||||
{
|
||||
const char *name;
|
||||
@@ -163,20 +163,30 @@ constraint_editor_window_load (ConstraintEditorWindow *self,
|
||||
GtkConstraint *clone;
|
||||
GtkConstraintTarget *target;
|
||||
GtkConstraintTarget *source;
|
||||
GtkConstraintAttribute source_attr;
|
||||
|
||||
item = g_list_model_get_item (list, i);
|
||||
constraint = GTK_CONSTRAINT (item);
|
||||
|
||||
target = gtk_constraint_get_target (constraint);
|
||||
source = gtk_constraint_get_source (constraint);
|
||||
clone = gtk_constraint_new (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
source_attr = gtk_constraint_get_source_attribute (constraint);
|
||||
|
||||
if (source == NULL && source_attr == GTK_CONSTRAINT_ATTRIBUTE_NONE)
|
||||
clone = gtk_constraint_new_constant (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_relation (constraint),
|
||||
find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), source),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_multiplier (constraint),
|
||||
gtk_constraint_get_constant (constraint),
|
||||
gtk_constraint_get_strength (constraint));
|
||||
else
|
||||
clone = gtk_constraint_new (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_relation (constraint),
|
||||
find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), source),
|
||||
source_attr,
|
||||
gtk_constraint_get_multiplier (constraint),
|
||||
gtk_constraint_get_constant (constraint),
|
||||
gtk_constraint_get_strength (constraint));
|
||||
|
||||
constraint_view_add_constraint (CONSTRAINT_VIEW (self->view), clone);
|
||||
|
||||
@@ -300,7 +310,7 @@ save_response_cb (GtkNativeDialog *dialog,
|
||||
model = constraint_view_get_model (CONSTRAINT_VIEW (self->view));
|
||||
text = serialize_model (model);
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
g_file_replace_contents (file, text, -1,
|
||||
g_file_replace_contents (file, text, strlen (text),
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
|
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ConstraintEditorWindow" parent="GtkApplicationWindow">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">GTK Constraint Editor</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
|
@@ -142,6 +142,9 @@ get_target (GListModel *model,
|
||||
{
|
||||
int i;
|
||||
|
||||
if (id == NULL)
|
||||
return NULL;
|
||||
|
||||
if (strcmp ("super", id) == 0)
|
||||
return NULL;
|
||||
|
||||
@@ -212,6 +215,22 @@ get_relation_nick (GtkConstraintRelation relation)
|
||||
return nick;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_relation_display_name (GtkConstraintRelation relation)
|
||||
{
|
||||
switch (relation)
|
||||
{
|
||||
case GTK_CONSTRAINT_RELATION_LE:
|
||||
return "≤";
|
||||
case GTK_CONSTRAINT_RELATION_EQ:
|
||||
return "=";
|
||||
case GTK_CONSTRAINT_RELATION_GE:
|
||||
return "≥";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
static GtkConstraintStrength
|
||||
get_strength (const char *id)
|
||||
{
|
||||
@@ -331,6 +350,7 @@ source_attr_changed (ConstraintEditor *editor)
|
||||
{
|
||||
gtk_widget_set_sensitive (editor->source, TRUE);
|
||||
gtk_widget_set_sensitive (editor->multiplier, TRUE);
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->multiplier), "1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +367,7 @@ constraint_editor_constraint_to_string (GtkConstraint *constraint)
|
||||
|
||||
name = get_target_name (gtk_constraint_get_target (constraint));
|
||||
attr = get_attr_nick (gtk_constraint_get_target_attribute (constraint));
|
||||
relation = get_relation_nick (gtk_constraint_get_relation (constraint));
|
||||
relation = get_relation_display_name (gtk_constraint_get_relation (constraint));
|
||||
|
||||
if (name == NULL)
|
||||
name = "[ ]";
|
||||
@@ -441,8 +461,12 @@ update_preview (ConstraintEditor *editor)
|
||||
static void
|
||||
update_button (ConstraintEditor *editor)
|
||||
{
|
||||
if (gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target)) != NULL &&
|
||||
gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source)) != NULL)
|
||||
const char *target = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target));
|
||||
const char *source = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source));
|
||||
const char *source_attr = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source_attr));
|
||||
|
||||
if (target &&
|
||||
(source || (source_attr && get_target_attr (source_attr) == GTK_CONSTRAINT_ATTRIBUTE_NONE)))
|
||||
gtk_widget_set_sensitive (editor->button, TRUE);
|
||||
else
|
||||
gtk_widget_set_sensitive (editor->button, FALSE);
|
||||
|
@@ -78,6 +78,7 @@
|
||||
<object class="GtkComboBoxText" id="source_attr">
|
||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||
<signal name="changed" handler="source_attr_changed" swapped="yes"/>
|
||||
<signal name="changed" handler="update_button" swapped="yes"/>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">3</property>
|
||||
|
@@ -8,14 +8,16 @@ constraint_editor_sources = [
|
||||
]
|
||||
|
||||
constraint_editor_resources = gnome.compile_resources('constraint_editor_resources',
|
||||
'constraint-editor.gresource.xml',
|
||||
source_dir: '.')
|
||||
'constraint-editor.gresource.xml',
|
||||
source_dir: '.',
|
||||
)
|
||||
|
||||
executable('gtk4-constraint-editor',
|
||||
constraint_editor_sources, constraint_editor_resources,
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: false)
|
||||
sources: [ constraint_editor_sources, constraint_editor_resources, ],
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: false,
|
||||
)
|
||||
|
@@ -67,7 +67,7 @@ vec2 raySphere(vec3 ro, vec3 rd, vec4 sphere) {
|
||||
return vec2(t0, t1);
|
||||
}
|
||||
|
||||
float noise1(vec2 p) {
|
||||
float noize1(vec2 p) {
|
||||
vec2 n = mod2(p, vec2(cellWidth));
|
||||
vec2 hh = hash(sqrt(2.0)*(n+1000.0));
|
||||
hh.x *= hh.y;
|
||||
@@ -81,7 +81,7 @@ float noise1(vec2 p) {
|
||||
return h*0.25;
|
||||
}
|
||||
|
||||
float noise2(vec2 p) {
|
||||
float noize2(vec2 p) {
|
||||
vec2 n = mod2(p, vec2(cellWidth));
|
||||
vec2 hh = hash(sqrt(2.0)*(n+1000.0));
|
||||
hh.x *= hh.y;
|
||||
@@ -114,7 +114,7 @@ float height(vec2 p, float dd, int mx) {
|
||||
int i = 0;
|
||||
|
||||
for (; i < 4;++i) {
|
||||
float nn = a*noise2(p);
|
||||
float nn = a*noize2(p);
|
||||
s += nn;
|
||||
d += abs(a);
|
||||
p += o;
|
||||
@@ -130,7 +130,7 @@ float height(vec2 p, float dd, int mx) {
|
||||
mx = int(mix(float(4), float(mx), step(rdd, far)));
|
||||
|
||||
for (; i < mx; ++i) {
|
||||
float nn = a*noise1(p);
|
||||
float nn = a*noize1(p);
|
||||
s += nn;
|
||||
d += abs(a);
|
||||
p += o;
|
||||
|
@@ -465,7 +465,7 @@ demo_application_window_size_allocate (GtkWidget *widget,
|
||||
baseline);
|
||||
|
||||
if (!window->maximized && !window->fullscreen)
|
||||
gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
|
||||
gtk_window_get_default_size (GTK_WINDOW (window), &window->width, &window->height);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -20,7 +20,7 @@ mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec2 uv)
|
||||
float b = 1.0/distance (pos, p2);
|
||||
float sum = r + g + b;
|
||||
|
||||
float alpha = 1.0 - pow (1.0/(sum), 40)*pow (10.0, 40*0.7);
|
||||
float alpha = 1.0 - pow (1.0/(sum), 40.0)*pow (10.0, 40.0*0.7);
|
||||
|
||||
fragColor = vec4 (r*0.5, g*0.5, b*0.5, 1.0) * alpha;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Builder
|
||||
* #Keywords: GMenu, GtkPopoverMenuBar, GtkBuilder, GtkStatusBar, toolbar
|
||||
* #Keywords: GMenu, GtkPopoverMenuBar, GtkBuilder, GtkStatusBar, GtkShortcutController, toolbar
|
||||
*
|
||||
* Demonstrates a traditional interface, loaded from a XML description,
|
||||
* and shows how to connect actions to the menu items and toolbar buttons.
|
||||
|
@@ -177,7 +177,7 @@ float ccell2(vec2 p, float r) {
|
||||
float df(vec2 p, float scale, inout vec2 nn) {
|
||||
p /= scale;
|
||||
nn = hextile(p);
|
||||
nn = round(nn);
|
||||
nn = floor(nn + 0.5);
|
||||
float r = hash(nn);
|
||||
|
||||
float d;;
|
||||
|
@@ -179,7 +179,7 @@ float ccell2(vec2 p, float r) {
|
||||
float df(vec2 p, float scale, inout vec2 nn) {
|
||||
p /= scale;
|
||||
nn = hextile(p);
|
||||
nn = round(nn);
|
||||
nn = floor(nn + 0.5);
|
||||
float r = hash(nn);
|
||||
|
||||
float d;;
|
||||
|
@@ -1,106 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Constraints — Builder</property>
|
||||
<property name="default-width">260</property>
|
||||
<child>
|
||||
<object class="ConstraintsGrid">
|
||||
<property name="layout-manager">
|
||||
<object class="GtkConstraintLayout">
|
||||
<constraints>
|
||||
<guide name="space"
|
||||
min-width="10" min-height="10"
|
||||
nat-width="100" nat-height="10"
|
||||
max-width="200" max-height="20"
|
||||
strength="strong"/>
|
||||
<constraint target="button1" target-attribute="width"
|
||||
relation="le"
|
||||
constant="200"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="start"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="start"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="end"
|
||||
relation="eq"
|
||||
source="space" source-attribute="start"
|
||||
strength="required"/>
|
||||
<constraint target="space" target-attribute="end"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="start"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="end"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="end"
|
||||
constant="8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="start"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="start"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="end"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="end"
|
||||
constant="8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="top"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="top"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="top"
|
||||
constant="-12"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="top"
|
||||
constant="-12"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="height"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="height"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="height"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="height"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="bottom"
|
||||
constant="8"
|
||||
strength="required"/>
|
||||
</constraints>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">Child 1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="label">Child 2</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button3">
|
||||
<property name="label">Child 3</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@@ -1,8 +1,10 @@
|
||||
/* Constraints/Builder
|
||||
*
|
||||
* GtkConstraintLayouts can be created in .ui files, and constraints can be
|
||||
* set up at that time as well, as this example demonstrates. It uses the
|
||||
* same setup as the “Simple” constraints demo.
|
||||
* GtkConstraintLayouts can be created in .ui files, and constraints can
|
||||
* be set up at that time as well, as this example demonstrates. It shows
|
||||
* various ways to do spacing and sizing with constraints.
|
||||
*
|
||||
* Make the window wider to see the rows react differently
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
@@ -43,7 +45,7 @@ constraints_grid_class_init (ConstraintsGridClass *klass)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_constraints4 (GtkWidget *do_widget)
|
||||
do_constraints_builder (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window;
|
||||
|
||||
@@ -53,7 +55,7 @@ do_constraints4 (GtkWidget *do_widget)
|
||||
|
||||
g_type_ensure (constraints_grid_get_type ());
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/constraints4/constraints.ui");
|
||||
builder = gtk_builder_new_from_resource ("/constraints_builder/constraints_builder.ui");
|
||||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
460
demos/gtk-demo/constraints_builder.ui
Normal file
460
demos/gtk-demo/constraints_builder.ui
Normal file
@@ -0,0 +1,460 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Constraints — Builder</property>
|
||||
<property name="default-width">260</property>
|
||||
<child>
|
||||
<object class="ConstraintsGrid">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">fill</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="layout-manager">
|
||||
<object class="GtkConstraintLayout">
|
||||
<constraints>
|
||||
<guide name="guide1" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide2" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide3" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide4" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide5" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide6" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide7" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide8" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide9" min-width="0" nat-width="200" strength="weak"/>
|
||||
<guide name="guide10" min-width="0" nat-width="200" strength="weak"/>
|
||||
<guide name="barrier1" min-height="10"/>
|
||||
<guide name="barrier2" min-height="10"/>
|
||||
<guide name="barrier3" min-height="10"/>
|
||||
<guide name="barrier4" min-height="10"/>
|
||||
|
||||
<!-- Spread Chain -->
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide1" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide1" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide2" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide2" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide3" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide3" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide4" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="guide4" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide1" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide2" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="guide2" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide3" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="guide3" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide4" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button1" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button1" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Spread Inside Chain -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button4" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="guide5" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button4" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide5" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide6" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button5" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button6" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide6" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="button6" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide5" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide6" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button4" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button5" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button6" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button4" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button6" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button4" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button6" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Weighted Chain -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button8" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button8" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="button9" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button8" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="width"
|
||||
multiplier="2"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="width"
|
||||
multiplier="3"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button7" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button8" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button7" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button8" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Packed Chain -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide7" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button10" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide7" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button10" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button12" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button11" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="guide8" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button12" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="guide8" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide7" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide8" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button10" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button11" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button12" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button10" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button12" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button10" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button12" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Packed Chain with Bias -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide9" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button13" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide9" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button14" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button13" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button15" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button14" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="guide10" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button15" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="guide10" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide9" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide10" source-attribute="width"
|
||||
multiplier="4"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button13" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button14" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button14" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button15" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button13" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button14" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button15" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="ge"
|
||||
source="button13" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="ge"
|
||||
source="button14" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="ge"
|
||||
source="button15" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
</constraints>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button3">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button4">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button6">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button7">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button8">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button9">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button10">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button11">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button12">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button13">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button14">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button15">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@@ -205,7 +205,7 @@ interactive_grid_init (InteractiveGrid *self)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_constraints2 (GtkWidget *do_widget)
|
||||
do_constraints_interactive (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window;
|
||||
|
@@ -128,7 +128,7 @@ vfl_grid_init (VflGrid *self)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_constraints3 (GtkWidget *do_widget)
|
||||
do_constraints_vfl (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window;
|
||||
|
@@ -18,8 +18,8 @@
|
||||
<file>demoimage.c</file>
|
||||
<file>demoimage.h</file>
|
||||
</gresource>
|
||||
<gresource prefix="/constraints4">
|
||||
<file>constraints.ui</file>
|
||||
<gresource prefix="/constraints_builder">
|
||||
<file>constraints_builder.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/css_accordion">
|
||||
<file>css_accordion.css</file>
|
||||
@@ -43,6 +43,11 @@
|
||||
<file>cssview.css</file>
|
||||
<file>reset.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/dropdown">
|
||||
<file>suggestionentry.h</file>
|
||||
<file>suggestionentry.c</file>
|
||||
<file>suggestionentry.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/theming_style_classes">
|
||||
<file>theming.ui</file>
|
||||
</gresource>
|
||||
@@ -248,9 +253,9 @@
|
||||
<file>clipboard.c</file>
|
||||
<file>combobox.c</file>
|
||||
<file>constraints.c</file>
|
||||
<file>constraints2.c</file>
|
||||
<file>constraints3.c</file>
|
||||
<file>constraints4.c</file>
|
||||
<file>constraints_interactive.c</file>
|
||||
<file>constraints_vfl.c</file>
|
||||
<file>constraints_builder.c</file>
|
||||
<file>css_accordion.c</file>
|
||||
<file>css_basics.c</file>
|
||||
<file>css_blendmodes.c</file>
|
||||
@@ -289,7 +294,7 @@
|
||||
<file>layoutmanager2.c</file>
|
||||
<file>links.c</file>
|
||||
<file>listbox.c</file>
|
||||
<file>listbox2.c</file>
|
||||
<file>listbox_controls.c</file>
|
||||
<file>listview_applauncher.c</file>
|
||||
<file>listview_colors.c</file>
|
||||
<file>listview_clocks.c</file>
|
||||
@@ -304,7 +309,7 @@
|
||||
<file>markup.c</file>
|
||||
<file>menu.c</file>
|
||||
<file>overlay.c</file>
|
||||
<file>overlay2.c</file>
|
||||
<file>overlay_decorative.c</file>
|
||||
<file>paint.c</file>
|
||||
<file>pagesetup.c</file>
|
||||
<file>paintable.c</file>
|
||||
@@ -314,6 +319,9 @@
|
||||
<file>paintable_svg.c</file>
|
||||
<file>panes.c</file>
|
||||
<file>password_entry.c</file>
|
||||
<file>path_fill.c</file>
|
||||
<file>path_maze.c</file>
|
||||
<file>path_text.c</file>
|
||||
<file>peg_solitaire.c</file>
|
||||
<file>pickers.c</file>
|
||||
<file>printing.c</file>
|
||||
@@ -354,8 +362,8 @@
|
||||
<file>messages.txt</file>
|
||||
<file>apple-red.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/listbox2">
|
||||
<file>listbox2.ui</file>
|
||||
<gresource prefix="/listbox_controls">
|
||||
<file>listbox_controls.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/glarea">
|
||||
<file>glarea-gl.fs.glsl</file>
|
||||
@@ -398,6 +406,9 @@
|
||||
<gresource prefix="/fontrendering">
|
||||
<file>fontrendering.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/path_text">
|
||||
<file>path_text.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/Demo4">
|
||||
<file>icons/16x16/actions/application-exit.png</file>
|
||||
<file>icons/16x16/actions/document-new.png</file>
|
||||
|
@@ -97,9 +97,9 @@ demo3_widget_size_allocate (GtkWidget *widget,
|
||||
|
||||
/* Since we are not using a layout manager (who would do this
|
||||
* for us), we need to allocate a size for our menu by calling
|
||||
* gtk_native_check_resize().
|
||||
* gtk_popover_present().
|
||||
*/
|
||||
gtk_native_check_resize (GTK_NATIVE (self->menu));
|
||||
gtk_popover_present (GTK_POPOVER (self->menu));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -1,17 +1,16 @@
|
||||
/* Drop Downs
|
||||
/* Lists/Selections
|
||||
*
|
||||
* The GtkDropDown widget is a modern alternative to GtkComboBox.
|
||||
* It uses list models instead of tree models, and the content is
|
||||
* displayed using widgets instead of cell renderers.
|
||||
*
|
||||
* The examples here demonstrate how to use different kinds of
|
||||
* list models with GtkDropDown, how to use search and how to
|
||||
* display the selected item differently from the presentation
|
||||
* in the popup.
|
||||
* This example also shows a custom widget that can replace
|
||||
* GtkEntryCompletion or GtkComboBoxText. It is not currently
|
||||
* part of GTK.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "suggestionentry.h"
|
||||
|
||||
#define STRING_TYPE_HOLDER (string_holder_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (StringHolder, string_holder, STRING, HOLDER, GObject)
|
||||
@@ -273,13 +272,110 @@ get_title (gpointer item)
|
||||
return g_strdup (STRING_HOLDER (item)->title);
|
||||
}
|
||||
|
||||
static char *
|
||||
get_file_name (gpointer item)
|
||||
{
|
||||
return g_strdup (g_file_info_get_display_name (G_FILE_INFO (item)));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
GtkWidget *box;
|
||||
GtkWidget *icon;
|
||||
GtkWidget *label;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
icon = gtk_image_new ();
|
||||
label = gtk_label_new ("");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_append (GTK_BOX (box), icon);
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
gtk_list_item_set_child (item, box);
|
||||
}
|
||||
|
||||
static void
|
||||
bind_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
MatchObject *match = MATCH_OBJECT (gtk_list_item_get_item (item));
|
||||
GFileInfo *info = G_FILE_INFO (match_object_get_item (match));
|
||||
GtkWidget *box = gtk_list_item_get_child (item);
|
||||
GtkWidget *icon = gtk_widget_get_first_child (box);
|
||||
GtkWidget *label = gtk_widget_get_last_child (box);
|
||||
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (icon), g_file_info_get_icon (info));
|
||||
gtk_label_set_label (GTK_LABEL (label), g_file_info_get_display_name (info));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_highlight_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_list_item_set_child (item, label);
|
||||
}
|
||||
|
||||
static void
|
||||
bind_highlight_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
MatchObject *obj;
|
||||
GtkWidget *label;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
const char *str;
|
||||
|
||||
obj = MATCH_OBJECT (gtk_list_item_get_item (item));
|
||||
label = gtk_list_item_get_child (item);
|
||||
|
||||
str = match_object_get_string (obj);
|
||||
|
||||
gtk_label_set_label (GTK_LABEL (label), str);
|
||||
attrs = pango_attr_list_new ();
|
||||
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
||||
attr->start_index = match_object_get_match_start (obj);
|
||||
attr->end_index = match_object_get_match_end (obj);
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
gtk_label_set_attributes (GTK_LABEL (label), attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
|
||||
static void
|
||||
match_func (MatchObject *obj,
|
||||
const char *search,
|
||||
gpointer user_data)
|
||||
{
|
||||
char *tmp1, *tmp2;
|
||||
char *p;
|
||||
|
||||
tmp1 = g_utf8_normalize (match_object_get_string (obj), -1, G_NORMALIZE_ALL);
|
||||
tmp2 = g_utf8_normalize (search, -1, G_NORMALIZE_ALL);
|
||||
|
||||
if ((p = strstr (tmp1, tmp2)) != NULL)
|
||||
match_object_set_match (obj,
|
||||
p - tmp1,
|
||||
(p - tmp1) + g_utf8_strlen (search, -1),
|
||||
1);
|
||||
else
|
||||
match_object_set_match (obj, 0, 0, 0);
|
||||
|
||||
g_free (tmp1);
|
||||
g_free (tmp2);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_dropdown (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *button, *box, *spin, *check;
|
||||
GtkWidget *button, *box, *spin, *check, *hbox, *label, *entry;
|
||||
GListModel *model;
|
||||
GtkExpression *expression;
|
||||
GtkListItemFactory *factory;
|
||||
const char * const times[] = { "1 minute", "2 minutes", "5 minutes", "20 minutes", NULL };
|
||||
const char * const many_times[] = {
|
||||
"1 minute", "2 minutes", "5 minutes", "10 minutes", "15 minutes", "20 minutes",
|
||||
@@ -292,22 +388,49 @@ do_dropdown (GtkWidget *do_widget)
|
||||
const char * const device_descriptions[] = {
|
||||
"Built-in Audio", "Built-in audio", "Thinkpad Tunderbolt 3 Dock USB Audio", "Thinkpad Tunderbolt 3 Dock USB Audio", NULL
|
||||
};
|
||||
char *cwd;
|
||||
GFile *file;
|
||||
GListModel *dir;
|
||||
GtkStringList *strings;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Drop Downs");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Selections");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
|
||||
|
||||
gtk_widget_set_margin_start (hbox, 20);
|
||||
gtk_widget_set_margin_end (hbox, 20);
|
||||
gtk_widget_set_margin_top (hbox, 20);
|
||||
gtk_widget_set_margin_bottom (hbox, 20);
|
||||
gtk_window_set_child (GTK_WINDOW (window), hbox);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_widget_set_margin_start (box, 10);
|
||||
gtk_widget_set_margin_end (box, 10);
|
||||
gtk_widget_set_margin_top (box, 10);
|
||||
gtk_widget_set_margin_bottom (box, 10);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
gtk_box_append (GTK_BOX (hbox), box);
|
||||
|
||||
label = gtk_label_new ("Dropdowns");
|
||||
gtk_widget_add_css_class (label, "title-4");
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
/* A basic dropdown */
|
||||
button = drop_down_new_from_strings (times, NULL, NULL);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
/* A dropdown using an expression to obtain strings */
|
||||
button = drop_down_new_from_strings (many_times, NULL, NULL);
|
||||
gtk_drop_down_set_enable_search (GTK_DROP_DOWN (button), TRUE);
|
||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING, NULL,
|
||||
0, NULL,
|
||||
(GCallback)get_title,
|
||||
NULL, NULL);
|
||||
gtk_drop_down_set_expression (GTK_DROP_DOWN (button), expression);
|
||||
gtk_expression_unref (expression);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
button = gtk_drop_down_new (NULL, NULL);
|
||||
|
||||
@@ -325,30 +448,118 @@ do_dropdown (GtkWidget *do_widget)
|
||||
|
||||
spin = gtk_spin_button_new_with_range (-1, g_list_model_get_n_items (G_LIST_MODEL (model)), 1);
|
||||
gtk_widget_set_halign (spin, GTK_ALIGN_START);
|
||||
gtk_widget_set_margin_start (spin, 20);
|
||||
g_object_bind_property (button, "selected", spin, "value", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
|
||||
gtk_box_append (GTK_BOX (box), spin);
|
||||
|
||||
check = gtk_check_button_new_with_label ("Enable search");
|
||||
gtk_widget_set_margin_start (check, 20);
|
||||
g_object_bind_property (button, "enable-search", check, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
|
||||
gtk_box_append (GTK_BOX (box), check);
|
||||
|
||||
g_object_unref (model);
|
||||
|
||||
button = drop_down_new_from_strings (times, NULL, NULL);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
button = drop_down_new_from_strings (many_times, NULL, NULL);
|
||||
gtk_drop_down_set_enable_search (GTK_DROP_DOWN (button), TRUE);
|
||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING, NULL,
|
||||
0, NULL,
|
||||
(GCallback)get_title,
|
||||
NULL, NULL);
|
||||
gtk_drop_down_set_expression (GTK_DROP_DOWN (button), expression);
|
||||
gtk_expression_unref (expression);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
/* A dropdown with a separate list factory */
|
||||
button = drop_down_new_from_strings (device_titles, device_icons, device_descriptions);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), gtk_separator_new (GTK_ORIENTATION_VERTICAL));
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_box_append (GTK_BOX (hbox), box);
|
||||
|
||||
label = gtk_label_new ("Suggestions");
|
||||
gtk_widget_add_css_class (label, "title-4");
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
/* A basic suggestion entry */
|
||||
entry = suggestion_entry_new ();
|
||||
g_object_set (entry, "placeholder-text", "Words with T or G…", NULL);
|
||||
strings = gtk_string_list_new ((const char *[]){
|
||||
"GNOME",
|
||||
"gnominious",
|
||||
"Gnomonic projection",
|
||||
"total",
|
||||
"totally",
|
||||
"toto",
|
||||
"tottery",
|
||||
"totterer",
|
||||
"Totten trust",
|
||||
"totipotent",
|
||||
"totipotency",
|
||||
"totemism",
|
||||
"totem pole",
|
||||
"Totara",
|
||||
"totalizer",
|
||||
"totalizator",
|
||||
"totalitarianism",
|
||||
"total parenteral nutrition",
|
||||
"total hysterectomy",
|
||||
"total eclipse",
|
||||
"Totipresence",
|
||||
"Totipalmi",
|
||||
"Tomboy",
|
||||
"zombie",
|
||||
NULL});
|
||||
suggestion_entry_set_model (SUGGESTION_ENTRY (entry), G_LIST_MODEL (strings));
|
||||
g_object_unref (strings);
|
||||
|
||||
gtk_box_append (GTK_BOX (box), entry);
|
||||
|
||||
/* A suggestion entry using a custom model, and no filtering */
|
||||
entry = suggestion_entry_new ();
|
||||
|
||||
cwd = g_get_current_dir ();
|
||||
file = g_file_new_for_path (cwd);
|
||||
dir = G_LIST_MODEL (gtk_directory_list_new ("standard::display-name,standard::content-type,standard::icon,standard::size", file));
|
||||
suggestion_entry_set_model (SUGGESTION_ENTRY (entry), dir);
|
||||
g_object_unref (dir);
|
||||
g_object_unref (file);
|
||||
g_free (cwd);
|
||||
|
||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING, NULL,
|
||||
0, NULL,
|
||||
(GCallback)get_file_name,
|
||||
NULL, NULL);
|
||||
suggestion_entry_set_expression (SUGGESTION_ENTRY (entry), expression);
|
||||
gtk_expression_unref (expression);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_item), NULL);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_item), NULL);
|
||||
|
||||
suggestion_entry_set_factory (SUGGESTION_ENTRY (entry), factory);
|
||||
g_object_unref (factory);
|
||||
|
||||
suggestion_entry_set_use_filter (SUGGESTION_ENTRY (entry), FALSE);
|
||||
suggestion_entry_set_show_arrow (SUGGESTION_ENTRY (entry), TRUE);
|
||||
|
||||
gtk_box_append (GTK_BOX (box), entry);
|
||||
|
||||
/* A suggestion entry with match highlighting */
|
||||
entry = suggestion_entry_new ();
|
||||
g_object_set (entry, "placeholder-text", "Destination", NULL);
|
||||
|
||||
strings = gtk_string_list_new ((const char *[]){
|
||||
"app-mockups",
|
||||
"settings-mockups",
|
||||
"os-mockups",
|
||||
"software-mockups",
|
||||
"mocktails",
|
||||
NULL});
|
||||
suggestion_entry_set_model (SUGGESTION_ENTRY (entry), G_LIST_MODEL (strings));
|
||||
g_object_unref (strings);
|
||||
|
||||
gtk_box_append (GTK_BOX (box), entry);
|
||||
|
||||
suggestion_entry_set_match_func (SUGGESTION_ENTRY (entry), match_func, NULL, NULL);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_highlight_item), NULL);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_highlight_item), NULL);
|
||||
suggestion_entry_set_factory (SUGGESTION_ENTRY (entry), factory);
|
||||
g_object_unref (factory);
|
||||
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -179,6 +179,9 @@ gtk_fishbowl_add (GtkFishbowl *fishbowl,
|
||||
child_info->dy = new_speed ();
|
||||
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (fishbowl));
|
||||
gtk_accessible_update_state (GTK_ACCESSIBLE (widget),
|
||||
GTK_ACCESSIBLE_STATE_HIDDEN, TRUE,
|
||||
-1);
|
||||
|
||||
g_hash_table_insert (priv->children, widget, child_info);
|
||||
priv->count++;
|
||||
@@ -342,6 +345,8 @@ gtk_fishbowl_class_init (GtkFishbowlClass *klass)
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
|
||||
|
||||
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_PRESENTATION);
|
||||
}
|
||||
|
||||
guint
|
||||
|
@@ -34,7 +34,7 @@ row_activated (GtkListBox *list,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_listbox2 (GtkWidget *do_widget)
|
||||
do_listbox_controls (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ do_listbox2 (GtkWidget *do_widget)
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_set_scope (builder, scope);
|
||||
|
||||
gtk_builder_add_from_resource (builder, "/listbox2/listbox2.ui", NULL);
|
||||
gtk_builder_add_from_resource (builder, "/listbox_controls/listbox_controls.ui", NULL);
|
||||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
@@ -284,12 +284,14 @@ create_ucd_view (GtkWidget *label)
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_codepoint), NULL);
|
||||
column = gtk_column_view_column_new ("Codepoint", factory);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_centered_label), NULL);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_char), NULL);
|
||||
column = gtk_column_view_column_new ("Char", factory);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_ellipsizing_label), NULL);
|
||||
@@ -297,6 +299,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Name", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_ellipsizing_label), NULL);
|
||||
@@ -304,6 +307,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Type", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_ellipsizing_label), NULL);
|
||||
@@ -311,6 +315,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Break Type", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_label), NULL);
|
||||
@@ -318,6 +323,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Combining Class", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_label), NULL);
|
||||
@@ -325,6 +331,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Script", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
return cv;
|
||||
}
|
||||
|
@@ -142,16 +142,39 @@ load_file (GtkStringList *list,
|
||||
}
|
||||
|
||||
static void
|
||||
file_selected_cb (GtkWidget *button,
|
||||
GtkStringList *stringlist)
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
int response,
|
||||
GtkStringList *stringlist)
|
||||
{
|
||||
GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (button));
|
||||
gtk_native_dialog_hide (dialog);
|
||||
|
||||
if (file)
|
||||
if (response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
GFile *file;
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
load_file (stringlist, file);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
gtk_native_dialog_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
file_open_cb (GtkWidget *button,
|
||||
GtkStringList *stringlist)
|
||||
{
|
||||
GtkFileChooserNative *dialog;
|
||||
|
||||
dialog = gtk_file_chooser_native_new ("Open file",
|
||||
GTK_WINDOW (gtk_widget_get_root (button)),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
"_Load",
|
||||
"_Cancel");
|
||||
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
|
||||
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (open_response_cb), stringlist);
|
||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (dialog));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -189,8 +212,8 @@ do_listview_words (GtkWidget *do_widget)
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
||||
open_button = gtk_file_chooser_button_new ("_Open", GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
g_signal_connect (open_button, "file-set", G_CALLBACK (file_selected_cb), stringlist);
|
||||
open_button = gtk_button_new_with_mnemonic ("_Open");
|
||||
g_signal_connect (open_button, "clicked", G_CALLBACK (file_open_cb), stringlist);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), open_button);
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
|
||||
|
@@ -17,9 +17,6 @@
|
||||
</section>
|
||||
</menu>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="default-width">800</property>
|
||||
<property name="default-height">600</property>
|
||||
<child type="titlebar">
|
||||
@@ -31,6 +28,16 @@
|
||||
<property name="label" translatable="yes">Run</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton">
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
<property name="valign">center</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>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="valign">center</property>
|
||||
@@ -46,24 +53,30 @@
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="width-request">120</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-width">150</property>
|
||||
<object class="GtkBox">
|
||||
<property name="width-request">220</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="width-request">220</property>
|
||||
<property name="orientation">vertical</property>
|
||||
|
||||
<object class="GtkSearchBar" id="searchbar">
|
||||
<property name="key-capture-widget">window</property>
|
||||
<child>
|
||||
<object class="GtkSearchBar" id="searchbar">
|
||||
<property name="key-capture-widget">window</property>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="search-entry"/>
|
||||
</child>
|
||||
<object class="GtkSearchEntry" id="search-entry">
|
||||
<accessibility>
|
||||
<relation name="controls">listview</relation>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<style>
|
||||
<class name="sidebar"/>
|
||||
</style>
|
||||
<property name="width-request">120</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-width">150</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="listview">
|
||||
<style>
|
||||
@@ -74,16 +87,16 @@
|
||||
<property name="resource">/ui/main-listitem.ui</property>
|
||||
</object>
|
||||
</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Demo list</property>
|
||||
<relation name="controls">notebook</relation>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="scrollable">1</property>
|
||||
@@ -108,6 +121,10 @@
|
||||
<property name="editable">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Info</property>
|
||||
<property name="description" translatable="yes">A description of the demo</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -138,6 +155,10 @@
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="pixels-above-lines">2</property>
|
||||
<property name="pixels-below-lines">2</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Source</property>
|
||||
<property name="description" translatable="yes">The source code of the demo</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -7,9 +7,9 @@ demos = files([
|
||||
'clipboard.c',
|
||||
'combobox.c',
|
||||
'constraints.c',
|
||||
'constraints2.c',
|
||||
'constraints3.c',
|
||||
'constraints4.c',
|
||||
'constraints_interactive.c',
|
||||
'constraints_vfl.c',
|
||||
'constraints_builder.c',
|
||||
'css_accordion.c',
|
||||
'css_basics.c',
|
||||
'css_blendmodes.c',
|
||||
@@ -19,7 +19,6 @@ demos = files([
|
||||
'cursors.c',
|
||||
'dialog.c',
|
||||
'drawingarea.c',
|
||||
'dropdown.c',
|
||||
'dnd.c',
|
||||
'editable_cells.c',
|
||||
'entry_completion.c',
|
||||
@@ -45,7 +44,7 @@ demos = files([
|
||||
'layoutmanager2.c',
|
||||
'links.c',
|
||||
'listbox.c',
|
||||
'listbox2.c',
|
||||
'listbox_controls.c',
|
||||
'menu.c',
|
||||
'flowbox.c',
|
||||
'list_store.c',
|
||||
@@ -54,13 +53,14 @@ demos = files([
|
||||
'listview_colors.c',
|
||||
'listview_filebrowser.c',
|
||||
'listview_minesweeper.c',
|
||||
'dropdown.c',
|
||||
'listview_settings.c',
|
||||
'listview_ucd.c',
|
||||
'listview_weather.c',
|
||||
'listview_words.c',
|
||||
'markup.c',
|
||||
'overlay.c',
|
||||
'overlay2.c',
|
||||
'overlay_decorative.c',
|
||||
'paint.c',
|
||||
'paintable.c',
|
||||
'paintable_animated.c',
|
||||
@@ -68,6 +68,9 @@ demos = files([
|
||||
'paintable_mediastream.c',
|
||||
'panes.c',
|
||||
'password_entry.c',
|
||||
'path_fill.c',
|
||||
'path_maze.c',
|
||||
'path_text.c',
|
||||
'peg_solitaire.c',
|
||||
'pickers.c',
|
||||
'printing.c',
|
||||
@@ -100,30 +103,33 @@ demos = files([
|
||||
|
||||
gtkdemo_deps = [ libgtk_dep, ]
|
||||
|
||||
extra_demo_sources = files(['main.c',
|
||||
'fontify.c',
|
||||
'gtkfishbowl.c',
|
||||
'fontplane.c',
|
||||
'gtkgears.c',
|
||||
'gtkshaderbin.c',
|
||||
'gtkshadertoy.c',
|
||||
'gtkshaderstack.c',
|
||||
'gskshaderpaintable.c',
|
||||
'puzzlepiece.c',
|
||||
'bluroverlay.c',
|
||||
'demoimage.c',
|
||||
'demotaggedentry.c',
|
||||
'demochild.c',
|
||||
'demolayout.c',
|
||||
'demowidget.c',
|
||||
'demo2layout.c',
|
||||
'singular_value_decomposition.c',
|
||||
'four_point_transform.c',
|
||||
'demo2widget.c',
|
||||
'demo3widget.c',
|
||||
'pixbufpaintable.c',
|
||||
'script-names.c',
|
||||
'unicode-names.c'])
|
||||
extra_demo_sources = files([
|
||||
'main.c',
|
||||
'fontify.c',
|
||||
'gtkfishbowl.c',
|
||||
'fontplane.c',
|
||||
'gtkgears.c',
|
||||
'gtkshaderbin.c',
|
||||
'gtkshadertoy.c',
|
||||
'gtkshaderstack.c',
|
||||
'gskshaderpaintable.c',
|
||||
'puzzlepiece.c',
|
||||
'bluroverlay.c',
|
||||
'demoimage.c',
|
||||
'demotaggedentry.c',
|
||||
'demochild.c',
|
||||
'demolayout.c',
|
||||
'demowidget.c',
|
||||
'demo2layout.c',
|
||||
'singular_value_decomposition.c',
|
||||
'four_point_transform.c',
|
||||
'demo2widget.c',
|
||||
'demo3widget.c',
|
||||
'pixbufpaintable.c',
|
||||
'script-names.c',
|
||||
'unicode-names.c',
|
||||
'suggestionentry.c',
|
||||
])
|
||||
|
||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||
demos += files(['font_features.c'])
|
||||
@@ -146,14 +152,17 @@ endif
|
||||
gtkdemo_args = [ '-DGDK_DISABLE_DEPRECATED', '-DGTK_DISABLE_DEPRECATED', ]
|
||||
|
||||
demos_h = custom_target('gtk4 demo header',
|
||||
output: 'demos.h',
|
||||
input: demos,
|
||||
command: [ find_program('geninclude.py'), '@OUTPUT@', '@INPUT@' ])
|
||||
output: 'demos.h',
|
||||
input: demos,
|
||||
command: [ find_program('geninclude.py'), '@OUTPUT@', '@INPUT@' ],
|
||||
)
|
||||
|
||||
gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
||||
'demo.gresource.xml',
|
||||
source_dir: '.')
|
||||
'demo.gresource.xml',
|
||||
source_dir: '.',
|
||||
)
|
||||
|
||||
# Use a subset of compiler flags
|
||||
demo_cflags = []
|
||||
foreach flag: common_cflags
|
||||
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden']
|
||||
@@ -162,30 +171,30 @@ foreach flag: common_cflags
|
||||
endforeach
|
||||
|
||||
executable('gtk4-demo',
|
||||
demos, demos_h, extra_demo_sources, gtkdemo_resources,
|
||||
c_args: gtkdemo_args + demo_cflags,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true)
|
||||
sources: [demos, demos_h, extra_demo_sources, gtkdemo_resources],
|
||||
c_args: gtkdemo_args + demo_cflags,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true,
|
||||
)
|
||||
|
||||
executable('gtk4-demo-application',
|
||||
'application.c', gtkdemo_resources,
|
||||
c_args: gtkdemo_args + common_cflags,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true)
|
||||
sources: ['application.c', gtkdemo_resources],
|
||||
c_args: gtkdemo_args + common_cflags,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true,
|
||||
)
|
||||
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
install_subdir('data/' + size, install_dir: icontheme_dir)
|
||||
endforeach
|
||||
|
||||
# desktop file
|
||||
|
@@ -7,4 +7,3 @@ Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=Development;GTK;
|
||||
NoDisplay=true
|
||||
|
@@ -21,7 +21,7 @@ margin_changed (GtkAdjustment *adjustment,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_overlay2 (GtkWidget *do_widget)
|
||||
do_overlay_decorative (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
@@ -13,19 +13,46 @@
|
||||
|
||||
|
||||
static void
|
||||
file_set (GtkFileChooserButton *button,
|
||||
GtkWidget *picture)
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
int response,
|
||||
GtkPicture *picture)
|
||||
{
|
||||
GFile *file;
|
||||
GdkPaintable *paintable;
|
||||
gtk_native_dialog_hide (dialog);
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (button));
|
||||
if (response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
GFile *file;
|
||||
GdkPaintable *paintable;
|
||||
|
||||
paintable = svg_paintable_new (file);
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
paintable = svg_paintable_new (file);
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
|
||||
g_object_unref (paintable);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
g_object_unref (paintable);
|
||||
g_object_unref (file);
|
||||
gtk_native_dialog_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
show_file_open (GtkWidget *button,
|
||||
GtkPicture *picture)
|
||||
{
|
||||
GtkFileFilter *filter;
|
||||
GtkFileChooserNative *dialog;
|
||||
|
||||
dialog = gtk_file_chooser_native_new ("Open node file",
|
||||
GTK_WINDOW (gtk_widget_get_root (button)),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
"_Load",
|
||||
"_Cancel");
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_add_mime_type (filter, "image/svg+xml");
|
||||
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (open_response_cb), picture);
|
||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (dialog));
|
||||
}
|
||||
|
||||
static GtkWidget *window;
|
||||
@@ -35,7 +62,6 @@ do_paintable_svg (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *header;
|
||||
GtkWidget *picture;
|
||||
GtkFileFilter *filter;
|
||||
GtkWidget *button;
|
||||
GFile *file;
|
||||
GdkPaintable *paintable;
|
||||
@@ -49,17 +75,14 @@ do_paintable_svg (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Paintable — SVG");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
button = gtk_file_chooser_button_new ("Select an SVG file", GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_add_mime_type (filter, "image/svg+xml");
|
||||
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (button), filter);
|
||||
button = gtk_button_new_with_mnemonic ("_Open");
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), button);
|
||||
|
||||
picture = gtk_picture_new ();
|
||||
gtk_picture_set_can_shrink (GTK_PICTURE (picture), TRUE);
|
||||
gtk_widget_set_size_request (picture, 16, 16);
|
||||
|
||||
g_signal_connect (button, "file-set", G_CALLBACK (file_set), picture);
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (show_file_open), picture);
|
||||
|
||||
gtk_window_set_child (GTK_WINDOW (window), picture);
|
||||
|
||||
|
348
demos/gtk-demo/path_fill.c
Normal file
348
demos/gtk-demo/path_fill.c
Normal file
@@ -0,0 +1,348 @@
|
||||
/* Path/Fill
|
||||
*
|
||||
* This demo shows how to use PangoCairo to draw text with more than
|
||||
* just a single color.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "paintable.h"
|
||||
#include "gsk/gskpathdashprivate.h"
|
||||
|
||||
#define GTK_TYPE_PATH_PAINTABLE (gtk_path_paintable_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GtkPathPaintable, gtk_path_paintable, GTK, PATH_PAINTABLE, GObject)
|
||||
|
||||
struct _GtkPathPaintable
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
GskPath *path;
|
||||
GdkPaintable *background;
|
||||
};
|
||||
|
||||
struct _GtkPathPaintableClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
static int
|
||||
gtk_path_paintable_get_intrinsic_width (GdkPaintable *paintable)
|
||||
{
|
||||
GtkPathPaintable *self = GTK_PATH_PAINTABLE (paintable);
|
||||
|
||||
if (self->background)
|
||||
return MAX (gdk_paintable_get_intrinsic_width (self->background), self->width);
|
||||
else
|
||||
return self->width;
|
||||
}
|
||||
|
||||
static int
|
||||
gtk_path_paintable_get_intrinsic_height (GdkPaintable *paintable)
|
||||
{
|
||||
GtkPathPaintable *self = GTK_PATH_PAINTABLE (paintable);
|
||||
|
||||
if (self->background)
|
||||
return MAX (gdk_paintable_get_intrinsic_height (self->background), self->height);
|
||||
else
|
||||
return self->height;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_paintable_snapshot (GdkPaintable *paintable,
|
||||
GdkSnapshot *snapshot,
|
||||
double width,
|
||||
double height)
|
||||
{
|
||||
GtkPathPaintable *self = GTK_PATH_PAINTABLE (paintable);
|
||||
|
||||
#if 0
|
||||
gtk_snapshot_push_fill (snapshot, self->path, GSK_FILL_RULE_WINDING);
|
||||
#else
|
||||
GskStroke *stroke = gsk_stroke_new (2.0);
|
||||
gtk_snapshot_push_stroke (snapshot, self->path, stroke);
|
||||
gsk_stroke_free (stroke);
|
||||
#endif
|
||||
|
||||
if (self->background)
|
||||
{
|
||||
gdk_paintable_snapshot (self->background, snapshot, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_snapshot_append_linear_gradient (snapshot,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height),
|
||||
&GRAPHENE_POINT_INIT (0, 0),
|
||||
&GRAPHENE_POINT_INIT (width, height),
|
||||
(GskColorStop[8]) {
|
||||
{ 0.0, { 1.0, 0.0, 0.0, 1.0 } },
|
||||
{ 0.2, { 1.0, 0.0, 0.0, 1.0 } },
|
||||
{ 0.3, { 1.0, 1.0, 0.0, 1.0 } },
|
||||
{ 0.4, { 0.0, 1.0, 0.0, 1.0 } },
|
||||
{ 0.6, { 0.0, 1.0, 1.0, 1.0 } },
|
||||
{ 0.7, { 0.0, 0.0, 1.0, 1.0 } },
|
||||
{ 0.8, { 1.0, 0.0, 1.0, 1.0 } },
|
||||
{ 1.0, { 1.0, 0.0, 1.0, 1.0 } }
|
||||
},
|
||||
8);
|
||||
}
|
||||
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
}
|
||||
|
||||
static GdkPaintableFlags
|
||||
gtk_path_paintable_get_flags (GdkPaintable *paintable)
|
||||
{
|
||||
GtkPathPaintable *self = GTK_PATH_PAINTABLE (paintable);
|
||||
|
||||
if (self->background)
|
||||
return gdk_paintable_get_flags (self->background);
|
||||
else
|
||||
return GDK_PAINTABLE_STATIC_CONTENTS | GDK_PAINTABLE_STATIC_SIZE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_paintable_paintable_init (GdkPaintableInterface *iface)
|
||||
{
|
||||
iface->get_intrinsic_width = gtk_path_paintable_get_intrinsic_width;
|
||||
iface->get_intrinsic_height = gtk_path_paintable_get_intrinsic_height;
|
||||
iface->snapshot = gtk_path_paintable_snapshot;
|
||||
iface->get_flags = gtk_path_paintable_get_flags;
|
||||
}
|
||||
|
||||
/* When defining the GType, we need to implement the GdkPaintable interface */
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkPathPaintable, gtk_path_paintable, G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
|
||||
gtk_path_paintable_paintable_init))
|
||||
|
||||
/* Here's the boilerplate for the GObject declaration.
|
||||
* We don't need to do anything special here, because we keep no
|
||||
* data of our own.
|
||||
*/
|
||||
static void
|
||||
gtk_path_paintable_class_init (GtkPathPaintableClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_paintable_init (GtkPathPaintable *self)
|
||||
{
|
||||
}
|
||||
|
||||
/* And finally, we add a simple constructor.
|
||||
* It is declared in the header so that the other examples
|
||||
* can use it.
|
||||
*/
|
||||
GdkPaintable *
|
||||
gtk_path_paintable_new (GskPath *path,
|
||||
GdkPaintable *background,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GtkPathPaintable *self;
|
||||
|
||||
self = g_object_new (GTK_TYPE_PATH_PAINTABLE, NULL);
|
||||
self->path = path;
|
||||
self->background = background;
|
||||
if (self->background)
|
||||
{
|
||||
g_signal_connect_swapped (self->background, "invalidate-contents", G_CALLBACK (gdk_paintable_invalidate_contents), self);
|
||||
g_signal_connect_swapped (self->background, "invalidate-size", G_CALLBACK (gdk_paintable_invalidate_size), self);
|
||||
}
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
|
||||
return GDK_PAINTABLE (self);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_path_paintable_set_path (GtkPathPaintable *self,
|
||||
GskPath *path)
|
||||
{
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
self->path = gsk_path_ref (path);
|
||||
|
||||
gdk_paintable_invalidate_contents (GDK_PAINTABLE (self));
|
||||
}
|
||||
|
||||
static GskPath *
|
||||
create_hexagon (GtkWidget *widget)
|
||||
{
|
||||
GskPathBuilder *builder;
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
|
||||
gsk_path_builder_move_to (builder, 120, 0);
|
||||
gsk_path_builder_line_to (builder, 360, 0);
|
||||
gsk_path_builder_line_to (builder, 480, 208);
|
||||
gsk_path_builder_line_to (builder, 360, 416);
|
||||
gsk_path_builder_line_to (builder, 120, 416);
|
||||
gsk_path_builder_line_to (builder, 0, 208);
|
||||
gsk_path_builder_close (builder);
|
||||
|
||||
return gsk_path_builder_free_to_path (builder);
|
||||
}
|
||||
|
||||
static GskPath *
|
||||
create_path_from_text (GtkWidget *widget)
|
||||
{
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
GskPathBuilder *builder;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, "Pango power!\nPango power!\nPango power!");
|
||||
desc = pango_font_description_from_string ("sans bold 36");
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
|
||||
gsk_path_builder_add_layout (builder, layout);
|
||||
|
||||
return gsk_path_builder_free_to_path (builder);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
build_path (GskPathOperation op,
|
||||
const graphene_point_t *pts,
|
||||
gsize n_pts,
|
||||
float weight,
|
||||
gpointer user_data)
|
||||
{
|
||||
GskPathBuilder *builder = user_data;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case GSK_PATH_MOVE:
|
||||
gsk_path_builder_move_to (builder, pts[0].x, pts[0].y);
|
||||
break;
|
||||
|
||||
case GSK_PATH_CLOSE:
|
||||
gsk_path_builder_close (builder);
|
||||
break;
|
||||
|
||||
case GSK_PATH_LINE:
|
||||
gsk_path_builder_line_to (builder, pts[1].x, pts[1].y);
|
||||
break;
|
||||
|
||||
case GSK_PATH_CURVE:
|
||||
gsk_path_builder_curve_to (builder, pts[1].x, pts[1].y, pts[2].x, pts[2].y, pts[3].x, pts[3].y);
|
||||
break;
|
||||
|
||||
case GSK_PATH_CONIC:
|
||||
gsk_path_builder_conic_to (builder, pts[1].x, pts[1].y, pts[2].x, pts[2].y, weight);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
update_path (GtkWidget *widget,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer measure)
|
||||
{
|
||||
float progress = gdk_frame_clock_get_frame_time (frame_clock) % (60 * G_USEC_PER_SEC) / (float) (30 * G_USEC_PER_SEC);
|
||||
GskPathBuilder *builder;
|
||||
GskPath *path;
|
||||
graphene_point_t pos;
|
||||
graphene_vec2_t tangent;
|
||||
GskStroke *stroke;
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
gsk_path_builder_add_segment (builder,
|
||||
measure,
|
||||
#if 1
|
||||
0.0, gsk_path_measure_get_length (measure));
|
||||
#else
|
||||
progress > 1 ? (progress - 1) * gsk_path_measure_get_length (measure) : 0.0,
|
||||
(progress < 1 ? progress : 1.0) * gsk_path_measure_get_length (measure));
|
||||
#endif
|
||||
|
||||
path = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
stroke = gsk_stroke_new (1);
|
||||
gsk_stroke_set_dash (stroke, (float[2]) { 10, 5 }, 2);
|
||||
gsk_stroke_set_dash_offset (stroke, - (gdk_frame_clock_get_frame_time (frame_clock) % G_USEC_PER_SEC) * 15. / G_USEC_PER_SEC);
|
||||
builder = gsk_path_builder_new ();
|
||||
gsk_path_dash (path, stroke, 0.2, build_path, builder);
|
||||
gsk_path_unref (path);
|
||||
|
||||
gsk_path_measure_get_point (measure,
|
||||
(progress > 1 ? (progress - 1) : progress) * gsk_path_measure_get_length (measure),
|
||||
&pos,
|
||||
&tangent);
|
||||
gsk_path_builder_move_to (builder, pos.x + 5 * graphene_vec2_get_x (&tangent), pos.y + 5 * graphene_vec2_get_y (&tangent));
|
||||
gsk_path_builder_line_to (builder, pos.x + 3 * graphene_vec2_get_y (&tangent), pos.y + 3 * graphene_vec2_get_x (&tangent));
|
||||
gsk_path_builder_line_to (builder, pos.x - 3 * graphene_vec2_get_y (&tangent), pos.y - 3 * graphene_vec2_get_x (&tangent));
|
||||
gsk_path_builder_close (builder);
|
||||
|
||||
path = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
gtk_path_paintable_set_path (GTK_PATH_PAINTABLE (gtk_picture_get_paintable (GTK_PICTURE (widget))),
|
||||
path);
|
||||
gsk_path_unref (path);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_path_fill (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
GdkPaintable *paintable;
|
||||
GtkMediaStream *stream;
|
||||
GskPath *path;
|
||||
graphene_rect_t bounds;
|
||||
GskPathMeasure *measure;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Path Fill");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
#if 0
|
||||
stream = gtk_media_file_new_for_resource ("/images/gtk-logo.webm");
|
||||
#else
|
||||
stream = gtk_nuclear_media_stream_new ();
|
||||
#endif
|
||||
gtk_media_stream_play (stream);
|
||||
gtk_media_stream_set_loop (stream, TRUE);
|
||||
|
||||
path = create_hexagon (window);
|
||||
path = create_path_from_text (window);
|
||||
gsk_path_get_bounds (path, &bounds);
|
||||
|
||||
paintable = gtk_path_paintable_new (path,
|
||||
GDK_PAINTABLE (stream),
|
||||
bounds.origin.x + bounds.size.width,
|
||||
bounds.origin.y + bounds.size.height);
|
||||
picture = gtk_picture_new_for_paintable (paintable);
|
||||
measure = gsk_path_measure_new (path);
|
||||
gtk_widget_add_tick_callback (picture, update_path, measure, (GDestroyNotify) gsk_path_measure_unref);
|
||||
gtk_picture_set_keep_aspect_ratio (GTK_PICTURE (picture), FALSE);
|
||||
gtk_picture_set_can_shrink (GTK_PICTURE (picture), FALSE);
|
||||
g_object_unref (paintable);
|
||||
|
||||
gtk_window_set_child (GTK_WINDOW (window), picture);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
|
||||
return window;
|
||||
}
|
338
demos/gtk-demo/path_maze.c
Normal file
338
demos/gtk-demo/path_maze.c
Normal file
@@ -0,0 +1,338 @@
|
||||
/* Path/Maze
|
||||
*
|
||||
* This demo shows how to use a GskPath to create a maze and use
|
||||
* gsk_path_measure_get_closest_point() to check the mouse stays
|
||||
* on the path.
|
||||
*
|
||||
* It also shows off the performance of GskPath (or not) as this
|
||||
* is a rather complex path.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "paintable.h"
|
||||
|
||||
#define MAZE_GRID_SIZE 20
|
||||
#define MAZE_STROKE_SIZE_ACTIVE (MAZE_GRID_SIZE - 4)
|
||||
#define MAZE_STROKE_SIZE_INACTIVE (MAZE_GRID_SIZE - 12)
|
||||
#define MAZE_WIDTH 31
|
||||
#define MAZE_HEIGHT 21
|
||||
|
||||
#define GTK_TYPE_MAZE (gtk_maze_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GtkMaze, gtk_maze, GTK, MAZE, GtkWidget)
|
||||
|
||||
struct _GtkMaze
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
GskPath *path;
|
||||
GskPathMeasure *measure;
|
||||
GdkPaintable *background;
|
||||
|
||||
gboolean active;
|
||||
};
|
||||
|
||||
struct _GtkMazeClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkMaze, gtk_maze, GTK_TYPE_WIDGET)
|
||||
|
||||
static void
|
||||
gtk_maze_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
GtkMaze *self = GTK_MAZE (widget);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
*minimum = *natural = self->width;
|
||||
else
|
||||
*minimum = *natural = self->height;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_maze_snapshot (GtkWidget *widget,
|
||||
GdkSnapshot *snapshot)
|
||||
{
|
||||
GtkMaze *self = GTK_MAZE (widget);
|
||||
double width = gtk_widget_get_width (widget);
|
||||
double height = gtk_widget_get_height (widget);
|
||||
GskStroke *stroke;
|
||||
|
||||
stroke = gsk_stroke_new (MAZE_STROKE_SIZE_INACTIVE);
|
||||
if (self->active)
|
||||
gsk_stroke_set_line_width (stroke, MAZE_STROKE_SIZE_ACTIVE);
|
||||
gsk_stroke_set_line_join (stroke, GSK_LINE_JOIN_ROUND);
|
||||
gsk_stroke_set_line_cap (stroke, GSK_LINE_CAP_ROUND);
|
||||
gtk_snapshot_push_stroke (snapshot, self->path, stroke);
|
||||
gsk_stroke_free (stroke);
|
||||
|
||||
if (self->background)
|
||||
{
|
||||
gdk_paintable_snapshot (self->background, snapshot, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_snapshot_append_linear_gradient (snapshot,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height),
|
||||
&GRAPHENE_POINT_INIT (0, 0),
|
||||
&GRAPHENE_POINT_INIT (width, height),
|
||||
(GskColorStop[8]) {
|
||||
{ 0.0, { 1.0, 0.0, 0.0, 1.0 } },
|
||||
{ 0.2, { 1.0, 0.0, 0.0, 1.0 } },
|
||||
{ 0.3, { 1.0, 1.0, 0.0, 1.0 } },
|
||||
{ 0.4, { 0.0, 1.0, 0.0, 1.0 } },
|
||||
{ 0.6, { 0.0, 1.0, 1.0, 1.0 } },
|
||||
{ 0.7, { 0.0, 0.0, 1.0, 1.0 } },
|
||||
{ 0.8, { 1.0, 0.0, 1.0, 1.0 } },
|
||||
{ 1.0, { 1.0, 0.0, 1.0, 1.0 } }
|
||||
},
|
||||
8);
|
||||
}
|
||||
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_maze_dispose (GObject *object)
|
||||
{
|
||||
GtkMaze *self = GTK_MAZE (object);
|
||||
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
g_clear_pointer (&self->measure, gsk_path_measure_unref);
|
||||
if (self->background)
|
||||
{
|
||||
g_signal_handlers_disconnect_matched (self->background, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
|
||||
g_clear_object (&self->background);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_maze_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_maze_class_init (GtkMazeClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = gtk_maze_dispose;
|
||||
|
||||
widget_class->measure = gtk_maze_measure;
|
||||
widget_class->snapshot = gtk_maze_snapshot;
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_motion (GtkEventControllerMotion *controller,
|
||||
double x,
|
||||
double y,
|
||||
GtkMaze *self)
|
||||
{
|
||||
if (!self->active)
|
||||
return;
|
||||
|
||||
if (gsk_path_measure_get_closest_point (self->measure, &GRAPHENE_POINT_INIT (x, y), NULL) <= MAZE_STROKE_SIZE_ACTIVE / 2.0f)
|
||||
return;
|
||||
|
||||
self->active = FALSE;
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_leave (GtkEventControllerMotion *controller,
|
||||
GtkMaze *self)
|
||||
{
|
||||
if (!self->active)
|
||||
{
|
||||
self->active = TRUE;
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_maze_init (GtkMaze *self)
|
||||
{
|
||||
GtkEventController *controller;
|
||||
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_event_controller_motion_new ());
|
||||
g_signal_connect (controller, "motion", G_CALLBACK (pointer_motion), self);
|
||||
g_signal_connect (controller, "leave", G_CALLBACK (pointer_leave), self);
|
||||
gtk_widget_add_controller (GTK_WIDGET (self), controller);
|
||||
|
||||
self->active = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_maze_set_path (GtkMaze *self,
|
||||
GskPath *path)
|
||||
{
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
g_clear_pointer (&self->measure, gsk_path_measure_unref);
|
||||
self->path = gsk_path_ref (path);
|
||||
self->measure = gsk_path_measure_new (path);
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_maze_new (GskPath *path,
|
||||
GdkPaintable *background,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GtkMaze *self;
|
||||
|
||||
self = g_object_new (GTK_TYPE_MAZE, NULL);
|
||||
|
||||
gtk_maze_set_path (self, path);
|
||||
gsk_path_unref (path);
|
||||
self->background = background;
|
||||
if (self->background)
|
||||
{
|
||||
g_signal_connect_swapped (self->background, "invalidate-contents", G_CALLBACK (gtk_widget_queue_draw), self);
|
||||
g_signal_connect_swapped (self->background, "invalidate-size", G_CALLBACK (gtk_widget_queue_resize), self);
|
||||
}
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
|
||||
return GTK_WIDGET (self);
|
||||
}
|
||||
|
||||
static void
|
||||
add_point_to_maze (GtkBitset *maze,
|
||||
GskPathBuilder *builder,
|
||||
guint x,
|
||||
guint y)
|
||||
{
|
||||
gboolean set[4] = { };
|
||||
guint dir;
|
||||
|
||||
gtk_bitset_add (maze, y * MAZE_WIDTH + x);
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
set[0] = set[0] || x == 0 || gtk_bitset_contains (maze, y * MAZE_WIDTH + x - 1);
|
||||
set[1] = set[1] || y == 0 || gtk_bitset_contains (maze, (y - 1) * MAZE_WIDTH + x);
|
||||
set[2] = set[2] || x + 1 == MAZE_WIDTH || gtk_bitset_contains (maze, y * MAZE_WIDTH + x + 1);
|
||||
set[3] = set[3] || y + 1 == MAZE_HEIGHT || gtk_bitset_contains (maze, (y + 1) * MAZE_WIDTH + x);
|
||||
|
||||
if (set[0] && set[1] && set[2] && set[3])
|
||||
return;
|
||||
|
||||
do
|
||||
{
|
||||
dir = g_random_int_range (0, 4);
|
||||
}
|
||||
while (set[dir]);
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case 0:
|
||||
gsk_path_builder_move_to (builder, (x + 0.5) * MAZE_GRID_SIZE, (y + 0.5) * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_line_to (builder, (x - 0.5) * MAZE_GRID_SIZE, (y + 0.5) * MAZE_GRID_SIZE);
|
||||
add_point_to_maze (maze, builder, x - 1, y);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
gsk_path_builder_move_to (builder, (x + 0.5) * MAZE_GRID_SIZE, (y + 0.5) * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_line_to (builder, (x + 0.5) * MAZE_GRID_SIZE, (y - 0.5) * MAZE_GRID_SIZE);
|
||||
add_point_to_maze (maze, builder, x, y - 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
gsk_path_builder_move_to (builder, (x + 0.5) * MAZE_GRID_SIZE, (y + 0.5) * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_line_to (builder, (x + 1.5) * MAZE_GRID_SIZE, (y + 0.5) * MAZE_GRID_SIZE);
|
||||
add_point_to_maze (maze, builder, x + 1, y);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
gsk_path_builder_move_to (builder, (x + 0.5) * MAZE_GRID_SIZE, (y + 0.5) * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_line_to (builder, (x + 0.5) * MAZE_GRID_SIZE, (y + 1.5) * MAZE_GRID_SIZE);
|
||||
add_point_to_maze (maze, builder, x, y + 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static GskPath *
|
||||
create_path_for_maze (GtkWidget *widget)
|
||||
{
|
||||
GskPathBuilder *builder;
|
||||
GtkBitset *maze;
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
maze = gtk_bitset_new_empty ();
|
||||
/* make sure the outer lines are unreachable:
|
||||
* Set the full range, then remove the center again. */
|
||||
gtk_bitset_add_range (maze, 0, MAZE_WIDTH * MAZE_HEIGHT);
|
||||
gtk_bitset_remove_rectangle (maze, MAZE_WIDTH + 1, MAZE_WIDTH - 2, MAZE_HEIGHT - 2, MAZE_WIDTH);
|
||||
|
||||
/* Fill the maze */
|
||||
add_point_to_maze (maze, builder, MAZE_WIDTH / 2, MAZE_HEIGHT / 2);
|
||||
|
||||
/* Add start and stop lines */
|
||||
gsk_path_builder_move_to (builder, 1.5 * MAZE_GRID_SIZE, -0.5 * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_line_to (builder, 1.5 * MAZE_GRID_SIZE, 1.5 * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_move_to (builder, (MAZE_WIDTH - 1.5) * MAZE_GRID_SIZE, (MAZE_HEIGHT - 1.5) * MAZE_GRID_SIZE);
|
||||
gsk_path_builder_line_to (builder, (MAZE_WIDTH - 1.5) * MAZE_GRID_SIZE, (MAZE_HEIGHT + 0.5) * MAZE_GRID_SIZE);
|
||||
|
||||
|
||||
gtk_bitset_unref (maze);
|
||||
|
||||
return gsk_path_builder_free_to_path (builder);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_path_maze (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *maze;
|
||||
GtkMediaStream *stream;
|
||||
GskPath *path;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Follow the maze with the mouse");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
#if 0
|
||||
stream = gtk_media_file_new_for_resource ("/images/gtk-logo.webm");
|
||||
#else
|
||||
stream = gtk_nuclear_media_stream_new ();
|
||||
#endif
|
||||
gtk_media_stream_play (stream);
|
||||
gtk_media_stream_set_loop (stream, TRUE);
|
||||
|
||||
path = create_path_for_maze (window);
|
||||
|
||||
maze = gtk_maze_new (path,
|
||||
GDK_PAINTABLE (stream),
|
||||
MAZE_WIDTH * MAZE_GRID_SIZE,
|
||||
MAZE_HEIGHT * MAZE_GRID_SIZE);
|
||||
|
||||
gtk_window_set_child (GTK_WINDOW (window), maze);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
|
||||
return window;
|
||||
}
|
590
demos/gtk-demo/path_text.c
Normal file
590
demos/gtk-demo/path_text.c
Normal file
@@ -0,0 +1,590 @@
|
||||
/* Path/Text
|
||||
*
|
||||
* This demo shows how to use GskPath to animate a path along another path.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_PATH_WIDGET (gtk_path_widget_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GtkPathWidget, gtk_path_widget, GTK, PATH_WIDGET, GtkWidget)
|
||||
|
||||
#define POINT_SIZE 8
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_TEXT,
|
||||
PROP_EDITABLE,
|
||||
N_PROPS
|
||||
};
|
||||
|
||||
struct _GtkPathWidget
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
|
||||
char *text;
|
||||
gboolean editable;
|
||||
|
||||
graphene_point_t points[4];
|
||||
|
||||
guint active_point;
|
||||
float line_closest;
|
||||
|
||||
GskPath *line_path;
|
||||
GskPathMeasure *line_measure;
|
||||
GskPath *text_path;
|
||||
|
||||
GdkPaintable *background;
|
||||
};
|
||||
|
||||
struct _GtkPathWidgetClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
static GParamSpec *properties[N_PROPS] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE (GtkPathWidget, gtk_path_widget, GTK_TYPE_WIDGET)
|
||||
|
||||
static GskPath *
|
||||
create_path_from_text (GtkWidget *widget,
|
||||
const char *text)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
cairo_path_t *path;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
GskPath *result;
|
||||
|
||||
surface = cairo_recording_surface_create (CAIRO_CONTENT_COLOR_ALPHA, NULL);
|
||||
cr = cairo_create (surface);
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, text);
|
||||
desc = pango_font_description_from_string ("sans bold 36");
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
cairo_move_to (cr, 0, - pango_layout_get_baseline (layout) / (double) PANGO_SCALE);
|
||||
pango_cairo_layout_path (cr, layout);
|
||||
path = cairo_copy_path_flat (cr);
|
||||
result = gsk_path_new_from_cairo (path);
|
||||
|
||||
cairo_path_destroy (path);
|
||||
g_object_unref (layout);
|
||||
cairo_destroy (cr);
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GskPathMeasure *measure;
|
||||
GskPathBuilder *builder;
|
||||
double scale;
|
||||
} GtkPathTransform;
|
||||
|
||||
static void
|
||||
gtk_path_transform_point (GskPathMeasure *measure,
|
||||
const graphene_point_t *pt,
|
||||
float scale,
|
||||
graphene_point_t *res)
|
||||
{
|
||||
graphene_vec2_t tangent;
|
||||
|
||||
gsk_path_measure_get_point (measure, pt->x * scale, res, &tangent);
|
||||
|
||||
res->x -= pt->y * scale * graphene_vec2_get_y (&tangent);
|
||||
res->y += pt->y * scale * graphene_vec2_get_x (&tangent);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_path_transform_op (GskPathOperation op,
|
||||
const graphene_point_t *pts,
|
||||
gsize n_pts,
|
||||
float weight,
|
||||
gpointer data)
|
||||
{
|
||||
GtkPathTransform *transform = data;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case GSK_PATH_MOVE:
|
||||
{
|
||||
graphene_point_t res;
|
||||
gtk_path_transform_point (transform->measure, &pts[0], transform->scale, &res);
|
||||
gsk_path_builder_move_to (transform->builder, res.x, res.y);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_LINE:
|
||||
{
|
||||
graphene_point_t res;
|
||||
gtk_path_transform_point (transform->measure, &pts[1], transform->scale, &res);
|
||||
gsk_path_builder_line_to (transform->builder, res.x, res.y);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_CURVE:
|
||||
{
|
||||
graphene_point_t res[3];
|
||||
gtk_path_transform_point (transform->measure, &pts[1], transform->scale, &res[0]);
|
||||
gtk_path_transform_point (transform->measure, &pts[2], transform->scale, &res[1]);
|
||||
gtk_path_transform_point (transform->measure, &pts[3], transform->scale, &res[2]);
|
||||
gsk_path_builder_curve_to (transform->builder, res[0].x, res[0].y, res[1].x, res[1].y, res[2].x, res[2].y);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_CONIC:
|
||||
{
|
||||
graphene_point_t res[2];
|
||||
gtk_path_transform_point (transform->measure, &pts[1], transform->scale, &res[0]);
|
||||
gtk_path_transform_point (transform->measure, &pts[2], transform->scale, &res[1]);
|
||||
gsk_path_builder_conic_to (transform->builder, res[0].x, res[0].y, res[1].x, res[1].y, weight);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_CLOSE:
|
||||
gsk_path_builder_close (transform->builder);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GskPath *
|
||||
gtk_path_transform (GskPathMeasure *measure,
|
||||
GskPath *path)
|
||||
{
|
||||
GtkPathTransform transform = { measure, gsk_path_builder_new () };
|
||||
graphene_rect_t bounds;
|
||||
|
||||
gsk_path_get_bounds (path, &bounds);
|
||||
if (bounds.origin.x + bounds.size.width > 0)
|
||||
transform.scale = gsk_path_measure_get_length (measure) / (bounds.origin.x + bounds.size.width);
|
||||
else
|
||||
transform.scale = 1.0f;
|
||||
|
||||
gsk_path_foreach (path, GSK_PATH_FOREACH_ALLOW_CURVE, gtk_path_transform_op, &transform);
|
||||
|
||||
return gsk_path_builder_free_to_path (transform.builder);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_clear_text_path (GtkPathWidget *self)
|
||||
{
|
||||
g_clear_pointer (&self->text_path, gsk_path_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_clear_paths (GtkPathWidget *self)
|
||||
{
|
||||
gtk_path_widget_clear_text_path (self);
|
||||
|
||||
g_clear_pointer (&self->line_path, gsk_path_unref);
|
||||
g_clear_pointer (&self->line_measure, gsk_path_measure_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_create_text_path (GtkPathWidget *self)
|
||||
{
|
||||
GskPath *path;
|
||||
|
||||
gtk_path_widget_clear_text_path (self);
|
||||
|
||||
if (self->line_measure == NULL)
|
||||
return;
|
||||
|
||||
path = create_path_from_text (GTK_WIDGET (self), self->text);
|
||||
self->text_path = gtk_path_transform (self->line_measure, path);
|
||||
|
||||
gsk_path_unref (path);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_create_paths (GtkPathWidget *self)
|
||||
{
|
||||
double width = gtk_widget_get_width (GTK_WIDGET (self));
|
||||
double height = gtk_widget_get_height (GTK_WIDGET (self));
|
||||
GskPathBuilder *builder;
|
||||
|
||||
gtk_path_widget_clear_paths (self);
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
gsk_path_builder_move_to (builder,
|
||||
self->points[0].x * width, self->points[0].y * height);
|
||||
gsk_path_builder_curve_to (builder,
|
||||
self->points[1].x * width, self->points[1].y * height,
|
||||
self->points[2].x * width, self->points[2].y * height,
|
||||
self->points[3].x * width, self->points[3].y * height);
|
||||
self->line_path = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
self->line_measure = gsk_path_measure_new (self->line_path);
|
||||
|
||||
gtk_path_widget_create_text_path (self);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_allocate (GtkWidget *widget,
|
||||
int width,
|
||||
int height,
|
||||
int baseline)
|
||||
{
|
||||
GtkPathWidget *self = GTK_PATH_WIDGET (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_path_widget_parent_class)->size_allocate (widget, width, height, baseline);
|
||||
|
||||
gtk_path_widget_create_paths (self);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
GtkPathWidget *self = GTK_PATH_WIDGET (widget);
|
||||
double width = gtk_widget_get_width (widget);
|
||||
double height = gtk_widget_get_height (widget);
|
||||
GskPath *path;
|
||||
GskStroke *stroke;
|
||||
gsize i;
|
||||
|
||||
/* frosted glass the background */
|
||||
gtk_snapshot_push_blur (snapshot, 100);
|
||||
gdk_paintable_snapshot (self->background, snapshot, width, height);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 1, 1, 1, 0.6 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
/* draw the text */
|
||||
if (self->text_path)
|
||||
{
|
||||
gtk_snapshot_push_fill (snapshot, self->text_path, GSK_FILL_RULE_WINDING);
|
||||
gdk_paintable_snapshot (self->background, snapshot, width, height);
|
||||
|
||||
/* ... with an emboss effect */
|
||||
stroke = gsk_stroke_new (2.0);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT(1, 1));
|
||||
gtk_snapshot_push_stroke (snapshot, self->text_path, stroke);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 0, 0, 0, 0.2 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gsk_stroke_free (stroke);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
gtk_snapshot_pop (snapshot);
|
||||
}
|
||||
|
||||
if (self->editable && self->line_path)
|
||||
{
|
||||
GskPathBuilder *builder;
|
||||
|
||||
/* draw the control line */
|
||||
stroke = gsk_stroke_new (1.0);
|
||||
gtk_snapshot_push_stroke (snapshot, self->line_path, stroke);
|
||||
gsk_stroke_free (stroke);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 0, 0, 0, 1 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
/* draw the points */
|
||||
builder = gsk_path_builder_new ();
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
gsk_path_builder_add_circle (builder, &GRAPHENE_POINT_INIT (self->points[i].x * width, self->points[i].y * height), POINT_SIZE);
|
||||
}
|
||||
path = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
gtk_snapshot_push_fill (snapshot, path, GSK_FILL_RULE_WINDING);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 1, 1, 1, 1 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
stroke = gsk_stroke_new (1.0);
|
||||
gtk_snapshot_push_stroke (snapshot, path, stroke);
|
||||
gsk_stroke_free (stroke);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 0, 0, 0, 1 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
gsk_path_unref (path);
|
||||
}
|
||||
|
||||
if (self->line_closest >= 0)
|
||||
{
|
||||
GskPathBuilder *builder;
|
||||
graphene_point_t closest;
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
gsk_path_measure_get_point (self->line_measure, self->line_closest, &closest, NULL);
|
||||
gsk_path_builder_add_circle (builder, &closest, POINT_SIZE);
|
||||
path = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
gtk_snapshot_push_fill (snapshot, path, GSK_FILL_RULE_WINDING);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 0, 0, 1, 1 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
gsk_path_unref (path);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_set_text (GtkPathWidget *self,
|
||||
const char *text)
|
||||
{
|
||||
if (g_strcmp0 (self->text, text) == 0)
|
||||
return;
|
||||
|
||||
g_free (self->text);
|
||||
self->text = g_strdup (text);
|
||||
|
||||
gtk_path_widget_create_paths (self);
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TEXT]);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_set_editable (GtkPathWidget *self,
|
||||
gboolean editable)
|
||||
{
|
||||
if (self->editable == editable)
|
||||
return;
|
||||
|
||||
self->editable = editable;
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_EDITABLE]);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
|
||||
{
|
||||
GtkPathWidget *self = GTK_PATH_WIDGET (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_TEXT:
|
||||
gtk_path_widget_set_text (self, g_value_get_string (value));
|
||||
break;
|
||||
|
||||
case PROP_EDITABLE:
|
||||
gtk_path_widget_set_editable (self, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkPathWidget *self = GTK_PATH_WIDGET (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_TEXT:
|
||||
g_value_set_string (value, self->text);
|
||||
break;
|
||||
|
||||
case PROP_EDITABLE:
|
||||
g_value_set_boolean (value, self->editable);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_dispose (GObject *object)
|
||||
{
|
||||
GtkPathWidget *self = GTK_PATH_WIDGET (object);
|
||||
|
||||
gtk_path_widget_clear_paths (self);
|
||||
|
||||
G_OBJECT_CLASS (gtk_path_widget_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_class_init (GtkPathWidgetClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = gtk_path_widget_dispose;
|
||||
object_class->set_property = gtk_path_widget_set_property;
|
||||
object_class->get_property = gtk_path_widget_get_property;
|
||||
|
||||
widget_class->size_allocate = gtk_path_widget_allocate;
|
||||
widget_class->snapshot = gtk_path_widget_snapshot;
|
||||
|
||||
properties[PROP_TEXT] =
|
||||
g_param_spec_string ("text",
|
||||
"text",
|
||||
"Text transformed along a path",
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
properties[PROP_EDITABLE] =
|
||||
g_param_spec_boolean ("editable",
|
||||
"editable",
|
||||
"If the path can be edited by the user",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class, N_PROPS, properties);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_begin (GtkGestureDrag *gesture,
|
||||
double x,
|
||||
double y,
|
||||
GtkPathWidget *self)
|
||||
{
|
||||
graphene_point_t mouse = GRAPHENE_POINT_INIT (x, y);
|
||||
double width = gtk_widget_get_width (GTK_WIDGET (self));
|
||||
double height = gtk_widget_get_height (GTK_WIDGET (self));
|
||||
gsize i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (graphene_point_distance (&GRAPHENE_POINT_INIT (self->points[i].x * width, self->points[i].y * height), &mouse, NULL, NULL) <= POINT_SIZE)
|
||||
{
|
||||
self->active_point = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 4)
|
||||
{
|
||||
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
drag_update (GtkGestureDrag *drag,
|
||||
double offset_x,
|
||||
double offset_y,
|
||||
GtkPathWidget *self)
|
||||
{
|
||||
double width = gtk_widget_get_width (GTK_WIDGET (self));
|
||||
double height = gtk_widget_get_height (GTK_WIDGET (self));
|
||||
double start_x, start_y;
|
||||
|
||||
gtk_gesture_drag_get_start_point (drag, &start_x, &start_y);
|
||||
|
||||
self->points[self->active_point] = GRAPHENE_POINT_INIT ((start_x + offset_x) / width,
|
||||
(start_y + offset_y) / height);
|
||||
self->points[self->active_point].x = CLAMP (self->points[self->active_point].x, 0, 1);
|
||||
self->points[self->active_point].y = CLAMP (self->points[self->active_point].y, 0, 1);
|
||||
|
||||
gtk_path_widget_create_paths (self);
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_motion (GtkEventControllerMotion *controller,
|
||||
double x,
|
||||
double y,
|
||||
GtkPathWidget *self)
|
||||
{
|
||||
gsk_path_measure_get_closest_point_full (self->line_measure,
|
||||
&GRAPHENE_POINT_INIT (x, y),
|
||||
INFINITY,
|
||||
&self->line_closest,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_leave (GtkEventControllerMotion *controller,
|
||||
GtkPathWidget *self)
|
||||
{
|
||||
self->line_closest = -1;
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_widget_init (GtkPathWidget *self)
|
||||
{
|
||||
GtkEventController *controller;
|
||||
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_drag_new ());
|
||||
g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self);
|
||||
g_signal_connect (controller, "drag-update", G_CALLBACK (drag_update), self);
|
||||
g_signal_connect (controller, "drag-end", G_CALLBACK (drag_update), self);
|
||||
gtk_widget_add_controller (GTK_WIDGET (self), controller);
|
||||
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_event_controller_motion_new ());
|
||||
g_signal_connect (controller, "enter", G_CALLBACK (pointer_motion), self);
|
||||
g_signal_connect (controller, "motion", G_CALLBACK (pointer_motion), self);
|
||||
g_signal_connect (controller, "leave", G_CALLBACK (pointer_leave), self);
|
||||
gtk_widget_add_controller (GTK_WIDGET (self), controller);
|
||||
|
||||
self->line_closest = -1;
|
||||
|
||||
self->points[0] = GRAPHENE_POINT_INIT (0.1, 0.9);
|
||||
self->points[1] = GRAPHENE_POINT_INIT (0.3, 0.1);
|
||||
self->points[2] = GRAPHENE_POINT_INIT (0.7, 0.1);
|
||||
self->points[3] = GRAPHENE_POINT_INIT (0.9, 0.9);
|
||||
|
||||
self->background = GDK_PAINTABLE (gdk_texture_new_from_resource ("/sliding_puzzle/portland-rose.jpg"));
|
||||
|
||||
gtk_path_widget_set_text (self, "It's almost working");
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_path_widget_new (void)
|
||||
{
|
||||
GtkPathWidget *self;
|
||||
|
||||
self = g_object_new (GTK_TYPE_PATH_WIDGET, NULL);
|
||||
|
||||
return GTK_WIDGET (self);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_path_text (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
|
||||
g_type_ensure (GTK_TYPE_PATH_WIDGET);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/path_text/path_text.ui");
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
|
||||
return window;
|
||||
}
|
38
demos/gtk-demo/path_text.ui
Normal file
38
demos/gtk-demo/path_text.ui
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">Text along a Path</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="edit-toggle">
|
||||
<property name="icon-name">document-edit-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="edit-toggle" bind-property="active" bind-flags="sync-create"></property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="text">
|
||||
<property name="text">Through the looking glass</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPathWidget" id="view">
|
||||
<property name="editable" bind-source="edit-toggle" bind-property="active" bind-flags="sync-create"></property>
|
||||
<property name="text" bind-source="text" bind-property="text" bind-flags="sync-create"></property>
|
||||
<property name="hexpand">true</property>
|
||||
<property name="vexpand">true</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@@ -1,9 +1,8 @@
|
||||
/* Pickers
|
||||
* #Keywords: GtkColorChooser, GtkFontChooser, GtkFileChooser,
|
||||
* #Keywords: GtkApplicationChooser
|
||||
* #Keywords: GtkColorChooser, GtkFontChooser, GtkApplicationChooser
|
||||
*
|
||||
* These widgets are mainly intended for use in preference dialogs.
|
||||
* They allow to select colors, fonts, files, directories and applications.
|
||||
* They allow to select colors, fonts, directories and applications.
|
||||
*
|
||||
* This demo shows both the default appearance for these dialogs,
|
||||
* as well as some of the customizations that are possible.
|
||||
@@ -63,9 +62,6 @@ do_pickers (GtkWidget *do_widget)
|
||||
|
||||
if (!window)
|
||||
{
|
||||
char *dir;
|
||||
GFile *file;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
@@ -123,55 +119,14 @@ do_pickers (GtkWidget *do_widget)
|
||||
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 2, 1, 1, 1);
|
||||
|
||||
label = gtk_label_new ("File:");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
|
||||
|
||||
picker = gtk_file_chooser_button_new ("Pick a File",
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 1, 2, 1, 1);
|
||||
|
||||
picker = gtk_file_chooser_button_new ("Pick a File",
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
|
||||
dir = g_get_current_dir ();
|
||||
file = g_file_new_for_path (dir);
|
||||
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (picker), file, NULL);
|
||||
g_object_unref (file);
|
||||
g_free (dir);
|
||||
|
||||
gtk_file_chooser_add_choice (GTK_FILE_CHOOSER (picker),
|
||||
"choice",
|
||||
"Encoding",
|
||||
(const char *[]) { "option1", "option2", NULL },
|
||||
(const char *[]) { "UTF-8", "Other Encoding", NULL });
|
||||
gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (picker), "choice", "option1");
|
||||
gtk_file_chooser_add_choice (GTK_FILE_CHOOSER (picker),
|
||||
"check",
|
||||
"Read backwards",
|
||||
NULL, NULL);
|
||||
gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (picker), "check", "false");
|
||||
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 2, 2, 1, 1);
|
||||
|
||||
label = gtk_label_new ("Folder:");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
picker = gtk_file_chooser_button_new ("Pick a Folder",
|
||||
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 3, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 1, 3, 1, 1);
|
||||
|
||||
label = gtk_label_new ("Mail:");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
picker = gtk_app_chooser_button_new ("x-scheme-handler/mailto");
|
||||
gtk_app_chooser_button_set_show_dialog_item (GTK_APP_CHOOSER_BUTTON (picker), TRUE);
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 4, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 1, 4, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 3, 1, 1);
|
||||
gtk_grid_attach (GTK_GRID (table), picker, 1, 3, 1, 1);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -31,7 +31,7 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord, in vec2 resolution, in vec
|
||||
float propagation_length = time * wave_speed;
|
||||
|
||||
float t = (propagation_length - distance_from_center) / wave_length;
|
||||
float offset_magnitude = 0;
|
||||
float offset_magnitude = 0.0;
|
||||
if (t > 0.0)
|
||||
offset_magnitude = decay(wave_height * sin(t * 2.0 * PI), t);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Sliding Puzzle
|
||||
* #Keywords: GdkPaintable, GdkGesture, game
|
||||
* #Keywords: GdkPaintable, GdkGesture, GtkShortcutController, game
|
||||
*
|
||||
* This demo demonstrates how to use gestures and paintables to create a
|
||||
* small sliding puzzle game.
|
||||
@@ -281,7 +281,8 @@ start_puzzle (GdkPaintable *paintable)
|
||||
gtk_aspect_frame_set_obey_child (GTK_ASPECT_FRAME (frame), FALSE);
|
||||
|
||||
/* Add shortcuts so people can use the arrow
|
||||
* keys to move the puzzle */
|
||||
* keys to move the puzzle
|
||||
*/
|
||||
controller = gtk_shortcut_controller_new ();
|
||||
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller),
|
||||
GTK_SHORTCUT_SCOPE_LOCAL);
|
||||
|
1215
demos/gtk-demo/suggestionentry.c
Normal file
1215
demos/gtk-demo/suggestionentry.c
Normal file
File diff suppressed because it is too large
Load Diff
28
demos/gtk-demo/suggestionentry.css
Normal file
28
demos/gtk-demo/suggestionentry.css
Normal file
@@ -0,0 +1,28 @@
|
||||
entry.suggestion > popover.menu.background > contents {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
entry.suggestion arrow {
|
||||
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
|
||||
min-height: 16px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
entry.suggestion > popover {
|
||||
margin-top: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
entry.suggestion > popover listview {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
entry.suggestion > popover listview > row {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
entry.suggestion > popover listview > row:selected {
|
||||
outline-color: rgba(1,1,1,0.2);
|
||||
color: @theme_text_color;
|
||||
background-color: shade(#f6f5f4, 0.97);
|
||||
}
|
66
demos/gtk-demo/suggestionentry.h
Normal file
66
demos/gtk-demo/suggestionentry.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define MATCH_TYPE_OBJECT (match_object_get_type ())
|
||||
#define MATCH_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATCH_TYPE_OBJECT, MatchObject))
|
||||
#define MATCH_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATCH_TYPE_OBJECT))
|
||||
|
||||
typedef struct _MatchObject MatchObject;
|
||||
|
||||
GType match_object_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gpointer match_object_get_item (MatchObject *object);
|
||||
const char * match_object_get_string (MatchObject *object);
|
||||
guint match_object_get_match_start (MatchObject *object);
|
||||
guint match_object_get_match_end (MatchObject *object);
|
||||
guint match_object_get_score (MatchObject *object);
|
||||
void match_object_set_match (MatchObject *object,
|
||||
guint start,
|
||||
guint end,
|
||||
guint score);
|
||||
|
||||
#define SUGGESTION_TYPE_ENTRY (suggestion_entry_get_type ())
|
||||
#define SUGGESTION_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SUGGESTION_TYPE_ENTRY, SuggestionEntry))
|
||||
#define SUGGESTION_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SUGGESTION_TYPE_ENTRY))
|
||||
|
||||
typedef struct _SuggestionEntry SuggestionEntry;
|
||||
|
||||
GType suggestion_entry_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget* suggestion_entry_new (void);
|
||||
|
||||
void suggestion_entry_set_model (SuggestionEntry *self,
|
||||
GListModel *model);
|
||||
GListModel * suggestion_entry_get_model (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_factory (SuggestionEntry *self,
|
||||
GtkListItemFactory *factory);
|
||||
GtkListItemFactory *
|
||||
suggestion_entry_get_factory (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_use_filter (SuggestionEntry *self,
|
||||
gboolean use_ilter);
|
||||
gboolean suggestion_entry_get_use_filter (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_expression (SuggestionEntry *self,
|
||||
GtkExpression *expression);
|
||||
GtkExpression * suggestion_entry_get_expression (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_show_arrow (SuggestionEntry *self,
|
||||
gboolean show_arrow);
|
||||
gboolean suggestion_entry_get_show_arrow (SuggestionEntry *self);
|
||||
|
||||
typedef void (* SuggestionEntryMatchFunc) (MatchObject *object,
|
||||
const char *search,
|
||||
gpointer user_data);
|
||||
|
||||
void suggestion_entry_set_match_func (SuggestionEntry *self,
|
||||
SuggestionEntryMatchFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
G_END_DECLS
|
@@ -7,68 +7,186 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
draw_text (GtkDrawingArea *da,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
#define TEXT_TYPE_MASK_DEMO (text_mask_demo_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (TextMaskDemo, text_mask_demo, TEXT, MASK_DEMO, GtkWidget)
|
||||
|
||||
struct _TextMaskDemo
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
PangoLayout *layout;
|
||||
GtkWidget parent_instance;
|
||||
|
||||
char *text;
|
||||
PangoFontDescription *desc;
|
||||
GskPath *path;
|
||||
};
|
||||
|
||||
cairo_save (cr);
|
||||
struct _TextMaskDemoClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
layout = gtk_widget_create_pango_layout (GTK_WIDGET (da), "Pango power!\nPango power!\nPango power!");
|
||||
desc = pango_font_description_from_string ("sans bold 34");
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
G_DEFINE_TYPE (TextMaskDemo, text_mask_demo, GTK_TYPE_WIDGET)
|
||||
|
||||
cairo_move_to (cr, 30, 20);
|
||||
pango_cairo_layout_path (cr, layout);
|
||||
g_object_unref (layout);
|
||||
static void
|
||||
update_path (TextMaskDemo *demo)
|
||||
{
|
||||
PangoLayout *layout;
|
||||
GskPathBuilder *builder;
|
||||
|
||||
pattern = cairo_pattern_create_linear (0.0, 0.0, width, height);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.0, 1.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.2, 1.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.3, 1.0, 1.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.4, 0.0, 1.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.6, 0.0, 1.0, 1.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.7, 0.0, 0.0, 1.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0.8, 1.0, 0.0, 1.0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 1.0, 1.0, 0.0, 1.0);
|
||||
g_clear_pointer (&demo->path, gsk_path_unref);
|
||||
|
||||
cairo_set_source (cr, pattern);
|
||||
cairo_fill_preserve (cr);
|
||||
layout = gtk_widget_create_pango_layout (GTK_WIDGET (demo), demo->text);
|
||||
pango_layout_set_font_description (layout, demo->desc);
|
||||
|
||||
cairo_pattern_destroy (pattern);
|
||||
builder = gsk_path_builder_new ();
|
||||
gsk_path_builder_add_layout (builder, layout);
|
||||
demo->path = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
|
||||
cairo_set_line_width (cr, 0.5);
|
||||
cairo_stroke (cr);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (demo));
|
||||
}
|
||||
|
||||
cairo_restore (cr);
|
||||
static void
|
||||
text_mask_demo_init (TextMaskDemo *demo)
|
||||
{
|
||||
demo->text = g_strdup ("No text. No fun");
|
||||
demo->desc = pango_font_description_from_string ("Cantarell 20");
|
||||
update_path (demo);
|
||||
}
|
||||
|
||||
static void
|
||||
text_mask_demo_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
TextMaskDemo *demo = TEXT_MASK_DEMO (widget);
|
||||
float width, height;
|
||||
GskColorStop stops[4];
|
||||
GskStroke *stroke;
|
||||
|
||||
gdk_rgba_parse (&stops[0].color, "red");
|
||||
gdk_rgba_parse (&stops[1].color, "green");
|
||||
gdk_rgba_parse (&stops[2].color, "yellow");
|
||||
gdk_rgba_parse (&stops[3].color, "blue");
|
||||
|
||||
width = gtk_widget_get_width (widget);
|
||||
height = gtk_widget_get_height (widget);
|
||||
|
||||
stops[0].offset = 0;
|
||||
stops[1].offset = 0.25;
|
||||
stops[2].offset = 0.50;
|
||||
stops[3].offset = 0.75;
|
||||
|
||||
gtk_snapshot_push_fill (snapshot, demo->path, GSK_FILL_RULE_WINDING);
|
||||
|
||||
gtk_snapshot_append_linear_gradient (snapshot,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height),
|
||||
&GRAPHENE_POINT_INIT (0, 0),
|
||||
&GRAPHENE_POINT_INIT (width, height),
|
||||
stops, 4);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
|
||||
stroke = gsk_stroke_new (1.0);
|
||||
gtk_snapshot_push_stroke (snapshot, demo->path, stroke);
|
||||
gsk_stroke_free (stroke);
|
||||
|
||||
gtk_snapshot_append_color (snapshot,
|
||||
&(GdkRGBA){ 0, 0, 0, 1 },
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
|
||||
gtk_snapshot_pop (snapshot);
|
||||
}
|
||||
|
||||
void
|
||||
text_mask_demo_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum_size,
|
||||
int *natural_size,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
TextMaskDemo *demo = TEXT_MASK_DEMO (widget);
|
||||
graphene_rect_t rect;
|
||||
|
||||
gsk_path_get_bounds (demo->path, &rect);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
*minimum_size = *natural_size = rect.size.width;
|
||||
else
|
||||
*minimum_size = *natural_size = rect.size.height;
|
||||
}
|
||||
|
||||
static void
|
||||
text_mask_demo_finalize (GObject *object)
|
||||
{
|
||||
TextMaskDemo *demo = TEXT_MASK_DEMO (object);
|
||||
|
||||
g_free (demo->text);
|
||||
pango_font_description_free (demo->desc);
|
||||
gsk_path_unref (demo->path);
|
||||
|
||||
G_OBJECT_CLASS (text_mask_demo_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
text_mask_demo_class_init (TextMaskDemoClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->finalize = text_mask_demo_finalize;
|
||||
|
||||
widget_class->snapshot = text_mask_demo_snapshot;
|
||||
widget_class->measure = text_mask_demo_measure;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
text_mask_demo_new (void)
|
||||
{
|
||||
return g_object_new (text_mask_demo_get_type (), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
text_mask_demo_set_text (TextMaskDemo *demo,
|
||||
const char *text)
|
||||
{
|
||||
g_free (demo->text);
|
||||
demo->text = g_strdup (text);
|
||||
|
||||
update_path (demo);
|
||||
}
|
||||
|
||||
static void
|
||||
text_mask_demo_set_font (TextMaskDemo *demo,
|
||||
PangoFontDescription *desc)
|
||||
{
|
||||
pango_font_description_free (demo->desc);
|
||||
demo->desc = pango_font_description_copy (desc);
|
||||
|
||||
update_path (demo);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_textmask (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *da;
|
||||
static GtkWidget *demo;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
PangoFontDescription *desc;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
gtk_widget_set_size_request (window, 400, 240);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Text Mask");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
demo = text_mask_demo_new ();
|
||||
text_mask_demo_set_text (TEXT_MASK_DEMO (demo), "Pango power!\nPango power!\nPango power!");
|
||||
desc = pango_font_description_from_string ("Sans Bold 34");
|
||||
text_mask_demo_set_font (TEXT_MASK_DEMO (demo), desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
gtk_window_set_child (GTK_WINDOW (window), da);
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_text, NULL, NULL);
|
||||
gtk_window_set_child (GTK_WINDOW (window), demo);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* Benchmark/Themes
|
||||
*
|
||||
* This demo switches themes like a maniac, like some of you.
|
||||
* This demo continuously switches themes, like some of you.
|
||||
*
|
||||
* Warning: This demo involves rapidly flashing changes and may
|
||||
* be hazardous to photosensitive viewers.
|
||||
|
@@ -10,11 +10,11 @@
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
open_dialog_response_cb (GtkWidget *dialog,
|
||||
int response,
|
||||
GtkWidget *video)
|
||||
open_dialog_response_cb (GtkNativeDialog *dialog,
|
||||
int response,
|
||||
GtkWidget *video)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
gtk_native_dialog_hide (dialog);
|
||||
|
||||
if (response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
@@ -25,32 +25,30 @@ open_dialog_response_cb (GtkWidget *dialog,
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
gtk_native_dialog_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
open_clicked_cb (GtkWidget *button,
|
||||
GtkWidget *video)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkFileChooserNative *dialog;
|
||||
GtkFileFilter *filter;
|
||||
|
||||
dialog = gtk_file_chooser_dialog_new ("Select a video",
|
||||
dialog = gtk_file_chooser_native_new ("Select a video",
|
||||
GTK_WINDOW (gtk_widget_get_root (button)),
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
"_Cancel", GTK_RESPONSE_CANCEL,
|
||||
"_Open", GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
"_Open",
|
||||
"_Cancel");
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_add_mime_type (filter, "video/*");
|
||||
gtk_file_filter_set_name (filter, "Video");
|
||||
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
g_object_unref (filter);
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
|
||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
||||
gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (open_dialog_response_cb), video);
|
||||
gtk_widget_show (dialog);
|
||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (dialog));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -7,25 +7,25 @@ iconbrowser_sources = [
|
||||
]
|
||||
|
||||
iconbrowser_resources = gnome.compile_resources('iconbrowser_resources',
|
||||
'iconbrowser.gresource.xml',
|
||||
source_dir: '.')
|
||||
'iconbrowser.gresource.xml',
|
||||
source_dir: '.',
|
||||
)
|
||||
|
||||
executable('gtk4-icon-browser',
|
||||
iconbrowser_sources, iconbrowser_resources,
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true)
|
||||
sources: [iconbrowser_sources, iconbrowser_resources],
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true,
|
||||
)
|
||||
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
install_subdir('data/' + size, install_dir: icontheme_dir)
|
||||
endforeach
|
||||
|
||||
# desktop file
|
||||
|
@@ -7,4 +7,3 @@ Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=Development;GTK;
|
||||
NoDisplay=true
|
||||
|
@@ -13,9 +13,6 @@
|
||||
</section>
|
||||
</menu>
|
||||
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">Icon Browser</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
@@ -66,11 +63,14 @@
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<style>
|
||||
<class name="sidebar"/>
|
||||
</style>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkListView">
|
||||
<style>
|
||||
<class name="navigation-sidebar" />
|
||||
<class name="navigation-sidebar"/>
|
||||
</style>
|
||||
<property name="model">
|
||||
<object class="GtkSingleSelection" id="context_model">
|
||||
@@ -108,11 +108,6 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="content_box">
|
||||
<property name="orientation">vertical</property>
|
||||
|
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">Help</property>
|
||||
<property name="default-width">720</property>
|
||||
<property name="default-height">520</property>
|
||||
|
@@ -6,25 +6,25 @@ node_editor_sources = [
|
||||
]
|
||||
|
||||
node_editor_resources = gnome.compile_resources('node_editor_resources',
|
||||
'node-editor.gresource.xml',
|
||||
source_dir: '.')
|
||||
'node-editor.gresource.xml',
|
||||
source_dir: '.',
|
||||
)
|
||||
|
||||
executable('gtk4-node-editor',
|
||||
node_editor_sources, node_editor_resources,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
c_args: [
|
||||
'-DNODE_EDITOR_SOURCE_DIR="@0@/../../testsuite/gsk/compare/"'.format(meson.current_source_dir())
|
||||
] + common_cflags,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: false)
|
||||
sources: [node_editor_sources, node_editor_resources],
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
c_args: [
|
||||
'-DNODE_EDITOR_SOURCE_DIR="@0@/../../testsuite/gsk/compare/"'.format(meson.current_source_dir())
|
||||
] + common_cflags,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: false,
|
||||
)
|
||||
|
||||
# icons, don't install them until we decide to install gtk4-node-editor
|
||||
#icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
#foreach size: ['scalable', 'symbolic']
|
||||
# install_subdir('data/' + size,
|
||||
# install_dir: icontheme_dir
|
||||
# )
|
||||
# install_subdir('data/' + size, install_dir: icontheme_dir)
|
||||
#endforeach
|
||||
|
@@ -102,12 +102,11 @@ text_buffer_remove_all_tags (GtkTextBuffer *buffer)
|
||||
}
|
||||
|
||||
static void
|
||||
deserialize_error_func (const GtkCssSection *section,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
deserialize_error_func (const GskParseLocation *start_location,
|
||||
const GskParseLocation *end_location,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
const GtkCssLocation *start_location = gtk_css_section_get_start_location (section);
|
||||
const GtkCssLocation *end_location = gtk_css_section_get_end_location (section);
|
||||
NodeEditorWindow *self = user_data;
|
||||
GtkTextIter start_iter, end_iter;
|
||||
TextViewError text_view_error;
|
||||
@@ -466,7 +465,7 @@ save_response_cb (GtkWidget *dialog,
|
||||
text = get_current_text (self->text_buffer);
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
g_file_replace_contents (file, text, -1,
|
||||
g_file_replace_contents (file, text, strlen (text),
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
|
@@ -94,9 +94,6 @@
|
||||
</object>
|
||||
|
||||
<template class="NodeEditorWindow" parent="GtkApplicationWindow">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">GTK Node Editor</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
|
@@ -23,7 +23,7 @@ The **container** node is a special node that allows specifying a list of child
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bottom | `<node>` | color { color: #AF0; } | always |
|
||||
| bottom | `<node>` | color { } | always |
|
||||
| mode | `<blend-mode>` | normal | non-default |
|
||||
| top | `<node>` | color { } | always |
|
||||
|
||||
@@ -48,7 +48,22 @@ Creates a node like `gsk_blur_node_new()` with the given properties.
|
||||
|
||||
Creates a node like `gsk_border_node_new()` with the given properties.
|
||||
|
||||
For the color and width properties, the values follow the typical CSS order of top, right, bottom, left. If the last/left value isn't given, the 2nd/right value is used. If the 3rd/bottom value isn't given, the 1st/top value is used. And if the 2nd/right value also isn't given, the 1st/top value is used for every 4 values.
|
||||
For the color and width properties, the values follow the typical CSS order
|
||||
of top, right, bottom, left. If the last/left value isn't given, the 2nd/right
|
||||
value is used. If the 3rd/bottom value isn't given, the 1st/top value is used.
|
||||
And if the 2nd/right value also isn't given, the 1st/top value is used for
|
||||
every 4 values.
|
||||
|
||||
### cairo
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | none | always |
|
||||
| pixels | `<url>` | none | non-default |
|
||||
| script | `<url>` | none | non-default |
|
||||
|
||||
The pixels are a base64-encoded data url of png data. The script is
|
||||
a base64-encoded data url of a cairo script.
|
||||
|
||||
### clip
|
||||
|
||||
@@ -59,7 +74,9 @@ For the color and width properties, the values follow the typical CSS order of t
|
||||
|
||||
Creates a node like `gsk_clip_node_new()` with the given properties.
|
||||
|
||||
As an extension, this node allows specifying a rounded rectangle for the clip property. If that rectangle is indeed rounded, a node like `gsk_rounded_clip_node_new()` will be created instead.
|
||||
As an extension, this node allows specifying a rounded rectangle for the
|
||||
clip property. If that rectangle is indeed rounded, a node like
|
||||
`gsk_rounded_clip_node_new()` will be created instead.
|
||||
|
||||
### color
|
||||
|
||||
@@ -70,7 +87,8 @@ As an extension, this node allows specifying a rounded rectangle for the clip pr
|
||||
|
||||
Creates a node like `gsk_color_node_new()` with the given properties.
|
||||
|
||||
The color is chosen as an error pink so it is visible while also reminding people to change it.
|
||||
The color is chosen as an error pink so it is visible while also reminding
|
||||
people to change it.
|
||||
|
||||
### color-matrix
|
||||
|
||||
@@ -82,7 +100,21 @@ The color is chosen as an error pink so it is visible while also reminding peopl
|
||||
|
||||
Creates a node like `gsk_color_matrix_node_new()` with the given properties.
|
||||
|
||||
The matrix property accepts a <transform> for compatibility purposes, but you should be aware that the allowed values are meant to be used on 3D transformations, so their naming might appear awkward. However, it is always possible to use the matrix3d() production to specify all 16 values individually.
|
||||
The matrix property accepts a <transform> for compatibility purposes, but you
|
||||
should be aware that the allowed values are meant to be used on 3D transformations,
|
||||
so their naming might appear awkward. However, it is always possible to use the
|
||||
matrix3d() production to specify all 16 values individually.
|
||||
|
||||
### conic-gradient
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | 50 | always |
|
||||
| center | `<point>` | 25, 25 | always |
|
||||
| rotation | `<number>` | 0 | always |
|
||||
| stops | `<color-stop>` | 0 #AF0, 1 #F0C | always |
|
||||
|
||||
Creates a node like `gsk_conic_gradient_node_new()` with the given properties.
|
||||
|
||||
### cross-fade
|
||||
|
||||
@@ -90,7 +122,7 @@ The matrix property accepts a <transform> for compatibility purposes, but you sh
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| end | `<node>` | color { } | always |
|
||||
| mode | `<number>` | 0.5 | non-default |
|
||||
| start | `<node>` | color { color: #AF0; } | always |
|
||||
| start | `<node>` | color { } | always |
|
||||
|
||||
Creates a node like `gsk_cross_fade_node_new()` with the given properties.
|
||||
|
||||
@@ -121,8 +153,8 @@ Creates a node like `gsk_inset_shadow_node_new()` with the given properties.
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | 50 | always |
|
||||
| end | `<point>` | 0 50 | always |
|
||||
| start | `<point>` | 0 0 | always |
|
||||
| end | `<point>` | 0 50 | always |
|
||||
| stops | `<color-stop>` | 0 #AF0, 1 #F0C | always |
|
||||
|
||||
Creates a node like `gsk_linear_gradient_node_new()` with the given properties.
|
||||
@@ -149,16 +181,57 @@ Creates a node like `gsk_transform_node_new()` with the given properties.
|
||||
|
||||
Creates a node like `gsk_outset_shadow_node_new()` with the given properties.
|
||||
|
||||
### repeat
|
||||
### radial-gradient
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | *bounds of child node* | non-default |
|
||||
| child | `<node>` | color { } | always |
|
||||
| child-bounds| `<rect>` | *bounds of child node* | non-default |
|
||||
| bounds | `<rect>` | 50 | always |
|
||||
| center | `<point>` | 25 25 | always |
|
||||
| hradius | `<number>` | 25 | always |
|
||||
| vradius | `<number>` | 25 | always |
|
||||
| start | `<number>` | 0 | always |
|
||||
| end | `<number>` | 1 | always |
|
||||
| stops | `<color-stop>` | 0 #AF0, 1 #F0C | always |
|
||||
|
||||
Creates a node like `gsk_radial_gradient_node_new()` with the given properties.
|
||||
|
||||
### repeat
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| ----------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | *bounds of child node* | non-default |
|
||||
| child | `<node>` | color { } | always |
|
||||
| child-bounds| `<rect>` | *bounds of child node* | non-default |
|
||||
|
||||
Creates a node like `gsk_repeat_node_new()` with the given properties.
|
||||
|
||||
### repeating-linear-gradient
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | 50 | always |
|
||||
| start | `<point>` | 0 0 | always |
|
||||
| end | `<point>` | 0 50 | always |
|
||||
| stops | `<color-stop>` | 0 #AF0, 1 #F0C | always |
|
||||
|
||||
Creates a node like `gsk_repeating_linear_gradient_node_new()` with the given
|
||||
properties.
|
||||
|
||||
### repeating radial-gradient
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| -------- | ---------------- | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | 50 | always |
|
||||
| center | `<point>` | 25 25 | always |
|
||||
| hradius | `<number>` | 25 | always |
|
||||
| vradius | `<number>` | 25 | always |
|
||||
| start | `<number>` | 0 | always |
|
||||
| end | `<number>` | 1 | always |
|
||||
| stops | `<color-stop>` | 0 #AF0, 1 #F0C | always |
|
||||
|
||||
Creates a node like `gsk_repeating_radial_gradient_node_new()` with the given
|
||||
properties.
|
||||
|
||||
### rounded-clip
|
||||
|
||||
| property | syntax | default | printed |
|
||||
@@ -188,7 +261,8 @@ Creates a node like `gsk_shadow_node_new()` with the given properties.
|
||||
|
||||
Creates a node like `gsk_text_node_new()` with the given properties.
|
||||
|
||||
If the given font does not exist or the given glyphs are invalid for the given font, an error node will be returned.
|
||||
If the given font does not exist or the given glyphs are invalid for the given
|
||||
font, an error node will be returned.
|
||||
|
||||
### texture
|
||||
|
||||
@@ -199,7 +273,9 @@ If the given font does not exist or the given glyphs are invalid for the given f
|
||||
|
||||
Creates a node like `gsk_texture_node_new()` with the given properties.
|
||||
|
||||
The default texture is a 10x10 checkerboard with the top left and bottom right 5x5 being in the color #FF00CC and the other part being transparent. A possible representation for this texture is `url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQXY0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=")
|
||||
The default texture is a 10x10 checkerboard with the top left and bottom right
|
||||
5x5 being in the color #FF00CC and the other part being transparent. A possible
|
||||
representation for this texture is `url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQXY0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=")
|
||||
`.
|
||||
|
||||
### transform
|
||||
@@ -211,3 +287,19 @@ The default texture is a 10x10 checkerboard with the top left and bottom right 5
|
||||
|
||||
Creates a node like `gsk_transform_node_new()` with the given properties.
|
||||
|
||||
### glshader
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| ---------- | ------------------ | ---------------------- | ----------- |
|
||||
| bounds | `<rect>` | 50 | always |
|
||||
| sourcecode | `<string>` | "" | always |
|
||||
| args | `<uniform values>` | none | non-default |
|
||||
| child1 | `<node>` | none | non-default |
|
||||
| child2 | `<node>` | none | non-default |
|
||||
| child3 | `<node>` | none | non-default |
|
||||
| child4 | `<node>` | none | non-default |
|
||||
|
||||
Creates a GLShader node. The `sourcecode` must be a GLSL fragment shader.
|
||||
The `args` must match the uniforms of simple types declared in that shader,
|
||||
in order and comma-separated. The `child` properties must match the sampler
|
||||
uniforms in the shader.
|
||||
|
@@ -1,11 +1,12 @@
|
||||
executable('gtk4-print-editor',
|
||||
['print-editor.c'],
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true)
|
||||
sources: ['print-editor.c'],
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true,
|
||||
)
|
||||
|
||||
# desktop file
|
||||
install_data('org.gtk.PrintEditor4.desktop', install_dir: gtk_applicationsdir)
|
||||
@@ -17,7 +18,5 @@ install_data('org.gtk.PrintEditor4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
install_subdir('data/' + size, install_dir: icontheme_dir)
|
||||
endforeach
|
||||
|
@@ -7,4 +7,3 @@ Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=Development;GTK;
|
||||
NoDisplay=true
|
||||
|
@@ -812,8 +812,6 @@ activate (GApplication *app)
|
||||
gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (main_window), TRUE);
|
||||
update_title (GTK_WINDOW (main_window));
|
||||
|
||||
gtk_widget_add_css_class (main_window, "devel");
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (main_window), box);
|
||||
|
||||
|
@@ -1,17 +1,19 @@
|
||||
# demos/widget-factory
|
||||
|
||||
widgetfactory_resources = gnome.compile_resources('widgetfactory_resources',
|
||||
'widget-factory.gresource.xml',
|
||||
source_dir: '.')
|
||||
'widget-factory.gresource.xml',
|
||||
source_dir: '.',
|
||||
)
|
||||
|
||||
executable('gtk4-widget-factory',
|
||||
'widget-factory.c', widgetfactory_resources,
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true)
|
||||
sources: ['widget-factory.c', widgetfactory_resources],
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true,
|
||||
)
|
||||
|
||||
# desktop file
|
||||
install_data('org.gtk.WidgetFactory4.desktop', install_dir: gtk_applicationsdir)
|
||||
@@ -20,9 +22,7 @@ install_data('org.gtk.WidgetFactory4.desktop', install_dir: gtk_applicationsdir)
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
install_subdir('data/' + size, install_dir: icontheme_dir)
|
||||
endforeach
|
||||
|
||||
# appdata
|
||||
|
@@ -7,4 +7,3 @@ Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=Development;GTK;
|
||||
NoDisplay=true
|
||||
|
@@ -433,9 +433,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title">GTK Widget Factory</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="headerbar1">
|
||||
@@ -881,9 +878,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="use-alpha">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFileChooserButton" id="filechooserbutton1"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="linkbutton1">
|
||||
<property name="label" translatable="yes">link button</property>
|
||||
@@ -1078,7 +1072,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="autoplay">0</property>
|
||||
<property name="autoplay">1</property>
|
||||
<property name="loop">1</property>
|
||||
<property name="file">resource:///org/gtk/WidgetFactory4/gtk-logo.webm</property>
|
||||
</object>
|
||||
@@ -1145,7 +1139,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Caption</property>
|
||||
<style><class name="Caption"/></style>
|
||||
<style><class name="caption"/></style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -3304,246 +3298,6 @@ bad things might happen.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="new_style_menu">
|
||||
<style><class name="menu"/></style>
|
||||
<child>
|
||||
<object class="GtkStack">
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">main</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<style>
|
||||
<class name="circular-buttons"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">printer-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
<property name="action-name">win.print</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">emblem-shared-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
<property name="action-name">app.share</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Open in New Window</property>
|
||||
<property name="action-name">app.open-in</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<style>
|
||||
<class name="inline-buttons"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkLabel" id="cut_copy_paste_filler"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Edit</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">edit-cut-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">edit-copy-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">edit-paste-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Pin</property>
|
||||
<property name="action-name">app.pin</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Select Labels…</property>
|
||||
<property name="action-name">app.labels</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Share…</property>
|
||||
<property name="action-name">app.share</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Basement</property>
|
||||
<property name="menu-name">basement</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Large</property>
|
||||
<property name="action-name">app.size</property>
|
||||
<property name="action-target">'large'</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Medium</property>
|
||||
<property name="action-name">app.size</property>
|
||||
<property name="action-target">'medium'</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Small</property>
|
||||
<property name="action-name">app.size</property>
|
||||
<property name="action-target">'small'</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Move to Trash</property>
|
||||
<property name="action-name">win.delete</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">basement</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Basement</property>
|
||||
<property name="role">title</property>
|
||||
<property name="menu-name">main</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Berk</property>
|
||||
<property name="action-name">app.berk</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Broni</property>
|
||||
<property name="action-name">app.broni</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Drutt</property>
|
||||
<property name="action-name">app.drutt</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">The Thing Upstairs</property>
|
||||
<property name="action-name">app.upstairs</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="main-indicators">
|
||||
<widgets>
|
||||
<widget name="cut_copy_paste_filler"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="basement-indicators"/>
|
||||
<menu id="new_style_menu_model">
|
||||
<section>
|
||||
|
@@ -70,3 +70,8 @@ gtk/inspector @otte @matthiasc
|
||||
# Layout managers
|
||||
gtk/gtklayout* @ebassi
|
||||
gtk/gtkconstraint* @ebassi
|
||||
|
||||
# Accessibility
|
||||
gtk/gtkaccessible*.[ch] @ebassi
|
||||
gtk/gtkatcontext*.[ch] @ebassi
|
||||
gtk/a11y @ebassi
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
<INCLUDE>gdk/gdk.h</INCLUDE>
|
||||
|
||||
<SECTION>
|
||||
@@ -11,6 +10,11 @@ GDK_WINDOWING_WIN32
|
||||
GDK_WINDOWING_MACOS
|
||||
GDK_WINDOWING_WAYLAND
|
||||
|
||||
<SUBSECTION>
|
||||
GDK_MAJOR_VERSION
|
||||
GDK_MICRO_VERSION
|
||||
GDK_MINOR_VERSION
|
||||
|
||||
<SUBSECTION>
|
||||
GDK_VERSION_4_0
|
||||
GDK_VERSION_MIN_REQUIRED
|
||||
@@ -24,6 +28,9 @@ GDK_TYPE_GRAB_STATUS
|
||||
GDK_TYPE_STATUS
|
||||
GdkStatus
|
||||
GDKVAR
|
||||
GDK_EXTERN_VAR
|
||||
_GDK_EXTERN
|
||||
GDK_DECLARE_INTERNAL_TYPE
|
||||
gdk_axis_use_get_type
|
||||
gdk_byte_order_get_type
|
||||
gdk_crossing_mode_get_type
|
||||
@@ -189,6 +196,7 @@ gdk_surface_create_cairo_context
|
||||
<SUBSECTION>
|
||||
gdk_surface_queue_render
|
||||
gdk_surface_get_frame_clock
|
||||
gdk_surface_request_layout
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_surface_set_cursor
|
||||
@@ -196,7 +204,6 @@ gdk_surface_get_cursor
|
||||
gdk_surface_set_input_region
|
||||
gdk_surface_get_width
|
||||
gdk_surface_get_height
|
||||
gdk_surface_set_shadow_width
|
||||
gdk_surface_get_device_position
|
||||
GdkModifierType
|
||||
GDK_MODIFIER_MASK
|
||||
@@ -368,6 +375,7 @@ gdk_device_tool_get_hardware_id
|
||||
gdk_device_tool_get_axes
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_AXIS_FLAGS
|
||||
GDK_TYPE_AXIS_USE
|
||||
GDK_TYPE_EXTENSION_MODE
|
||||
GDK_TYPE_INPUT_MODE
|
||||
@@ -440,6 +448,7 @@ gdk_seat_capabilities_get_type
|
||||
<FILE>events</FILE>
|
||||
GdkEvent
|
||||
GdkEventType
|
||||
GdkKeymapKey
|
||||
GdkKeyMatch
|
||||
GdkTouchpadGesturePhase
|
||||
GdkScrollDirection
|
||||
@@ -475,10 +484,14 @@ gdk_event_get_axis
|
||||
gdk_event_get_history
|
||||
gdk_event_get_pointer_emulated
|
||||
gdk_event_triggers_context_menu
|
||||
GdkButtonEvent
|
||||
gdk_button_event_get_button
|
||||
GdkScrollEvent
|
||||
gdk_scroll_event_get_direction
|
||||
gdk_scroll_event_get_deltas
|
||||
gdk_scroll_event_is_stop
|
||||
GdkMotionEvent
|
||||
GdkKeyEvent
|
||||
gdk_key_event_get_keyval
|
||||
gdk_key_event_get_keycode
|
||||
gdk_key_event_get_consumed_modifiers
|
||||
@@ -487,23 +500,31 @@ gdk_key_event_get_level
|
||||
gdk_key_event_is_modifier
|
||||
gdk_key_event_matches
|
||||
gdk_key_event_get_match
|
||||
GdkFocusEvent
|
||||
gdk_focus_event_get_in
|
||||
gdk_touch_event_get_emulating_pointer
|
||||
GdkCrossingEvent
|
||||
gdk_crossing_event_get_mode
|
||||
gdk_crossing_event_get_detail
|
||||
gdk_crossing_event_get_focus
|
||||
GdkGrabBrokenEvent
|
||||
gdk_grab_broken_event_get_grab_surface
|
||||
gdk_grab_broken_event_get_implicit
|
||||
GdkDeleteEvent
|
||||
GdkDNDEvent
|
||||
gdk_dnd_event_get_drop
|
||||
gdk_configure_event_get_size
|
||||
GdkTouchEvent
|
||||
GdkTouchpadEvent
|
||||
gdk_touchpad_event_get_gesture_phase
|
||||
gdk_touchpad_event_get_n_fingers
|
||||
gdk_touchpad_event_get_deltas
|
||||
gdk_touchpad_event_get_pinch_angle_delta
|
||||
gdk_touchpad_event_get_pinch_scale
|
||||
GdkPadEvent
|
||||
gdk_pad_event_get_axis_value
|
||||
gdk_pad_event_get_button
|
||||
gdk_pad_event_get_group_mode
|
||||
GdkProximityEvent
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_events_get_angle
|
||||
@@ -511,6 +532,7 @@ gdk_events_get_center
|
||||
gdk_events_get_distance
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_EVENT
|
||||
GDK_TYPE_EVENT
|
||||
GDK_TYPE_EVENT_MASK
|
||||
GDK_TYPE_EVENT_TYPE
|
||||
@@ -518,11 +540,24 @@ GDK_TYPE_CROSSING_MODE
|
||||
GDK_TYPE_SCROLL_DIRECTION
|
||||
GDK_TYPE_NOTIFY_TYPE
|
||||
GDK_IS_EVENT
|
||||
GDK_IS_EVENT_TYPE
|
||||
GDK_TYPE_BUTTON_EVENT
|
||||
GDK_TYPE_CROSSING_EVENT
|
||||
GDK_TYPE_DELETE_EVENT
|
||||
GDK_TYPE_DND_EVENT
|
||||
GDK_TYPE_FOCUS_EVENT
|
||||
GDK_TYPE_GRAB_BROKEN_EVENT
|
||||
GDK_TYPE_KEY_EVENT
|
||||
GDK_TYPE_MOTION_EVENT
|
||||
GDK_TYPE_PAD_EVENT
|
||||
GDK_TYPE_PROXIMITY_EVENT
|
||||
GDK_TYPE_SCROLL_EVENT
|
||||
GDK_TYPE_TOUCH_EVENT
|
||||
GDK_TYPE_TOUCHPAD_EVENT
|
||||
|
||||
gdk_event_get_type
|
||||
gdk_event_sequence_get_type
|
||||
gdk_button_event_get_type
|
||||
gdk_configure_event_get_type
|
||||
gdk_crossing_event_get_type
|
||||
gdk_delete_event_get_type
|
||||
gdk_dnd_event_get_type
|
||||
@@ -640,6 +675,7 @@ GdkToplevelSize
|
||||
gdk_toplevel_size_get_bounds
|
||||
gdk_toplevel_size_set_size
|
||||
gdk_toplevel_size_set_min_size
|
||||
gdk_toplevel_size_set_shadow_width
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_TOPLEVEL_SIZE
|
||||
gdk_toplevel_size_get_type
|
||||
@@ -827,11 +863,14 @@ gdk_x11_display_error_trap_pop_ignored
|
||||
gdk_x11_display_set_cursor_theme
|
||||
gdk_x11_display_set_surface_scale
|
||||
gdk_x11_display_get_glx_version
|
||||
gdk_x11_display_get_primary_monitor
|
||||
gdk_x11_display_get_screen
|
||||
gdk_x11_monitor_get_output
|
||||
gdk_x11_monitor_get_workarea
|
||||
gdk_x11_screen_get_screen_number
|
||||
gdk_x11_screen_get_xscreen
|
||||
gdk_x11_screen_get_window_manager_name
|
||||
gdk_x11_screen_get_monitor_output
|
||||
gdk_x11_screen_lookup_visual
|
||||
gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_screen_get_number_of_desktops
|
||||
gdk_x11_screen_get_current_desktop
|
||||
@@ -846,9 +885,9 @@ gdk_x11_surface_set_utf8_property
|
||||
gdk_x11_surface_set_frame_sync_enabled
|
||||
gdk_x11_surface_set_group
|
||||
gdk_x11_surface_get_group
|
||||
gdk_x11_keymap_get_group_for_state
|
||||
gdk_x11_keymap_key_is_modifier
|
||||
gdk_x11_visual_get_xvisual
|
||||
gdk_x11_surface_set_skip_pager_hint
|
||||
gdk_x11_surface_set_skip_taskbar_hint
|
||||
gdk_x11_surface_set_urgency_hint
|
||||
gdk_x11_get_xatom_by_name_for_display
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
gdk_x11_set_sm_client_id
|
||||
@@ -901,29 +940,18 @@ GDK_X11_DRAG_CONTEXT_CLASS
|
||||
GDK_IS_X11_DRAG_CONTEXT
|
||||
GDK_IS_X11_DRAG_CONTEXT_CLASS
|
||||
GDK_X11_DRAG_CONTEXT_GET_CLASS
|
||||
GDK_TYPE_X11_KEYMAP
|
||||
GDK_X11_KEYMAP
|
||||
GDK_X11_KEYMAP_CLASS
|
||||
GDK_IS_X11_KEYMAP
|
||||
GDK_IS_X11_KEYMAP_CLASS
|
||||
GDK_X11_KEYMAP_GET_CLASS
|
||||
GDK_TYPE_X11_GL_CONTEXT
|
||||
GDK_X11_GL_CONTEXT
|
||||
GDK_X11_GL_CONTEXT_CLASS
|
||||
GDK_IS_X11_GL_CONTEXT
|
||||
GDK_IS_X11_GL_CONTEXT_CLASS
|
||||
GDK_TYPE_X11_SCREEN
|
||||
GDK_X11_SCREEN
|
||||
GDK_X11_SCREEN_CLASS
|
||||
GDK_IS_X11_SCREEN
|
||||
GDK_IS_X11_SCREEN_CLASS
|
||||
GDK_X11_SCREEN_GET_CLASS
|
||||
GDK_TYPE_X11_VISUAL
|
||||
GDK_X11_VISUAL
|
||||
GDK_X11_VISUAL_CLASS
|
||||
GDK_IS_X11_VISUAL
|
||||
GDK_IS_X11_VISUAL_CLASS
|
||||
GDK_X11_VISUAL_GET_CLASS
|
||||
GDK_TYPE_X11_DRAG
|
||||
GDK_X11_DRAG
|
||||
GDK_IS_X11_DRAG
|
||||
GDK_IS_X11_DRAG_CLASS
|
||||
GDK_TYPE_X11_MONITOR
|
||||
GDK_X11_MONITOR
|
||||
GDK_IS_X11_MONITOR
|
||||
GDK_TYPE_X11_SURFACE
|
||||
GDK_X11_SURFACE
|
||||
GDK_X11_SURFACE_CLASS
|
||||
@@ -941,9 +969,10 @@ gdk_x11_device_xi_get_type
|
||||
gdk_x11_display_get_type
|
||||
gdk_x11_display_manager_get_type
|
||||
gdk_x11_drag_context_get_type
|
||||
gdk_x11_keymap_get_type
|
||||
gdk_x11_drag_get_type
|
||||
gdk_x11_gl_context_get_type
|
||||
gdk_x11_monitor_get_type
|
||||
gdk_x11_screen_get_type
|
||||
gdk_x11_visual_get_type
|
||||
gdk_x11_surface_get_type
|
||||
gdk_surface_impl_x11_get_type
|
||||
</SECTION>
|
||||
@@ -958,14 +987,13 @@ gdk_wayland_display_query_registry
|
||||
gdk_wayland_display_set_cursor_theme
|
||||
gdk_wayland_display_get_startup_notification_id
|
||||
gdk_wayland_display_set_startup_notification_id
|
||||
gdk_wayland_display_query_registry
|
||||
|
||||
<SUBSECTION Device>
|
||||
gdk_wayland_seat_get_wl_seat
|
||||
gdk_wayland_device_get_wl_seat
|
||||
gdk_wayland_device_get_wl_pointer
|
||||
gdk_wayland_device_get_wl_keyboard
|
||||
gdk_wayland_device_get_node_ath
|
||||
gdk_wayland_device_get_node_path
|
||||
|
||||
<SUBSECTION Monitor>
|
||||
gdk_wayland_monitor_get_wl_output
|
||||
@@ -1008,8 +1036,12 @@ GDK_IS_WAYLAND_SURFACE_CLASS
|
||||
gdk_wayland_device_get_type
|
||||
gdk_wayland_display_get_type
|
||||
gdk_wayland_display_manager_get_type
|
||||
gdk_wayland_gl_context_get_type
|
||||
gdk_wayland_monitor_get_type
|
||||
gdk_wayland_popup_get_type
|
||||
gdk_wayland_seat_get_type
|
||||
gdk_wayland_surface_get_type
|
||||
|
||||
gdk_wayland_toplevel_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -1171,6 +1203,10 @@ GdkCairoContext
|
||||
gdk_cairo_context_cairo_create
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_CAIRO_CONTEXT
|
||||
GDK_IS_CAIRO_CONTEXT
|
||||
GDK_TYPE_CAIRO_CONTEXT
|
||||
GDK_CAIRO_ERROR
|
||||
gdk_cairo_context_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1190,6 +1226,11 @@ gdk_vulkan_context_get_queue
|
||||
gdk_vulkan_context_get_queue_family_index
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_VULKAN_CONTEXT
|
||||
GDK_IS_VULKAN_CONTEXT
|
||||
GDK_TYPE_VULKAN_CONTEXT
|
||||
GDK_RENDERING_VULKAN
|
||||
GDK_VULKAN_ERROR
|
||||
gdk_vulkan_context_get_type
|
||||
gdk_vulkan_error_quark
|
||||
gdk_vulkan_strerror
|
||||
|
@@ -1,21 +1,22 @@
|
||||
private_headers = [
|
||||
'gdkintl.h',
|
||||
'gdkmarshalers.h',
|
||||
'gdkkeysyms.h',
|
||||
'gdkinternals.h',
|
||||
'gdk-autocleanup.h',
|
||||
'gdk-private.h',
|
||||
'gdkapplaunchcontextprivate.h',
|
||||
'gdkcairocontextprivate.h',
|
||||
'gdkcairoprivate.h',
|
||||
'gdkclipboardprivate.h',
|
||||
'gdkcontentformatsprivate.h',
|
||||
'gdkcontentproviderprivate.h',
|
||||
'gdkcursorprivate.h',
|
||||
'gdkdeviceprivate.h',
|
||||
'gdkdebug.h',
|
||||
'gdkdevicepadprivate.h',
|
||||
'gdkdeviceprivate.h',
|
||||
'gdkdevicetoolprivate.h',
|
||||
'gdkdisplaymanagerprivate.h',
|
||||
'gdkdisplayprivate.h',
|
||||
'gdkdndprivate.h',
|
||||
'gdkdragprivate.h',
|
||||
'gdkdragsurfaceprivate.h',
|
||||
'gdkdrawcontextprivate.h',
|
||||
'gdkdropprivate.h',
|
||||
'gdkeventsprivate.h',
|
||||
@@ -23,12 +24,17 @@ private_headers = [
|
||||
'gdkframeclockprivate.h',
|
||||
'gdkglcontextprivate.h',
|
||||
'gdkgltextureprivate.h',
|
||||
'gdkinternals.h',
|
||||
'gdkintl.h',
|
||||
'gdkkeysprivate.h',
|
||||
'gdkmonitorprivate.h',
|
||||
'gdkkeysyms.h',
|
||||
'gdkmarshalers.h',
|
||||
'gdkmemorytextureprivate.h',
|
||||
'gdkmonitorprivate.h',
|
||||
'gdkpipeiostreamprivate.h',
|
||||
'gdkpopupprivate.h',
|
||||
'gdkprofilerprivate.h',
|
||||
'gdkrgbaprivate.h',
|
||||
'gdkscreenprivate.h',
|
||||
'gdkseatdefaultprivate.h',
|
||||
'gdkseatprivate.h',
|
||||
@@ -37,22 +43,71 @@ private_headers = [
|
||||
'gdksurfaceprivate.h',
|
||||
'gdktextureprivate.h',
|
||||
'gdktoplevelprivate.h',
|
||||
'gdktoplevelsizeprivate.h',
|
||||
'gdkvulkancontextprivate.h',
|
||||
|
||||
'filetransferportalprivate.h',
|
||||
'gdkconstructor.h',
|
||||
'keyname-table.h',
|
||||
'x11/gdkprivate-x11.h',
|
||||
'x11/gdkeventsource.h',
|
||||
|
||||
# gdk/x11
|
||||
'gdkasync.h',
|
||||
'gdkcairocontext-x11.h',
|
||||
'gdkclipboard-x11.h',
|
||||
'gdkdevice-xi2-private.h',
|
||||
'gdkdevicemanagerprivate-core.h',
|
||||
'gdkdisplay-x11.h',
|
||||
'gdkeventsource.h',
|
||||
'gdkeventtranslator.h',
|
||||
'gdkglcontext-x11.h',
|
||||
'gdkkeys-x11.h',
|
||||
'gdkmonitor-x11.h',
|
||||
'gdkprivate-x11.h',
|
||||
'gdkscreen-x11.h',
|
||||
'gdkselectioninputstream-x11.h',
|
||||
'gdkselectionoutputstream-x11.h',
|
||||
'gdksurface-x11.h',
|
||||
'gdktextlistconverter-x11.h',
|
||||
'gdkvisual-x11.h',
|
||||
'gdkvulkancontext-x11.h',
|
||||
'gdkx-autocleanups.h',
|
||||
'MwmUtil.h',
|
||||
'xsettings-client.h',
|
||||
|
||||
# gdk/wayland
|
||||
'gdkcairocontext-wayland.h',
|
||||
'gdkclipboard-wayland.h',
|
||||
'gdkdevice-wayland-private.h',
|
||||
'gdkdisplay-wayland.h',
|
||||
'gdkglcontext-wayland.h',
|
||||
'gdkmonitor-wayland.h',
|
||||
'gdkprimary-wayland.h',
|
||||
'gdkprivate-wayland.h',
|
||||
'gdkseat-wayland.h',
|
||||
'gdksurface-wayland.h',
|
||||
'gdkvulkancontext-wayland.h',
|
||||
'wm-button-layout-translation.h',
|
||||
'gtk-primary-selection-client-protocol.h',
|
||||
'gtk-shell-client-protocol.h',
|
||||
'idle-inhibit-unstable-v1-client-protocol.h',
|
||||
'keyboard-shortcuts-inhibit-unstable-v1-client-protocol.h',
|
||||
'pointer-gestures-unstable-v1-client-protocol.h',
|
||||
'primary-selection-unstable-v1-client-protocol.h',
|
||||
'server-decoration-client-protocol.h',
|
||||
'tablet-unstable-v2-client-protocol.h',
|
||||
'xdg-foreign-unstable-v1-client-protocol.h',
|
||||
'xdg-shell-unstable-v6-client-protocol.h',
|
||||
'win32',
|
||||
'quartz',
|
||||
'xdg-output-unstable-v1-client-protocol.h',
|
||||
'xdg-shell-client-protocol.h',
|
||||
'xdg-shell-unstable-v6-client-protocol.h',
|
||||
'wayland-cursor.h',
|
||||
'os-compatibility.h',
|
||||
'xcursor.h',
|
||||
|
||||
'broadway',
|
||||
'mir'
|
||||
'wayland/cursor',
|
||||
'macos',
|
||||
'win32',
|
||||
]
|
||||
|
||||
images = [
|
||||
@@ -107,22 +162,26 @@ if get_option('gtk_doc')
|
||||
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
|
||||
|
||||
gnome.gtkdoc('gdk4',
|
||||
mode: 'none',
|
||||
main_xml: 'gdk4-docs.xml',
|
||||
src_dir: src_dir,
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: join_paths(meson.current_source_dir(), 'gdk4.types'),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
],
|
||||
html_assets: images,
|
||||
install: true)
|
||||
mode: 'none',
|
||||
main_xml: 'gdk4-docs.xml',
|
||||
src_dir: src_dir,
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: join_paths(meson.current_source_dir(), 'gdk4.types'),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
mkdb_args: [
|
||||
'--ignore-files=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
],
|
||||
html_assets: images,
|
||||
install: true,
|
||||
)
|
||||
endif
|
||||
|
@@ -23,6 +23,14 @@
|
||||
<xi:include href="xml/GskGLShader.xml" />
|
||||
</reference>
|
||||
|
||||
<part id="paths">
|
||||
<title>Paths</title>
|
||||
<xi:include href="xml/GskPath.xml" />
|
||||
<xi:include href="xml/GskPathBuilder.xml" />
|
||||
<xi:include href="xml/GskPathMeasure.xml" />
|
||||
<xi:include href="xml/GskStroke.xml" />
|
||||
</part>
|
||||
|
||||
<index id="api-index-full">
|
||||
<title>Index of all symbols</title>
|
||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
||||
|
@@ -20,6 +20,40 @@ GSK_TYPE_RENDERER
|
||||
GskRendererClass
|
||||
gsk_renderer_get_type
|
||||
GSK_TYPE_SCALING_FILTER
|
||||
GSK_BROADWAY_RENDERER
|
||||
GSK_BROADWAY_RENDERER_CLASS
|
||||
GSK_BROADWAY_RENDERER_GET_CLASS
|
||||
GSK_IS_BROADWAY_RENDERER
|
||||
GSK_IS_BROADWAY_RENDERER_CLASS
|
||||
GSK_TYPE_BROADWAY_RENDERER
|
||||
GskBroadwayRenderer
|
||||
GskBroadwayRendererClass
|
||||
GSK_CAIRO_RENDERER
|
||||
GSK_CAIRO_RENDERER_CLASS
|
||||
GSK_CAIRO_RENDERER_GET_CLASS
|
||||
GSK_IS_CAIRO_RENDERER
|
||||
GSK_IS_CAIRO_RENDERER_CLASS
|
||||
GSK_TYPE_CAIRO_RENDERER
|
||||
GskCairoRenderer
|
||||
GskCairoRendererClass
|
||||
GSK_GL_RENDERER
|
||||
GSK_GL_RENDERER_CLASS
|
||||
GSK_GL_RENDERER_GET_CLASS
|
||||
GSK_IS_GL_RENDERER
|
||||
GSK_IS_GL_RENDERER_CLASS
|
||||
GSK_TYPE_GL_RENDERER
|
||||
GskGLRenderer
|
||||
GskGLRendererClass
|
||||
gsk_gl_renderer_get_type
|
||||
GSK_VULKAN_RENDERER
|
||||
GSK_VULKAN_RENDERER_CLASS
|
||||
GSK_VULKAN_RENDERER_GET_CLASS
|
||||
GSK_IS_VULKAN_RENDERER
|
||||
GSK_IS_VULKAN_RENDERER_CLASS
|
||||
GSK_TYPE_VULKAN_RENDERER
|
||||
GskVulkanRenderer
|
||||
GskVulkanRendererClass
|
||||
gsk_vulkan_renderer_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -32,6 +66,7 @@ GskCairoNode
|
||||
GskClipNode
|
||||
GskColorMatrixNode
|
||||
GskColorNode
|
||||
GskConicGradientNode
|
||||
GskContainerNode
|
||||
GskCrossFadeNode
|
||||
GskDebugNode
|
||||
@@ -56,103 +91,136 @@ gsk_render_node_get_node_type
|
||||
gsk_render_node_draw
|
||||
GskSerializationError
|
||||
GskParseErrorFunc
|
||||
GskParseLocation
|
||||
gsk_render_node_serialize
|
||||
gsk_render_node_deserialize
|
||||
gsk_render_node_write_to_file
|
||||
GskScalingFilter
|
||||
gsk_render_node_get_bounds
|
||||
|
||||
<SUBSECTION Nodes>
|
||||
<SUBSECTION>
|
||||
gsk_color_node_new
|
||||
gsk_color_node_peek_color
|
||||
gsk_color_node_get_color
|
||||
gsk_texture_node_new
|
||||
gsk_texture_node_get_texture
|
||||
<SUBSECTION>
|
||||
GskColorStop
|
||||
gsk_linear_gradient_node_new
|
||||
gsk_linear_gradient_node_peek_start
|
||||
gsk_linear_gradient_node_peek_end
|
||||
gsk_linear_gradient_node_get_n_color_stops
|
||||
gsk_linear_gradient_node_peek_color_stops
|
||||
gsk_repeating_linear_gradient_node_new
|
||||
gsk_linear_gradient_node_get_start
|
||||
gsk_linear_gradient_node_get_end
|
||||
gsk_linear_gradient_node_get_n_color_stops
|
||||
gsk_linear_gradient_node_get_color_stops
|
||||
<SUBSECTION>
|
||||
gsk_radial_gradient_node_new
|
||||
gsk_repeating_radial_gradient_node_new
|
||||
gsk_radial_gradient_node_get_n_color_stops
|
||||
gsk_radial_gradient_node_peek_color_stops
|
||||
gsk_radial_gradient_node_get_color_stops
|
||||
gsk_radial_gradient_node_get_start
|
||||
gsk_radial_gradient_node_get_end
|
||||
gsk_radial_gradient_node_get_hradius
|
||||
gsk_radial_gradient_node_get_vradius
|
||||
gsk_radial_gradient_node_peek_center
|
||||
gsk_repeating_radial_gradient_node_new
|
||||
gsk_radial_gradient_node_get_center
|
||||
<SUBSECTION>
|
||||
gsk_conic_gradient_node_new
|
||||
gsk_conic_gradient_node_get_n_color_stops
|
||||
gsk_conic_gradient_node_get_color_stops
|
||||
gsk_conic_gradient_node_get_center
|
||||
gsk_conic_gradient_node_get_rotation
|
||||
<SUBSECTION>
|
||||
gsk_border_node_new
|
||||
gsk_border_node_peek_outline
|
||||
gsk_border_node_peek_widths
|
||||
gsk_border_node_peek_colors
|
||||
gsk_border_node_get_outline
|
||||
gsk_border_node_get_widths
|
||||
gsk_border_node_get_colors
|
||||
<SUBSECTION>
|
||||
gsk_inset_shadow_node_new
|
||||
gsk_inset_shadow_node_peek_outline
|
||||
gsk_inset_shadow_node_peek_color
|
||||
gsk_inset_shadow_node_get_outline
|
||||
gsk_inset_shadow_node_get_color
|
||||
gsk_inset_shadow_node_get_dx
|
||||
gsk_inset_shadow_node_get_dy
|
||||
gsk_inset_shadow_node_get_spread
|
||||
gsk_inset_shadow_node_get_blur_radius
|
||||
<SUBSECTION>
|
||||
gsk_outset_shadow_node_new
|
||||
gsk_outset_shadow_node_peek_outline
|
||||
gsk_outset_shadow_node_peek_color
|
||||
gsk_outset_shadow_node_get_outline
|
||||
gsk_outset_shadow_node_get_color
|
||||
gsk_outset_shadow_node_get_dx
|
||||
gsk_outset_shadow_node_get_dy
|
||||
gsk_outset_shadow_node_get_spread
|
||||
gsk_outset_shadow_node_get_blur_radius
|
||||
<SUBSECTION>
|
||||
gsk_cairo_node_new
|
||||
gsk_cairo_node_get_draw_context
|
||||
gsk_cairo_node_peek_surface
|
||||
gsk_cairo_node_get_surface
|
||||
<SUBSECTION>
|
||||
gsk_container_node_new
|
||||
gsk_container_node_get_n_children
|
||||
gsk_container_node_get_child
|
||||
<SUBSECTION>
|
||||
gsk_transform_node_new
|
||||
gsk_transform_node_get_child
|
||||
gsk_transform_node_get_transform
|
||||
<SUBSECTION>
|
||||
gsk_opacity_node_new
|
||||
gsk_opacity_node_get_child
|
||||
gsk_opacity_node_get_opacity
|
||||
<SUBSECTION>
|
||||
gsk_color_matrix_node_new
|
||||
gsk_color_matrix_node_get_child
|
||||
gsk_color_matrix_node_peek_color_matrix
|
||||
gsk_color_matrix_node_peek_color_offset
|
||||
gsk_color_matrix_node_get_color_matrix
|
||||
gsk_color_matrix_node_get_color_offset
|
||||
<SUBSECTION>
|
||||
gsk_repeat_node_new
|
||||
gsk_repeat_node_get_child
|
||||
gsk_repeat_node_peek_child_bounds
|
||||
gsk_repeat_node_get_child_bounds
|
||||
<SUBSECTION>
|
||||
gsk_clip_node_new
|
||||
gsk_clip_node_get_child
|
||||
gsk_clip_node_peek_clip
|
||||
gsk_clip_node_get_clip
|
||||
<SUBSECTION>
|
||||
gsk_rounded_clip_node_new
|
||||
gsk_rounded_clip_node_get_child
|
||||
gsk_rounded_clip_node_peek_clip
|
||||
gsk_rounded_clip_node_get_clip
|
||||
<SUBSECTION>
|
||||
GskFillRule
|
||||
gsk_fill_node_new
|
||||
gsk_fill_node_get_child
|
||||
gsk_fill_node_get_path
|
||||
gsk_fill_node_get_fill_rule
|
||||
<SUBSECTION>
|
||||
GskShadow
|
||||
gsk_shadow_node_new
|
||||
gsk_shadow_node_peek_shadow
|
||||
gsk_shadow_node_get_shadow
|
||||
gsk_shadow_node_get_n_shadows
|
||||
gsk_shadow_node_get_child
|
||||
<SUBSECTION>
|
||||
GskBlendMode
|
||||
gsk_blend_node_new
|
||||
gsk_blend_node_get_bottom_child
|
||||
gsk_blend_node_get_top_child
|
||||
gsk_blend_node_get_blend_mode
|
||||
<SUBSECTION>
|
||||
gsk_cross_fade_node_new
|
||||
gsk_cross_fade_node_get_start_child
|
||||
gsk_cross_fade_node_get_end_child
|
||||
gsk_cross_fade_node_get_progress
|
||||
<SUBSECTION>
|
||||
gsk_text_node_new
|
||||
gsk_text_node_peek_font
|
||||
gsk_text_node_peek_glyphs
|
||||
gsk_text_node_peek_color
|
||||
gsk_text_node_get_font
|
||||
gsk_text_node_get_glyphs
|
||||
gsk_text_node_get_color
|
||||
gsk_text_node_has_color_glyphs
|
||||
gsk_text_node_get_num_glyphs
|
||||
gsk_text_node_get_offset
|
||||
<SUBSECTION>
|
||||
gsk_blur_node_new
|
||||
gsk_blur_node_get_child
|
||||
gsk_blur_node_get_radius
|
||||
<SUBSECTION>
|
||||
gsk_debug_node_new
|
||||
gsk_debug_node_get_child
|
||||
gsk_debug_node_get_message
|
||||
<SUBSECTION>
|
||||
gsk_gl_shader_node_new
|
||||
gsk_gl_shader_node_get_n_children
|
||||
gsk_gl_shader_node_get_child
|
||||
@@ -170,13 +238,18 @@ GSK_TYPE_CLIP_NODE
|
||||
GSK_TYPE_COLOR_MATRIX_NODE
|
||||
GSK_TYPE_COLOR_NODE
|
||||
GSK_TYPE_CONTAINER_NODE
|
||||
GSK_TYPE_CONIC_GRADIENT_NODE
|
||||
GSK_TYPE_CROSS_FADE_NODE
|
||||
GSK_TYPE_DEBUG_NODE
|
||||
GSK_TYPE_FILL_NODE
|
||||
GSK_TYPE_GL_SHADER_NODE
|
||||
GSK_TYPE_INSET_SHADOW_NODE
|
||||
GSK_TYPE_LINEAR_GRADIENT_NODE
|
||||
GSK_TYPE_OPACITY_NODE
|
||||
GSK_TYPE_OUTSET_SHADOW_NODE
|
||||
GSK_TYPE_RADIAL_GRADIENT_NODE
|
||||
GSK_TYPE_REPEATING_LINEAR_GRADIENT_NODE
|
||||
GSK_TYPE_REPEATING_RADIAL_GRADIENT_NODE
|
||||
GSK_TYPE_REPEAT_NODE
|
||||
GSK_TYPE_ROUNDED_CLIP_NODE
|
||||
GSK_TYPE_SHADOW_NODE
|
||||
@@ -184,6 +257,7 @@ GSK_TYPE_TEXT_NODE
|
||||
GSK_TYPE_TEXTURE_NODE
|
||||
GSK_TYPE_TRANSFORM_NODE
|
||||
GSK_TYPE_GLSHADER_NODE
|
||||
GSK_TYPE_RENDER_NODE_TYPE
|
||||
GskRenderNodeClass
|
||||
gsk_blend_node_get_type
|
||||
gsk_blur_node_get_type
|
||||
@@ -194,22 +268,26 @@ gsk_cairo_renderer_get_type
|
||||
gsk_clip_node_get_type
|
||||
gsk_color_matrix_node_get_type
|
||||
gsk_color_node_get_type
|
||||
gsk_conic_gradient_node_get_type
|
||||
gsk_container_node_get_type
|
||||
gsk_cross_fade_node_get_type
|
||||
gsk_debug_node_get_type
|
||||
gsk_fill_node_get_type
|
||||
gsk_gl_shader_node_get_type
|
||||
gsk_inset_shadow_node_get_type
|
||||
gsk_linear_gradient_node_get_type
|
||||
gsk_opacity_node_get_type
|
||||
gsk_outset_shadow_node_get_type
|
||||
gsk_radial_gradient_node_get_type
|
||||
gsk_render_node_get_type
|
||||
gsk_repeating_linear_gradient_node_get_type
|
||||
gsk_repeating_radial_gradient_node_get_type
|
||||
gsk_repeat_node_get_type
|
||||
gsk_rounded_clip_node_get_type
|
||||
gsk_shadow_node_get_type
|
||||
gsk_text_node_get_type
|
||||
gsk_texture_node_get_type
|
||||
gsk_transform_node_get_type
|
||||
gsk_gl_shader_node_get_type
|
||||
GSK_TYPE_BLEND_MODE
|
||||
<SUBSECTION Standard>
|
||||
gsk_serialization_error_quark
|
||||
@@ -232,6 +310,117 @@ gsk_rounded_rect_is_rectilinear
|
||||
gsk_rounded_rect_contains_point
|
||||
gsk_rounded_rect_contains_rect
|
||||
gsk_rounded_rect_intersects_rect
|
||||
<SUBSECTION Standard>
|
||||
GSK_TYPE_CORNER
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>GskPath</FILE>
|
||||
<SUBSECTION>
|
||||
GskPath
|
||||
gsk_path_ref
|
||||
gsk_path_unref
|
||||
gsk_path_new_rect
|
||||
gsk_path_new_from_cairo
|
||||
gsk_path_parse
|
||||
<SUBSECTION>
|
||||
gsk_path_print
|
||||
gsk_path_to_string
|
||||
gsk_path_to_cairo
|
||||
<SUBSECTION>
|
||||
gsk_path_is_empty
|
||||
gsk_path_get_bounds
|
||||
gsk_path_get_stroke_bounds
|
||||
<SUBSECTION>
|
||||
GskPathOperation
|
||||
GskPathForeachFlags
|
||||
GskPathForeachFunc
|
||||
gsk_path_foreach
|
||||
<SUBSECTION Private>
|
||||
GSK_TYPE_PATH
|
||||
gsk_path_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>GskPathBuilder</FILE>
|
||||
GskPathBuilder
|
||||
gsk_path_builder_new
|
||||
gsk_path_builder_ref
|
||||
gsk_path_builder_unref
|
||||
gsk_path_builder_to_path
|
||||
gsk_path_builder_free_to_path
|
||||
<SUBSECTION>
|
||||
gsk_path_builder_get_current_point
|
||||
<SUBSECTION>
|
||||
gsk_path_builder_add_rect
|
||||
gsk_path_builder_add_rounded_rect
|
||||
gsk_path_builder_add_circle
|
||||
gsk_path_builder_add_ellipse
|
||||
gsk_path_builder_add_path
|
||||
gtk_path_builder_add_segment
|
||||
gtk_path_builder_add_layout
|
||||
<SUBSECTION>
|
||||
gsk_path_builder_move_to
|
||||
gsk_path_builder_rel_move_to
|
||||
gsk_path_builder_line_to
|
||||
gsk_path_builder_rel_line_to
|
||||
gsk_path_builder_curve_to
|
||||
gsk_path_builder_rel_curve_to
|
||||
gsk_path_builder_conic_to
|
||||
gsk_path_builder_rel_conic_to
|
||||
gsk_path_builder_close
|
||||
<SUBSECTION Private>
|
||||
GSK_TYPE_PATH_BUILDER
|
||||
gsk_path_builder_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>GskPathMeasure</FILE>
|
||||
GskPathMeasure
|
||||
gsk_path_measure_new
|
||||
gsk_path_measure_new_with_tolerance
|
||||
gsk_path_measure_ref
|
||||
gsk_path_measure_unref
|
||||
<SUBSECTION>
|
||||
gsk_path_measure_get_path
|
||||
gsk_path_measure_get_tolerance
|
||||
gsk_path_measure_get_n_contours
|
||||
gsk_path_measure_restrict_to_contour
|
||||
<SUBSECTION>
|
||||
gsk_path_measure_get_length
|
||||
gsk_path_measure_is_closed
|
||||
gsk_path_measure_get_point
|
||||
gsk_path_measure_get_closest_point
|
||||
gsk_path_measure_get_closest_point_full
|
||||
gsk_path_measure_in_fill
|
||||
<SUBSECTION Private>
|
||||
GSK_TYPE_PATH_MEASURE
|
||||
gsk_path_measure_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>GskStroke</FILE>
|
||||
GskLineCap
|
||||
GskLineJoin
|
||||
gsk_stroke_new
|
||||
gsk_stroke_copy
|
||||
gsk_stroke_free
|
||||
gsk_stroke_equal
|
||||
gsk_stroke_set_line_width
|
||||
gsk_stroke_get_line_width
|
||||
gsk_stroke_set_line_join
|
||||
gsk_stroke_get_line_join
|
||||
gsk_stroke_set_line_cap
|
||||
gsk_stroke_get_line_cap
|
||||
gsk_stroke_set_miter_limit
|
||||
gsk_stroke_get_miter_limit
|
||||
gsk_stroke_set_dash
|
||||
gsk_stroke_get_dash
|
||||
gsk_stroke_set_dash_offset
|
||||
gsk_stroke_get_dash_offset
|
||||
<SUBSECTION Private>
|
||||
GSK_TYPE_STROKE
|
||||
gsk_stroke_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -281,10 +470,12 @@ gsk_gl_shader_new_from_bytes
|
||||
gsk_gl_shader_new_from_resource
|
||||
gsk_gl_shader_compile
|
||||
gsk_gl_shader_get_source
|
||||
gsk_gl_shader_get_resource
|
||||
gsk_gl_shader_get_n_textures
|
||||
gsk_gl_shader_get_n_uniforms
|
||||
gsk_gl_shader_get_uniform_name
|
||||
gsk_gl_shader_find_uniform_by_name
|
||||
GskGLUniformType
|
||||
gsk_gl_shader_get_uniform_type
|
||||
gsk_gl_shader_get_uniform_offset
|
||||
gsk_gl_shader_get_args_size
|
||||
@@ -316,4 +507,10 @@ gsk_shader_args_builder_set_bool
|
||||
gsk_shader_args_builder_set_vec2
|
||||
gsk_shader_args_builder_set_vec3
|
||||
gsk_shader_args_builder_set_vec4
|
||||
|
||||
<SUBSECTION Private>
|
||||
GSK_TYPE_GL_SHADER
|
||||
GSK_TYPE_GL_UNIFORM_TYPE
|
||||
GSK_TYPE_SHADER_ARGS_BUILDER
|
||||
gsk_shader_args_builder_get_type
|
||||
</SECTION>
|
||||
|
@@ -1,27 +1,48 @@
|
||||
private_headers = [
|
||||
'gsk-autocleanup.h',
|
||||
|
||||
'gskcairoblurprivate.h',
|
||||
'gskcairorendererprivate.h',
|
||||
'gskdebugprivate.h',
|
||||
'gskgldriverprivate.h',
|
||||
'gskglprofilerprivate.h',
|
||||
'gskglrendererprivate.h',
|
||||
'gskdiffprivate.h',
|
||||
'gskglshaderprivate.h',
|
||||
'gskprivate.h',
|
||||
'gskprofilerprivate.h',
|
||||
'gskrendererprivate.h',
|
||||
'gskrendernodeprivate.h',
|
||||
'gskrendernodeparserprivate.h',
|
||||
'gskroundedrectprivate.h',
|
||||
'gskshaderbuilderprivate.h',
|
||||
'gsktextureprivate.h',
|
||||
'gsktransformprivate.h',
|
||||
'gskvulkanblendpipelineprivate.h',
|
||||
|
||||
# gsk/gl
|
||||
'glutilsprivate.h',
|
||||
'gskgldriverprivate.h',
|
||||
'gskglglyphcacheprivate.h',
|
||||
'gskgliconcacheprivate.h',
|
||||
'gskglimageprivate.h',
|
||||
'gskglnodesampleprivate.h',
|
||||
'gskglprofilerprivate.h',
|
||||
'gskglrendererprivate.h',
|
||||
'gskglrenderopsprivate.h',
|
||||
'gskglshaderbuilderprivate.h',
|
||||
'gskglshadowcacheprivate.h',
|
||||
'gskgltextureatlasprivate.h',
|
||||
'opbuffer.h',
|
||||
'stb_rect_pack.h',
|
||||
|
||||
# gsk/vulkan
|
||||
'gskvulkanblendmodepipelineprivate.h',
|
||||
'gskvulkanblurpipelineprivate.h',
|
||||
'gskvulkanborderpipelineprivate.h',
|
||||
'gskvulkanboxshadowpipelineprivate.h',
|
||||
'gskvulkanbufferprivate.h',
|
||||
'gskvulkanclipprivate.h',
|
||||
'gskvulkancolorpipelineprivate.h',
|
||||
'gskvulkancolortextpipelineprivate.h',
|
||||
'gskvulkancommandpoolprivate.h',
|
||||
'gskvulkancrossfadepipelineprivate.h',
|
||||
'gskvulkaneffectpipelineprivate.h',
|
||||
'gskvulkanglyphcacheprivate.h',
|
||||
'gskvulkanimageprivate.h',
|
||||
'gskvulkanlineargradientpipelineprivate.h',
|
||||
'gskvulkanmemoryprivate.h',
|
||||
@@ -31,6 +52,8 @@ private_headers = [
|
||||
'gskvulkanrenderpassprivate.h',
|
||||
'gskvulkanrenderprivate.h',
|
||||
'gskvulkanshaderprivate.h',
|
||||
'gskvulkantextpipelineprivate.h',
|
||||
'gskvulkantexturepipelineprivate.h',
|
||||
]
|
||||
|
||||
images = [
|
||||
@@ -40,25 +63,29 @@ if get_option('gtk_doc')
|
||||
configure_file(input: 'version.xml.in', output: 'version.xml', configuration: version_conf)
|
||||
|
||||
gnome.gtkdoc('gsk4',
|
||||
mode: 'none',
|
||||
main_xml: 'gsk4-docs.xml',
|
||||
src_dir: [
|
||||
gskinc,
|
||||
],
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: join_paths(meson.current_source_dir(), 'gsk4.types'),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
'--extra-dir=../gdk',
|
||||
],
|
||||
html_assets: images,
|
||||
install: true)
|
||||
mode: 'none',
|
||||
main_xml: 'gsk4-docs.xml',
|
||||
src_dir: [
|
||||
gskinc,
|
||||
],
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: join_paths(meson.current_source_dir(), 'gsk4.types'),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
mkdb_args: [
|
||||
'--ignore-files=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
'--extra-dir=../gdk',
|
||||
],
|
||||
html_assets: images,
|
||||
install: true,
|
||||
)
|
||||
endif
|
||||
|
@@ -107,7 +107,9 @@ The `plain` build type provided by Meson should only be used when
|
||||
packaging GTK, and it's expected that packagers will provide their
|
||||
own compiler flags when building GTK. See the previous section for
|
||||
the list of environment variables to be used to define compiler and
|
||||
linker flags.
|
||||
linker flags. Note that with the plain build type, you are also
|
||||
responsible for controlling the debugging features of GTK with
|
||||
`-DG_ENABLE_DEBUG` and `-DG_DISABLE_CAST_CHECKS`.
|
||||
|
||||
## Dependencies {#dependencies}
|
||||
|
||||
@@ -159,7 +161,8 @@ Other libraries are maintained separately.
|
||||
fonts and matching them against font names.
|
||||
- [Cairo](https://www.cairographics.org) is a graphics library that
|
||||
supports vector graphics and image compositing. Both Pango and GTK
|
||||
use Cairo for drawing.
|
||||
use Cairo for drawing. Note that we also need the auxiliary cairo-gobject
|
||||
library.
|
||||
- [libepoxy](https://github.com/anholt/libepoxy) is a library that
|
||||
abstracts the differences between different OpenGL libraries. GTK
|
||||
uses it for cross-platform GL support and for its own drawing.
|
||||
|
@@ -283,7 +283,6 @@
|
||||
<xi:include href="xml/gtkcolorchooserwidget.xml" />
|
||||
<xi:include href="xml/gtkcolorchooserdialog.xml" />
|
||||
<xi:include href="xml/gtkfilechooser.xml" />
|
||||
<xi:include href="xml/gtkfilechooserbutton.xml" />
|
||||
<xi:include href="xml/gtkfilechoosernative.xml" />
|
||||
<xi:include href="xml/gtkfilechooserdialog.xml" />
|
||||
<xi:include href="xml/gtkfilechooserwidget.xml" />
|
||||
|
@@ -618,6 +618,14 @@ GtkBuildable
|
||||
GtkBuildableIface
|
||||
GtkBuildableParser
|
||||
gtk_buildable_get_buildable_id
|
||||
|
||||
<SUBSECTION Parser>
|
||||
gtk_buildable_parse_context_get_element
|
||||
gtk_buildable_parse_context_get_element_stack
|
||||
gtk_buildable_parse_context_get_position
|
||||
gtk_buildable_parse_context_pop
|
||||
gtk_buildable_parse_context_push
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_BUILDABLE
|
||||
GTK_IS_BUILDABLE
|
||||
@@ -835,6 +843,8 @@ gtk_combo_box_get_active_id
|
||||
gtk_combo_box_set_active_id
|
||||
gtk_combo_box_get_model
|
||||
gtk_combo_box_set_model
|
||||
gtk_combo_box_popup
|
||||
gtk_combo_box_popup_for_device
|
||||
gtk_combo_box_popdown
|
||||
gtk_combo_box_get_row_separator_func
|
||||
gtk_combo_box_set_row_separator_func
|
||||
@@ -1001,7 +1011,6 @@ gtk_editable_label_get_type
|
||||
<FILE>gtktext</FILE>
|
||||
<TITLE>GtkText</TITLE>
|
||||
GtkText
|
||||
GtkTextClass
|
||||
gtk_text_new
|
||||
gtk_text_new_with_buffer
|
||||
gtk_text_set_buffer
|
||||
@@ -1339,31 +1348,6 @@ gtk_file_chooser_widget_get_type
|
||||
GtkFileChooserWidgetPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkfilechooserbutton</FILE>
|
||||
<TITLE>GtkFileChooserButton</TITLE>
|
||||
GtkFileChooserButton
|
||||
gtk_file_chooser_button_new
|
||||
gtk_file_chooser_button_new_with_dialog
|
||||
gtk_file_chooser_button_get_title
|
||||
gtk_file_chooser_button_set_title
|
||||
gtk_file_chooser_button_get_width_chars
|
||||
gtk_file_chooser_button_set_width_chars
|
||||
gtk_file_chooser_button_get_modal
|
||||
gtk_file_chooser_button_set_modal
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_FILE_CHOOSER_BUTTON
|
||||
GTK_IS_FILE_CHOOSER_BUTTON
|
||||
GTK_TYPE_FILE_CHOOSER_BUTTON
|
||||
GTK_FILE_CHOOSER_BUTTON_CLASS
|
||||
GTK_IS_FILE_CHOOSER_BUTTON_CLASS
|
||||
GTK_FILE_CHOOSER_BUTTON_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_file_chooser_button_get_type
|
||||
GtkFileChooserButtonPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkfilefilter</FILE>
|
||||
GtkFileFilter
|
||||
@@ -2782,7 +2766,6 @@ gtk_sort_list_model_get_type
|
||||
GtkSpinButton
|
||||
GtkSpinButtonUpdatePolicy
|
||||
GtkSpinType
|
||||
gtk_spin_button_configure
|
||||
gtk_spin_button_new
|
||||
gtk_spin_button_new_with_range
|
||||
gtk_spin_button_set_adjustment
|
||||
@@ -2806,6 +2789,7 @@ gtk_spin_button_set_snap_to_ticks
|
||||
gtk_spin_button_get_snap_to_ticks
|
||||
gtk_spin_button_set_climb_rate
|
||||
gtk_spin_button_get_climb_rate
|
||||
gtk_spin_button_configure
|
||||
gtk_spin_button_spin
|
||||
gtk_spin_button_update
|
||||
GTK_INPUT_ERROR
|
||||
@@ -2854,6 +2838,7 @@ gtk_statusbar_push
|
||||
gtk_statusbar_pop
|
||||
gtk_statusbar_remove
|
||||
gtk_statusbar_remove_all
|
||||
gtk_statusbar_get_message
|
||||
<SUBSECTION Standard>
|
||||
GTK_STATUSBAR
|
||||
GTK_IS_STATUSBAR
|
||||
@@ -2988,6 +2973,8 @@ GTK_TEXT_BUFFER_GET_CLASS
|
||||
gtk_text_buffer_get_type
|
||||
<SUBSECTION Private>
|
||||
GtkTextBufferPrivate
|
||||
gtk_text_byte_begins_utf8_char
|
||||
gtk_text_unknown_char_utf8_gtk_tests_only
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4027,6 +4014,10 @@ gtk_cell_renderer_get_padding
|
||||
gtk_cell_renderer_set_padding
|
||||
gtk_cell_renderer_get_state
|
||||
gtk_cell_renderer_is_activatable
|
||||
gtk_cell_renderer_get_is_expanded
|
||||
gtk_cell_renderer_get_is_expander
|
||||
gtk_cell_renderer_set_is_expanded
|
||||
gtk_cell_renderer_set_is_expander
|
||||
|
||||
<SUBSECTION Width-for-height>
|
||||
gtk_cell_renderer_get_preferred_height
|
||||
@@ -4304,6 +4295,8 @@ gtk_snapshot_push_color_matrix
|
||||
gtk_snapshot_push_repeat
|
||||
gtk_snapshot_push_clip
|
||||
gtk_snapshot_push_rounded_clip
|
||||
gtk_snapshot_push_fill
|
||||
gtk_snapshot_push_stroke
|
||||
gtk_snapshot_push_cross_fade
|
||||
gtk_snapshot_push_blend
|
||||
gtk_snapshot_push_blur
|
||||
@@ -4311,6 +4304,7 @@ gtk_snapshot_push_shadow
|
||||
gtk_snapshot_push_debug
|
||||
gtk_snapshot_push_gl_shader
|
||||
gtk_snapshot_pop
|
||||
gtk_snapshot_gl_shader_pop_texture
|
||||
gtk_snapshot_save
|
||||
gtk_snapshot_restore
|
||||
gtk_snapshot_transform
|
||||
@@ -4329,14 +4323,17 @@ gtk_snapshot_append_color
|
||||
gtk_snapshot_append_layout
|
||||
gtk_snapshot_append_linear_gradient
|
||||
gtk_snapshot_append_repeating_linear_gradient
|
||||
gtk_snapshot_append_conic_gradient
|
||||
gtk_snapshot_append_border
|
||||
gtk_snapshot_append_inset_shadow
|
||||
gtk_snapshot_append_outset_shadow
|
||||
gtk_snapshot_append_radial_gradient
|
||||
gtk_snapshot_append_repeating_radial_gradient
|
||||
gtk_snapshot_render_insertion_cursor
|
||||
gtk_snapshot_render_background
|
||||
gtk_snapshot_render_frame
|
||||
gtk_snapshot_render_focus
|
||||
gtk_snapshot_render_layout
|
||||
gtk_snapshot_render_insertion_cursor
|
||||
<SUBSECTION Private>
|
||||
gtk_snapshot_get_type
|
||||
</SECTION>
|
||||
@@ -4391,6 +4388,9 @@ gtk_widget_class_add_binding_signal
|
||||
gtk_widget_class_add_binding_action
|
||||
gtk_widget_class_set_layout_manager_type
|
||||
gtk_widget_class_get_layout_manager_type
|
||||
gtk_widget_class_set_activate_signal
|
||||
gtk_widget_class_set_activate_signal_from_name
|
||||
gtk_widget_class_get_activate_signal
|
||||
gtk_widget_activate
|
||||
gtk_widget_is_focus
|
||||
gtk_widget_grab_focus
|
||||
@@ -4464,6 +4464,7 @@ gtk_widget_get_focusable
|
||||
gtk_widget_set_focusable
|
||||
gtk_widget_get_focus_on_click
|
||||
gtk_widget_set_focus_on_click
|
||||
gtk_widget_get_focus_child
|
||||
gtk_widget_set_focus_child
|
||||
gtk_widget_get_can_target
|
||||
gtk_widget_set_can_target
|
||||
@@ -4614,6 +4615,7 @@ gtk_window_set_destroy_with_parent
|
||||
gtk_window_set_display
|
||||
gtk_window_is_active
|
||||
gtk_window_is_maximized
|
||||
gtk_window_is_fullscreen
|
||||
gtk_window_get_toplevels
|
||||
gtk_window_list_toplevels
|
||||
gtk_window_get_focus
|
||||
@@ -4640,12 +4642,10 @@ gtk_window_get_default_size
|
||||
gtk_window_get_destroy_with_parent
|
||||
gtk_window_get_icon_name
|
||||
gtk_window_get_modal
|
||||
gtk_window_get_size
|
||||
gtk_window_get_title
|
||||
gtk_window_get_transient_for
|
||||
gtk_window_get_group
|
||||
gtk_window_has_group
|
||||
gtk_window_resize
|
||||
gtk_window_set_default_icon_name
|
||||
gtk_window_set_icon_name
|
||||
gtk_window_set_auto_startup_notification
|
||||
@@ -4846,7 +4846,6 @@ gtk_render_line
|
||||
gtk_render_option
|
||||
gtk_render_activity
|
||||
gtk_render_icon
|
||||
gtk_render_insertion_cursor
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_STYLE_CONTEXT
|
||||
@@ -5129,6 +5128,34 @@ GTK_PRINTER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkPrinterPrivate
|
||||
gtk_printer_get_type
|
||||
GtkPrinterOption
|
||||
gtk_printer_option_allocate_choices
|
||||
gtk_printer_option_choices_from_array
|
||||
gtk_printer_option_clear_has_conflict
|
||||
gtk_printer_option_get_activates_default
|
||||
gtk_printer_option_get_type
|
||||
gtk_printer_option_has_choice
|
||||
gtk_printer_option_new
|
||||
gtk_printer_option_set
|
||||
gtk_printer_option_set_activates_default
|
||||
gtk_printer_option_set_add
|
||||
gtk_printer_option_set_boolean
|
||||
gtk_printer_option_set_clear_conflicts
|
||||
gtk_printer_option_set_foreach
|
||||
gtk_printer_option_set_foreach_in_group
|
||||
gtk_printer_option_set_get_groups
|
||||
gtk_printer_option_set_get_type
|
||||
gtk_printer_option_set_has_conflict
|
||||
gtk_printer_option_set_lookup
|
||||
gtk_printer_option_set_new
|
||||
gtk_printer_option_set_remove
|
||||
GtkPrinterOptionWidget
|
||||
gtk_printer_option_widget_get_external_label
|
||||
gtk_printer_option_widget_get_type
|
||||
gtk_printer_option_widget_get_value
|
||||
gtk_printer_option_widget_has_external_label
|
||||
gtk_printer_option_widget_new
|
||||
gtk_printer_option_widget_set_source
|
||||
</SECTION>
|
||||
|
||||
|
||||
@@ -5321,6 +5348,7 @@ GtkCustomPaperUnixDialogClass
|
||||
<SUBSECTION Private>
|
||||
gtk_paper_size_get_type
|
||||
gtk_custom_paper_unix_dialog_get_type
|
||||
gtk_print_load_custom_papers
|
||||
GtkCustomPaperUnixDialogPrivate
|
||||
</SECTION>
|
||||
|
||||
@@ -5476,6 +5504,20 @@ gtk_test_init
|
||||
gtk_test_list_all_types
|
||||
gtk_test_register_all_types
|
||||
gtk_test_widget_wait_for_draw
|
||||
<SUBSECTION Accessibility>
|
||||
gtk_test_accessible_assert_property
|
||||
gtk_test_accessible_assert_relation
|
||||
gtk_test_accessible_assert_role
|
||||
gtk_test_accessible_assert_state
|
||||
gtk_test_accessible_check_property
|
||||
gtk_test_accessible_check_relation
|
||||
gtk_test_accessible_check_state
|
||||
gtk_test_accessible_has_property
|
||||
gtk_test_accessible_has_relation
|
||||
gtk_test_accessible_has_role
|
||||
gtk_test_accessible_has_state
|
||||
<SECTION Private>
|
||||
gtk_test_accessible_assertion_message_role
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -6139,6 +6181,7 @@ GtkPopover
|
||||
gtk_popover_new
|
||||
gtk_popover_popup
|
||||
gtk_popover_popdown
|
||||
gtk_popover_present
|
||||
gtk_popover_set_child
|
||||
gtk_popover_get_child
|
||||
gtk_popover_set_pointing_to
|
||||
@@ -6154,6 +6197,8 @@ gtk_popover_get_offset
|
||||
gtk_popover_set_default_widget
|
||||
gtk_popover_set_cascade_popdown
|
||||
gtk_popover_get_cascade_popdown
|
||||
gtk_popover_get_mnemonics_visible
|
||||
gtk_popover_set_mnemonics_visible
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_POPOVER
|
||||
GTK_IS_POPOVER
|
||||
@@ -6996,8 +7041,9 @@ GtkNative
|
||||
gtk_native_get_for_surface
|
||||
gtk_native_get_surface
|
||||
gtk_native_get_renderer
|
||||
gtk_native_check_resize
|
||||
gtk_native_get_surface_transform
|
||||
gtk_native_realize
|
||||
gtk_native_unrealize
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_native_get_type
|
||||
@@ -7538,6 +7584,9 @@ gtk_accessible_reset_property
|
||||
gtk_accessible_update_relation
|
||||
gtk_accessible_update_relation_value
|
||||
gtk_accessible_reset_relation
|
||||
gtk_accessible_property_init_value
|
||||
gtk_accessible_relation_init_value
|
||||
gtk_accessible_state_init_value
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_ACCESSIBLE
|
||||
|
@@ -19,8 +19,8 @@ gtk_assistant_page_get_type
|
||||
gtk_at_context_get_type
|
||||
gtk_bin_layout_get_type
|
||||
gtk_bitset_get_type
|
||||
gtk_expression_get_type
|
||||
gtk_bookmark_list_get_type
|
||||
gtk_bool_filter_get_type
|
||||
gtk_box_get_type
|
||||
gtk_box_layout_get_type
|
||||
gtk_buildable_get_type
|
||||
@@ -46,6 +46,7 @@ gtk_cell_renderer_spinner_get_type
|
||||
gtk_cell_renderer_text_get_type
|
||||
gtk_cell_renderer_toggle_get_type
|
||||
gtk_cell_view_get_type
|
||||
gtk_center_box_get_type
|
||||
gtk_center_layout_get_type
|
||||
gtk_check_button_get_type
|
||||
gtk_closure_expression_get_type
|
||||
@@ -65,14 +66,16 @@ gtk_constraint_target_get_type
|
||||
gtk_css_provider_get_type
|
||||
gtk_custom_filter_get_type
|
||||
gtk_custom_sorter_get_type
|
||||
gtk_custom_layout_get_type
|
||||
gtk_dialog_get_type
|
||||
gtk_directory_list_get_type
|
||||
gtk_drag_icon_get_type
|
||||
gtk_drag_source_get_type
|
||||
gtk_drawing_area_get_type
|
||||
gtk_drop_target_get_type
|
||||
gtk_drop_target_async_get_type
|
||||
gtk_drop_controller_motion_get_type
|
||||
gtk_drop_down_get_type
|
||||
gtk_drop_target_async_get_type
|
||||
gtk_drop_target_get_type
|
||||
gtk_editable_get_type
|
||||
gtk_editable_label_get_type
|
||||
gtk_emoji_chooser_get_type
|
||||
@@ -87,7 +90,7 @@ gtk_event_controller_motion_get_type
|
||||
gtk_event_controller_scroll_get_type
|
||||
gtk_every_filter_get_type
|
||||
gtk_expander_get_type
|
||||
gtk_file_chooser_button_get_type
|
||||
gtk_expression_get_type
|
||||
gtk_file_chooser_dialog_get_type
|
||||
gtk_file_chooser_get_type
|
||||
gtk_file_chooser_native_get_type
|
||||
@@ -251,6 +254,7 @@ gtk_video_get_type
|
||||
gtk_viewport_get_type
|
||||
gtk_volume_button_get_type
|
||||
gtk_widget_get_type
|
||||
gtk_widget_paintable_get_type
|
||||
gtk_window_get_type
|
||||
gtk_window_controls_get_type
|
||||
gtk_window_group_get_type
|
||||
|
@@ -119,21 +119,18 @@ around or to activate a widget that does not currently have the focus.
|
||||
|
||||
GTK has traditionally supported different kinds of shortcuts:
|
||||
|
||||
Accelerators
|
||||
: Accelerators are any other shortcuts that can be activated regardless
|
||||
of where the focus is, and typically trigger global actions, such as
|
||||
Ctrl-Q to quit an application.
|
||||
Mnmemonics
|
||||
: Mnemonics are usually triggered using Alt as a modifier for a letter.
|
||||
They are used in places where a label is associated with a control,
|
||||
and are indicated by underlining the letter in the label. As a special
|
||||
case, inside menus (i.e. inside #GtkPopoverMenu), mnemonics can be
|
||||
triggered without the modifier.
|
||||
Key bindings
|
||||
: Key bindings are specific to individual widgets, such as Ctrl-C or
|
||||
Ctrl-V in an entry copy to or paste from the clipboard. They are only
|
||||
triggered when the widget has focus.
|
||||
|
||||
- Accelerators are any other shortcuts that can be activated regardless
|
||||
of where the focus is, and typically trigger global actions, such as
|
||||
Ctrl-Q to quit an application.
|
||||
- Mnemonics are usually triggered using Alt as a modifier for a letter.
|
||||
They are used in places where a label is associated with a control,
|
||||
and are indicated by underlining the letter in the label. As a special
|
||||
case, inside menus (i.e. inside #GtkPopoverMenu), mnemonics can be
|
||||
triggered without the modifier.
|
||||
- Key bindings are specific to individual widgets, such as Ctrl-C or
|
||||
Ctrl-V in an entry copy to or paste from the clipboard. They are only
|
||||
triggered when the widget has focus.
|
||||
|
||||
GTK handles accelerators and mnemonics in a global scope, during the
|
||||
capture phase, and key bindings locally, during the target phase.
|
||||
|
||||
|
@@ -1,9 +1,6 @@
|
||||
fs = import('fs')
|
||||
|
||||
private_headers = [
|
||||
'imm-extra.h',
|
||||
'gtkbitmaskprivateimpl.h',
|
||||
'gdkpixbufutilsprivate.h',
|
||||
'gtkaccelgroupprivate.h',
|
||||
'gtkaccelmapprivate.h',
|
||||
'gtkaccessibleattributesetprivate.h',
|
||||
@@ -21,14 +18,21 @@ private_headers = [
|
||||
'gtkapplicationprivate.h',
|
||||
'gtkatcontextprivate.h',
|
||||
'gtkbindingsprivate.h',
|
||||
'gtkbitmaskprivateimpl.h',
|
||||
'gtkbitmaskprivate.h',
|
||||
'gtkbuildableprivate.h',
|
||||
'gtkbuilderprivate.h',
|
||||
'gtkbuilderscopeprivate.h',
|
||||
'gtkbuiltiniconprivate.h',
|
||||
'gtkbuttonprivate.h',
|
||||
'gtkcellareaboxcontextprivate.h',
|
||||
'gtkcheckbuttonprivate.h',
|
||||
'gtkcolorchooserprivate.h',
|
||||
'gtkcoloreditorprivate.h',
|
||||
'gtkcolorpickerkwinprivate.h',
|
||||
'gtkcolorpickerportalprivate.h',
|
||||
'gtkcolorpickerprivate.h',
|
||||
'gtkcolorpickershellprivate.h',
|
||||
'gtkcolorplaneprivate.h',
|
||||
'gtkcolorscaleprivate.h',
|
||||
'gtkcolorswatchprivate.h',
|
||||
@@ -40,6 +44,7 @@ private_headers = [
|
||||
'gtkcolumnviewsorterprivate.h',
|
||||
'gtkcolumnviewtitleprivate.h',
|
||||
'gtkcomboboxprivate.h',
|
||||
'gtkcomposetable.h',
|
||||
'gtkconstraintexpressionprivate.h',
|
||||
'gtkconstraintguideprivate.h',
|
||||
'gtkconstraintlayoutprivate.h',
|
||||
@@ -47,6 +52,7 @@ private_headers = [
|
||||
'gtkconstraintsolverprivate.h',
|
||||
'gtkconstrainttypesprivate.h',
|
||||
'gtkconstraintvflparserprivate.h',
|
||||
'gtkcountingbloomfilterprivate.h',
|
||||
'gtkcssanimatedstyleprivate.h',
|
||||
'gtkcssanimationprivate.h',
|
||||
'gtkcssarrayvalueprivate.h',
|
||||
@@ -57,6 +63,7 @@ private_headers = [
|
||||
'gtkcsscalcvalueprivate.h',
|
||||
'gtkcsscolorvalueprivate.h',
|
||||
'gtkcsscornervalueprivate.h',
|
||||
'gtkcssdataurlprivate.h',
|
||||
'gtkcssdimensionvalueprivate.h',
|
||||
'gtkcssdynamicprivate.h',
|
||||
'gtkcsseasevalueprivate.h',
|
||||
@@ -65,6 +72,7 @@ private_headers = [
|
||||
'gtkcssfontfeaturesvalueprivate.h',
|
||||
'gtkcssfontvariationsvalueprivate.h',
|
||||
'gtkcssiconthemevalueprivate.h',
|
||||
'gtkcssimageconicprivate.h',
|
||||
'gtkcssimagecrossfadeprivate.h',
|
||||
'gtkcssimagefallbackprivate.h',
|
||||
'gtkcssimageiconthemeprivate.h',
|
||||
@@ -81,6 +89,7 @@ private_headers = [
|
||||
'gtkcssinheritvalueprivate.h',
|
||||
'gtkcssinitialvalueprivate.h',
|
||||
'gtkcsskeyframesprivate.h',
|
||||
'gtkcsslocationprivate.h',
|
||||
'gtkcsslookupprivate.h',
|
||||
'gtkcssmatcherprivate.h',
|
||||
'gtkcssnodedeclarationprivate.h',
|
||||
@@ -96,6 +105,7 @@ private_headers = [
|
||||
'gtkcssrgbavalueprivate.h',
|
||||
'gtkcsssectionprivate.h',
|
||||
'gtkcssselectorprivate.h',
|
||||
'gtkcssserializerprivate.h',
|
||||
'gtkcssshadowsvalueprivate.h',
|
||||
'gtkcssshadowvalueprivate.h',
|
||||
'gtkcssshorthandpropertyprivate.h',
|
||||
@@ -104,6 +114,7 @@ private_headers = [
|
||||
'gtkcssstylechangeprivate.h',
|
||||
'gtkcssstyleprivate.h',
|
||||
'gtkcssstylepropertyprivate.h',
|
||||
'gtkcsstokenizerprivate.h',
|
||||
'gtkcsstransformvalueprivate.h',
|
||||
'gtkcsstransientnodeprivate.h',
|
||||
'gtkcsstransitionprivate.h',
|
||||
@@ -113,6 +124,9 @@ private_headers = [
|
||||
'gtkcsswidgetnodeprivate.h',
|
||||
'gtkcsswin32sizevalueprivate.h',
|
||||
'gtkdialogprivate.h',
|
||||
'gtkdragdestprivate.h',
|
||||
'gtkdropprivate.h',
|
||||
'gtkemojicompletion.h',
|
||||
'gtkentryprivate.h',
|
||||
'gtkeventcontrollerlegacyprivate.h',
|
||||
'gtkeventcontrollerprivate.h',
|
||||
@@ -121,6 +135,7 @@ private_headers = [
|
||||
'gtkfilechooserprivate.h',
|
||||
'gtkfilechooserwidgetprivate.h',
|
||||
'gtkfilefilterprivate.h',
|
||||
'gtkflowboxprivate.h',
|
||||
'gtkfontchooserprivate.h',
|
||||
'gtkfontchooserwidgetprivate.h',
|
||||
'gtkgesturedragprivate.h',
|
||||
@@ -144,15 +159,25 @@ private_headers = [
|
||||
'gtkiconviewprivate.h',
|
||||
'gtkimagedefinitionprivate.h',
|
||||
'gtkimageprivate.h',
|
||||
'gtkimcontextbroadway.h',
|
||||
'gtkimcontextime.h',
|
||||
'gtkimcontextquartz.h',
|
||||
'gtkimcontextsimpleprivate.h',
|
||||
'gtkimcontextsimpleseqs.h',
|
||||
'gtkimcontextwayland.h',
|
||||
'gtkimmoduleprivate.h',
|
||||
'gtkimmodule.h',
|
||||
'gtkintl.h',
|
||||
'gtkistringprivate.h',
|
||||
'gtkkineticscrollingprivate.h',
|
||||
'gtklabelprivate.h',
|
||||
'gtklayoutmanagerprivate.h',
|
||||
'gtklistbaseprivate.h',
|
||||
'gtklistitemprivate.h',
|
||||
'gtklistitemfactoryprivate.h',
|
||||
'gtklistitemmanagerprivate.h',
|
||||
'gtklistitemwidgetprivate.h',
|
||||
'gtklistlistmodelprivate.h',
|
||||
'gtklockbuttonprivate.h',
|
||||
'gtkmagnifierprivate.h',
|
||||
'gtkmediafileprivate.h',
|
||||
@@ -160,20 +185,33 @@ private_headers = [
|
||||
'gtkmenusectionboxprivate.h',
|
||||
'gtkmenutrackeritemprivate.h',
|
||||
'gtkmenutrackerprivate.h',
|
||||
'gtkmodelbuttonprivate.h',
|
||||
'gtkmodulesprivate.h',
|
||||
'gtkmountoperationprivate.h',
|
||||
'gtknativedialogprivate.h',
|
||||
'gtknativeprivate.h',
|
||||
'gtknomediafileprivate.h',
|
||||
'gtkpango.h',
|
||||
'gtkpasswordentrybufferprivate.h',
|
||||
'gtkpasswordentryprivate.h',
|
||||
'gtkpathbar.h',
|
||||
'gdkpixbufutilsprivate.h',
|
||||
'gtkplacessidebarprivate.h',
|
||||
'gtkplacesviewprivate.h',
|
||||
'gtkplacesviewrowprivate.h',
|
||||
'gtkpointerfocusprivate.h',
|
||||
'gtkpopcountprivate.h',
|
||||
'gtkpopovermenubarprivate.h',
|
||||
'gtkpopovermenuprivate.h',
|
||||
'gtkpopoverprivate.h',
|
||||
'gtkprintbackendprivate.h',
|
||||
'gtkprinterprivate.h',
|
||||
'gtkprintoperation-portal.h',
|
||||
'gtkprintoperation-private.h',
|
||||
'gtkprintutils.h',
|
||||
'gtkprivate.h',
|
||||
'gtkprogresstrackerprivate.h',
|
||||
'gtkpropertylookuplistmodelprivate.h',
|
||||
'gtkquery.h',
|
||||
'gtkrangeprivate.h',
|
||||
'gtkrbtreeprivate.h',
|
||||
@@ -181,22 +219,35 @@ private_headers = [
|
||||
'gtkrenderborderprivate.h',
|
||||
'gtkrendericonprivate.h',
|
||||
'gtkrendernodepaintableprivate.h',
|
||||
'gtkrootprivate.h',
|
||||
'gtkroundedboxprivate.h',
|
||||
'gtkscalerprivate.h',
|
||||
'gtksearchengine.h',
|
||||
'gtksearchenginemodel.h',
|
||||
'gtksearchenginequartz.h',
|
||||
'gtksearchenginetracker3.h',
|
||||
'gtksearchentryprivate.h',
|
||||
'gtksecurememoryprivate.h',
|
||||
'gtksettingsprivate.h',
|
||||
'gtkshortcutactionprivate.h',
|
||||
'gtkshortcutcontrollerprivate.h',
|
||||
'gtkshortcutmanagerprivate.h',
|
||||
'gtkshortcutsshortcutprivate.h',
|
||||
'gtkshortcutswindowprivate.h',
|
||||
'gtksidebarrowprivate.h',
|
||||
'gtksizegroup-private.h',
|
||||
'gtksizerequestcacheprivate.h',
|
||||
'gtksnapshotprivate.h',
|
||||
'gtksorterprivate.h',
|
||||
'gtksortkeysprivate.h',
|
||||
'gtkspinbuttonprivate.h',
|
||||
'gtkstyleanimationprivate.h',
|
||||
'gtkstylecascadeprivate.h',
|
||||
'gtkstylecontextprivate.h',
|
||||
'gtkstylepropertyprivate.h',
|
||||
'gtkstyleproviderprivate.h',
|
||||
'gtktestatcontextprivate.h',
|
||||
'gtktextattributes.h',
|
||||
'gtktextbufferprivate.h',
|
||||
'gtktextchildprivate.h',
|
||||
'gtktextdisplayprivate.h',
|
||||
@@ -206,12 +257,17 @@ private_headers = [
|
||||
'gtktextlayoutprivate.h',
|
||||
'gtktextlinedisplaycacheprivate.h',
|
||||
'gtktextmarkprivate.h',
|
||||
'gtktextprivate.h',
|
||||
'gtktextsegment.h',
|
||||
'gtktexttagprivate.h',
|
||||
'gtktextutil.h',
|
||||
'gtktextviewchildprivate.h',
|
||||
'gtktextviewprivate.h',
|
||||
'gtktogglebuttonprivate.h',
|
||||
'gtktoolbarprivate.h',
|
||||
'gtktooltipprivate.h',
|
||||
'gtktooltipwindowprivate.h',
|
||||
'gtktreedatalist.h',
|
||||
'gtktreepopoverprivate.h',
|
||||
'gtktreeprivate.h',
|
||||
'gtktreerbtreeprivate.h',
|
||||
@@ -222,8 +278,21 @@ private_headers = [
|
||||
'gtkwin32drawprivate.h',
|
||||
'gtkwin32themeprivate.h',
|
||||
'gtkwindowprivate.h',
|
||||
'gtk-text-input-client-protocol.h',
|
||||
'roaring.h',
|
||||
|
||||
'gsettings-mapping.h',
|
||||
'gskpango.h',
|
||||
'gtkdbusgenerated.h',
|
||||
'imm-extra.h',
|
||||
'language-names.h',
|
||||
'open-type-layout.h',
|
||||
'script-names.h',
|
||||
'text-input-unstable-v3-client-protocol.h',
|
||||
|
||||
'a11y',
|
||||
'inspector',
|
||||
'roaring',
|
||||
'timsort',
|
||||
'tools',
|
||||
]
|
||||
|
||||
images = [
|
||||
@@ -448,43 +517,46 @@ if get_option('gtk_doc')
|
||||
expand_md_targets = []
|
||||
foreach t : expand_content_md_files
|
||||
expand_md_targets += custom_target(t,
|
||||
input: [ t ],
|
||||
output: [ fs.replace_suffix(t, '.xml') ],
|
||||
command: [ expand_md, '@INPUT@', '@OUTPUT@'])
|
||||
input: [ t ],
|
||||
output: [ fs.replace_suffix(t, '.xml') ],
|
||||
command: [ expand_md, '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
endforeach
|
||||
|
||||
gnome.gtkdoc('gtk4',
|
||||
mode: 'none',
|
||||
main_xml: 'gtk4-docs.xml',
|
||||
src_dir: [
|
||||
gtkinc,
|
||||
],
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: configure_file(
|
||||
input: 'gtk4.types.in',
|
||||
output: 'gtk4.types',
|
||||
configuration: types_conf,
|
||||
),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
mkdb_args: [
|
||||
'--default-includes=gtk/gtk.h',
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
'--extra-dir=@0@'.format(gdkpixbuf_docpath),
|
||||
'--extra-dir=../gdk',
|
||||
'--extra-dir=../gsk',
|
||||
],
|
||||
content_files: content_files + expand_md_targets,
|
||||
html_assets: images,
|
||||
install: true)
|
||||
mode: 'none',
|
||||
main_xml: 'gtk4-docs.xml',
|
||||
src_dir: [
|
||||
gtkinc,
|
||||
],
|
||||
dependencies: libgtk_dep,
|
||||
gobject_typesfile: configure_file(
|
||||
input: 'gtk4.types.in',
|
||||
output: 'gtk4.types',
|
||||
configuration: types_conf,
|
||||
),
|
||||
scan_args: [
|
||||
'--ignore-decorators=_GDK_EXTERN|G_GNUC_WARN_UNUSED_RESULT',
|
||||
'--ignore-headers=' + ' '.join(private_headers),
|
||||
],
|
||||
mkdb_args: [
|
||||
'--default-includes=gtk/gtk.h',
|
||||
'--ignore-files=' + ' '.join(private_headers),
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=@0@'.format(docpath),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
|
||||
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
|
||||
'--extra-dir=@0@'.format(cairo_docpath),
|
||||
'--extra-dir=@0@'.format(gdkpixbuf_docpath),
|
||||
'--extra-dir=../gdk',
|
||||
'--extra-dir=../gsk',
|
||||
],
|
||||
content_files: content_files + expand_md_targets,
|
||||
html_assets: images,
|
||||
install: true,
|
||||
)
|
||||
endif
|
||||
|
||||
xsltproc = find_program('xsltproc', required: false)
|
||||
@@ -519,16 +591,17 @@ if get_option('man-pages') and xsltproc.found()
|
||||
man_name = man.get(0)
|
||||
man_section = man.get(1, '1')
|
||||
custom_target('@0@.@1@'.format(man_name, man_section),
|
||||
input: '@0@.xml'.format(man_name),
|
||||
output: '@0@.@1@'.format(man_name, man_section),
|
||||
command: [
|
||||
xsltproc,
|
||||
xlstproc_flags,
|
||||
'-o', '@OUTPUT@',
|
||||
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
|
||||
'@INPUT@',
|
||||
],
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(man_section)))
|
||||
input: '@0@.xml'.format(man_name),
|
||||
output: '@0@.@1@'.format(man_name, man_section),
|
||||
command: [
|
||||
xsltproc,
|
||||
xlstproc_flags,
|
||||
'-o', '@OUTPUT@',
|
||||
'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
|
||||
'@INPUT@',
|
||||
],
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(man_section)),
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
@@ -165,7 +165,7 @@ for this change.
|
||||
| ::key-release-event | #GtkEventControllerKey |
|
||||
| ::enter-notify-event | #GtkEventControllerMotion |
|
||||
| ::leave-notify-event | #GtkEventControllerMotion |
|
||||
| ::configure-event | replaced by #GdkSurface::size-changed |
|
||||
| ::configure-event | replaced by #GdkSurface::layout |
|
||||
| ::focus-in-event | #GtkEventControllerFocus |
|
||||
| ::focus-out-event | #GtkEventControllerFocus |
|
||||
| ::map-event | replaced by #GdkSurface:mapped |
|
||||
@@ -510,9 +510,14 @@ gtk_window_set_gravity(), gtk_window_move(), gtk_window_parse_geometry(),
|
||||
gtk_window_set_keep_above(), gtk_window_set_keep_below(),
|
||||
gtk_window_begin_resize_drag(), gtk_window_begin_move_drag().
|
||||
Most likely, you should just stop using them. In some cases, you can
|
||||
fall back to using the underlying #GdkToplevel APIS (for example,
|
||||
fall back to using the underlying #GdkToplevel APIs (for example,
|
||||
gdk_toplevel_begin_resize()).
|
||||
|
||||
The APIs for controlling GtkWindow size have changed to be better aligned
|
||||
with the way size changes are integrated in the frame cycle. gtk_window_resize()
|
||||
and gtk_window_get_size() have been removed. Instead, use
|
||||
gtk_window_set_default_size() and gtk_window_get_default_size().
|
||||
|
||||
### Adapt to GtkHeaderBar and GtkActionBar API changes
|
||||
|
||||
The gtk_header_bar_set_show_close_button() function has been renamed to
|
||||
@@ -1057,7 +1062,7 @@ to start a drag manually, call gdk_drag_begin().
|
||||
The ::drag-data-get signal has been replaced by the #GtkDragSource::prepare
|
||||
signal, which returns a #GdkContentProvider for the drag operation.
|
||||
|
||||
The destination-side Drag-and-Drop apis in GTK 4 have also been changed
|
||||
The destination-side Drag-and-Drop API in GTK 4 have also been changed
|
||||
to use an event controller, #GtkDropTarget. Instead of calling
|
||||
gtk_drag_dest_set() and connecting to #GtkWidget signals, you create
|
||||
a #GtkDropTarget object, attach it to the widget with
|
||||
@@ -1136,6 +1141,27 @@ gtk_buildable_get_buildable_id().
|
||||
GtkAboutDialog now directly derives from GtkWindow, the GtkDialog API can no
|
||||
longer be used on it.
|
||||
|
||||
### Adapt to GtkTreeView and GtkIconView tooltip context changes
|
||||
|
||||
The getter functions for retrieving the data from #GtkTreeView
|
||||
and #GtkIconView inside a #GtkWidget::query-tooltip signal do not take the
|
||||
pointer coordinates as inout arguments any more, but as normal in ones.
|
||||
|
||||
See: gtk_tree_view_get_tooltip_context(), gtk_icon_view_get_tooltip_context()
|
||||
|
||||
### Stop using GtkFileChooserButton
|
||||
|
||||
The `GtkFileChooserButton` widget was removed, due to its shortcomings in
|
||||
the user interaction. You can replace it with a simple #GtkButton that
|
||||
shows a #GtkFileChooserNative dialog when clicked; once the file selection
|
||||
has completed, you can update the label of the #GtkButton with the selected
|
||||
file.
|
||||
|
||||
### Adapt to changed GtkSettings properties
|
||||
|
||||
In GTK 3 the #GtkSettings:gtk-cursor-aspect-ratio property of #GtkSettings was
|
||||
a float. In GTK 4 this has been changed to a double.
|
||||
|
||||
## Changes to consider after the switch
|
||||
|
||||
GTK 4 has a number of new features that you may want to take
|
||||
|
@@ -97,11 +97,11 @@ the question you have, this list is a good place to start.
|
||||
#define N_(x) x
|
||||
#define C_(ctx,x) pgettext (ctx, x)
|
||||
|
||||
You use N_() (N stands for no-op) to mark a string for translation in
|
||||
You use `N_()` (N stands for no-op) to mark a string for translation in
|
||||
a location where a function call to gettext() is not allowed, such as
|
||||
in an array initializer. You eventually have to call gettext() on the
|
||||
string to actually fetch the translation. _() both marks the string for
|
||||
translation and actually translates it. The C_() macro (C stands for
|
||||
string to actually fetch the translation. `_()` both marks the string for
|
||||
translation and actually translates it. The `C_()` macro (C stands for
|
||||
context) adds an additional context to the string that is marked for
|
||||
translation, which can help to disambiguate short strings that might
|
||||
need different translations in different parts of your program.
|
||||
@@ -190,7 +190,7 @@ the question you have, this list is a good place to start.
|
||||
encode string literals in UTF-8 by using octal or hexadecimal escapes
|
||||
like `\212` or `\xa8` to encode each byte. This is portable, but
|
||||
modifying the escaped strings is not very convenient. Be careful when
|
||||
mixing hexadecimal escapes with ordinary text; `"\xa8abcd" is a string
|
||||
mixing hexadecimal escapes with ordinary text; `"\xa8abcd"` is a string
|
||||
of length 1 !
|
||||
|
||||
- Runtime conversion
|
||||
|
@@ -11,9 +11,9 @@ environment variables.
|
||||
|
||||
### GTK_DEBUG {#GTK_Debug-Options}
|
||||
|
||||
Unless GTK has been configured with `-Ddebug=false`, this variable
|
||||
can be set to a list of debug options, which cause GTK to print out
|
||||
different types of debugging information.
|
||||
This variable can be set to a list of debug options, which cause GTK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with `-Ddebug=true`.
|
||||
|
||||
actions
|
||||
: Actions and menu models
|
||||
@@ -141,9 +141,9 @@ The `loaders.cache` file is generated by the
|
||||
|
||||
### GDK_DEBUG
|
||||
|
||||
Unless GTK has been configured with `-Ddebug=false`, this variable
|
||||
can be set to a list of debug options, which cause GDK to print out
|
||||
different types of debugging information.
|
||||
This variable can be set to a list of debug options, which cause GDK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with `-Ddebug=true`.
|
||||
|
||||
cursor
|
||||
: Information about cursor objects (only win32)
|
||||
@@ -191,10 +191,9 @@ to obtain a list of all supported debug options.
|
||||
|
||||
### GSK_DEBUG {#GSK-Debug-Options}
|
||||
|
||||
Unless GTK has been configured with `-Ddebug=false`,
|
||||
this variable can be set to a list of debug options,
|
||||
which cause GSK to print out different types of debugging
|
||||
information.
|
||||
This variable can be set to a list of debug options, which cause GSK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with `-Ddebug=true`.
|
||||
|
||||
renderer
|
||||
: General renderer information
|
||||
|
@@ -12,13 +12,6 @@ gtk_widget_set_size_request():
|
||||
we use 1x1 for implementation convenience)
|
||||
- causes notifies on width_request, height_request properties
|
||||
|
||||
gtk_window_resize():
|
||||
- causes a configure request in all cases if the window is mapped,
|
||||
unless the new size is the same as the old size
|
||||
- overrides the default size on map if the window is unmapped
|
||||
- allows size of 0, equivalent to 1
|
||||
- clamped to geometry hints
|
||||
|
||||
gtk_window_set_default_size():
|
||||
- has no effect after the window has been mapped the first time,
|
||||
unless the window has been unrealized in which case it should
|
||||
@@ -26,7 +19,6 @@ gtk_window_set_default_size():
|
||||
- allows size of 0, equivalent to 1
|
||||
- allows size of -1 to unset the default size
|
||||
- clamped to geometry hints
|
||||
- gtk_window_resize() overrides it
|
||||
- causes notifies on default_width, default_height properties
|
||||
|
||||
gtk_window_get_default_size():
|
||||
|
@@ -615,51 +615,6 @@ create_font_button (void)
|
||||
return new_widget_info ("font-button", vbox, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_file_button (void)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *vbox2;
|
||||
GtkWidget *picker;
|
||||
char *path;
|
||||
GFile *file;
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
picker = gtk_file_chooser_button_new ("File Chooser Button",
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gtk_widget_set_size_request (picker, 150, -1);
|
||||
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
|
||||
gtk_box_append (GTK_BOX (vbox2), picker);
|
||||
gtk_box_append (GTK_BOX (vbox2),
|
||||
gtk_label_new ("File Button (Files)"));
|
||||
|
||||
gtk_box_append (GTK_BOX (vbox),
|
||||
vbox2);
|
||||
gtk_box_append (GTK_BOX (vbox),
|
||||
gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
picker = gtk_file_chooser_button_new ("File Chooser Button",
|
||||
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
gtk_widget_set_size_request (picker, 150, -1);
|
||||
path = g_build_filename (g_get_home_dir (), "Documents", NULL);
|
||||
file = g_file_new_for_path (path);
|
||||
gtk_file_chooser_set_file (GTK_FILE_CHOOSER (picker), file, NULL);
|
||||
g_free (path);
|
||||
g_object_unref (file);
|
||||
gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
|
||||
gtk_box_append (GTK_BOX (vbox2), picker);
|
||||
gtk_box_append (GTK_BOX (vbox2), gtk_label_new ("File Button (Select Folder)"));
|
||||
gtk_box_append (GTK_BOX (vbox), vbox2);
|
||||
|
||||
add_margin (vbox);
|
||||
|
||||
return new_widget_info ("file-button", vbox, MEDIUM);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_editable_label (void)
|
||||
{
|
||||
@@ -2144,7 +2099,6 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_combo_box_entry ());
|
||||
retval = g_list_prepend (retval, create_combo_box_text ());
|
||||
retval = g_list_prepend (retval, create_entry ());
|
||||
retval = g_list_prepend (retval, create_file_button ());
|
||||
retval = g_list_prepend (retval, create_font_button ());
|
||||
retval = g_list_prepend (retval, create_frame ());
|
||||
retval = g_list_prepend (retval, create_icon_view ());
|
||||
|
@@ -1022,7 +1022,7 @@ parse_line (const char *line, const char *key)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
if (!g_str_has_prefix (line, key))
|
||||
if (g_ascii_strncasecmp (line, key, strlen (key)) != 0)
|
||||
return NULL;
|
||||
p = line + strlen (key);
|
||||
if (*p != ':')
|
||||
|
@@ -280,12 +280,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display,
|
||||
surface = g_hash_table_lookup (display_broadway->id_ht, GINT_TO_POINTER (message->configure_notify.id));
|
||||
if (surface)
|
||||
{
|
||||
event = gdk_configure_event_new (surface,
|
||||
message->configure_notify.width,
|
||||
message->configure_notify.height);
|
||||
|
||||
node = _gdk_event_queue_append (display, event);
|
||||
_gdk_windowing_got_event (display, node, event, message->base.serial);
|
||||
gdk_surface_request_layout (surface);
|
||||
|
||||
if (surface->resize_count >= 1)
|
||||
{
|
||||
|
@@ -558,6 +558,7 @@ gdk_broadway_surface_layout_popup (GdkSurface *surface,
|
||||
int height,
|
||||
GdkPopupLayout *layout)
|
||||
{
|
||||
GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface);
|
||||
GdkMonitor *monitor;
|
||||
GdkRectangle bounds;
|
||||
GdkRectangle final_rect;
|
||||
@@ -570,6 +571,10 @@ gdk_broadway_surface_layout_popup (GdkSurface *surface,
|
||||
gdk_surface_layout_popup_helper (surface,
|
||||
width,
|
||||
height,
|
||||
impl->shadow_left,
|
||||
impl->shadow_right,
|
||||
impl->shadow_top,
|
||||
impl->shadow_bottom,
|
||||
monitor,
|
||||
&bounds,
|
||||
layout,
|
||||
@@ -596,7 +601,7 @@ gdk_broadway_surface_layout_popup (GdkSurface *surface,
|
||||
static void
|
||||
show_popup (GdkSurface *surface)
|
||||
{
|
||||
gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
|
||||
gdk_surface_set_is_mapped (surface, TRUE);
|
||||
gdk_broadway_surface_show (surface, FALSE);
|
||||
gdk_surface_invalidate_rect (surface, NULL);
|
||||
}
|
||||
@@ -1516,7 +1521,7 @@ show_surface (GdkSurface *surface)
|
||||
was_mapped = GDK_SURFACE_IS_MAPPED (surface);
|
||||
|
||||
if (!was_mapped)
|
||||
gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
|
||||
gdk_surface_set_is_mapped (surface, TRUE);
|
||||
|
||||
gdk_broadway_surface_show (surface, FALSE);
|
||||
|
||||
@@ -1524,11 +1529,12 @@ show_surface (GdkSurface *surface)
|
||||
gdk_surface_invalidate_rect (surface, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
gdk_broadway_toplevel_present (GdkToplevel *toplevel,
|
||||
GdkToplevelLayout *layout)
|
||||
{
|
||||
GdkSurface *surface = GDK_SURFACE (toplevel);
|
||||
GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface);
|
||||
GdkDisplay *display = gdk_surface_get_display (surface);
|
||||
GdkMonitor *monitor;
|
||||
GdkToplevelSize size;
|
||||
@@ -1536,6 +1542,7 @@ gdk_broadway_toplevel_present (GdkToplevel *toplevel,
|
||||
int width, height;
|
||||
GdkGeometry geometry;
|
||||
GdkSurfaceHints mask;
|
||||
gboolean maximize;
|
||||
|
||||
gdk_broadway_surface_unminimize (surface);
|
||||
|
||||
@@ -1577,14 +1584,23 @@ gdk_broadway_toplevel_present (GdkToplevel *toplevel,
|
||||
gdk_surface_constrain_size (&geometry, mask, width, height, &width, &height);
|
||||
gdk_broadway_surface_toplevel_resize (surface, width, height);
|
||||
|
||||
if (gdk_toplevel_layout_get_maximized (layout))
|
||||
gdk_broadway_surface_maximize (surface);
|
||||
else
|
||||
gdk_broadway_surface_unmaximize (surface);
|
||||
if (gdk_toplevel_layout_get_maximized (layout, &maximize))
|
||||
{
|
||||
if (maximize)
|
||||
gdk_broadway_surface_maximize (surface);
|
||||
else
|
||||
gdk_broadway_surface_unmaximize (surface);
|
||||
}
|
||||
|
||||
if (size.shadow.is_valid)
|
||||
{
|
||||
impl->shadow_left = size.shadow.left;
|
||||
impl->shadow_right = size.shadow.right;
|
||||
impl->shadow_top = size.shadow.top;
|
||||
impl->shadow_bottom = size.shadow.bottom;
|
||||
}
|
||||
|
||||
show_surface (surface);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -64,6 +64,11 @@ struct _GdkBroadwaySurface
|
||||
|
||||
int root_x;
|
||||
int root_y;
|
||||
|
||||
int shadow_left;
|
||||
int shadow_right;
|
||||
int shadow_top;
|
||||
int shadow_bottom;
|
||||
};
|
||||
|
||||
struct _GdkBroadwaySurfaceClass
|
||||
|
@@ -59,17 +59,25 @@ libgdk_broadway = static_library('gdk-broadway',
|
||||
'-DGTK_COMPILATION',
|
||||
'-DG_LOG_DOMAIN="Gdk"',
|
||||
] + common_cflags,
|
||||
link_args: common_ldflags,
|
||||
dependencies: [gdk_deps, gdk_broadway_deps])
|
||||
dependencies: [gdk_deps, gdk_broadway_deps],
|
||||
)
|
||||
|
||||
# gtk4-broadwayd
|
||||
|
||||
broadwayd_syslib = os_win32 ? find_library('ws2_32') : shmlib
|
||||
|
||||
executable('gtk4-broadwayd',
|
||||
clienthtml_h, broadwayjs_h, gdkconfig, gdkenum_h,
|
||||
'broadwayd.c', 'broadway-server.c', 'broadway-output.c',
|
||||
sources: [
|
||||
clienthtml_h,
|
||||
broadwayjs_h,
|
||||
gdkconfig,
|
||||
gdkenum_h,
|
||||
'broadwayd.c',
|
||||
'broadway-server.c',
|
||||
'broadway-output.c',
|
||||
],
|
||||
include_directories: [confinc, gdkinc, include_directories('.')],
|
||||
c_args: ['-DGTK_COMPILATION', '-DG_LOG_DOMAIN="Gdk"', ],
|
||||
dependencies : [broadwayd_syslib, gdk_deps],
|
||||
install : true)
|
||||
dependencies: [ broadwayd_syslib, gdk_deps ],
|
||||
install: true,
|
||||
)
|
||||
|
@@ -15,9 +15,6 @@ gboolean gdk_device_grab_info (GdkDisplay *display,
|
||||
|
||||
void gdk_pre_parse (void);
|
||||
|
||||
void gdk_surface_freeze_toplevel_updates (GdkSurface *surface);
|
||||
void gdk_surface_thaw_toplevel_updates (GdkSurface *surface);
|
||||
|
||||
gboolean gdk_surface_supports_edge_constraints (GdkSurface *surface);
|
||||
|
||||
void gdk_display_set_double_click_time (GdkDisplay *display,
|
||||
@@ -45,6 +42,7 @@ typedef struct
|
||||
const char *key;
|
||||
guint value;
|
||||
const char *help;
|
||||
gboolean always_enabled;
|
||||
} GdkDebugKey;
|
||||
|
||||
guint gdk_parse_debug_var (const char *variable,
|
||||
|
43
gdk/gdk.c
43
gdk/gdk.c
@@ -128,7 +128,6 @@ static int gdk_initialized = 0; /* 1 if the library is initi
|
||||
* 0 otherwise.
|
||||
*/
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "misc", GDK_DEBUG_MISC, "Miscellaneous information" },
|
||||
{ "events", GDK_DEBUG_EVENTS, "Information about events" },
|
||||
@@ -152,7 +151,6 @@ static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" },
|
||||
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings" },
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef G_HAS_CONSTRUCTORS
|
||||
@@ -212,6 +210,13 @@ gdk_parse_debug_var (const char *variable,
|
||||
const char *q;
|
||||
gboolean invert;
|
||||
gboolean help;
|
||||
gboolean debug_enabled;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
debug_enabled = TRUE;
|
||||
#else
|
||||
debug_enabled = FALSE;
|
||||
#endif
|
||||
|
||||
string = g_getenv (variable);
|
||||
if (string == NULL)
|
||||
@@ -237,21 +242,25 @@ gdk_parse_debug_var (const char *variable,
|
||||
}
|
||||
else
|
||||
{
|
||||
char *val = g_strndup (p, q - p);
|
||||
for (i = 0; i < nkeys; i++)
|
||||
{
|
||||
if (strlen (keys[i].key) == q - p &&
|
||||
g_ascii_strncasecmp (keys[i].key, p, q - p) == 0)
|
||||
{
|
||||
if (!debug_enabled && !keys[i].always_enabled)
|
||||
{
|
||||
fprintf (stderr, "\"%s\" is only available when building GTK with G_ENABLE_DEBUG. See %s=help\n",
|
||||
val, variable);
|
||||
break;
|
||||
}
|
||||
result |= keys[i].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == nkeys)
|
||||
{
|
||||
char *val = g_strndup (p, q - p);
|
||||
fprintf (stderr, "Unrecognized value \"%s\". Try %s=help\n", val, variable);
|
||||
g_free (val);
|
||||
}
|
||||
fprintf (stderr, "Unrecognized value \"%s\". Try %s=help\n", val, variable);
|
||||
g_free (val);
|
||||
}
|
||||
|
||||
p = q;
|
||||
@@ -267,11 +276,17 @@ gdk_parse_debug_var (const char *variable,
|
||||
max_width += 4;
|
||||
|
||||
fprintf (stderr, "Supported %s values:\n", variable);
|
||||
for (i = 0; i < nkeys; i++)
|
||||
fprintf (stderr, " %s%*s%s\n", keys[i].key, (int)(max_width - strlen (keys[i].key)), " ", keys[i].help);
|
||||
for (i = 0; i < nkeys; i++) {
|
||||
fprintf (stderr, " %s%*s%s", keys[i].key, (int)(max_width - strlen (keys[i].key)), " ", keys[i].help);
|
||||
if (!debug_enabled && !keys[i].always_enabled)
|
||||
fprintf (stderr, " [unavailable]");
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
fprintf (stderr, " %s%*s%s\n", "all", max_width - 3, " ", "Enable all values");
|
||||
fprintf (stderr, " %s%*s%s\n", "help", max_width - 4, " ", "Print this help");
|
||||
fprintf (stderr, "\nMultiple values can be given, separated by : or space.\n");
|
||||
if (!debug_enabled)
|
||||
fprintf (stderr, "Values marked as [unavailable] are only accessible if GTK is built with G_ENABLE_DEBUG.\n");
|
||||
}
|
||||
|
||||
if (invert)
|
||||
@@ -279,7 +294,10 @@ gdk_parse_debug_var (const char *variable,
|
||||
guint all_flags = 0;
|
||||
|
||||
for (i = 0; i < nkeys; i++)
|
||||
all_flags |= keys[i].value;
|
||||
{
|
||||
if (debug_enabled || keys[i].always_enabled)
|
||||
all_flags |= keys[i].value;
|
||||
}
|
||||
|
||||
result = all_flags & (~result);
|
||||
}
|
||||
@@ -294,14 +312,9 @@ gdk_pre_parse (void)
|
||||
|
||||
gdk_ensure_resources ();
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
_gdk_debug_flags = gdk_parse_debug_var ("GDK_DEBUG",
|
||||
gdk_debug_keys,
|
||||
G_N_ELEMENTS (gdk_debug_keys));
|
||||
#else
|
||||
if (g_getenv ("GDK_DEBUG"))
|
||||
g_warning ("GDK_DEBUG set but ignored because GTK isn't built with G_ENABLE_DEBUG");
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
#ifndef G_HAS_CONSTRUCTORS
|
||||
stash_desktop_startup_notification_id ();
|
||||
|
@@ -182,6 +182,7 @@ G_GNUC_UNUSED static inline void
|
||||
gdk_array(splice) (GdkArray *self,
|
||||
gsize pos,
|
||||
gsize removed,
|
||||
gboolean stolen,
|
||||
_T_ *additions,
|
||||
gsize added)
|
||||
{
|
||||
@@ -192,8 +193,9 @@ gdk_array(splice) (GdkArray *self,
|
||||
g_assert (pos + removed <= size);
|
||||
remaining = size - pos - removed;
|
||||
|
||||
gdk_array(free_elements) (gdk_array(index) (self, pos),
|
||||
gdk_array(index) (self, pos + removed));
|
||||
if (!stolen)
|
||||
gdk_array(free_elements) (gdk_array(index) (self, pos),
|
||||
gdk_array(index) (self, pos + removed));
|
||||
|
||||
gdk_array(reserve) (self, size - removed + added);
|
||||
|
||||
@@ -225,9 +227,9 @@ gdk_array(set_size) (GdkArray *self,
|
||||
{
|
||||
gsize old_size = gdk_array(get_size) (self);
|
||||
if (new_size > old_size)
|
||||
gdk_array(splice) (self, old_size, 0, NULL, new_size - old_size);
|
||||
gdk_array(splice) (self, old_size, 0, FALSE, NULL, new_size - old_size);
|
||||
else
|
||||
gdk_array(splice) (self, new_size, old_size - new_size, NULL, 0);
|
||||
gdk_array(splice) (self, new_size, old_size - new_size, FALSE, NULL, 0);
|
||||
}
|
||||
|
||||
G_GNUC_UNUSED static void
|
||||
@@ -241,6 +243,7 @@ gdk_array(append) (GdkArray *self,
|
||||
gdk_array(splice) (self,
|
||||
gdk_array(get_size) (self),
|
||||
0,
|
||||
FALSE,
|
||||
#ifdef GDK_ARRAY_BY_VALUE
|
||||
value,
|
||||
#else
|
||||
|
@@ -49,6 +49,12 @@ struct _GdkContentProvider
|
||||
GObject parent;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkContentProviderClass:
|
||||
* @content_changed: Signal class closure for #GdkContentProvider::content-changed
|
||||
*
|
||||
* Class structure for #GdkContentProvider.
|
||||
*/
|
||||
struct _GdkContentProviderClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
@@ -56,6 +62,7 @@ struct _GdkContentProviderClass
|
||||
/* signals */
|
||||
void (* content_changed) (GdkContentProvider *provider);
|
||||
|
||||
/*< private >*/
|
||||
/* vfuncs */
|
||||
void (* attach_clipboard) (GdkContentProvider *provider,
|
||||
GdkClipboard *clipboard);
|
||||
|
@@ -66,7 +66,7 @@ typedef enum
|
||||
* GdkTimeCoord:
|
||||
* @time: The timestamp for this event.
|
||||
* @flags: Flags indicating what axes are present
|
||||
* @axes: axis values
|
||||
* @axes: (array fixed-size=12): axis values
|
||||
*
|
||||
* A #GdkTimeCoord stores a single event in a motion history.
|
||||
*/
|
||||
|
@@ -54,12 +54,11 @@ typedef enum
|
||||
GDK_PROPERTY_CHANGE_MASK = 1 << 16,
|
||||
GDK_PROXIMITY_IN_MASK = 1 << 18,
|
||||
GDK_PROXIMITY_OUT_MASK = 1 << 19,
|
||||
GDK_SUBSTRUCTURE_MASK = 1 << 20,
|
||||
GDK_SCROLL_MASK = 1 << 21,
|
||||
GDK_TOUCH_MASK = 1 << 22,
|
||||
GDK_SMOOTH_SCROLL_MASK = 1 << 23,
|
||||
GDK_TOUCHPAD_GESTURE_MASK = 1 << 24,
|
||||
GDK_TABLET_PAD_MASK = 1 << 25,
|
||||
GDK_SCROLL_MASK = 1 << 20,
|
||||
GDK_TOUCH_MASK = 1 << 21,
|
||||
GDK_SMOOTH_SCROLL_MASK = 1 << 22,
|
||||
GDK_TOUCHPAD_GESTURE_MASK = 1 << 23,
|
||||
GDK_TABLET_PAD_MASK = 1 << 24,
|
||||
GDK_ALL_EVENTS_MASK = 0x3FFFFFE
|
||||
} GdkEventMask;
|
||||
|
||||
|
@@ -32,6 +32,11 @@ G_BEGIN_DECLS
|
||||
#define GDK_DEVICE_TOOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_TOOL, GdkDeviceTool))
|
||||
#define GDK_IS_DEVICE_TOOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_TOOL))
|
||||
|
||||
/**
|
||||
* GdkDeviceTool:
|
||||
*
|
||||
* A physical tool associated to a #GdkDevice.
|
||||
*/
|
||||
typedef struct _GdkDeviceTool GdkDeviceTool;
|
||||
|
||||
/**
|
||||
|
@@ -30,6 +30,12 @@
|
||||
* during a DND operation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* GdkDragSurfaceInterface:
|
||||
*
|
||||
* The #GdkDragSurfaceInterface implementation is private to GDK.
|
||||
*/
|
||||
|
||||
G_DEFINE_INTERFACE (GdkDragSurface, gdk_drag_surface, GDK_TYPE_SURFACE)
|
||||
|
||||
static gboolean
|
||||
|
159
gdk/gdkevents.c
159
gdk/gdkevents.c
@@ -430,7 +430,6 @@ static void
|
||||
gdk_event_init_types_once (void)
|
||||
{
|
||||
g_type_ensure (GDK_TYPE_BUTTON_EVENT);
|
||||
g_type_ensure (GDK_TYPE_CONFIGURE_EVENT);
|
||||
g_type_ensure (GDK_TYPE_CROSSING_EVENT);
|
||||
g_type_ensure (GDK_TYPE_DELETE_EVENT);
|
||||
g_type_ensure (GDK_TYPE_DND_EVENT);
|
||||
@@ -1139,6 +1138,22 @@ gdk_event_get_axes (GdkEvent *event,
|
||||
return GDK_EVENT_GET_CLASS (event)->get_axes (event, axes, n_axes);
|
||||
}
|
||||
|
||||
double *
|
||||
gdk_event_dup_axes (GdkEvent *event)
|
||||
{
|
||||
double *axes;
|
||||
guint n_axes;
|
||||
|
||||
if (gdk_event_get_axes (event, &axes, &n_axes))
|
||||
{
|
||||
double *axes_copy = g_memdup (axes, n_axes * sizeof (double));
|
||||
|
||||
return axes_copy;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_get_event_type:
|
||||
* @event: a #GdkEvent
|
||||
@@ -1315,6 +1330,12 @@ gdk_event_get_position (GdkEvent *event,
|
||||
|
||||
/* {{{ GdkButtonEvent */
|
||||
|
||||
/**
|
||||
* GdkButtonEvent:
|
||||
*
|
||||
* An event related to a button on a pointer device/
|
||||
*/
|
||||
|
||||
static void
|
||||
gdk_button_event_finalize (GdkEvent *event)
|
||||
{
|
||||
@@ -1439,6 +1460,12 @@ gdk_button_event_get_button (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkKeyEvent */
|
||||
|
||||
/**
|
||||
* GdkKeyEvent:
|
||||
*
|
||||
* An event related to a key-based device.
|
||||
*/
|
||||
|
||||
static GdkModifierType
|
||||
gdk_key_event_get_state (GdkEvent *event)
|
||||
{
|
||||
@@ -1818,77 +1845,13 @@ gdk_key_event_get_match (GdkEvent *event,
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ GdkConfigureEvent */
|
||||
|
||||
static gboolean
|
||||
gdk_configure_event_get_position (GdkEvent *event,
|
||||
double *x,
|
||||
double *y)
|
||||
{
|
||||
GdkConfigureEvent *self = (GdkConfigureEvent *) event;
|
||||
|
||||
*x = self->x;
|
||||
*y = self->y;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static const GdkEventTypeInfo gdk_configure_event_info = {
|
||||
sizeof (GdkConfigureEvent),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
gdk_configure_event_get_position,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
GDK_DEFINE_EVENT_TYPE (GdkConfigureEvent, gdk_configure_event,
|
||||
&gdk_configure_event_info,
|
||||
GDK_EVENT_TYPE_SLOT (GDK_CONFIGURE))
|
||||
|
||||
GdkEvent *
|
||||
gdk_configure_event_new (GdkSurface *surface,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GdkConfigureEvent *self;
|
||||
|
||||
g_return_val_if_fail (width >= 0 && height >= 0, NULL);
|
||||
|
||||
self = gdk_event_alloc (GDK_CONFIGURE, surface, NULL, GDK_CURRENT_TIME);
|
||||
self->width = width;
|
||||
self->height = height;
|
||||
|
||||
return (GdkEvent *) self;
|
||||
}
|
||||
/* {{{ GdkTouchEvent */
|
||||
|
||||
/**
|
||||
* gdk_configure_event_get_size:
|
||||
* @event: (type GdkConfigureEvent): a configure event
|
||||
* @width: (out): return location for surface width
|
||||
* @height: (out): return location for surface height
|
||||
* GdkTouchEvent:
|
||||
*
|
||||
* Extracts the surface size from a configure event.
|
||||
* An event related to a touch-based device.
|
||||
*/
|
||||
void
|
||||
gdk_configure_event_get_size (GdkEvent *event,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
GdkConfigureEvent *self = (GdkConfigureEvent *) event;
|
||||
|
||||
g_return_if_fail (GDK_IS_EVENT (event));
|
||||
g_return_if_fail (GDK_IS_EVENT_TYPE (event, GDK_CONFIGURE));
|
||||
|
||||
*width = self->width;
|
||||
*height = self->height;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ GdkTouchEvent */
|
||||
|
||||
static void
|
||||
gdk_touch_event_finalize (GdkEvent *event)
|
||||
@@ -2021,6 +1984,12 @@ gdk_touch_event_get_emulating_pointer (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkCrossingEvent */
|
||||
|
||||
/**
|
||||
* GdkCrossingEvent:
|
||||
*
|
||||
* An event caused by a pointing device moving between surfaces.
|
||||
*/
|
||||
|
||||
static void
|
||||
gdk_crossing_event_finalize (GdkEvent *event)
|
||||
{
|
||||
@@ -2159,6 +2128,12 @@ gdk_crossing_event_get_detail (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkDeleteEvent */
|
||||
|
||||
/**
|
||||
* GdkDeleteEvent:
|
||||
*
|
||||
* An event related to closing a top-level surface.
|
||||
*/
|
||||
|
||||
static const GdkEventTypeInfo gdk_delete_event_info = {
|
||||
sizeof (GdkDeleteEvent),
|
||||
NULL,
|
||||
@@ -2184,6 +2159,12 @@ gdk_delete_event_new (GdkSurface *surface)
|
||||
|
||||
/* {{{ GdkFocusEvent */
|
||||
|
||||
/**
|
||||
* GdkFocusEvent:
|
||||
*
|
||||
* An event related to a focus change.
|
||||
*/
|
||||
|
||||
static const GdkEventTypeInfo gdk_focus_event_info = {
|
||||
sizeof (GdkFocusEvent),
|
||||
NULL,
|
||||
@@ -2235,6 +2216,12 @@ gdk_focus_event_get_in (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkScrollEvent */
|
||||
|
||||
/**
|
||||
* GdkScrollEvent:
|
||||
*
|
||||
* An event related to a scrolling motion.
|
||||
*/
|
||||
|
||||
static void
|
||||
gdk_scroll_event_finalize (GdkEvent *event)
|
||||
{
|
||||
@@ -2392,6 +2379,12 @@ gdk_scroll_event_is_stop (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkTouchpadEvent */
|
||||
|
||||
/**
|
||||
* GdkTouchpadEvent:
|
||||
*
|
||||
* An event related to a touchpad device.
|
||||
*/
|
||||
|
||||
static GdkModifierType
|
||||
gdk_touchpad_event_get_state (GdkEvent *event)
|
||||
{
|
||||
@@ -2588,6 +2581,12 @@ gdk_touchpad_event_get_pinch_scale (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkPadEvent */
|
||||
|
||||
/**
|
||||
* GdkPadEvent:
|
||||
*
|
||||
* An event related to a pad-based device.
|
||||
*/
|
||||
|
||||
static const GdkEventTypeInfo gdk_pad_event_info = {
|
||||
sizeof (GdkPadEvent),
|
||||
NULL,
|
||||
@@ -2756,6 +2755,12 @@ gdk_pad_event_get_group_mode (GdkEvent *event,
|
||||
|
||||
/* {{{ GdkMotionEvent */
|
||||
|
||||
/**
|
||||
* GdkMotionEvent:
|
||||
*
|
||||
* An event related to a pointer or touch device motion.
|
||||
*/
|
||||
|
||||
static void
|
||||
gdk_motion_event_finalize (GdkEvent *event)
|
||||
{
|
||||
@@ -2910,6 +2915,12 @@ gdk_event_get_history (GdkEvent *event,
|
||||
|
||||
/* {{{ GdkProximityEvent */
|
||||
|
||||
/**
|
||||
* GdkProximityEvent:
|
||||
*
|
||||
* An event related to the proximity of a tool to a device.
|
||||
*/
|
||||
|
||||
static void
|
||||
gdk_proximity_event_finalize (GdkEvent *event)
|
||||
{
|
||||
@@ -2967,6 +2978,12 @@ gdk_proximity_event_new (GdkEventType type,
|
||||
|
||||
/* {{{ GdkDNDEvent */
|
||||
|
||||
/**
|
||||
* GdkDNDEvent:
|
||||
*
|
||||
* An event related to drag and drop operations.
|
||||
*/
|
||||
|
||||
static void
|
||||
gdk_dnd_event_finalize (GdkEvent *event)
|
||||
{
|
||||
@@ -3067,6 +3084,12 @@ gdk_dnd_event_get_drop (GdkEvent *event)
|
||||
|
||||
/* {{{ GdkGrabBrokenEvent */
|
||||
|
||||
/**
|
||||
* GdkGrabBrokenEvent:
|
||||
*
|
||||
* An event related to a broken windowing system grab.
|
||||
*/
|
||||
|
||||
static const GdkEventTypeInfo gdk_grab_broken_event_info = {
|
||||
sizeof (GdkGrabBrokenEvent),
|
||||
NULL,
|
||||
|
@@ -106,7 +106,6 @@ typedef struct _GdkEventSequence GdkEventSequence;
|
||||
typedef struct _GdkEvent GdkEvent;
|
||||
|
||||
#define GDK_TYPE_BUTTON_EVENT (gdk_button_event_get_type())
|
||||
#define GDK_TYPE_CONFIGURE_EVENT (gdk_configure_event_get_type())
|
||||
#define GDK_TYPE_CROSSING_EVENT (gdk_crossing_event_get_type())
|
||||
#define GDK_TYPE_DELETE_EVENT (gdk_delete_event_get_type())
|
||||
#define GDK_TYPE_DND_EVENT (gdk_dnd_event_get_type())
|
||||
@@ -121,7 +120,6 @@ typedef struct _GdkEvent GdkEvent;
|
||||
#define GDK_TYPE_TOUCHPAD_EVENT (gdk_touchpad_event_get_type())
|
||||
|
||||
typedef struct _GdkButtonEvent GdkButtonEvent;
|
||||
typedef struct _GdkConfigureEvent GdkConfigureEvent;
|
||||
typedef struct _GdkCrossingEvent GdkCrossingEvent;
|
||||
typedef struct _GdkDeleteEvent GdkDeleteEvent;
|
||||
typedef struct _GdkDNDEvent GdkDNDEvent;
|
||||
@@ -148,7 +146,6 @@ typedef struct _GdkTouchpadEvent GdkTouchpadEvent;
|
||||
* @GDK_ENTER_NOTIFY: the pointer has entered the surface.
|
||||
* @GDK_LEAVE_NOTIFY: the pointer has left the surface.
|
||||
* @GDK_FOCUS_CHANGE: the keyboard focus has entered or left the surface.
|
||||
* @GDK_CONFIGURE: the size of the surface has changed.
|
||||
* @GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
||||
* surface (e.g. a touchscreen or graphics tablet).
|
||||
* @GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
|
||||
@@ -188,7 +185,6 @@ typedef enum
|
||||
GDK_ENTER_NOTIFY,
|
||||
GDK_LEAVE_NOTIFY,
|
||||
GDK_FOCUS_CHANGE,
|
||||
GDK_CONFIGURE,
|
||||
GDK_PROXIMITY_IN,
|
||||
GDK_PROXIMITY_OUT,
|
||||
GDK_DRAG_ENTER,
|
||||
@@ -429,12 +425,6 @@ GdkNotifyType gdk_crossing_event_get_detail (GdkEvent *event);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_crossing_event_get_focus (GdkEvent *event);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_configure_event_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_configure_event_get_size (GdkEvent *event,
|
||||
int *width,
|
||||
int *height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_touchpad_event_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkTouchpadGesturePhase
|
||||
|
@@ -322,25 +322,6 @@ struct _GdkFocusEvent
|
||||
gboolean focus_in;
|
||||
};
|
||||
|
||||
/*
|
||||
* GdkConfigureEvent:
|
||||
* @x: the new x coordinate of the surface, relative to its parent.
|
||||
* @y: the new y coordinate of the surface, relative to its parent.
|
||||
* @width: the new width of the surface.
|
||||
* @height: the new height of the surface.
|
||||
*
|
||||
* Generated when a surface size or position has changed.
|
||||
*/
|
||||
struct _GdkConfigureEvent
|
||||
{
|
||||
GdkEvent parent_instance;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
/*
|
||||
* GdkProximityEvent:
|
||||
* @tool: the #GdkDeviceTool associated to the event
|
||||
@@ -495,10 +476,6 @@ GdkEvent * gdk_focus_event_new (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
gboolean focus_in);
|
||||
|
||||
GdkEvent * gdk_configure_event_new (GdkSurface *surface,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
GdkEvent * gdk_delete_event_new (GdkSurface *surface);
|
||||
|
||||
GdkEvent * gdk_scroll_event_new (GdkSurface *surface,
|
||||
@@ -626,6 +603,8 @@ void _gdk_event_queue_handle_motion_compression (GdkDisplay *display);
|
||||
void gdk_event_queue_handle_scroll_compression (GdkDisplay *display);
|
||||
void _gdk_event_queue_flush (GdkDisplay *display);
|
||||
|
||||
double * gdk_event_dup_axes (GdkEvent *event);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -50,7 +50,7 @@ typedef struct _GdkFrameClockClass GdkFrameClockClass;
|
||||
* @GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS: corresponds to GdkFrameClock::flush-events. Should not be handled by applications.
|
||||
* @GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT: corresponds to GdkFrameClock::before-paint. Should not be handled by applications.
|
||||
* @GDK_FRAME_CLOCK_PHASE_UPDATE: corresponds to GdkFrameClock::update.
|
||||
* @GDK_FRAME_CLOCK_PHASE_LAYOUT: corresponds to GdkFrameClock::layout.
|
||||
* @GDK_FRAME_CLOCK_PHASE_LAYOUT: corresponds to GdkFrameClock::layout. Should not be handled by applicatiosn.
|
||||
* @GDK_FRAME_CLOCK_PHASE_PAINT: corresponds to GdkFrameClock::paint.
|
||||
* @GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS: corresponds to GdkFrameClock::resume-events. Should not be handled by applications.
|
||||
* @GDK_FRAME_CLOCK_PHASE_AFTER_PAINT: corresponds to GdkFrameClock::after-paint. Should not be handled by applications.
|
||||
|
@@ -33,6 +33,11 @@ G_BEGIN_DECLS
|
||||
#define GDK_GL_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_TEXTURE, GdkGLTexture))
|
||||
#define GDK_IS_GL_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_TEXTURE))
|
||||
|
||||
/**
|
||||
* GdkGLTexture:
|
||||
*
|
||||
* A #GdkTexture representing a GL texture object.
|
||||
*/
|
||||
typedef struct _GdkGLTexture GdkGLTexture;
|
||||
typedef struct _GdkGLTextureClass GdkGLTextureClass;
|
||||
|
||||
|
@@ -94,6 +94,11 @@ typedef enum {
|
||||
#define GDK_MEMORY_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_MEMORY_TEXTURE, GdkMemoryTexture))
|
||||
#define GDK_IS_MEMORY_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_MEMORY_TEXTURE))
|
||||
|
||||
/**
|
||||
* GdkMemoryTexture:
|
||||
*
|
||||
* A #GdkTexture representing image data in memory.
|
||||
*/
|
||||
typedef struct _GdkMemoryTexture GdkMemoryTexture;
|
||||
typedef struct _GdkMemoryTextureClass GdkMemoryTextureClass;
|
||||
|
||||
|
@@ -31,6 +31,11 @@ G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_PAINTABLE (gdk_paintable_get_type ())
|
||||
|
||||
/**
|
||||
* GdkPaintable:
|
||||
*
|
||||
* Interface for paintable objects.
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
G_DECLARE_INTERFACE (GdkPaintable, gdk_paintable, GDK, PAINTABLE, GObject)
|
||||
|
||||
@@ -74,11 +79,13 @@ typedef enum {
|
||||
* this function should return the aspect ratio computed from those.
|
||||
*
|
||||
* The list of functions that can be implemented for the #GdkPaintable interface.
|
||||
* Note that apart from the first function, no function is mandatory to implement,
|
||||
* though it is a good idea to implement #GdkPaintableInterface.get_current_image()
|
||||
* for non-static paintables and #GdkPaintableInterface.get_flags() if the image
|
||||
* is not dynamic as the default implementation returns no flags and that will
|
||||
* make the implementation likely quite slow.
|
||||
*
|
||||
* Note that apart from the #GdkPaintableInterface.snapshot() function, no virtual
|
||||
* function of this interface is mandatory to implement, though it is a good idea
|
||||
* to implement #GdkPaintableInterface.get_current_image() for non-static paintables
|
||||
* and #GdkPaintableInterface.get_flags() if the image is not dynamic as the default
|
||||
* implementation returns no flags and that will make the implementation likely
|
||||
* quite slow.
|
||||
*/
|
||||
struct _GdkPaintableInterface
|
||||
{
|
||||
|
@@ -202,6 +202,7 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
if (cairo_surface_status (surface) || dest == NULL)
|
||||
{
|
||||
cairo_surface_destroy (surface);
|
||||
g_clear_object (&dest);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user