Compare commits
587 Commits
cube-spin
...
event-cont
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e07f3d6e64 | ||
|
|
b844778b5b | ||
|
|
fca0f649a0 | ||
|
|
da034390f2 | ||
|
|
19227d9789 | ||
|
|
8915d60900 | ||
|
|
ed52c029a0 | ||
|
|
7b1201cd4d | ||
|
|
3f940715e4 | ||
|
|
f6225901e8 | ||
|
|
eff4b6377d | ||
|
|
a18647af0e | ||
|
|
c7df0c907a | ||
|
|
b74407a343 | ||
|
|
cd5c39834d | ||
|
|
574a25b09c | ||
|
|
6e0b13b81f | ||
|
|
bea8025fb5 | ||
|
|
965d0e04d1 | ||
|
|
d7c54920ee | ||
|
|
33a8108f19 | ||
|
|
78d254370c | ||
|
|
377ec33069 | ||
|
|
2952ba07e1 | ||
|
|
62b7ea7611 | ||
|
|
c9eca55c5e | ||
|
|
435bc269e9 | ||
|
|
0d2a7f876b | ||
|
|
737400ddbc | ||
|
|
134e159bc9 | ||
|
|
6f0b47681b | ||
|
|
d53981fdbb | ||
|
|
e09beee62a | ||
|
|
724ec3ca92 | ||
|
|
3ce6a710a3 | ||
|
|
e41596d6a1 | ||
|
|
0fa4d54316 | ||
|
|
e7cbb7a76c | ||
|
|
b2a23a9a90 | ||
|
|
6878c2bae0 | ||
|
|
5b8f1aa2ee | ||
|
|
6b4a82224c | ||
|
|
1f30b7742b | ||
|
|
54e7a94d70 | ||
|
|
f1919c706f | ||
|
|
26b17473aa | ||
|
|
99eee5cea9 | ||
|
|
074a0014c1 | ||
|
|
091cac00b2 | ||
|
|
175e3d751d | ||
|
|
83e9361005 | ||
|
|
17bb1248b5 | ||
|
|
8211e79be9 | ||
|
|
d5282862e5 | ||
|
|
26b6d18563 | ||
|
|
31fb5cc2d4 | ||
|
|
90301c6813 | ||
|
|
ccdf50aafd | ||
|
|
af5c80248d | ||
|
|
1d81a58cf1 | ||
|
|
09cec2e6a1 | ||
|
|
efed2641f4 | ||
|
|
97a5ca74d2 | ||
|
|
5b5b215dea | ||
|
|
7a06859f38 | ||
|
|
24fa104b61 | ||
|
|
89861faa04 | ||
|
|
5fd94e2027 | ||
|
|
1f4d02740e | ||
|
|
0023b9036b | ||
|
|
89d1f8c3ca | ||
|
|
7d9364655d | ||
|
|
86d2fcef16 | ||
|
|
5f8543fe81 | ||
|
|
aae7816557 | ||
|
|
6fbf13965c | ||
|
|
484e330e4a | ||
|
|
f27ecde1e2 | ||
|
|
c06d1a69ae | ||
|
|
cf9deb7cf5 | ||
|
|
40beb69487 | ||
|
|
f1cadee196 | ||
|
|
f6594ff073 | ||
|
|
478fdaa632 | ||
|
|
6c472ed2b8 | ||
|
|
30942c4e3d | ||
|
|
bf7d1e7b5a | ||
|
|
92e21c3f1c | ||
|
|
8880d27460 | ||
|
|
59d50be737 | ||
|
|
6d73443131 | ||
|
|
fe3796ed5b | ||
|
|
89f7b974f2 | ||
|
|
0ae958d45b | ||
|
|
3d1fdf77dc | ||
|
|
0ae71cacb4 | ||
|
|
218d635ca2 | ||
|
|
7553d0c471 | ||
|
|
f4880f5df5 | ||
|
|
3ccdad76de | ||
|
|
e464c08545 | ||
|
|
56e95ddfc8 | ||
|
|
65052a5d6c | ||
|
|
1364eb2f62 | ||
|
|
aa8ada3fed | ||
|
|
3643a9fe86 | ||
|
|
25f4bb2e17 | ||
|
|
3b62d9c027 | ||
|
|
c92938b378 | ||
|
|
c98313016e | ||
|
|
e43839114d | ||
|
|
b6c1786165 | ||
|
|
3a40555202 | ||
|
|
ff604e1906 | ||
|
|
34974a8a66 | ||
|
|
7c15daf99e | ||
|
|
b9467a4dc7 | ||
|
|
5a1c37a8c8 | ||
|
|
b75bc8aa64 | ||
|
|
ed4c08d9b3 | ||
|
|
929cdd9259 | ||
|
|
78049f452a | ||
|
|
cf2ef4863b | ||
|
|
2bd348558e | ||
|
|
0f6d83bb5f | ||
|
|
7e20232607 | ||
|
|
dcc55e3a73 | ||
|
|
59fd48cee0 | ||
|
|
c848b9014b | ||
|
|
1e16cb088a | ||
|
|
f4cf43359d | ||
|
|
6c8a5f5e2f | ||
|
|
da64d687d1 | ||
|
|
aab803b7ae | ||
|
|
936aba884a | ||
|
|
e1200230c4 | ||
|
|
d3ad816d63 | ||
|
|
eea1388cf4 | ||
|
|
f3747d1776 | ||
|
|
6277f2fccc | ||
|
|
931b0b3752 | ||
|
|
6f3e608331 | ||
|
|
cc4b3798e5 | ||
|
|
8634a51aa5 | ||
|
|
7420f9c34a | ||
|
|
1a7c280ebb | ||
|
|
4bb6e70d01 | ||
|
|
2bd9b42479 | ||
|
|
b8127670df | ||
|
|
3a1ef7aa2c | ||
|
|
8dd26b6b8a | ||
|
|
0526775ff4 | ||
|
|
1ad406e15d | ||
|
|
249f6a85b3 | ||
|
|
32edf29c0a | ||
|
|
4f7171885f | ||
|
|
b1eedbeb58 | ||
|
|
a98f857a82 | ||
|
|
b9770fa752 | ||
|
|
52d4bcf1be | ||
|
|
fe3b5ba545 | ||
|
|
33f034d0d7 | ||
|
|
2516f1142d | ||
|
|
ec37e1e462 | ||
|
|
79180f62d7 | ||
|
|
5cd4ec510d | ||
|
|
ea95aea246 | ||
|
|
e13d242320 | ||
|
|
c21063e71e | ||
|
|
477ad2505b | ||
|
|
91bbe6ef95 | ||
|
|
34fcfb154a | ||
|
|
28815bc7e4 | ||
|
|
8eaa8aaaf8 | ||
|
|
491829a2b5 | ||
|
|
28be1c5d3a | ||
|
|
65ff19d149 | ||
|
|
3da6e83609 | ||
|
|
2a7e4ae7f6 | ||
|
|
cc878ec00f | ||
|
|
1f5649e1ce | ||
|
|
ca19b940ce | ||
|
|
3f70d20bb3 | ||
|
|
304e06541e | ||
|
|
c91371951a | ||
|
|
6e59c5c843 | ||
|
|
f5a8b79cfb | ||
|
|
c723893f09 | ||
|
|
a247529bc8 | ||
|
|
51b2759eb1 | ||
|
|
fed2db1493 | ||
|
|
77ff83cdd1 | ||
|
|
37fee8c52f | ||
|
|
08c84bc830 | ||
|
|
9b6f822f15 | ||
|
|
70fb29e81a | ||
|
|
0e26e95b00 | ||
|
|
ba1c5cf43f | ||
|
|
f3821031e0 | ||
|
|
e37f4d0ea6 | ||
|
|
b26087845d | ||
|
|
891b343197 | ||
|
|
8727b0708e | ||
|
|
1932a50d36 | ||
|
|
5a5da91785 | ||
|
|
de2e0f451f | ||
|
|
8400d8e75d | ||
|
|
50eb11a2a0 | ||
|
|
e8f898508a | ||
|
|
638a3c142c | ||
|
|
ecdad20827 | ||
|
|
5cd8e0f7f1 | ||
|
|
83696639a7 | ||
|
|
1aa1610611 | ||
|
|
0c87b62251 | ||
|
|
69f12ed6a5 | ||
|
|
a8db330341 | ||
|
|
2681f7c7af | ||
|
|
836b5a217a | ||
|
|
802c426d89 | ||
|
|
7c3eadf169 | ||
|
|
6c6fd13034 | ||
|
|
4ce217b1a5 | ||
|
|
2656f5b4eb | ||
|
|
bc8ecef605 | ||
|
|
33eb72a69b | ||
|
|
21be06310c | ||
|
|
6e27e79c8b | ||
|
|
e2d821fa59 | ||
|
|
8d001e3573 | ||
|
|
f6afa3d03f | ||
|
|
3286221870 | ||
|
|
f4e32f29e1 | ||
|
|
226e0eadf0 | ||
|
|
1f58e0ed6b | ||
|
|
1ee5c2cac4 | ||
|
|
97fb1c7757 | ||
|
|
dff9a5a195 | ||
|
|
b9fb2f0933 | ||
|
|
0791924bf7 | ||
|
|
90870194ff | ||
|
|
c593f86ac6 | ||
|
|
ad3ded7ba0 | ||
|
|
3f9b8f25d8 | ||
|
|
8ad38e5ae5 | ||
|
|
0cd2946676 | ||
|
|
5473d13470 | ||
|
|
31ccb7ca70 | ||
|
|
dba1926a42 | ||
|
|
b1b12a239f | ||
|
|
44ce36bef5 | ||
|
|
84d2150077 | ||
|
|
3f61360fa1 | ||
|
|
7fb9f21ee0 | ||
|
|
d733078766 | ||
|
|
cb6e48e22b | ||
|
|
f39ae35e4b | ||
|
|
daea92ea00 | ||
|
|
b98c7214ef | ||
|
|
3412d18dc2 | ||
|
|
3bc8ab91a2 | ||
|
|
f9d5869774 | ||
|
|
20ccb53c42 | ||
|
|
f9a589c7fd | ||
|
|
ddd044f283 | ||
|
|
3569348f9c | ||
|
|
9e8e3eb0ca | ||
|
|
87121998a2 | ||
|
|
68d6c51dbc | ||
|
|
4551aef081 | ||
|
|
0249bd4f8a | ||
|
|
b11c69b4a8 | ||
|
|
84351ba9e5 | ||
|
|
9a1da43890 | ||
|
|
c78ba42051 | ||
|
|
e0730bc118 | ||
|
|
7d9a8a6ec0 | ||
|
|
07e0411b98 | ||
|
|
b66e4cd64c | ||
|
|
254feda16b | ||
|
|
c6471ee874 | ||
|
|
261b8c7ee6 | ||
|
|
f58f0732c2 | ||
|
|
c5a4a26f06 | ||
|
|
faff08193a | ||
|
|
3046358d38 | ||
|
|
e81f033ece | ||
|
|
5c608fe070 | ||
|
|
a2db956492 | ||
|
|
8d51038cb1 | ||
|
|
86c86e0860 | ||
|
|
324f5472a2 | ||
|
|
c20360dd98 | ||
|
|
1b6252ebf0 | ||
|
|
b4c8ba4de7 | ||
|
|
ad34f731e9 | ||
|
|
198207f1ff | ||
|
|
6120f11ed3 | ||
|
|
0a440a804f | ||
|
|
117fc68195 | ||
|
|
f310609a66 | ||
|
|
8001c7d972 | ||
|
|
023b695422 | ||
|
|
ec6ce0707a | ||
|
|
f37573f8dc | ||
|
|
49f8b571b9 | ||
|
|
e1cd996617 | ||
|
|
24cc721bc6 | ||
|
|
d41580adfc | ||
|
|
3ab65b7da2 | ||
|
|
79238b0d8f | ||
|
|
2e0a56665a | ||
|
|
76826cfa2f | ||
|
|
37671d2bd0 | ||
|
|
04d24b7cd2 | ||
|
|
085d34cbb0 | ||
|
|
46143492a2 | ||
|
|
a475d72d47 | ||
|
|
a8f712b09a | ||
|
|
2fb202187c | ||
|
|
207c0b32b4 | ||
|
|
35f60dc918 | ||
|
|
1cd9396154 | ||
|
|
de73ac980f | ||
|
|
acaec5f186 | ||
|
|
c8589a9a2f | ||
|
|
a31e5f7a8c | ||
|
|
e0a01ba174 | ||
|
|
98e076b51e | ||
|
|
f3db19d694 | ||
|
|
607502ef43 | ||
|
|
acddc317da | ||
|
|
7f99c1e588 | ||
|
|
5f3e5a0406 | ||
|
|
23080d47b5 | ||
|
|
f0d2f99239 | ||
|
|
e7b9ecc99a | ||
|
|
dce8c11b07 | ||
|
|
7ccec19501 | ||
|
|
93b643c44d | ||
|
|
21616f6e2e | ||
|
|
8157004068 | ||
|
|
8d69bda27a | ||
|
|
dbdb81f411 | ||
|
|
28fbcf6abe | ||
|
|
1fd339c46f | ||
|
|
b830bdca37 | ||
|
|
45bc4ed321 | ||
|
|
3988847a05 | ||
|
|
9c862d7736 | ||
|
|
d99ae4b6c2 | ||
|
|
96f9cbcabf | ||
|
|
3597f7e8b1 | ||
|
|
38227dc972 | ||
|
|
aa50e92c65 | ||
|
|
753ad64cbc | ||
|
|
3fb44ae651 | ||
|
|
76fb80f46c | ||
|
|
684b6459f1 | ||
|
|
904a9d0c98 | ||
|
|
32e256e5ab | ||
|
|
d4d46e8125 | ||
|
|
661720ef8b | ||
|
|
013591d68d | ||
|
|
a938c14d11 | ||
|
|
d6cc10ea74 | ||
|
|
f25832455f | ||
|
|
42ea95c54e | ||
|
|
46e7b44ffa | ||
|
|
a27737b04e | ||
|
|
bd2d07e671 | ||
|
|
fde21b57cd | ||
|
|
637bd13f3f | ||
|
|
eadd90c22e | ||
|
|
279cb5717c | ||
|
|
b91fbfd5a0 | ||
|
|
88086ea91a | ||
|
|
0842d084dd | ||
|
|
838b25177f | ||
|
|
b39d0cec3c | ||
|
|
f0c72bdc3b | ||
|
|
427d216081 | ||
|
|
dc8b5f75a4 | ||
|
|
b6f2969872 | ||
|
|
6eed78e3de | ||
|
|
c4aa060118 | ||
|
|
0bf4c2420d | ||
|
|
aac2556762 | ||
|
|
f813bc1823 | ||
|
|
ca233ad9ae | ||
|
|
e6631a7b66 | ||
|
|
fbe0e32813 | ||
|
|
2594593de2 | ||
|
|
ef982b7d46 | ||
|
|
0432b850c5 | ||
|
|
1b362d1f01 | ||
|
|
7ce968f297 | ||
|
|
0e15b4a367 | ||
|
|
de0942b0b8 | ||
|
|
b804235aea | ||
|
|
6bc32a3d5d | ||
|
|
5e24454764 | ||
|
|
d9cf0ff684 | ||
|
|
5b78a3048f | ||
|
|
676ac380cd | ||
|
|
dce2c58799 | ||
|
|
f3d1666394 | ||
|
|
8af0782261 | ||
|
|
df18223487 | ||
|
|
b678d12c2d | ||
|
|
a0e6353667 | ||
|
|
bea7ccb41f | ||
|
|
9895f2bd3a | ||
|
|
721a12826d | ||
|
|
4b40cc27a9 | ||
|
|
c92e53622f | ||
|
|
c31185b419 | ||
|
|
5ff59c12b0 | ||
|
|
d3c0899000 | ||
|
|
32334b2e83 | ||
|
|
ea527812a0 | ||
|
|
01851e04fc | ||
|
|
299c53201d | ||
|
|
bfb5e6e72f | ||
|
|
1fab3d9e20 | ||
|
|
f950172731 | ||
|
|
9c9b4e6832 | ||
|
|
2deb0e7e1d | ||
|
|
6f6ea51290 | ||
|
|
11428fb869 | ||
|
|
d465523f65 | ||
|
|
14d97cf547 | ||
|
|
cb3d61bb0e | ||
|
|
f756c3b8a0 | ||
|
|
220c516691 | ||
|
|
ba07279c95 | ||
|
|
ef9dc43474 | ||
|
|
c6aa90f176 | ||
|
|
74352e0bee | ||
|
|
5c8a870510 | ||
|
|
7a29462ca6 | ||
|
|
c3c36d45e5 | ||
|
|
d89df8a980 | ||
|
|
7699b43ffe | ||
|
|
ea7a43beb4 | ||
|
|
70bf6d4b97 | ||
|
|
7cd9ea497b | ||
|
|
0a4a7b310d | ||
|
|
a26f400576 | ||
|
|
a97845c380 | ||
|
|
7f6213291d | ||
|
|
f184393f07 | ||
|
|
1f37600c4c | ||
|
|
08d8f2bb80 | ||
|
|
b14f0b8987 | ||
|
|
edbc99104f | ||
|
|
285293ac17 | ||
|
|
6f7d9f9613 | ||
|
|
fe822a0a24 | ||
|
|
69d4081ff8 | ||
|
|
c9d8ff21d2 | ||
|
|
824743a395 | ||
|
|
5d778175ee | ||
|
|
358ad227d5 | ||
|
|
9700543e02 | ||
|
|
ecc4c4f368 | ||
|
|
31b65e6721 | ||
|
|
cfcca335b1 | ||
|
|
3ea39210cd | ||
|
|
b79220ca19 | ||
|
|
faafd23225 | ||
|
|
62acb80671 | ||
|
|
cf6f9ad4cf | ||
|
|
c6ea37144c | ||
|
|
89c1a66403 | ||
|
|
c4c897f921 | ||
|
|
0d4ad02353 | ||
|
|
d21546d79b | ||
|
|
624c30ecd2 | ||
|
|
25abd88fc4 | ||
|
|
e493b9b702 | ||
|
|
6e0f1800c8 | ||
|
|
528f1f085e | ||
|
|
09cd6e3b5f | ||
|
|
2cc30f75a0 | ||
|
|
222805d580 | ||
|
|
56b42a2ee9 | ||
|
|
c9839b2069 | ||
|
|
b842bf7bf5 | ||
|
|
edccf89020 | ||
|
|
1825aa377b | ||
|
|
e59c6abd91 | ||
|
|
dc88a1ebc4 | ||
|
|
165a21f4bc | ||
|
|
9cb9843367 | ||
|
|
95754aa71f | ||
|
|
f559de112b | ||
|
|
9d1f348129 | ||
|
|
cf3aa570c2 | ||
|
|
7c2ce72b5f | ||
|
|
5371055495 | ||
|
|
4d6acd5d76 | ||
|
|
285e67c044 | ||
|
|
d7987e73c9 | ||
|
|
e13a8102b4 | ||
|
|
e720006110 | ||
|
|
12c4766dd0 | ||
|
|
df19224b20 | ||
|
|
167208c811 | ||
|
|
0187e91843 | ||
|
|
c70c677b5a | ||
|
|
5c31c721af | ||
|
|
7a08177a3d | ||
|
|
ad4142df19 | ||
|
|
ff4d61c087 | ||
|
|
fabef39f7f | ||
|
|
64fd5158bf | ||
|
|
8e4e4401c5 | ||
|
|
167f49caf7 | ||
|
|
6e7748b266 | ||
|
|
447dfc029f | ||
|
|
aed70a82c7 | ||
|
|
5b6031f7e4 | ||
|
|
e54e72b290 | ||
|
|
e5ea6cfcb5 | ||
|
|
998c1f83a6 | ||
|
|
41bb875221 | ||
|
|
365400c13e | ||
|
|
e2fcca4e60 | ||
|
|
0189b0c903 | ||
|
|
aacab81a3e | ||
|
|
4152e14e32 | ||
|
|
57b3cd56d7 | ||
|
|
7a45768efe | ||
|
|
3a56da60dd | ||
|
|
896104939b | ||
|
|
19f4fce931 | ||
|
|
19d9d69343 | ||
|
|
68af572ba4 | ||
|
|
0eb837e4ca | ||
|
|
5b5a68c5db | ||
|
|
d2e0553384 | ||
|
|
c2c4133eb0 | ||
|
|
058986714c | ||
|
|
91bbce3fef | ||
|
|
0230cc55bc | ||
|
|
6f5675ef3c | ||
|
|
396513183b | ||
|
|
720fd2cd40 | ||
|
|
da7cd6ae25 | ||
|
|
8bae5348f9 | ||
|
|
fb4ffa468c | ||
|
|
0245ac2106 | ||
|
|
b2089b89cc | ||
|
|
56a88f107c | ||
|
|
96bf90abe4 | ||
|
|
081210688c | ||
|
|
fcde8aa94f | ||
|
|
bcac81eed9 | ||
|
|
0c7e7184e7 | ||
|
|
1e372f57f9 | ||
|
|
1ea1decfd6 | ||
|
|
04dfbf7513 | ||
|
|
f273eca7e3 | ||
|
|
53a28f7672 | ||
|
|
5261bc6585 | ||
|
|
ba3a502079 | ||
|
|
7c369f309a | ||
|
|
50906baee1 | ||
|
|
5bc8f8826f | ||
|
|
4e7eccbb49 | ||
|
|
27e47d5df6 | ||
|
|
7002688398 | ||
|
|
54167ec3fa | ||
|
|
a966fe1ed5 | ||
|
|
ab801fe782 | ||
|
|
43778bef4d | ||
|
|
f1ba94843e | ||
|
|
f932d35c95 | ||
|
|
b58a366dc6 | ||
|
|
f30ba56323 | ||
|
|
4dfe2e6e2f | ||
|
|
90c5a5ff6b | ||
|
|
6040a7370c | ||
|
|
c8d7b4a79a | ||
|
|
fad21d8dda | ||
|
|
8385543e1c |
@@ -13,15 +13,21 @@ stages:
|
||||
- subprojects/pango/
|
||||
|
||||
fedora-x86_64:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/master:v3
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/master:v5
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker.sh
|
||||
artifacts:
|
||||
when: on_failure
|
||||
when: always
|
||||
reports:
|
||||
junit:
|
||||
- "${CI_PROJECT_DIR}/_build/report.xml"
|
||||
name: "gtk-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
||||
- "${CI_PROJECT_DIR}/_build/report.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report.html"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/reftests/output/*.png"
|
||||
cache:
|
||||
key: "$CI_JOB_NAME"
|
||||
<<: *cache-paths
|
||||
@@ -53,18 +59,49 @@ msys2-mingw32:
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/flatpak-build.sh "${APPID}"
|
||||
|
||||
flatpak:demo:
|
||||
variables:
|
||||
APPID: org.gtk.Demo
|
||||
# Manual jobs, for branches and MRs
|
||||
.flatpak-manual: &flatpak-manual
|
||||
<<: *flatpak-defaults
|
||||
when: manual
|
||||
|
||||
flatpak:widget-factory:
|
||||
variables:
|
||||
APPID: org.gtk.WidgetFactory
|
||||
# Only build Flatpak bundles automatically on master
|
||||
.flatpak-master: &flatpak-master
|
||||
<<: *flatpak-defaults
|
||||
only:
|
||||
- master
|
||||
|
||||
flatpak-manual:demo:
|
||||
variables:
|
||||
APPID: org.gtk.Demo4
|
||||
<<: *flatpak-manual
|
||||
|
||||
flatpak-master:demo:
|
||||
variables:
|
||||
APPID: org.gtk.Demo4
|
||||
<<: *flatpak-master
|
||||
|
||||
flatpak-manual:widget-factory:
|
||||
variables:
|
||||
APPID: org.gtk.WidgetFactory4
|
||||
<<: *flatpak-manual
|
||||
|
||||
flatpak-master:widget-factory:
|
||||
variables:
|
||||
APPID: org.gtk.WidgetFactory4
|
||||
<<: *flatpak-master
|
||||
|
||||
flatpak-manual:icon-browser:
|
||||
variables:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
<<: *flatpak-manual
|
||||
|
||||
flatpak-master:icon-browser:
|
||||
variables:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
<<: *flatpak-master
|
||||
|
||||
pages:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/master:v3
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/master:v4
|
||||
stage: deploy
|
||||
script:
|
||||
- meson -Ddocumentation=true _build .
|
||||
|
||||
@@ -11,6 +11,7 @@ RUN dnf -y install \
|
||||
ccache \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dejavu-sans-mono-fonts \
|
||||
desktop-file-utils \
|
||||
elfutils-libelf-devel \
|
||||
fribidi-devel \
|
||||
@@ -72,6 +73,8 @@ RUN dnf -y install \
|
||||
|
||||
RUN pip3 install meson==0.50.0
|
||||
|
||||
RUN pip3 install jinja2
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
||||
363
.gitlab-ci/meson-html-report.py
Executable file
@@ -0,0 +1,363 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Turns a Mason testlog.json file into an HTML report
|
||||
#
|
||||
# Copyright 2019 GNOME Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# Original author: Emmanuele Bassi
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from jinja2 import Template
|
||||
|
||||
REPORT_TEMPLATE = '''
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ report.project_name }} Test Report</title>
|
||||
<meta charset="utf-8" />
|
||||
<style type="text/css">
|
||||
body {
|
||||
background: white;
|
||||
color: #333;
|
||||
font-family: 'Cantarell', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #333333;
|
||||
font-size: 1.9em;
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
border-bottom: 1px solid #333333;
|
||||
}
|
||||
|
||||
header {
|
||||
position: fixed;
|
||||
padding-bottom: 12px;
|
||||
margin-bottom: 24px;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
|
||||
z-index: 500;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
transform: translateY(0px);
|
||||
transition: .2s background-color, color;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
visibility: visible;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
article {
|
||||
padding-top: 200px;
|
||||
margin: 2em;
|
||||
}
|
||||
|
||||
div.report-meta {
|
||||
width: auto;
|
||||
border: 1px solid #ccc;
|
||||
padding: .5em 2em;
|
||||
color: #3c3c3c;
|
||||
}
|
||||
|
||||
span.result {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.pass {
|
||||
color: rgb(51, 209, 122);
|
||||
}
|
||||
|
||||
span.skip {
|
||||
color: rgb(255, 163, 72);
|
||||
}
|
||||
|
||||
span.fail {
|
||||
color: rgb(224, 27, 36);
|
||||
}
|
||||
|
||||
span.xfail {
|
||||
color: rgb(163, 71, 186);
|
||||
}
|
||||
|
||||
div.result {
|
||||
border-top: 1px solid #c0c0c0;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.result h4 {
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
margin-bottom: 0.7em;
|
||||
}
|
||||
|
||||
pre {
|
||||
color: #fafafa;
|
||||
background-color: black;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0px 5px 8px 0px rgba(0, 0, 0, 0.25);
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
border: none;
|
||||
padding: 10px 1em;
|
||||
font-size: 0.9em;
|
||||
overflow: auto;
|
||||
white-space: pre;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
ul.passed li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
ul.passed li:after {
|
||||
content: ",";
|
||||
}
|
||||
|
||||
ul.passed li:last-child:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
ul.images {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
ul.images li {
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>{{ report.project_name }} :: Test Reports</h1>
|
||||
<div class="report-meta">
|
||||
<p><strong>Branch:</strong> {{ report.branch_name }}</p>
|
||||
<p><strong>Date:</strong> <time datetime="{{ report.date.isoformat() }}">{{ report.locale_date }}</time></p>
|
||||
{% if report.job_id %}<p><strong>Job ID:</strong> {{ report.job_id }}</p>{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<section>
|
||||
<div class="summary">
|
||||
<h3>Summary</h3>
|
||||
<ul>
|
||||
<li><strong>Total units:</strong> {{ report.total_units }}</li>
|
||||
<li><strong>Passed:</strong> {{ report.total_successes }}</li>
|
||||
<li><strong>Failed:</strong> {{ report.total_failures }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% for suite_result in report.results_list %}
|
||||
<section>
|
||||
<div class="result">
|
||||
<h3>Suite: {{ suite_result.suite_name }}</h3>
|
||||
<ul>
|
||||
<li><strong>Units:</strong> {{ suite_result.n_units }}</li>
|
||||
<li><strong>Passed:</strong> {{ suite_result.n_successes }}</li>
|
||||
<li><strong>Failed:</strong> {{ suite_result.n_failures }}</li>
|
||||
</ul>
|
||||
|
||||
<div class="successes">
|
||||
<h4>Passed</h4>
|
||||
<ul class="passed">
|
||||
{% for success in suite_result.successes if success.result == 'OK' %}
|
||||
<li>{{ success.name }} - result: <span class="result pass">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4>Skipped</h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'SKIP' %}
|
||||
<li>{{ success.name }} - result: <span class="result skip">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4>Expected failures</h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'EXPECTEDFAIL' %}
|
||||
<li>{{ success.name }} - result: <span class="result xfail">{{ success.result }}</span><br/>
|
||||
{% if success.stdout %}
|
||||
Output: <pre>{{ success.stdout }}</pre>
|
||||
{% endif %}
|
||||
{% if success.image_data is defined %}
|
||||
<ul class="images">
|
||||
<li><img alt="ref" src="{{ success.image_data.ref }}" /></li>
|
||||
<li><img alt="out" src="{{ success.image_data.out }}" /></li>
|
||||
<li><img alt="diff" src="{{ success.image_data.diff }}" /></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="failures">
|
||||
<h4>Failed</h4>
|
||||
<ul class="failed">
|
||||
{% for failure in suite_result.failures if failure.result == 'FAIL' %}
|
||||
<li>{{ failure.name }} - result: <span class="result fail">{{ failure.result }}</span><br/>
|
||||
{% if failure.stdout %}
|
||||
Output: <pre>{{ failure.stdout }}</pre>
|
||||
{% endif %}
|
||||
{% if failure.image_data is defined %}
|
||||
<ul class="images">
|
||||
<li><img alt="ref" src="{{ failure.image_data.ref }}" /></li>
|
||||
<li><img alt="out" src="{{ failure.image_data.out }}" /></li>
|
||||
<li><img alt="diff" src="{{ failure.image_data.diff }}" /></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4>Timed out</h4>
|
||||
<ul class="failed">
|
||||
{% for failure in suite_result.failures if failure.result == 'TIMEOUT' %}
|
||||
<li>{{ failure.name }} - result: <span class="result fail">{{ failure.result }}</span><br/>
|
||||
{% if failure.stdout %}
|
||||
Output: <pre>{{ failure.stdout }}</pre>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
||||
'''
|
||||
|
||||
aparser = argparse.ArgumentParser(description='Turns a Meson test log into an HTML report')
|
||||
aparser.add_argument('--project-name', metavar='NAME',
|
||||
help='The project name',
|
||||
default='Unknown')
|
||||
aparser.add_argument('--job-id', metavar='ID',
|
||||
help='The job ID for the report',
|
||||
default=None)
|
||||
aparser.add_argument('--branch', metavar='NAME',
|
||||
help='Branch of the project being tested',
|
||||
default='master')
|
||||
aparser.add_argument('--output', metavar='FILE',
|
||||
help='The output HTML file, stdout by default',
|
||||
type=argparse.FileType('w', encoding='UTF-8'),
|
||||
default=sys.stdout)
|
||||
aparser.add_argument('--reftest-suite', metavar='NAME',
|
||||
help='The name of the reftests suite',
|
||||
default='reftest')
|
||||
aparser.add_argument('--reftest-output-dir', metavar='DIR',
|
||||
help='The output directory for reftests data',
|
||||
default=None)
|
||||
aparser.add_argument('infile', metavar='FILE',
|
||||
help='The input testlog.json, stdin by default',
|
||||
type=argparse.FileType('r', encoding='UTF-8'),
|
||||
default=sys.stdin)
|
||||
|
||||
args = aparser.parse_args()
|
||||
|
||||
outfile = args.output
|
||||
|
||||
suites = {}
|
||||
for line in args.infile:
|
||||
data = json.loads(line)
|
||||
(full_suite, unit_name) = data['name'].split(' / ')
|
||||
(project_name, suite_name) = full_suite.split(':')
|
||||
|
||||
unit = {
|
||||
'project-name': project_name,
|
||||
'suite': suite_name,
|
||||
'name': unit_name,
|
||||
'duration': data['duration'],
|
||||
'returncode': data['returncode'],
|
||||
'result': data['result'],
|
||||
'stdout': data['stdout'],
|
||||
}
|
||||
|
||||
if args.reftest_output_dir is not None and suite_name == args.reftest_suite:
|
||||
filename = unit_name.split(' ')[1]
|
||||
basename = os.path.splitext(filename)[0]
|
||||
|
||||
image_data = {
|
||||
'ref': os.path.join(args.reftest_output_dir, '{}.ref.png'.format(basename)),
|
||||
'out': os.path.join(args.reftest_output_dir, '{}.out.png'.format(basename)),
|
||||
'diff': os.path.join(args.reftest_output_dir, '{}.diff.png'.format(basename)),
|
||||
}
|
||||
|
||||
unit['image_data'] = image_data
|
||||
|
||||
units = suites.setdefault(full_suite, [])
|
||||
units.append(unit)
|
||||
|
||||
report = {}
|
||||
report['date'] = datetime.datetime.utcnow()
|
||||
report['locale_date'] = report['date'].strftime("%c")
|
||||
report['project_name'] = args.project_name
|
||||
report['job_id'] = args.job_id
|
||||
report['branch_name'] = args.branch
|
||||
report['total_successes'] = 0
|
||||
report['total_failures'] = 0
|
||||
report['total_units'] = 0
|
||||
report['results_list'] = []
|
||||
|
||||
for name, units in suites.items():
|
||||
(project_name, suite_name) = name.split(':')
|
||||
print('Processing {} suite {}:'.format(project_name, suite_name))
|
||||
|
||||
def if_failed(unit):
|
||||
if unit['result'] in ['FAIL', 'TIMEOUT']:
|
||||
return True
|
||||
return False
|
||||
|
||||
def if_succeded(unit):
|
||||
if unit['result'] in ['OK', 'EXPECTEDFAIL', 'SKIP']:
|
||||
return True
|
||||
return False
|
||||
|
||||
successes = list(filter(if_succeded, units))
|
||||
failures = list(filter(if_failed, units))
|
||||
|
||||
n_units = len(units)
|
||||
n_successes = len(successes)
|
||||
n_failures = len(failures)
|
||||
|
||||
report['total_units'] += n_units
|
||||
report['total_successes'] += n_successes
|
||||
report['total_failures'] += n_failures
|
||||
print(' - {}: {} total, {} pass, {} fail'.format(suite_name, n_units, n_successes, n_failures))
|
||||
|
||||
suite_report = {
|
||||
'suite_name': suite_name,
|
||||
'n_units': n_units,
|
||||
'successes': successes,
|
||||
'n_successes': n_successes,
|
||||
'failures': failures,
|
||||
'n_failures': n_failures,
|
||||
}
|
||||
report['results_list'].append(suite_report)
|
||||
|
||||
template = Template(REPORT_TEMPLATE)
|
||||
outfile.write(template.render({'report': report}))
|
||||
109
.gitlab-ci/meson-junit-report.py
Executable file
@@ -0,0 +1,109 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Turns a Meson testlog.json file into a JUnit XML report
|
||||
#
|
||||
# Copyright 2019 GNOME Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# Original author: Emmanuele Bassi
|
||||
|
||||
import argparse
|
||||
import datetime
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
aparser = argparse.ArgumentParser(description='Turns a Meson test log into a JUnit report')
|
||||
aparser.add_argument('--project-name', metavar='NAME',
|
||||
help='The project name',
|
||||
default='unknown')
|
||||
aparser.add_argument('--job-id', metavar='ID',
|
||||
help='The job ID for the report',
|
||||
default='Unknown')
|
||||
aparser.add_argument('--branch', metavar='NAME',
|
||||
help='Branch of the project being tested',
|
||||
default='master')
|
||||
aparser.add_argument('--output', metavar='FILE',
|
||||
help='The output file, stdout by default',
|
||||
type=argparse.FileType('w', encoding='UTF-8'),
|
||||
default=sys.stdout)
|
||||
aparser.add_argument('infile', metavar='FILE',
|
||||
help='The input testlog.json, stdin by default',
|
||||
type=argparse.FileType('r', encoding='UTF-8'),
|
||||
default=sys.stdin)
|
||||
|
||||
args = aparser.parse_args()
|
||||
|
||||
outfile = args.output
|
||||
|
||||
testsuites = ET.Element('testsuites')
|
||||
testsuites.set('id', '{}/{}'.format(args.job_id, args.branch))
|
||||
testsuites.set('package', args.project_name)
|
||||
testsuites.set('timestamp', datetime.datetime.utcnow().isoformat(timespec='minutes'))
|
||||
|
||||
suites = {}
|
||||
for line in args.infile:
|
||||
data = json.loads(line)
|
||||
(full_suite, unit_name) = data['name'].split(' / ')
|
||||
(project_name, suite_name) = full_suite.split(':')
|
||||
|
||||
duration = data['duration']
|
||||
return_code = data['returncode']
|
||||
log = data['stdout']
|
||||
|
||||
unit = {
|
||||
'suite': suite_name,
|
||||
'name': unit_name,
|
||||
'duration': duration,
|
||||
'returncode': return_code,
|
||||
'stdout': log,
|
||||
}
|
||||
|
||||
units = suites.setdefault(suite_name, [])
|
||||
units.append(unit)
|
||||
|
||||
for name, units in suites.items():
|
||||
print('Processing suite {} (units: {})'.format(name, len(units)))
|
||||
|
||||
def if_failed(unit):
|
||||
if unit['returncode'] != 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
def if_succeded(unit):
|
||||
if unit['returncode'] == 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
successes = list(filter(if_succeded, units))
|
||||
failures = list(filter(if_failed, units))
|
||||
print(' - {}: {} pass, {} fail'.format(name, len(successes), len(failures)))
|
||||
|
||||
testsuite = ET.SubElement(testsuites, 'testsuite')
|
||||
testsuite.set('name', '{}/{}'.format(args.project_name, name))
|
||||
testsuite.set('tests', str(len(units)))
|
||||
testsuite.set('errors', str(len(failures)))
|
||||
testsuite.set('failures', str(len(failures)))
|
||||
|
||||
for unit in successes:
|
||||
testcase = ET.SubElement(testsuite, 'testcase')
|
||||
testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
|
||||
testcase.set('name', unit['name'])
|
||||
testcase.set('time', str(unit['duration']))
|
||||
|
||||
for unit in failures:
|
||||
testcase = ET.SubElement(testsuite, 'testcase')
|
||||
testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
|
||||
testcase.set('name', unit['name'])
|
||||
testcase.set('time', str(unit['duration']))
|
||||
|
||||
failure = ET.SubElement(testcase, 'failure')
|
||||
failure.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
|
||||
failure.set('name', unit['name'])
|
||||
failure.set('type', 'error')
|
||||
failure.text = unit['stdout']
|
||||
|
||||
output = ET.tostring(testsuites, encoding='unicode')
|
||||
outfile.write(output)
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/master:v3"
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/master:v4"
|
||||
|
||||
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
||||
--file "Dockerfile" .
|
||||
|
||||
@@ -16,6 +16,7 @@ meson \
|
||||
-Dwayland-backend=true \
|
||||
-Dbroadway-backend=true \
|
||||
-Dvulkan=yes \
|
||||
--werror \
|
||||
_build $srcdir
|
||||
unset CCACHE_DISABLE
|
||||
|
||||
@@ -24,11 +25,31 @@ cd _build
|
||||
ninja
|
||||
ccache --show-stats
|
||||
|
||||
set +e
|
||||
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test \
|
||||
--timeout-multiplier 2 \
|
||||
--print-errorlogs \
|
||||
--suite=gtk \
|
||||
--no-suite=gtk:gsk \
|
||||
--no-suite=gtk:reftest \
|
||||
--no-suite=gtk:a11y
|
||||
|
||||
# Save the exit code
|
||||
exit_code=$?
|
||||
|
||||
# We always want to run the report generators
|
||||
$srcdir/.gitlab-ci/meson-junit-report.py \
|
||||
--project-name=gtk \
|
||||
--job-id="${CI_JOB_NAME}" \
|
||||
--output=report.xml \
|
||||
meson-logs/testlog.json
|
||||
|
||||
$srcdir/.gitlab-ci/meson-html-report.py \
|
||||
--project-name=GTK \
|
||||
--job-id="${CI_JOB_NAME}" \
|
||||
--reftest-output-dir="testsuite/reftests/output" \
|
||||
--output=report.html \
|
||||
meson-logs/testlog.json
|
||||
|
||||
exit $exit_code
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
- Which version of GTK you are using
|
||||
- What operating system and version
|
||||
- For Linux, which distribution
|
||||
- If you built GTK+ yourself, the list of options used to configure the build
|
||||
- If you built GTK yourself, the list of options used to configure the build
|
||||
-->
|
||||
|
||||
## Additional information
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
- Which version of GTK you are using
|
||||
- What operating system and version
|
||||
- for Linux, which distribution
|
||||
- If you built GTK+ yourself, the list of options used to configure the build
|
||||
- If you built GTK yourself, the list of options used to configure the build
|
||||
-->
|
||||
|
||||
## Warnings
|
||||
|
||||
95
NEWS
@@ -1,3 +1,98 @@
|
||||
Overview of Changes in GTK+ 3.96.0
|
||||
==================================
|
||||
|
||||
* DND has been refactored. There are now separate GdkDrag and GdkDrop
|
||||
objects. This work is still incomplete
|
||||
|
||||
* The GDK_SURFACE_SUBSURFACE surface type has been removed.
|
||||
|
||||
* Use of child surfaces has been greatly reduced. This work is still
|
||||
incomplete
|
||||
|
||||
* The use of global coordinates in GDK apis has been reduced. This
|
||||
work is still incomplete
|
||||
|
||||
* Events have been simplified and are just used for input
|
||||
- expose events have been replaced by a GdkSurface::render signal
|
||||
- configure events have been replaced by a GdkSurface::size-changed signal
|
||||
- map events have been replaced by a GdkSurface::mapped property
|
||||
- gdk_event_handler_set has been replaced by a GdkSurface::event signal
|
||||
- key events no longer contain a string
|
||||
- events on unmapped widgets are ignored
|
||||
|
||||
* Warping the pointer is no longer supported
|
||||
|
||||
* The Wayland backend now uses the Settings portal for GtkSettings
|
||||
|
||||
* The Wayland input module uses the text-input-unstable-v3 protocol
|
||||
|
||||
* The Broadway backend has been rewritten to work well with GSK
|
||||
|
||||
* The color chooser has a color picker
|
||||
|
||||
* GtkApplication tracks screensaver state and has a ::query-end signal
|
||||
|
||||
* The file chooser portal backend supports file filters
|
||||
|
||||
* A number of list models have been introduced, for internal use
|
||||
and as public api:
|
||||
- GtkMapListModel
|
||||
- GtkSliceListModel
|
||||
- GtkSortListModel
|
||||
- GtkSelectionModel
|
||||
- GtkSingleSelection
|
||||
|
||||
* Support for tabular menus and combo boxes has been dropped
|
||||
|
||||
* Key themes are no longer supported
|
||||
|
||||
* GtkInvisible has been dropped
|
||||
|
||||
* A GtkRoot interface has been added that is currently implemented
|
||||
just by GtkWindow. This work is incomplete
|
||||
|
||||
* GtkWidgets can transform their children using projective linear
|
||||
transformations. This functionality is available in CSS and
|
||||
as GskTransform argument to gtk_widget_allocate. GtkFixed is
|
||||
a container that exposes this functionality. For examples of this,
|
||||
see the swing transition of GtkRevealer, the rotate transitions
|
||||
of GtkStack or the Fixed Layout example in gtk-demo.
|
||||
|
||||
* GtkEntry functionality has been moved into a new GtkText widget,
|
||||
the GtkEditable interface has been expanded, and new a new
|
||||
GtkPasswordEntry widget has been introduced.
|
||||
|
||||
* Focus handling has been rewritten, and focus-change event
|
||||
generation has been unified with crossing events.
|
||||
|
||||
* All demos and settings schemas have been renamed to avoid collisions
|
||||
with GTK3.
|
||||
|
||||
* GtkWidget can now use a GtkLayoutManager for size allocation.
|
||||
Layout managers can optionally use layout children holding layout
|
||||
properties. GtkBinLayout, GtkBoxLayout, GtkGridLayout, GtkFixedLayout
|
||||
and GtkCustomLayout are currently available, more layout manager
|
||||
implementations will appear in the future.
|
||||
|
||||
* GtkAssistant, GtkStack and GtkNotebook now have publicly
|
||||
accessible page objects for their children. The page objects
|
||||
are also exposed via a list model.
|
||||
|
||||
* GtkContainer no longer supports child properties. All existing
|
||||
child properties have been removed, converted to regular properties,
|
||||
moved to layout properties or moved to child meta objects.
|
||||
|
||||
* A number of X11-specific GtkWindow and GdkSurface apis have been
|
||||
removed
|
||||
|
||||
* GtkBuilder can specify object-valued properties inline.
|
||||
|
||||
* The gtk4-builder-tool simplify command has gained a --3to4 option
|
||||
to convert GTK3 ui files to GTK4.
|
||||
|
||||
* The inspector can show child meta objects and layout properties.
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.94.0
|
||||
==================================
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"app-id": "org.gtk.Demo",
|
||||
"app-id": "org.gtk.Demo4",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
@@ -9,10 +9,9 @@
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=x11",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
|
||||
"--talk-name=ca.desrt.conf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
72
build-aux/flatpak/org.gtk.IconBrowser4.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"app-id": "org.gtk.IconBrowser4",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "gtk4-icon-browser",
|
||||
"tags": ["devel", "development", "nightly"],
|
||||
"desktop-file-name-prefix": "(Development) ",
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
"/lib/pkgconfig", "/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man", "/share/man", "/share/gtk-doc",
|
||||
"*.la", ".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name" : "wayland",
|
||||
"buildsystem" : "autotools",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--disable-documentation"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/wayland-project/wayland.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "graphene",
|
||||
"buildsystem": "meson",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"--libdir=/app/lib",
|
||||
"-Dtests=false",
|
||||
"-Dbenchmarks=false"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/ebassi/graphene.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gtk",
|
||||
"buildsystem": "meson",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"app-id": "org.gtk.WidgetFactory",
|
||||
"app-id": "org.gtk.WidgetFactory4",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
@@ -9,10 +9,9 @@
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=x11",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
|
||||
"--talk-name=ca.desrt.conf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
@@ -19,7 +19,7 @@ if 'DESTDIR' not in os.environ:
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
subprocess.call(['gtk-update-icon-cache', '-q', '-t' ,'-f',
|
||||
subprocess.call(['gtk4-update-icon-cache', '-q', '-t' ,'-f',
|
||||
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
||||
|
||||
print('Updating module cache for print backends...')
|
||||
|
||||
@@ -305,13 +305,3 @@
|
||||
#mesondefine HAVE_PANGOFT
|
||||
|
||||
#mesondefine ISO_CODES_PREFIX
|
||||
|
||||
#mesondefine MALLOC_IS_ALIGNED16
|
||||
|
||||
#mesondefine HAVE_POSIX_MEMALIGN
|
||||
|
||||
#mesondefine HAVE_MEMALIGN
|
||||
|
||||
#mesondefine HAVE_ALIGNED_ALLOC
|
||||
|
||||
#mesondefine HAVE__ALIGNED_MALLOC
|
||||
|
||||
@@ -212,7 +212,7 @@ activate_about (GSimpleAction *action,
|
||||
"comments", "Program to demonstrate GTK functions.",
|
||||
"authors", authors,
|
||||
"documenters", documentors,
|
||||
"logo-icon-name", "org.gtk.Demo",
|
||||
"logo-icon-name", "org.gtk.Demo4",
|
||||
"title", "About GTK Code Demos",
|
||||
NULL);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ demo_application_init (DemoApplication *app)
|
||||
GSettings *settings;
|
||||
GAction *action;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
settings = g_settings_new ("org.gtk.Demo4");
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
@@ -397,7 +397,7 @@ demo_application_window_store_state (DemoApplicationWindow *win)
|
||||
{
|
||||
GSettings *settings;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
settings = g_settings_new ("org.gtk.Demo4");
|
||||
g_settings_set (settings, "window-size", "(ii)", win->width, win->height);
|
||||
g_settings_set_boolean (settings, "maximized", win->maximized);
|
||||
g_settings_set_boolean (settings, "fullscreen", win->fullscreen);
|
||||
@@ -409,7 +409,7 @@ demo_application_window_load_state (DemoApplicationWindow *win)
|
||||
{
|
||||
GSettings *settings;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
settings = g_settings_new ("org.gtk.Demo4");
|
||||
g_settings_get (settings, "window-size", "(ii)", &win->width, &win->height);
|
||||
win->maximized = g_settings_get_boolean (settings, "maximized");
|
||||
win->fullscreen = g_settings_get_boolean (settings, "fullscreen");
|
||||
@@ -541,7 +541,7 @@ main (int argc, char *argv[])
|
||||
GtkApplication *app;
|
||||
|
||||
app = GTK_APPLICATION (g_object_new (demo_application_get_type (),
|
||||
"application-id", "org.gtk.Demo2",
|
||||
"application-id", "org.gtk.Demo4.App",
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
NULL));
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="DemoApplicationWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Application Class</property>
|
||||
@@ -32,11 +33,11 @@
|
||||
<property name="action-name">win.logo</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="infobar">
|
||||
@@ -63,11 +64,11 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
@@ -79,20 +80,20 @@
|
||||
<property name="buffer">buffer</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="status">
|
||||
<property name="hexpand">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -52,7 +52,7 @@ do_application_demo (GtkWidget *toplevel)
|
||||
|
||||
if (watch == 0)
|
||||
watch = g_bus_watch_name (G_BUS_TYPE_SESSION,
|
||||
"org.gtk.Demo2",
|
||||
"org.gtk.Demo4.App",
|
||||
0,
|
||||
on_name_appeared,
|
||||
on_name_vanished,
|
||||
@@ -80,8 +80,8 @@ do_application_demo (GtkWidget *toplevel)
|
||||
else
|
||||
{
|
||||
g_dbus_connection_call_sync (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
|
||||
"org.gtk.Demo2",
|
||||
"/org/gtk/Demo2",
|
||||
"org.gtk.Demo4.App",
|
||||
"/org/gtk/Demo4/App",
|
||||
"org.gtk.Actions",
|
||||
"Activate",
|
||||
g_variant_new ("(sava{sv})", "quit", NULL, NULL),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
@@ -16,11 +17,11 @@
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
@@ -28,22 +29,22 @@
|
||||
<property name="vexpand">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="min-content-width">150</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="halign">center</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="stack">stack</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
@@ -66,53 +67,53 @@
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Duck</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Background</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="duck"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="gradient"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -120,12 +121,12 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="blend0"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
@@ -145,53 +146,53 @@ Blended picture</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Red</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Blue</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="red"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="blue"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -199,12 +200,12 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="blend1"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
@@ -227,33 +228,33 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="cyan"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="magenta"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<style>
|
||||
<class name="yellow"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -261,11 +262,11 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="blend2"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -274,11 +275,11 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -287,11 +288,11 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -300,11 +301,11 @@ Blended picture</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -313,21 +314,21 @@ Blended picture</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -13,19 +13,22 @@ show_parsing_error (GtkCssProvider *provider,
|
||||
const GError *error,
|
||||
GtkTextBuffer *buffer)
|
||||
{
|
||||
const GtkCssLocation *start_location, *end_location;
|
||||
GtkTextIter start, end;
|
||||
const char *tag_name;
|
||||
|
||||
start_location = gtk_css_section_get_start_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&start,
|
||||
gtk_css_section_get_start_line (section),
|
||||
gtk_css_section_get_start_position (section));
|
||||
start_location->lines,
|
||||
start_location->line_bytes);
|
||||
end_location = gtk_css_section_get_end_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&end,
|
||||
gtk_css_section_get_end_line (section),
|
||||
gtk_css_section_get_end_position (section));
|
||||
end_location->lines,
|
||||
end_location->line_bytes);
|
||||
|
||||
if (g_error_matches (error, GTK_CSS_PROVIDER_ERROR, GTK_CSS_PROVIDER_ERROR_DEPRECATED))
|
||||
if (error->domain == GTK_CSS_PARSER_WARNING)
|
||||
tag_name = "warning";
|
||||
else
|
||||
tag_name = "error";
|
||||
|
||||
@@ -13,19 +13,23 @@ show_parsing_error (GtkCssProvider *provider,
|
||||
const GError *error,
|
||||
GtkTextBuffer *buffer)
|
||||
{
|
||||
const GtkCssLocation *start_location, *end_location;
|
||||
GtkTextIter start, end;
|
||||
const char *tag_name;
|
||||
|
||||
start_location = gtk_css_section_get_start_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&start,
|
||||
gtk_css_section_get_start_line (section),
|
||||
gtk_css_section_get_start_position (section));
|
||||
start_location->lines,
|
||||
start_location->line_bytes);
|
||||
end_location = gtk_css_section_get_end_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&end,
|
||||
gtk_css_section_get_end_line (section),
|
||||
gtk_css_section_get_end_position (section));
|
||||
end_location->lines,
|
||||
end_location->line_bytes);
|
||||
|
||||
if (g_error_matches (error, GTK_CSS_PROVIDER_ERROR, GTK_CSS_PROVIDER_ERROR_DEPRECATED))
|
||||
|
||||
if (error->domain == GTK_CSS_PARSER_WARNING)
|
||||
tag_name = "warning";
|
||||
else
|
||||
tag_name = "error";
|
||||
|
||||
@@ -12,19 +12,23 @@ show_parsing_error (GtkCssProvider *provider,
|
||||
const GError *error,
|
||||
GtkTextBuffer *buffer)
|
||||
{
|
||||
const GtkCssLocation *start_location, *end_location;
|
||||
GtkTextIter start, end;
|
||||
const char *tag_name;
|
||||
|
||||
start_location = gtk_css_section_get_start_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&start,
|
||||
gtk_css_section_get_start_line (section),
|
||||
gtk_css_section_get_start_position (section));
|
||||
start_location->lines,
|
||||
start_location->line_bytes);
|
||||
end_location = gtk_css_section_get_end_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&end,
|
||||
gtk_css_section_get_end_line (section),
|
||||
gtk_css_section_get_end_position (section));
|
||||
end_location->lines,
|
||||
end_location->line_bytes);
|
||||
|
||||
if (g_error_matches (error, GTK_CSS_PROVIDER_ERROR, GTK_CSS_PROVIDER_ERROR_DEPRECATED))
|
||||
|
||||
if (error->domain == GTK_CSS_PARSER_WARNING)
|
||||
tag_name = "warning";
|
||||
else
|
||||
tag_name = "error";
|
||||
|
||||
@@ -11,19 +11,22 @@ show_parsing_error (GtkCssProvider *provider,
|
||||
const GError *error,
|
||||
GtkTextBuffer *buffer)
|
||||
{
|
||||
const GtkCssLocation *start_location, *end_location;
|
||||
GtkTextIter start, end;
|
||||
const char *tag_name;
|
||||
|
||||
start_location = gtk_css_section_get_start_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&start,
|
||||
gtk_css_section_get_start_line (section),
|
||||
gtk_css_section_get_start_position (section));
|
||||
start_location->lines,
|
||||
start_location->line_bytes);
|
||||
end_location = gtk_css_section_get_end_location (section);
|
||||
gtk_text_buffer_get_iter_at_line_index (buffer,
|
||||
&end,
|
||||
gtk_css_section_get_end_line (section),
|
||||
gtk_css_section_get_end_position (section));
|
||||
end_location->lines,
|
||||
end_location->line_bytes);
|
||||
|
||||
if (g_error_matches (error, GTK_CSS_PROVIDER_ERROR, GTK_CSS_PROVIDER_ERROR_DEPRECATED))
|
||||
if (error->domain == GTK_CSS_PARSER_WARNING)
|
||||
tag_name = "warning";
|
||||
else
|
||||
tag_name = "error";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GdkCursor" id="default_cursor">
|
||||
<property name="name">default</property>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -10,7 +10,7 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="org.gtk.Demo-symbolic.svg"
|
||||
sodipodi:docname="org.gtk.Demo4-symbolic.svg"
|
||||
height="16.03125"
|
||||
id="svg7384"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -163,6 +163,7 @@
|
||||
<file>expander.c</file>
|
||||
<file>filtermodel.c</file>
|
||||
<file>fishbowl.c</file>
|
||||
<file>fixed.c</file>
|
||||
<file>flowbox.c</file>
|
||||
<file>foreigndrawing.c</file>
|
||||
<file>font_features.c</file>
|
||||
@@ -270,7 +271,10 @@
|
||||
<file>demotaggedentry.c</file>
|
||||
<file>demotaggedentry.h</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/Demo">
|
||||
<gresource prefix="/fixed">
|
||||
<file>fixed.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/Demo4">
|
||||
<file>icons/16x16/actions/application-exit.png</file>
|
||||
<file>icons/16x16/actions/document-new.png</file>
|
||||
<file>icons/16x16/actions/document-open.png</file>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
|
||||
@@ -243,7 +243,7 @@ pressed_cb (GtkGesture *gesture,
|
||||
GtkWidget *child;
|
||||
|
||||
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
|
||||
child = gtk_widget_pick (widget, x, y);
|
||||
child = gtk_widget_pick (widget, x, y, GTK_PICK_DEFAULT);
|
||||
|
||||
if (gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)) == GDK_BUTTON_SECONDARY)
|
||||
{
|
||||
@@ -320,7 +320,7 @@ released_cb (GtkGesture *gesture,
|
||||
GtkWidget *child;
|
||||
|
||||
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
|
||||
child = gtk_widget_pick (widget, x, y);
|
||||
child = gtk_widget_pick (widget, x, y, 0);
|
||||
|
||||
if (gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)) == GDK_BUTTON_PRIMARY)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ do_expander (GtkWidget *do_widget)
|
||||
GtkWidget *toplevel;
|
||||
GtkWidget *area;
|
||||
GtkWidget *expander;
|
||||
GtkWidget *label;
|
||||
GtkWidget *sw;
|
||||
GtkWidget *tv;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -50,13 +51,19 @@ do_expander (GtkWidget *do_widget)
|
||||
|
||||
area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (window));
|
||||
|
||||
label = gtk_widget_get_last_child (area);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), FALSE);
|
||||
gtk_widget_set_vexpand (label, FALSE);
|
||||
|
||||
expander = gtk_expander_new ("Details:");
|
||||
gtk_widget_set_vexpand (expander, TRUE);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (sw), 100);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_propagate_natural_height (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
|
||||
tv = gtk_text_view_new ();
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (tv));
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
@@ -44,11 +45,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="treeview1"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
@@ -83,11 +84,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label1"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview2">
|
||||
@@ -134,11 +135,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label2"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
@@ -150,11 +151,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="treeview2"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
@@ -166,11 +167,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="treeview3"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview3">
|
||||
@@ -199,11 +200,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label3"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">Fishbowl</property>
|
||||
@@ -27,25 +28,21 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="label">fps</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" bind-source="bowl" bind-property="framerate"/>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Icons, </property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" bind-source="bowl" bind-property="count"/>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="changes_allow">
|
||||
@@ -53,7 +50,6 @@
|
||||
<property name="icon-name">changes-allow</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkToggleButton" id="changes_prevent">
|
||||
@@ -62,7 +58,6 @@
|
||||
<property name="icon-name">changes-prevent</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
167
demos/gtk-demo/fixed.c
Normal file
@@ -0,0 +1,167 @@
|
||||
/* Fixed layout
|
||||
*
|
||||
* GtkFixed is a container that allows placing and transforming
|
||||
* widgets manually.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* This enumeration determines the paint order */
|
||||
enum {
|
||||
FACE_BACK,
|
||||
FACE_LEFT,
|
||||
FACE_BOTTOM,
|
||||
FACE_RIGHT,
|
||||
FACE_TOP,
|
||||
FACE_FRONT,
|
||||
|
||||
N_FACES
|
||||
};
|
||||
|
||||
/* Map face widgets to CSS classes */
|
||||
static struct {
|
||||
GtkWidget *face;
|
||||
const char *css_class;
|
||||
} faces[N_FACES] = {
|
||||
[FACE_BACK] = { NULL, "back", },
|
||||
[FACE_LEFT] = { NULL, "left", },
|
||||
[FACE_RIGHT] = { NULL, "right", },
|
||||
[FACE_TOP] = { NULL, "top", },
|
||||
[FACE_BOTTOM] = { NULL, "bottom", },
|
||||
[FACE_FRONT] = { NULL, "front", },
|
||||
};
|
||||
|
||||
static GtkWidget *
|
||||
create_faces (void)
|
||||
{
|
||||
GtkWidget *fixed = gtk_fixed_new ();
|
||||
int face_size = 200;
|
||||
float w, h, d, p;
|
||||
|
||||
gtk_widget_set_overflow (fixed, GTK_OVERFLOW_VISIBLE);
|
||||
|
||||
w = (float) face_size / 2.f;
|
||||
h = (float) face_size / 2.f;
|
||||
d = (float) face_size / 2.f;
|
||||
p = face_size * 3.f;
|
||||
|
||||
for (int i = 0; i < N_FACES; i++)
|
||||
{
|
||||
GskTransform *transform = NULL;
|
||||
|
||||
/* Add a face */
|
||||
faces[i].face = gtk_frame_new (NULL);
|
||||
gtk_widget_set_size_request (faces[i].face, face_size, face_size);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (faces[i].face), faces[i].css_class);
|
||||
gtk_container_add (GTK_CONTAINER (fixed), faces[i].face);
|
||||
|
||||
/* Set up the transformation for each face */
|
||||
transform = gsk_transform_translate (transform, &GRAPHENE_POINT_INIT (w, h));
|
||||
transform = gsk_transform_perspective (transform, p);
|
||||
transform = gsk_transform_rotate_3d (transform, -30.f, graphene_vec3_x_axis ());
|
||||
transform = gsk_transform_rotate_3d (transform, 135.f, graphene_vec3_y_axis ());
|
||||
transform = gsk_transform_translate_3d (transform, &GRAPHENE_POINT3D_INIT (0, 0, -face_size / 6.f));
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case FACE_FRONT:
|
||||
transform = gsk_transform_rotate_3d (transform, 0.f, graphene_vec3_y_axis ());
|
||||
break;
|
||||
|
||||
case FACE_BACK:
|
||||
transform = gsk_transform_rotate_3d (transform, -180.f, graphene_vec3_y_axis ());
|
||||
break;
|
||||
|
||||
case FACE_RIGHT:
|
||||
transform = gsk_transform_rotate_3d (transform, 90.f, graphene_vec3_y_axis ());
|
||||
break;
|
||||
|
||||
case FACE_LEFT:
|
||||
transform = gsk_transform_rotate_3d (transform, -90.f, graphene_vec3_y_axis ());
|
||||
break;
|
||||
|
||||
case FACE_TOP:
|
||||
transform = gsk_transform_rotate_3d (transform, 90.f, graphene_vec3_x_axis ());
|
||||
break;
|
||||
|
||||
case FACE_BOTTOM:
|
||||
transform = gsk_transform_rotate_3d (transform, -90.f, graphene_vec3_x_axis ());
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
transform = gsk_transform_translate_3d (transform, &GRAPHENE_POINT3D_INIT (0, 0, d));
|
||||
transform = gsk_transform_translate_3d (transform, &GRAPHENE_POINT3D_INIT (-w, -h, 0));
|
||||
|
||||
gtk_fixed_set_child_transform (GTK_FIXED (fixed), faces[i].face, transform);
|
||||
gsk_transform_unref (transform);
|
||||
}
|
||||
|
||||
return fixed;
|
||||
}
|
||||
|
||||
static GtkWidget *demo_window = NULL;
|
||||
static GtkCssProvider *provider = NULL;
|
||||
|
||||
static void
|
||||
close_window (GtkWidget *widget)
|
||||
{
|
||||
/* Reset the state */
|
||||
for (int i = 0; i < N_FACES; i++)
|
||||
faces[i].face = NULL;
|
||||
|
||||
gtk_style_context_remove_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider));
|
||||
provider = NULL;
|
||||
|
||||
demo_window = NULL;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_demo_window (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *window, *sw, *fixed, *cube;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Fixed layout");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), sw);
|
||||
|
||||
fixed = gtk_fixed_new ();
|
||||
gtk_container_add (GTK_CONTAINER (sw), fixed);
|
||||
gtk_widget_set_halign (GTK_WIDGET (fixed), GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (GTK_WIDGET (fixed), GTK_ALIGN_CENTER);
|
||||
|
||||
cube = create_faces ();
|
||||
gtk_container_add (GTK_CONTAINER (fixed), cube);
|
||||
gtk_widget_set_overflow (fixed, GTK_OVERFLOW_VISIBLE);
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/fixed/fixed.css");
|
||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
800);
|
||||
g_object_unref (provider);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
do_fixed (GtkWidget *do_widget)
|
||||
{
|
||||
if (demo_window == NULL)
|
||||
demo_window = create_demo_window (do_widget);
|
||||
|
||||
if (!gtk_widget_get_visible (demo_window))
|
||||
gtk_widget_show (demo_window);
|
||||
else
|
||||
gtk_widget_destroy (demo_window);
|
||||
|
||||
return demo_window;
|
||||
}
|
||||
29
demos/gtk-demo/fixed.css
Normal file
@@ -0,0 +1,29 @@
|
||||
frame.front {
|
||||
border: 2px solid white;
|
||||
background-color: rgba(228, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
frame.back {
|
||||
border: 2px solid white;
|
||||
background-color: rgba(228, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
frame.right {
|
||||
border: 2px solid white;
|
||||
background-color: rgba(127, 231, 25, 0.8);
|
||||
}
|
||||
|
||||
frame.left {
|
||||
border: 2px solid white;
|
||||
background-color: rgba(127, 231, 25, 0.8);
|
||||
}
|
||||
|
||||
frame.top {
|
||||
border: 2px solid white;
|
||||
background-color: rgba(114, 159, 207, 0.8);
|
||||
}
|
||||
|
||||
frame.bottom {
|
||||
border: 2px solid white;
|
||||
background-color: rgba(114, 159, 207, 0.8);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
|
||||
@@ -495,7 +495,11 @@ update_script_combo (void)
|
||||
gboolean have_active = FALSE;
|
||||
|
||||
lang = gtk_font_chooser_get_language (GTK_FONT_CHOOSER (font));
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
active = hb_ot_tag_from_language (hb_language_from_string (lang, -1));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
g_free (lang);
|
||||
|
||||
store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk40">
|
||||
<object class="GtkMenu" id="menu1">
|
||||
<child>
|
||||
@@ -28,12 +29,12 @@
|
||||
<property name="margin-start">8</property>
|
||||
<property name="margin-end">8</property>
|
||||
<property name="icon-name">image-missing</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="row-span">5</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="height">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
@@ -74,11 +75,11 @@
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="content_label">
|
||||
@@ -91,11 +92,11 @@
|
||||
<accessibility>
|
||||
<role type="static"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="resent_box">
|
||||
@@ -118,11 +119,11 @@
|
||||
<property name="uri">http://www.gtk.org</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
@@ -181,11 +182,11 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="details_revealer">
|
||||
@@ -250,11 +251,11 @@ FAVORITES</property>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -45,22 +45,43 @@ activate_about (GSimpleAction *action,
|
||||
"The GTK Team",
|
||||
NULL
|
||||
};
|
||||
char *version;
|
||||
GString *s;
|
||||
|
||||
s = g_string_new ("");
|
||||
|
||||
g_string_append (s, "System libraries\n");
|
||||
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
|
||||
glib_major_version,
|
||||
glib_minor_version,
|
||||
glib_micro_version);
|
||||
g_string_append_printf (s, "\tGTK\t%d.%d.%d\n",
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ());
|
||||
g_string_append_printf (s, "\nA link can apppear here: <http://www.gtk.org>");
|
||||
|
||||
version = g_strdup_printf ("%s\nRunning against GTK %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ());
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
||||
"program-name", "GTK Demo",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2013 The GTK Team",
|
||||
"version", version,
|
||||
"copyright", "© 1997—2019 The GTK Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK widgets",
|
||||
"authors", authors,
|
||||
"logo-icon-name", "org.gtk.Demo",
|
||||
"logo-icon-name", "org.gtk.Demo4",
|
||||
"title", "About GTK Demo",
|
||||
"system-information", s->str,
|
||||
NULL);
|
||||
|
||||
g_string_free (s, TRUE);
|
||||
g_free (version);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -84,6 +105,14 @@ activate_quit (GSimpleAction *action,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_inspector (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
gtk_window_set_interactive_debugging (TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
window_closed_cb (GtkWidget *window, gpointer data)
|
||||
{
|
||||
@@ -668,7 +697,7 @@ add_data_tab (const gchar *demoname)
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
||||
g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (notebook), widget),
|
||||
"tab-expand", TRUE,
|
||||
"tab-expand", FALSE,
|
||||
NULL);
|
||||
|
||||
g_free (resource_name);
|
||||
@@ -1200,6 +1229,7 @@ main (int argc, char **argv)
|
||||
static GActionEntry app_entries[] = {
|
||||
{ "about", activate_about, NULL, NULL, NULL },
|
||||
{ "quit", activate_quit, NULL, NULL, NULL },
|
||||
{ "inspector", activate_inspector, NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
/* Most code in gtk-demo is intended to be exemplary, but not
|
||||
@@ -1212,7 +1242,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
/* -- End of hack -- */
|
||||
|
||||
app = gtk_application_new ("org.gtk.Demo", G_APPLICATION_NON_UNIQUE|G_APPLICATION_HANDLES_COMMAND_LINE);
|
||||
app = gtk_application_new ("org.gtk.Demo4", G_APPLICATION_NON_UNIQUE|G_APPLICATION_HANDLES_COMMAND_LINE);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<menu id="gear_menu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Inspector</attribute>
|
||||
<attribute name="action">app.inspector</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_About GTK Demo</attribute>
|
||||
<attribute name="action">app.about</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
<object class="GtkTreeStore" id="treestore">
|
||||
<columns>
|
||||
<column type="gchararray"/>
|
||||
@@ -34,6 +47,13 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="valign">center</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
||||
@@ -70,12 +70,6 @@ change_orientation (GtkWidget *button,
|
||||
parent = gtk_widget_get_parent (menubar);
|
||||
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (parent));
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (parent), 1 - orientation);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_VERTICAL)
|
||||
g_object_set (menubar, "pack-direction", GTK_PACK_DIRECTION_TTB, NULL);
|
||||
else
|
||||
g_object_set (menubar, "pack-direction", GTK_PACK_DIRECTION_LTR, NULL);
|
||||
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
@@ -107,51 +101,41 @@ do_menus (GtkWidget *do_widget)
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
|
||||
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), box1);
|
||||
gtk_widget_show (box1);
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
gtk_widget_set_hexpand (menubar, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (box1), menubar);
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
menu = create_menu (2);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("test\nline2");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("foo");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (3));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("bar");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (4));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_container_add (GTK_CONTAINER (box1), box2);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
button = gtk_button_new_with_label ("Flip");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (change_orientation), menubar);
|
||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK(gtk_widget_destroy), window);
|
||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
|
||||
@@ -24,6 +24,7 @@ demos = files([
|
||||
'expander.c',
|
||||
'filtermodel.c',
|
||||
'fishbowl.c',
|
||||
'fixed.c',
|
||||
'foreigndrawing.c',
|
||||
'gestures.c',
|
||||
'glarea.c',
|
||||
@@ -134,11 +135,11 @@ foreach size: ['scalable', 'symbolic']
|
||||
endforeach
|
||||
|
||||
# desktop file
|
||||
install_data('org.gtk.Demo.desktop', install_dir: gtk_applicationsdir)
|
||||
install_data('org.gtk.Demo4.desktop', install_dir: gtk_applicationsdir)
|
||||
|
||||
# GSettings
|
||||
install_data('org.gtk.Demo.gschema.xml', install_dir: gtk_schemasdir)
|
||||
install_data('org.gtk.Demo4.gschema.xml', install_dir: gtk_schemasdir)
|
||||
gnome.compile_schemas()
|
||||
|
||||
# appdata
|
||||
install_data('org.gtk.Demo.appdata.xml', install_dir: gtk_appdatadir)
|
||||
install_data('org.gtk.Demo4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<child type="titlebar">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>org.gtk.Demo.desktop</id>
|
||||
<id>org.gtk.Demo4.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>LGPL-2.0+</project_license>
|
||||
<name>GTK Demo</name>
|
||||
@@ -2,7 +2,7 @@
|
||||
Name=GTK Demo
|
||||
Comment=GTK code examples and demonstrations
|
||||
Exec=gtk4-demo
|
||||
Icon=org.gtk.Demo
|
||||
Icon=org.gtk.Demo4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
<schemalist>
|
||||
|
||||
<enum id='org.gtk.Demo.Color'>
|
||||
<enum id='org.gtk.Demo4.Color'>
|
||||
<value nick='red' value='0'/>
|
||||
<value nick='green' value='1'/>
|
||||
<value nick='blue' value='2'/>
|
||||
</enum>
|
||||
|
||||
<schema id='org.gtk.Demo' path='/org/gtk/Demo/'>
|
||||
<key name='color' enum='org.gtk.Demo.Color'>
|
||||
<schema id='org.gtk.Demo4' path='/org/gtk/Demo4/'>
|
||||
<key name='color' enum='org.gtk.Demo4.Color'>
|
||||
<default>'red'</default>
|
||||
</key>
|
||||
<key name='window-size' type='(ii)'>
|
||||
@@ -57,7 +57,7 @@ do_overlay (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
gtk_widget_set_can_pick (vbox, FALSE);
|
||||
gtk_widget_set_can_target (vbox, FALSE);
|
||||
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@ do_overlay2 (GtkWidget *do_widget)
|
||||
|
||||
image = gtk_picture_new_for_resource ("/overlay2/decor1.png");
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
||||
gtk_widget_set_can_pick (image, FALSE);
|
||||
gtk_widget_set_can_target (image, FALSE);
|
||||
gtk_widget_set_halign (image, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_START);
|
||||
|
||||
image = gtk_picture_new_for_resource ("/overlay2/decor2.png");
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
||||
gtk_widget_set_can_pick (image, FALSE);
|
||||
gtk_widget_set_can_target (image, FALSE);
|
||||
gtk_widget_set_halign (image, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_END);
|
||||
|
||||
|
||||
@@ -27,10 +27,16 @@ toggle_resize (GtkWidget *widget,
|
||||
|
||||
is_child1 = (child == gtk_paned_get_child1 (paned));
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (paned), child,
|
||||
"resize", &resize,
|
||||
"shrink", &shrink,
|
||||
NULL);
|
||||
if (is_child1)
|
||||
g_object_get (paned,
|
||||
"resize-child1", &resize,
|
||||
"shrink-child1", &shrink,
|
||||
NULL);
|
||||
else
|
||||
g_object_get (paned,
|
||||
"resize-child2", &resize,
|
||||
"shrink-child2", &shrink,
|
||||
NULL);
|
||||
|
||||
g_object_ref (child);
|
||||
gtk_container_remove (GTK_CONTAINER (parent), child);
|
||||
@@ -55,10 +61,16 @@ toggle_shrink (GtkWidget *widget,
|
||||
|
||||
is_child1 = (child == gtk_paned_get_child1 (paned));
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (paned), child,
|
||||
"resize", &resize,
|
||||
"shrink", &shrink,
|
||||
NULL);
|
||||
if (is_child1)
|
||||
g_object_get (paned,
|
||||
"resize-child1", &resize,
|
||||
"shrink-child1", &shrink,
|
||||
NULL);
|
||||
else
|
||||
g_object_get (paned,
|
||||
"resize-child2", &resize,
|
||||
"shrink-child2", &shrink,
|
||||
NULL);
|
||||
|
||||
g_object_ref (child);
|
||||
gtk_container_remove (GTK_CONTAINER (parent), child);
|
||||
|
||||
@@ -76,8 +76,7 @@ do_password_entry (GtkWidget *do_widget)
|
||||
gtk_widget_set_sensitive (button, FALSE);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_window_set_default (GTK_WINDOW (window), button);
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="default-width">300</property>
|
||||
@@ -17,11 +18,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer1">
|
||||
@@ -33,11 +34,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer2">
|
||||
@@ -49,11 +50,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer3">
|
||||
@@ -64,11 +65,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer4">
|
||||
@@ -80,11 +81,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer5">
|
||||
@@ -96,11 +97,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer6">
|
||||
@@ -112,11 +113,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer7">
|
||||
@@ -127,11 +128,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer8">
|
||||
@@ -143,11 +144,11 @@
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="upper">4</property>
|
||||
@@ -31,11 +32,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="scale_plain"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_plain">
|
||||
@@ -47,11 +48,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label_plain"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_marks">
|
||||
@@ -60,11 +61,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="scale_marks"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_marks">
|
||||
@@ -83,11 +84,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label_marks"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_discrete">
|
||||
@@ -96,11 +97,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="scale_discrete"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_discrete">
|
||||
@@ -120,11 +121,11 @@
|
||||
<mark value="3" position="bottom"/>
|
||||
<mark value="4" position="bottom"/>
|
||||
</marks>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
|
||||
<property name="modal">1</property>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-builder">
|
||||
<property name="modal">1</property>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-clocks">
|
||||
<property name="modal">1</property>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-gedit">
|
||||
<property name="modal">1</property>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Shortcuts</property>
|
||||
|
||||
@@ -65,7 +65,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
widget = gtk_image_new_from_icon_name ("org.gtk.Demo");
|
||||
widget = gtk_image_new_from_icon_name ("org.gtk.Demo4");
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (widget), 256);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -228,7 +228,7 @@ puzzle_button_pressed (GtkGestureMultiPress *gesture,
|
||||
int l, t, i;
|
||||
int pos;
|
||||
|
||||
child = gtk_widget_pick (grid, x, y);
|
||||
child = gtk_widget_pick (grid, x, y, GTK_PICK_DEFAULT);
|
||||
|
||||
if (!child)
|
||||
{
|
||||
@@ -236,10 +236,7 @@ puzzle_button_pressed (GtkGestureMultiPress *gesture,
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (grid), child,
|
||||
"left-attach", &l,
|
||||
"top-attach", &t,
|
||||
NULL);
|
||||
gtk_grid_query_child (GTK_GRID (grid), child, &l, &t, NULL, NULL);
|
||||
|
||||
if (l == pos_x && t == pos_y)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkAdjustment" id="basic_adjustment">
|
||||
<property name="lower">-10000</property>
|
||||
@@ -35,11 +36,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">basic_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="basic_spin">
|
||||
@@ -49,21 +50,21 @@
|
||||
<property name="climb-rate">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="numeric">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="basic_label">
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -71,11 +72,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">hex_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="hex_spin">
|
||||
@@ -85,21 +86,21 @@
|
||||
<signal name="input" handler="hex_spin_input"/>
|
||||
<signal name="output" handler="hex_spin_output"/>
|
||||
<property name="wrap">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="hex_label">
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -107,11 +108,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">time_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="time_spin">
|
||||
@@ -121,21 +122,21 @@
|
||||
<signal name="input" handler="time_spin_input"/>
|
||||
<signal name="output" handler="time_spin_output"/>
|
||||
<property name="wrap">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="time_label">
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -143,11 +144,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">month_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="month_spin">
|
||||
@@ -158,21 +159,21 @@
|
||||
<property name="adjustment">month_adjustment</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="update-policy">if-valid</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="month_label">
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Stack</property>
|
||||
@@ -7,11 +8,11 @@
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="stack">stack</property>
|
||||
<property name="halign">center</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
@@ -25,7 +26,7 @@
|
||||
<object class="GtkImage">
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="icon-name">org.gtk.Demo</property>
|
||||
<property name="icon-name">org.gtk.Demo4</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
@@ -57,11 +58,11 @@
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -99,8 +99,7 @@ do_tagged_entry (GtkWidget *do_widget)
|
||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_window_set_default (GTK_WINDOW (window), button);
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="row-spacing">10</property>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -10,7 +10,7 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="org.gtk.IconBrowser-symbolic.svg"
|
||||
sodipodi:docname="org.gtk.IconBrowser4-symbolic.svg"
|
||||
height="16.03125"
|
||||
id="svg7384"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
@@ -68,6 +68,6 @@ IconBrowserApp *
|
||||
icon_browser_app_new (void)
|
||||
{
|
||||
return g_object_new (ICON_BROWSER_APP_TYPE,
|
||||
"application-id", "org.gtk.IconBrowser",
|
||||
"application-id", "org.gtk.IconBrowser4",
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ add_context (IconBrowserWindow *win,
|
||||
g_hash_table_insert (win->contexts, c->id, c);
|
||||
|
||||
row = gtk_label_new (name);
|
||||
gtk_label_set_xalign (GTK_LABEL (row), 0);
|
||||
g_object_set_data (G_OBJECT (row), "context", c);
|
||||
gtk_widget_show (row);
|
||||
g_object_set (row, "margin", 10, NULL);
|
||||
@@ -285,19 +286,6 @@ populate (IconBrowserWindow *win)
|
||||
g_strfreev (groups);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
key_event_cb (GtkEventController *controller,
|
||||
guint keyval,
|
||||
guint keycode,
|
||||
GdkModifierType state,
|
||||
gpointer data)
|
||||
{
|
||||
IconBrowserWindow *win = data;
|
||||
|
||||
return gtk_search_bar_handle_event (GTK_SEARCH_BAR (win->searchbar),
|
||||
gtk_get_current_event ());
|
||||
}
|
||||
|
||||
static void
|
||||
copy_to_clipboard (GtkButton *button,
|
||||
IconBrowserWindow *win)
|
||||
@@ -452,7 +440,6 @@ static void
|
||||
icon_browser_window_init (IconBrowserWindow *win)
|
||||
{
|
||||
GdkContentFormats *list;
|
||||
GtkEventController *controller;
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (win));
|
||||
|
||||
@@ -479,13 +466,11 @@ icon_browser_window_init (IconBrowserWindow *win)
|
||||
|
||||
g_signal_connect (win->searchbar, "notify::search-mode-enabled",
|
||||
G_CALLBACK (search_mode_toggled), win);
|
||||
gtk_search_bar_set_key_capture_widget (GTK_SEARCH_BAR (win->searchbar),
|
||||
GTK_WIDGET (win));
|
||||
|
||||
symbolic_toggled (GTK_TOGGLE_BUTTON (win->symbolic_radio), win);
|
||||
|
||||
controller = gtk_event_controller_key_new ();
|
||||
g_signal_connect (controller, "key-pressed", G_CALLBACK (key_event_cb), win);
|
||||
gtk_widget_add_controller (GTK_WIDGET (win), controller);
|
||||
|
||||
populate (win);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ executable('gtk4-icon-browser',
|
||||
link_args: extra_demo_ldflags,
|
||||
install: true)
|
||||
|
||||
install_data('org.gtk.IconBrowser.desktop', install_dir: gtk_applicationsdir)
|
||||
install_data('org.gtk.IconBrowser4.desktop', install_dir: gtk_applicationsdir)
|
||||
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Name=Icon Browser
|
||||
Comment=An application that shows themed icons
|
||||
Exec=gtk4-icon-browser
|
||||
Icon=org.gtk.IconBrowser
|
||||
Icon=org.gtk.IconBrowser4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="IconStore" id="store"/>
|
||||
<object class="GtkTreeModelFilter" id="filter_model">
|
||||
@@ -46,7 +47,6 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -121,6 +121,7 @@
|
||||
<property name="hide-on-close">1</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="margin">10</property>
|
||||
@@ -134,11 +135,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label1"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
@@ -147,11 +148,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label2"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image3">
|
||||
@@ -160,11 +161,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label3"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image4">
|
||||
@@ -173,11 +174,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label4"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image5">
|
||||
@@ -186,11 +187,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label5"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image6">
|
||||
@@ -199,11 +200,11 @@
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="label6"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">5</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">5</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
@@ -216,11 +217,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="image1"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
@@ -233,11 +234,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="image2"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
@@ -250,11 +251,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="image3"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
@@ -267,11 +268,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="image4"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
@@ -284,11 +285,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="image5"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label6">
|
||||
@@ -301,11 +302,11 @@
|
||||
<accessibility>
|
||||
<relation type="label-for" target="image6"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">5</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">5</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -13,7 +13,7 @@ executable('gtk4-widget-factory',
|
||||
install: true)
|
||||
|
||||
# desktop file
|
||||
install_data('org.gtk.WidgetFactory.desktop', install_dir: gtk_applicationsdir)
|
||||
install_data('org.gtk.WidgetFactory4.desktop', install_dir: gtk_applicationsdir)
|
||||
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
@@ -25,4 +25,4 @@ foreach size: ['scalable', 'symbolic']
|
||||
endforeach
|
||||
|
||||
# appdata
|
||||
install_data('org.gtk.WidgetFactory.appdata.xml', install_dir: gtk_appdatadir)
|
||||
install_data('org.gtk.WidgetFactory4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>org.gtk.WidgetFactory.desktop</id>
|
||||
<id>org.gtk.WidgetFactory4.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>LGPL-2.0+</project_license>
|
||||
<name>GTK Widget Factory</name>
|
||||
@@ -2,7 +2,7 @@
|
||||
Name=Widget Factory
|
||||
Comment=A showcase for GTK widgets, designed for testing themes.
|
||||
Exec=gtk4-widget-factory
|
||||
Icon=org.gtk.WidgetFactory
|
||||
Icon=org.gtk.WidgetFactory4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
@@ -227,12 +227,12 @@ activate_about (GSimpleAction *action,
|
||||
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
||||
"program-name", "GTK Widget Factory",
|
||||
"version", version,
|
||||
"copyright", "(C) 1997-2013 The GTK Team",
|
||||
"copyright", "© 1997—2019 The GTK Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK themes and widgets",
|
||||
"authors", authors,
|
||||
"logo-icon-name", "org.gtk.WidgetFactory",
|
||||
"logo-icon-name", "org.gtk.WidgetFactory4",
|
||||
"title", "About GTK Widget Factory",
|
||||
"system-information", s->str,
|
||||
NULL);
|
||||
@@ -262,6 +262,14 @@ activate_quit (GSimpleAction *action,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_inspector (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
gtk_window_set_interactive_debugging (TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
|
||||
{
|
||||
@@ -1657,13 +1665,13 @@ activate (GApplication *app)
|
||||
g_type_ensure (my_text_view_get_type ());
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory/widget-factory.css");
|
||||
gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory4/widget-factory.css");
|
||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||
g_object_unref (provider);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/WidgetFactory/widget-factory.ui");
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/WidgetFactory4/widget-factory.ui");
|
||||
gtk_builder_add_callback_symbol (builder, "on_entry_icon_release", (GCallback)on_entry_icon_release);
|
||||
gtk_builder_add_callback_symbol (builder, "on_scale_button_value_changed", (GCallback)on_scale_button_value_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "on_scale_button_query_tooltip", (GCallback)on_scale_button_query_tooltip);
|
||||
@@ -1935,6 +1943,7 @@ main (int argc, char *argv[])
|
||||
static GActionEntry app_entries[] = {
|
||||
{ "about", activate_about, NULL, NULL, NULL },
|
||||
{ "quit", activate_quit, NULL, NULL, NULL },
|
||||
{ "inspector", activate_inspector, NULL, NULL, NULL },
|
||||
{ "main", NULL, "s", "'steak'", NULL },
|
||||
{ "wine", NULL, NULL, "false", NULL },
|
||||
{ "beer", NULL, NULL, "false", NULL },
|
||||
@@ -1944,7 +1953,7 @@ main (int argc, char *argv[])
|
||||
};
|
||||
gint status;
|
||||
|
||||
app = gtk_application_new ("org.gtk.WidgetFactory", G_APPLICATION_NON_UNIQUE);
|
||||
app = gtk_application_new ("org.gtk.WidgetFactory4", G_APPLICATION_NON_UNIQUE);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gtk/WidgetFactory">
|
||||
<gresource prefix="/org/gtk/WidgetFactory4">
|
||||
<file preprocess="xml-stripblanks">widget-factory.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/WidgetFactory">
|
||||
<gresource prefix="/org/gtk/WidgetFactory4">
|
||||
<file>widget-factory.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/WidgetFactory/gtk">
|
||||
<gresource prefix="/org/gtk/WidgetFactory4/gtk">
|
||||
<file preprocess="xml-stripblanks">help-overlay.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/WidgetFactory">
|
||||
<gresource prefix="/org/gtk/WidgetFactory4">
|
||||
<file>icons/16x16/actions/document-new.png</file>
|
||||
<file>icons/16x16/actions/document-save.png</file>
|
||||
<file>icons/16x16/actions/edit-find.png</file>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<menu id="gear_menu">
|
||||
<section>
|
||||
@@ -15,6 +16,10 @@
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Inspector</attribute>
|
||||
<attribute name="action">app.inspector</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
||||
<attribute name="action">win.show-help-overlay</attribute>
|
||||
@@ -593,32 +598,32 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton2">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton3">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="inconsistent">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton4">
|
||||
@@ -626,22 +631,22 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton5">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton6">
|
||||
@@ -649,22 +654,22 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="inconsistent">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">5</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton1">
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton2">
|
||||
@@ -672,11 +677,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton3">
|
||||
@@ -685,11 +690,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton4">
|
||||
@@ -697,11 +702,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton5">
|
||||
@@ -710,11 +715,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton3</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton6">
|
||||
@@ -724,46 +729,47 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton3</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">5</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner1">
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner2"/>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
<object class="GtkSpinner" id="spinner2">
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner3">
|
||||
<property name="active">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner4">
|
||||
<property name="sensitive">0</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">4</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1502,11 +1508,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="value">.5</property>
|
||||
<property name="halign">center</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScaleButton" id="mic-button">
|
||||
@@ -1520,11 +1526,11 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="halign">center</property>
|
||||
<signal name="query-tooltip" handler="on_scale_button_query_tooltip" swapped="no"/>
|
||||
<signal name="value-changed" handler="on_scale_button_value_changed" swapped="no"/>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1569,7 +1575,7 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="title">Logo</property>
|
||||
<property name="child">
|
||||
<object class="GtkImage" id="imageo">
|
||||
<property name="icon-name">gtk3-widget-factory</property>
|
||||
<property name="icon-name">org.gtk.WidgetFactory4</property>
|
||||
<property name="pixel-size">256</property>
|
||||
</object>
|
||||
</property>
|
||||
@@ -2874,6 +2880,17 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<child>
|
||||
<object class="GtkNotebook">
|
||||
<property name="show-border">0</property>
|
||||
<child type="action-end">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="valign">center</property>
|
||||
<property name="popover">notebook_info_popover2</property>
|
||||
<property name="icon-name">emblem-important-symbolic</property>
|
||||
<property name="relief">none</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="tab-expand">1</property>
|
||||
@@ -3137,6 +3154,7 @@ bad things might happen.</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<property name="title" translatable="yes">Zelda</property>
|
||||
<property name="hide-on-close">1</property>
|
||||
<property name="default-widget">act_action_dialog</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
@@ -3158,8 +3176,6 @@ bad things might happen.</property>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="act_action_dialog">
|
||||
<property name="can-default">1</property>
|
||||
<property name="has-default">1</property>
|
||||
<property name="label" translatable="yes">_Act</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
@@ -3193,20 +3209,20 @@ bad things might happen.</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="details_entry">
|
||||
<property name="valign">baseline</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -3218,20 +3234,20 @@ bad things might happen.</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="more_details_entry">
|
||||
<property name="valign">baseline</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -3243,22 +3259,22 @@ bad things might happen.</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="level_scale">
|
||||
<property name="valign">baseline</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
@@ -3270,21 +3286,21 @@ bad things might happen.</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="mode_switch">
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">baseline</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -3297,6 +3313,7 @@ bad things might happen.</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<property name="title" translatable="yes">Choose one</property>
|
||||
<property name="hide-on-close">1</property>
|
||||
<property name="default-widget">select_selection_dialog</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
@@ -3318,8 +3335,6 @@ bad things might happen.</property>
|
||||
</child>
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="select_selection_dialog">
|
||||
<property name="can-default">1</property>
|
||||
<property name="has-default">1</property>
|
||||
<property name="label" translatable="yes">_Select</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
@@ -3342,11 +3357,11 @@ bad things might happen.</property>
|
||||
<accessibility>
|
||||
<relation type="label-for" target="open_popover_entry"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="description_label">
|
||||
@@ -3356,11 +3371,11 @@ bad things might happen.</property>
|
||||
<accessibility>
|
||||
<relation type="label-for" target="open_popover_textview"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
@@ -3377,11 +3392,12 @@ bad things might happen.</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="open_popover_entry">
|
||||
@@ -3389,27 +3405,57 @@ bad things might happen.</property>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="title_label"/>
|
||||
</accessibility>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkExpander">
|
||||
<child type="label">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Extra Info</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry">
|
||||
<property name="placeholder-text">Tell me anything…</property>
|
||||
</object>
|
||||
</child>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="halign">end</property>
|
||||
<property name="icon-name">emblem-system-symbolic</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="open_popover_button">
|
||||
<property name="halign">end</property>
|
||||
<property name="halign">fill</property>
|
||||
<property name="label">_Open</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-default">1</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -3433,8 +3479,9 @@ bad things might happen.</property>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkPopover" id="notebook_info_popover">
|
||||
<property name="modal">0</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="notebook_info_label">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">No updates at this time</property>
|
||||
<accessibility>
|
||||
<role type="static"/>
|
||||
@@ -3442,4 +3489,39 @@ bad things might happen.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="notebook_info_popover3">
|
||||
<property name="modal">0</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">You're in too deep!</property>
|
||||
<accessibility>
|
||||
<role type="static"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="notebook_info_popover2">
|
||||
<property name="modal">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Hidden gems:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="valign">center</property>
|
||||
<property name="popover">notebook_info_popover3</property>
|
||||
<property name="icon-name">emblem-important-symbolic</property>
|
||||
<property name="relief">none</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
@@ -231,10 +231,9 @@ gdk_surface_get_scale_factor
|
||||
gdk_surface_set_opaque_region
|
||||
gdk_surface_create_gl_context
|
||||
gdk_surface_create_vulkan_context
|
||||
gdk_surface_create_cairo_context
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_surface_invalidate_rect
|
||||
gdk_surface_invalidate_region
|
||||
gdk_surface_queue_expose
|
||||
gdk_surface_freeze_updates
|
||||
gdk_surface_thaw_updates
|
||||
@@ -262,9 +261,6 @@ gdk_surface_get_modal_hint
|
||||
gdk_surface_set_type_hint
|
||||
gdk_surface_get_type_hint
|
||||
gdk_surface_set_shadow_width
|
||||
gdk_surface_set_skip_taskbar_hint
|
||||
gdk_surface_set_skip_pager_hint
|
||||
gdk_surface_set_urgency_hint
|
||||
gdk_surface_get_position
|
||||
gdk_surface_get_root_origin
|
||||
gdk_surface_get_frame_extents
|
||||
@@ -280,8 +276,6 @@ gdk_surface_peek_children
|
||||
gdk_surface_set_icon_name
|
||||
gdk_surface_set_transient_for
|
||||
gdk_surface_set_startup_id
|
||||
gdk_surface_set_group
|
||||
gdk_surface_get_group
|
||||
gdk_surface_set_decorations
|
||||
gdk_surface_get_decorations
|
||||
GdkWMDecoration
|
||||
@@ -502,10 +496,6 @@ gdk_device_get_n_keys
|
||||
gdk_device_get_axes
|
||||
gdk_device_get_seat
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_grab
|
||||
gdk_device_ungrab
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_get_state
|
||||
gdk_device_get_position
|
||||
@@ -999,9 +989,7 @@ gdk_wayland_device_get_wl_seat
|
||||
gdk_wayland_display_get_wl_compositor
|
||||
gdk_wayland_display_get_wl_display
|
||||
gdk_wayland_display_query_registry
|
||||
gdk_wayland_surface_new_subsurface
|
||||
gdk_wayland_surface_get_wl_surface
|
||||
gdk_wayland_surface_set_use_custom_surface
|
||||
GdkWaylandSurfaceExported
|
||||
gdk_wayland_surface_export_handle
|
||||
gdk_wayland_surface_unexport_handle
|
||||
|
||||
@@ -62,6 +62,7 @@ gsk_outset_shadow_node_get_spread
|
||||
gsk_outset_shadow_node_get_blur_radius
|
||||
gsk_cairo_node_new
|
||||
gsk_cairo_node_get_draw_context
|
||||
gsk_cairo_node_peek_surface
|
||||
gsk_container_node_new
|
||||
gsk_container_node_get_n_children
|
||||
gsk_container_node_get_child
|
||||
@@ -88,6 +89,7 @@ GskShadow
|
||||
gsk_shadow_node_new
|
||||
gsk_shadow_node_peek_shadow
|
||||
gsk_shadow_node_get_n_shadows
|
||||
gsk_shadow_node_get_child
|
||||
GskBlendMode
|
||||
gsk_blend_node_new
|
||||
gsk_blend_node_get_bottom_child
|
||||
@@ -103,6 +105,7 @@ gsk_text_node_peek_glyphs
|
||||
gsk_text_node_peek_color
|
||||
gsk_text_node_get_x
|
||||
gsk_text_node_get_y
|
||||
gsk_text_node_get_num_glyphs
|
||||
gsk_blur_node_new
|
||||
gsk_blur_node_get_child
|
||||
gsk_blur_node_get_radius
|
||||
@@ -152,6 +155,8 @@ gsk_transform_get_category
|
||||
<SUBSECTION>
|
||||
gsk_transform_print
|
||||
gsk_transform_to_string
|
||||
gsk_transform_parse
|
||||
<SUBSECTION>
|
||||
gsk_transform_to_matrix
|
||||
gsk_transform_to_2d
|
||||
gsk_transform_to_affine
|
||||
@@ -160,6 +165,7 @@ gsk_transform_to_translate
|
||||
gsk_transform_transform
|
||||
gsk_transform_invert
|
||||
gsk_transform_matrix
|
||||
gsk_transform_matrix_with_category
|
||||
gsk_transform_translate
|
||||
gsk_transform_translate_3d
|
||||
gsk_transform_rotate
|
||||
|
||||
@@ -54,16 +54,6 @@ Start your applications like this:
|
||||
<programlisting>
|
||||
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk4-demo
|
||||
</programlisting>
|
||||
|
||||
You can add password protection for your session by creating a file in
|
||||
<filename>$XDG_CONFIG_HOME/broadway.passwd</filename> or <filename>$HOME/.config/broadway.passwd</filename>
|
||||
with a crypt(3) style password hash.
|
||||
|
||||
A simple way to generate it is with openssl:
|
||||
<programlisting>
|
||||
openssl passwd -1 > ~/.config/broadway.passwd
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
<xi:include href="xml/gtkheaderbar.xml" />
|
||||
<xi:include href="xml/gtkoverlay.xml" />
|
||||
<xi:include href="xml/gtkpaned.xml" />
|
||||
<xi:include href="xml/gtklayout.xml" />
|
||||
<xi:include href="xml/gtknotebook.xml" />
|
||||
<xi:include href="xml/gtkexpander.xml" />
|
||||
<xi:include href="xml/gtkorientable.xml" />
|
||||
@@ -104,7 +103,11 @@
|
||||
<title>Layout Managers</title>
|
||||
<xi:include href="xml/gtklayoutmanager.xml" />
|
||||
<xi:include href="xml/gtklayoutchild.xml" />
|
||||
<xi:include href="xml/gtkbinlayout.xml" />
|
||||
<xi:include href="xml/gtkboxlayout.xml" />
|
||||
<xi:include href="xml/gtkcustomlayout.xml" />
|
||||
<xi:include href="xml/gtkfixedlayout.xml" />
|
||||
<xi:include href="xml/gtkgridlayout.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="DisplayWidgets">
|
||||
|
||||
@@ -362,6 +362,8 @@ gtk_list_box_get_selected_row
|
||||
GtkListBoxForeachFunc
|
||||
gtk_list_box_selected_foreach
|
||||
gtk_list_box_get_selected_rows
|
||||
gtk_list_box_set_show_separators
|
||||
gtk_list_box_get_show_separators
|
||||
|
||||
gtk_list_box_set_selection_mode
|
||||
gtk_list_box_get_selection_mode
|
||||
@@ -744,10 +746,8 @@ gtk_combo_box_text_get_type
|
||||
<TITLE>GtkContainer</TITLE>
|
||||
GtkContainer
|
||||
GtkContainerClass
|
||||
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID
|
||||
gtk_container_add
|
||||
gtk_container_remove
|
||||
gtk_container_add_with_properties
|
||||
gtk_container_foreach
|
||||
gtk_container_get_children
|
||||
gtk_container_get_path_for_child
|
||||
@@ -756,19 +756,7 @@ gtk_container_set_focus_vadjustment
|
||||
gtk_container_get_focus_hadjustment
|
||||
gtk_container_set_focus_hadjustment
|
||||
gtk_container_child_type
|
||||
gtk_container_child_get
|
||||
gtk_container_child_set
|
||||
gtk_container_child_get_property
|
||||
gtk_container_child_set_property
|
||||
gtk_container_child_get_valist
|
||||
gtk_container_child_set_valist
|
||||
gtk_container_child_notify
|
||||
gtk_container_child_notify_by_pspec
|
||||
gtk_container_forall
|
||||
gtk_container_class_find_child_property
|
||||
gtk_container_class_install_child_property
|
||||
gtk_container_class_install_child_properties
|
||||
gtk_container_class_list_child_properties
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CONTAINER
|
||||
@@ -1739,27 +1727,6 @@ GtkLabelPrivate
|
||||
GtkLabelSelectionInfo
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtklayout</FILE>
|
||||
<TITLE>GtkLayout</TITLE>
|
||||
GtkLayout
|
||||
gtk_layout_new
|
||||
gtk_layout_put
|
||||
gtk_layout_move
|
||||
gtk_layout_set_size
|
||||
gtk_layout_get_size
|
||||
<SUBSECTION Standard>
|
||||
GTK_LAYOUT
|
||||
GTK_IS_LAYOUT
|
||||
GTK_TYPE_LAYOUT
|
||||
GTK_LAYOUT_CLASS
|
||||
GTK_IS_LAYOUT_CLASS
|
||||
GTK_LAYOUT_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkLayoutPrivate
|
||||
gtk_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtklinkbutton</FILE>
|
||||
<TITLE>GtkLinkButton</TITLE>
|
||||
@@ -1812,7 +1779,6 @@ GtkMenu
|
||||
GtkArrowPlacement
|
||||
gtk_menu_new
|
||||
gtk_menu_new_from_model
|
||||
gtk_menu_set_display
|
||||
gtk_menu_reorder_child
|
||||
gtk_menu_popup_at_rect
|
||||
gtk_menu_popup_at_widget
|
||||
@@ -1854,11 +1820,6 @@ gtk_menu_get_type
|
||||
GtkMenuBar
|
||||
gtk_menu_bar_new
|
||||
gtk_menu_bar_new_from_model
|
||||
GtkPackDirection
|
||||
gtk_menu_bar_set_pack_direction
|
||||
gtk_menu_bar_get_pack_direction
|
||||
gtk_menu_bar_set_child_pack_direction
|
||||
gtk_menu_bar_get_child_pack_direction
|
||||
<SUBSECTION Standard>
|
||||
GTK_MENU_BAR
|
||||
GTK_IS_MENU_BAR
|
||||
@@ -2514,7 +2475,6 @@ gtk_search_bar_get_search_mode
|
||||
gtk_search_bar_set_search_mode
|
||||
gtk_search_bar_get_show_close_button
|
||||
gtk_search_bar_set_show_close_button
|
||||
gtk_search_bar_handle_event
|
||||
gtk_search_bar_set_key_capture_widget
|
||||
gtk_search_bar_get_key_capture_widget
|
||||
<SUBSECTION Standard>
|
||||
@@ -2533,7 +2493,6 @@ gtk_search_bar_get_type
|
||||
<TITLE>GtkSearchEntry</TITLE>
|
||||
GtkSearchEntry
|
||||
gtk_search_entry_new
|
||||
gtk_search_entry_handle_event
|
||||
gtk_search_entry_set_key_capture_widget
|
||||
gtk_search_entry_get_key_capture_widget
|
||||
<SUBSECTION Standard>
|
||||
@@ -4473,13 +4432,10 @@ gtk_widget_event
|
||||
gtk_widget_activate
|
||||
gtk_widget_is_focus
|
||||
gtk_widget_grab_focus
|
||||
gtk_widget_grab_default
|
||||
gtk_widget_set_name
|
||||
gtk_widget_get_name
|
||||
gtk_widget_set_sensitive
|
||||
gtk_widget_set_parent
|
||||
gtk_widget_set_parent_surface
|
||||
gtk_widget_get_parent_surface
|
||||
gtk_widget_get_toplevel
|
||||
gtk_widget_get_root
|
||||
gtk_widget_get_ancestor
|
||||
@@ -4508,8 +4464,6 @@ gtk_widget_class_set_accessible_type
|
||||
gtk_widget_class_set_accessible_role
|
||||
gtk_widget_get_accessible
|
||||
gtk_widget_child_focus
|
||||
gtk_widget_child_notify
|
||||
gtk_widget_freeze_child_notify
|
||||
gtk_widget_get_child_visible
|
||||
gtk_widget_get_parent
|
||||
gtk_widget_get_settings
|
||||
@@ -4519,7 +4473,6 @@ gtk_widget_get_display
|
||||
gtk_widget_get_size_request
|
||||
gtk_widget_set_child_visible
|
||||
gtk_widget_set_size_request
|
||||
gtk_widget_thaw_child_notify
|
||||
gtk_widget_list_mnemonic_labels
|
||||
gtk_widget_add_mnemonic_label
|
||||
gtk_widget_remove_mnemonic_label
|
||||
@@ -4547,16 +4500,15 @@ gtk_widget_compute_bounds
|
||||
gtk_widget_compute_transform
|
||||
gtk_widget_compute_point
|
||||
gtk_widget_contains
|
||||
GtkPickFlags
|
||||
gtk_widget_pick
|
||||
gtk_widget_get_can_default
|
||||
gtk_widget_set_can_default
|
||||
gtk_widget_get_can_focus
|
||||
gtk_widget_set_can_focus
|
||||
gtk_widget_get_focus_on_click
|
||||
gtk_widget_set_focus_on_click
|
||||
gtk_widget_set_focus_child
|
||||
gtk_widget_get_can_pick
|
||||
gtk_widget_set_can_pick
|
||||
gtk_widget_get_can_target
|
||||
gtk_widget_set_can_target
|
||||
gtk_widget_get_has_surface
|
||||
gtk_widget_set_has_surface
|
||||
gtk_widget_get_sensitive
|
||||
@@ -4582,13 +4534,15 @@ gtk_widget_get_realized
|
||||
gtk_widget_get_mapped
|
||||
gtk_widget_device_is_shadowed
|
||||
gtk_widget_get_modifier_mask
|
||||
gtk_widget_insert_action_group
|
||||
gtk_widget_get_opacity
|
||||
gtk_widget_set_opacity
|
||||
gtk_widget_get_overflow
|
||||
gtk_widget_set_overflow
|
||||
gtk_widget_insert_action_group
|
||||
gtk_widget_list_action_prefixes
|
||||
gtk_widget_get_action_group
|
||||
gtk_widget_activate_action
|
||||
gtk_widget_activate_default
|
||||
gtk_widget_measure
|
||||
gtk_widget_snapshot_child
|
||||
gtk_widget_get_next_sibling
|
||||
@@ -4691,8 +4645,6 @@ gtk_window_set_resizable
|
||||
gtk_window_get_resizable
|
||||
gtk_window_add_accel_group
|
||||
gtk_window_remove_accel_group
|
||||
gtk_window_activate_focus
|
||||
gtk_window_activate_default
|
||||
gtk_window_set_modal
|
||||
gtk_window_set_default_size
|
||||
gtk_window_set_hide_on_close
|
||||
@@ -4715,7 +4667,7 @@ gtk_window_propagate_key_event
|
||||
gtk_window_get_focus
|
||||
gtk_window_set_focus
|
||||
gtk_window_get_default_widget
|
||||
gtk_window_set_default
|
||||
gtk_window_set_default_widget
|
||||
gtk_window_present
|
||||
gtk_window_present_with_time
|
||||
gtk_window_close
|
||||
@@ -4736,9 +4688,6 @@ gtk_window_set_decorated
|
||||
gtk_window_set_deletable
|
||||
gtk_window_set_mnemonic_modifier
|
||||
gtk_window_set_type_hint
|
||||
gtk_window_set_skip_taskbar_hint
|
||||
gtk_window_set_skip_pager_hint
|
||||
gtk_window_set_urgency_hint
|
||||
gtk_window_set_accept_focus
|
||||
gtk_window_set_focus_on_map
|
||||
gtk_window_set_startup_id
|
||||
@@ -4755,9 +4704,6 @@ gtk_window_get_title
|
||||
gtk_window_get_transient_for
|
||||
gtk_window_get_attached_to
|
||||
gtk_window_get_type_hint
|
||||
gtk_window_get_skip_taskbar_hint
|
||||
gtk_window_get_skip_pager_hint
|
||||
gtk_window_get_urgency_hint
|
||||
gtk_window_get_accept_focus
|
||||
gtk_window_get_focus_on_map
|
||||
gtk_window_get_group
|
||||
@@ -5055,8 +5001,6 @@ gtk_style_context_get_state
|
||||
gtk_style_context_get_valist
|
||||
gtk_style_context_get_section
|
||||
gtk_style_context_get_color
|
||||
gtk_style_context_get_background_color
|
||||
gtk_style_context_get_border_color
|
||||
gtk_style_context_get_border
|
||||
gtk_style_context_get_padding
|
||||
gtk_style_context_get_margin
|
||||
@@ -5120,27 +5064,28 @@ gtk_border_get_type
|
||||
<FILE>gtkcssprovider</FILE>
|
||||
<TITLE>GtkCssProvider</TITLE>
|
||||
GtkCssProvider
|
||||
gtk_css_provider_get_named
|
||||
gtk_css_provider_load_named
|
||||
gtk_css_provider_load_from_data
|
||||
gtk_css_provider_load_from_file
|
||||
gtk_css_provider_load_from_path
|
||||
gtk_css_provider_load_from_resource
|
||||
gtk_css_provider_new
|
||||
gtk_css_provider_to_string
|
||||
GTK_CSS_PROVIDER_ERROR
|
||||
GtkCssProviderError
|
||||
GTK_CSS_PARSER_ERROR
|
||||
GtkCssParserError
|
||||
GtkCssParserWarning
|
||||
<SUBSECTION>
|
||||
GtkCssLocation
|
||||
GtkCssSection
|
||||
GtkCssSectionType
|
||||
gtk_css_section_get_end_line
|
||||
gtk_css_section_get_end_position
|
||||
gtk_css_section_get_file
|
||||
gtk_css_section_get_parent
|
||||
gtk_css_section_get_section_type
|
||||
gtk_css_section_get_start_line
|
||||
gtk_css_section_get_start_position
|
||||
gtk_css_section_new
|
||||
gtk_css_section_ref
|
||||
gtk_css_section_unref
|
||||
gtk_css_section_print
|
||||
gtk_css_section_to_string
|
||||
gtk_css_section_get_file
|
||||
gtk_css_section_get_parent
|
||||
gtk_css_section_get_start_location
|
||||
gtk_css_section_get_end_location
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_CSS_PROVIDER
|
||||
GTK_CSS_PROVIDER
|
||||
@@ -6569,6 +6514,7 @@ GtkEventController
|
||||
GtkPropagationPhase
|
||||
gtk_event_controller_get_propagation_phase
|
||||
gtk_event_controller_set_propagation_phase
|
||||
gtk_event_controller_get_responsive
|
||||
gtk_event_controller_handle_event
|
||||
gtk_event_controller_get_widget
|
||||
gtk_event_controller_reset
|
||||
@@ -7215,3 +7161,85 @@ gtk_box_layout_get_baseline_position
|
||||
GTK_TYPE_BOX_LAYOUT
|
||||
gtk_box_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcustomlayout</FILE>
|
||||
GtkCustomLayout
|
||||
|
||||
GtkCustomRequestModeFunc
|
||||
GtkCustomMeasureFunc
|
||||
GtkCustomAllocateFunc
|
||||
|
||||
gtk_custom_layout_new
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_CUSTOM_LAYOUT
|
||||
gtk_custom_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkbinlayout</FILE>
|
||||
GtkBinLayout
|
||||
|
||||
gtk_bin_layout_new
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_BIN_LAYOUT
|
||||
gtk_bin_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkfixedlayout</FILE>
|
||||
GtkFixedLayout
|
||||
|
||||
gtk_fixed_layout_new
|
||||
|
||||
<SUBSECTION>
|
||||
GtkFixedLayoutChild
|
||||
|
||||
gtk_fixed_layout_child_set_position
|
||||
gtk_fixed_layout_child_get_position
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_FIXED_LAYOUT
|
||||
gtk_fixed_layout_get_type
|
||||
GTK_TYPE_FIXED_LAYOUT_CHILD
|
||||
gtk_fixed_layout_child_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkgridlayout</FILE>
|
||||
GtkGridLayout
|
||||
|
||||
gtk_grid_layout_new
|
||||
gtk_grid_layout_set_row_homogeneous
|
||||
gtk_grid_layout_get_row_homogeneous
|
||||
gtk_grid_layout_set_row_spacing
|
||||
gtk_grid_layout_get_row_spacing
|
||||
gtk_grid_layout_set_column_homogeneous
|
||||
gtk_grid_layout_get_column_homogeneous
|
||||
gtk_grid_layout_set_column_spacing
|
||||
gtk_grid_layout_get_column_spacing
|
||||
gtk_grid_layout_set_row_baseline_position
|
||||
gtk_grid_layout_get_row_baseline_position
|
||||
gtk_grid_layout_set_baseline_row
|
||||
gtk_grid_layout_get_baseline_row
|
||||
|
||||
<SUBSECTION>
|
||||
GtkGridLayoutChild
|
||||
|
||||
gtk_grid_layout_child_set_top_attach
|
||||
gtk_grid_layout_child_get_top_attach
|
||||
gtk_grid_layout_child_set_left_attach
|
||||
gtk_grid_layout_child_get_left_attach
|
||||
gtk_grid_layout_child_set_column_span
|
||||
gtk_grid_layout_child_get_column_span
|
||||
gtk_grid_layout_child_set_row_span
|
||||
gtk_grid_layout_child_get_row_span
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_GRID_LAYOUT
|
||||
gtk_grid_layout_get_type
|
||||
GTK_TYPE_GRID_LAYOUT_CHILD
|
||||
gtk_grid_layout_child_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -16,7 +16,9 @@ gtk_aspect_frame_get_type
|
||||
gtk_assistant_get_type
|
||||
gtk_assistant_page_get_type
|
||||
gtk_bin_get_type
|
||||
gtk_bin_layout_get_type
|
||||
gtk_box_get_type
|
||||
gtk_box_layout_get_type
|
||||
gtk_builder_get_type
|
||||
gtk_buildable_get_type
|
||||
gtk_button_get_type
|
||||
@@ -64,6 +66,7 @@ gtk_file_chooser_get_type
|
||||
gtk_file_chooser_widget_get_type
|
||||
gtk_file_filter_get_type
|
||||
gtk_fixed_get_type
|
||||
gtk_fixed_layout_get_type
|
||||
gtk_flow_box_get_type
|
||||
gtk_flow_box_child_get_type
|
||||
gtk_font_button_get_type
|
||||
@@ -83,6 +86,8 @@ gtk_gesture_swipe_get_type
|
||||
gtk_gesture_zoom_get_type
|
||||
gtk_gl_area_get_type
|
||||
gtk_grid_get_type
|
||||
gtk_grid_layout_child_get_type
|
||||
gtk_grid_layout_get_type
|
||||
gtk_header_bar_get_type
|
||||
gtk_icon_theme_get_type
|
||||
gtk_icon_view_get_type
|
||||
@@ -92,7 +97,8 @@ gtk_im_context_simple_get_type
|
||||
gtk_im_multicontext_get_type
|
||||
gtk_info_bar_get_type
|
||||
gtk_label_get_type
|
||||
gtk_layout_get_type
|
||||
gtk_layout_child_get_type
|
||||
gtk_layout_manager_get_type
|
||||
gtk_link_button_get_type
|
||||
gtk_list_store_get_type
|
||||
gtk_list_box_get_type
|
||||
|
||||
@@ -665,6 +665,16 @@
|
||||
pass-through == !can-pick.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Use GtkFixed instead of GtkLayout</title>
|
||||
<para>
|
||||
Since GtkScrolledWindow can deal with widgets that do not implement
|
||||
the GtkScrollable interface by automatically wrapping them into a
|
||||
GtkViewport, GtkLayout is redundant, and has been removed in favor
|
||||
of the existing GtkFixed container widget.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppPrefs" parent="GtkDialog">
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
@@ -16,18 +17,19 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">font</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="font"/>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
<object class="GtkFontButton" id="font">
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="transitionlabel">
|
||||
@@ -35,11 +37,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">transition</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="transition">
|
||||
@@ -48,11 +50,11 @@
|
||||
<item translatable="yes" id="crossfade">Fade</item>
|
||||
<item translatable="yes" id="slide-left-right">Slide</item>
|
||||
</items>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Example Application</property>
|
||||
@@ -27,7 +28,6 @@
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gears">
|
||||
@@ -36,7 +36,6 @@
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppPrefs" parent="GtkDialog">
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
@@ -16,18 +17,19 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">font</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="font"/>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
<object class="GtkFontButton" id="font">
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="transitionlabel">
|
||||
@@ -35,11 +37,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">transition</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="transition">
|
||||
@@ -48,11 +50,11 @@
|
||||
<item translatable="yes" id="crossfade">Fade</item>
|
||||
<item translatable="yes" id="slide-left-right">Slide</item>
|
||||
</items>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppPrefs" parent="GtkDialog">
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
@@ -16,18 +17,19 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">font</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="font"/>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
<object class="GtkFontButton" id="font">
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="transitionlabel">
|
||||
@@ -35,11 +37,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">transition</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="transition">
|
||||
@@ -48,11 +50,11 @@
|
||||
<item translatable="yes" id="crossfade">Fade</item>
|
||||
<item translatable="yes" id="slide-left-right">Slide</item>
|
||||
</items>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Example Application</property>
|
||||
@@ -18,7 +19,6 @@
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppPrefs" parent="GtkDialog">
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
@@ -16,18 +17,19 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">font</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="font"/>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
<object class="GtkFontButton" id="font">
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="transitionlabel">
|
||||
@@ -35,11 +37,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">transition</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="transition">
|
||||
@@ -48,11 +50,11 @@
|
||||
<item translatable="yes" id="crossfade">Fade</item>
|
||||
<item translatable="yes" id="slide-left-right">Slide</item>
|
||||
</items>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Example Application</property>
|
||||
@@ -18,7 +19,6 @@
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gears">
|
||||
@@ -27,7 +27,6 @@
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppPrefs" parent="GtkDialog">
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
@@ -16,18 +17,19 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">font</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="font"/>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
<object class="GtkFontButton" id="font">
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="transitionlabel">
|
||||
@@ -35,11 +37,11 @@
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">transition</property>
|
||||
<property name="xalign">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="transition">
|
||||
@@ -48,11 +50,11 @@
|
||||
<item translatable="yes" id="crossfade">Fade</item>
|
||||
<item translatable="yes" id="slide-left-right">Slide</item>
|
||||
</items>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ExampleAppWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Example Application</property>
|
||||
@@ -29,7 +30,6 @@
|
||||
<property name="sensitive">0</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton" id="gears">
|
||||
@@ -38,7 +38,6 @@
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object id="window" class="GtkWindow">
|
||||
<property name="title">Grid</property>
|
||||
@@ -6,30 +7,30 @@
|
||||
<child>
|
||||
<object id="button1" class="GtkButton">
|
||||
<property name="label">Button 1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object id="button2" class="GtkButton">
|
||||
<property name="label">Button 2</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object id="quit" class="GtkButton">
|
||||
<property name="label">Quit</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="column-span">2</property>
|
||||
</layout>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "broadway-output.h"
|
||||
|
||||
//#define DEBUG_NODE_SENDING
|
||||
//#define DEBUG_NODE_SENDING_REMOVE
|
||||
|
||||
/************************************************************************
|
||||
* Basic I/O primitives *
|
||||
@@ -113,7 +114,7 @@ broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
************************************************************************/
|
||||
|
||||
static void
|
||||
append_char (BroadwayOutput *output, char c)
|
||||
append_uint8 (BroadwayOutput *output, guint8 c)
|
||||
{
|
||||
g_string_append_c (output->buf, c);
|
||||
}
|
||||
@@ -172,7 +173,7 @@ patch_uint32 (BroadwayOutput *output, guint32 v, gsize offset)
|
||||
static void
|
||||
write_header(BroadwayOutput *output, char op)
|
||||
{
|
||||
append_char (output, op);
|
||||
append_uint8 (output, op);
|
||||
append_uint32 (output, output->serial++);
|
||||
}
|
||||
|
||||
@@ -317,15 +318,25 @@ static void
|
||||
append_type (BroadwayOutput *output, guint32 type, BroadwayNode *node)
|
||||
{
|
||||
#ifdef DEBUG_NODE_SENDING
|
||||
g_print ("%*s%s", append_node_depth*2, "", broadway_node_type_names[type]);
|
||||
g_print ("%*s%s(%d/%d)", append_node_depth*2, "", broadway_node_type_names[type], node->id, node->output_id);
|
||||
if (type == BROADWAY_NODE_TEXTURE)
|
||||
g_print (" %u", node->data[4]);
|
||||
g_print (" tx=%u", node->data[4]);
|
||||
g_print ("\n");
|
||||
#endif
|
||||
|
||||
append_uint32 (output, type);
|
||||
}
|
||||
|
||||
static BroadwayNode *
|
||||
lookup_old_node (GHashTable *old_node_lookup,
|
||||
guint32 id)
|
||||
{
|
||||
if (old_node_lookup)
|
||||
return g_hash_table_lookup (old_node_lookup, GINT_TO_POINTER (id));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/***********************************
|
||||
* This outputs the tree to the client, while at the same time diffing
|
||||
@@ -347,59 +358,230 @@ append_type (BroadwayOutput *output, guint32 type, BroadwayNode *node)
|
||||
static void
|
||||
append_node (BroadwayOutput *output,
|
||||
BroadwayNode *node,
|
||||
BroadwayNode *old_node,
|
||||
gboolean all_parents_are_kept)
|
||||
GHashTable *old_node_lookup)
|
||||
{
|
||||
guint32 i;
|
||||
BroadwayNode *reused_node;
|
||||
|
||||
append_node_depth++;
|
||||
|
||||
if (old_node != NULL && broadway_node_equal (node, old_node))
|
||||
reused_node = lookup_old_node (old_node_lookup, node->id);
|
||||
if (reused_node)
|
||||
{
|
||||
if (broadway_node_deep_equal (node, old_node))
|
||||
{
|
||||
append_type (output, BROADWAY_NODE_KEEP_ALL, node);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (all_parents_are_kept)
|
||||
{
|
||||
append_type (output, BROADWAY_NODE_KEEP_THIS, node);
|
||||
append_uint32 (output, node->n_children);
|
||||
for (i = 0; i < node->n_children; i++)
|
||||
append_node (output, node->children[i],
|
||||
i < old_node->n_children ? old_node->children[i] : NULL,
|
||||
TRUE);
|
||||
|
||||
goto out;
|
||||
}
|
||||
broadway_node_mark_deep_consumed (reused_node, TRUE);
|
||||
append_type (output, BROADWAY_NODE_REUSE, node);
|
||||
append_uint32 (output, node->output_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
append_type (output, node->type, node);
|
||||
append_uint32 (output, node->output_id);
|
||||
for (i = 0; i < node->n_data; i++)
|
||||
append_uint32 (output, node->data[i]);
|
||||
for (i = 0; i < node->n_children; i++)
|
||||
append_node (output,
|
||||
node->children[i],
|
||||
old_node_lookup);
|
||||
}
|
||||
|
||||
append_type (output, node->type, node);
|
||||
for (i = 0; i < node->n_data; i++)
|
||||
append_uint32 (output, node->data[i]);
|
||||
for (i = 0; i < node->n_children; i++)
|
||||
append_node (output,
|
||||
node->children[i],
|
||||
(old_node != NULL && i < old_node->n_children) ? old_node->children[i] : NULL,
|
||||
FALSE);
|
||||
|
||||
out:
|
||||
append_node_depth--;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_reuse_node (BroadwayOutput *output,
|
||||
BroadwayNode *node,
|
||||
BroadwayNode *old_node)
|
||||
{
|
||||
int i;
|
||||
guint32 new_texture;
|
||||
|
||||
if (old_node->reused)
|
||||
return FALSE;
|
||||
|
||||
if (node->type != old_node->type)
|
||||
return FALSE;
|
||||
|
||||
if (broadway_node_equal (node, old_node))
|
||||
return TRUE;
|
||||
|
||||
switch (node->type) {
|
||||
case BROADWAY_NODE_TRANSFORM:
|
||||
#ifdef DEBUG_NODE_SENDING
|
||||
g_print ("Patching transform node %d/%d\n",
|
||||
old_node->id, old_node->output_id);
|
||||
#endif
|
||||
append_uint32 (output, BROADWAY_NODE_OP_PATCH_TRANSFORM);
|
||||
append_uint32 (output, old_node->output_id);
|
||||
for (i = 0; i < node->n_data; i++)
|
||||
append_uint32 (output, node->data[i]);
|
||||
return TRUE;
|
||||
|
||||
case BROADWAY_NODE_TEXTURE:
|
||||
/* Check that the size, etc is the same */
|
||||
for (i = 0; i < 4; i++)
|
||||
if (node->data[i] != old_node->data[i])
|
||||
return FALSE;
|
||||
|
||||
new_texture = node->data[4];
|
||||
|
||||
#ifdef DEBUG_NODE_SENDING
|
||||
g_print ("Patching texture node %d/%d to tx=%d\n",
|
||||
old_node->id, old_node->output_id,
|
||||
new_texture);
|
||||
#endif
|
||||
append_uint32 (output, BROADWAY_NODE_OP_PATCH_TEXTURE);
|
||||
append_uint32 (output, old_node->output_id);
|
||||
append_uint32 (output, new_texture);
|
||||
return TRUE;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static BroadwayNode *
|
||||
append_node_ops (BroadwayOutput *output,
|
||||
BroadwayNode *node,
|
||||
BroadwayNode *parent,
|
||||
BroadwayNode *previous_sibling,
|
||||
BroadwayNode *old_node,
|
||||
GHashTable *old_node_lookup)
|
||||
{
|
||||
BroadwayNode *reused_node;
|
||||
guint32 i;
|
||||
|
||||
/* Maybe can be reused from the last tree. */
|
||||
reused_node = lookup_old_node (old_node_lookup, node->id);
|
||||
if (reused_node)
|
||||
{
|
||||
g_assert (node == reused_node);
|
||||
g_assert (reused_node->reused);
|
||||
g_assert (!reused_node->consumed); /* Should only be once in the tree, and not consumed otherwise */
|
||||
|
||||
broadway_node_mark_deep_consumed (reused_node, TRUE);
|
||||
|
||||
if (node == old_node)
|
||||
{
|
||||
/* The node in the old tree at the current position is the same, so
|
||||
we need to do nothing, just don't delete it (which we won't since
|
||||
its marked used) */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We can reuse it, bu it comes from a different place or
|
||||
order, if so we need to move it in place */
|
||||
#ifdef DEBUG_NODE_SENDING
|
||||
g_print ("Move old node %d/%d to parent %d/%d after %d/%d\n",
|
||||
reused_node->id, reused_node->output_id,
|
||||
parent ? parent->id : 0,
|
||||
parent ? parent->output_id : 0,
|
||||
previous_sibling ? previous_sibling->id : 0,
|
||||
previous_sibling ? previous_sibling->output_id : 0);
|
||||
#endif
|
||||
append_uint32 (output, BROADWAY_NODE_OP_MOVE_AFTER_CHILD);
|
||||
append_uint32 (output, parent ? parent->output_id : 0);
|
||||
append_uint32 (output, previous_sibling ? previous_sibling->output_id : 0);
|
||||
append_uint32 (output, reused_node->output_id);
|
||||
}
|
||||
|
||||
return reused_node;
|
||||
}
|
||||
|
||||
/* If the next node in place is shallowly equal (but not necessarily
|
||||
* deep equal) we reuse it and tweak its children as needed.
|
||||
* Except we avoid this for reused node as those make more sense to reuse deeply.
|
||||
*/
|
||||
|
||||
if (old_node && should_reuse_node (output, node, old_node))
|
||||
{
|
||||
int old_i = 0;
|
||||
BroadwayNode *last_child = NULL;
|
||||
|
||||
old_node->consumed = TRUE; // Don't reuse again
|
||||
|
||||
// We rewrite this new node as it now represents the old node in the browser
|
||||
node->output_id = old_node->output_id;
|
||||
|
||||
/* However, we might need to rewrite then children of old_node */
|
||||
for (i = 0; i < node->n_children; i++)
|
||||
{
|
||||
BroadwayNode *child = node->children[i];
|
||||
|
||||
/* Find the next (or first) non-consumed old child, if any */
|
||||
while (old_i < old_node->n_children &&
|
||||
old_node->children[old_i]->consumed)
|
||||
old_i++;
|
||||
|
||||
last_child =
|
||||
append_node_ops (output,
|
||||
child,
|
||||
node, /* parent */
|
||||
last_child,
|
||||
(old_i < old_node->n_children) ? old_node->children[old_i] : NULL,
|
||||
old_node_lookup);
|
||||
}
|
||||
|
||||
/* Remaining old nodes are either reused elsewhere, or end up marked not consumed so are deleted at the end */
|
||||
return old_node;
|
||||
}
|
||||
|
||||
/* Fallback to create a new tree */
|
||||
#ifdef DEBUG_NODE_SENDING
|
||||
g_print ("Insert nodes in parent %d/%d, after sibling %d/%d\n",
|
||||
parent ? parent->id : 0,
|
||||
parent ? parent->output_id : 0,
|
||||
previous_sibling ? previous_sibling->id : 0,
|
||||
previous_sibling ? previous_sibling->output_id : 0);
|
||||
#endif
|
||||
append_uint32 (output, BROADWAY_NODE_OP_INSERT_NODE);
|
||||
append_uint32 (output, parent ? parent->output_id : 0);
|
||||
append_uint32 (output, previous_sibling ? previous_sibling->output_id : 0);
|
||||
|
||||
append_node(output, node, old_node_lookup);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
/* Remove non-consumed nodes */
|
||||
static void
|
||||
append_node_removes (BroadwayOutput *output,
|
||||
BroadwayNode *node)
|
||||
{
|
||||
// TODO: Use an array of nodes instead
|
||||
if (!node->consumed)
|
||||
{
|
||||
#ifdef DEBUG_NODE_SENDING_REMOVE
|
||||
g_print ("Remove old node non-consumed node %d/%d\n",
|
||||
node->id, node->output_id);
|
||||
#endif
|
||||
append_uint32 (output, BROADWAY_NODE_OP_REMOVE_NODE);
|
||||
append_uint32 (output, node->output_id);
|
||||
}
|
||||
|
||||
for (int i = 0; i < node->n_children; i++)
|
||||
append_node_removes (output, node->children[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
broadway_output_surface_set_nodes (BroadwayOutput *output,
|
||||
int id,
|
||||
BroadwayNode *root,
|
||||
BroadwayNode *old_root)
|
||||
BroadwayNode *old_root,
|
||||
GHashTable *old_node_lookup)
|
||||
{
|
||||
gsize size_pos, start, end;
|
||||
|
||||
/* Early return if nothing changed */
|
||||
if (old_root != NULL &&
|
||||
broadway_node_deep_equal (root, old_root))
|
||||
return;
|
||||
|
||||
if (old_root)
|
||||
{
|
||||
broadway_node_mark_deep_consumed (old_root, FALSE);
|
||||
broadway_node_mark_deep_reused (old_root, FALSE);
|
||||
/* This will modify children of old_root if any are shared */
|
||||
broadway_node_mark_deep_reused (root, TRUE);
|
||||
}
|
||||
|
||||
write_header (output, BROADWAY_OP_SET_NODES);
|
||||
|
||||
@@ -410,9 +592,11 @@ broadway_output_surface_set_nodes (BroadwayOutput *output,
|
||||
|
||||
start = output->buf->len;
|
||||
#ifdef DEBUG_NODE_SENDING
|
||||
g_print ("====== node tree for %d =======\n", id);
|
||||
g_print ("====== node ops for surface %d =======\n", id);
|
||||
#endif
|
||||
append_node (output, root, old_root, TRUE);
|
||||
append_node_ops (output, root, NULL, NULL, old_root, old_node_lookup);
|
||||
if (old_root)
|
||||
append_node_removes (output, old_root);
|
||||
end = output->buf->len;
|
||||
patch_uint32 (output, (end - start) / 4, size_pos);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,8 @@ void broadway_output_set_transient_for (BroadwayOutput *output,
|
||||
void broadway_output_surface_set_nodes (BroadwayOutput *output,
|
||||
int id,
|
||||
BroadwayNode *root,
|
||||
BroadwayNode *old_root);
|
||||
BroadwayNode *old_root,
|
||||
GHashTable *old_node_lookup);
|
||||
void broadway_output_upload_texture (BroadwayOutput *output,
|
||||
guint32 id,
|
||||
GBytes *texture);
|
||||
|
||||
@@ -20,13 +20,19 @@ typedef enum { /* Sync changes with broadway.js */
|
||||
BROADWAY_NODE_SHADOW = 8,
|
||||
BROADWAY_NODE_OPACITY = 9,
|
||||
BROADWAY_NODE_CLIP = 10,
|
||||
BROADWAY_NODE_KEEP_ALL = 11,
|
||||
BROADWAY_NODE_KEEP_THIS = 12,
|
||||
BROADWAY_NODE_TRANSFORM = 13,
|
||||
BROADWAY_NODE_DEBUG = 14,
|
||||
BROADWAY_NODE_REUSE = 15,
|
||||
BROADWAY_NODE_TRANSFORM = 11,
|
||||
BROADWAY_NODE_DEBUG = 12,
|
||||
BROADWAY_NODE_REUSE = 13,
|
||||
} BroadwayNodeType;
|
||||
|
||||
typedef enum { /* Sync changes with broadway.js */
|
||||
BROADWAY_NODE_OP_INSERT_NODE = 0,
|
||||
BROADWAY_NODE_OP_REMOVE_NODE = 1,
|
||||
BROADWAY_NODE_OP_MOVE_AFTER_CHILD = 2,
|
||||
BROADWAY_NODE_OP_PATCH_TEXTURE = 3,
|
||||
BROADWAY_NODE_OP_PATCH_TRANSFORM = 4,
|
||||
} BroadwayNodeOpType;
|
||||
|
||||
static const char *broadway_node_type_names[] G_GNUC_UNUSED = {
|
||||
"TEXTURE",
|
||||
"CONTAINER",
|
||||
@@ -39,51 +45,47 @@ static const char *broadway_node_type_names[] G_GNUC_UNUSED = {
|
||||
"SHADOW",
|
||||
"OPACITY",
|
||||
"CLIP",
|
||||
"KEEP_ALL",
|
||||
"KEEP_THIS",
|
||||
"TRANSLATE",
|
||||
"TRANSFORM",
|
||||
"DEBUG",
|
||||
"REUSE",
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
BROADWAY_EVENT_ENTER = 'e',
|
||||
BROADWAY_EVENT_LEAVE = 'l',
|
||||
BROADWAY_EVENT_POINTER_MOVE = 'm',
|
||||
BROADWAY_EVENT_BUTTON_PRESS = 'b',
|
||||
BROADWAY_EVENT_BUTTON_RELEASE = 'B',
|
||||
BROADWAY_EVENT_TOUCH = 't',
|
||||
BROADWAY_EVENT_SCROLL = 's',
|
||||
BROADWAY_EVENT_KEY_PRESS = 'k',
|
||||
BROADWAY_EVENT_KEY_RELEASE = 'K',
|
||||
BROADWAY_EVENT_GRAB_NOTIFY = 'g',
|
||||
BROADWAY_EVENT_UNGRAB_NOTIFY = 'u',
|
||||
BROADWAY_EVENT_CONFIGURE_NOTIFY = 'w',
|
||||
BROADWAY_EVENT_SCREEN_SIZE_CHANGED = 'd',
|
||||
BROADWAY_EVENT_FOCUS = 'f',
|
||||
BROADWAY_EVENT_ROUNDTRIP_NOTIFY = 'F',
|
||||
BROADWAY_EVENT_ENTER = 0,
|
||||
BROADWAY_EVENT_LEAVE = 1,
|
||||
BROADWAY_EVENT_POINTER_MOVE = 2,
|
||||
BROADWAY_EVENT_BUTTON_PRESS = 3,
|
||||
BROADWAY_EVENT_BUTTON_RELEASE = 4,
|
||||
BROADWAY_EVENT_TOUCH = 5,
|
||||
BROADWAY_EVENT_SCROLL = 6,
|
||||
BROADWAY_EVENT_KEY_PRESS = 7,
|
||||
BROADWAY_EVENT_KEY_RELEASE = 8,
|
||||
BROADWAY_EVENT_GRAB_NOTIFY = 9,
|
||||
BROADWAY_EVENT_UNGRAB_NOTIFY = 10,
|
||||
BROADWAY_EVENT_CONFIGURE_NOTIFY = 11,
|
||||
BROADWAY_EVENT_SCREEN_SIZE_CHANGED = 12,
|
||||
BROADWAY_EVENT_FOCUS = 13,
|
||||
BROADWAY_EVENT_ROUNDTRIP_NOTIFY = 14,
|
||||
} BroadwayEventType;
|
||||
|
||||
typedef enum {
|
||||
BROADWAY_OP_GRAB_POINTER = 'g',
|
||||
BROADWAY_OP_UNGRAB_POINTER = 'u',
|
||||
BROADWAY_OP_NEW_SURFACE = 's',
|
||||
BROADWAY_OP_SHOW_SURFACE = 'S',
|
||||
BROADWAY_OP_HIDE_SURFACE = 'H',
|
||||
BROADWAY_OP_RAISE_SURFACE = 'r',
|
||||
BROADWAY_OP_LOWER_SURFACE = 'R',
|
||||
BROADWAY_OP_DESTROY_SURFACE = 'd',
|
||||
BROADWAY_OP_MOVE_RESIZE = 'm',
|
||||
BROADWAY_OP_SET_TRANSIENT_FOR = 'p',
|
||||
BROADWAY_OP_PUT_RGB = 'i',
|
||||
BROADWAY_OP_REQUEST_AUTH = 'l',
|
||||
BROADWAY_OP_AUTH_OK = 'L',
|
||||
BROADWAY_OP_DISCONNECTED = 'D',
|
||||
BROADWAY_OP_SURFACE_UPDATE = 'b',
|
||||
BROADWAY_OP_SET_SHOW_KEYBOARD = 'k',
|
||||
BROADWAY_OP_UPLOAD_TEXTURE = 't',
|
||||
BROADWAY_OP_RELEASE_TEXTURE = 'T',
|
||||
BROADWAY_OP_SET_NODES = 'n',
|
||||
BROADWAY_OP_ROUNDTRIP = 'F',
|
||||
BROADWAY_OP_GRAB_POINTER = 0,
|
||||
BROADWAY_OP_UNGRAB_POINTER = 1,
|
||||
BROADWAY_OP_NEW_SURFACE = 2,
|
||||
BROADWAY_OP_SHOW_SURFACE = 3,
|
||||
BROADWAY_OP_HIDE_SURFACE = 4,
|
||||
BROADWAY_OP_RAISE_SURFACE = 5,
|
||||
BROADWAY_OP_LOWER_SURFACE = 6,
|
||||
BROADWAY_OP_DESTROY_SURFACE = 7,
|
||||
BROADWAY_OP_MOVE_RESIZE = 8,
|
||||
BROADWAY_OP_SET_TRANSIENT_FOR = 9,
|
||||
BROADWAY_OP_DISCONNECTED = 10,
|
||||
BROADWAY_OP_SURFACE_UPDATE = 11,
|
||||
BROADWAY_OP_SET_SHOW_KEYBOARD = 12,
|
||||
BROADWAY_OP_UPLOAD_TEXTURE = 13,
|
||||
BROADWAY_OP_RELEASE_TEXTURE = 14,
|
||||
BROADWAY_OP_SET_NODES = 15,
|
||||
BROADWAY_OP_ROUNDTRIP = 16,
|
||||
} BroadwayOpType;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -115,6 +115,7 @@ struct BroadwayInput {
|
||||
};
|
||||
|
||||
struct BroadwaySurface {
|
||||
guint32 owner;
|
||||
gint32 id;
|
||||
gint32 x;
|
||||
gint32 y;
|
||||
@@ -224,6 +225,33 @@ broadway_node_deep_equal (BroadwayNode *a,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
broadway_node_mark_deep_reused (BroadwayNode *node,
|
||||
gboolean reused)
|
||||
{
|
||||
node->reused = reused;
|
||||
for (int i = 0; i < node->n_children; i++)
|
||||
broadway_node_mark_deep_reused (node->children[i], reused);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_node_mark_deep_consumed (BroadwayNode *node,
|
||||
gboolean consumed)
|
||||
{
|
||||
node->consumed = consumed;
|
||||
for (int i = 0; i < node->n_children; i++)
|
||||
broadway_node_mark_deep_consumed (node->children[i], consumed);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_node_add_to_lookup (BroadwayNode *node,
|
||||
GHashTable *node_lookup)
|
||||
{
|
||||
g_hash_table_insert (node_lookup, GINT_TO_POINTER(node->id), node);
|
||||
for (int i = 0; i < node->n_children; i++)
|
||||
broadway_node_add_to_lookup (node->children[i], node_lookup);
|
||||
}
|
||||
|
||||
static void
|
||||
broadway_server_init (BroadwayServer *server)
|
||||
{
|
||||
@@ -444,9 +472,46 @@ process_input_message (BroadwayServer *server,
|
||||
BroadwayInputMsg *message)
|
||||
{
|
||||
gint32 client;
|
||||
BroadwaySurface *surface;
|
||||
|
||||
update_event_state (server, message);
|
||||
client = -1;
|
||||
|
||||
|
||||
switch (message->base.type) {
|
||||
case BROADWAY_EVENT_ENTER:
|
||||
case BROADWAY_EVENT_LEAVE:
|
||||
case BROADWAY_EVENT_POINTER_MOVE:
|
||||
case BROADWAY_EVENT_BUTTON_PRESS:
|
||||
case BROADWAY_EVENT_BUTTON_RELEASE:
|
||||
case BROADWAY_EVENT_SCROLL:
|
||||
case BROADWAY_EVENT_GRAB_NOTIFY:
|
||||
case BROADWAY_EVENT_UNGRAB_NOTIFY:
|
||||
surface = broadway_server_lookup_surface (server, message->pointer.event_surface_id);
|
||||
break;
|
||||
case BROADWAY_EVENT_TOUCH:
|
||||
surface = broadway_server_lookup_surface (server, message->touch.event_surface_id);
|
||||
break;
|
||||
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
|
||||
surface = broadway_server_lookup_surface (server, message->configure_notify.id);
|
||||
break;
|
||||
case BROADWAY_EVENT_ROUNDTRIP_NOTIFY:
|
||||
surface = broadway_server_lookup_surface (server, message->roundtrip_notify.id);
|
||||
break;
|
||||
case BROADWAY_EVENT_KEY_PRESS:
|
||||
case BROADWAY_EVENT_KEY_RELEASE:
|
||||
/* TODO: Send to keys focused clients only... */
|
||||
case BROADWAY_EVENT_FOCUS:
|
||||
case BROADWAY_EVENT_SCREEN_SIZE_CHANGED:
|
||||
default:
|
||||
surface = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (surface)
|
||||
client = surface->owner;
|
||||
else
|
||||
client = -1;
|
||||
|
||||
if (is_pointer_event (message) &&
|
||||
server->pointer_grab_surface_id != -1)
|
||||
client = server->pointer_grab_client_id;
|
||||
@@ -557,6 +622,7 @@ parse_input_message (BroadwayInput *input, const unsigned char *message)
|
||||
|
||||
msg.base.type = ntohl (*p++);
|
||||
msg.base.serial = ntohl (*p++);
|
||||
|
||||
time_ = ntohl (*p++);
|
||||
|
||||
if (time_ == 0) {
|
||||
@@ -638,12 +704,19 @@ parse_input_message (BroadwayInput *input, const unsigned char *message)
|
||||
|
||||
if (rt->id == msg.roundtrip_notify.id &&
|
||||
rt->tag == msg.roundtrip_notify.tag)
|
||||
{
|
||||
server->outstanding_roundtrips = g_list_delete_link (server->outstanding_roundtrips, l);
|
||||
g_free (rt);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (l == NULL)
|
||||
g_warning ("Got unexpected rountrip reply for id %d, tag %d\n", msg.roundtrip_notify.id, msg.roundtrip_notify.tag);
|
||||
else
|
||||
{
|
||||
BroadwayOutstandingRoundtrip *rt = l->data;
|
||||
|
||||
server->outstanding_roundtrips = g_list_delete_link (server->outstanding_roundtrips, l);
|
||||
g_free (rt);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_SCREEN_SIZE_CHANGED:
|
||||
@@ -1753,6 +1826,7 @@ decode_nodes (BroadwayServer *server,
|
||||
g_ref_count_init (&node->refcount);
|
||||
node->type = type;
|
||||
node->id = id;
|
||||
node->output_id = id;
|
||||
node->texture_id = 0;
|
||||
node->n_children = n_children;
|
||||
node->children = (BroadwayNode **)((char *)node + sizeof(BroadwayNode) + (size - 1) * sizeof(guint32));
|
||||
@@ -1784,17 +1858,6 @@ decode_nodes (BroadwayServer *server,
|
||||
return node;
|
||||
}
|
||||
|
||||
static void
|
||||
init_node_lookup (BroadwaySurface *surface,
|
||||
BroadwayNode *node)
|
||||
{
|
||||
int i;
|
||||
|
||||
g_hash_table_insert (surface->node_lookup, GINT_TO_POINTER(node->id), node);
|
||||
for (i = 0; i < node->n_children; i++)
|
||||
init_node_lookup (surface, node->children[i]);
|
||||
}
|
||||
|
||||
/* passes ownership of nodes */
|
||||
void
|
||||
broadway_server_surface_update_nodes (BroadwayServer *server,
|
||||
@@ -1816,7 +1879,8 @@ broadway_server_surface_update_nodes (BroadwayServer *server,
|
||||
if (server->output != NULL)
|
||||
broadway_output_surface_set_nodes (server->output, surface->id,
|
||||
root,
|
||||
surface->nodes);
|
||||
surface->nodes,
|
||||
surface->node_lookup);
|
||||
|
||||
if (surface->nodes)
|
||||
broadway_node_unref (server, surface->nodes);
|
||||
@@ -1824,8 +1888,7 @@ broadway_server_surface_update_nodes (BroadwayServer *server,
|
||||
surface->nodes = root;
|
||||
|
||||
g_hash_table_remove_all (surface->node_lookup);
|
||||
|
||||
init_node_lookup (surface, surface->nodes);
|
||||
broadway_node_add_to_lookup (root, surface->node_lookup);
|
||||
}
|
||||
|
||||
guint32
|
||||
@@ -2003,6 +2066,7 @@ broadway_server_ungrab_pointer (BroadwayServer *server,
|
||||
|
||||
guint32
|
||||
broadway_server_new_surface (BroadwayServer *server,
|
||||
guint32 client,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
@@ -2012,6 +2076,7 @@ broadway_server_new_surface (BroadwayServer *server,
|
||||
BroadwaySurface *surface;
|
||||
|
||||
surface = g_new0 (BroadwaySurface, 1);
|
||||
surface->owner = client;
|
||||
surface->id = server->id_counter++;
|
||||
surface->x = x;
|
||||
surface->y = y;
|
||||
@@ -2097,7 +2162,8 @@ broadway_server_resync_surfaces (BroadwayServer *server)
|
||||
|
||||
if (surface->nodes)
|
||||
broadway_output_surface_set_nodes (server->output, surface->id,
|
||||
surface->nodes, NULL);
|
||||
surface->nodes,
|
||||
NULL, NULL);
|
||||
|
||||
if (surface->visible)
|
||||
broadway_output_show_surface (server->output, surface->id);
|
||||
|
||||