Compare commits
1190 Commits
wip/matthi
...
wip/carlos
Author | SHA1 | Date | |
---|---|---|---|
|
d379e69597 | ||
|
7d9af6d700 | ||
|
8f4e0705dc | ||
|
87bdfbb02c | ||
|
e4be37eb60 | ||
|
8224e7ac72 | ||
|
2dca8f935c | ||
|
f595c0dc1b | ||
|
3265013268 | ||
|
351559fcfa | ||
|
6c805ecb0f | ||
|
8a432b42a2 | ||
|
aee4634ee5 | ||
|
cc9a4c1720 | ||
|
d607312080 | ||
|
41dac661a0 | ||
|
41a922928e | ||
|
182272c0ab | ||
|
e1d81d096c | ||
|
47b7bfd2ba | ||
|
5e302ae2cc | ||
|
34c63b8e4f | ||
|
0429008b16 | ||
|
6ea827cde5 | ||
|
cdb2fcb554 | ||
|
4f50bf23d3 | ||
|
18dc994de7 | ||
|
5e7b3030b9 | ||
|
7c47c7cdaf | ||
|
e7b3909fd1 | ||
|
27c76db956 | ||
|
e763dac72e | ||
|
8ab2c79b77 | ||
|
12be5ccbb7 | ||
|
8ad1b09a3a | ||
|
c2d4f05ce0 | ||
|
c475047501 | ||
|
3604816b9c | ||
|
cb0d2616ff | ||
|
229ef9d776 | ||
|
d3329bb36b | ||
|
5590a2a943 | ||
|
736ccd34f0 | ||
|
b6d85b9e31 | ||
|
f3927f1155 | ||
|
5711fb9b26 | ||
|
31fcf5b3a7 | ||
|
b366ea84a7 | ||
|
e7cab2bc0c | ||
|
77bab4e027 | ||
|
ab1f17cb9a | ||
|
35c78a995e | ||
|
3fa0d4dad7 | ||
|
edd1b0974c | ||
|
e2f3b9b1cc | ||
|
42369e31e2 | ||
|
33ec75944f | ||
|
e8079df420 | ||
|
e0990b2311 | ||
|
fb2df00f15 | ||
|
f768ae4281 | ||
|
e8dfbf35e8 | ||
|
15e67e27ca | ||
|
10ac015ac6 | ||
|
ba844df6f0 | ||
|
0c1ac9add4 | ||
|
a2bce67d3b | ||
|
64c3db931d | ||
|
f90659cde8 | ||
|
822f802aec | ||
|
4d31a89ec0 | ||
|
81b8f0493a | ||
|
472f5e4b13 | ||
|
8dcafc597c | ||
|
ab283933be | ||
|
9dc14b630d | ||
|
fa0f637268 | ||
|
4b613c2f6a | ||
|
a94d2826ae | ||
|
75c92ba867 | ||
|
33e2f31de4 | ||
|
1818e7bed2 | ||
|
270b6d3a84 | ||
|
c8a6a1138b | ||
|
f042d7a9a8 | ||
|
d810ff8445 | ||
|
9ba5f053d9 | ||
|
ad4287e338 | ||
|
7ae240199b | ||
|
5cb1c606bb | ||
|
4f3065a5e8 | ||
|
e733aa43cf | ||
|
5d57f0be8a | ||
|
7af2f73608 | ||
|
04adcff624 | ||
|
6d1dbec9dd | ||
|
e3e00a2673 | ||
|
b12371e1b0 | ||
|
7277d657d9 | ||
|
327ec24e51 | ||
|
253ac15928 | ||
|
8c6c2be316 | ||
|
144448d18b | ||
|
5759bc59c9 | ||
|
2b59917a9d | ||
|
1c2e09116a | ||
|
0583b80d1b | ||
|
4bbda548b7 | ||
|
fa07fe2124 | ||
|
af8bf498e9 | ||
|
7046463b88 | ||
|
f594807c0a | ||
|
06605d54f2 | ||
|
6acf276a1a | ||
|
118424bd93 | ||
|
ab4f4fb045 | ||
|
9ceafd7c38 | ||
|
a2a80f8a15 | ||
|
cf9074a2e9 | ||
|
a9d468a4c8 | ||
|
59572e5fcf | ||
|
8338b0f0cc | ||
|
2e04817701 | ||
|
cbf1ff98f7 | ||
|
fa885f437c | ||
|
47712a826b | ||
|
e93c2517e6 | ||
|
fd2a3b602f | ||
|
ab53142c0f | ||
|
1e0ae936fe | ||
|
7b581ca096 | ||
|
2b52b4be5d | ||
|
41e4c93443 | ||
|
a739ee6905 | ||
|
1c3f8ba252 | ||
|
96b2b1b2f3 | ||
|
6ac33215a5 | ||
|
97f805b888 | ||
|
76fea5c5fa | ||
|
7e491fd3fc | ||
|
d2edcf489b | ||
|
3cb93a479a | ||
|
1e8a336993 | ||
|
4923da3550 | ||
|
75271c44c2 | ||
|
ff8ba1149d | ||
|
ca227af4ff | ||
|
eda3b43553 | ||
|
67649763b6 | ||
|
e7bd666711 | ||
|
f0fb705aae | ||
|
c4513a6737 | ||
|
d6e92cd984 | ||
|
d0f071aae9 | ||
|
a1b6bf19c1 | ||
|
59878f281f | ||
|
c86e8d0e60 | ||
|
b919c3348f | ||
|
c04f192113 | ||
|
0101bbd441 | ||
|
370d666406 | ||
|
3358c1fb32 | ||
|
e048889a12 | ||
|
22c0a77ac5 | ||
|
4946810960 | ||
|
df35d00a1d | ||
|
76ac46405f | ||
|
978c597e94 | ||
|
f9100719bd | ||
|
2be16f36ed | ||
|
ba21a7764b | ||
|
c3215de005 | ||
|
c56419818f | ||
|
782c76c146 | ||
|
55585aec73 | ||
|
845ae20954 | ||
|
1d2606dc94 | ||
|
08dc2cd6a8 | ||
|
e151058dff | ||
|
c5fc841285 | ||
|
af7f695068 | ||
|
461d05f643 | ||
|
22e59ecd28 | ||
|
c2793de6e2 | ||
|
a074eba16b | ||
|
e99992669c | ||
|
db6127a118 | ||
|
e0f69353bb | ||
|
339d355dda | ||
|
f8d235ecc2 | ||
|
e64028b41d | ||
|
256bf3bf25 | ||
|
fc711040d1 | ||
|
aa17c20951 | ||
|
32166a9595 | ||
|
d8f6b12685 | ||
|
c910a955d1 | ||
|
846a6e8157 | ||
|
badcf022bf | ||
|
abc0f67cf6 | ||
|
d1eb8cd809 | ||
|
d72508590b | ||
|
87e9f0895b | ||
|
0f76228c15 | ||
|
185525a58d | ||
|
6652beae65 | ||
|
76461a8004 | ||
|
5009c691ac | ||
|
60d3378dd1 | ||
|
6235b12ca4 | ||
|
77769a52b3 | ||
|
266d4b31b8 | ||
|
b11b342ad4 | ||
|
15b3f33965 | ||
|
b9531e3a7c | ||
|
04ade9483b | ||
|
31974e02ca | ||
|
5e39f3c23b | ||
|
c9e6fcd5fa | ||
|
b6ee3490c3 | ||
|
b9a05be2da | ||
|
1a8b9e9180 | ||
|
6cab57d7ed | ||
|
8d24105642 | ||
|
adc780f2b8 | ||
|
4dbae1d4bf | ||
|
0290b28564 | ||
|
0443892bc7 | ||
|
124a7969eb | ||
|
92e6557015 | ||
|
2ff75aafbd | ||
|
ccdeaab1f9 | ||
|
0fe6d76ab6 | ||
|
888f289114 | ||
|
4908b5ef54 | ||
|
9a3b61ec9d | ||
|
bbf6e81c1f | ||
|
cd2a53851b | ||
|
8f3cb2658a | ||
|
9e3b3c30b7 | ||
|
0aca394a96 | ||
|
9a68c068a8 | ||
|
16cf4637e9 | ||
|
f7ba3224b9 | ||
|
3176ae7e51 | ||
|
5ce2d77691 | ||
|
b89bf98731 | ||
|
14b181ebd4 | ||
|
3771c95c72 | ||
|
3c38ebb906 | ||
|
6e6e6d774f | ||
|
550f4bc854 | ||
|
2bab983ecf | ||
|
258e504c6a | ||
|
36e09f3ad9 | ||
|
c8770b3c63 | ||
|
079ee7e405 | ||
|
50975be4d0 | ||
|
407d3db2b6 | ||
|
98da7730ea | ||
|
3dd3ae1b9d | ||
|
e41e8c4c53 | ||
|
0ed670ed62 | ||
|
a670de4425 | ||
|
ea6da7b1b8 | ||
|
7479e6cb50 | ||
|
85fa396176 | ||
|
888a157ffa | ||
|
8a5b6d422f | ||
|
33162eee1a | ||
|
a89e88fc3e | ||
|
62ccf8743a | ||
|
af6adb5bc0 | ||
|
f729cbb760 | ||
|
f55be762e2 | ||
|
f94d72c012 | ||
|
ebeca18635 | ||
|
83c5b661f6 | ||
|
a79f950dfe | ||
|
34b4de09fc | ||
|
7687393583 | ||
|
4cc68a97a8 | ||
|
379970082a | ||
|
fb51e438e9 | ||
|
f259aa7e76 | ||
|
894a0c0ff4 | ||
|
ade33c6e14 | ||
|
15f8b2d0ae | ||
|
70bae02612 | ||
|
f0526359d1 | ||
|
78f9193d7e | ||
|
3f68475b6f | ||
|
5cd138f0f2 | ||
|
614bcefa21 | ||
|
cba24360b1 | ||
|
e8376f5c01 | ||
|
3744bbdc27 | ||
|
cf9942e3cc | ||
|
3d9421509c | ||
|
9f86cb2b4e | ||
|
1c267398ef | ||
|
4a999cbd1f | ||
|
7f300c9da7 | ||
|
6aeae2c828 | ||
|
14d64eaf95 | ||
|
543b21430b | ||
|
a25357007e | ||
|
295726560e | ||
|
f1e3b503de | ||
|
9f94736c92 | ||
|
48bfc9badf | ||
|
12e4f4256d | ||
|
e522ff0532 | ||
|
d3014c23b9 | ||
|
473bbeb475 | ||
|
c9267e70a9 | ||
|
bb568a51d4 | ||
|
4d6fbdd19e | ||
|
2c2288206e | ||
|
ab256384b8 | ||
|
c0cd46355d | ||
|
5f608a1d07 | ||
|
750341414d | ||
|
506b436f09 | ||
|
361a3885b5 | ||
|
d072201b12 | ||
|
6b44a70a09 | ||
|
355b883f32 | ||
|
fcc8d778b5 | ||
|
d1a08aa2a9 | ||
|
0e57d173b3 | ||
|
9ef700b161 | ||
|
ab0edd1091 | ||
|
3bcbf4cf4e | ||
|
4878eea06b | ||
|
17bad98084 | ||
|
72c9853999 | ||
|
1be0b6d2d5 | ||
|
74f563b501 | ||
|
da74314779 | ||
|
1268440c35 | ||
|
7d659b21e6 | ||
|
9c1207ed37 | ||
|
25523e60c3 | ||
|
ed5f07e0e7 | ||
|
c1ce599e11 | ||
|
ea55471441 | ||
|
b42fc417bd | ||
|
b3871a76c4 | ||
|
ccf3b10528 | ||
|
98a28f4168 | ||
|
3c7c4a019c | ||
|
73d6076967 | ||
|
c1573a1fda | ||
|
f92cca5229 | ||
|
86a6131510 | ||
|
6587864824 | ||
|
e0436b3d59 | ||
|
d2d18f74f8 | ||
|
1cbd4d229e | ||
|
c9656e2864 | ||
|
352590cf9f | ||
|
825608af2a | ||
|
4abbf929ad | ||
|
aeaab5557b | ||
|
2bc10fa365 | ||
|
c4d5225aac | ||
|
767df913d1 | ||
|
e1c120623b | ||
|
9f2674077a | ||
|
9675b8a310 | ||
|
a61eecc22e | ||
|
a720a63fa3 | ||
|
3158b481b7 | ||
|
8312ee0ebe | ||
|
006f2e32cf | ||
|
4241c4bdbd | ||
|
e90787d975 | ||
|
3f012f6d01 | ||
|
06ad134876 | ||
|
ed6992867e | ||
|
90b016ef73 | ||
|
c176d0c3d8 | ||
|
1d28a7c2c1 | ||
|
7be6d18f27 | ||
|
1b6750c1f1 | ||
|
8c10849094 | ||
|
8d9414c228 | ||
|
6c33e37db2 | ||
|
5ba5f2c0c0 | ||
|
fa9037aed5 | ||
|
371d527092 | ||
|
5c9ea0cf4f | ||
|
5ec25cde21 | ||
|
6374226d6b | ||
|
e917949315 | ||
|
ca2a7c1efd | ||
|
53522f3c25 | ||
|
6f82ba5e5e | ||
|
dbcf0d1b69 | ||
|
bb992ff00d | ||
|
f307fa99a5 | ||
|
f2ad5ddbb6 | ||
|
951456dbed | ||
|
278c4583fc | ||
|
d6985d793f | ||
|
97dcf2461e | ||
|
d3920d17fa | ||
|
22a43dafc8 | ||
|
1ee72e8ef4 | ||
|
ffe838e7de | ||
|
8df58f953d | ||
|
7a483bbecc | ||
|
d04f66eb52 | ||
|
d5f215f96d | ||
|
999cf1b1dc | ||
|
b379ca3e02 | ||
|
5f8e2fcf93 | ||
|
3902a0d3b1 | ||
|
03cacda09e | ||
|
e847694e91 | ||
|
90a4e33415 | ||
|
f27dd8834b | ||
|
18a56cd795 | ||
|
cc80a2ec8e | ||
|
6c0de43669 | ||
|
f1ef422871 | ||
|
862fd6f4e8 | ||
|
7a2d30323e | ||
|
8b880de4a2 | ||
|
d211f42091 | ||
|
f044b01549 | ||
|
490e15021c | ||
|
48be2aed23 | ||
|
28499032da | ||
|
5eb4f65c32 | ||
|
ee27b17a12 | ||
|
a83037c440 | ||
|
bed03aa319 | ||
|
eb221ff305 | ||
|
075e6ac266 | ||
|
18e7d777a2 | ||
|
e9be72a73e | ||
|
33457b4035 | ||
|
49c7cf36e4 | ||
|
b03f08960b | ||
|
d9e135dcb5 | ||
|
3411e648b4 | ||
|
64400e82b5 | ||
|
703c4cf003 | ||
|
2d3e87da46 | ||
|
a59f380d31 | ||
|
ab53ee7377 | ||
|
ac6b7b24f9 | ||
|
fd0b7caa7c | ||
|
476450b93e | ||
|
98ba28b5d7 | ||
|
49785974cf | ||
|
7cc868910b | ||
|
39a241b763 | ||
|
c9af94f6db | ||
|
f978bf057f | ||
|
7ad8f211c6 | ||
|
5cdd46e38e | ||
|
1fce25c7af | ||
|
9479bb6bfc | ||
|
b33d85b594 | ||
|
a0e033b2cd | ||
|
5d0c279351 | ||
|
7831d9a463 | ||
|
7dc6a46cff | ||
|
bb69d64a0f | ||
|
8463040ad1 | ||
|
3b7cfd068b | ||
|
8089cde977 | ||
|
d5a759652f | ||
|
e95b356465 | ||
|
c524ac7bb5 | ||
|
8c9e203458 | ||
|
47c4bf5be0 | ||
|
5c7838e168 | ||
|
388157b995 | ||
|
6a1a70c677 | ||
|
ff1cacb54a | ||
|
19700fccb2 | ||
|
2865ab84a9 | ||
|
e3264d5fd3 | ||
|
cb9c4e362c | ||
|
b56a7afd19 | ||
|
95051e13c3 | ||
|
832920c6ba | ||
|
fa564e1f93 | ||
|
d5eeb9d6f0 | ||
|
6606c1f682 | ||
|
5615fd26c2 | ||
|
a1d3e77347 | ||
|
823369f275 | ||
|
358c139a43 | ||
|
dd1a9745db | ||
|
59a7584386 | ||
|
f4304336ea | ||
|
4cf2a482ea | ||
|
3e23f6c22b | ||
|
9b400134d5 | ||
|
e05b0ae9a4 | ||
|
7a739e80ef | ||
|
33aa61ef2c | ||
|
1f5fd4d564 | ||
|
24e69bb877 | ||
|
cd730ccff5 | ||
|
1d1c6a98ce | ||
|
ddb77d6c9b | ||
|
4aa3f51016 | ||
|
8c8583d04f | ||
|
04742f320e | ||
|
851a5d48c3 | ||
|
6bce14bee2 | ||
|
5fa5008ee9 | ||
|
fe7db31663 | ||
|
b488329104 | ||
|
19871cfd68 | ||
|
d9f1620b2f | ||
|
8107b1a2dd | ||
|
964c6f7d58 | ||
|
1c3f343baf | ||
|
559a2bf033 | ||
|
6ff3222cbd | ||
|
9620e1e97f | ||
|
8581345acc | ||
|
495d00e925 | ||
|
22f9562928 | ||
|
6042b82964 | ||
|
f93837ceb2 | ||
|
5478bd59bf | ||
|
1b05474979 | ||
|
e5154547f8 | ||
|
827d04c482 | ||
|
f393552fec | ||
|
fcbbaae63c | ||
|
675a4111e9 | ||
|
22269902ed | ||
|
845f2657db | ||
|
08c699c745 | ||
|
9a7624b47a | ||
|
21064a41b5 | ||
|
1293209d23 | ||
|
f824439137 | ||
|
3438dcdd4e | ||
|
8f6194a883 | ||
|
aab86f8b98 | ||
|
510581e0ef | ||
|
5f326d7ec6 | ||
|
4573d2d19b | ||
|
cb9867cb48 | ||
|
31119c89df | ||
|
a04afde35c | ||
|
61843d60b2 | ||
|
e0ce028c88 | ||
|
a326884df8 | ||
|
fa27d171d0 | ||
|
e92c0e85ec | ||
|
1012bbeecf | ||
|
fd85ff0c7a | ||
|
9194ee4973 | ||
|
65fc43a1f3 | ||
|
8d42ab6b91 | ||
|
bcf570cc16 | ||
|
11a946df39 | ||
|
a4a2ecb21a | ||
|
0313b8f0bc | ||
|
8476fc3fb0 | ||
|
c1f9d7cb16 | ||
|
40d57ff884 | ||
|
ce251133c0 | ||
|
2c267a3cf1 | ||
|
1e1904a9b8 | ||
|
e5b1867118 | ||
|
fe20fc3128 | ||
|
84431ab927 | ||
|
5d70bbf4c4 | ||
|
5a0fb278d1 | ||
|
920259c250 | ||
|
52b1a46549 | ||
|
b1f11464b6 | ||
|
75dd3315e6 | ||
|
84eaf3da7d | ||
|
54a6273191 | ||
|
4c083c1ed4 | ||
|
e3e9bf4bea | ||
|
b49a9b9933 | ||
|
65fcff87b2 | ||
|
f2bb2024c8 | ||
|
82aa0eacb2 | ||
|
38d8fa0b6a | ||
|
d7f34874ab | ||
|
a4b42f0b73 | ||
|
8993a51893 | ||
|
147a455171 | ||
|
192bdae280 | ||
|
2f65a2f5cc | ||
|
332b640cd3 | ||
|
ee178947d7 | ||
|
d491e49fd6 | ||
|
b03d3fb268 | ||
|
3021edc38d | ||
|
f79ac6d30b | ||
|
47f04afa48 | ||
|
ea216accd7 | ||
|
a040ed55cc | ||
|
8c9231dbb4 | ||
|
5ee1d4893a | ||
|
ca89ad75b4 | ||
|
0c8c9f59fc | ||
|
2acbb7b01d | ||
|
1e1f2a6e67 | ||
|
8595e4b1d1 | ||
|
526486da6b | ||
|
33330ad001 | ||
|
59cab36035 | ||
|
64decbfd74 | ||
|
b9db0b55cb | ||
|
9aba77e31b | ||
|
54f9aef0d4 | ||
|
ca5f859dc8 | ||
|
4042d5f242 | ||
|
53081bd1d8 | ||
|
cb3ef5b642 | ||
|
b66052f3ce | ||
|
65eab87238 | ||
|
8648d5409e | ||
|
c30cd885dd | ||
|
9b29369222 | ||
|
7e02ad648c | ||
|
fa7ef93bc5 | ||
|
05fbd32c4d | ||
|
b891d205dd | ||
|
2f6f8a7e6f | ||
|
fb0fdddd76 | ||
|
76b93f5598 | ||
|
4b33a34ce3 | ||
|
2d86c1a869 | ||
|
c93ddf62c3 | ||
|
0d1ea05658 | ||
|
f34297cfba | ||
|
8a453924a0 | ||
|
5df527edaf | ||
|
80dcdd3df6 | ||
|
1b9aa1b708 | ||
|
33fdcca2cf | ||
|
6896e9402e | ||
|
20bdb347cd | ||
|
cb8888a985 | ||
|
a20a828b57 | ||
|
c3851c5469 | ||
|
3aa6890e3e | ||
|
56a41f174e | ||
|
ecdf8c64fe | ||
|
911f9fb0ee | ||
|
d871fd12cc | ||
|
b80d14ba19 | ||
|
04ac4c66ae | ||
|
23c798b41d | ||
|
756b276070 | ||
|
1e4aeb2efb | ||
|
474d36499a | ||
|
c2bdae23a1 | ||
|
643a6c2311 | ||
|
7e0844d92f | ||
|
218efa62ef | ||
|
a7c3c794df | ||
|
33a634be33 | ||
|
565d8325c4 | ||
|
6af4947e70 | ||
|
642588b9cd | ||
|
c35cb0eb1b | ||
|
69344322d1 | ||
|
3b2f939590 | ||
|
7a17865b22 | ||
|
803cbd576f | ||
|
963264a73a | ||
|
234d34366a | ||
|
0d31eb8670 | ||
|
815cd0ed68 | ||
|
8233cf3688 | ||
|
6b4dd4be6c | ||
|
f6ef18ac74 | ||
|
d872640927 | ||
|
b3ebffa07d | ||
|
da0582075a | ||
|
f7f0461471 | ||
|
329683f746 | ||
|
f6f1dfb55d | ||
|
484e453780 | ||
|
e7ed7c1913 | ||
|
29f36fed08 | ||
|
072f06abf7 | ||
|
1c9e3af482 | ||
|
029a84aa74 | ||
|
276c462553 | ||
|
fec0dc2b13 | ||
|
6412d25602 | ||
|
7c743e6f41 | ||
|
0156c52a2c | ||
|
7531be3510 | ||
|
4c45022ed0 | ||
|
62f1695cb3 | ||
|
b6f33919b7 | ||
|
2d85e8df8b | ||
|
79ddb14404 | ||
|
e104cf012d | ||
|
49e624bbe9 | ||
|
1aa811ce12 | ||
|
2dae71c619 | ||
|
2a49371e07 | ||
|
20cbb3f745 | ||
|
48f1e53e1e | ||
|
df2716a109 | ||
|
2cad2c21e6 | ||
|
d141bd4121 | ||
|
e80ad0e0f9 | ||
|
4694885015 | ||
|
dc8320c129 | ||
|
51db8f8f53 | ||
|
66f7f1768f | ||
|
4a11baa372 | ||
|
4ab15a8292 | ||
|
b5c62cf86f | ||
|
dc50e0637f | ||
|
4658d7ea54 | ||
|
6f00c1b626 | ||
|
ddcd687617 | ||
|
91499d4b0e | ||
|
77f0e678ec | ||
|
d5afb9e805 | ||
|
384a999032 | ||
|
edfb86fe10 | ||
|
5cc7bf5dbd | ||
|
8619ff0744 | ||
|
2f12eb616a | ||
|
841eb45b66 | ||
|
b912416be5 | ||
|
5c1a46c149 | ||
|
93df23d962 | ||
|
1ed364a000 | ||
|
78832732c4 | ||
|
3a3783dfcd | ||
|
dbc4796d6a | ||
|
7cc9bee7a2 | ||
|
52b1cd40d1 | ||
|
794a2bfd00 | ||
|
a5815ad5c6 | ||
|
bcc77e169c | ||
|
acee3809b3 | ||
|
6ab72b2653 | ||
|
8b1b9f8c55 | ||
|
e74c46fc4e | ||
|
6cfb55a396 | ||
|
ff577e6c2c | ||
|
ef69daacdf | ||
|
82002eabfe | ||
|
00192266a1 | ||
|
437d70f569 | ||
|
2d5c82b4ec | ||
|
c8edc6ed58 | ||
|
c833b47b21 | ||
|
18bf0eb61a | ||
|
a34836f35b | ||
|
ead67a7c17 | ||
|
24c934f8c0 | ||
|
5abd7a39a2 | ||
|
b75546d0fb | ||
|
3ea258de26 | ||
|
ea18793965 | ||
|
bcc0d4b5f0 | ||
|
0ff3340da7 | ||
|
4cce109e16 | ||
|
fe7c283aea | ||
|
51e46cc898 | ||
|
ca96fac488 | ||
|
6b326b14c0 | ||
|
928c98a84e | ||
|
39d4622563 | ||
|
5632d0eabb | ||
|
f53848c360 | ||
|
4e06aaeaa8 | ||
|
cc07800570 | ||
|
c146132a4a | ||
|
8cd5e0af1a | ||
|
909b6877bd | ||
|
825612b419 | ||
|
54c8a4b3b7 | ||
|
a59572f96d | ||
|
6fffa5b171 | ||
|
134076e738 | ||
|
e2014850b9 | ||
|
c66a61d896 | ||
|
8e132ef0c4 | ||
|
7426f1a16b | ||
|
25c3895836 | ||
|
12ca641ff5 | ||
|
888e5257e0 | ||
|
3023d254dd | ||
|
9b78d76873 | ||
|
88684baecf | ||
|
02d1f90d13 | ||
|
91910ba013 | ||
|
970cb100af | ||
|
41f70e18af | ||
|
516f35b865 | ||
|
3506ae6085 | ||
|
c91a38b013 | ||
|
13fb3fd4a0 | ||
|
fe9045d82e | ||
|
a5ab9a9671 | ||
|
4728dd0a9e | ||
|
e94b9b9a62 | ||
|
174a36257f | ||
|
4198434261 | ||
|
481c6ad99a | ||
|
20de4c86ad | ||
|
85b3f6d372 | ||
|
373848f561 | ||
|
9048d40bc2 | ||
|
abc8d61730 | ||
|
ae76d19663 | ||
|
c89c19d2f9 | ||
|
f0d04f82f8 | ||
|
5e2e0af8b4 | ||
|
44bc05df80 | ||
|
5d0bfdd840 | ||
|
a66017a6a0 | ||
|
6d37ed6256 | ||
|
6c29e81051 | ||
|
3237c2172a | ||
|
c4617d3268 | ||
|
6a770517cc | ||
|
33de691d9f | ||
|
323a601123 | ||
|
50bbac6005 | ||
|
eb6d5b6b27 | ||
|
d7e2017c28 | ||
|
3c9b667d3e | ||
|
27ed9fb11d | ||
|
58ba4d6a3e | ||
|
f7ae36739a | ||
|
c36d66bdb6 | ||
|
cba75d8239 | ||
|
33442d953d | ||
|
e1240b42ed | ||
|
9e5fc16307 | ||
|
285ebd58a8 | ||
|
c7bdf643c5 | ||
|
645e67231e | ||
|
7fcd3bee0d | ||
|
6241ae009e | ||
|
4930153413 | ||
|
1c59db9bff | ||
|
77d12c0451 | ||
|
dc12dc4495 | ||
|
60c3afe0fe | ||
|
86ae1df257 | ||
|
8c95071eea | ||
|
6de5cd57e7 | ||
|
2218020db9 | ||
|
b9035fc3a6 | ||
|
478b1d56f8 | ||
|
c42e026058 | ||
|
94184eda42 | ||
|
7b60ee9316 | ||
|
dfc7a531db | ||
|
34e233e1c3 | ||
|
ff35fbf120 | ||
|
d005109133 | ||
|
eb32a2c228 | ||
|
dc15978ac8 | ||
|
a1c0b81bae | ||
|
029165638b | ||
|
61ea8e8676 | ||
|
af890e6677 | ||
|
d43008b2a5 | ||
|
d95cbb2757 | ||
|
f5e0986230 | ||
|
c30073793e | ||
|
521b09cc96 | ||
|
3d4a9324e6 | ||
|
46c4869945 | ||
|
e43f031769 | ||
|
1820362b2b | ||
|
907e071c90 | ||
|
d284c3fa85 | ||
|
8cf2f3c3f1 | ||
|
2edd3741f6 | ||
|
b8b33d1f36 | ||
|
bd1a9c1afe | ||
|
a9f12892ea | ||
|
f57aa47a40 | ||
|
b65f871929 | ||
|
0b39631464 | ||
|
3d4743ee62 | ||
|
138abdbc47 | ||
|
c088d69f93 | ||
|
0063145ed8 | ||
|
dfd194a5fa | ||
|
c750c0e571 | ||
|
7217689e02 | ||
|
1fcfff6861 | ||
|
a8a156e63c | ||
|
c2a38612a9 | ||
|
c51703be60 | ||
|
c0d6fd4f86 | ||
|
2ac0df0b75 | ||
|
8cdaaffd42 | ||
|
507ef68faa | ||
|
7b032a9862 | ||
|
4db2426336 | ||
|
83ab83043e | ||
|
9259ca98f3 | ||
|
ff3da0818c | ||
|
93f6f253ea | ||
|
65808418e1 | ||
|
4371f370bc | ||
|
4ebbb19e25 | ||
|
c60df96deb | ||
|
0dfe12fab0 | ||
|
2d797dd816 | ||
|
cabfdd5c48 | ||
|
7decad177c | ||
|
43e59258e4 | ||
|
8747c7a42a | ||
|
2b14a82b72 | ||
|
268ebb3a46 | ||
|
0567b41f24 | ||
|
bce91555f5 | ||
|
b8c58f41b6 | ||
|
7ef5858f8d | ||
|
70ff1ef216 | ||
|
1884558470 | ||
|
05149a391f | ||
|
7e40fcc344 | ||
|
bad53bc201 | ||
|
da8bcc7ed9 | ||
|
01278e591c | ||
|
1471c64fb2 | ||
|
fd958939be | ||
|
7c33baabd2 | ||
|
0ec491ea9d | ||
|
b6a634fe38 | ||
|
ecb96257b9 | ||
|
30a037c4fe | ||
|
efbcb38fdf | ||
|
c9261f50aa | ||
|
cd3d2badf0 | ||
|
639d93687f | ||
|
95ae688072 | ||
|
ab0aea900c | ||
|
aae4fafad2 | ||
|
6489bc1929 | ||
|
1023249e31 | ||
|
903959301b | ||
|
1f6fb4e716 | ||
|
a4cd4535dc | ||
|
480ea400f3 | ||
|
4c40accbb9 | ||
|
0cfc812a5d | ||
|
835805ad61 | ||
|
7c0a1ddb05 | ||
|
2250daeb53 | ||
|
c0d3ed0739 | ||
|
371ea7cbe9 | ||
|
9b582db492 | ||
|
630f83957a | ||
|
89c51f51e2 | ||
|
820f999f14 | ||
|
cfb76fedb6 | ||
|
12d3cd8f29 | ||
|
4d1eca0d57 | ||
|
b74959a605 | ||
|
7a180f554d | ||
|
0d4a26f148 | ||
|
9e5a22bbe5 | ||
|
9b1f6acc2b | ||
|
cbbbf49043 | ||
|
6cc96318c8 | ||
|
278370c8e5 | ||
|
f7ff6dbb66 | ||
|
0083c084e4 | ||
|
35ceb8e626 | ||
|
0ad523038c | ||
|
cf03229a99 | ||
|
5a8d204c83 | ||
|
0b38ab339e | ||
|
cfdb3952c6 | ||
|
97c0d112af | ||
|
fd0285de09 | ||
|
54e7a8f0c0 | ||
|
f7d8ee041b | ||
|
cc7423855b | ||
|
a4636a06a7 | ||
|
ef79621c44 | ||
|
48d587d255 | ||
|
f31d7e1f91 | ||
|
43a02da07b | ||
|
620d3cf402 | ||
|
23845a57a9 | ||
|
9fef90b0f7 | ||
|
567447456e | ||
|
462a77ffb5 | ||
|
fecce75c73 | ||
|
98c1f16002 | ||
|
23f7208235 | ||
|
7c2e28c8c5 | ||
|
ef031d87be | ||
|
e076cc7b1f | ||
|
a687fd9aeb | ||
|
8059975f74 | ||
|
824837486b | ||
|
c82378ea57 | ||
|
1a70ca75e8 | ||
|
fc2ce5a925 | ||
|
1a482ad276 | ||
|
d6a209816b | ||
|
9a6ec4e959 | ||
|
0638bbb5d5 | ||
|
0b40ad32f3 | ||
|
c863ac0f90 | ||
|
49d02eff93 | ||
|
5a6c6070d6 | ||
|
24ed997cfb | ||
|
4d9b7b2359 | ||
|
1cd5df9404 | ||
|
d3a358b9bd | ||
|
5e748ce940 | ||
|
4d0a57fe0b | ||
|
2f9d980c93 | ||
|
1f8debbac9 | ||
|
a8531605db | ||
|
997f0de4d5 | ||
|
7dded559c0 | ||
|
315db6d505 | ||
|
7c4a1a596f | ||
|
8c06cd5f98 | ||
|
ffd6baec42 | ||
|
4dc4db56dc | ||
|
3b06ae5072 | ||
|
a129053ed9 | ||
|
dd7163a699 | ||
|
c2f6208ce5 | ||
|
2d591cde78 | ||
|
1ec93bdda6 | ||
|
4865c3273a | ||
|
dbb18ad5d8 | ||
|
fc579b121a | ||
|
6263286c4a | ||
|
0b8c88f7d6 | ||
|
a62e75964c | ||
|
77f921f5de | ||
|
c7b5cb8e8e | ||
|
0f2d7d41f1 | ||
|
d24ae9c032 | ||
|
211d72e545 | ||
|
e8353eab26 | ||
|
34fa61e13c | ||
|
71c463ae85 | ||
|
8ced2c6478 | ||
|
2daa7d1a53 | ||
|
abb1d59d4e | ||
|
a5e1276924 | ||
|
bd89ff4c9e | ||
|
810ba4edcf | ||
|
f4ec6290f8 | ||
|
8d7d5343d8 | ||
|
594aae71e5 | ||
|
0019178014 | ||
|
9629f9acc9 | ||
|
fc0f7dc217 | ||
|
cc97c71883 | ||
|
38c8310969 | ||
|
3f0d42f74b | ||
|
26d5b04124 | ||
|
6e94be3f50 | ||
|
30e6a4c29d | ||
|
fe93bc7627 | ||
|
90d502fdbd | ||
|
daacd25344 | ||
|
8b3e9fe35c | ||
|
5517ab0651 | ||
|
92f49ed3e3 | ||
|
6bf215bc15 | ||
|
d73898437f | ||
|
49f3d86c84 | ||
|
95876cbc9c | ||
|
39386275a4 | ||
|
211f16d68b | ||
|
dca8c8e189 | ||
|
419a9af28c | ||
|
baf40d35c5 | ||
|
9d9674a7ca | ||
|
ce13dbba10 | ||
|
3f5178dc21 | ||
|
5da3059175 | ||
|
b200d4f099 | ||
|
47e75b34a4 | ||
|
e62ec97707 | ||
|
a4c4df3b95 | ||
|
d9a146f54a | ||
|
a28cf475af | ||
|
f16fb1373e | ||
|
43a9b82797 | ||
|
0d23606653 | ||
|
866ff2b8f0 | ||
|
c6c3427507 | ||
|
2301d8d90b | ||
|
e5da85631a | ||
|
67268bcc23 | ||
|
b598a5ab78 | ||
|
e0a5f4e081 | ||
|
dbfaa99107 | ||
|
049cc6aa01 | ||
|
f53b72e5ff | ||
|
3da65ff233 | ||
|
a7754a14b5 | ||
|
8df61992d7 | ||
|
129dc7d73b | ||
|
dcc2577b97 | ||
|
e9629a5149 | ||
|
4c4e914806 | ||
|
cb941956d3 | ||
|
0451c6d30c | ||
|
a385a50260 | ||
|
41f9a174e2 | ||
|
5a1a11bcde | ||
|
7efc5a1558 | ||
|
fb94f79094 | ||
|
13ca03efb1 | ||
|
515b13fdd5 | ||
|
0436cc44fc | ||
|
e2682e62a8 | ||
|
77efc60a15 | ||
|
457bf3b604 | ||
|
ed1b6a9bed | ||
|
ef5a6835b2 | ||
|
de40ced21c | ||
|
9d56cee622 | ||
|
5f73afae3d | ||
|
964cdaf3a3 | ||
|
5999b1c73a | ||
|
8af666cb4f | ||
|
724863c275 | ||
|
1b1cb8295b | ||
|
f54e7712c5 | ||
|
2ff175938d | ||
|
ec1ea0db04 | ||
|
e0d3602331 | ||
|
b968147e0a | ||
|
f31a51a1c8 | ||
|
b47ff72ebc | ||
|
6eead8f6a3 | ||
|
61ecd10240 | ||
|
5db1aa5401 | ||
|
48de0bf741 | ||
|
7839e0d7d5 | ||
|
f40b3bc5bc | ||
|
af13d474e8 | ||
|
26909ee913 | ||
|
2533ad723a | ||
|
17600b6bab | ||
|
d18b10a3d7 | ||
|
d65d5d0a84 | ||
|
52424d8640 | ||
|
e9dd5f327f | ||
|
12837f6905 | ||
|
b0d1ae4a5c | ||
|
1da8c1b27f | ||
|
5b94fe6342 | ||
|
51c5ccf412 | ||
|
723bf44887 | ||
|
f4e1a2b849 | ||
|
3f7ada506e | ||
|
2ff5038b09 | ||
|
2620323fac | ||
|
93c42bcbe0 | ||
|
bdb442be21 | ||
|
2aa52c7d00 | ||
|
7aa236fbb2 | ||
|
a381ee6a55 | ||
|
23162bf0de | ||
|
8460034f58 | ||
|
9aba7e3aa7 | ||
|
4148795c8b | ||
|
c06b1cc103 |
903
NEWS.pre-2.0
Normal file
@@ -0,0 +1,903 @@
|
||||
Overview of Changes in GTK+ 2.0.0
|
||||
=================================
|
||||
|
||||
* GtkTreeView fixes [Jonathan Blandford, Kristian Rietveld, Darin Adler]
|
||||
* Build fixes [Anders Carlsson, Tor Lillqvist, Manish Singh]
|
||||
* Bug fixes. [Thomas Leonard, Owen Taylor]
|
||||
|
||||
Overview of Changes in GTK+ 2.0.0 rc1
|
||||
=====================================
|
||||
|
||||
* GtkTreeView fixes [Kristian Rietveld, Jonathan Blandford, Richard Hult]
|
||||
* Text widget fixes [Havoc Pennington]
|
||||
* Efficiency fixes when using Xft [Owen Taylor]
|
||||
* Key handling fixes and other fixes for Win32 [Hans Breuer, Tor Lillqvist]
|
||||
* Try to fix key handling without XKEYBOARD extension [Owen]
|
||||
* Documentation fixes and improvements
|
||||
[Matthias Clasen, Alexey Malyshev, Akira Tagoh, Vitaly Tishkov]
|
||||
* Widget drawing improvements [Soeren Sandmann]
|
||||
* Allow cycling between multiple menu bars with <Control>Tab [Owen]
|
||||
* Try to build libraries with only shared library dependencies on Xft to
|
||||
deal with transition to Xft2 [Owen]
|
||||
* Portability fixes [Owen, Miroslaw Dobrzanski-Neumann]
|
||||
* Don't use red as the default cursor color [Owen]
|
||||
* Bug fixes, bug fixes, bug fixes.
|
||||
|
||||
Other contributors: Darin Adler, Jacob Berkman, Kevin Breit, Hans Breuer,
|
||||
Anders Carlsson, Damon Chaplin, Finlay Dobbie, Jody Goldberg,
|
||||
Andreas J. Guelzow, Scott Guilbeaux, Vlad Harchev, James Henstridge,
|
||||
Tim Janik, Satyajit Kanungo, Charles Kerr, Sergey Kuzminov, Miles Lane,
|
||||
Alexander Larsson, Paolo Maggi, Skip Montaro, Jan Mynarik, Sven Neumann,
|
||||
Padraig O'Briain, Narayani Pattipati, Mark Patton, Havoc Pennington,
|
||||
Ettore Perazzoli, Guillermo S. Romero, Manish Singh, Morten Welinder
|
||||
|
||||
Overview of Changes in GTK+ 1.3.15
|
||||
==================================
|
||||
|
||||
* New stock and improved icon images
|
||||
[Tuomas Kuosmanen, Jakub Steiner, Anders Carlsson]
|
||||
* Widget drawing improvements for check and radio buttons,
|
||||
spinbuttons [Soeren Sandmann]
|
||||
* Clean up module search path algorithm, use GTK_PATH [Owen Taylor]
|
||||
* Add GtkSetting for font name. [Richard Hestilow]
|
||||
* Much improved key matching code, accelerators work independent
|
||||
of group [Owen]
|
||||
* Make mnemonics work for embedded GtkPlug widgets [Owen]
|
||||
* Keynav improvements for GtkTreeView [Kristian Rietveld]
|
||||
* Fix gtk_tree_view_scroll_to_cell() [Jonathan Blandford]
|
||||
* Rename gtk_tree_view_get_iter_root() and gtk_tree_path_new_root()
|
||||
to gtk_tree_view_get_iter_first() and gtk_tree_path_new_first(),
|
||||
add compatibility macros.
|
||||
* GtkTreeView bug fixes [Kristian, Anders, Damon Chaplin]
|
||||
* GtkTextView bug fixes [Havoc Pennington]
|
||||
* Pad class structures for future binary compatibility [Owen]
|
||||
* Tutorial improvements [Sven Neumann, Matthias Clasen]
|
||||
* Fixes for MULTIPLE selection target [Gregory Merchan, Owen]
|
||||
* Fix problems with initial widget size [Owen]
|
||||
* AIX compilation fixes [Miroslaw Dobrzanski-Neumann]
|
||||
* Win32 fixes [Hans Breuer, Tor Lillqvist]
|
||||
* Miscellaneous bug fixes
|
||||
|
||||
Other contributors: David L. Cooper, Eric Fischer, Jody Goldberg,
|
||||
Satajyit Kanungo, Thomas Leonard, Mark Patton, Manish Singh,
|
||||
Nicolas Setton
|
||||
|
||||
Overview of Changes in GTK+ 1.3.14
|
||||
==================================
|
||||
|
||||
* Keyboard focus improvements [Owen Taylor]
|
||||
* Code cleanup [Matthias Clasen, Manish Singh, Darin Adler]
|
||||
* Fix accidentally exported variables [Mark McLoughlin]
|
||||
* GtkTreeView fixes [Jonathan Blandford, Kristian Rietveld, John Harper, Darin]
|
||||
* Default to yellow tooltips [Owen]
|
||||
* RC file fixes for reloading, priorities [Owen, Matthias]
|
||||
* GtkMenu behavior improvements and bug fixes [Owen, Arnaud Charlet]
|
||||
* GtkTextView fixes [Havoc Pennington, Daniel Elstner, Dennis Bjorklund]
|
||||
* Improve keynav for paned widgets, tooltips, spin buttons, notebooks,
|
||||
scrolled windows [Soeren Sandmann, Padraig, Owen]
|
||||
* Add Emacs/Default key themes [Owen]
|
||||
* Win32 fixes [Hans Breuer, Tor Lillqvist]
|
||||
* Ethiopic input methods [Daniel Yacob]
|
||||
* Opaque paned window resizing [Soeren]
|
||||
* Tweak table expansion behavior [Tim Janik]
|
||||
* Fix GtkCalendar focus drawing [Bill Haneman]
|
||||
* Allow themeable cursor thickness [Bill]
|
||||
* Start of fixing of tutorial for GTK+-2.0 [Matthias]
|
||||
* Add a ::adjust-bounds signal to GtkRange to allow spreadsheet style
|
||||
scrollbars. [Jody Goldberg]
|
||||
* Add the ability to turn on multiple selection for GtkFileSel [Manish]
|
||||
* Bug fixes
|
||||
|
||||
Other contributors: Jacob Berkman, Padraig O'Briain, Anders Carlsson,
|
||||
Johan Dahlin, Richard Hult, Stefan Kost, Alex Larsson, Thomas Leonard,
|
||||
Paolo Maggi, Alexey Malyshev, Federico Mena Quintero, Skip Montaro,
|
||||
Sven Neumann, Havoc Pennington, Laszlo Peter, Christian Rose, Joe Shaw,
|
||||
Kevin Vandersloot, Morten Welinder, Peter Williams
|
||||
|
||||
Overview of Changes in GTK+ 1.3.13
|
||||
==================================
|
||||
|
||||
* Tree view fixes. [Kristian Rietveld, Jonathan Blandford, Anders Carlsson]
|
||||
* Tree view support for low-vision themes [Bill Haneman]
|
||||
* Text view bug fixes. [Havoc Pennington]
|
||||
* Win32 fixes and improvements. [Tor Lillqvist, Hans Breuer,
|
||||
Archaeopteryx Software]
|
||||
* Documentation improvements [Matthias Clasen, Havoc Pennington]
|
||||
* Accelerate alpha compositing using RENDER extension if present,
|
||||
and optimize the non-RENDER case a lot. [Owen Taylor]
|
||||
* Add support for "optional keybindings" (action signal returns FALSE) [Owen]
|
||||
* Fixed the infamous changing directory deletes filename bug
|
||||
[Owen and a cast of thousands]
|
||||
* Add mouse cursor hiding for text widgets [Anders Carlsson]
|
||||
* Simple Hangul input module [Yusuke Tabata]
|
||||
* Removed the scary startup warning.
|
||||
* GdkPixbuf pixel handling fixes [Owen, Michael Hore, Jim Cape]
|
||||
* Converted GtkFileSelection and GtkFontSelection to use GtKTreeView widgets
|
||||
instead of the deprecated GtkCList [Owen]
|
||||
* gtkhsv.h was installed by mistake, fixed that. [reported by Ross Burton]
|
||||
* gdk_pixbuf_render_to_drawable() now also handles alpha pixbufs.
|
||||
* Made Gtkimage draw GtkPixmap, GtkImage, GdkPixbuf insensitive, prelighted,
|
||||
etc. [Havoc, Owen]
|
||||
* Marked gtk_item_factory_path_from_widget() G_CONST_RETURN. [Matt Wilson]
|
||||
* gtk_image_menu_item_new_from_stock() now falls back to
|
||||
new_with_mnemonic, for consistency with gtk_button_new_from_stock()
|
||||
[Havoc Pennington]
|
||||
* GdkModifierType is now consistently used for modifier mask parameters
|
||||
[Mark Patton]
|
||||
* gtk_widget_set_accel_path() is now publically exported.
|
||||
|
||||
Other contributors: Darin Adler, Jeffrey Baker, Damon Chaplin, Brian Cameron,
|
||||
Murray Cumming, James Henstridge, Jacob Berkman, Arnaud Charlet, Jeff Franks,
|
||||
Jeff Garzik, Jody Goldberg, Diego Gonzalez, Melvin Hadasht, Raja Harinath,
|
||||
Tim Janik, Mike Kestner, Mathieu Lacage, Alex Larsson, Ryan Lovett,
|
||||
Mark McLoughlin, Sven Neumann, Padraig O'Briain, Xavier Ordoquy, Chris Phelps,
|
||||
Detlef Reichl, Guillermo S. Romero, Federico Mena Quintero, Manish Singh,
|
||||
HideToshi Tajima, Vitaly Tishkov, Jon Trowbridge, Sergey Vlasov.
|
||||
|
||||
Overview of Changes in GTK+ 1.3.12
|
||||
==================================
|
||||
|
||||
* Fix problems with PNG saving [Michael Natterer]
|
||||
* Cleanups of deprecated usages [Sebastian Wilhelmi]
|
||||
* Win32 fixes [Tor Lillqvist]
|
||||
* Documentation improvements [Matthias Clasen, Havoc Pennington,
|
||||
Vitaly Tishkov]
|
||||
* Frame buffer port fixes [Manish Singh]
|
||||
* GtkTextView bug fixes [Havoc Pennington, Chris Phelps]
|
||||
* Menu behavior improvements [Kristian Rietveld]
|
||||
* Make focus line width configurable, focus color work on
|
||||
dark themes. [Bill Haneman, Owen Taylor]
|
||||
* Add state argument to gtk_paint_focus() [Bill]
|
||||
* Added incremental revalidation to tree view, for better apparent speed
|
||||
[Jonathan Blandford]
|
||||
* Remove useless gtk_tree_view_column_cell_event() [Jonathan]
|
||||
* Display XIM status in a separate window [HideToshi Tajima]
|
||||
* Add GDK_DEBUG=nograbs to disable pointer, keyboard grabs [Jacob Berkman]
|
||||
* Add menu of Unicode control characters to GtkEntry, GtkTextView
|
||||
[Dov Grobgeld, Havoc]
|
||||
* Pass key releases along to input methods [Owen]
|
||||
* Many bug fixes
|
||||
|
||||
Other contributors: Darin Adler, Fabrice Bellet, Chris Blizzard,
|
||||
Hans Breuer, Anders Carlsson, Damon Chaplin, Murray Cumming, Jeff Franks,
|
||||
James Henstridge, Tim Janik, Alex Larsson, George Lebl, Kjartan, Maraas,
|
||||
Sven Neumann, Seth Nickell, Padraig O'Briain, Soeren Sandmann, Manish Singh,
|
||||
Matt Wilson
|
||||
|
||||
Overview of Changes in GTK+ 1.3.11
|
||||
==================================
|
||||
|
||||
* Massive rework of accelerator API and implementation (Tim Janik)
|
||||
* Major fixes to resizing and redrawing to eliminate hysteresis
|
||||
and optimize. (Owen Taylor, Soeren Sandmann)
|
||||
* Make many widgets NO_WINDOW to improve appearance and reduce
|
||||
drawing overhead (Owen)
|
||||
* Text view fixes (Havoc Pennington)
|
||||
* Make child widgets in GtkTextView work (Havoc)
|
||||
* GtkTreeModelSort fixage (Jonathan Blandford, Kristian Rietveld)
|
||||
* Clean up GtkTreeView drag and drop support (Owen)
|
||||
* Misc tree view fixes and improvements (Jonathan, Kristian, Anders, Matt Wilson)
|
||||
* Add gtk_window_get/set_focus(), gtk_window_set_default() as public
|
||||
functions (Owen, Damian Ivereigh)
|
||||
* Fixes to GtkPlug/GtkSocket (Michael Meeks, Owen)
|
||||
* Change button ordering in standard dialogs to correspond to
|
||||
GNOME usability project proposal (Gregory Merchan)
|
||||
* Add support for context sensitivity in input methods (Owen)
|
||||
* Hook up gtk_im_context_set_use_preedit() (Hidetoshi Tajima)
|
||||
* Fix gdk_window_scroll() and other aspects of big windows (Owen)
|
||||
* Remove need for X connection for class initialization (Jacob Berkman)
|
||||
* Propagate key events to parents of focused widget (Owen)
|
||||
* Don't export normal GTK+ marshalers, export deprecated compat marshalers (Owen)
|
||||
* Many Win32 Fixes and improvements (Hans Breuer, Tor Lillqvist)
|
||||
* Bug and documentation fixing (Matthias Clasen, Anders Carlsson,
|
||||
Jacob Berkman, others.)
|
||||
|
||||
Other Contributors:
|
||||
Darin Adler, Marius Andreiana, Erwann Chenede, Murray Cumming, Janet Davis,
|
||||
Daniel Egger, Daniel Elstner, Jeff Franks, Alex Larsson, George Lebl,
|
||||
Sergey Kuzminov, Eric Lemings, Arkadiusz Miskiewicz, Padraig O'Briain, Sven Neumann,
|
||||
Kristian Rietveld, Nicolas Setton, Manish Singh, Vitaly Tishkov, Sebastian Wilhelmi,
|
||||
Michael Natterer
|
||||
|
||||
Overview of Changes in GTK+ 1.3.10
|
||||
==================================
|
||||
|
||||
* GtkTextView fixes [Havoc Pennington]
|
||||
* GtkTreeView fixes and improvements [Jonathan Blandford, Kristian,
|
||||
Manish Singh, Joshua Pritikin, Oleg Maiboroda, James Henstridge]
|
||||
* gtkdemo improvements [Kristian Rietveld]
|
||||
* Drag and drop fixes to generic code and widgets
|
||||
[Owen Taylor, Damian Ivereigh]
|
||||
* Documentation improvement [Havoc Pennington, Matthias Clasen]
|
||||
* Spelling fixes [Jacob Berkman]
|
||||
* Move signals to the GtkEditable interface [Kristian]
|
||||
* Further stock image improvements [Jakub Steiner]
|
||||
* Support text chunks for the PGN loader, add gdk_pixbuf_get_option()
|
||||
[Sven Neumann]
|
||||
* Rename gdk_pixbuf_new_from_stream back to new_from_inline [Owen]
|
||||
* Automatically call setlocale(), unless explicitly disabled [Owen]
|
||||
* Property addition to various widgets [Michael Meeks, Owen]
|
||||
* Support building with automake-1.4 [James]
|
||||
* Make GtkRadioButton groups act as a single focus point [Owen]
|
||||
* Move gdk_window_lookup etc. to be cross-platform [Matthias]
|
||||
* Draw spinbuttons variably sized [Kristian]
|
||||
* Separate GdkAtom out from X atoms for compatibility with future
|
||||
multihead changes [Owen]
|
||||
* Require gdk_threads_init() to be explicitly called instead
|
||||
of piggybacking off of g_thread_init(). [Owen]
|
||||
* Improvements to text-view/label/entry popup menus [Damian, Jacob, Owen]
|
||||
* Bug fixes and cleanup [Matthias, others]
|
||||
|
||||
Other Contributors:
|
||||
Mark McLoughin, Mikael Hermansson, Soeren Sandmann, Anders Carlsson,
|
||||
Tim Janik, Murray Cumming, Hidetoshi Tajima, Padraig O'Briain,
|
||||
Hans Breuer, Vitaly Tishkov, Dov Grobgeld
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 1.3.9
|
||||
=================================
|
||||
|
||||
* Add editable text cells to GtkTreeView.
|
||||
Keynav, drawing fixes in GtkTreeView [Jonathan Blandford]
|
||||
* Text widget no longer always has a \n in it. [Havoc Pennington]
|
||||
* Text widget bug fixes [Havoc, Dov Grobgeld, Hidetoshi Tajima]
|
||||
* Allow -1 for width/height in gdk_pixbuf_render_*(). [Matthias Clasen]
|
||||
* Minor fix for major resizing problems in recent releases [Owen Taylor]
|
||||
* Restore ability to set _set properties to TRUE for
|
||||
GtkCellRendererText, GtkTextTag [Owen]
|
||||
* Cursor drawing improvements [Owen]
|
||||
* Win32 fixes [Hans Breuer]
|
||||
* Mark various functions as deprecated or private.
|
||||
* Misc bug fixes, portability fixes, and cleanups.
|
||||
|
||||
Other Contributors:
|
||||
Vitaly Tishkov, Christian Rose, Frank Belew, Jeff Franks, Sven Neumann,
|
||||
Kristian Rietveld, Vitaly Tishkov, Joshua N. Pritikin, Matt Wilson,
|
||||
James Henstridge, Detlef Reichl
|
||||
|
||||
Overview of Changes in GTK+ 1.3.8
|
||||
=================================
|
||||
|
||||
* GtkTreeView and GtkTreeModel API cleanups/improvements [Jrb]
|
||||
* GtkOptionMenu scrollwheel support [Alex]
|
||||
* GtkModule search paths [Owen]
|
||||
* Documenatation updates [Havoc,Jrb]
|
||||
* Major Gdk cleanup [Owen]
|
||||
* Miscellaneous other fixes/cleanups
|
||||
|
||||
Other Contributors:
|
||||
Joshua N Pritikin, Padraig O'Briain, Jakub Steiner, Matthias Clasen,
|
||||
Matt Wilson, James Henstridge
|
||||
|
||||
Overview of Changes in GTK+ 1.3.7
|
||||
=================================
|
||||
|
||||
* Many Pixbuf (loader) improvements [Matthias Clasen, Soeren Sandmann]
|
||||
* Added publically installed utility gdk-pixbuf-csource to generate
|
||||
inlined pixbufs in C source code [Tim Janik]
|
||||
* Optional movement of button children on press [Soeren, Owen Taylor]
|
||||
* Interactive searching in GtkTreeView [Kristian Rietveld]
|
||||
* Sorting/ordering improvements for GtkTreeView [Kris, Jonathan Blandford]
|
||||
* Animation of expander motion for GtkTreeView [Anders Carlsson]
|
||||
* Lots of misc GtkTreeView fixes and improvements [Jonathan]
|
||||
* New/improved stock icons [Jakub Steiner]
|
||||
* Code and API rework for window resizing [Havoc Pennington]
|
||||
* Converted accel groups to GObject [James Henstridge]
|
||||
* More property support improvements
|
||||
* Add facility for "secondary" buttons in
|
||||
GtkButtonBox/GtkDialog [Gregory Merchan]
|
||||
* Disentangled child visability from MAPPED state [Owen]
|
||||
* Plug/Socket improvements and port to the XEMBED protocol [Owen]
|
||||
* Added priorities for styles in RC files,
|
||||
support multiple parse contents [Owen]
|
||||
* Made GdkVisual and GdkDevice GObjects [Alexander Larsson]
|
||||
* Key binding improvements [Havoc]
|
||||
* Added GtkWidget::event-after signal since normal event handling
|
||||
is now aborted as soon as a handler returned TRUE [Tim]
|
||||
* Dnd fixes and improved icon support [Owen]
|
||||
* Removed GtkPacker widget
|
||||
* Fixing missing paired getters/setters [Kris]
|
||||
* Nuked remaining GtkArg cruft, implemented container/child properties [Tim]
|
||||
* Added window grab groups [Owen]
|
||||
* Many frame buffer improvements [Alex]
|
||||
* Win32 fixes and improvements [Hans Breuer]
|
||||
* Warning fixes [Darin Adler]
|
||||
* Miscellaneous bug and API fixes [Matthias et. al]
|
||||
|
||||
Other Contributors:
|
||||
Joshua N Pritikin, Hidetoshi Tajima, Manish Singh, ERDI Gergo, Jens Finke,
|
||||
Chema Celorio, Lee Mallabone, Vitaly Tishkov, Sebastian Wilhelmi,
|
||||
Nicola Girardi, Sven Neumann, Padraig O'Briain, Michael Natterer,
|
||||
Suresh Chandrasekharan, Jonas Borgström, Jay Cox, Michael Meeks,
|
||||
Mathias Hasselmann, Peter Williams, Thomas Broyer, Kjartan Maraas,
|
||||
Joel Becker, Jeff Franks, Brian Cameron, Skip Montanaro
|
||||
|
||||
Overview of Changes in GTK+ 1.3.6
|
||||
=================================
|
||||
|
||||
* Properly renders strikethrough text
|
||||
* win32 fixes
|
||||
* Added "scale" property to GtkTextTag and GtkCellRendererText to do
|
||||
relative font scaling
|
||||
* Added "format_value" signal to GtkScale to reformat value text
|
||||
* framebuffer fixes
|
||||
* Property support added to lots of widgets
|
||||
* Many GtkTreeView new features and API/implementation fixes
|
||||
* Lots of new_with_mnemonic() convenience functions
|
||||
* Change GtkImageMenuItem API to be more consistent/useful
|
||||
* Added lots of new stock items/icons
|
||||
* Rewrote GtkRange/GtkScale/GtkScrollbar, includes support for
|
||||
enabling/disabling extra scrollbar stepper arrows in gtkrc so NeXT
|
||||
themes won't need broken hacks
|
||||
* Convenience API for GtkRange similar to the one added to GtkSpinButton
|
||||
a while back
|
||||
* Make menubar/toolbar work properly with xthickness/ythickness of 1 or 0,
|
||||
and move some attributes from program settings to user settings.
|
||||
Allows nice 1-pixel-bevel themes.
|
||||
* Moved ::focus virtual function from GtkContainer to GtkWidget
|
||||
* Plenty of bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 1.3.5
|
||||
=================================
|
||||
|
||||
* New default theme based on Raleigh theme for 1.2.x.
|
||||
* Dependency on the ATK library added as a step to
|
||||
providing accessibility-enabling interfaces
|
||||
* XEMBED-based GtkPlug/GtkSocket now basically works.
|
||||
* Drag and drop of column headers in GtkTreeView
|
||||
* GtkColorSelector work: hooks for saving and propagating palette, UI tweaks,
|
||||
and API sanitation
|
||||
* Key binding fixes
|
||||
* Configurable padding/spacing in a lot of places
|
||||
* Invisible text in GtkTextView fixed
|
||||
* SHM segments now created with a mode of 0600
|
||||
* Bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 1.3.4
|
||||
=================================
|
||||
|
||||
* Win32 fixes
|
||||
* GtkTreeView improvements and fixes
|
||||
* Fix glib-2.0.m4
|
||||
* Miscellaneous bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 1.3.3
|
||||
=================================
|
||||
|
||||
[ 5600 lines of ChangeLog ]
|
||||
|
||||
* API cleanups
|
||||
* Win32 work (Tor, Hans Breuer)
|
||||
* Focus improvements (Owen)
|
||||
* Frame buffer improvements (Alex)
|
||||
* Work on GtkTextView (Havoc)
|
||||
* Much work on GtkTreeView (Jonathan)
|
||||
* Selectable labels (Havoc)
|
||||
* Converted many arguments to properties (Lee Mallabone, John Margaglione)
|
||||
* Add exact regions to GdkExposeEvent, propagate it. (Alex)
|
||||
* Added ability to have resize grips in status bars (etc.) using
|
||||
_NET_WM_MOVERESIZE protocol. (Havoc)
|
||||
* Added mnemnonic mechanism to make setting underline accelerators
|
||||
much easier. (Alex)
|
||||
* Add per-style property mechanism to allow themes to change
|
||||
geometry parameters. (Tim)
|
||||
* Added global settings mechanisms for settings such as double-click
|
||||
time. (Tim, Owen)
|
||||
* Various support functions for new and old WM properties (Havoc, Alex)
|
||||
* Add TRUE-stops-returns for boolean-returning signals (Ron Steinke)
|
||||
|
||||
Overview of Changes in GTK+ 1.3.2
|
||||
=================================
|
||||
|
||||
GTK Core:
|
||||
|
||||
* New stock-icon and stock-item system. Use themeable pixbufs in
|
||||
dialogs, buttons, etc. [Havoc]
|
||||
* Theme engines reworked to use derivation and new object system. [Owen]
|
||||
* Added GtkClipboard object for simple selection handling. [Owen]
|
||||
* Make GtkEditable an interface, move implementation to GtkOldEditable for
|
||||
compat. [Owen]
|
||||
* Better handling of default directionality. [Robert]
|
||||
* Use GSignal as backend for GtkSignal and other GObject stuff. [Tim]
|
||||
* Move theme engines to GTypePlugin. [Owen]
|
||||
|
||||
GDK:
|
||||
|
||||
* Beginning of implementation of client parts of new window manager spec. [Owen]
|
||||
* Make gdk_drawable_get_image() work with backing store. [Havoc]
|
||||
|
||||
Widgets:
|
||||
|
||||
* New text widget [Havoc]
|
||||
- Adjustable tab handling.
|
||||
- Ability to have scrolling side areas in new text widget for tabs/line numbers.
|
||||
- Many cleanups and small improvements.
|
||||
* Improvements to submenu navigation [Nils Barth/David Santiago] and
|
||||
scrolling menus. [Alex]
|
||||
* Simplification of progress bar API. [Havoc]
|
||||
* Make GtkImage a generic image-display widget. [Havoc]
|
||||
* New GtkTreeView tree widget. Model/view architecture, flexible rendering,
|
||||
large datasets, etc. [Jonathan]
|
||||
* New GtkMessageBox widget for message display. [Havoc]
|
||||
* Allow labels to have contents set from XML-like markup language. [Havoc]
|
||||
* Make dialogs derive from GtkDialog and use stock buttons. [Havoc]
|
||||
|
||||
Internationalization:
|
||||
|
||||
* Proper character set conversion for clipboard/selection. [Owen]
|
||||
* New input method system via loadable modules; support on-the-spot
|
||||
preedit in GtkEntry and new text widget; allow switching input methods
|
||||
on the fly; include modules for XIM and demo Cyrillic-transliteration
|
||||
module. [Owen]
|
||||
* VIQR, Thai, and Inuktitut input methods. [Robert]
|
||||
* Convert po files to UTF-8. [Robert]
|
||||
|
||||
gdk-pixbuf:
|
||||
|
||||
* Full-alpha compositing for gdk-pixbuf on drawable. [Havoc]
|
||||
* Add simple saving to gdk-pixbuf. [David Welton/Havoc]
|
||||
* Add improved error handling with GError to gdk-pixbuf. [Havoc]
|
||||
|
||||
Ports:
|
||||
|
||||
* Much work on Win32 Port. [Tor/Hans]
|
||||
* Much work on Linux-FB Port. [Elliot/Alex]
|
||||
|
||||
Misc:
|
||||
|
||||
* Start of new gtk-demo demo program. [Owen/Jonathan]
|
||||
* Bug fixes and more bug fixes.
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 1.3.1:
|
||||
|
||||
* GTK+ now uses the Pango library for text manipulation. All
|
||||
strings in GTK+ now are in Unicode, languages written
|
||||
from right-to-left, and complex-text languages are now supported.
|
||||
* The gdk-pixbuf library for image loading and manipulation is
|
||||
has been integrated with GTK+.
|
||||
* The GTK+ object system has mostly been moved to GLib, separating
|
||||
it from the GUI code. Many significant enhancements have been
|
||||
made as part of this.
|
||||
* A new text widget is now included. This started as a port
|
||||
of the Tk text widget, and includes such features of the Tk
|
||||
text widget as tags, marks, and unicode text support. It
|
||||
has been enhanced to support model-view operation and the
|
||||
full power of Pango.
|
||||
* The GDK library has been extensively revised to support multiple
|
||||
windowing systems. The only fully functional backend in 1.3.1
|
||||
is the X11 backend, however, ports to Win32, Linux-framebuffer,
|
||||
Nano-X, BeOS, and MacOS exist in various states of completion,
|
||||
and at least some of these will be finished and integrated in
|
||||
before the final GTK+-2.0 release.
|
||||
* 32-bit coordinates are now supported throughout GDK and GTK+
|
||||
(they are emulated where not supported by the windowing system.)
|
||||
* Many minor bug fixes and enhancements. Incompatible changes
|
||||
are documented in docs/Changes-2.0.txt
|
||||
|
||||
Overview of Changes in GTK+ 1.2.8:
|
||||
|
||||
* GNU Make 3.79 bug workaround
|
||||
* FAQ and tutorial updates and improvements
|
||||
* Miscellaneous bug fixes: CList, Calendar, rc-files, FontSelection
|
||||
|
||||
Overview of Changes in GTK+ 1.2.7:
|
||||
|
||||
* More header cleanups.
|
||||
* Fixed activation bug for insensitive widgets.
|
||||
* Locale fixes to RC file parsing code.
|
||||
* Miscellaneous bugfixes for Item Factory, CList, CTree, X Selections,
|
||||
HScale, VScale, Pixmap, Viewport, OptionMenu, Entry and Notebook.
|
||||
* Upgrade to libtool 1.3.4.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.6:
|
||||
|
||||
* container queue_resize fixes
|
||||
* gtk[vh]scale: minor fixups
|
||||
* rename idle to idle_id in testgtk to avoid conflicts with
|
||||
broken libs
|
||||
* More consistent naming of gtkrc files
|
||||
* Added language support: ro, uk
|
||||
|
||||
Overview of Changes in GTK+ 1.2.5:
|
||||
|
||||
* more GtkCTree and GtkWindow bug fixes.
|
||||
* more redraw/resize queue fixes, better expose event
|
||||
discarding code.
|
||||
* more miscellaneous bugs fixed
|
||||
* new configure.in option --disable-rebuilds to completely disable
|
||||
rebuilds of autogenerated sources.
|
||||
* check for 5.002 now, to avoid failing autogeneration build rules due
|
||||
to old perl versions.
|
||||
* fonts (and fontsets) are cached now.
|
||||
* more autogeneration make rules and dependency fixups, we should be
|
||||
save with autogeneration up to make -j12 now ;)
|
||||
* new window position GTK_WIN_POS_CENTER_ALWAYS, which will recenter the
|
||||
GtkWindow on every size change.
|
||||
* major rework of window manager hints handling code, fixed a bunch of
|
||||
races with the new resizing code.
|
||||
* the new wm hints and resizing code is absolutely perfect and bug free now,
|
||||
it only lacks testing ;)
|
||||
* fixed up various rc style memory problems.
|
||||
* gtk_widget_modify_style() now properly changes the style of realized widgets
|
||||
and references the style passed into it. if people worked around this bug,
|
||||
this will introduce a slight memory leak in their code.
|
||||
The code should typically look like:
|
||||
GtkRcStyle *rc_style = gtk_rc_style_new ();
|
||||
[...]
|
||||
gtk_widget_modify_style (widget, rc_style);
|
||||
gtk_rc_style_unref (rc_style);
|
||||
* fix problems with positioning menus offscreen.
|
||||
* GtkText fixes for some crashes and drawing errors.
|
||||
* Better handling for unexpected window destroys in GDK and GTK+.
|
||||
This should make it possible to use a GtkPlug and catch the
|
||||
case where its parent socket is randomly killed.
|
||||
* FAQ updates.
|
||||
* FileSelection i18n patches, RadioButton fixups.
|
||||
* many translation improvements.
|
||||
* miscellaneous other bugs fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.4:
|
||||
|
||||
* DnD improvements (drags can be canceled with Esc now).
|
||||
* suppressed configure event reordering in Gdk.
|
||||
* rewrite of Gtk's configure event handling.
|
||||
* major improvements for the object argument system (Elena Devdariani).
|
||||
* major bugfixes for threading, GtkNotebook, GtkItemFactory, GtkCList and
|
||||
GtkCTree.
|
||||
* tutorial/FAQ updates, new file generation.txt on autogenerated sources.
|
||||
* configure's --with-glib= is "officially" unsupported.
|
||||
* upgrade to libtool 1.3.3.
|
||||
* various buglets fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.3:
|
||||
|
||||
* Upgrade to libtool 1.3
|
||||
* Check for dgettext (for systems with old versions of GNU Gettext)
|
||||
* Many bug fixes (see ChangeLog for details)
|
||||
|
||||
Overview of Changes in GTK+ 1.2.2:
|
||||
|
||||
* Improved Dnd behaviour with Motif applications.
|
||||
* Bug fixes for the Gtk selection code.
|
||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
||||
* Bug fixes and leak plugs for the Gdk IM code.
|
||||
* Added gtk_object_get() facility to retrieve object arguments easily.
|
||||
The var args list expects ("arg-name", &value) pairs.
|
||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
||||
problems where closed pipes were no longer signaling GDK_INPUT_READ on
|
||||
systems with a native poll().
|
||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
||||
anymore).
|
||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
||||
eXodus (commercial X windows server) from popping up a color dialog every
|
||||
time a transparent pixmap is created.
|
||||
* Fixed bug where Gtk timeout/idle handlers would execute without the global
|
||||
Gdk lock being held.
|
||||
* Other minor bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.1:
|
||||
|
||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
||||
accelerator installation. This is often required to get GtkItemFactory
|
||||
like accelerator propagation between different windows with the same
|
||||
menu hierarchy and for centralized parsing and saving of accelerators.
|
||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
||||
* Miscellaneous other bug fixes.
|
||||
|
||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
||||
|
||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
||||
GtkInvisible, GtkCalendar, GtkLayout, GtkPlug, GtkSocket
|
||||
* Many new features and robustness for existing widgets
|
||||
* Theme support
|
||||
* New DND implementation
|
||||
* Internationalization of standard dialogs
|
||||
* New key binding system
|
||||
* Tearoff menus and menu accelerators
|
||||
* Wide character support for entry and text
|
||||
* Resizing code has been overhauled
|
||||
* Queued redraws of partial areas
|
||||
* Far better support for object arguments
|
||||
* Speed optimizations
|
||||
* Runtime loading of dynamic modules
|
||||
* Support for GLib log domains
|
||||
* Tutorial improvements
|
||||
* A bug fix or two
|
||||
|
||||
Overview of Changes in GTK+ 1.1.16:
|
||||
|
||||
* Major fixes and improvements for handlebox
|
||||
* A change to the way widget->requisition works. Now,
|
||||
widget->requisition is always what the widget requested,
|
||||
unmodified by the usize. See Changes-1.2.txt for details.
|
||||
This correct various bugs with gtk_widget_set_usize().
|
||||
* Fixes for XIM on X11R5 systems
|
||||
* Don't allow cut-and-paste of text in password-style entries
|
||||
* --enable-debug is now on by default for the development release.
|
||||
(When compiling for "production", use --enable-debug=minimum)
|
||||
* Handle systems where Helvetica is not present more gracefully
|
||||
* Fixes for memory leaks
|
||||
* CList and CTree fixes
|
||||
* Bug fixes for drawing problems.
|
||||
* Miscellaneous bug fixes to GtkLabel, GtkCList, GtkCTree,
|
||||
GtkColorsel, Focusing, DND
|
||||
* Tutorial improvements
|
||||
|
||||
Overview of Changes in GTK+ 1.1.15:
|
||||
|
||||
* Tutorial Updates
|
||||
* Added --libs gthread to gtk-config
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.14:
|
||||
|
||||
* Additions to docs/Changes-1.2.txt
|
||||
* Just warn when loading theme engine fails
|
||||
* CLAMP GtkScale digits to a meaningful range
|
||||
* GTK_LOCALDIR is now defined in a better fashion
|
||||
* New functions (feature freeze, we know...):
|
||||
gtk_menu_set_title()
|
||||
gtk_toggle_button_get_active()
|
||||
* Some locale fixups in gtkrc code
|
||||
* Fixes to make gtk_radio_button_set_group() keep only
|
||||
one radio button in the group active
|
||||
* Foreign windows are now always treated as viewable; this fixes
|
||||
a problem where updating didn't occur properly in GtkPlug
|
||||
* DND fixes for 64 bit architectures, and for specifying operations
|
||||
with modifier keys.
|
||||
* Major revisions to GtkLayout: avoid having to create window
|
||||
for NO_WINDOW children, adjust allocations of children as
|
||||
scrolled so queued draws work, and a resize is queued instead
|
||||
of allocating directly in a put() or move()
|
||||
|
||||
What is new in GTK+ 1.1.13:
|
||||
|
||||
* Dnd and selection bug fixes and memory purification.
|
||||
* Widget sensitivity fixups.
|
||||
* Tooltips windows are now named "gtk-tooltips" so rc file rules
|
||||
can match tooltips windows. Fixed interaction of tooltips and NO_WINDOW
|
||||
widgets.
|
||||
* Spin buttons now update their values upon value retrieval.
|
||||
* Overhaul of the resizing vs. redrawing logic to reduce redrawing needs
|
||||
a lot. Gtk makes full use of the draw_area coalescing code now, which
|
||||
got minorly improved as well.
|
||||
* Containers map their Gdk windows after their children now to reduce
|
||||
expose event generation.
|
||||
* Gdk event queue fixups, this solves the double-click problems people were
|
||||
recently having.
|
||||
* Account for the fact that GSource's are only properly reentrant from
|
||||
within dispatch(), thus we don't do Gdk event processing from within
|
||||
check() or prepare() anymore.
|
||||
* Rc files feature a bg_pixmap value of "<none>" now.
|
||||
* Improved session management support in Gdk.
|
||||
* Automatic disabling of NLS if no gettext is found should work now.
|
||||
* Removed deprecated functions, docs/Changes-1.2.txt gives an overview.
|
||||
* Gtk+ development now requires GNU autoconf 2.13, GNU automake 1.4
|
||||
and GNU libtool 1.2d.
|
||||
* More bug fixes all over the place.
|
||||
|
||||
What is new in GTK+ 1.1.12:
|
||||
|
||||
* Korean translation added
|
||||
* Fixed memory leaks
|
||||
* A few other bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.11:
|
||||
|
||||
* Dutch, Japanese, Swedish, Polish, and Norwegian translations
|
||||
* Removed deprecated _interp variants: gtk_container_foreach_interp,
|
||||
gtk_idle_add_interp, gtk_timeout_add_interp, gtk_signal_connect_interp
|
||||
* Lots of cast corrections
|
||||
* Many fixes
|
||||
|
||||
What is new in GTK+ 1.1.9:
|
||||
|
||||
* Check for broken glibc 2.0 mb functions and avoid them
|
||||
* Label and Entry display fixes
|
||||
* Move main thread back to GDK, for locking when translating events
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.8:
|
||||
|
||||
* Added support for gettext and the localization of the standard
|
||||
dialogs.
|
||||
* Added line-wrapping for the label, and JUSTIFY_FILL
|
||||
* Support reordering via drag and drop in CList and CTree.
|
||||
* Replaced GtkDrawWindow widget with a GTK_USER_DRAW flag
|
||||
* Extended gtkpaned API to support minimum sizes and proportional
|
||||
resizing.
|
||||
* Changed the handling of shared memory segments so as to
|
||||
remove the need for GTK+ to set up signal handlers.
|
||||
* Re-implemented event loop in terms of the event loop
|
||||
that has been added to GLib 1.1.8
|
||||
* Added 'grab_focus' signal to allow keyboard accelerators
|
||||
for entries.
|
||||
* Load locale specific RC files if present.
|
||||
* Bug fixes.
|
||||
|
||||
What is new in GTK+ 1.1.7:
|
||||
|
||||
* Fixed memory mis-allocation in default files code
|
||||
* Various event handling fixes
|
||||
* Wide character support for entry and text
|
||||
* Destroy widgets _after_ propagating unrealize signals through
|
||||
widget hierarchy
|
||||
* Only build XIM-support if available
|
||||
* Tutorial and examples updates
|
||||
* Added gtk_drag_source_unset()
|
||||
|
||||
What is new in GTK+ 1.1.6:
|
||||
|
||||
* The signal system now features emission hooks with special semantics,
|
||||
refer to the ChangeLog for this.
|
||||
* Minor? speedups and memory reductions to the emission handling of the
|
||||
signal system.
|
||||
* _interp() function variants are deprecated now. the corresponding *_full()
|
||||
variants are provided for a long time now.
|
||||
* Dnd abort timeout increased to 10 minutes.
|
||||
* GtkScrolledWindow inherits from GtkBin now.
|
||||
* GTK_POLICY_NEVER is implemented for scrolled windows now.
|
||||
* Lots of API clean ups.
|
||||
* Incremental freezing abilities.
|
||||
* Integrated widgets from the GNOME tree: GtkLayout, GtkPlug and GtkSocket.
|
||||
* New window functions for transient relationship, default size, and
|
||||
geometry hints
|
||||
* Default rc files are now read in (<sysconfdir/etc/gtkrc and ~/.gtkrc)
|
||||
GTK_RC_FILES environment variable and functions are provided to configure
|
||||
this behavior
|
||||
* Read doc/Changes-1.2.txt to properly adapt your code.
|
||||
* Bug Fixes.
|
||||
|
||||
What is new in GTK+ 1.1.5:
|
||||
|
||||
* Theme integration
|
||||
* Widget style modification is now handled through GtkRcStyles
|
||||
* GtkPixmaps now grey out pixmaps when insensitive
|
||||
* Notebook enhancements
|
||||
* Shadow configurability for menubars and handleboxes
|
||||
* DND enhancements
|
||||
* gtkfilesel now supports automounters better
|
||||
* Implementation of expose compression
|
||||
* Queued redraws of partial areas
|
||||
* Scrolledwindow (+Viewport) source incompatibilities, children that are added
|
||||
to a scrolled window don't get an automatic viewport anymore. a convenience
|
||||
function gtk_scrolled_window_add_with_viewport() is supplied for this task
|
||||
* Deprecated functions will now issue a message, informing the programmer about
|
||||
the use of this function. These functions will get removed in future versions
|
||||
* Non-functional functions got removed entirely
|
||||
* gtk_widget_new() and gtk_object_new() will now auto-construct new objects.
|
||||
A new function gtk_object_default_construct() is provided now which should
|
||||
be called after every gtk_type_new() to perform the auto-construction
|
||||
* Improved argument support of several widgets
|
||||
* Bug Fixes
|
||||
|
||||
What is new in GTK+ 1.1.3:
|
||||
|
||||
* GtkCList/GtkCTree now have the ability to:
|
||||
- hide/show individual columns
|
||||
- disable/enable column resizing
|
||||
- set min and max for column widths
|
||||
- set expander style of the ctree
|
||||
- set/get row and cell styles
|
||||
- set spacing between tree expander and cell contents in ctree
|
||||
- toggle auto_resize for columns
|
||||
* Must enhanced DND support, removed old DND code
|
||||
* Idle functions are now implemented via GHook, giving a slight speed
|
||||
improvement
|
||||
* An environment variable GTK_MODULES which takes a colon separated
|
||||
list of module names GTK+ will now automatically load at gtk_init() startup
|
||||
* GtkFontSel now has support for an extra 'base' filter
|
||||
* New function gdk_window_set_root_origin to get the real geometry taking
|
||||
into account window manager offsets
|
||||
* New function gtk_text_set_line_wrap to toggle line wrapping
|
||||
* New function gtk_widget_add_events which safely adds additional
|
||||
events to a widget's event mask
|
||||
* New function gdk_event_get_time to get the timestamp from a generic
|
||||
event
|
||||
* New widget GtkCalendar
|
||||
* New widget GtkInvisible - InputOnly offscreen windows used for reliable
|
||||
pointer grabs and selection handling in DND code
|
||||
* New functions gtk_object_remove_no_notify[_by_id] to remove a certain
|
||||
data portion without invocation of its destroy notifier
|
||||
* gtk_spin_button_construct is now deprecated, use gtk_spin_button_configure
|
||||
instead
|
||||
* gtk_clist_set_border is now deprecated, use gtk_clist_set_shadow_type
|
||||
instead
|
||||
* Removed functions gtk_object_set_data_destroy[_by_id]
|
||||
* Documentation additions/updates
|
||||
* HTML and plain text files are now included in the distribution
|
||||
* Bug fixes, typeness corrections, and general fixups
|
||||
|
||||
What is new in GTK+ 1.1.2:
|
||||
|
||||
* Gtk+ is now featuring runtime loading of dynamic modules via the
|
||||
--gtk-modules= command line switch. such modules have to export a
|
||||
G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv);
|
||||
function which will be invoked to initialize the module. since such
|
||||
modules may create new widget types, they are always resident.
|
||||
* The tutorial has been updated again.
|
||||
* Changes to menus including tearoff menus and accelerators.
|
||||
* Better support for modal dialogs.
|
||||
* Removed CAN_FOCUS by default from scrollbars and button children of toolbar.
|
||||
* More improvements and fixes for GtkCList and GtkCTree (i.e. row sorting).
|
||||
* GtkCTree rows can be unselectable now.
|
||||
* The GtkCTree API has undergone major renames (see ChangeLog entry from Lars
|
||||
Hamann on Tue Aug 18 00:29:13 1998).
|
||||
* A bunch of varargs functions changed to get va_lists working on systems that
|
||||
implement va_lists as arrays.
|
||||
* Improvements to the gdkrgb code.
|
||||
* Improvements to Gdk color handling so we greatly reduce server traffic and
|
||||
don't leak colors anymore.
|
||||
* Improved internal widget tree iterators (the GtkContainer::foreach signal
|
||||
vanished because of this).
|
||||
* Option menus can have the keyboard focus now.
|
||||
* More fixups to the text widget.
|
||||
* GtkFileSelection should behave much more nicely in combination with AFS now.
|
||||
* Support for label underlining.
|
||||
* Support for GLib 1.1.3 log domains.
|
||||
* Documentation improvements.
|
||||
* Configuration fixes on various platforms.
|
||||
* Miscellaneous fixes to XInput support.
|
||||
* Build with shared library dependencies on Linux
|
||||
* Fix for a major bug in the type systems memory allocation code that could
|
||||
cause random crashes.
|
||||
* Libtool update to version 1.2b.
|
||||
* Lots of bugfixes and cleanups again ;)
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.1:
|
||||
|
||||
* Tutorial updates and additions.
|
||||
* Key binding support for GtkListItems and GtkList.
|
||||
* Extended selection mode and autoscrolling for GtkLists.
|
||||
* A GtkCtree now operates on GtkCTreeNode* structures rather than GList*.
|
||||
* GtkCTreeNodes can now be created from GNode trees.
|
||||
* Bug fixes for GtkNotebook, GtkCList, GtkCombo and GdkWindow reparentation.
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.0:
|
||||
|
||||
* New widget GtkFontSelector.
|
||||
* New featureful progress bar.
|
||||
* New container widget GtkPacker.
|
||||
* New object GtkItemFactory, GtkMenuFactory is deprecated.
|
||||
* New key binding system, configurable via rcfiles, similar to styles.
|
||||
* New widget GtkCTree with drag selections and keyboard movement and
|
||||
and horizontal scrolling. Features also implemented for GtkCList.
|
||||
* Significant speedups to widget creation and destruction through caching
|
||||
colormap and visual queries to the XServer.
|
||||
* Speedups for type creation and especially gtk_type_is_a() checks.
|
||||
* Speedups in signal lookup, creation and emissions and connection handling.
|
||||
* Minor speedups with object data allocation and destruction.
|
||||
* Additions to the signal handling API (e.g. *_emitv).
|
||||
* Support for rc-file reparsing.
|
||||
* Resizing logic is now implemented on container widget basis, rather than
|
||||
for toplevel GtkWindows only.
|
||||
* Buttons support relief styles now.
|
||||
* Some widgets are now allocated through memchunks to behave more memory wise.
|
||||
* Newly included file gtkfeatures.h which defines compatibility macros to
|
||||
test for certain API features upon program compilation.
|
||||
* Child arguments support for container widgets.
|
||||
* Far better support for object arguments, revamp of the underlying
|
||||
mechanism for speed and reusability. Child/object arguments don't
|
||||
need to be preceded by the "GtkType::" portion anymore.
|
||||
* Removed GtkAcceleratorTable in favour of GtkAccelGroup, accelerator display
|
||||
is now performed by a new widget GtkAccelLabel.
|
||||
* Overhaul of the resizing code. Resizing behaviour can now be specified
|
||||
on GtkContainer basis, so the underlying algorithm isn't only available
|
||||
for GtkWindows.
|
||||
* GtkTables are now fully resizable.
|
||||
* The GtkType system now supports an additional base class initialization
|
||||
function.
|
||||
* GtkStyles and key bindings can now be looked up depending on the base
|
||||
types of a widget, through a new keyword `class' in rc files.
|
||||
* GtkButton derives from GtkBin (finally).
|
||||
* More descriptive error messages on rc parsing.
|
||||
* Runtime information is available to query enum/flag definition values.
|
||||
* Upgrade to libtool-1.2
|
||||
* Legions of bug fixes, memory leaks, segfaults, of-by-something errors...
|
||||
including those that already went into the 1.0.x branch.
|
||||
* A big bunch of features and cosmetic fixups that just got lost in
|
||||
the masses of changesonfigure problem when cross-compiling
|
6951
NEWS.pre-3.0
Normal file
@@ -289,3 +289,9 @@
|
||||
#mesondefine GTK_LIBDIR
|
||||
|
||||
#mesondefine GTK_PRINT_BACKENDS
|
||||
|
||||
#mesondefine HAVE_HARFBUZZ
|
||||
|
||||
#mesondefine HAVE_PANGOFT
|
||||
|
||||
#mesondefine ISO_CODES_PREFIX
|
||||
|
@@ -469,22 +469,33 @@ demo_application_window_size_allocate (GtkWidget *widget,
|
||||
gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
demo_application_window_state_event (GtkWidget *widget,
|
||||
GdkEventWindowState *event)
|
||||
static void
|
||||
window_state_changed (GtkWidget *widget)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
gboolean res = GDK_EVENT_PROPAGATE;
|
||||
GdkWindowState changed, new_state;
|
||||
GdkWindowState new_state;
|
||||
|
||||
if (GTK_WIDGET_CLASS (demo_application_window_parent_class)->window_state_event)
|
||||
res = GTK_WIDGET_CLASS (demo_application_window_parent_class)->window_state_event (widget, event);
|
||||
|
||||
gdk_event_get_window_state ((GdkEvent *)event, &changed, &new_state);
|
||||
new_state = gdk_window_get_state (gtk_widget_get_window (widget));
|
||||
window->maximized = (new_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (new_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
|
||||
}
|
||||
|
||||
return res;
|
||||
static void
|
||||
demo_application_window_realize (GtkWidget *widget)
|
||||
{
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->realize (widget);
|
||||
|
||||
g_signal_connect_swapped (gtk_widget_get_window (widget), "notify::state",
|
||||
G_CALLBACK (window_state_changed), widget);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_unrealize (GtkWidget *widget)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (gtk_widget_get_window (widget),
|
||||
window_state_changed, widget);
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -506,7 +517,8 @@ demo_application_window_class_init (DemoApplicationWindowClass *class)
|
||||
object_class->constructed = demo_application_window_constructed;
|
||||
|
||||
widget_class->size_allocate = demo_application_window_size_allocate;
|
||||
widget_class->window_state_event = demo_application_window_state_event;
|
||||
widget_class->realize = demo_application_window_realize;
|
||||
widget_class->unrealize = demo_application_window_unrealize;
|
||||
widget_class->destroy = demo_application_window_destroy;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/application_demo/application.ui");
|
||||
|
@@ -7,35 +7,29 @@
|
||||
<property name="icon-name">document-open</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="primary-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkMenuToolButton" id="menutool">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">application-exit</property>
|
||||
<property name="action-name">app.quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">applications-other</property>
|
||||
<property name="action-name">win.logo</property>
|
||||
</object>
|
||||
@@ -54,7 +48,6 @@
|
||||
<object class="GtkBox" id="content_area">
|
||||
<child>
|
||||
<object class="GtkLabel" id="message">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -64,10 +57,9 @@
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="use-underline">1</property>
|
||||
<signal name="clicked" handler="clicked_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
@@ -81,11 +73,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="buffer">buffer</property>
|
||||
@@ -100,7 +90,6 @@
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="status">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
|
@@ -2,21 +2,16 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="resizable">0</property>
|
||||
<property name="title">CSS Blend Modes</property>
|
||||
<property name="default_width">400</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="default-width">400</property>
|
||||
<property name="default-height">300</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Blend mode:</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
@@ -24,128 +19,108 @@
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="min_content_width">150</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="min-content-width">150</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hhomogeneous">False</property>
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hhomogeneous">0</property>
|
||||
<property name="vhomogeneous">0</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Duck</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="duck"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="gradient"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend0"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -157,87 +132,72 @@ Blended picture</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">12</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Red</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Blue</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="red"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="blue"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend1"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -249,71 +209,59 @@ Blended picture</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="cyan"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="magenta"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="yellow"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend2"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Cyan</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
@@ -321,14 +269,12 @@ Blended picture</property>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Magenta</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
@@ -336,14 +282,12 @@ Blended picture</property>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Yellow</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
@@ -351,14 +295,12 @@ Blended picture</property>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Blended picture</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
@@ -366,8 +308,8 @@ Blended picture</property>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@@ -378,14 +320,13 @@ Blended picture</property>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
@@ -88,11 +88,12 @@ find_toplevel_at_pointer (GdkDisplay *display)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_release_event_cb (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gboolean *clicked)
|
||||
release_event_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gboolean *clicked)
|
||||
{
|
||||
*clicked = TRUE;
|
||||
if (gdk_event_get_event_type (event) == GDK_BUTTON_RELEASE)
|
||||
*clicked = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -133,10 +134,10 @@ query_for_toplevel (GdkDisplay *display,
|
||||
{
|
||||
gboolean clicked = FALSE;
|
||||
|
||||
g_signal_connect (popup, "button-release-event",
|
||||
G_CALLBACK (button_release_event_cb), &clicked);
|
||||
g_signal_connect (popup, "event",
|
||||
G_CALLBACK (release_event_cb), &clicked);
|
||||
|
||||
/* Process events until clicked is set by button_release_event_cb.
|
||||
/* Process events until clicked is set by our button release event handler.
|
||||
* We pass in may_block=TRUE since we want to wait if there
|
||||
* are no events currently.
|
||||
*/
|
||||
@@ -150,7 +151,6 @@ query_for_toplevel (GdkDisplay *display,
|
||||
|
||||
g_object_unref (cursor);
|
||||
gtk_widget_destroy (popup);
|
||||
gdk_flush (); /* Really release the grab */
|
||||
|
||||
return toplevel;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/* Clipboard
|
||||
*
|
||||
* GtkClipboard is used for clipboard handling. This demo shows how to
|
||||
* GdkClipboard is used for clipboard handling. This demo shows how to
|
||||
* copy and paste text to and from the clipboard.
|
||||
*
|
||||
* It also shows how to transfer images via the clipboard or via
|
||||
@@ -13,74 +13,104 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
void
|
||||
copy_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GtkClipboard *clipboard;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Get the clipboard object */
|
||||
clipboard = gtk_widget_get_clipboard (entry,
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
clipboard = gtk_widget_get_clipboard (entry);
|
||||
|
||||
/* Set clipboard text */
|
||||
gtk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)), -1);
|
||||
gdk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)));
|
||||
}
|
||||
|
||||
void
|
||||
paste_received (GtkClipboard *clipboard,
|
||||
const gchar *text,
|
||||
paste_received (GObject *source_object,
|
||||
GAsyncResult *result,
|
||||
gpointer user_data)
|
||||
{
|
||||
GdkClipboard *clipboard;
|
||||
GtkWidget *entry;
|
||||
char *text;
|
||||
GError *error = NULL;
|
||||
|
||||
clipboard = GDK_CLIPBOARD (source_object);
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Set the entry text */
|
||||
if(text)
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
/* Get the resulting text of the read operation */
|
||||
text = gdk_clipboard_read_text_finish (clipboard, result, &error);
|
||||
|
||||
if (text)
|
||||
{
|
||||
/* Set the entry text */
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
g_free (text);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
/* Show an error about why pasting failed.
|
||||
* Usually you probably want to ignore such failures,
|
||||
* but for demonstration purposes, we show the error.
|
||||
*/
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"Could not paste text: %s",
|
||||
error->message);
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
paste_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GtkClipboard *clipboard;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Get the clipboard object */
|
||||
clipboard = gtk_widget_get_clipboard (entry,
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
clipboard = gtk_widget_get_clipboard (entry);
|
||||
|
||||
/* Request the contents of the clipboard, contents_received will be
|
||||
called when we do get the contents.
|
||||
*/
|
||||
gtk_clipboard_request_text (clipboard,
|
||||
paste_received, entry);
|
||||
gdk_clipboard_read_text_async (clipboard, NULL, paste_received, entry);
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
get_image_surface (GtkImage *image)
|
||||
static GdkTexture *
|
||||
get_image_texture (GtkImage *image)
|
||||
{
|
||||
const gchar *icon_name;
|
||||
GtkIconSize size;
|
||||
GtkIconTheme *icon_theme;
|
||||
int width;
|
||||
GtkIconInfo *icon_info;
|
||||
|
||||
switch (gtk_image_get_storage_type (image))
|
||||
{
|
||||
case GTK_IMAGE_SURFACE:
|
||||
return cairo_surface_reference (gtk_image_get_surface (image));
|
||||
case GTK_IMAGE_TEXTURE:
|
||||
return g_object_ref (gtk_image_get_texture (image));
|
||||
case GTK_IMAGE_ICON_NAME:
|
||||
gtk_image_get_icon_name (image, &icon_name, &size);
|
||||
icon_name = gtk_image_get_icon_name (image);
|
||||
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (image)));
|
||||
gtk_icon_size_lookup (size, &width, NULL);
|
||||
return gtk_icon_theme_load_surface (icon_theme, icon_name, width, 1, NULL, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, 48, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
|
||||
if (icon_info == NULL)
|
||||
return NULL;
|
||||
return gtk_icon_info_load_texture (icon_info);
|
||||
default:
|
||||
g_warning ("Image storage type %d not handled",
|
||||
gtk_image_get_storage_type (image));
|
||||
@@ -93,14 +123,11 @@ drag_begin (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
GdkTexture *texture;
|
||||
|
||||
surface = get_image_surface (GTK_IMAGE (widget));
|
||||
if (surface)
|
||||
{
|
||||
cairo_surface_set_device_offset (surface, -2, -2);
|
||||
gtk_drag_set_icon_surface (context, surface);
|
||||
}
|
||||
texture = get_image_texture (GTK_IMAGE (widget));
|
||||
if (texture)
|
||||
gtk_drag_set_icon_texture (context, texture, -2, -2);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -111,30 +138,27 @@ drag_data_get (GtkWidget *widget,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
GdkTexture *texture;
|
||||
|
||||
surface = get_image_surface (GTK_IMAGE (data));
|
||||
if (surface)
|
||||
gtk_selection_data_set_surface (selection_data, surface);
|
||||
texture = get_image_texture (GTK_IMAGE (widget));
|
||||
if (texture)
|
||||
gtk_selection_data_set_texture (selection_data, texture);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint32 time,
|
||||
gpointer data)
|
||||
{
|
||||
if (gtk_selection_data_get_length (selection_data) > 0)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
GdkTexture *texture;
|
||||
|
||||
surface = gtk_selection_data_get_surface (selection_data);
|
||||
gtk_image_set_from_surface (GTK_IMAGE (data), surface);
|
||||
cairo_surface_destroy (surface);
|
||||
texture = gtk_selection_data_get_texture (selection_data);
|
||||
gtk_image_set_from_texture (GTK_IMAGE (data), texture);
|
||||
g_object_unref (texture);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,78 +166,82 @@ static void
|
||||
copy_image (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
cairo_surface_t *surface;
|
||||
GdkClipboard *clipboard;
|
||||
GdkTexture *texture;
|
||||
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
surface = get_image_surface (GTK_IMAGE (data));
|
||||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (data));
|
||||
texture = get_image_texture (GTK_IMAGE (data));
|
||||
|
||||
if (surface)
|
||||
if (texture)
|
||||
{
|
||||
gtk_clipboard_set_surface (clipboard, surface);
|
||||
cairo_surface_destroy (surface);
|
||||
gdk_clipboard_set_texture (clipboard, texture);
|
||||
g_object_unref (texture);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
paste_image_received (GObject *source,
|
||||
GAsyncResult *result,
|
||||
gpointer data)
|
||||
{
|
||||
GdkTexture *texture;
|
||||
|
||||
texture = gdk_clipboard_read_texture_finish (GDK_CLIPBOARD (source), result, NULL);
|
||||
if (texture == NULL)
|
||||
return;
|
||||
|
||||
gtk_image_set_from_texture (GTK_IMAGE (data), texture);
|
||||
g_object_unref (texture);
|
||||
}
|
||||
|
||||
static void
|
||||
paste_image (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
cairo_surface_t *surface;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
surface = gtk_clipboard_wait_for_surface (clipboard);
|
||||
|
||||
if (surface)
|
||||
{
|
||||
gtk_image_set_from_surface (GTK_IMAGE (data), surface);
|
||||
cairo_surface_destroy (surface);
|
||||
}
|
||||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (data));
|
||||
gdk_clipboard_read_texture_async (clipboard,
|
||||
NULL,
|
||||
paste_image_received,
|
||||
data);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_press (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
static void
|
||||
pressed_cb (GtkGesture *gesture,
|
||||
int n_press,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *image)
|
||||
{
|
||||
GtkWidget *menu;
|
||||
GtkWidget *item;
|
||||
guint button;
|
||||
|
||||
gdk_event_get_button ((GdkEvent *)event, &button);
|
||||
|
||||
if (button != GDK_BUTTON_SECONDARY)
|
||||
return FALSE;
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
item = gtk_menu_item_new_with_mnemonic (_("_Copy"));
|
||||
g_signal_connect (item, "activate", G_CALLBACK (copy_image), data);
|
||||
g_signal_connect (item, "activate", G_CALLBACK (copy_image), image);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
item = gtk_menu_item_new_with_mnemonic (_("_Paste"));
|
||||
g_signal_connect (item, "activate", G_CALLBACK (paste_image), data);
|
||||
g_signal_connect (item, "activate", G_CALLBACK (paste_image), image);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent *) event);
|
||||
return TRUE;
|
||||
gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_clipboard (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *vbox, *hbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry, *button;
|
||||
GtkWidget *image;
|
||||
GtkClipboard *clipboard;
|
||||
GtkGesture *gesture;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
@@ -271,12 +299,11 @@ do_clipboard (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
||||
|
||||
/* Create the first image */
|
||||
image = gtk_image_new_from_icon_name ("dialog-warning",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name ("dialog-warning");
|
||||
gtk_container_add (GTK_CONTAINER (hbox), image);
|
||||
|
||||
/* make image a drag source */
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (image);
|
||||
g_signal_connect (image, "drag-begin",
|
||||
G_CALLBACK (drag_begin), image);
|
||||
@@ -285,22 +312,23 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
/* accept drops on image */
|
||||
gtk_drag_dest_set (image, GTK_DEST_DEFAULT_ALL,
|
||||
NULL, 0, GDK_ACTION_COPY);
|
||||
NULL, GDK_ACTION_COPY);
|
||||
gtk_drag_dest_add_image_targets (image);
|
||||
g_signal_connect (image, "drag-data-received",
|
||||
G_CALLBACK (drag_data_received), image);
|
||||
|
||||
/* context menu on image */
|
||||
g_signal_connect (image, "button-press-event",
|
||||
G_CALLBACK (button_press), image);
|
||||
gesture = gtk_gesture_multi_press_new (image);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
||||
g_object_set_data_full (G_OBJECT (image), "gesture", gesture, g_object_unref);
|
||||
g_signal_connect (gesture, "pressed", G_CALLBACK (pressed_cb), image);
|
||||
|
||||
/* Create the second image */
|
||||
image = gtk_image_new_from_icon_name ("process-stop",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_icon_name ("process-stop");
|
||||
gtk_container_add (GTK_CONTAINER (hbox), image);
|
||||
|
||||
/* make image a drag source */
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (image);
|
||||
g_signal_connect (image, "drag-begin",
|
||||
G_CALLBACK (drag_begin), image);
|
||||
@@ -309,18 +337,16 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
/* accept drops on image */
|
||||
gtk_drag_dest_set (image, GTK_DEST_DEFAULT_ALL,
|
||||
NULL, 0, GDK_ACTION_COPY);
|
||||
NULL, GDK_ACTION_COPY);
|
||||
gtk_drag_dest_add_image_targets (image);
|
||||
g_signal_connect (image, "drag-data-received",
|
||||
G_CALLBACK (drag_data_received), image);
|
||||
|
||||
/* context menu on image */
|
||||
g_signal_connect (image, "button-press-event",
|
||||
G_CALLBACK (button_press), image);
|
||||
|
||||
/* tell the clipboard manager to make the data persistent */
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
gtk_clipboard_set_can_store (clipboard, NULL, 0);
|
||||
gesture = gtk_gesture_multi_press_new (image);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
||||
g_object_set_data_full (G_OBJECT (image), "gesture", gesture, g_object_unref);
|
||||
g_signal_connect (gesture, "pressed", G_CALLBACK (pressed_cb), image);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -151,6 +151,7 @@
|
||||
<file>cursors.c</file>
|
||||
<file>dialog.c</file>
|
||||
<file>drawingarea.c</file>
|
||||
<file>dnd.c</file>
|
||||
<file>editable_cells.c</file>
|
||||
<file>entry_buffer.c</file>
|
||||
<file>entry_completion.c</file>
|
||||
@@ -162,6 +163,7 @@
|
||||
<file>flowbox.c</file>
|
||||
<file>foreigndrawing.c</file>
|
||||
<file>font_features.c</file>
|
||||
<file>fontplane.c</file>
|
||||
<file>gestures.c</file>
|
||||
<file>glarea.c</file>
|
||||
<file>headerbar.c</file>
|
||||
@@ -223,6 +225,7 @@
|
||||
</gresource>
|
||||
<gresource prefix="/font_features">
|
||||
<file>font-features.ui</file>
|
||||
<file>fontplane.c</file>
|
||||
</gresource>
|
||||
<gresource prefix="/spinbutton">
|
||||
<file>spinbutton.ui</file>
|
||||
@@ -246,4 +249,7 @@
|
||||
<gresource prefix="/modelbutton">
|
||||
<file>modelbutton.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/dnd">
|
||||
<file>dnd.css</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
@@ -31,16 +31,14 @@
|
||||
</accessibility>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default_height">250</property>
|
||||
<property name="default_width">440</property>
|
||||
<property name="default-height">250</property>
|
||||
<property name="default-width">440</property>
|
||||
<property name="title" translatable="yes">Builder</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="vbox1">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">1</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-menubar">
|
||||
<property name="AtkObject::accessible-name">The menubar</property>
|
||||
@@ -48,35 +46,30 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_File</property>
|
||||
<property name="use-underline">1</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu">
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="new_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_New</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="open_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Open</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="save_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Save</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="save_as_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Save _As</property>
|
||||
<property name="use-underline">1</property>
|
||||
<accelerator key="s" modifiers="primary | shift-mask" signal="activate"/>
|
||||
@@ -84,12 +77,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="quit_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Quit</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="action-name">win.quit</property>
|
||||
@@ -101,28 +92,24 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Edit</property>
|
||||
<property name="use-underline">1</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu">
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="copy_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Copy</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="cut_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Cut</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="paste_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Paste</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
@@ -133,14 +120,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="use-underline">1</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu">
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="help_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="action-name">win.help</property>
|
||||
@@ -148,7 +133,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="about_item">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_About</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="action-name">win.about</property>
|
||||
@@ -162,7 +146,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar" id="toolbar1">
|
||||
<property name="visible">1</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="a11y-toolbar">
|
||||
<property name="AtkObject::accessible-name">The toolbar</property>
|
||||
@@ -170,7 +153,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">New</property>
|
||||
<property name="tooltip-text" translatable="yes">Create a new file</property>
|
||||
<property name="icon-name">document-new</property>
|
||||
@@ -178,7 +160,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Open</property>
|
||||
<property name="tooltip-text" translatable="yes">Open a file</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
@@ -186,7 +167,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Save</property>
|
||||
<property name="tooltip-text" translatable="yes">Save a file</property>
|
||||
<property name="icon-name">document-save</property>
|
||||
@@ -195,12 +175,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Copy</property>
|
||||
<property name="tooltip-text" translatable="yes">Copy selected object into the clipboard</property>
|
||||
<property name="icon-name">edit-copy</property>
|
||||
@@ -208,7 +186,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Cut</property>
|
||||
<property name="tooltip-text" translatable="yes">Cut selected object into the clipboard</property>
|
||||
<property name="icon-name">edit-cut</property>
|
||||
@@ -216,7 +193,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Paste</property>
|
||||
<property name="tooltip-text" translatable="yes">Paste object from the clipboard</property>
|
||||
<property name="icon-name">edit-paste</property>
|
||||
@@ -229,12 +205,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="expand">1</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="visible">1</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="tooltip-column">3</property>
|
||||
<child internal-child="accessible">
|
||||
@@ -287,7 +261,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="statusbar1">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
|
@@ -58,7 +58,8 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), hbox);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("dialog-question", GTK_ICON_SIZE_DIALOG);
|
||||
image = gtk_image_new_from_icon_name ("dialog-question");
|
||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
|
377
demos/gtk-demo/dnd.c
Normal file
@@ -0,0 +1,377 @@
|
||||
/* Drag-and-Drop
|
||||
*
|
||||
* I can't believe its not glade!
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct _GtkDemoWidget GtkDemoWidget;
|
||||
struct _GtkDemoWidget
|
||||
{
|
||||
GType type;
|
||||
union {
|
||||
char *text;
|
||||
gboolean active;
|
||||
};
|
||||
};
|
||||
|
||||
static gpointer
|
||||
copy_demo_widget (gpointer data)
|
||||
{
|
||||
GtkDemoWidget *demo = g_memdup (data, sizeof (GtkDemoWidget));
|
||||
|
||||
if (demo->type == GTK_TYPE_LABEL)
|
||||
demo->text = g_strdup (demo->text);
|
||||
|
||||
return demo;
|
||||
}
|
||||
|
||||
static void
|
||||
free_demo_widget (gpointer data)
|
||||
{
|
||||
GtkDemoWidget *demo = data;
|
||||
|
||||
if (demo->type == GTK_TYPE_LABEL)
|
||||
g_free (demo->text);
|
||||
|
||||
g_free (demo);
|
||||
}
|
||||
|
||||
#define GTK_TYPE_DEMO_WIDGET (gtk_demo_widget_get_type ())
|
||||
|
||||
G_DEFINE_BOXED_TYPE (GtkDemoWidget, gtk_demo_widget, copy_demo_widget, free_demo_widget)
|
||||
|
||||
static GtkDemoWidget *
|
||||
serialize_widget (GtkWidget *widget)
|
||||
{
|
||||
GtkDemoWidget *demo;
|
||||
|
||||
demo = g_new0 (GtkDemoWidget, 1);
|
||||
demo->type = G_OBJECT_TYPE (widget);
|
||||
|
||||
if (GTK_IS_LABEL (widget))
|
||||
{
|
||||
demo->text = g_strdup (gtk_label_get_text (GTK_LABEL (widget)));
|
||||
}
|
||||
else if (GTK_IS_SPINNER (widget))
|
||||
{
|
||||
g_object_get (widget, "active", &demo->active, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_print ("Type %s not supported\n", g_type_name (demo->type));
|
||||
}
|
||||
|
||||
return demo;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
deserialize_widget (GtkDemoWidget *demo)
|
||||
{
|
||||
GtkWidget *widget = NULL;
|
||||
|
||||
if (demo->type == GTK_TYPE_LABEL)
|
||||
{
|
||||
widget = gtk_label_new (demo->text);
|
||||
}
|
||||
else if (demo->type == GTK_TYPE_SPINNER)
|
||||
{
|
||||
widget = g_object_new (demo->type, "active", demo->active, NULL);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "demo");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_print ("Type %s not supported\n", g_type_name (demo->type));
|
||||
}
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
static double pos_x, pos_y;
|
||||
|
||||
static void
|
||||
new_label_cb (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFixed *fixed = data;
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_label_new ("Label");
|
||||
gtk_fixed_put (fixed, widget, pos_x, pos_y);
|
||||
}
|
||||
|
||||
static void
|
||||
new_spinner_cb (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFixed *fixed = data;
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_spinner_new ();
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "demo");
|
||||
gtk_spinner_start (GTK_SPINNER (widget));
|
||||
gtk_fixed_put (fixed, widget, pos_x, pos_y);
|
||||
}
|
||||
|
||||
static void
|
||||
copy_cb (GtkWidget *child)
|
||||
{
|
||||
GdkClipboard *clipboard;
|
||||
GtkDemoWidget *demo;
|
||||
|
||||
g_print ("Copy %s\n", G_OBJECT_TYPE_NAME (child));
|
||||
|
||||
demo = serialize_widget (child);
|
||||
|
||||
clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
|
||||
gdk_clipboard_set (clipboard, GTK_TYPE_DEMO_WIDGET, demo);
|
||||
}
|
||||
|
||||
static void
|
||||
delete_cb (GtkWidget *child)
|
||||
{
|
||||
gtk_widget_destroy (child);
|
||||
}
|
||||
|
||||
static void
|
||||
cut_cb (GtkWidget *child)
|
||||
{
|
||||
copy_cb (child);
|
||||
delete_cb (child);
|
||||
}
|
||||
|
||||
static void
|
||||
value_read (GObject *source,
|
||||
GAsyncResult *res,
|
||||
gpointer data)
|
||||
{
|
||||
GdkClipboard *clipboard = GDK_CLIPBOARD (source);
|
||||
GError *error = NULL;
|
||||
const GValue *value;
|
||||
GtkDemoWidget *demo;
|
||||
GtkWidget *widget = NULL;
|
||||
|
||||
value = gdk_clipboard_read_value_finish (clipboard, res, &error);
|
||||
|
||||
if (value == NULL)
|
||||
{
|
||||
g_print ("error: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!G_VALUE_HOLDS (value, GTK_TYPE_DEMO_WIDGET))
|
||||
{
|
||||
g_print ("can't handle clipboard contents\n");
|
||||
return;
|
||||
}
|
||||
|
||||
demo = g_value_get_boxed (value);
|
||||
widget = deserialize_widget (demo);
|
||||
|
||||
gtk_fixed_put (GTK_FIXED (data), widget, pos_x, pos_y);
|
||||
}
|
||||
|
||||
static void
|
||||
paste_cb (GtkWidget *fixed)
|
||||
{
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
|
||||
if (gdk_content_formats_contain_gtype (gdk_clipboard_get_formats (clipboard), GTK_TYPE_DEMO_WIDGET))
|
||||
{
|
||||
g_print ("Paste %s\n", g_type_name (GTK_TYPE_DEMO_WIDGET));
|
||||
gdk_clipboard_read_value_async (clipboard, GTK_TYPE_DEMO_WIDGET, 0, NULL, value_read, fixed);
|
||||
}
|
||||
else
|
||||
g_print ("Don't know how to handle clipboard contents\n");
|
||||
}
|
||||
|
||||
static void
|
||||
edit_label_done (GtkWidget *entry, gpointer data)
|
||||
{
|
||||
GtkWidget *fixed = gtk_widget_get_parent (entry);
|
||||
GtkWidget *label;
|
||||
int x, y;
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (fixed), entry, "x", &x, "y", &y, NULL);
|
||||
|
||||
label = GTK_WIDGET (g_object_get_data (G_OBJECT (entry), "label"));
|
||||
gtk_label_set_text (GTK_LABEL (label), gtk_entry_get_text (GTK_ENTRY (entry)));
|
||||
|
||||
gtk_widget_destroy (entry);
|
||||
}
|
||||
|
||||
static void
|
||||
edit_cb (GtkWidget *child)
|
||||
{
|
||||
GtkWidget *fixed = gtk_widget_get_parent (child);
|
||||
int x, y;
|
||||
|
||||
gtk_container_child_get (GTK_CONTAINER (fixed), child, "x", &x, "y", &y, NULL);
|
||||
|
||||
if (GTK_IS_LABEL (child))
|
||||
{
|
||||
GtkWidget *entry = gtk_entry_new ();
|
||||
|
||||
g_object_set_data (G_OBJECT (entry), "label", child);
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), gtk_label_get_text (GTK_LABEL (child)));
|
||||
g_signal_connect (entry, "activate", G_CALLBACK (edit_label_done), NULL);
|
||||
gtk_fixed_put (GTK_FIXED (fixed), entry, x, y);
|
||||
gtk_widget_grab_focus (entry);
|
||||
}
|
||||
else if (GTK_IS_SPINNER (child))
|
||||
{
|
||||
gboolean active;
|
||||
|
||||
g_object_get (child, "active", &active, NULL);
|
||||
g_object_set (child, "active", !active, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
pressed_cb (GtkGesture *gesture,
|
||||
int n_press,
|
||||
double x,
|
||||
double y,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *child;
|
||||
|
||||
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
|
||||
child = gtk_widget_pick (widget, x, y);
|
||||
|
||||
if (gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)) == GDK_BUTTON_SECONDARY)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
GtkWidget *menu;
|
||||
GtkWidget *item;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
pos_x = x;
|
||||
pos_y = y;
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
item = gtk_menu_item_new_with_label ("New Label");
|
||||
g_signal_connect (item, "activate", G_CALLBACK (new_label_cb), widget);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
item = gtk_menu_item_new_with_label ("New Spinner");
|
||||
g_signal_connect (item, "activate", G_CALLBACK (new_spinner_cb), widget);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
|
||||
item = gtk_separator_menu_item_new ();
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
|
||||
item = gtk_menu_item_new_with_label ("Edit");
|
||||
gtk_widget_set_sensitive (item, child != NULL && child != widget);
|
||||
g_signal_connect_swapped (item, "activate", G_CALLBACK (edit_cb), child);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
|
||||
item = gtk_separator_menu_item_new ();
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
|
||||
item = gtk_menu_item_new_with_label ("Cut");
|
||||
gtk_widget_set_sensitive (item, child != NULL && child != widget);
|
||||
g_signal_connect_swapped (item, "activate", G_CALLBACK (cut_cb), child);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
item = gtk_menu_item_new_with_label ("Copy");
|
||||
gtk_widget_set_sensitive (item, child != NULL && child != widget);
|
||||
g_signal_connect_swapped (item, "activate", G_CALLBACK (copy_cb), child);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
item = gtk_menu_item_new_with_label ("Paste");
|
||||
clipboard = gdk_display_get_clipboard (gdk_display_get_default ());
|
||||
gtk_widget_set_sensitive (item,
|
||||
gdk_content_formats_contain_gtype (gdk_clipboard_get_formats (clipboard), GTK_TYPE_DEMO_WIDGET));
|
||||
g_signal_connect_swapped (item, "activate", G_CALLBACK (paste_cb), widget);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
item = gtk_menu_item_new_with_label ("Delete");
|
||||
gtk_widget_set_sensitive (item, child != NULL && child != widget);
|
||||
g_signal_connect_swapped (item, "activate", G_CALLBACK (delete_cb), child);
|
||||
gtk_container_add (GTK_CONTAINER (menu), item);
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = 0;
|
||||
rect.height = 0;
|
||||
|
||||
gtk_menu_popup_at_rect (GTK_MENU (menu),
|
||||
gtk_widget_get_window (widget),
|
||||
&rect,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
GDK_GRAVITY_NORTH_WEST,
|
||||
NULL);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
released_cb (GtkGesture *gesture,
|
||||
int n_press,
|
||||
double x,
|
||||
double y,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *child;
|
||||
|
||||
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
|
||||
child = gtk_widget_pick (widget, x, y);
|
||||
|
||||
if (gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture)) == GDK_BUTTON_PRIMARY)
|
||||
{
|
||||
if (child != NULL && child != widget)
|
||||
edit_cb (child);
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_dnd (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *vbox, *fixed;
|
||||
GtkGesture *multipress;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
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), "Drag-and-drop");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
fixed = gtk_fixed_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), fixed);
|
||||
gtk_widget_set_hexpand (fixed, TRUE);
|
||||
gtk_widget_set_vexpand (fixed, TRUE);
|
||||
|
||||
multipress = gtk_gesture_multi_press_new (fixed);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (multipress), 0);
|
||||
g_signal_connect (multipress, "pressed", G_CALLBACK (pressed_cb), NULL);
|
||||
g_signal_connect (multipress, "released", G_CALLBACK (released_cb), NULL);
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/dnd/dnd.css");
|
||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
800);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
3
demos/gtk-demo/dnd.css
Normal file
@@ -0,0 +1,3 @@
|
||||
spinner.demo {
|
||||
opacity: 1;
|
||||
}
|
@@ -89,42 +89,38 @@ draw_brush (GtkWidget *widget,
|
||||
gtk_widget_queue_draw_area (widget, update_rect.x, update_rect.y, update_rect.width, update_rect.height);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
scribble_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
static double start_x;
|
||||
static double start_y;
|
||||
|
||||
static void
|
||||
drag_begin (GtkGestureDrag *gesture,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *area)
|
||||
{
|
||||
double x, y;
|
||||
guint button;
|
||||
start_x = x;
|
||||
start_y = y;
|
||||
|
||||
gdk_event_get_button ((GdkEvent *)event, &button);
|
||||
gdk_event_get_coords ((GdkEvent *)event, &x, &y);
|
||||
|
||||
if (button == GDK_BUTTON_PRIMARY)
|
||||
draw_brush (widget, x, y);
|
||||
|
||||
/* We've handled the event, stop processing */
|
||||
return TRUE;
|
||||
draw_brush (area, x, y);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
scribble_motion_notify_event (GtkWidget *widget,
|
||||
GdkEventMotion *event,
|
||||
gpointer data)
|
||||
static void
|
||||
drag_update (GtkGestureDrag *gesture,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *area)
|
||||
{
|
||||
double x, y;
|
||||
GdkModifierType state;
|
||||
|
||||
gdk_event_get_state ((GdkEvent *)event, &state);
|
||||
gdk_event_get_coords ((GdkEvent *)event, &x, &y);
|
||||
|
||||
if (state & GDK_BUTTON1_MASK)
|
||||
draw_brush (widget, x, y);
|
||||
|
||||
/* We've handled it, stop processing */
|
||||
return TRUE;
|
||||
draw_brush (area, start_x + x, start_y + y);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_end (GtkGestureDrag *gesture,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *area)
|
||||
{
|
||||
draw_brush (area, start_x + x, start_y + y);
|
||||
}
|
||||
|
||||
static void
|
||||
checkerboard_draw (GtkDrawingArea *da,
|
||||
@@ -189,6 +185,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *da;
|
||||
GtkWidget *label;
|
||||
GtkGesture *drag;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
@@ -247,11 +244,13 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
g_signal_connect (da, "size-allocate",
|
||||
G_CALLBACK (scribble_size_allocate), NULL);
|
||||
|
||||
/* Event signals */
|
||||
g_signal_connect (da, "motion-notify-event",
|
||||
G_CALLBACK (scribble_motion_notify_event), NULL);
|
||||
g_signal_connect (da, "button-press-event",
|
||||
G_CALLBACK (scribble_button_press_event), NULL);
|
||||
drag = gtk_gesture_drag_new (da);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (drag), GDK_BUTTON_PRIMARY);
|
||||
g_object_set_data_full (G_OBJECT (da), "drag", drag, g_object_unref);
|
||||
|
||||
g_signal_connect (drag, "drag-begin", G_CALLBACK (drag_begin), da);
|
||||
g_signal_connect (drag, "drag-update", G_CALLBACK (drag_update), da);
|
||||
g_signal_connect (drag, "drag-end", G_CALLBACK (drag_end), da);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -34,14 +34,12 @@
|
||||
<property name="title" translatable="yes">Filter Model</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="column_spacing">10</property>
|
||||
<property name="column_homogeneous">1</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="column-homogeneous">1</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Original</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
@@ -49,16 +47,15 @@
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="headers_clickable">0</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
@@ -86,16 +83,15 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview2">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="headers_clickable">0</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<property name="search-column">0</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection3"/>
|
||||
</child>
|
||||
@@ -135,13 +131,12 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Computed Columns</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
@@ -149,13 +144,12 @@
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Filtered</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
@@ -163,16 +157,15 @@
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview3">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="headers_clickable">0</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<property name="search-column">0</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection5"/>
|
||||
</child>
|
||||
@@ -194,8 +187,8 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -5,45 +5,41 @@
|
||||
<property name="title" translatable="yes">Fishbowl</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="">
|
||||
<property name="visible">True</property>
|
||||
<property name="show-close-button">True</property>
|
||||
<property name="show-title-buttons">1</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="info_label">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" bind-source="bowl" bind-property="count">0</property>
|
||||
<property name="label" bind-source="bowl" bind-property="count"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="changes_allow">
|
||||
<property name="active">False</property>
|
||||
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
|
||||
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean"/>
|
||||
<property name="icon-name">changes-allow</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="changes_prevent">
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
|
||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean"/>
|
||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean"/>
|
||||
<property name="icon-name">changes-prevent</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="pack-type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
315
demos/gtk-demo/fontplane.c
Normal file
@@ -0,0 +1,315 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2012 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "fontplane.h"
|
||||
|
||||
#include "gtk.h"
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_WEIGHT_ADJUSTMENT,
|
||||
PROP_WIDTH_ADJUSTMENT
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GtkFontPlane, gtk_font_plane, GTK_TYPE_WIDGET)
|
||||
|
||||
static double
|
||||
adjustment_get_normalized_value (GtkAdjustment *adj)
|
||||
{
|
||||
return (gtk_adjustment_get_value (adj) - gtk_adjustment_get_lower (adj)) /
|
||||
(gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj));
|
||||
}
|
||||
|
||||
static void
|
||||
val_to_xy (GtkFontPlane *plane,
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
gdouble u, v;
|
||||
gint width, height;
|
||||
|
||||
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
|
||||
height = gtk_widget_get_allocated_height (GTK_WIDGET (plane));
|
||||
|
||||
u = adjustment_get_normalized_value (plane->width_adj);
|
||||
v = adjustment_get_normalized_value (plane->weight_adj);
|
||||
|
||||
*x = CLAMP (width * u, 0, width - 1);
|
||||
*y = CLAMP (height * (1 - v), 0, height - 1);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
GtkFontPlane *plane = GTK_FONT_PLANE (widget);
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
cairo_t *cr;
|
||||
|
||||
val_to_xy (plane, &x, &y);
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
cr = gtk_snapshot_append_cairo (snapshot,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height),
|
||||
"FontPlane");
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_move_to (cr, 0, y + 0.5);
|
||||
cairo_line_to (cr, width, y + 0.5);
|
||||
|
||||
cairo_move_to (cr, x + 0.5, 0);
|
||||
cairo_line_to (cr, x + 0.5, height);
|
||||
|
||||
if (gtk_widget_has_visible_focus (widget))
|
||||
{
|
||||
cairo_set_line_width (cr, 3.0);
|
||||
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.6);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.8);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
cairo_set_source_rgba (cr, 0.8, 0.8, 0.8, 0.8);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
static void
|
||||
set_cross_cursor (GtkWidget *widget,
|
||||
gboolean enabled)
|
||||
{
|
||||
if (enabled)
|
||||
gtk_widget_set_cursor_from_name (widget, "crosshair");
|
||||
else
|
||||
gtk_widget_set_cursor (widget, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
adj_changed (GtkFontPlane *plane)
|
||||
{
|
||||
gtk_widget_queue_draw (GTK_WIDGET (plane));
|
||||
}
|
||||
|
||||
static void
|
||||
adjustment_set_normalized_value (GtkAdjustment *adj,
|
||||
double val)
|
||||
{
|
||||
gtk_adjustment_set_value (adj,
|
||||
gtk_adjustment_get_lower (adj) +
|
||||
val * (gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj)));
|
||||
}
|
||||
|
||||
static void
|
||||
update_value (GtkFontPlane *plane,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (plane);
|
||||
gdouble u, v;
|
||||
|
||||
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
|
||||
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
|
||||
|
||||
adjustment_set_normalized_value (plane->width_adj, u);
|
||||
adjustment_set_normalized_value (plane->weight_adj, v);
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
hold_action (GtkGestureLongPress *gesture,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
gboolean handled;
|
||||
|
||||
g_signal_emit_by_name (plane, "popup-menu", &handled);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
||||
gdouble start_x,
|
||||
gdouble start_y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
guint button;
|
||||
|
||||
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||
|
||||
if (button == GDK_BUTTON_SECONDARY)
|
||||
{
|
||||
gboolean handled;
|
||||
|
||||
g_signal_emit_by_name (plane, "popup-menu", &handled);
|
||||
}
|
||||
|
||||
if (button != GDK_BUTTON_PRIMARY)
|
||||
{
|
||||
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
|
||||
return;
|
||||
}
|
||||
|
||||
set_cross_cursor (GTK_WIDGET (plane), TRUE);
|
||||
update_value (plane, start_x, start_y);
|
||||
gtk_widget_grab_focus (GTK_WIDGET (plane));
|
||||
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_drag_gesture_update (GtkGestureDrag *gesture,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
gdouble start_x, start_y;
|
||||
|
||||
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
|
||||
&start_x, &start_y);
|
||||
update_value (plane, start_x + offset_x, start_y + offset_y);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_drag_gesture_end (GtkGestureDrag *gesture,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
set_cross_cursor (GTK_WIDGET (plane), FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_plane_init (GtkFontPlane *plane)
|
||||
{
|
||||
gtk_widget_set_has_window (GTK_WIDGET (plane), FALSE);
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE);
|
||||
|
||||
plane->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (plane));
|
||||
g_signal_connect (plane->drag_gesture, "drag-begin",
|
||||
G_CALLBACK (plane_drag_gesture_begin), plane);
|
||||
g_signal_connect (plane->drag_gesture, "drag-update",
|
||||
G_CALLBACK (plane_drag_gesture_update), plane);
|
||||
g_signal_connect (plane->drag_gesture, "drag-end",
|
||||
G_CALLBACK (plane_drag_gesture_end), plane);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (plane->drag_gesture), 0);
|
||||
|
||||
plane->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (plane));
|
||||
g_signal_connect (plane->long_press_gesture, "pressed",
|
||||
G_CALLBACK (hold_action), plane);
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (plane->long_press_gesture),
|
||||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_finalize (GObject *object)
|
||||
{
|
||||
GtkFontPlane *plane = GTK_FONT_PLANE (object);
|
||||
|
||||
g_clear_object (&plane->weight_adj);
|
||||
g_clear_object (&plane->width_adj);
|
||||
|
||||
g_clear_object (&plane->drag_gesture);
|
||||
g_clear_object (&plane->long_press_gesture);
|
||||
|
||||
G_OBJECT_CLASS (gtk_font_plane_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkFontPlane *plane = GTK_FONT_PLANE (object);
|
||||
GtkAdjustment *adjustment;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_WEIGHT_ADJUSTMENT:
|
||||
adjustment = GTK_ADJUSTMENT (g_value_get_object (value));
|
||||
if (adjustment)
|
||||
{
|
||||
plane->weight_adj = g_object_ref_sink (adjustment);
|
||||
g_signal_connect_swapped (adjustment, "value-changed", G_CALLBACK (adj_changed), plane);
|
||||
}
|
||||
break;
|
||||
case PROP_WIDTH_ADJUSTMENT:
|
||||
adjustment = GTK_ADJUSTMENT (g_value_get_object (value));
|
||||
if (adjustment)
|
||||
{
|
||||
plane->width_adj = g_object_ref_sink (adjustment);
|
||||
g_signal_connect_swapped (adjustment, "value-changed", G_CALLBACK (adj_changed), plane);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_plane_class_init (GtkFontPlaneClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->finalize = plane_finalize;
|
||||
object_class->set_property = plane_set_property;
|
||||
|
||||
widget_class->snapshot = plane_snapshot;
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_WEIGHT_ADJUSTMENT,
|
||||
g_param_spec_object ("weight-adjustment",
|
||||
NULL,
|
||||
NULL,
|
||||
GTK_TYPE_ADJUSTMENT,
|
||||
G_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_WIDTH_ADJUSTMENT,
|
||||
g_param_spec_object ("width-adjustment",
|
||||
NULL,
|
||||
NULL,
|
||||
GTK_TYPE_ADJUSTMENT,
|
||||
G_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_font_plane_new (GtkAdjustment *weight_adj,
|
||||
GtkAdjustment *width_adj)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_FONT_PLANE,
|
||||
"weight-adjustment", weight_adj,
|
||||
"width-adjustment", width_adj,
|
||||
NULL);
|
||||
}
|
65
demos/gtk-demo/fontplane.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2012 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_FONT_PLANE_H__
|
||||
#define __GTK_FONT_PLANE_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_FONT_PLANE (gtk_font_plane_get_type ())
|
||||
#define GTK_FONT_PLANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FONT_PLANE, GtkFontPlane))
|
||||
#define GTK_FONT_PLANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FONT_PLANE, GtkFontPlaneClass))
|
||||
#define GTK_IS_FONT_PLANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COLOR_PLANE))
|
||||
#define GTK_IS_FONT_PLANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_PLANE))
|
||||
#define GTK_FONT_PLANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FONT_PLANE, GtkFontPlaneClass))
|
||||
|
||||
|
||||
typedef struct _GtkFontPlane GtkFontPlane;
|
||||
typedef struct _GtkFontPlaneClass GtkFontPlaneClass;
|
||||
|
||||
struct _GtkFontPlane
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
|
||||
GtkAdjustment *weight_adj;
|
||||
GtkAdjustment *width_adj;
|
||||
|
||||
GtkGesture *drag_gesture;
|
||||
GtkGesture *long_press_gesture;
|
||||
};
|
||||
|
||||
struct _GtkFontPlaneClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_reserved1) (void);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
|
||||
GType gtk_font_plane_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget * gtk_font_plane_new (GtkAdjustment *width_adj,
|
||||
GtkAdjustment *weight_adj);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FONT_PLANE_H__ */
|
@@ -830,6 +830,7 @@ draw_spinbutton (GtkWidget *widget,
|
||||
GtkIconTheme *icon_theme;
|
||||
GtkIconInfo *icon_info;
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkTexture *texture;
|
||||
gint icon_width, icon_height, icon_size;
|
||||
gint button_width;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
@@ -857,23 +858,26 @@ draw_spinbutton (GtkWidget *widget,
|
||||
icon_size = MIN (icon_width, icon_height);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "list-add-symbolic", icon_size, 0);
|
||||
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, up_context, NULL, NULL);
|
||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
||||
g_object_unref (icon_info);
|
||||
draw_style_common (up_context, cr, x + width - button_width, y, button_width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_icon (up_context, cr, pixbuf, contents_x, contents_y + (contents_height - icon_size) / 2);
|
||||
gtk_render_icon (up_context, cr, texture, contents_x, contents_y + (contents_height - icon_size) / 2);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
g_object_unref (texture);
|
||||
|
||||
gtk_style_context_get (down_context,
|
||||
"min-width", &icon_width, "min-height", &icon_height, NULL);
|
||||
icon_size = MIN (icon_width, icon_height);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "list-remove-symbolic", icon_size, 0);
|
||||
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, down_context, NULL, NULL);
|
||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
||||
g_object_unref (icon_info);
|
||||
draw_style_common (down_context, cr, x + width - 2 * button_width, y, button_width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_icon (down_context, cr, pixbuf, contents_x, contents_y + (contents_height - icon_size) / 2);
|
||||
gtk_render_icon (down_context, cr, texture, contents_x, contents_y + (contents_height - icon_size) / 2);
|
||||
g_object_unref (pixbuf);
|
||||
g_object_unref (texture);
|
||||
|
||||
g_object_unref (down_context);
|
||||
g_object_unref (up_context);
|
||||
|
@@ -106,7 +106,18 @@ gtk_fishbowl_measure (GtkWidget *widget,
|
||||
if (!gtk_widget_get_visible (child->widget))
|
||||
continue;
|
||||
|
||||
gtk_widget_measure (child->widget, orientation, -1, &child_min, &child_nat, NULL, NULL);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
gtk_widget_measure (child->widget, orientation, -1, &child_min, &child_nat, NULL, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
int min_width;
|
||||
|
||||
gtk_widget_measure (child->widget, GTK_ORIENTATION_HORIZONTAL, -1, &min_width, NULL, NULL, NULL);
|
||||
gtk_widget_measure (child->widget, orientation, min_width, &child_min, &child_nat, NULL, NULL);
|
||||
}
|
||||
|
||||
*minimum = MAX (*minimum, child_min);
|
||||
*natural = MAX (*natural, child_nat);
|
||||
@@ -411,8 +422,10 @@ gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
|
||||
GtkWidget *new_widget;
|
||||
|
||||
if (priv->use_icons)
|
||||
new_widget = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()),
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
{
|
||||
new_widget = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()));
|
||||
gtk_image_set_icon_size (GTK_IMAGE (new_widget), GTK_ICON_SIZE_LARGE);
|
||||
}
|
||||
else
|
||||
new_widget = g_object_new (get_random_widget_type (), NULL);
|
||||
|
||||
|
960
demos/gtk-demo/gtkgears.c
Normal file
@@ -0,0 +1,960 @@
|
||||
/* The rendering code in here is taken from es2gears, which has the
|
||||
* following copyright notice:
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Ported to GLES2.
|
||||
* Kristian Høgsberg <krh@bitplanet.net>
|
||||
* May 3, 2010
|
||||
*
|
||||
* Improve GLES2 port:
|
||||
* * Refactor gear drawing.
|
||||
* * Use correct normals for surfaces.
|
||||
* * Improve shader.
|
||||
* * Use perspective projection transformation.
|
||||
* * Add FPS count.
|
||||
* * Add comments.
|
||||
* Alexandros Frantzis <alexandros.frantzis@linaro.org>
|
||||
* Jul 13, 2010
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <epoxy/gl.h>
|
||||
|
||||
#include "gtkgears.h"
|
||||
|
||||
#define STRIPS_PER_TOOTH 7
|
||||
#define VERTICES_PER_TOOTH 34
|
||||
#define GEAR_VERTEX_STRIDE 6
|
||||
|
||||
#ifndef HAVE_SINCOS
|
||||
static void
|
||||
sincos (double x, double *_sin, double *_cos)
|
||||
{
|
||||
*_sin = sin (x);
|
||||
*_cos = cos (x);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Struct describing the vertices in triangle strip
|
||||
*/
|
||||
struct vertex_strip {
|
||||
/** The first vertex in the strip */
|
||||
GLint first;
|
||||
/** The number of consecutive vertices in the strip after the first */
|
||||
GLint count;
|
||||
};
|
||||
|
||||
/* Each vertex consist of GEAR_VERTEX_STRIDE GLfloat attributes */
|
||||
typedef GLfloat GearVertex[GEAR_VERTEX_STRIDE];
|
||||
|
||||
/**
|
||||
* Struct representing a gear.
|
||||
*/
|
||||
struct gear {
|
||||
/** The array of vertices comprising the gear */
|
||||
GearVertex *vertices;
|
||||
/** The number of vertices comprising the gear */
|
||||
int nvertices;
|
||||
/** The array of triangle strips comprising the gear */
|
||||
struct vertex_strip *strips;
|
||||
/** The number of triangle strips comprising the gear */
|
||||
int nstrips;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
/* The view rotation [x, y, z] */
|
||||
GLfloat view_rot[GTK_GEARS_N_AXIS];
|
||||
|
||||
/* The Vertex Array Object */
|
||||
GLuint vao;
|
||||
|
||||
/* The shader program */
|
||||
GLuint program;
|
||||
|
||||
/* The gears */
|
||||
struct gear *gear1;
|
||||
struct gear *gear2;
|
||||
struct gear *gear3;
|
||||
|
||||
/** The Vertex Buffer Object holding the vertices in the graphics card */
|
||||
GLuint gear_vbo[3];
|
||||
|
||||
/** The location of the shader uniforms */
|
||||
GLuint ModelViewProjectionMatrix_location;
|
||||
GLuint NormalMatrix_location;
|
||||
GLuint LightSourcePosition_location;
|
||||
GLuint MaterialColor_location;
|
||||
|
||||
/* The current gear rotation angle */
|
||||
GLfloat angle;
|
||||
|
||||
/* The projection matrix */
|
||||
GLfloat ProjectionMatrix[16];
|
||||
|
||||
/* The direction of the directional light for the scene */
|
||||
GLfloat LightSourcePosition[4];
|
||||
|
||||
gint64 first_frame_time;
|
||||
guint tick;
|
||||
GtkLabel *fps_label;
|
||||
} GtkGearsPrivate;
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkGears, gtk_gears, GTK_TYPE_GL_AREA)
|
||||
|
||||
static gboolean gtk_gears_render (GtkGLArea *area,
|
||||
GdkGLContext *context);
|
||||
static void gtk_gears_reshape (GtkGLArea *area,
|
||||
int width,
|
||||
int height);
|
||||
static void gtk_gears_realize (GtkWidget *widget);
|
||||
static void gtk_gears_unrealize (GtkWidget *widget);
|
||||
static gboolean gtk_gears_tick (GtkWidget *widget,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer user_data);
|
||||
|
||||
static void destroy_gear (struct gear *g);
|
||||
|
||||
GtkWidget *
|
||||
gtk_gears_new (void)
|
||||
{
|
||||
return g_object_new (gtk_gears_get_type (),
|
||||
"has-depth-buffer", TRUE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_gears_init (GtkGears *gears)
|
||||
{
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
|
||||
priv->view_rot[GTK_GEARS_X_AXIS] = 20.0;
|
||||
priv->view_rot[GTK_GEARS_Y_AXIS] = 30.0;
|
||||
priv->view_rot[GTK_GEARS_Z_AXIS] = 20.0;
|
||||
|
||||
priv->LightSourcePosition[0] = 5.0;
|
||||
priv->LightSourcePosition[1] = 5.0;
|
||||
priv->LightSourcePosition[2] = 10.0;
|
||||
priv->LightSourcePosition[3] = 1.0;
|
||||
|
||||
priv->tick = gtk_widget_add_tick_callback (GTK_WIDGET (gears), gtk_gears_tick, gears, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_gears_finalize (GObject *obj)
|
||||
{
|
||||
GtkGears *gears = GTK_GEARS (obj);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
|
||||
gtk_widget_remove_tick_callback (GTK_WIDGET (gears), priv->tick);
|
||||
|
||||
g_clear_object (&priv->fps_label);
|
||||
|
||||
g_clear_pointer (&priv->gear1, destroy_gear);
|
||||
g_clear_pointer (&priv->gear2, destroy_gear);
|
||||
g_clear_pointer (&priv->gear3, destroy_gear);
|
||||
|
||||
G_OBJECT_CLASS (gtk_gears_parent_class)->finalize (obj);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_gears_class_init (GtkGearsClass *klass)
|
||||
{
|
||||
GTK_GL_AREA_CLASS (klass)->render = gtk_gears_render;
|
||||
GTK_GL_AREA_CLASS (klass)->resize = gtk_gears_reshape;
|
||||
|
||||
GTK_WIDGET_CLASS (klass)->realize = gtk_gears_realize;
|
||||
GTK_WIDGET_CLASS (klass)->unrealize = gtk_gears_unrealize;
|
||||
|
||||
G_OBJECT_CLASS (klass)->finalize = gtk_gears_finalize;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fills a gear vertex.
|
||||
*
|
||||
* @param v the vertex to fill
|
||||
* @param x the x coordinate
|
||||
* @param y the y coordinate
|
||||
* @param z the z coortinate
|
||||
* @param n pointer to the normal table
|
||||
*
|
||||
* @return the operation error code
|
||||
*/
|
||||
static GearVertex *
|
||||
vert (GearVertex *v,
|
||||
GLfloat x,
|
||||
GLfloat y,
|
||||
GLfloat z,
|
||||
GLfloat n[3])
|
||||
{
|
||||
v[0][0] = x;
|
||||
v[0][1] = y;
|
||||
v[0][2] = z;
|
||||
v[0][3] = n[0];
|
||||
v[0][4] = n[1];
|
||||
v[0][5] = n[2];
|
||||
|
||||
return v + 1;
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_gear (struct gear *g)
|
||||
{
|
||||
g_free (g->strips);
|
||||
g_free (g);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gear wheel.
|
||||
*
|
||||
* @param inner_radius radius of hole at center
|
||||
* @param outer_radius radius at center of teeth
|
||||
* @param width width of gear
|
||||
* @param teeth number of teeth
|
||||
* @param tooth_depth depth of tooth
|
||||
*
|
||||
* @return pointer to the constructed struct gear
|
||||
*/
|
||||
static struct gear *
|
||||
create_gear (GLfloat inner_radius,
|
||||
GLfloat outer_radius,
|
||||
GLfloat width,
|
||||
GLint teeth,
|
||||
GLfloat tooth_depth)
|
||||
{
|
||||
GLfloat r0, r1, r2;
|
||||
GLfloat da;
|
||||
GearVertex *v;
|
||||
struct gear *gear;
|
||||
double s[5], c[5];
|
||||
GLfloat normal[3];
|
||||
int cur_strip = 0;
|
||||
int i;
|
||||
|
||||
/* Allocate memory for the gear */
|
||||
gear = g_malloc (sizeof *gear);
|
||||
|
||||
/* Calculate the radii used in the gear */
|
||||
r0 = inner_radius;
|
||||
r1 = outer_radius - tooth_depth / 2.0;
|
||||
r2 = outer_radius + tooth_depth / 2.0;
|
||||
|
||||
da = 2.0 * M_PI / teeth / 4.0;
|
||||
|
||||
/* Allocate memory for the triangle strip information */
|
||||
gear->nstrips = STRIPS_PER_TOOTH * teeth;
|
||||
gear->strips = g_malloc0_n (gear->nstrips, sizeof (*gear->strips));
|
||||
|
||||
/* Allocate memory for the vertices */
|
||||
gear->vertices = g_malloc0_n (VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices));
|
||||
v = gear->vertices;
|
||||
|
||||
for (i = 0; i < teeth; i++) {
|
||||
/* A set of macros for making the creation of the gears easier */
|
||||
#define GEAR_POINT(p, r, da) do { p.x = (r) * c[(da)]; p.y = (r) * s[(da)]; } while(0)
|
||||
#define SET_NORMAL(x, y, z) do { \
|
||||
normal[0] = (x); normal[1] = (y); normal[2] = (z); \
|
||||
} while(0)
|
||||
|
||||
#define GEAR_VERT(v, point, sign) vert((v), p[(point)].x, p[(point)].y, (sign) * width * 0.5, normal)
|
||||
|
||||
#define START_STRIP do { \
|
||||
gear->strips[cur_strip].first = v - gear->vertices; \
|
||||
} while(0);
|
||||
|
||||
#define END_STRIP do { \
|
||||
int _tmp = (v - gear->vertices); \
|
||||
gear->strips[cur_strip].count = _tmp - gear->strips[cur_strip].first; \
|
||||
cur_strip++; \
|
||||
} while (0)
|
||||
|
||||
#define QUAD_WITH_NORMAL(p1, p2) do { \
|
||||
SET_NORMAL((p[(p1)].y - p[(p2)].y), -(p[(p1)].x - p[(p2)].x), 0); \
|
||||
v = GEAR_VERT(v, (p1), -1); \
|
||||
v = GEAR_VERT(v, (p1), 1); \
|
||||
v = GEAR_VERT(v, (p2), -1); \
|
||||
v = GEAR_VERT(v, (p2), 1); \
|
||||
} while(0)
|
||||
struct point {
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
};
|
||||
|
||||
/* Create the 7 points (only x,y coords) used to draw a tooth */
|
||||
struct point p[7];
|
||||
|
||||
/* Calculate needed sin/cos for varius angles */
|
||||
sincos(i * 2.0 * G_PI / teeth + da * 0, &s[0], &c[0]);
|
||||
sincos(i * 2.0 * M_PI / teeth + da * 1, &s[1], &c[1]);
|
||||
sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]);
|
||||
sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]);
|
||||
sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]);
|
||||
|
||||
GEAR_POINT(p[0], r2, 1);
|
||||
GEAR_POINT(p[1], r2, 2);
|
||||
GEAR_POINT(p[2], r1, 0);
|
||||
GEAR_POINT(p[3], r1, 3);
|
||||
GEAR_POINT(p[4], r0, 0);
|
||||
GEAR_POINT(p[5], r1, 4);
|
||||
GEAR_POINT(p[6], r0, 4);
|
||||
|
||||
/* Front face */
|
||||
START_STRIP;
|
||||
SET_NORMAL(0, 0, 1.0);
|
||||
v = GEAR_VERT(v, 0, +1);
|
||||
v = GEAR_VERT(v, 1, +1);
|
||||
v = GEAR_VERT(v, 2, +1);
|
||||
v = GEAR_VERT(v, 3, +1);
|
||||
v = GEAR_VERT(v, 4, +1);
|
||||
v = GEAR_VERT(v, 5, +1);
|
||||
v = GEAR_VERT(v, 6, +1);
|
||||
END_STRIP;
|
||||
|
||||
/* Inner face */
|
||||
START_STRIP;
|
||||
QUAD_WITH_NORMAL(4, 6);
|
||||
END_STRIP;
|
||||
|
||||
/* Back face */
|
||||
START_STRIP;
|
||||
SET_NORMAL(0, 0, -1.0);
|
||||
v = GEAR_VERT(v, 6, -1);
|
||||
v = GEAR_VERT(v, 5, -1);
|
||||
v = GEAR_VERT(v, 4, -1);
|
||||
v = GEAR_VERT(v, 3, -1);
|
||||
v = GEAR_VERT(v, 2, -1);
|
||||
v = GEAR_VERT(v, 1, -1);
|
||||
v = GEAR_VERT(v, 0, -1);
|
||||
END_STRIP;
|
||||
|
||||
/* Outer face */
|
||||
START_STRIP;
|
||||
QUAD_WITH_NORMAL(0, 2);
|
||||
END_STRIP;
|
||||
|
||||
START_STRIP;
|
||||
QUAD_WITH_NORMAL(1, 0);
|
||||
END_STRIP;
|
||||
|
||||
START_STRIP;
|
||||
QUAD_WITH_NORMAL(3, 1);
|
||||
END_STRIP;
|
||||
|
||||
START_STRIP;
|
||||
QUAD_WITH_NORMAL(5, 3);
|
||||
END_STRIP;
|
||||
}
|
||||
|
||||
gear->nvertices = (v - gear->vertices);
|
||||
|
||||
return gear;
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiplies two 4x4 matrices.
|
||||
*
|
||||
* The result is stored in matrix m.
|
||||
*
|
||||
* @param m the first matrix to multiply
|
||||
* @param n the second matrix to multiply
|
||||
*/
|
||||
static void
|
||||
multiply (GLfloat *m, const GLfloat *n)
|
||||
{
|
||||
GLfloat tmp[16];
|
||||
const GLfloat *row, *column;
|
||||
div_t d;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
tmp[i] = 0;
|
||||
d = div(i, 4);
|
||||
row = n + d.quot * 4;
|
||||
column = m + d.rem;
|
||||
for (j = 0; j < 4; j++)
|
||||
tmp[i] += row[j] * column[j * 4];
|
||||
}
|
||||
memcpy(m, &tmp, sizeof tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates a 4x4 matrix.
|
||||
*
|
||||
* @param[in,out] m the matrix to rotate
|
||||
* @param angle the angle to rotate
|
||||
* @param x the x component of the direction to rotate to
|
||||
* @param y the y component of the direction to rotate to
|
||||
* @param z the z component of the direction to rotate to
|
||||
*/
|
||||
static void
|
||||
rotate(GLfloat *m, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
|
||||
{
|
||||
double s = sin (angle);
|
||||
double c = cos (angle);
|
||||
|
||||
GLfloat r[16] = {
|
||||
x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0,
|
||||
x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0,
|
||||
x * z * (1 - c) + y * s, y * z * (1 - c) - x * s, z * z * (1 - c) + c, 0,
|
||||
0, 0, 0, 1
|
||||
};
|
||||
|
||||
multiply(m, r);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates a 4x4 matrix.
|
||||
*
|
||||
* @param[in,out] m the matrix to translate
|
||||
* @param x the x component of the direction to translate to
|
||||
* @param y the y component of the direction to translate to
|
||||
* @param z the z component of the direction to translate to
|
||||
*/
|
||||
static void
|
||||
translate(GLfloat *m, GLfloat x, GLfloat y, GLfloat z)
|
||||
{
|
||||
GLfloat t[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, x, y, z, 1 };
|
||||
|
||||
multiply(m, t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an identity 4x4 matrix.
|
||||
*
|
||||
* @param m the matrix make an identity matrix
|
||||
*/
|
||||
static void
|
||||
identity(GLfloat *m)
|
||||
{
|
||||
GLfloat t[16] = {
|
||||
1.0, 0.0, 0.0, 0.0,
|
||||
0.0, 1.0, 0.0, 0.0,
|
||||
0.0, 0.0, 1.0, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0,
|
||||
};
|
||||
|
||||
memcpy(m, t, sizeof(t));
|
||||
}
|
||||
|
||||
/**
|
||||
* Transposes a 4x4 matrix.
|
||||
*
|
||||
* @param m the matrix to transpose
|
||||
*/
|
||||
static void
|
||||
transpose(GLfloat *m)
|
||||
{
|
||||
GLfloat t[16] = {
|
||||
m[0], m[4], m[8], m[12],
|
||||
m[1], m[5], m[9], m[13],
|
||||
m[2], m[6], m[10], m[14],
|
||||
m[3], m[7], m[11], m[15]};
|
||||
|
||||
memcpy(m, t, sizeof(t));
|
||||
}
|
||||
|
||||
/**
|
||||
* Inverts a 4x4 matrix.
|
||||
*
|
||||
* This function can currently handle only pure translation-rotation matrices.
|
||||
* Read http://www.gamedev.net/community/forums/topic.asp?topic_id=425118
|
||||
* for an explanation.
|
||||
*/
|
||||
static void
|
||||
invert(GLfloat *m)
|
||||
{
|
||||
GLfloat t[16];
|
||||
identity(t);
|
||||
|
||||
// Extract and invert the translation part 't'. The inverse of a
|
||||
// translation matrix can be calculated by negating the translation
|
||||
// coordinates.
|
||||
t[12] = -m[12]; t[13] = -m[13]; t[14] = -m[14];
|
||||
|
||||
// Invert the rotation part 'r'. The inverse of a rotation matrix is
|
||||
// equal to its transpose.
|
||||
m[12] = m[13] = m[14] = 0;
|
||||
transpose(m);
|
||||
|
||||
// inv(m) = inv(r) * inv(t)
|
||||
multiply(m, t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate a perspective projection transformation.
|
||||
*
|
||||
* @param m the matrix to save the transformation in
|
||||
* @param fovy the field of view in the y direction
|
||||
* @param aspect the view aspect ratio
|
||||
* @param zNear the near clipping plane
|
||||
* @param zFar the far clipping plane
|
||||
*/
|
||||
void perspective(GLfloat *m, GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar)
|
||||
{
|
||||
GLfloat tmp[16];
|
||||
double sine, cosine, cotangent, deltaZ;
|
||||
GLfloat radians = fovy / 2 * M_PI / 180;
|
||||
identity(tmp);
|
||||
|
||||
deltaZ = zFar - zNear;
|
||||
sincos(radians, &sine, &cosine);
|
||||
|
||||
if ((deltaZ == 0) || (sine == 0) || (aspect == 0))
|
||||
return;
|
||||
|
||||
cotangent = cosine / sine;
|
||||
|
||||
tmp[0] = cotangent / aspect;
|
||||
tmp[5] = cotangent;
|
||||
tmp[10] = -(zFar + zNear) / deltaZ;
|
||||
tmp[11] = -1;
|
||||
tmp[14] = -2 * zNear * zFar / deltaZ;
|
||||
tmp[15] = 0;
|
||||
|
||||
memcpy(m, tmp, sizeof(tmp));
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a gear.
|
||||
*
|
||||
* @param gear the gear to draw
|
||||
* @param transform the current transformation matrix
|
||||
* @param x the x position to draw the gear at
|
||||
* @param y the y position to draw the gear at
|
||||
* @param angle the rotation angle of the gear
|
||||
* @param color the color of the gear
|
||||
*/
|
||||
static void
|
||||
draw_gear(GtkGears *self,
|
||||
struct gear *gear,
|
||||
GLuint gear_vbo,
|
||||
GLfloat *transform,
|
||||
GLfloat x,
|
||||
GLfloat y,
|
||||
GLfloat angle,
|
||||
const GLfloat color[4])
|
||||
{
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (self);
|
||||
GLfloat model_view[16];
|
||||
GLfloat normal_matrix[16];
|
||||
GLfloat model_view_projection[16];
|
||||
int n;
|
||||
|
||||
/* Translate and rotate the gear */
|
||||
memcpy(model_view, transform, sizeof (model_view));
|
||||
translate(model_view, x, y, 0);
|
||||
rotate(model_view, 2 * G_PI * angle / 360.0, 0, 0, 1);
|
||||
|
||||
/* Create and set the ModelViewProjectionMatrix */
|
||||
memcpy(model_view_projection, priv->ProjectionMatrix, sizeof(model_view_projection));
|
||||
multiply(model_view_projection, model_view);
|
||||
|
||||
glUniformMatrix4fv(priv->ModelViewProjectionMatrix_location, 1, GL_FALSE,
|
||||
model_view_projection);
|
||||
|
||||
/*
|
||||
* Create and set the NormalMatrix. It's the inverse transpose of the
|
||||
* ModelView matrix.
|
||||
*/
|
||||
memcpy(normal_matrix, model_view, sizeof (normal_matrix));
|
||||
invert(normal_matrix);
|
||||
transpose(normal_matrix);
|
||||
glUniformMatrix4fv(priv->NormalMatrix_location, 1, GL_FALSE, normal_matrix);
|
||||
|
||||
/* Set the gear color */
|
||||
glUniform4fv(priv->MaterialColor_location, 1, color);
|
||||
|
||||
/* Set the vertex buffer object to use */
|
||||
glBindBuffer(GL_ARRAY_BUFFER, gear_vbo);
|
||||
|
||||
/* Set up the position of the attributes in the vertex buffer object */
|
||||
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), NULL);
|
||||
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLfloat *) 0 + 3);
|
||||
|
||||
/* Enable the attributes */
|
||||
glEnableVertexAttribArray(0);
|
||||
glEnableVertexAttribArray(1);
|
||||
|
||||
/* Draw the triangle strips that comprise the gear */
|
||||
for (n = 0; n < gear->nstrips; n++) {
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, gear->strips[n].first, gear->strips[n].count);
|
||||
}
|
||||
|
||||
/* Disable the attributes */
|
||||
glDisableVertexAttribArray(1);
|
||||
glDisableVertexAttribArray(0);
|
||||
}
|
||||
|
||||
/* new window size or exposure */
|
||||
static void
|
||||
gtk_gears_reshape (GtkGLArea *area, int width, int height)
|
||||
{
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private ((GtkGears *) area);
|
||||
|
||||
/* Update the projection matrix */
|
||||
perspective (priv->ProjectionMatrix, 60.0, width / (float)height, 1.0, 1024.0);
|
||||
|
||||
/* Set the viewport */
|
||||
glViewport (0, 0, (GLint) width, (GLint) height);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_gears_render (GtkGLArea *area,
|
||||
GdkGLContext *context)
|
||||
{
|
||||
static const GLfloat red[4] = { 0.8, 0.1, 0.0, 1.0 };
|
||||
static const GLfloat green[4] = { 0.0, 0.8, 0.2, 1.0 };
|
||||
static const GLfloat blue[4] = { 0.2, 0.2, 1.0, 1.0 };
|
||||
|
||||
GtkGears *self = GTK_GEARS (area);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (self);
|
||||
GLfloat transform[16];
|
||||
|
||||
identity (transform);
|
||||
|
||||
glClearColor (0.0, 0.0, 0.0, 0.0);
|
||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
/* Translate and rotate the view */
|
||||
translate (transform, 0, 0, -20);
|
||||
rotate (transform, 2 * G_PI * priv->view_rot[0] / 360.0, 1, 0, 0);
|
||||
rotate (transform, 2 * G_PI * priv->view_rot[1] / 360.0, 0, 1, 0);
|
||||
rotate (transform, 2 * G_PI * priv->view_rot[2] / 360.0, 0, 0, 1);
|
||||
|
||||
/* Draw the gears */
|
||||
draw_gear (self, priv->gear1, priv->gear_vbo[0], transform, -3.0, -2.0, priv->angle, red);
|
||||
draw_gear (self, priv->gear2, priv->gear_vbo[1], transform, 3.1, -2.0, -2 * priv->angle - 9.0, green);
|
||||
draw_gear (self, priv->gear3, priv->gear_vbo[2], transform, -3.1, 4.2, -2 * priv->angle - 25.0, blue);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static const char vertex_shader_gl[] =
|
||||
"#version 150\n"
|
||||
"\n"
|
||||
"in vec3 position;\n"
|
||||
"in vec3 normal;\n"
|
||||
"\n"
|
||||
"uniform mat4 ModelViewProjectionMatrix;\n"
|
||||
"uniform mat4 NormalMatrix;\n"
|
||||
"uniform vec4 LightSourcePosition;\n"
|
||||
"uniform vec4 MaterialColor;\n"
|
||||
"\n"
|
||||
"smooth out vec4 Color;\n"
|
||||
"\n"
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" // Transform the normal to eye coordinates\n"
|
||||
" vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));\n"
|
||||
"\n"
|
||||
" // The LightSourcePosition is actually its direction for directional light\n"
|
||||
" vec3 L = normalize(LightSourcePosition.xyz);\n"
|
||||
"\n"
|
||||
" // Multiply the diffuse value by the vertex color (which is fixed in this case)\n"
|
||||
" // to get the actual color that we will use to draw this vertex with\n"
|
||||
" float diffuse = max(dot(N, L), 0.0);\n"
|
||||
" Color = diffuse * MaterialColor;\n"
|
||||
"\n"
|
||||
" // Transform the position to clip coordinates\n"
|
||||
" gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n"
|
||||
"}";
|
||||
|
||||
static const char fragment_shader_gl[] =
|
||||
"#version 150\n"
|
||||
"\n"
|
||||
"smooth in vec4 Color;\n"
|
||||
"\n"
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" gl_FragColor = Color;\n"
|
||||
"}";
|
||||
|
||||
static const char vertex_shader_gles[] =
|
||||
"attribute vec3 position;\n"
|
||||
"attribute vec3 normal;\n"
|
||||
"\n"
|
||||
"uniform mat4 ModelViewProjectionMatrix;\n"
|
||||
"uniform mat4 NormalMatrix;\n"
|
||||
"uniform vec4 LightSourcePosition;\n"
|
||||
"uniform vec4 MaterialColor;\n"
|
||||
"\n"
|
||||
"varying vec4 Color;\n"
|
||||
"\n"
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" // Transform the normal to eye coordinates\n"
|
||||
" vec3 N = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));\n"
|
||||
"\n"
|
||||
" // The LightSourcePosition is actually its direction for directional light\n"
|
||||
" vec3 L = normalize(LightSourcePosition.xyz);\n"
|
||||
"\n"
|
||||
" // Multiply the diffuse value by the vertex color (which is fixed in this case)\n"
|
||||
" // to get the actual color that we will use to draw this vertex with\n"
|
||||
" float diffuse = max(dot(N, L), 0.0);\n"
|
||||
" Color = diffuse * MaterialColor;\n"
|
||||
"\n"
|
||||
" // Transform the position to clip coordinates\n"
|
||||
" gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);\n"
|
||||
"}";
|
||||
|
||||
static const char fragment_shader_gles[] =
|
||||
"precision mediump float;\n"
|
||||
"varying vec4 Color;\n"
|
||||
"\n"
|
||||
"void main(void)\n"
|
||||
"{\n"
|
||||
" gl_FragColor = Color;\n"
|
||||
"}";
|
||||
|
||||
static void
|
||||
gtk_gears_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkGLArea *glarea = GTK_GL_AREA (widget);
|
||||
GtkGears *gears = GTK_GEARS (widget);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
GdkGLContext *context;
|
||||
GLuint vao, v, f, program;
|
||||
const char *p;
|
||||
char msg[512];
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_gears_parent_class)->realize (widget);
|
||||
|
||||
gtk_gl_area_make_current (glarea);
|
||||
if (gtk_gl_area_get_error (glarea) != NULL)
|
||||
return;
|
||||
|
||||
context = gtk_gl_area_get_context (glarea);
|
||||
|
||||
glEnable (GL_CULL_FACE);
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
|
||||
/* Create the VAO */
|
||||
glGenVertexArrays (1, &vao);
|
||||
glBindVertexArray (vao);
|
||||
priv->vao = vao;
|
||||
|
||||
/* Compile the vertex shader */
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
p = vertex_shader_gles;
|
||||
else
|
||||
p = vertex_shader_gl;
|
||||
v = glCreateShader(GL_VERTEX_SHADER);
|
||||
glShaderSource(v, 1, &p, NULL);
|
||||
glCompileShader(v);
|
||||
glGetShaderInfoLog(v, sizeof msg, NULL, msg);
|
||||
g_print ("vertex shader info: %s\n", msg);
|
||||
|
||||
/* Compile the fragment shader */
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
p = fragment_shader_gles;
|
||||
else
|
||||
p = fragment_shader_gl;
|
||||
f = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
glShaderSource(f, 1, &p, NULL);
|
||||
glCompileShader(f);
|
||||
glGetShaderInfoLog(f, sizeof msg, NULL, msg);
|
||||
g_print ("fragment shader info: %s\n", msg);
|
||||
|
||||
/* Create and link the shader program */
|
||||
program = glCreateProgram();
|
||||
glAttachShader(program, v);
|
||||
glAttachShader(program, f);
|
||||
glBindAttribLocation(program, 0, "position");
|
||||
glBindAttribLocation(program, 1, "normal");
|
||||
|
||||
glLinkProgram(program);
|
||||
glGetProgramInfoLog(program, sizeof msg, NULL, msg);
|
||||
g_print ("program info: %s\n", msg);
|
||||
glDeleteShader (v);
|
||||
glDeleteShader (f);
|
||||
|
||||
/* Enable the shaders */
|
||||
glUseProgram(program);
|
||||
priv->program = program;
|
||||
|
||||
/* Get the locations of the uniforms so we can access them */
|
||||
priv->ModelViewProjectionMatrix_location = glGetUniformLocation(program, "ModelViewProjectionMatrix");
|
||||
priv->NormalMatrix_location = glGetUniformLocation(program, "NormalMatrix");
|
||||
priv->LightSourcePosition_location = glGetUniformLocation(program, "LightSourcePosition");
|
||||
priv->MaterialColor_location = glGetUniformLocation(program, "MaterialColor");
|
||||
|
||||
/* Set the LightSourcePosition uniform which is constant throught the program */
|
||||
glUniform4fv(priv->LightSourcePosition_location, 1, priv->LightSourcePosition);
|
||||
|
||||
/* make the gears */
|
||||
priv->gear1 = create_gear(1.0, 4.0, 1.0, 20, 0.7);
|
||||
|
||||
/* Store the vertices in a vertex buffer object (VBO) */
|
||||
glGenBuffers (1, &(priv->gear_vbo[0]));
|
||||
glBindBuffer (GL_ARRAY_BUFFER, priv->gear_vbo[0]);
|
||||
glBufferData (GL_ARRAY_BUFFER,
|
||||
priv->gear1->nvertices * sizeof(GearVertex),
|
||||
priv->gear1->vertices,
|
||||
GL_STATIC_DRAW);
|
||||
|
||||
priv->gear2 = create_gear(0.5, 2.0, 2.0, 10, 0.7);
|
||||
glGenBuffers (1, &(priv->gear_vbo[1]));
|
||||
glBindBuffer (GL_ARRAY_BUFFER, priv->gear_vbo[1]);
|
||||
glBufferData (GL_ARRAY_BUFFER,
|
||||
priv->gear2->nvertices * sizeof(GearVertex),
|
||||
priv->gear2->vertices,
|
||||
GL_STATIC_DRAW);
|
||||
|
||||
priv->gear3 = create_gear(1.3, 2.0, 0.5, 10, 0.7);
|
||||
glGenBuffers (1, &(priv->gear_vbo[2]));
|
||||
glBindBuffer (GL_ARRAY_BUFFER, priv->gear_vbo[2]);
|
||||
glBufferData (GL_ARRAY_BUFFER,
|
||||
priv->gear3->nvertices * sizeof(GearVertex),
|
||||
priv->gear3->vertices,
|
||||
GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_gears_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkGLArea *glarea = GTK_GL_AREA (widget);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private ((GtkGears *) widget);
|
||||
|
||||
gtk_gl_area_make_current (glarea);
|
||||
if (gtk_gl_area_get_error (glarea) != NULL)
|
||||
return;
|
||||
|
||||
/* Release the resources associated with OpenGL */
|
||||
if (priv->gear_vbo[0] != 0)
|
||||
glDeleteBuffers (1, &(priv->gear_vbo[0]));
|
||||
|
||||
if (priv->gear_vbo[1] != 0)
|
||||
glDeleteBuffers (1, &(priv->gear_vbo[1]));
|
||||
|
||||
if (priv->gear_vbo[2] != 0)
|
||||
glDeleteBuffers (1, &(priv->gear_vbo[2]));
|
||||
|
||||
if (priv->vao != 0)
|
||||
glDeleteVertexArrays (1, &priv->vao);
|
||||
|
||||
if (priv->program != 0)
|
||||
glDeleteProgram (priv->program);
|
||||
|
||||
priv->ModelViewProjectionMatrix_location = 0;
|
||||
priv->NormalMatrix_location = 0;
|
||||
priv->LightSourcePosition_location = 0;
|
||||
priv->MaterialColor_location = 0;
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_gears_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_gears_tick (GtkWidget *widget,
|
||||
GdkFrameClock *frame_clock,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkGears *gears = GTK_GEARS (widget);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
GdkFrameTimings *timings, *previous_timings;
|
||||
gint64 previous_frame_time = 0;
|
||||
gint64 frame_time;
|
||||
gint64 history_start, history_len;
|
||||
gint64 frame;
|
||||
char *s;
|
||||
|
||||
frame = gdk_frame_clock_get_frame_counter (frame_clock);
|
||||
frame_time = gdk_frame_clock_get_frame_time (frame_clock);
|
||||
|
||||
if (priv->first_frame_time == 0)
|
||||
{
|
||||
/* No need for changes on first frame */
|
||||
priv->first_frame_time = frame_time;
|
||||
if (priv->fps_label)
|
||||
gtk_label_set_label (priv->fps_label, "FPS: ---");
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
/* glxgears advances 70 degrees per second, so do the same */
|
||||
|
||||
priv->angle = fmod ((frame_time - priv->first_frame_time) / (double)G_USEC_PER_SEC * 70.0, 360.0);
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
history_start = gdk_frame_clock_get_history_start (frame_clock);
|
||||
|
||||
if (priv->fps_label && frame % 60 == 0)
|
||||
{
|
||||
history_len = frame - history_start;
|
||||
if (history_len > 0)
|
||||
{
|
||||
previous_timings = gdk_frame_clock_get_timings (frame_clock, frame - history_len);
|
||||
previous_frame_time = gdk_frame_timings_get_frame_time (previous_timings);
|
||||
|
||||
s = g_strdup_printf ("FPS: %-4.1f", (G_USEC_PER_SEC * history_len) / (double)(frame_time - previous_frame_time));
|
||||
gtk_label_set_label (priv->fps_label, s);
|
||||
g_free (s);
|
||||
}
|
||||
}
|
||||
|
||||
timings = gdk_frame_clock_get_current_timings (frame_clock);
|
||||
previous_timings = gdk_frame_clock_get_timings (frame_clock,
|
||||
gdk_frame_timings_get_frame_counter (timings) - 1);
|
||||
if (previous_timings != NULL)
|
||||
previous_frame_time = gdk_frame_timings_get_frame_time (previous_timings);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_gears_set_axis (GtkGears *gears, int axis, double value)
|
||||
{
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
|
||||
if (axis < 0 || axis >= GTK_GEARS_N_AXIS)
|
||||
return;
|
||||
|
||||
priv->view_rot[axis] = value;
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (gears));
|
||||
}
|
||||
|
||||
double
|
||||
gtk_gears_get_axis (GtkGears *gears, int axis)
|
||||
{
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
|
||||
if (axis < 0 || axis >= GTK_GEARS_N_AXIS)
|
||||
return 0.0;
|
||||
|
||||
return priv->view_rot[axis];
|
||||
}
|
||||
|
||||
void
|
||||
gtk_gears_set_fps_label (GtkGears *gears, GtkLabel *label)
|
||||
{
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
|
||||
if (label)
|
||||
g_object_ref (label);
|
||||
|
||||
g_clear_object (&priv->fps_label);
|
||||
|
||||
priv->fps_label = label;
|
||||
}
|
48
demos/gtk-demo/gtkgears.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef __GTK_GEARS_H__
|
||||
#define __GTK_GEARS_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
enum {
|
||||
GTK_GEARS_X_AXIS,
|
||||
GTK_GEARS_Y_AXIS,
|
||||
GTK_GEARS_Z_AXIS,
|
||||
|
||||
GTK_GEARS_N_AXIS
|
||||
};
|
||||
|
||||
#define GTK_TYPE_GEARS (gtk_gears_get_type ())
|
||||
#define GTK_GEARS(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
GTK_TYPE_GEARS, \
|
||||
GtkGears))
|
||||
#define GTK_IS_GEARS(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
|
||||
GTK_TYPE_GEARS))
|
||||
|
||||
typedef struct _GtkGears GtkGears;
|
||||
typedef struct _GtkGearsClass GtkGearsClass;
|
||||
|
||||
struct _GtkGears {
|
||||
GtkGLArea parent;
|
||||
};
|
||||
|
||||
struct _GtkGearsClass {
|
||||
GtkGLAreaClass parent_class;
|
||||
};
|
||||
|
||||
GType gtk_gears_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget *gtk_gears_new (void);
|
||||
void gtk_gears_set_axis (GtkGears *gears,
|
||||
int axis,
|
||||
double value);
|
||||
double gtk_gears_get_axis (GtkGears *gears,
|
||||
int axis);
|
||||
void gtk_gears_set_fps_label (GtkGears *gears,
|
||||
GtkLabel *label);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_GEARS_H__ */
|
@@ -30,13 +30,13 @@ do_headerbar (GtkWidget *do_widget)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header), TRUE);
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (header), "Welcome to Facebook - Log in, sign up or learn more");
|
||||
gtk_header_bar_set_has_subtitle (GTK_HEADER_BAR (header), FALSE);
|
||||
|
||||
button = gtk_button_new ();
|
||||
icon = g_themed_icon_new ("mail-send-receive-symbolic");
|
||||
image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_BUTTON);
|
||||
image = gtk_image_new_from_gicon (icon);
|
||||
g_object_unref (icon);
|
||||
gtk_container_add (GTK_CONTAINER (button), image);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
@@ -44,10 +44,10 @@ do_headerbar (GtkWidget *do_widget)
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (box), "linked");
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-start-symbolic"));
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-end-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-end-symbolic"));
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), box);
|
||||
|
@@ -131,11 +131,15 @@ key_press_event (GtkWidget *text_view,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
gint x,
|
||||
gint y);
|
||||
|
||||
/* Links can also be activated by clicking or tapping.
|
||||
*/
|
||||
static gboolean
|
||||
event_after (GtkWidget *text_view,
|
||||
GdkEvent *ev)
|
||||
event_cb (GtkWidget *text_view,
|
||||
GdkEvent *ev)
|
||||
{
|
||||
GtkTextIter start, end, iter;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -145,6 +149,11 @@ event_after (GtkWidget *text_view,
|
||||
|
||||
type = gdk_event_get_event_type (ev);
|
||||
|
||||
gdk_event_get_coords (ev, &ex, &ey);
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
ex, ey, &x, &y);
|
||||
|
||||
if (type == GDK_BUTTON_RELEASE)
|
||||
{
|
||||
guint button;
|
||||
@@ -153,14 +162,17 @@ event_after (GtkWidget *text_view,
|
||||
if (button != GDK_BUTTON_PRIMARY)
|
||||
return FALSE;
|
||||
}
|
||||
else if (type == GDK_MOTION_NOTIFY)
|
||||
{
|
||||
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
|
||||
return FALSE;
|
||||
}
|
||||
else if (type == GDK_TOUCH_END)
|
||||
{
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
gdk_event_get_coords (ev, &ex, &ey);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
|
||||
|
||||
/* we shouldn't follow a link if the user has selected something */
|
||||
@@ -168,10 +180,6 @@ event_after (GtkWidget *text_view,
|
||||
if (gtk_text_iter_get_offset (&start) != gtk_text_iter_get_offset (&end))
|
||||
return FALSE;
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
ex, ey, &x, &y);
|
||||
|
||||
if (gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (text_view), &iter, x, y))
|
||||
follow_if_link (text_view, &iter);
|
||||
|
||||
@@ -223,25 +231,6 @@ set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
g_slist_free (tags);
|
||||
}
|
||||
|
||||
/* Update the cursor image if the pointer moved.
|
||||
*/
|
||||
static gboolean
|
||||
motion_notify_event (GtkWidget *text_view,
|
||||
GdkEventMotion *event)
|
||||
{
|
||||
gdouble ex, ey;
|
||||
gint x, y;
|
||||
|
||||
gdk_event_get_coords ((GdkEvent *)event, &ex, &ey);
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
ex, ey, &x, &y);
|
||||
|
||||
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_hypertext (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -268,10 +257,8 @@ do_hypertext (GtkWidget *do_widget)
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 20);
|
||||
g_signal_connect (view, "key-press-event",
|
||||
G_CALLBACK (key_press_event), NULL);
|
||||
g_signal_connect (view, "event-after",
|
||||
G_CALLBACK (event_after), NULL);
|
||||
g_signal_connect (view, "motion-notify-event",
|
||||
G_CALLBACK (motion_notify_event), NULL);
|
||||
g_signal_connect (view, "event",
|
||||
G_CALLBACK (event_cb), NULL);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
|
||||
|
@@ -353,7 +353,8 @@ do_images (GtkWidget *do_widget)
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("gtk3-demo", GTK_ICON_SIZE_DIALOG);
|
||||
image = gtk_image_new_from_icon_name ("gtk3-demo");
|
||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), image);
|
||||
|
||||
@@ -389,7 +390,8 @@ do_images (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
||||
|
||||
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
|
||||
image = gtk_image_new_from_gicon (gicon, GTK_ICON_SIZE_DIALOG);
|
||||
image = gtk_image_new_from_gicon (gicon);
|
||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), image);
|
||||
|
||||
|
232
demos/gtk-demo/language-names.c
Normal file
@@ -0,0 +1,232 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <locale.h>
|
||||
#include <langinfo.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <hb-ot.h>
|
||||
|
||||
#include "language-names.h"
|
||||
|
||||
#define ISO_CODES_DATADIR ISO_CODES_PREFIX "/share/xml/iso-codes"
|
||||
#define ISO_CODES_LOCALESDIR ISO_CODES_PREFIX "/share/locale"
|
||||
|
||||
static GHashTable *language_map;
|
||||
|
||||
static char *
|
||||
get_first_item_in_semicolon_list (const char *list)
|
||||
{
|
||||
char **items;
|
||||
char *item;
|
||||
|
||||
items = g_strsplit (list, "; ", 2);
|
||||
|
||||
item = g_strdup (items[0]);
|
||||
g_strfreev (items);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
static char *
|
||||
capitalize_utf8_string (const char *str)
|
||||
{
|
||||
char first[8] = { 0 };
|
||||
|
||||
if (!str)
|
||||
return NULL;
|
||||
|
||||
g_unichar_to_utf8 (g_unichar_totitle (g_utf8_get_char (str)), first);
|
||||
|
||||
return g_strconcat (first, g_utf8_offset_to_pointer (str, 1), NULL);
|
||||
}
|
||||
|
||||
static char *
|
||||
get_display_name (const char *language)
|
||||
{
|
||||
const char *translated;
|
||||
char *tmp;
|
||||
char *name;
|
||||
|
||||
translated = dgettext ("iso_639", language);
|
||||
|
||||
tmp = get_first_item_in_semicolon_list (translated);
|
||||
name = capitalize_utf8_string (tmp);
|
||||
g_free (tmp);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
static void
|
||||
languages_parse_start_tag (GMarkupParseContext *ctx,
|
||||
const char *element_name,
|
||||
const char **attr_names,
|
||||
const char **attr_values,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
const char *ccode_longB;
|
||||
const char *ccode_longT;
|
||||
const char *ccode;
|
||||
const char *ccode_id;
|
||||
const char *lang_name;
|
||||
char *display_name;
|
||||
|
||||
if (!(g_str_equal (element_name, "iso_639_entry") ||
|
||||
g_str_equal (element_name, "iso_639_3_entry")) ||
|
||||
attr_names == NULL ||
|
||||
attr_values == NULL)
|
||||
return;
|
||||
|
||||
ccode = NULL;
|
||||
ccode_longB = NULL;
|
||||
ccode_longT = NULL;
|
||||
ccode_id = NULL;
|
||||
lang_name = NULL;
|
||||
|
||||
while (*attr_names && *attr_values)
|
||||
{
|
||||
if (g_str_equal (*attr_names, "iso_639_1_code"))
|
||||
{
|
||||
if (**attr_values)
|
||||
{
|
||||
if (strlen (*attr_values) != 2)
|
||||
return;
|
||||
ccode = *attr_values;
|
||||
}
|
||||
}
|
||||
else if (g_str_equal (*attr_names, "iso_639_2B_code"))
|
||||
{
|
||||
if (**attr_values)
|
||||
{
|
||||
if (strlen (*attr_values) != 3)
|
||||
return;
|
||||
ccode_longB = *attr_values;
|
||||
}
|
||||
}
|
||||
else if (g_str_equal (*attr_names, "iso_639_2T_code"))
|
||||
{
|
||||
if (**attr_values)
|
||||
{
|
||||
if (strlen (*attr_values) != 3)
|
||||
return;
|
||||
ccode_longT = *attr_values;
|
||||
}
|
||||
}
|
||||
else if (g_str_equal (*attr_names, "id"))
|
||||
{
|
||||
if (**attr_values)
|
||||
{
|
||||
if (strlen (*attr_values) != 2 &&
|
||||
strlen (*attr_values) != 3)
|
||||
return;
|
||||
ccode_id = *attr_values;
|
||||
}
|
||||
}
|
||||
else if (g_str_equal (*attr_names, "name"))
|
||||
{
|
||||
lang_name = *attr_values;
|
||||
}
|
||||
|
||||
++attr_names;
|
||||
++attr_values;
|
||||
}
|
||||
|
||||
if (lang_name == NULL)
|
||||
return;
|
||||
|
||||
display_name = get_display_name (lang_name);
|
||||
|
||||
if (ccode != NULL)
|
||||
g_hash_table_insert (language_map,
|
||||
pango_language_from_string (ccode),
|
||||
g_strdup (display_name));
|
||||
|
||||
if (ccode_longB != NULL)
|
||||
g_hash_table_insert (language_map,
|
||||
pango_language_from_string (ccode_longB),
|
||||
g_strdup (display_name));
|
||||
|
||||
if (ccode_longT != NULL)
|
||||
g_hash_table_insert (language_map,
|
||||
pango_language_from_string (ccode_longT),
|
||||
g_strdup (display_name));
|
||||
|
||||
if (ccode_id != NULL)
|
||||
g_hash_table_insert (language_map,
|
||||
pango_language_from_string (ccode_id),
|
||||
g_strdup (display_name));
|
||||
|
||||
g_free (display_name);
|
||||
}
|
||||
|
||||
static void
|
||||
languages_variant_init (const char *variant)
|
||||
{
|
||||
gboolean res;
|
||||
gsize buf_len;
|
||||
g_autofree char *buf = NULL;
|
||||
g_autofree char *filename = NULL;
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
bindtextdomain (variant, ISO_CODES_LOCALESDIR);
|
||||
bind_textdomain_codeset (variant, "UTF-8");
|
||||
|
||||
error = NULL;
|
||||
filename = g_strconcat (ISO_CODES_DATADIR, "/", variant, ".xml", NULL);
|
||||
res = g_file_get_contents (filename, &buf, &buf_len, &error);
|
||||
if (res)
|
||||
{
|
||||
g_autoptr (GMarkupParseContext) ctx = NULL;
|
||||
GMarkupParser parser = { languages_parse_start_tag, NULL, NULL, NULL, NULL };
|
||||
|
||||
ctx = g_markup_parse_context_new (&parser, 0, NULL, NULL);
|
||||
|
||||
error = NULL;
|
||||
res = g_markup_parse_context_parse (ctx, buf, buf_len, &error);
|
||||
|
||||
if (!res)
|
||||
g_warning ("Failed to parse '%s': %s\n", filename, error->message);
|
||||
}
|
||||
else
|
||||
g_warning ("Failed to load '%s': %s\n", filename, error->message);
|
||||
}
|
||||
|
||||
static void
|
||||
languages_init (void)
|
||||
{
|
||||
if (language_map)
|
||||
return;
|
||||
|
||||
language_map = g_hash_table_new_full (NULL, NULL, NULL, g_free);
|
||||
languages_variant_init ("iso_639");
|
||||
languages_variant_init ("iso_639_3");
|
||||
}
|
||||
|
||||
const char *
|
||||
get_language_name (PangoLanguage *language)
|
||||
{
|
||||
languages_init ();
|
||||
|
||||
return (const char *) g_hash_table_lookup (language_map, language);
|
||||
}
|
||||
|
||||
const char *
|
||||
get_language_name_for_tag (guint32 tag)
|
||||
{
|
||||
hb_language_t lang;
|
||||
const char *s;
|
||||
|
||||
lang = hb_ot_tag_to_language (tag);
|
||||
s = hb_language_to_string (lang);
|
||||
|
||||
return get_language_name (pango_language_from_string (s));
|
||||
}
|
13
demos/gtk-demo/language-names.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef LANGUAGE_NAMES_H
|
||||
#define LANGUAGE_NAMES_H
|
||||
|
||||
#include <pango/pango.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
const char * get_language_name (PangoLanguage *language);
|
||||
const char * get_language_name_for_tag (guint32 tag);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
@@ -296,8 +296,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
|
||||
/* finish & show */
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (window_closed), NULL);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (window_closed), NULL);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -197,7 +197,10 @@ gtk_message_row_update (GtkMessageRow *row)
|
||||
gtk_button_set_label (GTK_BUTTON (priv->resent_by_button), priv->message->resent_by);
|
||||
|
||||
if (strcmp (priv->message->sender_nick, "@GTKtoolkit") == 0)
|
||||
gtk_image_set_from_icon_name (priv->avatar_image, "gtk3-demo", GTK_ICON_SIZE_DND);
|
||||
{
|
||||
gtk_image_set_from_icon_name (priv->avatar_image, "gtk3-demo");
|
||||
gtk_image_set_icon_size (priv->avatar_image, GTK_ICON_SIZE_LARGE);
|
||||
}
|
||||
else
|
||||
gtk_image_set_from_pixbuf (priv->avatar_image, avatar_pixbuf_other);
|
||||
|
||||
|
@@ -3,61 +3,53 @@
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<!-- interface-requires gtkdemo 3.10 -->
|
||||
<object class="GtkMenu" id="menu1">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem1">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Email message</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem2">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Embed message</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<template class="GtkMessageRow" parent="GtkListBoxRow">
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="avatar_image">
|
||||
<property name="width_request">32</property>
|
||||
<property name="height_request">32</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="width-request">32</property>
|
||||
<property name="height-request">32</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_top">8</property>
|
||||
<property name="margin_bottom">8</property>
|
||||
<property name="margin_start">8</property>
|
||||
<property name="margin_end">8</property>
|
||||
<property name="margin-top">8</property>
|
||||
<property name="margin-bottom">8</property>
|
||||
<property name="margin-start">8</property>
|
||||
<property name="margin-end">8</property>
|
||||
<property name="icon-name">image-missing</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<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">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<property name="baseline-position">top</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="source_name">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label" translatable="0">Username</property>
|
||||
<attributes>
|
||||
@@ -69,7 +61,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="source_nick">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label" translatable="0">@nick</property>
|
||||
<style>
|
||||
@@ -82,7 +73,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="short_time_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label" translatable="yes">38m</property>
|
||||
<style>
|
||||
@@ -90,19 +80,18 @@
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="pack-type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="content_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="xalign">0</property>
|
||||
@@ -111,21 +100,19 @@
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="resent_box">
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon_name">media-playlist-repeat</property>
|
||||
<property name="icon-name">media-playlist-repeat</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Resent by</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -135,9 +122,8 @@
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="resent_by_button">
|
||||
<property name="label" translatable="0">reshareer</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="uri">http://www.gtk.org</property>
|
||||
</object>
|
||||
@@ -147,20 +133,18 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">1</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="expand_button">
|
||||
<property name="label" translatable="yes">Expand</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="expand_clicked" swapped="yes"/>
|
||||
</object>
|
||||
@@ -171,18 +155,16 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="reply-button">
|
||||
<property name="label" translatable="yes">Reply</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="reshare-button">
|
||||
<property name="label" translatable="yes">Reshare</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="reshare_clicked" swapped="yes"/>
|
||||
</object>
|
||||
@@ -193,9 +175,8 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="favorite-buttton">
|
||||
<property name="label" translatable="yes">Favorite</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="favorite_clicked" swapped="yes"/>
|
||||
</object>
|
||||
@@ -205,14 +186,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="more-button">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="popup">menu1</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">More...</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -228,53 +207,44 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="details_revealer">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box5">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box7">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="margin-top">2</property>
|
||||
<property name="margin-bottom">2</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="n_reshares_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="0"><b>2</b>
|
||||
Reshares</property>
|
||||
<property name="use_markup">1</property>
|
||||
<property name="use-markup">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
</child>
|
||||
<child type="label_item"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame2">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="n_favorites_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="0"><b>2</b>
|
||||
FAVORITES</property>
|
||||
<property name="use_markup">1</property>
|
||||
<property name="use-markup">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
</child>
|
||||
<child type="label_item"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
@@ -287,10 +257,8 @@ FAVORITES</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box6">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="detailed_time_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="0">4:25 AM - 14 Jun 13 </property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
@@ -300,9 +268,8 @@ FAVORITES</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="label" translatable="yes">Details</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
@@ -321,8 +288,8 @@ FAVORITES</property>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -256,7 +256,7 @@ static gchar *types[] =
|
||||
"GtkTreeIter ",
|
||||
"GtkTreeViewColumn ",
|
||||
"GdkDisplayManager ",
|
||||
"GtkClipboard ",
|
||||
"GdkClipboard ",
|
||||
"GtkIconSize ",
|
||||
"GtkImage ",
|
||||
"GdkDragContext ",
|
||||
|
@@ -19,24 +19,20 @@
|
||||
<property name="default-width">800</property>
|
||||
<property name="default-height">600</property>
|
||||
<property name="title">GTK+ Demo</property>
|
||||
<signal name="delete-event" handler="gtk_false" swapped="no"/>
|
||||
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="headerbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="show-close-button">1</property>
|
||||
<property name="show-title-buttons">1</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="action_name">win.run</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="action-name">win.run</property>
|
||||
<style>
|
||||
<class name="text-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Run</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -46,23 +42,19 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="width_request">120</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="min_content_width">150</property>
|
||||
<property name="width-request">120</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-width">150</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="model">treestore</property>
|
||||
<property name="headers_visible">0</property>
|
||||
<property name="headers-visible">0</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection">
|
||||
<property name="mode">browse</property>
|
||||
@@ -92,77 +84,70 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="scrollable">1</property>
|
||||
<property name="enable_popup">1</property>
|
||||
<property name="show_border">0</property>
|
||||
<property name="enable-popup">1</property>
|
||||
<property name="show-border">0</property>
|
||||
<property name="expand">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="info-textview">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
<property name="bottom-margin">20</property>
|
||||
<property name="pixels_above_lines">2</property>
|
||||
<property name="pixels_below_lines">2</property>
|
||||
<property name="pixels-above-lines">2</property>
|
||||
<property name="pixels-below-lines">2</property>
|
||||
<property name="editable">0</property>
|
||||
<property name="wrap_mode">word</property>
|
||||
<property name="cursor_visible">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_expand">1</property>
|
||||
<property name="tab-expand">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Info</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_expand">1</property>
|
||||
<property name="tab_fill">0</property>
|
||||
<property name="tab-expand">1</property>
|
||||
<property name="tab-fill">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="source-scrolledwindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="source-textview">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
<property name="bottom-margin">20</property>
|
||||
<property name="editable">0</property>
|
||||
<property name="cursor_visible">0</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_expand">1</property>
|
||||
<property name="tab-expand">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Source</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">0</property>
|
||||
<property name="tab-fill">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -68,7 +68,7 @@ do_markup (GtkWidget *do_widget)
|
||||
g_signal_connect (show_source, "toggled", G_CALLBACK (source_toggled), stack);
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header), TRUE);
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), show_source);
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
|
||||
|
@@ -18,6 +18,7 @@ demos = files([
|
||||
'cursors.c',
|
||||
'dialog.c',
|
||||
'drawingarea.c',
|
||||
'dnd.c',
|
||||
'editable_cells.c',
|
||||
'entry_buffer.c',
|
||||
'entry_completion.c',
|
||||
@@ -93,7 +94,9 @@ gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
||||
source_dir: '.')
|
||||
|
||||
executable('gtk4-demo',
|
||||
'main.c', 'gtkfishbowl.c', demos, demos_h, gtkdemo_resources,
|
||||
'main.c', 'gtkfishbowl.c', 'fontplane.c', 'script-names.c', 'language-names.c',
|
||||
'gtkgears.c',
|
||||
demos, demos_h, gtkdemo_resources,
|
||||
c_args: gtkdemo_args,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
|
@@ -4,23 +4,19 @@
|
||||
<object class="GtkWindow" id="window1">
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">1</property>
|
||||
<property name="show-close-button">1</property>
|
||||
<property name="show-title-buttons">1</property>
|
||||
<property name="title" translatable="yes">Model Button</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">80</property>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="popover">thing_a</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Color</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
@@ -29,11 +25,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="popover">thing_b</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Flavors</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
@@ -42,11 +36,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="popover">thing_c</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Tools</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
@@ -59,32 +51,25 @@
|
||||
<object class="GtkPopover" id="thing_a">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'red'</property>
|
||||
<property name="text">Red</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'green'</property>
|
||||
<property name="text">Green</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'blue'</property>
|
||||
<property name="text">Blue</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
@@ -95,32 +80,27 @@
|
||||
<object class="GtkPopover" id="thing_b">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.chocolate</property>
|
||||
<property name="text">Chocolate</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.vanilla</property>
|
||||
<property name="text">Vanilla</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.sprinkles</property>
|
||||
<property name="text">Add Sprinkles</property>
|
||||
</object>
|
||||
@@ -131,13 +111,11 @@
|
||||
<object class="GtkPopover" id="thing_c">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="text">Hammer</property>
|
||||
<property name="role">check</property>
|
||||
<signal name="clicked" handler="tool_clicked"/>
|
||||
@@ -145,7 +123,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="text">Screwdriver</property>
|
||||
<property name="role">check</property>
|
||||
<signal name="clicked" handler="tool_clicked"/>
|
||||
@@ -153,7 +130,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="text">Drill</property>
|
||||
<property name="role">check</property>
|
||||
<signal name="clicked" handler="tool_clicked"/>
|
||||
|
@@ -43,32 +43,28 @@
|
||||
<object class="GtkWindow" id="window">
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="primary_icon_name">edit-find</property>
|
||||
<property name="secondary_icon_name">edit-clear</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="primary-icon-name">edit-find</property>
|
||||
<property name="secondary-icon-name">edit-clear</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="max-content-height">100</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="headers_visible">0</property>
|
||||
<property name="enable_search">0</property>
|
||||
<property name="search_column">2</property>
|
||||
<property name="headers-visible">0</property>
|
||||
<property name="enable-search">0</property>
|
||||
<property name="search-column">2</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
|
@@ -2,24 +2,21 @@
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="default_width">300</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="default-width">300</property>
|
||||
<property name="default-height">300</property>
|
||||
<property name="title">Revealer</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer0">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -30,14 +27,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer1">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-up</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -48,14 +43,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer2">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -66,13 +59,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer3">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -83,14 +74,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer4">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-left</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -101,14 +90,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer5">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-up</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -119,14 +106,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer6">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -137,13 +122,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer7">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -154,14 +137,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer8">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-left</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
<property name="icon-size">large</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -23,52 +23,47 @@
|
||||
<property name="title" translatable="yes">Scales</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">1</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="margin">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Plain</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="width-request">200</property>
|
||||
<property name="draw_value">0</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Marks</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="width-request">200</property>
|
||||
<property name="draw_value">0</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
<property name="hexpand">1</property>
|
||||
<marks>
|
||||
@@ -80,28 +75,26 @@
|
||||
</marks>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Discrete</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="width-request">200</property>
|
||||
<property name="round-digits">0</property>
|
||||
<property name="draw_value">0</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment3</property>
|
||||
<property name="hexpand">1</property>
|
||||
<marks>
|
||||
@@ -113,8 +106,8 @@
|
||||
</marks>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
184
demos/gtk-demo/script-names.c
Normal file
@@ -0,0 +1,184 @@
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <hb-ot.h>
|
||||
|
||||
#include "script-names.h"
|
||||
|
||||
static struct {
|
||||
GUnicodeScript script;
|
||||
hb_script_t hb_script;
|
||||
const char *name;
|
||||
} scripts[] =
|
||||
{
|
||||
{ G_UNICODE_SCRIPT_COMMON, HB_SCRIPT_COMMON, NULL },
|
||||
{ G_UNICODE_SCRIPT_INHERITED, HB_SCRIPT_INHERITED, NULL },
|
||||
{ G_UNICODE_SCRIPT_ARABIC, HB_SCRIPT_ARABIC, NC_("Script", "Arabic") },
|
||||
{ G_UNICODE_SCRIPT_ARMENIAN, HB_SCRIPT_ARMENIAN, NC_("Script", "Armenian") },
|
||||
{ G_UNICODE_SCRIPT_BENGALI, HB_SCRIPT_BENGALI, NC_("Script", "Bengali") },
|
||||
{ G_UNICODE_SCRIPT_BOPOMOFO, HB_SCRIPT_BOPOMOFO, NC_("Script", "Bopomofo") },
|
||||
{ G_UNICODE_SCRIPT_CHEROKEE, HB_SCRIPT_CHEROKEE, NC_("Script", "Cherokee") },
|
||||
{ G_UNICODE_SCRIPT_COPTIC, HB_SCRIPT_COPTIC, NC_("Script", "Coptic") },
|
||||
{ G_UNICODE_SCRIPT_CYRILLIC, HB_SCRIPT_CYRILLIC, NC_("Script", "Cyrillic") },
|
||||
{ G_UNICODE_SCRIPT_DESERET, HB_SCRIPT_DESERET, NC_("Script", "Deseret") },
|
||||
{ G_UNICODE_SCRIPT_DEVANAGARI, HB_SCRIPT_DEVANAGARI, NC_("Script", "Devanagari") },
|
||||
{ G_UNICODE_SCRIPT_ETHIOPIC, HB_SCRIPT_ETHIOPIC, NC_("Script", "Ethiopic") },
|
||||
{ G_UNICODE_SCRIPT_GEORGIAN, HB_SCRIPT_GEORGIAN, NC_("Script", "Georgian") },
|
||||
{ G_UNICODE_SCRIPT_GOTHIC, HB_SCRIPT_GOTHIC, NC_("Script", "Gothic") },
|
||||
{ G_UNICODE_SCRIPT_GREEK, HB_SCRIPT_GREEK, NC_("Script", "Greek") },
|
||||
{ G_UNICODE_SCRIPT_GUJARATI, HB_SCRIPT_GUJARATI, NC_("Script", "Gujarati") },
|
||||
{ G_UNICODE_SCRIPT_GURMUKHI, HB_SCRIPT_GURMUKHI, NC_("Script", "Gurmukhi") },
|
||||
{ G_UNICODE_SCRIPT_HAN, HB_SCRIPT_HAN, NC_("Script", "Han") },
|
||||
{ G_UNICODE_SCRIPT_HANGUL, HB_SCRIPT_HANGUL, NC_("Script", "Hangul") },
|
||||
{ G_UNICODE_SCRIPT_HEBREW, HB_SCRIPT_HEBREW, NC_("Script", "Hebrew") },
|
||||
{ G_UNICODE_SCRIPT_HIRAGANA, HB_SCRIPT_HIRAGANA, NC_("Script", "Hiragana") },
|
||||
{ G_UNICODE_SCRIPT_KANNADA, HB_SCRIPT_KANNADA, NC_("Script", "Kannada") },
|
||||
{ G_UNICODE_SCRIPT_KATAKANA, HB_SCRIPT_KATAKANA, NC_("Script", "Katakana") },
|
||||
{ G_UNICODE_SCRIPT_KHMER, HB_SCRIPT_KHMER, NC_("Script", "Khmer") },
|
||||
{ G_UNICODE_SCRIPT_LAO, HB_SCRIPT_LAO, NC_("Script", "Lao") },
|
||||
{ G_UNICODE_SCRIPT_LATIN, HB_SCRIPT_LATIN, NC_("Script", "Latin") },
|
||||
{ G_UNICODE_SCRIPT_MALAYALAM, HB_SCRIPT_MALAYALAM, NC_("Script", "Malayalam") },
|
||||
{ G_UNICODE_SCRIPT_MONGOLIAN, HB_SCRIPT_MONGOLIAN, NC_("Script", "Mongolian") },
|
||||
{ G_UNICODE_SCRIPT_MYANMAR, HB_SCRIPT_MYANMAR, NC_("Script", "Myanmar") },
|
||||
{ G_UNICODE_SCRIPT_OGHAM, HB_SCRIPT_OGHAM, NC_("Script", "Ogham") },
|
||||
{ G_UNICODE_SCRIPT_OLD_ITALIC, HB_SCRIPT_OLD_ITALIC, NC_("Script", "Old Italic") },
|
||||
{ G_UNICODE_SCRIPT_ORIYA, HB_SCRIPT_ORIYA, NC_("Script", "Oriya") },
|
||||
{ G_UNICODE_SCRIPT_RUNIC, HB_SCRIPT_RUNIC, NC_("Script", "Runic") },
|
||||
{ G_UNICODE_SCRIPT_SINHALA, HB_SCRIPT_SINHALA, NC_("Script", "Sinhala") },
|
||||
{ G_UNICODE_SCRIPT_SYRIAC, HB_SCRIPT_SYRIAC, NC_("Script", "Syriac") },
|
||||
{ G_UNICODE_SCRIPT_TAMIL, HB_SCRIPT_TAMIL, NC_("Script", "Tamil") },
|
||||
{ G_UNICODE_SCRIPT_TELUGU, HB_SCRIPT_TELUGU, NC_("Script", "Telugu") },
|
||||
{ G_UNICODE_SCRIPT_THAANA, HB_SCRIPT_THAANA, NC_("Script", "Thaana") },
|
||||
{ G_UNICODE_SCRIPT_THAI, HB_SCRIPT_THAI, NC_("Script", "Thai") },
|
||||
{ G_UNICODE_SCRIPT_TIBETAN, HB_SCRIPT_TIBETAN, NC_("Script", "Tibetan") },
|
||||
{ G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, HB_SCRIPT_CANADIAN_ABORIGINAL, NC_("Script", "Canadian Aboriginal") },
|
||||
{ G_UNICODE_SCRIPT_YI, HB_SCRIPT_YI, NC_("Script", "Yi") },
|
||||
{ G_UNICODE_SCRIPT_TAGALOG, HB_SCRIPT_TAGALOG, NC_("Script", "Tagalog") },
|
||||
{ G_UNICODE_SCRIPT_HANUNOO, HB_SCRIPT_HANUNOO, NC_("Script", "Hanunoo") },
|
||||
{ G_UNICODE_SCRIPT_BUHID, HB_SCRIPT_BUHID, NC_("Script", "Buhid") },
|
||||
{ G_UNICODE_SCRIPT_TAGBANWA, HB_SCRIPT_TAGBANWA, NC_("Script", "Tagbanwa") },
|
||||
{ G_UNICODE_SCRIPT_BRAILLE, HB_SCRIPT_BRAILLE, NC_("Script", "Braille") },
|
||||
{ G_UNICODE_SCRIPT_CYPRIOT, HB_SCRIPT_CYPRIOT, NC_("Script", "Cypriot") },
|
||||
{ G_UNICODE_SCRIPT_LIMBU, HB_SCRIPT_LIMBU, NC_("Script", "Limbu") },
|
||||
{ G_UNICODE_SCRIPT_OSMANYA, HB_SCRIPT_OSMANYA, NC_("Script", "Osmanya") },
|
||||
{ G_UNICODE_SCRIPT_SHAVIAN, HB_SCRIPT_SHAVIAN, NC_("Script", "Shavian") },
|
||||
{ G_UNICODE_SCRIPT_LINEAR_B, HB_SCRIPT_LINEAR_B, NC_("Script", "Linear B") },
|
||||
{ G_UNICODE_SCRIPT_TAI_LE, HB_SCRIPT_TAI_LE, NC_("Script", "Tai Le") },
|
||||
{ G_UNICODE_SCRIPT_UGARITIC, HB_SCRIPT_UGARITIC, NC_("Script", "Ugaritic") },
|
||||
{ G_UNICODE_SCRIPT_NEW_TAI_LUE, HB_SCRIPT_NEW_TAI_LUE, NC_("Script", "New Tai Lue") },
|
||||
{ G_UNICODE_SCRIPT_BUGINESE, HB_SCRIPT_BUGINESE, NC_("Script", "Buginese") },
|
||||
{ G_UNICODE_SCRIPT_GLAGOLITIC, HB_SCRIPT_GLAGOLITIC, NC_("Script", "Glagolitic") },
|
||||
{ G_UNICODE_SCRIPT_TIFINAGH, HB_SCRIPT_TIFINAGH, NC_("Script", "Tifinagh") },
|
||||
{ G_UNICODE_SCRIPT_SYLOTI_NAGRI, HB_SCRIPT_SYLOTI_NAGRI, NC_("Script", "Syloti Nagri") },
|
||||
{ G_UNICODE_SCRIPT_OLD_PERSIAN, HB_SCRIPT_OLD_PERSIAN, NC_("Script", "Old Persian") },
|
||||
{ G_UNICODE_SCRIPT_KHAROSHTHI, HB_SCRIPT_KHAROSHTHI, NC_("Script", "Kharoshthi") },
|
||||
{ G_UNICODE_SCRIPT_UNKNOWN, HB_SCRIPT_UNKNOWN, NC_("Script", "Unknown") },
|
||||
{ G_UNICODE_SCRIPT_BALINESE, HB_SCRIPT_BALINESE, NC_("Script", "Balinese") },
|
||||
{ G_UNICODE_SCRIPT_CUNEIFORM, HB_SCRIPT_CUNEIFORM, NC_("Script", "Cuneiform") },
|
||||
{ G_UNICODE_SCRIPT_PHOENICIAN, HB_SCRIPT_PHOENICIAN, NC_("Script", "Phoenician") },
|
||||
{ G_UNICODE_SCRIPT_PHAGS_PA, HB_SCRIPT_PHAGS_PA, NC_("Script", "Phags-pa") },
|
||||
{ G_UNICODE_SCRIPT_NKO, HB_SCRIPT_NKO, NC_("Script", "N'Ko") },
|
||||
{ G_UNICODE_SCRIPT_KAYAH_LI, HB_SCRIPT_KAYAH_LI, NC_("Script", "Kayah Li") },
|
||||
{ G_UNICODE_SCRIPT_LEPCHA, HB_SCRIPT_LEPCHA, NC_("Script", "Lepcha") },
|
||||
{ G_UNICODE_SCRIPT_REJANG, HB_SCRIPT_REJANG, NC_("Script", "Rejang") },
|
||||
{ G_UNICODE_SCRIPT_SUNDANESE, HB_SCRIPT_SUNDANESE, NC_("Script", "Sundanese") },
|
||||
{ G_UNICODE_SCRIPT_SAURASHTRA, HB_SCRIPT_SAURASHTRA, NC_("Script", "Saurashtra") },
|
||||
{ G_UNICODE_SCRIPT_CHAM, HB_SCRIPT_CHAM, NC_("Script", "Cham") },
|
||||
{ G_UNICODE_SCRIPT_OL_CHIKI, HB_SCRIPT_OL_CHIKI, NC_("Script", "Ol Chiki") },
|
||||
{ G_UNICODE_SCRIPT_VAI, HB_SCRIPT_VAI, NC_("Script", "Vai") },
|
||||
{ G_UNICODE_SCRIPT_CARIAN, HB_SCRIPT_CARIAN, NC_("Script", "Carian") },
|
||||
{ G_UNICODE_SCRIPT_LYCIAN, HB_SCRIPT_LYCIAN, NC_("Script", "Lycian") },
|
||||
{ G_UNICODE_SCRIPT_LYDIAN, HB_SCRIPT_LYDIAN, NC_("Script", "Lydian") },
|
||||
{ G_UNICODE_SCRIPT_AVESTAN, HB_SCRIPT_AVESTAN, NC_("Script", "Avestan") },
|
||||
{ G_UNICODE_SCRIPT_BAMUM, HB_SCRIPT_BAMUM, NC_("Script", "Bamum") },
|
||||
{ G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, NC_("Script", "Egyptian Hieroglpyhs") },
|
||||
{ G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, HB_SCRIPT_IMPERIAL_ARAMAIC, NC_("Script", "Imperial Aramaic") },
|
||||
{ G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, NC_("Script", "Inscriptional Pahlavi") },
|
||||
{ G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, NC_("Script", "Inscriptional Parthian") },
|
||||
{ G_UNICODE_SCRIPT_JAVANESE, HB_SCRIPT_JAVANESE, NC_("Script", "Javanese") },
|
||||
{ G_UNICODE_SCRIPT_KAITHI, HB_SCRIPT_KAITHI, NC_("Script", "Kaithi") },
|
||||
{ G_UNICODE_SCRIPT_LISU, HB_SCRIPT_LISU, NC_("Script", "Lisu") },
|
||||
{ G_UNICODE_SCRIPT_MEETEI_MAYEK, HB_SCRIPT_MEETEI_MAYEK, NC_("Script", "Meetei Mayek") },
|
||||
{ G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, HB_SCRIPT_OLD_SOUTH_ARABIAN, NC_("Script", "Old South Arabian") },
|
||||
{ G_UNICODE_SCRIPT_OLD_TURKIC, HB_SCRIPT_OLD_TURKIC, NC_("Script", "Old Turkic") },
|
||||
{ G_UNICODE_SCRIPT_SAMARITAN, HB_SCRIPT_SAMARITAN, NC_("Script", "Samaritan") },
|
||||
{ G_UNICODE_SCRIPT_TAI_THAM, HB_SCRIPT_TAI_THAM, NC_("Script", "Tai Tham") },
|
||||
{ G_UNICODE_SCRIPT_TAI_VIET, HB_SCRIPT_TAI_VIET, NC_("Script", "Tai Viet") },
|
||||
{ G_UNICODE_SCRIPT_BATAK, HB_SCRIPT_BATAK, NC_("Script", "Batak") },
|
||||
{ G_UNICODE_SCRIPT_BRAHMI, HB_SCRIPT_BRAHMI, NC_("Script", "Brahmi") },
|
||||
{ G_UNICODE_SCRIPT_MANDAIC, HB_SCRIPT_MANDAIC, NC_("Script", "Mandaic") },
|
||||
{ G_UNICODE_SCRIPT_CHAKMA, HB_SCRIPT_CHAKMA, NC_("Script", "Chakma") },
|
||||
{ G_UNICODE_SCRIPT_MEROITIC_CURSIVE, HB_SCRIPT_MEROITIC_CURSIVE, NC_("Script", "Meroitic Cursive") },
|
||||
{ G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, HB_SCRIPT_MEROITIC_HIEROGLYPHS, NC_("Script", "Meroitic Hieroglyphs") },
|
||||
{ G_UNICODE_SCRIPT_MIAO, HB_SCRIPT_MIAO, NC_("Script", "Miao") },
|
||||
{ G_UNICODE_SCRIPT_SHARADA, HB_SCRIPT_SHARADA, NC_("Script", "Sharada") },
|
||||
{ G_UNICODE_SCRIPT_SORA_SOMPENG, HB_SCRIPT_SORA_SOMPENG, NC_("Script", "Sora Sompeng") },
|
||||
{ G_UNICODE_SCRIPT_TAKRI, HB_SCRIPT_TAKRI, NC_("Script", "Takri") },
|
||||
{ G_UNICODE_SCRIPT_BASSA_VAH, HB_SCRIPT_BASSA_VAH, NC_("Script", "Bassa") },
|
||||
{ G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN, HB_SCRIPT_CAUCASIAN_ALBANIAN, NC_("Script", "Caucasian Albanian") },
|
||||
{ G_UNICODE_SCRIPT_DUPLOYAN, HB_SCRIPT_DUPLOYAN, NC_("Script", "Duployan") },
|
||||
{ G_UNICODE_SCRIPT_ELBASAN, HB_SCRIPT_ELBASAN, NC_("Script", "Elbasan") },
|
||||
{ G_UNICODE_SCRIPT_GRANTHA, HB_SCRIPT_GRANTHA, NC_("Script", "Grantha") },
|
||||
{ G_UNICODE_SCRIPT_KHOJKI, HB_SCRIPT_KHOJKI, NC_("Script", "Kjohki") },
|
||||
{ G_UNICODE_SCRIPT_KHUDAWADI, HB_SCRIPT_KHUDAWADI, NC_("Script", "Khudawadi, Sindhi") },
|
||||
{ G_UNICODE_SCRIPT_LINEAR_A, HB_SCRIPT_LINEAR_A, NC_("Script", "Linear A") },
|
||||
{ G_UNICODE_SCRIPT_MAHAJANI, HB_SCRIPT_MAHAJANI, NC_("Script", "Mahajani") },
|
||||
{ G_UNICODE_SCRIPT_MANICHAEAN, HB_SCRIPT_MANICHAEAN, NC_("Script", "Manichaean") },
|
||||
{ G_UNICODE_SCRIPT_MENDE_KIKAKUI, HB_SCRIPT_MENDE_KIKAKUI, NC_("Script", "Mende Kikakui") },
|
||||
{ G_UNICODE_SCRIPT_MODI, HB_SCRIPT_MODI, NC_("Script", "Modi") },
|
||||
{ G_UNICODE_SCRIPT_MRO, HB_SCRIPT_MRO, NC_("Script", "Mro") },
|
||||
{ G_UNICODE_SCRIPT_NABATAEAN, HB_SCRIPT_NABATAEAN, NC_("Script", "Nabataean") },
|
||||
{ G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN, HB_SCRIPT_OLD_NORTH_ARABIAN, NC_("Script", "Old North Arabian") },
|
||||
{ G_UNICODE_SCRIPT_OLD_PERMIC, HB_SCRIPT_OLD_PERMIC, NC_("Script", "Old Permic") },
|
||||
{ G_UNICODE_SCRIPT_PAHAWH_HMONG, HB_SCRIPT_PAHAWH_HMONG, NC_("Script", "Pahawh Hmong") },
|
||||
{ G_UNICODE_SCRIPT_PALMYRENE, HB_SCRIPT_PALMYRENE, NC_("Script", "Palmyrene") },
|
||||
{ G_UNICODE_SCRIPT_PAU_CIN_HAU, HB_SCRIPT_PAU_CIN_HAU, NC_("Script", "Pau Cin Hau") },
|
||||
{ G_UNICODE_SCRIPT_PSALTER_PAHLAVI, HB_SCRIPT_PSALTER_PAHLAVI, NC_("Script", "Psalter Pahlavi") },
|
||||
{ G_UNICODE_SCRIPT_SIDDHAM, HB_SCRIPT_SIDDHAM, NC_("Script", "Siddham") },
|
||||
{ G_UNICODE_SCRIPT_TIRHUTA, HB_SCRIPT_TIRHUTA, NC_("Script", "Tirhuta") },
|
||||
{ G_UNICODE_SCRIPT_WARANG_CITI, HB_SCRIPT_WARANG_CITI, NC_("Script", "Warang Citi") },
|
||||
{ G_UNICODE_SCRIPT_AHOM, HB_SCRIPT_AHOM, NC_("Script", "Ahom") },
|
||||
{ G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS, HB_SCRIPT_ANATOLIAN_HIEROGLYPHS, NC_("Script", "Anatolian Hieroglyphs") },
|
||||
{ G_UNICODE_SCRIPT_HATRAN, HB_SCRIPT_HATRAN, NC_("Script", "Hatran") },
|
||||
{ G_UNICODE_SCRIPT_MULTANI, HB_SCRIPT_MULTANI, NC_("Script", "Multani") },
|
||||
{ G_UNICODE_SCRIPT_OLD_HUNGARIAN, HB_SCRIPT_OLD_HUNGARIAN, NC_("Script", "Old Hungarian") },
|
||||
{ G_UNICODE_SCRIPT_SIGNWRITING, HB_SCRIPT_SIGNWRITING, NC_("Script", "Signwriting") },
|
||||
{ G_UNICODE_SCRIPT_ADLAM, HB_SCRIPT_ADLAM, NC_("Script", "Adlam") },
|
||||
{ G_UNICODE_SCRIPT_BHAIKSUKI, HB_SCRIPT_BHAIKSUKI, NC_("Script", "Bhaiksuki") },
|
||||
{ G_UNICODE_SCRIPT_MARCHEN, HB_SCRIPT_MARCHEN, NC_("Script", "Marchen") },
|
||||
{ G_UNICODE_SCRIPT_NEWA, HB_SCRIPT_NEWA, NC_("Script", "Newa") },
|
||||
{ G_UNICODE_SCRIPT_OSAGE, HB_SCRIPT_OSAGE, NC_("Script", "Osage") },
|
||||
{ G_UNICODE_SCRIPT_TANGUT, HB_SCRIPT_TANGUT, NC_("Script", "Tangut") },
|
||||
{ G_UNICODE_SCRIPT_MASARAM_GONDI, HB_SCRIPT_INVALID, NC_("Script", "Masaram Gondi") },
|
||||
{ G_UNICODE_SCRIPT_NUSHU, HB_SCRIPT_INVALID, NC_("Script", "Nushu") },
|
||||
{ G_UNICODE_SCRIPT_SOYOMBO, HB_SCRIPT_INVALID, NC_("Script", "Soyombo") },
|
||||
{ G_UNICODE_SCRIPT_ZANABAZAR_SQUARE, HB_SCRIPT_INVALID, NC_("Script", "Zanabazar Square") },
|
||||
};
|
||||
|
||||
const char *
|
||||
get_script_name (GUnicodeScript script)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (scripts); i++)
|
||||
{
|
||||
if (scripts[i].script == script)
|
||||
return g_dpgettext2 (GETTEXT_PACKAGE, "Script", scripts[i].name);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *
|
||||
get_script_name_for_tag (guint32 tag)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (scripts); i++)
|
||||
{
|
||||
if (scripts[i].hb_script == hb_script_from_iso15924_tag (tag))
|
||||
return g_dpgettext2 (GETTEXT_PACKAGE, "Script", scripts[i].name);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
13
demos/gtk-demo/script-names.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef SCRIPT_NAMES_H
|
||||
#define SCRIPT_NAMES_H
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
const char * get_script_name (GUnicodeScript script);
|
||||
const char * get_script_name_for_tag (guint32 tag);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
@@ -1,104 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
|
||||
<property name="modal">1</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="section-name">shortcuts</property>
|
||||
<property name="max-height">12</property>
|
||||
|
||||
<!-- Overview shortcuts -->
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Overview</property>
|
||||
<property name="view">overview</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">F1</property>
|
||||
<property name="title" translatable="yes">Help</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Ctrl>n</property>
|
||||
<property name="title" translatable="yes">Create a new box</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Ctrl>f</property>
|
||||
<property name="title" translatable="yes">Search</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Ctrl>k</property>
|
||||
<property name="title" translatable="yes">Keyboard shortcuts</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Ctrl>q</property>
|
||||
<property name="title" translatable="yes">Close Window/Quit Boxes</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<!-- Wizard and Properties shortcuts -->
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Box Creation and Properties</property>
|
||||
<property name="view">wizard</property>
|
||||
|
||||
<!-- LTR -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="direction">ltr</property>
|
||||
<property name="accelerator"><Alt>Right</property>
|
||||
<property name="title" translatable="yes">Switch to the next page</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="direction">ltr</property>
|
||||
<property name="accelerator"><Alt>Left</property>
|
||||
<property name="title" translatable="yes">Switch to the previous page</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<!-- RTL -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="direction">rtl</property>
|
||||
<property name="accelerator"><Alt>Left</property>
|
||||
<property name="title" translatable="yes">Switch to the next page</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="direction">rtl</property>
|
||||
<property name="accelerator"><Alt>Right</property>
|
||||
<property name="title" translatable="yes">Switch to the previous page</property>
|
||||
@@ -106,62 +81,48 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<!-- Display shortcuts -->
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Box Display</property>
|
||||
<property name="view">display</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Control_L+Alt_L</property>
|
||||
<property name="title" translatable="yes">Grab/Ungrab keyboard</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<!-- LTR -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="direction">ltr</property>
|
||||
<property name="accelerator"><Alt>Left</property>
|
||||
<property name="title" translatable="yes">Back to overview</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<!-- RTL -->
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="direction">rtl</property>
|
||||
<property name="accelerator"><Alt>Right</property>
|
||||
<property name="title" translatable="yes">Back to overview</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Ctrl>q</property>
|
||||
<property name="title" translatable="yes">Close window/Quit Boxes</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">F11</property>
|
||||
<property name="title" translatable="yes">Fullscreen/Restore from fullscreen</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
|
@@ -1,49 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-builder">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="section-name">editor</property>
|
||||
<property name="title" translatable="yes">Editor Shortcuts</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">General</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Global Search</property>
|
||||
<property name="accelerator"><ctrl>period</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
<property name="accelerator"><ctrl>comma</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Command Bar</property>
|
||||
<property name="accelerator"><ctrl>Return</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Terminal</property>
|
||||
<property name="accelerator"><ctrl><shift>t</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Keyboard Shortcuts</property>
|
||||
<property name="accelerator"><ctrl><shift>question</property>
|
||||
</object>
|
||||
@@ -52,25 +44,21 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Panels</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Toggle left panel</property>
|
||||
<property name="accelerator">F9</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Toggle right panel</property>
|
||||
<property name="accelerator"><shift>F9</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Toggle bottom panel</property>
|
||||
<property name="accelerator"><ctrl>F9</property>
|
||||
</object>
|
||||
@@ -79,18 +67,15 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Touchpad gestures</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
||||
<property name="title" translatable="yes">Switch to the next document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
||||
<property name="title" translatable="yes">Switch to the previous document</property>
|
||||
</object>
|
||||
@@ -99,46 +84,39 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Files</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>n</property>
|
||||
<property name="title" translatable="yes">Create new document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>o</property>
|
||||
<property name="title" translatable="yes">Open a document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>s</property>
|
||||
<property name="title" translatable="yes">Save the document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>w</property>
|
||||
<property name="title" translatable="yes">Close the document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><alt>Page_Down</property>
|
||||
<property name="title" translatable="yes">Switch to the next document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><alt>Page_Up</property>
|
||||
<property name="title" translatable="yes">Switch to the previous document</property>
|
||||
</object>
|
||||
@@ -147,32 +125,27 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Find and replace</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>f</property>
|
||||
<property name="title" translatable="yes">Find</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>g</property>
|
||||
<property name="title" translatable="yes">Find the next match</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>g</property>
|
||||
<property name="title" translatable="yes">Find the previous match</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>k</property>
|
||||
<property name="title" translatable="yes">Clear highlight</property>
|
||||
</object>
|
||||
@@ -181,25 +154,21 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Copy and Paste</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>c</property>
|
||||
<property name="title" translatable="yes">Copy selected text to clipboard</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>x</property>
|
||||
<property name="title" translatable="yes">Cut selected text to clipboard</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>v</property>
|
||||
<property name="title" translatable="yes">Paste text from clipboard</property>
|
||||
</object>
|
||||
@@ -208,18 +177,15 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Undo and Redo</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>z</property>
|
||||
<property name="title" translatable="yes">Undo previous command</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>z</property>
|
||||
<property name="title" translatable="yes">Redo previous command</property>
|
||||
</object>
|
||||
@@ -228,46 +194,39 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Editing</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>a</property>
|
||||
<property name="title" translatable="yes">Increment number at cursor</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>x</property>
|
||||
<property name="title" translatable="yes">Decrement number at cursor</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>j</property>
|
||||
<property name="title" translatable="yes">Join selected lines</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>space</property>
|
||||
<property name="title" translatable="yes">Show completion window</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Insert</property>
|
||||
<property name="title" translatable="yes">Toggle overwrite</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><alt>i</property>
|
||||
<property name="title" translatable="yes">Reindent line</property>
|
||||
</object>
|
||||
@@ -276,74 +235,63 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Navigation</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>n</property>
|
||||
<property name="title" translatable="yes">Move to next error in file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>p</property>
|
||||
<property name="title" translatable="yes">Move to previous error in file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><shift><alt>Left</property>
|
||||
<property name="title" translatable="yes">Move to previous edit location</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><shift><alt>Right</property>
|
||||
<property name="title" translatable="yes">Move to next edit location</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>period</property>
|
||||
<property name="title" translatable="yes">Jump to definition of symbol</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt><shift>Up</property>
|
||||
<property name="title" translatable="yes">Move sectionport up within the file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt><shift>Down</property>
|
||||
<property name="title" translatable="yes">Move sectionport down within the file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt><shift>End</property>
|
||||
<property name="title" translatable="yes">Move sectionport to end of file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt><shift>Home</property>
|
||||
<property name="title" translatable="yes">Move sectionport to beginning of file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>percent</property>
|
||||
<property name="title" translatable="yes">Move to matching bracket</property>
|
||||
</object>
|
||||
@@ -352,18 +300,15 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Selections</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>a</property>
|
||||
<property name="title" translatable="yes">Select all</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>backslash</property>
|
||||
<property name="title" translatable="yes">Unselect all</property>
|
||||
</object>
|
||||
@@ -374,45 +319,38 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="max-height">16</property>
|
||||
<property name="section-name">terminal</property>
|
||||
<property name="title" translatable="yes">Terminal Shortcuts</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">General</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Global Search</property>
|
||||
<property name="accelerator"><ctrl>period</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Preferences</property>
|
||||
<property name="accelerator"><ctrl>comma</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Command Bar</property>
|
||||
<property name="accelerator"><ctrl>Return</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Terminal</property>
|
||||
<property name="accelerator"><ctrl><shift>t</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Keyboard Shortcuts</property>
|
||||
<property name="accelerator"><ctrl><shift>question</property>
|
||||
</object>
|
||||
@@ -421,18 +359,15 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Copy and Paste</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>c</property>
|
||||
<property name="title" translatable="yes">Copy selected text to clipboard</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><shift>v</property>
|
||||
<property name="title" translatable="yes">Paste text from clipboard</property>
|
||||
</object>
|
||||
@@ -441,122 +376,98 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Switching</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>1...9</property>
|
||||
<property name="title" translatable="yes">Switch to n-th tab</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">'Special' combinations</property>
|
||||
|
||||
<property name="title" translatable="yes">'Special' combinations</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">t+t</property>
|
||||
<property name="title" translatable="yes">You want tea ?</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><shift><ctrl></property>
|
||||
<property name="title" translatable="yes">Shift Control</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>&<ctrl></property>
|
||||
<property name="title" translatable="yes">Control Control</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Control_L&Control_R</property>
|
||||
<property name="title" translatable="yes">Left and right control</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">All gestures</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-pinch</property>
|
||||
<property name="title" translatable="yes">A stock pinch gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-stretch</property>
|
||||
<property name="title" translatable="yes">A stock stretch gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-rotate-clockwise</property>
|
||||
<property name="title" translatable="yes">A stock rotation gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-rotate-counterclockwise</property>
|
||||
<property name="title" translatable="yes">A stock rotation gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-swipe-left</property>
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-swipe-right</property>
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
|
@@ -1,42 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-clocks">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="section-name">shortcuts</property>
|
||||
<property name="max-height">10</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">General</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>Page_Down</property>
|
||||
<property name="title" translatable="yes">Go to the next section</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>Page_Up</property>
|
||||
<property name="title" translatable="yes">Go to the previous section</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>Q</property>
|
||||
<property name="title" translatable="yes">Quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>Right</property>
|
||||
<property name="direction">ltr</property>
|
||||
<property name="title" translatable="yes">Forward</property>
|
||||
@@ -44,7 +37,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>Left</property>
|
||||
<property name="direction">ltr</property>
|
||||
<property name="title" translatable="yes">Back</property>
|
||||
@@ -52,7 +44,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><alt>Left</property>
|
||||
<property name="direction">rtl</property>
|
||||
<property name="title" translatable="yes">Forward</property>
|
||||
@@ -60,7 +51,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>Right</property>
|
||||
<property name="direction">rtl</property>
|
||||
<property name="title" translatable="yes">Back</property>
|
||||
@@ -70,19 +60,16 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="view">world</property>
|
||||
<property name="title" translatable="yes">World Clocks</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>N</property>
|
||||
<property name="title" translatable="yes">Add a world clock</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>S</property>
|
||||
<property name="title" translatable="yes">Select world clocks</property>
|
||||
</object>
|
||||
@@ -91,19 +78,16 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="view">alarm</property>
|
||||
<property name="title" translatable="yes">Alarm</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>N</property>
|
||||
<property name="title" translatable="yes">Add an alarm</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>S</property>
|
||||
<property name="title" translatable="yes">Select alarms</property>
|
||||
</object>
|
||||
@@ -112,26 +96,22 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="view">stopwatch</property>
|
||||
<property name="title" translatable="yes">Stopwatch</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Return space</property>
|
||||
<property name="title" translatable="yes">Start / Stop / Continue</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">L</property>
|
||||
<property name="title" translatable="yes">Lap</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Delete</property>
|
||||
<property name="title" translatable="yes">Reset</property>
|
||||
</object>
|
||||
@@ -140,19 +120,16 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="view">timer</property>
|
||||
<property name="title" translatable="yes">Timer</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Return space</property>
|
||||
<property name="title" translatable="yes">Start / Stop / Pause</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Delete</property>
|
||||
<property name="title" translatable="yes">Reset</property>
|
||||
</object>
|
||||
@@ -162,5 +139,4 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
|
@@ -1,28 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-gedit">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="section-name">shortcuts</property>
|
||||
<property name="max-height">12</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Touchpad gestures</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
||||
<property name="title" translatable="yes">Switch to the next document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
||||
<property name="title" translatable="yes">Switch to the previous document</property>
|
||||
</object>
|
||||
@@ -31,46 +26,39 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Documents</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>N</property>
|
||||
<property name="title" translatable="yes">Create new document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>O</property>
|
||||
<property name="title" translatable="yes">Open a document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>S</property>
|
||||
<property name="title" translatable="yes">Save the document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>W</property>
|
||||
<property name="title" translatable="yes">Close the document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><Alt>Page_Down</property>
|
||||
<property name="title" translatable="yes">Switch to the next document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><Alt>Page_Up</property>
|
||||
<property name="title" translatable="yes">Switch to the previous document</property>
|
||||
</object>
|
||||
@@ -79,46 +67,39 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Find and Replace</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>F</property>
|
||||
<property name="title" translatable="yes">Find</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>G</property>
|
||||
<property name="title" translatable="yes">Find the next match</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><Shift>G</property>
|
||||
<property name="title" translatable="yes">Find the previous match</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>H</property>
|
||||
<property name="title" translatable="yes">Find and Replace</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl><Shift>K</property>
|
||||
<property name="title" translatable="yes">Clear highlight</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>I</property>
|
||||
<property name="title" translatable="yes">Go to line</property>
|
||||
</object>
|
||||
@@ -127,11 +108,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Tools</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><shift>F7</property>
|
||||
<property name="title" translatable="yes">Check spelling</property>
|
||||
</object>
|
||||
@@ -140,25 +119,21 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">Miscellaneous</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">F11</property>
|
||||
<property name="title" translatable="yes">Fullscreen on / off</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>P</property>
|
||||
<property name="title" translatable="yes">Print the document</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Insert</property>
|
||||
<property name="title" translatable="yes">Toggle insert / overwrite</property>
|
||||
</object>
|
||||
@@ -168,5 +143,4 @@
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
|
@@ -1,60 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Shortcuts</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">50</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Builder</property>
|
||||
<signal name="clicked" handler="builder_shortcuts" swapped="1" object="window1"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">GEdit</property>
|
||||
<signal name="clicked" handler="gedit_shortcuts" swapped="1" object="window1"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Clocks - All</property>
|
||||
<signal name="clicked" handler="clocks_shortcuts" swapped="1" object="window1"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Clocks - Stopwatch</property>
|
||||
<signal name="clicked" handler="clocks_shortcuts_stopwatch" swapped="1" object="window1"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Boxes</property>
|
||||
<signal name="clicked" handler="boxes_shortcuts" swapped="1" object="window1"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Boxes - Wizard</property>
|
||||
<signal name="clicked" handler="boxes_shortcuts_wizard" swapped="1" object="window1"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Boxes - Display</property>
|
||||
<signal name="clicked" handler="boxes_shortcuts_display" swapped="1" object="window1"/>
|
||||
</object>
|
||||
|
@@ -40,7 +40,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
gtk_widget_set_size_request (window, 500, 350);
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR(header), TRUE);
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR(header), TRUE);
|
||||
gtk_window_set_titlebar (GTK_WINDOW(window), header);
|
||||
gtk_window_set_title (GTK_WINDOW(window), "Stack Sidebar");
|
||||
|
||||
@@ -65,7 +65,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
widget = gtk_image_new_from_icon_name ("help-about", GTK_ICON_SIZE_MENU);
|
||||
widget = gtk_image_new_from_icon_name ("help-about");
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (widget), 256);
|
||||
}
|
||||
else
|
||||
|
@@ -3,189 +3,176 @@
|
||||
<object class="GtkAdjustment" id="basic_adjustment">
|
||||
<property name="lower">-10000</property>
|
||||
<property name="upper">10000</property>
|
||||
<property name="step_increment">0.5</property>
|
||||
<property name="page_increment">100</property>
|
||||
<property name="step-increment">0.5</property>
|
||||
<property name="page-increment">100</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="hex_adjustment">
|
||||
<property name="upper">255</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">16</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">16</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="time_adjustment">
|
||||
<property name="upper">1410</property>
|
||||
<property name="step_increment">30</property>
|
||||
<property name="page_increment">60</property>
|
||||
<property name="step-increment">30</property>
|
||||
<property name="page-increment">60</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="month_adjustment">
|
||||
<property name="lower">1</property>
|
||||
<property name="upper">12</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">5</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">5</property>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">Spin Button</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">_Numeric</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">basic_spin</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">basic_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="basic_spin">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="width_chars">5</property>
|
||||
<property name="width-chars">5</property>
|
||||
<property name="adjustment">basic_adjustment</property>
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="climb-rate">1</property>
|
||||
<property name="digits">2</property>
|
||||
<property name="numeric">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="basic_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="width_chars">10</property>
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">_Hexadecimal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">hex_spin</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">hex_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="hex_spin">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="width_chars">4</property>
|
||||
<property name="width-chars">4</property>
|
||||
<property name="adjustment">hex_adjustment</property>
|
||||
<signal name="input" handler="hex_spin_input"/>
|
||||
<signal name="output" handler="hex_spin_output"/>
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="hex_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="width_chars">10</property>
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">_Time</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">time_spin</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">time_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="time_spin">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="width_chars">5</property>
|
||||
<property name="width-chars">5</property>
|
||||
<property name="adjustment">time_adjustment</property>
|
||||
<signal name="input" handler="time_spin_input"/>
|
||||
<signal name="output" handler="time_spin_output"/>
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="time_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="width_chars">10</property>
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">_Month</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="mnemonic_widget">month_spin</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="mnemonic-widget">month_spin</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="month_spin">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="width_chars">9</property>
|
||||
<property name="width-chars">9</property>
|
||||
<signal name="input" handler="month_spin_input"/>
|
||||
<signal name="output" handler="month_spin_output"/>
|
||||
<property name="adjustment">month_adjustment</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="update_policy">if-valid</property>
|
||||
<property name="update-policy">if-valid</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="month_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="width_chars">10</property>
|
||||
<property name="width-chars">10</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -5,26 +5,22 @@
|
||||
<property name="title" translatable="yes">Stack</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="visible">1</property>
|
||||
<property name="stack">stack</property>
|
||||
<property name="halign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="icon-name">gtk3-demo</property>
|
||||
@@ -37,9 +33,7 @@
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<property name="label" translatable="yes">Page 2</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="draw_indicator">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
@@ -50,7 +44,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
@@ -62,8 +55,8 @@
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -129,6 +129,7 @@ insert_text (GtkTextBuffer *buffer)
|
||||
GtkTextIter iter;
|
||||
GtkTextIter start, end;
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkTexture *texture;
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
@@ -138,6 +139,7 @@ insert_text (GtkTextBuffer *buffer)
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
NULL);
|
||||
g_assert (pixbuf);
|
||||
texture = gdk_texture_new_for_pixbuf (pixbuf);
|
||||
|
||||
/* get start of buffer; each insertion will revalidate the
|
||||
* iterator to point to just after the inserted text.
|
||||
@@ -232,9 +234,9 @@ insert_text (GtkTextBuffer *buffer)
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "The buffer can have images in it: ", -1);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
gtk_text_buffer_insert_texture (buffer, &iter, texture);
|
||||
gtk_text_buffer_insert_texture (buffer, &iter, texture);
|
||||
gtk_text_buffer_insert_texture (buffer, &iter, texture);
|
||||
gtk_text_buffer_insert (buffer, &iter, " for example.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Spacing. ", -1,
|
||||
@@ -378,6 +380,7 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_apply_tag_by_name (buffer, "word_wrap", &start, &end);
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
g_object_unref (texture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -5,7 +5,6 @@
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="show-arrow">0</property>
|
||||
<style>
|
||||
@@ -13,11 +12,10 @@
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="is-important">1</property>
|
||||
<property name="icon-name">edit-find</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="homogeneous">1</property>
|
||||
@@ -25,11 +23,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="is-important">1</property>
|
||||
<property name="icon-name">edit-find</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -38,12 +35,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="label" translatable="yes">Insensitive</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="is-important">1</property>
|
||||
<property name="icon-name">edit-find</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="homogeneous">1</property>
|
||||
@@ -51,11 +47,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Raised</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="is-important">1</property>
|
||||
<property name="icon-name">edit-find</property>
|
||||
<style>
|
||||
<class name="raised"/>
|
||||
</style>
|
||||
@@ -66,11 +61,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Raised Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="is_important">1</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="is-important">1</property>
|
||||
<property name="icon-name">edit-find</property>
|
||||
<property name="active">1</property>
|
||||
<style>
|
||||
<class name="raised"/>
|
||||
@@ -82,12 +76,11 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="label" translatable="yes">Insensitive Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
<property name="is_important">1</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">edit-find</property>
|
||||
<property name="is-important">1</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -96,12 +89,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="invisible-char">•</property>
|
||||
<property name="placeholder-text" translatable="yes">Search...</property>
|
||||
<property name="secondary-icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
@@ -110,11 +101,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="switch1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -123,7 +112,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
@@ -132,17 +120,15 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Hi, I am a button</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
@@ -151,9 +137,8 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">This is a button party!</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="receives_default">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
@@ -163,19 +148,16 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="toolbar-style">icons</property>
|
||||
<style>
|
||||
<class name="inline-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="homogeneous">1</property>
|
||||
@@ -183,10 +165,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-add-symbolic</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="homogeneous">1</property>
|
||||
@@ -195,8 +176,8 @@
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-remove-symbolic</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">list-remove-symbolic</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -205,10 +186,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">list-remove-symbolic</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">list-remove-symbolic</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -217,11 +197,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="label" translatable="yes">Insensitive</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">edit-find-symbolic</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="homogeneous">1</property>
|
||||
@@ -229,11 +208,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="label" translatable="yes">Insensitive Active</property>
|
||||
<property name="use_underline">1</property>
|
||||
<property name="icon_name">go-up-symbolic</property>
|
||||
<property name="use-underline">1</property>
|
||||
<property name="icon-name">go-up-symbolic</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -244,12 +222,9 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Plain</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="hexpand">1</property>
|
||||
@@ -258,7 +233,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Destructive</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
@@ -267,7 +241,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Suggested</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
|
@@ -39,14 +39,12 @@ canvas_item_new (GtkWidget *widget,
|
||||
const gchar *icon_name;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkIconTheme *icon_theme;
|
||||
int width;
|
||||
|
||||
icon_name = gtk_tool_button_get_icon_name (button);
|
||||
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (widget));
|
||||
gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &width, NULL);
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme,
|
||||
icon_name,
|
||||
width,
|
||||
48,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
NULL);
|
||||
|
||||
@@ -168,7 +166,6 @@ palette_drag_data_received (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
@@ -212,7 +209,6 @@ passive_canvas_drag_data_received (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
@@ -287,7 +283,6 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
|
||||
@@ -327,7 +322,7 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
|
||||
canvas_items = g_list_append (canvas_items, item);
|
||||
drop_item = NULL;
|
||||
|
||||
gtk_drag_finish (context, TRUE, FALSE, time);
|
||||
gtk_drag_finish (context, TRUE, time);
|
||||
} else
|
||||
{
|
||||
drop_item = item;
|
||||
@@ -568,8 +563,8 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
contents = gtk_drawing_area_new ();
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::drag-data-received", passive_canvas_drag_data_received, NULL,
|
||||
"draw", canvas_draw, NULL,
|
||||
"drag-data-received", passive_canvas_drag_data_received, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
|
||||
@@ -594,11 +589,11 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
contents = gtk_drawing_area_new ();
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
|
||||
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, contents,
|
||||
"signal::drag-drop", interactive_canvas_drag_drop, NULL,
|
||||
"draw", canvas_draw, NULL,
|
||||
"drag-motion", interactive_canvas_drag_motion, NULL,
|
||||
"drag-data-received", interactive_canvas_drag_data_received, NULL,
|
||||
"drag-leave", interactive_canvas_drag_leave, contents,
|
||||
"drag-drop", interactive_canvas_drag_drop, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
|
||||
|
@@ -8,13 +8,135 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gtkfishbowl.h"
|
||||
#include "gtkgears.h"
|
||||
|
||||
GtkWidget *allow_changes;
|
||||
const char *const css =
|
||||
".blurred-button {"
|
||||
" box-shadow: 0px 0px 5px 10px rgba(0, 0, 0, 0.5);"
|
||||
"}"
|
||||
"";
|
||||
|
||||
GtkWidget *fishbowl;
|
||||
|
||||
static GtkWidget *
|
||||
create_button (void)
|
||||
{
|
||||
return gtk_button_new_with_label ("Button");
|
||||
}
|
||||
static GtkWidget *
|
||||
create_blurred_button (void)
|
||||
{
|
||||
GtkWidget *w = gtk_button_new ();
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (w), "blurred-button");
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_font_button (void)
|
||||
{
|
||||
return gtk_font_button_new ();
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_level_bar (void)
|
||||
{
|
||||
GtkWidget *w = gtk_level_bar_new_for_interval (0, 100);
|
||||
|
||||
gtk_level_bar_set_value (GTK_LEVEL_BAR (w), 50);
|
||||
|
||||
/* Force them to be a bit larger */
|
||||
gtk_widget_set_size_request (w, 200, -1);
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_spinner (void)
|
||||
{
|
||||
GtkWidget *w = gtk_spinner_new ();
|
||||
|
||||
gtk_spinner_start (GTK_SPINNER (w));
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_spinbutton (void)
|
||||
{
|
||||
GtkWidget *w = gtk_spin_button_new_with_range (0, 10, 1);
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_label (void)
|
||||
{
|
||||
GtkWidget *w = gtk_label_new ("pLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
|
||||
|
||||
gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
|
||||
gtk_label_set_max_width_chars (GTK_LABEL (w), 100);
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_gears (void)
|
||||
{
|
||||
GtkWidget *w = gtk_gears_new ();
|
||||
|
||||
gtk_widget_set_size_request (w, 100, 100);
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
static const struct {
|
||||
const char *name;
|
||||
GtkWidget * (*create_func) (void);
|
||||
} widget_types[] = {
|
||||
{ "Button", create_button },
|
||||
{ "Blurbutton", create_blurred_button },
|
||||
{ "Fontbutton", create_font_button },
|
||||
{ "Levelbar" , create_level_bar },
|
||||
{ "Label" , create_label },
|
||||
{ "Spinner" , create_spinner },
|
||||
{ "Spinbutton", create_spinbutton },
|
||||
{ "Gears", create_gears },
|
||||
};
|
||||
|
||||
static int selected_widget_type = -1;
|
||||
static const int N_WIDGET_TYPES = G_N_ELEMENTS (widget_types);
|
||||
|
||||
#define N_STATS 5
|
||||
|
||||
#define STATS_UPDATE_TIME G_USEC_PER_SEC
|
||||
|
||||
static void
|
||||
set_widget_type (GtkWidget *headerbar,
|
||||
int widget_type_index)
|
||||
{
|
||||
GList *children, *l;
|
||||
|
||||
if (widget_type_index == selected_widget_type)
|
||||
return;
|
||||
|
||||
/* Remove everything */
|
||||
children = gtk_container_get_children (GTK_CONTAINER (fishbowl));
|
||||
for (l = children; l; l = l->next)
|
||||
{
|
||||
gtk_container_remove (GTK_CONTAINER (fishbowl), (GtkWidget*)l->data);
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
selected_widget_type = widget_type_index;
|
||||
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar),
|
||||
widget_types[selected_widget_type].name);
|
||||
}
|
||||
|
||||
|
||||
typedef struct _Stats Stats;
|
||||
struct _Stats {
|
||||
gint64 last_stats;
|
||||
@@ -69,7 +191,7 @@ do_stats (GtkWidget *widget,
|
||||
{
|
||||
n_frames += stats->frame_counter[i];
|
||||
}
|
||||
|
||||
|
||||
new_label = g_strdup_printf ("widgets - %.1f fps",
|
||||
(double) G_USEC_PER_SEC * n_frames
|
||||
/ (N_STATS * STATS_UPDATE_TIME));
|
||||
@@ -96,7 +218,7 @@ do_stats (GtkWidget *widget,
|
||||
stats->frame_counter[stats->stats_index] = 0;
|
||||
stats->item_counter[stats->stats_index] = stats->item_counter[(stats->stats_index + N_STATS - 1) % N_STATS];
|
||||
stats->last_stats = frame_time;
|
||||
|
||||
|
||||
if (suggested_change)
|
||||
*suggested_change = stats->last_suggestion;
|
||||
else
|
||||
@@ -129,44 +251,142 @@ move_fish (GtkWidget *bowl,
|
||||
gpointer info_label)
|
||||
{
|
||||
gint suggested_change = 0;
|
||||
|
||||
do_stats (bowl,
|
||||
info_label,
|
||||
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (allow_changes)) ? &suggested_change : NULL);
|
||||
|
||||
gtk_fishbowl_set_count (GTK_FISHBOWL (bowl),
|
||||
gtk_fishbowl_get_count (GTK_FISHBOWL (bowl)) + suggested_change);
|
||||
do_stats (bowl, info_label, &suggested_change);
|
||||
|
||||
if (suggested_change > 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < suggested_change; i ++)
|
||||
{
|
||||
GtkWidget *new_widget = widget_types[selected_widget_type].create_func ();
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (fishbowl), new_widget);
|
||||
|
||||
}
|
||||
}
|
||||
else if (suggested_change < 0)
|
||||
{
|
||||
GList *children, *l;
|
||||
int n_removed = 0;
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (fishbowl));
|
||||
for (l = children; l; l = l->next)
|
||||
{
|
||||
gtk_container_remove (GTK_CONTAINER (fishbowl), (GtkWidget *)l->data);
|
||||
n_removed ++;
|
||||
|
||||
if (n_removed >= (-suggested_change))
|
||||
break;
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
stats_update (bowl);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
static void
|
||||
next_button_clicked_cb (GtkButton *source,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *headerbar = user_data;
|
||||
int new_index;
|
||||
|
||||
if (selected_widget_type + 1 >= N_WIDGET_TYPES)
|
||||
new_index = 0;
|
||||
else
|
||||
new_index = selected_widget_type + 1;
|
||||
|
||||
set_widget_type (headerbar, new_index);
|
||||
}
|
||||
|
||||
static void
|
||||
prev_button_clicked_cb (GtkButton *source,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *headerbar = user_data;
|
||||
int new_index;
|
||||
|
||||
if (selected_widget_type - 1 < 0)
|
||||
new_index = N_WIDGET_TYPES - 1;
|
||||
else
|
||||
new_index = selected_widget_type - 1;
|
||||
|
||||
set_widget_type (headerbar, new_index);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_widgetbowl (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkCssProvider *provider = NULL;
|
||||
|
||||
gtk_init ();
|
||||
|
||||
if (provider == NULL)
|
||||
{
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider, css, -1);
|
||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
}
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *bowl, *info_label;
|
||||
GtkWidget *info_label;
|
||||
GtkWidget *count_label;
|
||||
GtkWidget *titlebar;
|
||||
GtkWidget *title_box;
|
||||
GtkWidget *left_box;
|
||||
GtkWidget *next_button;
|
||||
GtkWidget *prev_button;
|
||||
|
||||
g_type_ensure (GTK_TYPE_FISHBOWL);
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
titlebar = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (titlebar), TRUE);
|
||||
info_label = gtk_label_new ("widget - 00.0 fps");
|
||||
count_label = gtk_label_new ("0");
|
||||
fishbowl = gtk_fishbowl_new ();
|
||||
title_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
prev_button = gtk_button_new_from_icon_name ("pan-start-symbolic");
|
||||
next_button = gtk_button_new_from_icon_name ("pan-end-symbolic");
|
||||
left_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
||||
g_object_bind_property (fishbowl, "count", count_label, "label", 0);
|
||||
g_signal_connect (next_button, "clicked", G_CALLBACK (next_button_clicked_cb), titlebar);
|
||||
g_signal_connect (prev_button, "clicked", G_CALLBACK (prev_button_clicked_cb), titlebar);
|
||||
|
||||
gtk_fishbowl_set_animating (GTK_FISHBOWL (fishbowl), TRUE);
|
||||
|
||||
gtk_widget_set_hexpand (title_box, TRUE);
|
||||
gtk_widget_set_halign (title_box, GTK_ALIGN_END);
|
||||
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), titlebar);
|
||||
gtk_container_add (GTK_CONTAINER (title_box), count_label);
|
||||
gtk_container_add (GTK_CONTAINER (title_box), info_label);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (titlebar), title_box);
|
||||
gtk_container_add (GTK_CONTAINER (window), fishbowl);
|
||||
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (left_box), "linked");
|
||||
gtk_container_add (GTK_CONTAINER (left_box), prev_button);
|
||||
gtk_container_add (GTK_CONTAINER (left_box), next_button);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (titlebar), left_box);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/fishbowl/fishbowl.ui");
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
|
||||
gtk_fishbowl_set_use_icons (GTK_FISHBOWL (bowl), FALSE);
|
||||
info_label = GTK_WIDGET (gtk_builder_get_object (builder, "info_label"));
|
||||
allow_changes = GTK_WIDGET (gtk_builder_get_object (builder, "changes_allow"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_widget_realize (window);
|
||||
gtk_widget_add_tick_callback (bowl, move_fish, info_label, NULL);
|
||||
gtk_widget_add_tick_callback (fishbowl, move_fish, info_label, NULL);
|
||||
|
||||
set_widget_type (titlebar, 0);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -5,8 +5,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Drag 'n Drop */
|
||||
static GtkTargetEntry target_table[] = {
|
||||
{ "text/uri-list", 0, 0 },
|
||||
static const char *target_table[] = {
|
||||
"text/uri-list"
|
||||
};
|
||||
|
||||
typedef struct
|
||||
@@ -94,13 +94,9 @@ get_icon (GtkWidget *image, const gchar *name, gint size)
|
||||
static void
|
||||
set_image (GtkWidget *image, const gchar *name, gint size)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name, 1);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
||||
pixbuf = get_icon (image, name, size);
|
||||
gtk_drag_source_set_icon_pixbuf (image, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
gtk_drag_source_set_icon_name (image, name);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -303,10 +299,10 @@ static void
|
||||
copy_to_clipboard (GtkButton *button,
|
||||
IconBrowserWindow *win)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
GdkClipboard *clipboard;
|
||||
|
||||
clipboard = gtk_clipboard_get_default (gdk_display_get_default ());
|
||||
gtk_clipboard_set_text (clipboard, gtk_window_get_title (GTK_WINDOW (win->details)), -1);
|
||||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (win));
|
||||
gdk_clipboard_set_text (clipboard, gtk_window_get_title (GTK_WINDOW (win->details)));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -390,7 +386,7 @@ get_image_data (GtkWidget *widget,
|
||||
|
||||
image = gtk_bin_get_child (GTK_BIN (widget));
|
||||
|
||||
gtk_image_get_icon_name (GTK_IMAGE (image), &name, NULL);
|
||||
name = gtk_image_get_icon_name (GTK_IMAGE (image));
|
||||
size = gtk_image_get_pixel_size (GTK_IMAGE (image));
|
||||
|
||||
pixbuf = get_icon (image, name, size);
|
||||
@@ -413,7 +409,7 @@ get_scalable_image_data (GtkWidget *widget,
|
||||
const gchar *name;
|
||||
|
||||
image = gtk_bin_get_child (GTK_BIN (widget));
|
||||
gtk_image_get_icon_name (GTK_IMAGE (image), &name, NULL);
|
||||
name = gtk_image_get_icon_name (GTK_IMAGE (image));
|
||||
|
||||
info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), name, -1, 0);
|
||||
file = g_file_new_for_path (gtk_icon_info_get_filename (info));
|
||||
@@ -430,7 +426,7 @@ get_scalable_image_data (GtkWidget *widget,
|
||||
static void
|
||||
setup_image_dnd (GtkWidget *image)
|
||||
{
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (image);
|
||||
g_signal_connect (image, "drag-data-get", G_CALLBACK (get_image_data), NULL);
|
||||
}
|
||||
@@ -439,11 +435,14 @@ static void
|
||||
setup_scalable_image_dnd (GtkWidget *image)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
GdkContentFormats *targets;
|
||||
|
||||
parent = gtk_widget_get_parent (image);
|
||||
targets = gdk_content_formats_new (target_table, G_N_ELEMENTS (target_table));
|
||||
gtk_drag_source_set (parent, GDK_BUTTON1_MASK,
|
||||
target_table, G_N_ELEMENTS (target_table),
|
||||
targets,
|
||||
GDK_ACTION_COPY);
|
||||
gdk_content_formats_unref (targets);
|
||||
|
||||
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_scalable_image_data), NULL);
|
||||
}
|
||||
@@ -451,23 +450,17 @@ setup_scalable_image_dnd (GtkWidget *image)
|
||||
static void
|
||||
icon_browser_window_init (IconBrowserWindow *win)
|
||||
{
|
||||
GtkTargetList *list;
|
||||
GtkTargetEntry *targets;
|
||||
gint n_targets;
|
||||
GdkContentFormats *list;
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (win));
|
||||
|
||||
list = gtk_target_list_new (NULL, 0);
|
||||
gtk_target_list_add_text_targets (list, 0);
|
||||
targets = gtk_target_table_new_from_list (list, &n_targets);
|
||||
gtk_target_list_unref (list);
|
||||
|
||||
list = gdk_content_formats_new (NULL, 0);
|
||||
list = gtk_content_formats_add_text_targets (list);
|
||||
gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (win->list),
|
||||
GDK_BUTTON1_MASK,
|
||||
targets, n_targets,
|
||||
list,
|
||||
GDK_ACTION_COPY);
|
||||
|
||||
gtk_target_table_free (targets, n_targets);
|
||||
gdk_content_formats_unref (list);
|
||||
|
||||
setup_image_dnd (win->image1);
|
||||
setup_image_dnd (win->image2);
|
||||
|
@@ -1,10 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.8 -->
|
||||
<object class="IconStore" id="store">
|
||||
</object>
|
||||
<object class="IconStore" id="store"/>
|
||||
<object class="GtkTreeModelFilter" id="filter_model">
|
||||
<property name="child_model">store</property>
|
||||
<property name="child-model">store</property>
|
||||
</object>
|
||||
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Icon Browser</property>
|
||||
@@ -13,26 +12,22 @@
|
||||
<signal name="key-press-event" handler="key_press_event_cb"/>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="header">
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">Icon Browser</property>
|
||||
<property name="show-close-button">True</property>
|
||||
<property name="show-title-buttons">1</property>
|
||||
<child type="title">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="normal_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="draw-indicator">0</property>
|
||||
<property name="label" translatable="yes">Normal</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="symbolic_radio">
|
||||
<property name="visible">True</property>
|
||||
<property name="draw_indicator">False</property>
|
||||
<property name="draw-indicator">0</property>
|
||||
<property name="label" translatable="yes">Symbolic</property>
|
||||
<property name="group">normal_radio</property>
|
||||
<signal name="toggled" handler="symbolic_toggled"/>
|
||||
@@ -42,15 +37,12 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="search">
|
||||
<property name="visible">True</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="search-icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">edit-find-symbolic</property>
|
||||
<property name="icon-size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -62,32 +54,24 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="context_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="selection_mode">single</property>
|
||||
<signal name="selected-rows-changed" handler="selected_context_changed"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="content_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkSearchBar" id="searchbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="search-mode-enabled" bind-source="search" bind-property="active" bind-flags="bidirectional"/>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="searchentry">
|
||||
<property name="visible">True</property>
|
||||
<signal name="search-changed" handler="search_text_changed"/>
|
||||
</object>
|
||||
</child>
|
||||
@@ -95,16 +79,13 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="sw">
|
||||
<property name="visible">True</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="expand">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="list">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">filter_model</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="activate-on-single-click">True</property>
|
||||
<property name="activate-on-single-click">1</property>
|
||||
<signal name="item_activated" handler="item_activated"/>
|
||||
<child>
|
||||
<object class="GtkCellRendererPixbuf" id="cell">
|
||||
@@ -117,7 +98,6 @@
|
||||
<object class="GtkCellRendererText" id="text_cell">
|
||||
<property name="xpad">10</property>
|
||||
<property name="ypad">10</property>
|
||||
<property name="xalign">0.5</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -138,22 +118,20 @@
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkDialog" id="details">
|
||||
<property name="modal">True</property>
|
||||
<property name="modal">1</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
<property name="resizable">False</property>
|
||||
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
|
||||
<property name="resizable">0</property>
|
||||
<property name="hide-on-close">1</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="row-spacing">18</property>
|
||||
<property name="column-spacing">18</property>
|
||||
<property name="halign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -164,7 +142,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -175,7 +152,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -186,7 +162,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -197,7 +172,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -208,7 +182,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">end</property>
|
||||
</object>
|
||||
@@ -217,10 +190,8 @@
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">16×16</property>
|
||||
@@ -235,7 +206,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">24×24</property>
|
||||
@@ -250,7 +220,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">32×32</property>
|
||||
@@ -265,7 +234,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">48×48</property>
|
||||
@@ -280,7 +248,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">64×64</property>
|
||||
@@ -295,7 +262,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label">scalable</property>
|
||||
@@ -312,7 +278,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Copy to Clipboard</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
@@ -323,8 +288,7 @@
|
||||
<child>
|
||||
<object class="GtkLabel" id="description">
|
||||
<property name="margin">10</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max-width-chars">60</property>
|
||||
<property name="valign">start</property>
|
||||
</object>
|
||||
|
@@ -2,28 +2,23 @@
|
||||
<object class="GtkShortcutsWindow" id="help_overlay">
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title">General</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">F1</property>
|
||||
<property name="title">Show About Dialog</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>q</property>
|
||||
<property name="title">Quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>d</property>
|
||||
<property name="title">Switch to dark theme</property>
|
||||
</object>
|
||||
@@ -32,26 +27,22 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title">Traditional</property>
|
||||
<property name="view">page2</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>s</property>
|
||||
<property name="title">Search</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Delete</property>
|
||||
<property name="title">Delete</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>b</property>
|
||||
<property name="title">Set background</property>
|
||||
</object>
|
||||
@@ -60,26 +51,22 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title">Modern</property>
|
||||
<property name="view">page3</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>o</property>
|
||||
<property name="title">Open a file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>r</property>
|
||||
<property name="title">Start recording</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><Primary>l</property>
|
||||
<property name="title">Lock or unlock</property>
|
||||
</object>
|
||||
|
@@ -1232,10 +1232,10 @@ static void
|
||||
handle_cutcopypaste (GtkWidget *button, GtkWidget *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkClipboard *clipboard;
|
||||
GdkClipboard *clipboard;
|
||||
const gchar *id;
|
||||
|
||||
clipboard = gtk_widget_get_clipboard (textview, GDK_SELECTION_CLIPBOARD);
|
||||
clipboard = gtk_widget_get_clipboard (textview);
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
|
||||
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
|
||||
|
||||
@@ -1250,13 +1250,13 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview)
|
||||
}
|
||||
|
||||
static void
|
||||
clipboard_owner_change (GtkClipboard *clipboard, GdkEvent *event, GtkWidget *button)
|
||||
clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *button)
|
||||
{
|
||||
const gchar *id;
|
||||
gboolean has_text;
|
||||
|
||||
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
|
||||
has_text = gtk_clipboard_wait_is_text_available (clipboard);
|
||||
has_text = gdk_content_formats_contain_gtype (gdk_clipboard_get_formats (clipboard), GTK_TYPE_TEXT_BUFFER);
|
||||
|
||||
if (strcmp (id, "pastebutton") == 0)
|
||||
gtk_widget_set_sensitive (button, has_text);
|
||||
@@ -1278,8 +1278,13 @@ textbuffer_notify_selection (GObject *object, GParamSpec *pspec, GtkWidget *butt
|
||||
}
|
||||
|
||||
static gboolean
|
||||
osd_frame_button_press (GtkWidget *frame, GdkEventButton *event, gpointer data)
|
||||
osd_frame_pressed (GtkGestureMultiPress *gesture,
|
||||
int press,
|
||||
double x,
|
||||
double y,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *frame = data;
|
||||
GtkWidget *osd;
|
||||
gboolean visible;
|
||||
|
||||
@@ -1523,17 +1528,17 @@ g_test_permission_class_init (GTestPermissionClass *class)
|
||||
permission_class->release_finish = release_finish;
|
||||
}
|
||||
|
||||
static int icon_sizes[] = {0, 1, 2, 3, 4, 5, 6};
|
||||
|
||||
static void
|
||||
update_buttons (GtkWidget *iv, int pos)
|
||||
update_buttons (GtkWidget *iv, GtkIconSize size)
|
||||
{
|
||||
GtkWidget *button;
|
||||
|
||||
button = GTK_WIDGET (g_object_get_data (G_OBJECT (iv), "increase_button"));
|
||||
gtk_widget_set_sensitive (button, pos + 1 < G_N_ELEMENTS (icon_sizes));
|
||||
gtk_widget_set_sensitive (button, size != GTK_ICON_SIZE_LARGE);
|
||||
button = GTK_WIDGET (g_object_get_data (G_OBJECT (iv), "decrease_button"));
|
||||
gtk_widget_set_sensitive (button, pos > 0);
|
||||
gtk_widget_set_sensitive (button, size != GTK_ICON_SIZE_NORMAL);
|
||||
button = GTK_WIDGET (g_object_get_data (G_OBJECT (iv), "reset_button"));
|
||||
gtk_widget_set_sensitive (button, size != GTK_ICON_SIZE_INHERIT);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1541,17 +1546,14 @@ increase_icon_size (GtkWidget *iv)
|
||||
{
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
GtkIconSize size;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_get (cell, "stock-size", &size, NULL);
|
||||
size = MIN (size + 1, G_N_ELEMENTS (icon_sizes) - 1);
|
||||
g_object_set (cell, "stock-size", size, NULL);
|
||||
g_object_set (cell, "icon-size", GTK_ICON_SIZE_LARGE, NULL);
|
||||
|
||||
update_buttons (iv, size);
|
||||
update_buttons (iv, GTK_ICON_SIZE_LARGE);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
@@ -1561,17 +1563,14 @@ decrease_icon_size (GtkWidget *iv)
|
||||
{
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
GtkIconSize size;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_get (cell, "stock-size", &size, NULL);
|
||||
size = MAX (size - 1, 1);
|
||||
g_object_set (cell, "stock-size", size, NULL);
|
||||
g_object_set (cell, "icon-size", GTK_ICON_SIZE_NORMAL, NULL);
|
||||
|
||||
update_buttons (iv, size);
|
||||
update_buttons (iv, GTK_ICON_SIZE_NORMAL);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
@@ -1586,9 +1585,9 @@ reset_icon_size (GtkWidget *iv)
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_set (cell, "stock-size", 2, NULL);
|
||||
g_object_set (cell, "icon-size", GTK_ICON_SIZE_INHERIT, NULL);
|
||||
|
||||
update_buttons (iv, 2);
|
||||
update_buttons (iv, GTK_ICON_SIZE_INHERIT);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
@@ -1656,6 +1655,7 @@ activate (GApplication *app)
|
||||
gint i;
|
||||
GPermission *permission;
|
||||
GAction *action;
|
||||
GtkGesture *gesture;
|
||||
|
||||
g_type_ensure (my_text_view_get_type ());
|
||||
|
||||
@@ -1674,7 +1674,6 @@ activate (GApplication *app)
|
||||
gtk_builder_add_callback_symbol (builder, "on_page_combo_changed", (GCallback)on_page_combo_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "on_range_from_changed", (GCallback)on_range_from_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "on_range_to_changed", (GCallback)on_range_to_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "osd_frame_button_press", (GCallback)osd_frame_button_press);
|
||||
gtk_builder_add_callback_symbol (builder, "tab_close_cb", (GCallback)tab_close_cb);
|
||||
gtk_builder_add_callback_symbol (builder, "increase_icon_size", (GCallback)increase_icon_size);
|
||||
gtk_builder_add_callback_symbol (builder, "decrease_icon_size", (GCallback)decrease_icon_size);
|
||||
@@ -1843,8 +1842,8 @@ activate (GApplication *app)
|
||||
G_CALLBACK (textbuffer_notify_selection), widget);
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "pastebutton");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (handle_cutcopypaste), widget2);
|
||||
g_signal_connect_object (gtk_widget_get_clipboard (widget2, GDK_SELECTION_CLIPBOARD), "owner-change",
|
||||
G_CALLBACK (clipboard_owner_change), widget, 0);
|
||||
g_signal_connect_object (gtk_widget_get_clipboard (widget2), "notify::formats",
|
||||
G_CALLBACK (clipboard_formats_notify), widget, 0);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "osd_frame");
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "totem_like_osd");
|
||||
@@ -1888,6 +1887,9 @@ activate (GApplication *app)
|
||||
g_object_set_data (G_OBJECT (widget), "increase_button", widget2);
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
|
||||
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "reset_button");
|
||||
g_object_set_data (G_OBJECT (widget), "reset_button", widget2);
|
||||
reset_icon_size (widget);
|
||||
|
||||
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment3");
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar1");
|
||||
@@ -1895,6 +1897,10 @@ activate (GApplication *app)
|
||||
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget);
|
||||
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget2);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "osd_frame");
|
||||
gesture = gtk_gesture_multi_press_new (widget);
|
||||
g_signal_connect (gesture, "pressed", G_CALLBACK (osd_frame_pressed), widget);
|
||||
|
||||
gtk_widget_show (GTK_WIDGET (window));
|
||||
|
||||
g_object_unref (builder);
|
||||
|
@@ -21,13 +21,11 @@
|
||||
<xi:include href="xml/general.xml" />
|
||||
<xi:include href="xml/gdkdisplaymanager.xml" />
|
||||
<xi:include href="xml/gdkdisplay.xml" />
|
||||
<xi:include href="xml/gdkscreen.xml" />
|
||||
<xi:include href="xml/gdkseat.xml" />
|
||||
<xi:include href="xml/gdkmonitor.xml" />
|
||||
<xi:include href="xml/gdkdevice.xml" />
|
||||
<xi:include href="xml/gdkdevicepad.xml" />
|
||||
<xi:include href="xml/gdkmonitor.xml" />
|
||||
<xi:include href="xml/regions.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
<xi:include href="xml/textures.xml" />
|
||||
<xi:include href="xml/rgba_colors.xml" />
|
||||
<xi:include href="xml/cursors.xml" />
|
||||
@@ -35,25 +33,25 @@
|
||||
<xi:include href="xml/gdkframeclock.xml" />
|
||||
<xi:include href="xml/gdkframetimings.xml" />
|
||||
<xi:include href="xml/gdkdrawingcontext.xml" />
|
||||
<xi:include href="xml/gdkdrawcontext.xml" />
|
||||
<xi:include href="xml/gdkglcontext.xml" />
|
||||
<xi:include href="xml/gdkvulkancontext.xml" />
|
||||
<xi:include href="xml/events.xml" />
|
||||
<xi:include href="xml/event_structs.xml" />
|
||||
<xi:include href="xml/keys.xml" />
|
||||
<xi:include href="xml/selections.xml" />
|
||||
<xi:include href="xml/gdkclipboard.xml" />
|
||||
<xi:include href="xml/dnd.xml" />
|
||||
<xi:include href="xml/gdkcontentformats.xml" />
|
||||
<xi:include href="xml/gdkcontentprovider.xml" />
|
||||
<xi:include href="xml/gdkcontentserializer.xml" />
|
||||
<xi:include href="xml/gdkcontentdeserializer.xml" />
|
||||
<xi:include href="xml/properties.xml" />
|
||||
<xi:include href="xml/threads.xml" />
|
||||
<xi:include href="xml/gdkapplaunchcontext.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
<xi:include href="xml/pango_interaction.xml" />
|
||||
<xi:include href="xml/cairo_interaction.xml" />
|
||||
<xi:include href="xml/x_interaction.xml" />
|
||||
<xi:include href="xml/wayland_interaction.xml" />
|
||||
<xi:include href="xml/gdkapplaunchcontext.xml" />
|
||||
</reference>
|
||||
|
||||
<reference>
|
||||
<title>Deprecated</title>
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
</reference>
|
||||
|
||||
<index id="api-index-full">
|
||||
|
@@ -4,29 +4,6 @@
|
||||
<SECTION>
|
||||
<TITLE>General</TITLE>
|
||||
<FILE>general</FILE>
|
||||
gdk_notify_startup_complete
|
||||
gdk_notify_startup_complete_with_id
|
||||
gdk_set_allowed_backends
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_program_class
|
||||
gdk_set_program_class
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_flush
|
||||
|
||||
|
||||
<SUBSECTION>
|
||||
GdkGrabStatus
|
||||
gdk_set_double_click_time
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_beep
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_error_trap_push
|
||||
gdk_error_trap_pop
|
||||
gdk_error_trap_pop_ignored
|
||||
|
||||
<SUBSECTION>
|
||||
GDK_WINDOWING_X11
|
||||
@@ -43,6 +20,13 @@ GDK_VERSION_3_8
|
||||
GDK_VERSION_3_10
|
||||
GDK_VERSION_3_12
|
||||
GDK_VERSION_3_14
|
||||
GDK_VERSION_3_16
|
||||
GDK_VERSION_3_18
|
||||
GDK_VERSION_3_20
|
||||
GDK_VERSION_3_22
|
||||
GDK_VERSION_3_90
|
||||
GDK_VERSION_3_92
|
||||
GDK_VERSION_3_94
|
||||
GDK_VERSION_MIN_REQUIRED
|
||||
GDK_VERSION_MAX_ALLOWED
|
||||
GDK_DISABLE_DEPRECATION_WARNINGS
|
||||
@@ -72,7 +56,6 @@ gdk_input_source_get_type
|
||||
gdk_modifier_intent_get_type
|
||||
gdk_modifier_type_get_type
|
||||
gdk_notify_type_get_type
|
||||
gdk_property_state_get_type
|
||||
gdk_prop_mode_get_type
|
||||
gdk_scroll_direction_get_type
|
||||
gdk_setting_action_get_type
|
||||
@@ -86,6 +69,51 @@ gdk_window_type_get_type
|
||||
gdk_window_type_hint_get_type
|
||||
gdk_wm_decoration_get_type
|
||||
gdk_wm_function_get_type
|
||||
GDK_AVAILABLE_IN_3_0
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GDK_AVAILABLE_IN_3_12
|
||||
GDK_AVAILABLE_IN_3_14
|
||||
GDK_AVAILABLE_IN_3_16
|
||||
GDK_AVAILABLE_IN_3_18
|
||||
GDK_AVAILABLE_IN_3_2
|
||||
GDK_AVAILABLE_IN_3_20
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GDK_AVAILABLE_IN_3_4
|
||||
GDK_AVAILABLE_IN_3_6
|
||||
GDK_AVAILABLE_IN_3_8
|
||||
GDK_AVAILABLE_IN_3_90
|
||||
GDK_AVAILABLE_IN_3_92
|
||||
GDK_AVAILABLE_IN_3_94
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_UNAVAILABLE
|
||||
GDK_DEPRECATED
|
||||
GDK_DEPRECATED_FOR
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
GDK_DEPRECATED_IN_3_0_FOR
|
||||
GDK_DEPRECATED_IN_3_10
|
||||
GDK_DEPRECATED_IN_3_10_FOR
|
||||
GDK_DEPRECATED_IN_3_12
|
||||
GDK_DEPRECATED_IN_3_12_FOR
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GDK_DEPRECATED_IN_3_14_FOR
|
||||
GDK_DEPRECATED_IN_3_16
|
||||
GDK_DEPRECATED_IN_3_16_FOR
|
||||
GDK_DEPRECATED_IN_3_18
|
||||
GDK_DEPRECATED_IN_3_18_FOR
|
||||
GDK_DEPRECATED_IN_3_2
|
||||
GDK_DEPRECATED_IN_3_20
|
||||
GDK_DEPRECATED_IN_3_20_FOR
|
||||
GDK_DEPRECATED_IN_3_22
|
||||
GDK_DEPRECATED_IN_3_22_FOR
|
||||
GDK_DEPRECATED_IN_3_2_FOR
|
||||
GDK_DEPRECATED_IN_3_4
|
||||
GDK_DEPRECATED_IN_3_4_FOR
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
GDK_DEPRECATED_IN_3_6_FOR
|
||||
GDK_DEPRECATED_IN_3_8
|
||||
GDK_DEPRECATED_IN_3_8_FOR
|
||||
GDK_VERSION_CUR_STABLE
|
||||
GDK_VERSION_PREV_STABLE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -95,7 +123,6 @@ GdkDisplay
|
||||
gdk_display_open
|
||||
gdk_display_get_default
|
||||
gdk_display_get_name
|
||||
gdk_display_get_device_manager
|
||||
gdk_display_device_is_grabbed
|
||||
gdk_display_beep
|
||||
gdk_display_sync
|
||||
@@ -106,19 +133,9 @@ gdk_display_get_event
|
||||
gdk_display_peek_event
|
||||
gdk_display_put_event
|
||||
gdk_display_has_pending
|
||||
gdk_display_set_double_click_time
|
||||
gdk_display_set_double_click_distance
|
||||
gdk_display_is_rgba
|
||||
gdk_display_is_composited
|
||||
gdk_display_supports_cursor_color
|
||||
gdk_display_supports_cursor_alpha
|
||||
gdk_display_get_default_cursor_size
|
||||
gdk_display_get_maximal_cursor_size
|
||||
gdk_display_get_default_group
|
||||
gdk_display_supports_selection_notification
|
||||
gdk_display_request_selection_notification
|
||||
gdk_display_supports_clipboard_persistence
|
||||
gdk_display_store_clipboard
|
||||
gdk_display_supports_shapes
|
||||
gdk_display_supports_input_shapes
|
||||
gdk_display_get_app_launch_context
|
||||
@@ -130,6 +147,10 @@ gdk_display_get_monitor
|
||||
gdk_display_get_primary_monitor
|
||||
gdk_display_get_monitor_at_point
|
||||
gdk_display_get_monitor_at_window
|
||||
gdk_display_get_clipboard
|
||||
gdk_display_get_primary_clipboard
|
||||
gdk_display_get_setting
|
||||
gdk_display_get_keymap
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY
|
||||
@@ -155,6 +176,9 @@ gdk_display_manager_set_default_display
|
||||
gdk_display_manager_list_displays
|
||||
gdk_display_manager_open_display
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_set_allowed_backends
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY_MANAGER
|
||||
GDK_DISPLAY_MANAGER_CLASS
|
||||
@@ -197,13 +221,14 @@ gdk_rgba_get_type
|
||||
<FILE>windows</FILE>
|
||||
GdkWindow
|
||||
GdkWindowType
|
||||
GdkWindowWindowClass
|
||||
GdkWindowClass
|
||||
GdkWindowHints
|
||||
GdkGeometry
|
||||
GdkGravity
|
||||
GdkAnchorHints
|
||||
GdkWindowEdge
|
||||
GdkWindowTypeHint
|
||||
GdkWindowState
|
||||
gdk_window_new_toplevel
|
||||
gdk_window_new_popup
|
||||
gdk_window_new_temp
|
||||
@@ -260,7 +285,6 @@ gdk_window_get_scale_factor
|
||||
gdk_window_set_opaque_region
|
||||
gdk_window_create_gl_context
|
||||
gdk_window_create_vulkan_context
|
||||
gdk_window_mark_paint_from_clip
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_get_clip_region
|
||||
@@ -348,10 +372,6 @@ gdk_window_get_device_cursor
|
||||
gdk_window_set_device_cursor
|
||||
gdk_window_get_device_events
|
||||
gdk_window_set_device_events
|
||||
gdk_window_get_source_events
|
||||
gdk_window_set_source_events
|
||||
gdk_window_get_event_compression
|
||||
gdk_window_set_event_compression
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_coords_from_parent
|
||||
@@ -374,6 +394,7 @@ GDK_TYPE_WINDOW_TYPE
|
||||
GDK_TYPE_WINDOW_TYPE_HINT
|
||||
GDK_TYPE_WM_DECORATION
|
||||
GDK_TYPE_WM_FUNCTION
|
||||
GDK_TYPE_WINDOW_STATE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_window_get_type
|
||||
@@ -387,53 +408,53 @@ gdk_fullscreen_mode_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Selections</TITLE>
|
||||
<FILE>selections</FILE>
|
||||
GDK_SELECTION_PRIMARY
|
||||
GDK_SELECTION_SECONDARY
|
||||
GDK_SELECTION_CLIPBOARD
|
||||
GDK_TARGET_BITMAP
|
||||
GDK_TARGET_COLORMAP
|
||||
GDK_TARGET_DRAWABLE
|
||||
GDK_TARGET_PIXMAP
|
||||
GDK_TARGET_STRING
|
||||
GDK_SELECTION_TYPE_ATOM
|
||||
GDK_SELECTION_TYPE_BITMAP
|
||||
GDK_SELECTION_TYPE_COLORMAP
|
||||
GDK_SELECTION_TYPE_DRAWABLE
|
||||
GDK_SELECTION_TYPE_INTEGER
|
||||
GDK_SELECTION_TYPE_PIXMAP
|
||||
GDK_SELECTION_TYPE_WINDOW
|
||||
GDK_SELECTION_TYPE_STRING
|
||||
gdk_selection_owner_set
|
||||
gdk_selection_owner_set_for_display
|
||||
gdk_selection_owner_get
|
||||
gdk_selection_owner_get_for_display
|
||||
gdk_selection_convert
|
||||
gdk_selection_property_get
|
||||
gdk_selection_send_notify
|
||||
gdk_selection_send_notify_for_display
|
||||
<FILE>gdkcontentformats</FILE>
|
||||
<TITLE>Content Formats</TITLE>
|
||||
gdk_intern_mime_type
|
||||
|
||||
<SUBSECTION>
|
||||
GdkContentFormats
|
||||
gdk_content_formats_new
|
||||
gdk_content_formats_new_for_gtype
|
||||
gdk_content_formats_ref
|
||||
gdk_content_formats_unref
|
||||
gdk_content_formats_print
|
||||
gdk_content_formats_to_string
|
||||
gdk_content_formats_get_gtypes
|
||||
gdk_content_formats_get_mime_types
|
||||
gdk_content_formats_union
|
||||
gdk_content_formats_match
|
||||
gdk_content_formats_match_gtype
|
||||
gdk_content_formats_match_mime_type
|
||||
gdk_content_formats_contain_gtype
|
||||
gdk_content_formats_contain_mime_type
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_content_formats_union_serialize_gtypes
|
||||
gdk_content_formats_union_deserialize_gtypes
|
||||
gdk_content_formats_union_serialize_mime_types
|
||||
gdk_content_formats_union_deserialize_mime_types
|
||||
|
||||
<SUBSECTION>
|
||||
GdkContentFormatsBuilder
|
||||
gdk_content_formats_builder_new
|
||||
gdk_content_formats_builder_free
|
||||
gdk_content_formats_builder_add_formats
|
||||
gdk_content_formats_builder_add_gtype
|
||||
gdk_content_formats_builder_add_mime_type
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_TYPE_FILE_LIST
|
||||
gdk_file_list_get_type
|
||||
gdk_content_formats_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Properties and Atoms</TITLE>
|
||||
<FILE>properties</FILE>
|
||||
GdkAtom
|
||||
GDK_ATOM_TO_POINTER
|
||||
GDK_POINTER_TO_ATOM
|
||||
GDK_NONE
|
||||
gdk_text_property_to_utf8_list_for_display
|
||||
gdk_utf8_to_string_target
|
||||
gdk_atom_intern
|
||||
gdk_atom_intern_static_string
|
||||
gdk_atom_name
|
||||
gdk_property_get
|
||||
gdk_property_change
|
||||
GdkPropMode
|
||||
gdk_property_delete
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_PROP_MODE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -497,8 +518,6 @@ gdk_threads_add_timeout_seconds_full
|
||||
<FILE>keys</FILE>
|
||||
GdkKeymap
|
||||
GdkKeymapKey
|
||||
gdk_keymap_get_default
|
||||
gdk_keymap_get_for_display
|
||||
gdk_keymap_lookup_key
|
||||
gdk_keymap_translate_keyboard_state
|
||||
gdk_keymap_get_entries_for_keyval
|
||||
@@ -611,6 +630,8 @@ GDK_DEVICE_GET_CLASS
|
||||
GDK_IS_DEVICE
|
||||
GDK_IS_DEVICE_CLASS
|
||||
GDK_TYPE_DEVICE
|
||||
GDK_DEVICE_TOOL
|
||||
GDK_IS_DEVICE_TOOL
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkDeviceClass
|
||||
@@ -635,6 +656,7 @@ gdk_device_pad_get_feature_group
|
||||
GDK_TYPE_DEVICE_PAD
|
||||
GDK_DEVICE_PAD
|
||||
GDK_IS_DEVICE_PAD
|
||||
GDK_DEVICE_PAD_GET_IFACE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_device_pad_get_type
|
||||
@@ -645,6 +667,7 @@ gdk_device_pad_get_type
|
||||
<FILE>gdkseat</FILE>
|
||||
GdkSeat
|
||||
GdkSeatCapabilities
|
||||
GdkGrabStatus
|
||||
GdkSeatGrabPrepareFunc
|
||||
gdk_seat_get_display
|
||||
gdk_seat_grab
|
||||
@@ -653,6 +676,7 @@ gdk_seat_get_capabilities
|
||||
gdk_seat_get_pointer
|
||||
gdk_seat_get_keyboard
|
||||
gdk_seat_get_slaves
|
||||
gdk_seat_get_master_pointers
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_SEAT
|
||||
@@ -665,32 +689,15 @@ gdk_seat_get_type
|
||||
gdk_seat_capabilities_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>GdkDeviceManager</TITLE>
|
||||
<FILE>gdkdevicemanager</FILE>
|
||||
GdkDeviceManager
|
||||
gdk_disable_multidevice
|
||||
gdk_device_manager_get_display
|
||||
gdk_device_manager_list_devices
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DEVICE_MANAGER
|
||||
GDK_DEVICE_MANAGER_CLASS
|
||||
GDK_DEVICE_MANAGER_GET_CLASS
|
||||
GDK_IS_DEVICE_MANAGER
|
||||
GDK_IS_DEVICE_MANAGER_CLASS
|
||||
GDK_TYPE_DEVICE_MANAGER
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkDeviceManagerClass
|
||||
gdk_device_manager_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Events</TITLE>
|
||||
<FILE>events</FILE>
|
||||
GdkEvent
|
||||
GdkEventType
|
||||
GdkEventMask
|
||||
GdkScrollDirection
|
||||
GdkCrossingMode
|
||||
GdkNotifyType
|
||||
GDK_CURRENT_TIME
|
||||
GDK_PRIORITY_EVENTS
|
||||
GDK_PRIORITY_REDRAW
|
||||
@@ -701,14 +708,10 @@ GDK_BUTTON_MIDDLE
|
||||
GDK_BUTTON_SECONDARY
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_events_pending
|
||||
gdk_event_peek
|
||||
gdk_event_get
|
||||
gdk_event_put
|
||||
gdk_event_new
|
||||
gdk_event_copy
|
||||
gdk_event_free
|
||||
gdk_event_get_axis
|
||||
gdk_event_get_axes
|
||||
gdk_event_get_button
|
||||
gdk_event_get_click_count
|
||||
gdk_event_get_coords
|
||||
@@ -724,7 +727,6 @@ gdk_event_get_window
|
||||
gdk_event_get_event_type
|
||||
GdkEventSequence
|
||||
gdk_event_get_event_sequence
|
||||
gdk_event_request_motions
|
||||
gdk_events_get_angle
|
||||
gdk_events_get_center
|
||||
gdk_events_get_distance
|
||||
@@ -732,7 +734,25 @@ gdk_event_triggers_context_menu
|
||||
gdk_event_get_seat
|
||||
gdk_event_get_scancode
|
||||
gdk_event_get_pointer_emulated
|
||||
|
||||
gdk_event_get_crossing_detail
|
||||
gdk_event_get_crossing_mode
|
||||
gdk_event_get_drag_context
|
||||
gdk_event_get_focus_in
|
||||
gdk_event_get_grab_window
|
||||
gdk_event_get_history
|
||||
gdk_event_get_key_group
|
||||
gdk_event_get_key_is_modifier
|
||||
gdk_event_get_pad_axis_value
|
||||
gdk_event_get_pad_button
|
||||
gdk_event_get_pad_group_mode
|
||||
gdk_event_get_string
|
||||
gdk_event_get_touch_emulating_pointer
|
||||
gdk_event_get_touchpad_angle_delta
|
||||
gdk_event_get_touchpad_deltas
|
||||
gdk_event_get_touchpad_gesture_n_fingers
|
||||
gdk_event_get_touchpad_gesture_phase
|
||||
gdk_event_get_touchpad_scale
|
||||
gdk_event_is_sent
|
||||
<SUBSECTION>
|
||||
gdk_event_handler_set
|
||||
GdkEventFunc
|
||||
@@ -750,59 +770,14 @@ gdk_event_get_device_tool
|
||||
gdk_event_set_device_tool
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_EVENT
|
||||
GDK_TYPE_EVENT_MASK
|
||||
GDK_TYPE_EVENT_TYPE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Event Structures</TITLE>
|
||||
<FILE>event_structs</FILE>
|
||||
GdkEvent
|
||||
|
||||
<SUBSECTION>
|
||||
GdkEventAny
|
||||
GdkEventKey
|
||||
GdkEventButton
|
||||
GdkEventTouch
|
||||
GdkEventScroll
|
||||
GdkEventMotion
|
||||
GdkEventExpose
|
||||
GdkEventCrossing
|
||||
GdkEventFocus
|
||||
GdkEventConfigure
|
||||
GdkEventProperty
|
||||
GdkEventSelection
|
||||
GdkEventDND
|
||||
GdkEventProximity
|
||||
GdkEventWindowState
|
||||
GdkEventOwnerChange
|
||||
GdkEventGrabBroken
|
||||
GdkEventTouchpadSwipe
|
||||
GdkEventTouchpadPinch
|
||||
GdkEventPadButton
|
||||
GdkEventPadAxis
|
||||
GdkEventPadGroupMode
|
||||
|
||||
<SUBSECTION>
|
||||
GdkScrollDirection
|
||||
GdkCrossingMode
|
||||
GdkNotifyType
|
||||
GdkPropertyState
|
||||
GdkWindowState
|
||||
GdkOwnerChange
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_CROSSING_MODE
|
||||
GDK_TYPE_EVENT
|
||||
GDK_TYPE_NOTIFY_TYPE
|
||||
GDK_TYPE_PROPERTY_STATE
|
||||
GDK_TYPE_SCROLL_DIRECTION
|
||||
GDK_TYPE_WINDOW_STATE
|
||||
GDK_TYPE_OWNER_CHANGE
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_TYPE_NOTIFY_TYPE
|
||||
GDK_IS_EVENT
|
||||
gdk_event_get_type
|
||||
gdk_owner_change_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -810,35 +785,39 @@ gdk_owner_change_get_type
|
||||
<FILE>textures</FILE>
|
||||
GdkTexture
|
||||
gdk_texture_new_for_data
|
||||
gdk_texture_new_for_surface
|
||||
gdk_texture_new_for_pixbuf
|
||||
gdk_texture_new_for_gl
|
||||
gdk_texture_new_from_resource
|
||||
gdk_texture_new_from_file
|
||||
gdk_texture_get_width
|
||||
gdk_texture_get_height
|
||||
gdk_texture_download
|
||||
gdk_texture_release_gl
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GdkTextureClass
|
||||
gdk_texture_get_type
|
||||
GDK_TYPE_TEXTURE
|
||||
GDK_IS_TEXTURE
|
||||
GDK_TEXTURE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Cursors</TITLE>
|
||||
<FILE>cursors</FILE>
|
||||
GdkCursor
|
||||
gdk_cursor_new_from_pixbuf
|
||||
gdk_cursor_new_from_surface
|
||||
gdk_cursor_new_from_texture
|
||||
gdk_cursor_new_from_name
|
||||
gdk_cursor_get_display
|
||||
gdk_cursor_get_fallback
|
||||
gdk_cursor_get_name
|
||||
gdk_cursor_get_texture
|
||||
gdk_cursor_get_hotspot_x
|
||||
gdk_cursor_get_hotspot_y
|
||||
gdk_cursor_get_texture
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_CURSOR
|
||||
GDK_CURSOR
|
||||
GDK_IS_CURSOR
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_cursor_get_type
|
||||
@@ -850,35 +829,24 @@ gdk_cursor_get_type
|
||||
<FILE>dnd</FILE>
|
||||
GdkDragContext
|
||||
GdkDragCancelReason
|
||||
gdk_drag_get_selection
|
||||
gdk_drag_abort
|
||||
gdk_drop_reply
|
||||
gdk_drag_drop
|
||||
gdk_drag_drop_done
|
||||
gdk_drag_find_window
|
||||
gdk_drag_begin
|
||||
gdk_drag_begin_for_device
|
||||
gdk_drag_begin_from_point
|
||||
gdk_drag_motion
|
||||
gdk_drop_finish
|
||||
GdkDragProtocol
|
||||
GdkDragAction
|
||||
gdk_drag_status
|
||||
gdk_drag_drop_succeeded
|
||||
gdk_window_get_drag_protocol
|
||||
|
||||
gdk_drag_context_get_display
|
||||
gdk_drag_context_get_actions
|
||||
gdk_drag_context_get_suggested_action
|
||||
gdk_drag_context_get_selected_action
|
||||
gdk_drag_context_list_targets
|
||||
gdk_drag_context_get_formats
|
||||
gdk_drag_context_get_device
|
||||
gdk_drag_context_set_device
|
||||
gdk_drag_context_get_source_window
|
||||
gdk_drag_context_get_dest_window
|
||||
gdk_drag_context_get_protocol
|
||||
gdk_drag_context_get_drag_window
|
||||
gdk_drag_context_set_hotspot
|
||||
gdk_drag_context_manage_dnd
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DRAG_CONTEXT
|
||||
@@ -907,7 +875,9 @@ gdk_x11_lookup_xdisplay
|
||||
gdk_x11_get_server_time
|
||||
gdk_x11_device_get_id
|
||||
gdk_x11_device_manager_lookup
|
||||
gdk_disable_multidevice
|
||||
gdk_x11_display_open
|
||||
gdk_x11_display_set_program_class
|
||||
gdk_x11_display_get_user_time
|
||||
gdk_x11_display_broadcast_startup_message
|
||||
gdk_x11_display_get_startup_notification_id
|
||||
@@ -936,7 +906,6 @@ gdk_x11_screen_get_current_desktop
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
gdk_x11_window_get_xid
|
||||
gdk_x11_window_set_hide_titlebar_when_maximized
|
||||
gdk_x11_window_set_theme_variant
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
@@ -948,13 +917,9 @@ gdk_x11_window_set_frame_sync_enabled
|
||||
gdk_x11_keymap_get_group_for_state
|
||||
gdk_x11_keymap_key_is_modifier
|
||||
gdk_x11_visual_get_xvisual
|
||||
gdk_x11_atom_to_xatom
|
||||
gdk_x11_atom_to_xatom_for_display
|
||||
gdk_x11_xatom_to_atom
|
||||
gdk_x11_xatom_to_atom_for_display
|
||||
gdk_x11_get_xatom_by_name
|
||||
gdk_x11_get_xatom_by_name_for_display
|
||||
gdk_x11_get_xatom_name
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
gdk_x11_set_sm_client_id
|
||||
gdk_x11_display_text_property_to_text_list
|
||||
@@ -1077,7 +1042,6 @@ gdk_wayland_device_get_wl_pointer
|
||||
gdk_wayland_device_get_wl_seat
|
||||
gdk_wayland_display_get_wl_compositor
|
||||
gdk_wayland_display_get_wl_display
|
||||
gdk_wayland_display_get_xdg_shell
|
||||
gdk_wayland_window_new_subsurface
|
||||
gdk_wayland_window_get_wl_surface
|
||||
gdk_wayland_window_set_use_custom_surface
|
||||
@@ -1124,7 +1088,6 @@ gdk_wayland_window_get_type
|
||||
<TITLE>Application launching</TITLE>
|
||||
<FILE>gdkapplaunchcontext</FILE>
|
||||
GdkAppLaunchContext
|
||||
gdk_app_launch_context_set_screen
|
||||
gdk_app_launch_context_set_desktop
|
||||
gdk_app_launch_context_set_timestamp
|
||||
gdk_app_launch_context_set_icon
|
||||
@@ -1155,9 +1118,21 @@ gdk_frame_clock_get_history_start
|
||||
gdk_frame_clock_get_timings
|
||||
gdk_frame_clock_get_current_timings
|
||||
gdk_frame_clock_get_refresh_info
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_FRAME_CLOCK
|
||||
GDK_FRAME_CLOCK_CLASS
|
||||
GDK_FRAME_CLOCK_GET_CLASS
|
||||
GDK_FRAME_CLOCK_IDLE
|
||||
GDK_FRAME_CLOCK_IDLE_CLASS
|
||||
GDK_FRAME_CLOCK_IDLE_GET_CLASS
|
||||
GDK_IS_FRAME_CLOCK
|
||||
GDK_IS_FRAME_CLOCK_CLASS
|
||||
GDK_IS_FRAME_CLOCK_IDLE
|
||||
GDK_IS_FRAME_CLOCK_IDLE_CLASS
|
||||
GdkFrameClockPrivate
|
||||
gdk_frame_clock_get_type
|
||||
gdk_frame_clock_idle_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -1173,7 +1148,7 @@ gdk_frame_timings_get_presentation_time
|
||||
gdk_frame_timings_get_refresh_interval
|
||||
gdk_frame_timings_get_predicted_presentation_time
|
||||
<SUBSECTION Private>
|
||||
gdk_frame_get_type
|
||||
gdk_frame_timings_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -1265,11 +1240,15 @@ gdk_drawing_context_get_window
|
||||
gdk_drawing_context_get_clip
|
||||
gdk_drawing_context_get_cairo_context
|
||||
gdk_drawing_context_is_valid
|
||||
gdk_drawing_context_get_paint_context
|
||||
|
||||
<SUBSECTION Standard>
|
||||
gdk_drawing_context_get_type
|
||||
GdkDrawingContextClass
|
||||
GDK_TYPE_DRAWING_CONTEXT
|
||||
GDK_DRAWING_CONTEXT_CLASS
|
||||
GDK_DRAWING_CONTEXT_GET_CLASS
|
||||
GDK_IS_DRAWING_CONTEXT_CLASS
|
||||
GDK_DRAWING_CONTEXT
|
||||
GDK_IS_DRAWING_CONTEXT
|
||||
</SECTION>
|
||||
@@ -1277,6 +1256,7 @@ GDK_IS_DRAWING_CONTEXT
|
||||
<SECTION>
|
||||
<FILE>gdkvulkancontext</FILE>
|
||||
GdkVulkanContext
|
||||
GdkVulkanError
|
||||
gdk_vulkan_context_get_device
|
||||
gdk_vulkan_context_get_draw_index
|
||||
gdk_vulkan_context_get_draw_semaphore
|
||||
@@ -1293,3 +1273,112 @@ gdk_vulkan_context_get_type
|
||||
gdk_vulkan_error_quark
|
||||
gdk_vulkan_strerror
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkclipboard</FILE>
|
||||
GdkClipboard
|
||||
gdk_clipboard_get_display
|
||||
gdk_clipboard_get_formats
|
||||
gdk_clipboard_is_local
|
||||
gdk_clipboard_get_content
|
||||
gdk_clipboard_store_async
|
||||
gdk_clipboard_store_finish
|
||||
gdk_clipboard_read_async
|
||||
gdk_clipboard_read_finish
|
||||
gdk_clipboard_read_value_async
|
||||
gdk_clipboard_read_value_finish
|
||||
gdk_clipboard_read_texture_async
|
||||
gdk_clipboard_read_texture_finish
|
||||
gdk_clipboard_read_text_async
|
||||
gdk_clipboard_read_text_finish
|
||||
gdk_clipboard_set_content
|
||||
gdk_clipboard_set
|
||||
gdk_clipboard_set_valist
|
||||
gdk_clipboard_set_value
|
||||
gdk_clipboard_set_text
|
||||
gdk_clipboard_set_texture
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_CLIPBOARD
|
||||
GDK_CLIPBOARD
|
||||
GDK_IS_CLIPBOARD
|
||||
gdk_clipboard_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkcontentprovider</FILE>
|
||||
GdkContentProvider
|
||||
gdk_content_provider_new_for_value
|
||||
gdk_content_provider_new_for_bytes
|
||||
gdk_content_provider_ref_formats
|
||||
gdk_content_provider_ref_storable_formats
|
||||
gdk_content_provider_content_changed
|
||||
gdk_content_provider_write_mime_type_async
|
||||
gdk_content_provider_write_mime_type_finish
|
||||
gdk_content_provider_get_value
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_CONTENT_PROVIDER
|
||||
GDK_CONTENT_PROVIDER_CLASS
|
||||
GDK_CONTENT_PROVIDER_GET_CLASS
|
||||
GDK_IS_CONTENT_PROVIDER
|
||||
GDK_IS_CONTENT_PROVIDER_CLASS
|
||||
GdkContentProviderClass
|
||||
gdk_content_provider_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkcontentserializer</FILE>
|
||||
GdkContentSerializer
|
||||
GdkContentSerializeFunc
|
||||
gdk_content_serializer_get_mime_type
|
||||
gdk_content_serializer_get_gtype
|
||||
gdk_content_serializer_get_value
|
||||
gdk_content_serializer_get_output_stream
|
||||
gdk_content_serializer_get_priority
|
||||
gdk_content_serializer_get_cancellable
|
||||
gdk_content_serializer_get_user_data
|
||||
gdk_content_serializer_set_task_data
|
||||
gdk_content_serializer_get_task_data
|
||||
gdk_content_serializer_return_success
|
||||
gdk_content_serializer_return_error
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_content_register_serializer
|
||||
gdk_content_serialize_async
|
||||
gdk_content_serialize_finish
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_CONTENT_SERIALIZER
|
||||
GDK_CONTENT_SERIALIZER
|
||||
GDK_IS_CONTENT_SERIALIZER
|
||||
gdk_content_serializer_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkcontentdeserializer</FILE>
|
||||
GdkContentDeserializer
|
||||
GdkContentDeserializeFunc
|
||||
gdk_content_deserializer_get_mime_type
|
||||
gdk_content_deserializer_get_gtype
|
||||
gdk_content_deserializer_get_value
|
||||
gdk_content_deserializer_get_input_stream
|
||||
gdk_content_deserializer_get_priority
|
||||
gdk_content_deserializer_get_cancellable
|
||||
gdk_content_deserializer_get_user_data
|
||||
gdk_content_deserializer_set_task_data
|
||||
gdk_content_deserializer_get_task_data
|
||||
gdk_content_deserializer_return_success
|
||||
gdk_content_deserializer_return_error
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_content_register_deserializer
|
||||
gdk_content_deserialize_async
|
||||
gdk_content_deserialize_finish
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_CONTENT_DESERIALIZER
|
||||
GDK_CONTENT_DESERIALIZER
|
||||
GDK_IS_CONTENT_DESERIALIZER
|
||||
gdk_content_deserializer_get_type
|
||||
</SECTION>
|
||||
|
@@ -1,7 +1,6 @@
|
||||
gdk_app_launch_context_get_type
|
||||
gdk_cursor_get_type
|
||||
gdk_device_get_type
|
||||
gdk_device_manager_get_type
|
||||
gdk_device_pad_get_type
|
||||
gdk_display_get_type
|
||||
gdk_display_manager_get_type
|
||||
@@ -11,7 +10,9 @@ gdk_frame_clock_get_type
|
||||
gdk_gl_context_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_monitor_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_seat_get_type
|
||||
gdk_visual_get_type
|
||||
gdk_window_get_type
|
||||
gdk_content_serializer_get_type
|
||||
gdk_content_deserializer_get_type
|
||||
gdk_clipboard_get_type
|
||||
gdk_content_formats_get_type
|
||||
|
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 189 B |
Before Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 202 B |
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 196 B |