Compare commits
622 Commits
wip/matthi
...
wip/ebassi
Author | SHA1 | Date | |
---|---|---|---|
|
3611fc9ab4 | ||
|
59bf3a08ed | ||
|
b1b0a25164 | ||
|
bfb4fe771c | ||
|
af6f9773ec | ||
|
7510615893 | ||
|
45d33f2e3a | ||
|
f0fa8e780b | ||
|
32885605c7 | ||
|
d9a6517d5f | ||
|
023f406c96 | ||
|
85407180cf | ||
|
6de0ecb78e | ||
|
199ad2c14b | ||
|
a0ee8f7f0a | ||
|
ff5304ee13 | ||
|
3f3a226090 | ||
|
f23e99b063 | ||
|
7f06f2818a | ||
|
dce4003c20 | ||
|
775e277ab9 | ||
|
0d407bcd6c | ||
|
289fc9640b | ||
|
5892bd72fa | ||
|
03742e83fb | ||
|
72ea348ad6 | ||
|
0943c9f6b2 | ||
|
c4224bf9d0 | ||
|
b97c490b87 | ||
|
321ddb8697 | ||
|
57d00e004a | ||
|
c8cab6a79a | ||
|
b4ebe4e5c1 | ||
|
9a8335a135 | ||
|
ca43f6ee28 | ||
|
eff09fabfa | ||
|
9c50b8bc2f | ||
|
3962b907bb | ||
|
657fcd0717 | ||
|
4e5ecb7052 | ||
|
bd86715ed3 | ||
|
b42d4b5b9a | ||
|
3f3c1768c9 | ||
|
b18ebbb164 | ||
|
fd9f7babf6 | ||
|
db50849d79 | ||
|
7b0929ad38 | ||
|
a961b05200 | ||
|
de8af76897 | ||
|
3d0f76801d | ||
|
5264209bf1 | ||
|
1dbbe7f251 | ||
|
28b9e16272 | ||
|
f3f64d17c2 | ||
|
bb6cce4e6f | ||
|
743d18c0f8 | ||
|
660c8b8f9b | ||
|
a9f14846e4 | ||
|
3ab7645ac1 | ||
|
7c397c621c | ||
|
11e22aadda | ||
|
dbe499bcfe | ||
|
430916973a | ||
|
d76c07836b | ||
|
69f8b4bb77 | ||
|
4dbe7c99c2 | ||
|
14e33ab0f5 | ||
|
3bed458723 | ||
|
f168de3ada | ||
|
d36f866b27 | ||
|
9d5fe26420 | ||
|
1a9845c176 | ||
|
6301827dac | ||
|
0b0d4765a0 | ||
|
5029e11473 | ||
|
106bc95771 | ||
|
73708b39ac | ||
|
0c387b27ee | ||
|
f54e28177c | ||
|
77ef33b095 | ||
|
e13f04a9fa | ||
|
1fcf9c8f6d | ||
|
d1d763ce58 | ||
|
a7e0695093 | ||
|
694ba1298e | ||
|
e7765daf64 | ||
|
abdd7137b3 | ||
|
8fb0950398 | ||
|
73a47181fa | ||
|
d08cc01b3c | ||
|
7fe6510800 | ||
|
fcd3321fa7 | ||
|
0fa3c3b731 | ||
|
17d798de11 | ||
|
e92e54c646 | ||
|
10b8c08203 | ||
|
c201cb3af0 | ||
|
b9f55dfd63 | ||
|
5759e2a334 | ||
|
b90ae2cfbf | ||
|
30c3d6af56 | ||
|
46b51e36b4 | ||
|
f39a7ecd63 | ||
|
16bca98305 | ||
|
b5d52a209d | ||
|
9c3802fc4b | ||
|
fe684078f9 | ||
|
9318dc1f3e | ||
|
76a5e3fc3c | ||
|
ebf703ff5a | ||
|
3d0e8cf2a8 | ||
|
57efcabfd6 | ||
|
386ead4243 | ||
|
0d5b4779b8 | ||
|
55751fc6fb | ||
|
64eca0bb2d | ||
|
d3adf47d9f | ||
|
eace965a19 | ||
|
6293a50501 | ||
|
cca2a22b63 | ||
|
5ae7f62f25 | ||
|
fab70d34d4 | ||
|
4151cb1202 | ||
|
de7c15636d | ||
|
d14305f380 | ||
|
0b58c96f06 | ||
|
6c939c0e72 | ||
|
b03784eb97 | ||
|
ca77de055b | ||
|
d288a134a4 | ||
|
fa9f22eec4 | ||
|
f516faaef8 | ||
|
1d04bdf845 | ||
|
783c302198 | ||
|
2893526a48 | ||
|
096bea3f0e | ||
|
0d18a429aa | ||
|
4b8dfd8825 | ||
|
3078f182b0 | ||
|
c81cd94b8f | ||
|
2b628e9e38 | ||
|
df98140e8e | ||
|
175cf7e32d | ||
|
101da71ee3 | ||
|
0dfd6a7b08 | ||
|
a4c93d12ea | ||
|
0bc7520651 | ||
|
38f71172f8 | ||
|
cd305c1970 | ||
|
ddcf47026d | ||
|
30d2dc49a8 | ||
|
f0f8d6d6b0 | ||
|
d4f0c9877d | ||
|
0d8993fb24 | ||
|
292e0c2663 | ||
|
301652de1f | ||
|
c34bb3b994 | ||
|
a99213100d | ||
|
4cce90d1e2 | ||
|
63be0deb0f | ||
|
e463e09577 | ||
|
46b789b0f4 | ||
|
16afc59f04 | ||
|
b5146317bb | ||
|
c891ceb31d | ||
|
358eec2972 | ||
|
7c21a32b28 | ||
|
7e7d7991cc | ||
|
f8bc35b9a6 | ||
|
49d5c9ed14 | ||
|
327777a291 | ||
|
7b81b56f7b | ||
|
4add8f3b63 | ||
|
0f476590fb | ||
|
126156e820 | ||
|
c134d52dd7 | ||
|
e405c27eee | ||
|
20592a7935 | ||
|
7116988bcb | ||
|
092cb9e202 | ||
|
7a0941c090 | ||
|
732316aca2 | ||
|
0c37b05716 | ||
|
effd40c39c | ||
|
6e2b9a1413 | ||
|
ce0a7fa560 | ||
|
8cda93d389 | ||
|
e24530d03b | ||
|
534ab9a9f0 | ||
|
1b84d75d10 | ||
|
840faeada1 | ||
|
d1d06bc47c | ||
|
fd81e801ab | ||
|
640c1b5a33 | ||
|
af49609b8f | ||
|
ac5b48e40c | ||
|
3cba63b2f8 | ||
|
ed147c88e1 | ||
|
c1d1042892 | ||
|
de3dabc865 | ||
|
82aa83b0f6 | ||
|
cd581c9e81 | ||
|
3c09783005 | ||
|
f16e58e9a7 | ||
|
8ead17ee76 | ||
|
1b8c9de09a | ||
|
55a76cbc31 | ||
|
5f5a02f3e5 | ||
|
0f116135f4 | ||
|
12dfb368e2 | ||
|
64710def82 | ||
|
9fac83783c | ||
|
1de2f21994 | ||
|
b938cfe5be | ||
|
ff3264b4c5 | ||
|
cb8817f710 | ||
|
d91b8c91d3 | ||
|
360a3c1690 | ||
|
cca894b912 | ||
|
46edfaa89c | ||
|
c50e774b29 | ||
|
ebb894cd64 | ||
|
c27b8b48ab | ||
|
27210f523b | ||
|
6b64c31f6d | ||
|
fe7be14db8 | ||
|
c14572fdae | ||
|
870a674283 | ||
|
27c1cce726 | ||
|
df38db70a0 | ||
|
c1d1d46d34 | ||
|
f7e6385506 | ||
|
1c4e609750 | ||
|
bf66cd1e94 | ||
|
5b19747ef8 | ||
|
0d78b67bca | ||
|
3ca9a218ec | ||
|
7df668f2ac | ||
|
0efe186d95 | ||
|
4ba1f19b03 | ||
|
1da048d19a | ||
|
1d0ba98d5d | ||
|
adc90b9e9d | ||
|
09aa48b748 | ||
|
3b75cadc41 | ||
|
449fd4a350 | ||
|
944f9d4f28 | ||
|
e0ab19a8f0 | ||
|
4ae6f10ae9 | ||
|
e75894da13 | ||
|
cb419794f8 | ||
|
71b360cc8e | ||
|
a72c4576b2 | ||
|
b049b3de25 | ||
|
2c2c60827e | ||
|
e74ecfe22e | ||
|
be201a5b71 | ||
|
38181bc3d2 | ||
|
ef7ccab188 | ||
|
8dd8c4a9de | ||
|
b579fa82fe | ||
|
9a03fc906a | ||
|
264b2b78cd | ||
|
ddb0740a21 | ||
|
bab628beb2 | ||
|
cb6b5e4017 | ||
|
73e799474a | ||
|
0fe0ee897d | ||
|
a047269428 | ||
|
a7ee3a6d80 | ||
|
8041c012fe | ||
|
6baac526b9 | ||
|
75e44c50ed | ||
|
de894f38b5 | ||
|
a829b26de1 | ||
|
55ea6e4dcc | ||
|
309c6dfaf8 | ||
|
71d6816817 | ||
|
449732446b | ||
|
8457dff08a | ||
|
df72478375 | ||
|
5ee745dfee | ||
|
ff0107a4ac | ||
|
9d038df7de | ||
|
e502702dd4 | ||
|
417eb0ad9c | ||
|
e5de6dd8b1 | ||
|
28625c16c0 | ||
|
8e62cee075 | ||
|
4151b6715c | ||
|
98f16fdf7a | ||
|
7f4b575fc3 | ||
|
172093db8c | ||
|
3a095ad454 | ||
|
15dbf35fd8 | ||
|
2655d929fe | ||
|
7afc6b1fd5 | ||
|
2148708917 | ||
|
8a308dd072 | ||
|
8bf148b006 | ||
|
2919e344ca | ||
|
71c1e86e62 | ||
|
0f1e42cd80 | ||
|
394fe0e675 | ||
|
952d0fd23f | ||
|
03d70f1636 | ||
|
f5d6688d3e | ||
|
6ae2c24bde | ||
|
29396a1e5e | ||
|
e9a58190af | ||
|
b5fb9ae3b7 | ||
|
1b7d7c857f | ||
|
3952bd60a5 | ||
|
026cb53875 | ||
|
5c1d0915af | ||
|
d92fda2103 | ||
|
79a0286ab1 | ||
|
044109c8c7 | ||
|
9026289381 | ||
|
a2f02f1ca8 | ||
|
0611cb4823 | ||
|
b6c4ba0e2a | ||
|
9d719b9989 | ||
|
837244809e | ||
|
8fc11ef2a5 | ||
|
96c18db0da | ||
|
88d0258397 | ||
|
055ce9f095 | ||
|
25c38df30e | ||
|
0d55542359 | ||
|
d0c4747bd3 | ||
|
46abbfebe2 | ||
|
210a747ff0 | ||
|
605e205584 | ||
|
bb8b459407 | ||
|
14967d8d7d | ||
|
0763a027c7 | ||
|
060c7d5c18 | ||
|
1d35f273d6 | ||
|
012904097a | ||
|
23df86e923 | ||
|
7449add82b | ||
|
dfdc7c3e0d | ||
|
c27c4e2048 | ||
|
e0e114fddb | ||
|
5a04edc57b | ||
|
1a4f000f3b | ||
|
f27dd21426 | ||
|
8f64e4a8e3 | ||
|
145b626c2f | ||
|
cb73becfb4 | ||
|
7700243bd4 | ||
|
71bb1bebc0 | ||
|
75df7c163d | ||
|
0e14456f15 | ||
|
4fe336930e | ||
|
9a3e97d6f0 | ||
|
a91fc65291 | ||
|
2968098f74 | ||
|
7855294594 | ||
|
3fd9bda06f | ||
|
0eefe81f37 | ||
|
db1a39a817 | ||
|
43312bb8c2 | ||
|
724d3be794 | ||
|
1951642c0e | ||
|
be5a105f2e | ||
|
f165bbda57 | ||
|
414e86fb95 | ||
|
044b5aa3d2 | ||
|
79a7e881b1 | ||
|
b45c7b508b | ||
|
971998de34 | ||
|
872b5115ea | ||
|
b993c7db63 | ||
|
a92ba06383 | ||
|
f848450a70 | ||
|
1379b4b175 | ||
|
88fed84d45 | ||
|
74f4e6e046 | ||
|
7d1da94455 | ||
|
d40778f728 | ||
|
2849f2fc9a | ||
|
fe25ba3c5f | ||
|
a942e96c8f | ||
|
5b03cf175a | ||
|
1620b7bda7 | ||
|
8bb4eb5544 | ||
|
3da73371b9 | ||
|
55537cccbd | ||
|
d7b5ea89eb | ||
|
e1cecd243a | ||
|
6225d435e6 | ||
|
0b88d7976c | ||
|
4f63d83955 | ||
|
aa99c64fdd | ||
|
61a454ffbe | ||
|
554de0be2a | ||
|
3b988ce523 | ||
|
3d182160bb | ||
|
bce4a0abde | ||
|
e0c34fd028 | ||
|
c574ef0954 | ||
|
73c91c285e | ||
|
0815b21ad4 | ||
|
7a7e3fc0e3 | ||
|
cf14fea5a8 | ||
|
c081ca2d4c | ||
|
f93eca5604 | ||
|
2fc0d6a91a | ||
|
6d953cb08e | ||
|
3ed8ac034d | ||
|
d857ba3faf | ||
|
874d4ede67 | ||
|
517f33b1a6 | ||
|
22cd8e9d4f | ||
|
d6ac55102e | ||
|
d58885c9b9 | ||
|
37b70a9733 | ||
|
c01befe5cc | ||
|
3df2e0b26a | ||
|
f3e6d930a8 | ||
|
c7bac91494 | ||
|
3c3aa478f9 | ||
|
1b22039649 | ||
|
5fc18c7167 | ||
|
c16c9e7c3f | ||
|
5199b66682 | ||
|
24c3906d5f | ||
|
51d58108f9 | ||
|
b596fcada7 | ||
|
5efb574055 | ||
|
7397fe0eab | ||
|
deaf664ed2 | ||
|
b8a86e6ca4 | ||
|
e7d84898ee | ||
|
36fead28e0 | ||
|
d1b07bc386 | ||
|
3fe08b3b28 | ||
|
9a87b6be2b | ||
|
f0c2d3a7a8 | ||
|
b584b3d12a | ||
|
bdb451ad86 | ||
|
99c2423043 | ||
|
519af3f91d | ||
|
fd373162b5 | ||
|
f51b15808a | ||
|
de76139fea | ||
|
5ab6ff6b5e | ||
|
2603011ea0 | ||
|
492a406bbd | ||
|
68ce676498 | ||
|
df22f3017b | ||
|
dcd20e17e5 | ||
|
7b9b661aea | ||
|
5993875d38 | ||
|
31a12c6a23 | ||
|
bbb45a2b2d | ||
|
f7108d4d43 | ||
|
bfcd9a2193 | ||
|
358d15ae5e | ||
|
921c154e38 | ||
|
117c0c0aea | ||
|
07f124e92d | ||
|
fe74c81a70 | ||
|
86ba132ded | ||
|
a763bd7df1 | ||
|
5a2eacfd04 | ||
|
4aa257b663 | ||
|
50f041bc57 | ||
|
268243834a | ||
|
cf144ea26f | ||
|
bad15d410e | ||
|
a89d03d6b8 | ||
|
d77dc25b8d | ||
|
b34c3dce2a | ||
|
6ee670b697 | ||
|
32674cb1d3 | ||
|
f10971eefd | ||
|
4a9cf8527e | ||
|
6664008815 | ||
|
96f0ed9ec5 | ||
|
5ba8a25d29 | ||
|
97d27ca2f8 | ||
|
5b7c06118c | ||
|
b64816ed8d | ||
|
d5b26eb034 | ||
|
8394317cc2 | ||
|
b744c07b44 | ||
|
2184c910eb | ||
|
940c77ad43 | ||
|
8ee4e45f8a | ||
|
64c2a65cc0 | ||
|
101cecf724 | ||
|
3ed9cb2488 | ||
|
159c65dcb8 | ||
|
de78627494 | ||
|
266ae74afc | ||
|
8ebb6969cb | ||
|
8a2061f581 | ||
|
7552b7fca8 | ||
|
3bc58d01e3 | ||
|
7200ac8e56 | ||
|
b0b1bf2f58 | ||
|
e92eaaa049 | ||
|
46cdb44fdd | ||
|
260d521dd7 | ||
|
5cf4de8f27 | ||
|
027702e453 | ||
|
31c5f0dc7f | ||
|
4dcd33f2d5 | ||
|
871b19f9dd | ||
|
92a496fdec | ||
|
df08fc91bd | ||
|
f9ba55eaad | ||
|
c2aa7d0749 | ||
|
c8d1108574 | ||
|
413d27508f | ||
|
3f8313c735 | ||
|
a3bff7d41e | ||
|
c9add3161f | ||
|
2f875129f1 | ||
|
6e47dad33d | ||
|
28042ef336 | ||
|
646492ceea | ||
|
9610675faf | ||
|
cc08a965be | ||
|
bccef4e41a | ||
|
90d28d6bbf | ||
|
ee58a52a61 | ||
|
1f87c1cc0b | ||
|
687d3eb48f | ||
|
29971b0cc9 | ||
|
399e8db336 | ||
|
40e40b7ffc | ||
|
48afd8a5f0 | ||
|
8fc1ca1ef2 | ||
|
99e92a60f2 | ||
|
fe80230985 | ||
|
7dc588c4d3 | ||
|
0d64582688 | ||
|
1b0c6e4aa1 | ||
|
abff6e23c0 | ||
|
9044f78751 | ||
|
6db7de3f7b | ||
|
af1c873bca | ||
|
d83ad00f9e | ||
|
e6c408c08a | ||
|
b3dc473057 | ||
|
a970ba5ef6 | ||
|
7b68bdb831 | ||
|
6a88ac3b4c | ||
|
2800b00e1d | ||
|
50e057e025 | ||
|
511f138328 | ||
|
d57ebe2de7 | ||
|
5237b7a6b0 | ||
|
dc8b80cd32 | ||
|
7ad64a20aa | ||
|
2ff62595ed | ||
|
62b224a8df | ||
|
3909f818c4 | ||
|
46b120b35e | ||
|
f2979323bf | ||
|
e71d09e9cb | ||
|
f1cbd9ca13 | ||
|
057ae4ace0 | ||
|
b3ca11a6cb | ||
|
83e775147f | ||
|
d3a3d0673f | ||
|
6628ffd686 | ||
|
48239ad720 | ||
|
cd1604ae1c | ||
|
fb32f11e3d | ||
|
4f6bc82052 | ||
|
0f6be24e28 | ||
|
72884a274c | ||
|
7cc0850a5a | ||
|
d4d032795d | ||
|
45b4d765c0 | ||
|
af894af386 | ||
|
6febc22918 | ||
|
8e917093df | ||
|
b465ede53b | ||
|
89b7f859a4 | ||
|
505dac94be | ||
|
6c2a078bf2 | ||
|
9e72d24b23 | ||
|
8b2fd3ed1b | ||
|
9a81b65959 | ||
|
0287ec7e89 | ||
|
6286883e8d | ||
|
6d73e75153 | ||
|
5a25c5a9f2 | ||
|
6824dd7b8a | ||
|
d5f141a9b7 | ||
|
4ba95b09ba | ||
|
0f962f1075 | ||
|
32d7ba76b3 | ||
|
adff59843b | ||
|
be6784c7ea | ||
|
28fc4de6aa | ||
|
93363551d7 | ||
|
becc0d45b6 | ||
|
6a5224ffcb | ||
|
a8c59543cf | ||
|
bf8653c2e1 | ||
|
85e37925f0 | ||
|
d5b78d474a | ||
|
2f0354fcf9 | ||
|
8ef12fda83 | ||
|
9bfc8371fe | ||
|
59e40f3d6f | ||
|
62a7447c5f | ||
|
f052f1554b | ||
|
58891c1fe5 | ||
|
d23c6c6246 | ||
|
f2f1725b40 | ||
|
2784eacf00 | ||
|
b1205a9c96 | ||
|
4bfa6c30bf | ||
|
84dfda1a2b |
@@ -22,6 +22,7 @@ EXTRA_DIST += \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/po2tbl.sed.in \
|
||||
build-aux/config.rpath \
|
||||
make-pot
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
@@ -110,7 +111,6 @@ GITIGNOREFILES = \
|
||||
po-properties/*.gmo \
|
||||
po-properties/*.mo \
|
||||
po-properties/POTFILES \
|
||||
po-properties/stamp-it \
|
||||
po-properties/.intltool-merge-cache
|
||||
po-properties/stamp-it
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
185
NEWS
185
NEWS
@@ -1,3 +1,188 @@
|
||||
Overview of Changes in GTK+ 3.21.2
|
||||
==================================
|
||||
|
||||
* GTK+ is now using upstream gettext instead of the GLib wrappers.
|
||||
This adds a requirement for the fairly recent gettext 0.19.7 release
|
||||
|
||||
* GDK has a new GdkMonitor api that offers richer information about
|
||||
connected outputs
|
||||
|
||||
* Bugs fixed:
|
||||
373745 Do not use AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR) and use gettext...
|
||||
682080 Gtk:ERROR:gtktoolbar.c:2271:logical_to_physical: assertion failed:...
|
||||
747206 gtktextview: note on how to get line spacing between two paragraphs
|
||||
756570 gtkplacesview no longer provides guidance on address formats
|
||||
759037 GtkInfoBar: documentation not updated wrt background colors and me...
|
||||
763852 gdk/wayland: event source is not multi-thread aware
|
||||
764395 nautilus crashed on double clicking 'other locations'
|
||||
765471 CellRendererText shows edit entry in a wrong position for small cells
|
||||
765579 wayland: cache frequently accessed GtkSettings in wayland screen
|
||||
765676 gtk_paned_set_position doesn't work as advertised
|
||||
765700 GtkPaned use causes "How does the code know the size to allocate?"
|
||||
765742 GtkRedioButton and GtkCheckButton doesn't aligned right to left la...
|
||||
765790 W32: configure does not tell which cairo version to use
|
||||
765793 configure script failure (cairo_win32_surface_create_with_format i...
|
||||
765858 file chooser generates a warning about a network path
|
||||
765907 [Wayland] Reversed scrolling GDK_SCROLL_UP/GDK_SCROLL_DOWN in Wayl...
|
||||
765922 GtkScale labels extend past edge of widget and overlap neighboring...
|
||||
765924 Improve external drives detection
|
||||
765939 [Wayland] very slow scrolling in GtkMenu using the touchpad
|
||||
765966 settings: fix initial value for gtk-font-name
|
||||
765973 GtkRevealer need to always send "child-revealed" signal at end of ...
|
||||
765981 fts warning from tracker when searching for files with "-" in name
|
||||
766049 wayland: use g_signal_handler_disconnect()
|
||||
766120 Scale draw_value() align changed from centre/right (H/V) to left, ...
|
||||
766166 key bindings in gtk.css are ignored
|
||||
766175 Translation of quotes may misinterpreted by GTK sidebar
|
||||
766207 Fix build on pre-C99 compilers
|
||||
766233 Crash when server does not support XI2
|
||||
766314 Spurious leave-notify event after touch up
|
||||
766323 GTKPopover gives warnings if visible when reparented
|
||||
766336 Crash when selecting rows with rubberbanding
|
||||
766405 Stack shows incorrect frame in widget factory on wayland
|
||||
766440 Scale slider button has stopped discerning & rendering appropriate...
|
||||
766442 Broken drag & drop between windows
|
||||
766458 widget: fix GtkLabelAccessible NULL links.
|
||||
766530 scrolledwindow: Fix typo in get_preferred_height calculation
|
||||
766566 Wayland: gdk_screen_get_monitor_at_window() unreliable under Wayland
|
||||
766569 Better size requisition for GTK_SCROLL_NATURAL children
|
||||
766642 Switches in HeaderBars Are Badly Integrated
|
||||
766643 Frozen windows when unmapped with pending configure event
|
||||
766737 stack: Only map children when necessary
|
||||
766782 OpenGL in broadway leads to segmentation fault
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Brazilian Portuguese
|
||||
German
|
||||
Hungarian
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Occitan
|
||||
Portuguese
|
||||
Scottish Gaelic
|
||||
Slovak
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.21.1
|
||||
==================================
|
||||
|
||||
* The GNU Affero General Public License has been added to the list of
|
||||
predefined licenses in GtkAboutDialog
|
||||
|
||||
* GtkShortcutWindow can now follow changes to accelerators
|
||||
|
||||
* GdkSeat and GdkDevice gained API for device tools, to support drawing tablets
|
||||
|
||||
* GtkInspector can now slow down (or speed up) animations. This functionality
|
||||
is also available via the GTK_SLOWDOWN environment variable
|
||||
|
||||
* GdkGLContext can now be instructed to use GLES
|
||||
|
||||
* CSS:
|
||||
- Inconsistencies in font size handling have been fixed
|
||||
- The font shorthand is now parsed according to the CSS spec
|
||||
|
||||
* Windows:
|
||||
- Clipboard handling has been optimized
|
||||
- The CSD implementation has been improved
|
||||
|
||||
* Wayland:
|
||||
- We print more debug information about pixel formats, outputs, etc
|
||||
- The unstable tablet protocol is now supported
|
||||
- Virtual modifier handling has been improved
|
||||
- Reduce jitter in keyboard repeat
|
||||
- Fix problems with multiple display connections
|
||||
|
||||
* Bugs fixed:
|
||||
573380 gtk_tree_model_iter_parent() fails if the same iterator is used...
|
||||
620065 Several problems related to recent files
|
||||
693077 GtkRecentManager doesn't send "changed" when file is deleted
|
||||
730821 RFE: add gtk_clipboard_get_selection()
|
||||
743746 Add GLES 2.0 (and/or 3.0) profile
|
||||
749405 GtkMenuSectionBox doesn't remove submenus when parent item is r...
|
||||
761651 glade previewer is resizing windows until it crashes gnome-shell
|
||||
763013 GDK W32: AeroSnap doesn't work on CSD windows
|
||||
763600 trashmonitor: change trash monitoring process
|
||||
763627 menu-traditional puts popover beneath the text editor widget
|
||||
763768 Wrong margin used for the sidebar separator
|
||||
763783 GDK W32: Erase hidden layered windows before showing them
|
||||
763850 Add License GTK_LICENSE_AGPL_3_0 to GtkLicense enum
|
||||
763851 GDK W32: show_window_menu() is not implemented
|
||||
763907 GDK W32: Clipboard handling is not tight enough
|
||||
763913 GDK W32: Not all relevant debug info is printed for events
|
||||
764022 (totem:4131): Gtk-WARNING **: Negative content width -200 (alloc...
|
||||
764060 opening a second nautilus while a delete operation is in progres...
|
||||
764170 [HighContrastInverse] “suqqested-action” is white on lightgrey
|
||||
764174 Configuration dialog is too small
|
||||
764203 Default background color for the 'textview border' node
|
||||
764204 Primary and secondary carets/cursors not distinguishable by default
|
||||
764210 Strange Background Color on Emacs
|
||||
764261 gtkplacesviewrow: untranslated "%s / %s available"
|
||||
764321 window: Fix gtk_window_set_geometry_hints documentation
|
||||
764374 Busy loop while "Displays" page is active
|
||||
764376 UI glitch when entering keyboard shortcut
|
||||
764378 gtk3-demo won't run without hicolor-icon-theme
|
||||
764424 `Super` keybindings trigger without Super, on Wayland
|
||||
764585 Fix "format not a string literal" errors
|
||||
764664 Segfault when initializing WINTAB pressure-sensitive tablets (Wa...
|
||||
764686 build failure after "make distclean"
|
||||
764710 GtkListBox row CSS nodes do not reflect visual order
|
||||
764712 Build failure for Quartz backend in master branch due to gtkdnd-...
|
||||
764835 broadway: fix documentation, correct display port details
|
||||
764845 GDK: gdk_window_reparent creates circular reference in 'children...
|
||||
764846 Code improvements in GtkApplication
|
||||
764863 GtkTrayIcon: fix uninitialised variable
|
||||
764879 Extract GtkApplicationAccels private class from GtkApplication
|
||||
764925 Fix trivial typo in GtkWidget
|
||||
764975 GTKShortcutWindow runtime changes to accelerator not reflected i...
|
||||
764996 GDK: Incorrect window size when creating window with position sp...
|
||||
765038 Adwaita & decorations
|
||||
765065 Wayland: Hover state stuck after mouse leaving the toplevel
|
||||
765066 GtkColorChooser looks like it can select multiple colors
|
||||
765100 GDK: gdk_window_reparent does not position/size a reparented win...
|
||||
765118 W32: gtk-builder-tool botches output encoding
|
||||
765122 Duplicate/missing string in gtkprintbackendcups
|
||||
765195 Visual Studio builds: Update how introspection is done
|
||||
765213 info bars nearly unreadable in backdrop state because of gray fo...
|
||||
765238 gtktexthandle should avoid connecting to GtkWidget::draw
|
||||
765259 Save Windows scancode inside GdkEvent
|
||||
765261 listbox: Page up/Down don't do anything with large rows
|
||||
765270 wayland: Leave existing mods on map_virtual_modifiers
|
||||
765284 debug: reduce runtime overhead in debug builds
|
||||
765486 builtinicon: avoid calculating font-metrics in vast majority of ...
|
||||
765493 kineticscrolling: avoid stutter at tail of kinetic deceleration
|
||||
765496 Clean up gtklabel.c a bit
|
||||
765567 wayland: avoid jitter in keyboard repeat
|
||||
756570 gtkplacesview no longer provides guidance on address formats
|
||||
765474 Wayland: Dialogs without transient parent crash the inspector
|
||||
765565 Wayland: Inspector GtkLabel drag'n'drop crashes client
|
||||
765576 gtk+ leaks and hangs
|
||||
765577 gdk/dnd: Add missing signal parameter documentation
|
||||
765632 typo in GTK_STYLE_CLASS_LIST_ROW docs
|
||||
765640 pixelcache: reuse existing timeout source when possible
|
||||
765644 Widget sizing problems with GtkProgressBar
|
||||
|
||||
* Translation updates:
|
||||
Bulgarian
|
||||
Catalan
|
||||
Esperanto
|
||||
German
|
||||
Greek
|
||||
Hungarian
|
||||
Italian
|
||||
Lithuanian
|
||||
Persian
|
||||
Polish
|
||||
Scottish Gaelic
|
||||
Spanish
|
||||
Thai
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.20.1
|
||||
==================================
|
||||
|
||||
|
286
README.in
286
README.in
@@ -73,286 +73,10 @@ Patches should be in unified diff form. (The -up option to GNU diff)
|
||||
Even better are git-formatted patches. (Use git format-patch)
|
||||
|
||||
|
||||
Release notes for 3.20
|
||||
======================
|
||||
Release notes
|
||||
=============
|
||||
|
||||
* The way theming works in GTK+ has been reworked fundamentally, to
|
||||
implement many more CSS features and make themes more expressive.
|
||||
As a result, custom CSS that is shipped with applications and third-
|
||||
party themes will need adjustments. Widgets now use element names much
|
||||
more than style classes; type names are no longer used in style matching.
|
||||
Every widget now documents the element names it has and the style classes
|
||||
it uses. The GTK+ inspector can also help with finding this information.
|
||||
Release notes for releases of GTK+ 3.x are part of the migration
|
||||
guide in the GTK+ documentation. See
|
||||
|
||||
* GTK+ now uses internal subobjects (also known as gadgets) for allocating
|
||||
and drawing widget parts. Applications that subclass GTK+ widgets may see
|
||||
warnings if they override the size_allocate vfunc and don't chain up.
|
||||
The proper way to subclass is to chain up in size_allocate. If you do not
|
||||
want to do that for some reason, you have to override the draw vfunc as
|
||||
well.
|
||||
|
||||
* Several fixes for window sizing and window placement with client-side
|
||||
decorations may affect applications that are saving and restoring window
|
||||
sizes. The recommended best practice for this which is known to work with
|
||||
client-side and server-side decorations and with older and newer versions
|
||||
of GTK+ is to use gtk_window_get_size() to save window sizes and
|
||||
gtk_window_set_default_size() to restore it.
|
||||
See https://wiki.gnome.org/HowDoI/SaveWindowState for a detailed example.
|
||||
|
||||
* GtkDrawingArea used to implicitly render the theme background before
|
||||
calling the ::draw handler. This is no longer the case. If you rely
|
||||
on having a theme-provided background, call gtk_render_background()
|
||||
from your ::draw handler.
|
||||
|
||||
* The GtkFileChooser interface prerequisite changed from GtkWidget
|
||||
to GObject, allowing non-widget implementations of this interface.
|
||||
This is a minor change in ABI, as applications are no longer guaranteed
|
||||
that a GtkFileChooser also supports all GtkWidget methods. However, all
|
||||
previously existing implementations still derive from GtkWidget, so no
|
||||
existing code should break.
|
||||
|
||||
* The way in which GtkLevelBar determines the offset to apply was a bit
|
||||
inconsistent in the past; this has been fixed. Applications that are using
|
||||
custom offsets should double-check that their levels look as expected.
|
||||
|
||||
Release notes for 3.18
|
||||
======================
|
||||
|
||||
* The GtkListBox model support that was introduced in 3.16 has been
|
||||
changed to no longer call gtk_widget_show_all on rows created by
|
||||
the create_widget_func. You need to manage the visibility of child
|
||||
widgets yourself in your create_widget_func.
|
||||
|
||||
* The alpha component of foreground colors that are applied to
|
||||
GtkCellRendererText is no longer ignored. If you don't want your
|
||||
text to be translucent, use opaque colors.
|
||||
|
||||
Release notes for 3.16
|
||||
======================
|
||||
|
||||
* GTK+ now includes an OpenGL rendering widget. To support GL on various
|
||||
platforms, GTK+ uses libepoxy.
|
||||
|
||||
* GTK+ no longer uses gtk-update-icon-cache during its build. The
|
||||
--enable-gtk2-dependency configure option has been removed.
|
||||
|
||||
* The introspection annotations for the x and y parameters of
|
||||
GtkMenuPositionFunc have been corrected from 'out' to 'inout'.
|
||||
If you are using such a function from language-bindings, this
|
||||
may require adjustments.
|
||||
|
||||
* The lookup order for actions that are activated via keyboard
|
||||
accelerators has been changed to start at the currently focused
|
||||
widget. If your application is making use fo nested action groups
|
||||
via gtk_widget_insert_action_group, you may want to check that
|
||||
this change does not upset your accelerators.
|
||||
|
||||
* The GtkScrollable interface has gained a new vfunc, get_border,
|
||||
that is used to position overshoot and undershoot indications that
|
||||
are drawn over the content by GtkScrolledWindow. Unless your scrollable
|
||||
has non-scrolling parts similar to treeview headers, there is no need
|
||||
to implement this vfunc.
|
||||
|
||||
* The GtkSearchEntry widget has gained a number of new signals that
|
||||
are emitted when certain key sequences are seen. In particular, it
|
||||
now handles the Escape key and emits ::stop-search. Applications that
|
||||
expect to handle Escape themselves will need to be updated.
|
||||
|
||||
Release notes for 3.14
|
||||
======================
|
||||
|
||||
* A new state, GTK_STATE_FLAG_CHECKED, has been added for checked states
|
||||
of radio and check buttons and menuitems. Applications that are using
|
||||
GTK+ styles without widgets will need adjustments.
|
||||
|
||||
* Adwaita is now the default theme on all platforms.
|
||||
|
||||
* The icon theme code has become a little pickier about sizes and is not
|
||||
automatically scaling icons beyond the limits defined in the icon theme
|
||||
unless explicitly asked to do so with GTK_ICON_LOOKUP_FORCE_SIZE.
|
||||
|
||||
* GTK+ now includes an interactive debugger which can be activated with
|
||||
the keyboard shortcuts Ctrl-Shift-d or Ctrl-Shift-i. If these shortcuts
|
||||
interfere with application keybindings, they can be disabled with the
|
||||
setting org.gtk.Settings.Debug.enable-inspector-keybinding.
|
||||
|
||||
* Most widgets have been ported to use the new gesture framework internally
|
||||
for event handling. Traditional event handlers in derived widgets are still
|
||||
being called.
|
||||
|
||||
* Using GTK+ under X11 without the X Render extension has been observed
|
||||
to be problematic. This combination is using code paths in cairo and
|
||||
graphics drivers which are rarely tested and likely buggy.
|
||||
|
||||
* GtkTextView is now using a pixel-cache internally, and is drawing
|
||||
a background underneath the text. This can cause problems for applications
|
||||
which assumed that they could draw things below and above the text
|
||||
by chaining up in the ::draw implementation of their GtkTextView subclass.
|
||||
As a short-term workaround, you can make the application apply a
|
||||
custom theme to the text view with a transparent background. For
|
||||
a proper fix, use the new ::draw_layer vfunc.
|
||||
|
||||
Release notes for 3.12
|
||||
======================
|
||||
|
||||
* GtkWidget had a hack where if opacity is 0.999 we set up an opacity
|
||||
group when rendering the widget. This is no longer needed in 3.10,
|
||||
and GtkStack doesn't use it anymore. It has been removed in 3.12.
|
||||
GdStack is using it, so applications should be ported from GdStack
|
||||
to GtkStack in 3.12.
|
||||
|
||||
* GtkHeaderBar in 3.10 was not ordering its pack-end children in
|
||||
the right way. This has been fixed in 3.12. Applications which
|
||||
pack multiple widgets at the end of a headerbar will have to
|
||||
be updated.
|
||||
|
||||
* gtk_text_view_add_child_in_window has changed behaviour a bit.
|
||||
It now always positions the child in buffer coordinates, where
|
||||
it used to inconsistently scroll with the buffer but then go
|
||||
reposition to a window-relative position on redraw.
|
||||
|
||||
* A number of container widgets have been made more compliant with
|
||||
the uniform CSS rendering model by making them render backgrounds
|
||||
and borders. This may require some adjustments in applications that
|
||||
were making assumptions about containers never rendering backgrounds.
|
||||
|
||||
Release notes for 3.10
|
||||
======================
|
||||
|
||||
* GDK has been changed to allow only a single screen per display.
|
||||
Only the X11 backend had multiple screens before, and multi-screen
|
||||
setups (not multi-monitor!) are very rare nowadays. If you really
|
||||
need multiple X screens, open them as separate displays.
|
||||
|
||||
* The behavior of GtkBox::expand has been changed to never propagate
|
||||
up. Previously, this was happening inconsistently. If you want the
|
||||
expand to propagate, use the GtkWidget h/v expand properties.
|
||||
If you experience sizing problems with widgets in ported code,
|
||||
carefully check the expand and fill flags of your boxes.
|
||||
|
||||
* GtkBin no longer provides default implementations for
|
||||
get_height_for_width, subclasses now have to provide their own
|
||||
implementation if they need height-for-width functionality.
|
||||
|
||||
* Widget state propagation has been changed. Historically, all of
|
||||
active, prelight, selected, insensitive, inconsistent and backdrop
|
||||
have been propagated to children. This has now been restricted
|
||||
to just the insensitive and backdrop states. This mostly affects
|
||||
theming.
|
||||
|
||||
* The way widget drawing happens has changed. Earlier versions handled
|
||||
one expose event per GdkWindow, each with a separate cairo_t. Now we
|
||||
only handle the expose event on the toplevel and reuse the same
|
||||
cairo_t (with the right translation and clipping) for the entire
|
||||
widget hierarchy, recursing down via the GtkWidget::draw signal.
|
||||
Having all rendering in the same call tree allows effects like
|
||||
opacity and offscreen rendering of entire widget sub-hierarchies.
|
||||
Generally this should not require any changes in widgets, but
|
||||
code looking at e.g. the current expose event may see different
|
||||
behavior than before.
|
||||
|
||||
* The Gtk+ scrolling implementation has changed. gdk_window_scroll()
|
||||
and gdk_window_move_region() no longer copy the region on the
|
||||
window, but rather invalidate the entire scrolled region. This is
|
||||
slightly slower, but allowed us to implement a offscreen surface
|
||||
scrolling method which better fits modern hardware. Most scrolling
|
||||
widgets in Gtk+ have been converted to use this model for scrolling,
|
||||
but external widgets implementing scrolling using GdkWindow may see
|
||||
some slowdown.
|
||||
|
||||
Release notes for 3.8
|
||||
=====================
|
||||
|
||||
* GtkIconInfo has changed from being a boxed type to a GObject. This
|
||||
is technically an ABI change, but basically all existing code
|
||||
will keep working if its used as a boxed type, and its not
|
||||
possible to instantiate GtkIconInfos outside Gtk, so this is not
|
||||
expected to be a big problem.
|
||||
|
||||
Release notes for 3.6
|
||||
=====================
|
||||
|
||||
* The accessibility bridge code that exports accessible objects
|
||||
on the bus is now used by default; atk-bridge has been converted
|
||||
into a library that GTK+ links against. To void the linking,
|
||||
pass --without-atk-bridge when configuring GTK+.
|
||||
|
||||
* GDK threading support has been deprecated. It is recommended to
|
||||
use g_idle_add(), g_main_context_invoke() and similar funtions
|
||||
to make all GTK+ calls from the main thread.
|
||||
|
||||
* GTK+ now follows the XDG Base Directory specification for
|
||||
user configuration and data files. In detail,
|
||||
* $XDG_CONFIG_HOME/gtk-3.0/custom-papers is the new location
|
||||
for $HOME/.gtk-custom-papers
|
||||
* $XDG_CONFIG_HOME/gtk-3.0/bookmarks is the new location
|
||||
for $HOME/.gtk-bookmarks
|
||||
* $XDG_DATA_HOME/themes is preferred over $HOME/.themes
|
||||
* $XDG_DATA_HOME/icons is preferred over $HOME/.icons.
|
||||
Existing files from the old location will still be read
|
||||
if the new location does not exist.
|
||||
|
||||
* $HOME/.gtk-3.0 is no longer in the default module load path.
|
||||
If you want to load modules from there, add it to the GTK_PATH
|
||||
environment variable.
|
||||
|
||||
Release notes for 3.4
|
||||
=====================
|
||||
|
||||
* Scroll events have been separated from button events, and smooth
|
||||
scrolling has been added with a separate event mask. Widgets now
|
||||
need to have either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK in
|
||||
their event mask to receive scroll events. In addition, the
|
||||
GdkScrollDirection enumeration has gained a new member,
|
||||
GDK_SCROLL_SMOOTH, so switch statements will have to be amended
|
||||
to cover this case.
|
||||
|
||||
* GTK+ now uses <Primary> instead of <Control> in keyboard accelerators,
|
||||
for improved cross-platform handling. This should not affect
|
||||
applications, unless they parse or create these accelerator
|
||||
manually.
|
||||
|
||||
* The tacit assumption that the Alt key corresponds to the MOD1
|
||||
modifier under X11 is now a hard requirement.
|
||||
|
||||
* The beagle search backend for the file chooser has been dropped.
|
||||
Tracker is the only supported search backend on Linux now.
|
||||
|
||||
* GtkNotebook has been changed to destroy its action widgets when
|
||||
it gets destroyed itself. If your application is using action
|
||||
widgets in notebooks, you may have to adjust your code to take
|
||||
this into account.
|
||||
|
||||
* GtkApplication no longer uses the gtk mainloop wrappers, so
|
||||
it is no longer possible to use gtk_main_quit() to stop it.
|
||||
|
||||
* The -uninstalled variants of the pkg-config files have been dropped.
|
||||
|
||||
* Excessive dependencies have been culled from Requires: lines
|
||||
in .pc files. Dependent modules may have to declare dependencies
|
||||
that there were getting 'for free' in the past.
|
||||
|
||||
Release notes for 3.2
|
||||
=====================
|
||||
|
||||
* The accessible implementations for GTK+ widgets have been integrated
|
||||
into libgtk itself, and the gail module does not exist anymore. This
|
||||
change should not affect applications very much.
|
||||
|
||||
Release notes for 3.0
|
||||
=====================
|
||||
|
||||
* GTK+ 3 is a major new version of GTK+, which is parallel installable
|
||||
with GTK+ 2.x. For information about porting applications from GTK+ 2.x
|
||||
to GTK+ 3, see the file:
|
||||
|
||||
docs/reference/gtk/html/migrating.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://library.gnome.org/devel/gtk/3.0/migrating.html
|
||||
|
||||
* Note that the library sonames in this release have been changed from
|
||||
libgtk-3.0 and libgdk-3.0 to libgtk-3 and libgdk-3, to prevent the
|
||||
library versions from going backwards, compared to the 2.90/91/99
|
||||
releases. Applications will have to be recompiled.
|
||||
https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html
|
||||
|
@@ -1,14 +1,5 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = \
|
||||
win32
|
||||
|
||||
EXTRA_DIST += \
|
||||
msvcfiles.py \
|
||||
gen-file-list-gtk.py \
|
||||
detectenv_msvc.mak \
|
||||
introspection-msvc.mak \
|
||||
gtk-introspection-msvc.mak.in \
|
||||
gtk-introspection-msvc.mak
|
||||
SUBDIRS = win32
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
125
build/Makefile.msvc-introspection
Normal file
125
build/Makefile.msvc-introspection
Normal file
@@ -0,0 +1,125 @@
|
||||
# Author: Fan, Chun-wei
|
||||
# Common autotools file for constructing the g-ir-scanner and
|
||||
# g-ir-compiler command lines for Visual Studio builds.
|
||||
|
||||
# This is copied from $(srcroot)/build from the gobject-introspection
|
||||
# project, which may be included in projects that support both
|
||||
# Visual Studio builds and introspection.
|
||||
|
||||
# * Input variables:
|
||||
#
|
||||
# MSVC_INTROSPECT_GIRS - List of .gir's that should be built
|
||||
# in the NMake Makefiles
|
||||
#
|
||||
# * Simple tutorial
|
||||
#
|
||||
# Add this to Makefile.am where your library/program is built:
|
||||
# (Either YourLib_1_0_gir_MSVC_LIBS or YourLib_1_0_gir_MSVC_PROGRAM
|
||||
# is required unless --headers-only is specified in
|
||||
# YourLib_1_0_gir__MSVC_SCANNERFLAGS)
|
||||
#
|
||||
# include $(top_srcdir)/build/Makefile.msvc-introspection
|
||||
# MSVC_INTROSPECT_GIRS = YourLib-1.0.gir
|
||||
# YourLib_1_0_gir_NAMESPACE = YourLib # This is optional
|
||||
# YourLib_1_0_gir_VERSION = 1.0 # This is optional
|
||||
# YourLib_1_0_gir_MSVC_LIBS = yourlib-1.0
|
||||
# YourLib_1_0_gir_MSVC_FILES = $(libyourlib_1_0_SOURCES)
|
||||
# YourLib_1_0_gir_MSVC_PROGRAM = YourProgram
|
||||
# YourLib_1_0_gir_MSVC_PACKAGES = (Dependent .pc files)
|
||||
# YourLib_1_0_gir_MSVC_INCLUDE_GIRS = (Dependent external .gir's)
|
||||
# YourLiv_1_0_gir_MSVC_EXPORT_PACKAGES = (Packages exported by this .gir)
|
||||
|
||||
# Private functions
|
||||
|
||||
## Transform the MSVC project filename (no filename extensions) to something which can reference through a variable
|
||||
## without automake/make complaining, eg Gtk-2.0 -> Gtk_2_0
|
||||
_gir_name=$(subst /,_,$(subst -,_,$(subst .,_,$(1))))
|
||||
|
||||
# Namespace and Version is either fetched from the gir filename
|
||||
# or the _NAMESPACE/_VERSION variable combo
|
||||
_gir_namespace_msvc = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
|
||||
_gir_version_msvc = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
|
||||
_typelib_basename_msvc = $(_gir_namespace_msvc)'-'$(_gir_version_msvc)
|
||||
|
||||
# _PROGRAM is an optional variable which needs its own --program argument
|
||||
_gir_program_msvc = $(if $($(_gir_name)_MSVC_PROGRAM),--program=$($(_gir_name)_MSVC_PROGRAM))
|
||||
|
||||
# Deduce the sub-folder from $(srcroot) where the sources reside in
|
||||
_gir_source_path_raw_msvc:=$(subst $(abs_top_srcdir),,$(abs_srcdir))
|
||||
_gir_source_path_msvc=$(subst /,\\,$(_gir_source_path_raw_msvc))
|
||||
_gir_source_subdir_int_msvc=$(subst \\\\,\\,\\$(_gir_source_path_msvc)\\)
|
||||
_gir_source_subdir_msvc=$(subst \\.\\,\\,$(_gir_source_subdir_int_msvc))
|
||||
|
||||
_gir_files_raw_msvc=$(subst /,\\,$($(_gir_name)_MSVC_FILES))
|
||||
_gir_files_msvc=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_gir_source_path_msvc)\\,\\,$(_gir_files_raw_msvc))))
|
||||
|
||||
# Create a list of items for:
|
||||
# - Libraries
|
||||
# - Packages
|
||||
# - GIRs to include
|
||||
# - packages to export
|
||||
|
||||
_gir_libraries_msvc = $(foreach lib,$($(_gir_name)_MSVC_LIBS),--library=$(lib))
|
||||
_gir_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_PACKAGES),--pkg=$(pkg))
|
||||
_gir_includes_msvc = $(foreach include,$($(_gir_name)_MSVC_INCLUDE_GIRS),--include=$(include))
|
||||
_gir_export_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_EXPORT_PACKAGES),--pkg-export=$(pkg))
|
||||
|
||||
#
|
||||
# Create NMake Makefile Sections for Building Introspection files
|
||||
# from autotools files
|
||||
# $(1) - File Name of the .gir that is to be generated
|
||||
#
|
||||
|
||||
define gir-nmake-builder
|
||||
|
||||
# Basic sanity check, to make sure required variables are set
|
||||
$(if $($(_gir_name)_MSVC_FILES),,$(error Need to define $(_gir_name)_MSVC_FILES))
|
||||
$(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)),
|
||||
$($(_gir_name)_MSVC_LIBS),
|
||||
$($(_gir_name)_MSVC_PROGRAM)),,
|
||||
$(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM))
|
||||
|
||||
$(top_builddir)/build/win32/$(_gir_name)_list:
|
||||
for F in $(_gir_files_msvc); do \
|
||||
case $$$$F in \
|
||||
*.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \
|
||||
echo '..\..'$(_gir_source_subdir_msvc)$$$$F >>$(top_builddir)/build/win32/$(_gir_name)_list \
|
||||
;; \
|
||||
esac; \
|
||||
done
|
||||
|
||||
$(top_builddir)/build/win32/$(1).msvc.introspect:
|
||||
-$(RM) $(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
|
||||
# Assemble the Command to Run g-ir-scanner
|
||||
echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' @-echo Generating $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --verbose -no-libtool \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --namespace='$(_gir_namespace_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --nsversion='$(_gir_version_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --cflags-begin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$($(_gir_name)_MSVC_CFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --cflags-end \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
|
||||
# Finally Assemble the Command to Compile the generated .gir
|
||||
echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(1)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
endef
|
||||
|
||||
$(foreach gir,$(MSVC_INTROSPECT_GIRS),$(eval $(call gir-nmake-builder,$(gir))))
|
@@ -1,100 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
# Generate the file lists for processing with g-ir-scanner
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
import optparse
|
||||
|
||||
from msvcfiles import read_vars_from_AM
|
||||
|
||||
def gen_gdk_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['gdk_h_sources', 'gdk_c_sources'])
|
||||
|
||||
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
|
||||
|
||||
files = vars['gdk_h_sources'].split() + \
|
||||
vars['gdk_c_sources'].split() + \
|
||||
vars['gdk_enums'].split()
|
||||
|
||||
sources = [i for i in files if (i != 'gdkkeysyms-compat.h')]
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def gen_gdkwin32_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {'HAVE_INTROSPECTION': True,
|
||||
'OS_WIN32': True},
|
||||
filters = ['w32_introspection_files'])
|
||||
|
||||
files = vars['w32_introspection_files'].split()
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in files:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def gen_gtk_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {'USE_WIN32': True,
|
||||
'USE_QUARTZ': False,
|
||||
'USE_X11': False,
|
||||
'USE_EXTERNAL_ICON_CACHE': False},
|
||||
filters = ['gtkinclude_HEADERS',
|
||||
'a11yinclude_HEADERS',
|
||||
'deprecatedinclude_HEADERS',
|
||||
'gtk_base_c_sources',
|
||||
'gtk_clipboard_dnd_c_sources'])
|
||||
|
||||
vars_depr = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'deprecated', 'Makefile.inc'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['deprecated_h_sources',
|
||||
'deprecated_c_sources'])
|
||||
|
||||
vars_a11y = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'a11y', 'Makefile.inc'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['a11y_h_sources',
|
||||
'a11y_c_sources'])
|
||||
|
||||
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
|
||||
|
||||
files = vars['gtkinclude_HEADERS'].split() + \
|
||||
vars_a11y['a11y_h_sources'].split() + \
|
||||
vars_depr['deprecated_h_sources'].split() + \
|
||||
vars['gtk_base_c_sources'].split() + \
|
||||
vars_a11y['a11y_c_sources'].split() + \
|
||||
vars_depr['deprecated_c_sources'].split() + \
|
||||
vars['gtk_other_src'].split()
|
||||
|
||||
sources = [i for i in files \
|
||||
if not (i.endswith('private.h')) \
|
||||
and i != 'gtktextdisplay.h' \
|
||||
and i != 'gtktextlayout.h' \
|
||||
and i != 'gtkx.h']
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def main(argv):
|
||||
srcroot = '..'
|
||||
subdir_gdk = 'gdk'
|
||||
subdir_gtk = 'gtk'
|
||||
|
||||
gen_gdk_filelist(srcroot, subdir_gdk, 'gdk_list')
|
||||
gen_gdkwin32_filelist(srcroot, subdir_gdk, 'gdkwin32_list')
|
||||
gen_gtk_filelist(srcroot, subdir_gtk, 'gtk_list')
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
@@ -1,101 +0,0 @@
|
||||
# NMake Makefile to build Introspection Files for GTK+
|
||||
|
||||
!include detectenv_msvc.mak
|
||||
|
||||
APIVERSION = 3.0
|
||||
|
||||
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
|
||||
|
||||
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
|
||||
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
|
||||
|
||||
!include introspection-msvc.mak
|
||||
|
||||
!if "$(BUILD_INTROSPECTION)" == "TRUE"
|
||||
all: setgirbuildnev $(built_install_girs) $(built_install_typelibs)
|
||||
|
||||
gdk_list gdkwin32_list gtk_list:
|
||||
@-echo Generating Filelist to Introspect for GDK/GTK...
|
||||
$(PYTHON2) gen-file-list-gtk.py
|
||||
|
||||
setgirbuildnev:
|
||||
@set CC=$(CC)
|
||||
@set PYTHONPATH=$(BASEDIR)\lib\gobject-introspection
|
||||
@set PATH=win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(BASEDIR)\bin;$(PATH)
|
||||
@set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
|
||||
@set LIB=win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(LIB)
|
||||
|
||||
Gdk-$(APIVERSION).gir: gdk_list
|
||||
@-echo Generating Gdk-$(APIVERSION).gir...
|
||||
$(PYTHON2) $(G_IR_SCANNER) --verbose -I.. -I..\gdk \
|
||||
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
|
||||
-I$(BASEDIR)\include\pango-1.0 -I$(BASEDIR)\include\atk-1.0 \
|
||||
-I$(BASEDIR)\include\gdk-pixbuf-2.0 -I$(BASEDIR)\include \
|
||||
--namespace=Gdk --nsversion=3.0 \
|
||||
--include=Gio-2.0 --include=GdkPixbuf-2.0 \
|
||||
--include=Pango-1.0 --include=cairo-1.0 \
|
||||
--no-libtool --library=gdk-3.0 \
|
||||
--reparse-validate --add-include-path=$(G_IR_INCLUDEDIR) --add-include-path=. \
|
||||
--pkg-export gdk-3.0 --warn-all --c-include="gdk/gdk.h" \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION \
|
||||
--filelist=gdk_list -o $@
|
||||
|
||||
GdkWin32-$(APIVERSION).gir: gdkwin32_list
|
||||
@-echo Generating GdkWin32-$(APIVERSION).gir...
|
||||
$(PYTHON2) $(G_IR_SCANNER) --verbose -I.. -I..\gdk \
|
||||
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
|
||||
-I$(BASEDIR)\include\pango-1.0 -I$(BASEDIR)\include\atk-1.0 \
|
||||
-I$(BASEDIR)\include\gdk-pixbuf-2.0 -I$(BASEDIR)\include \
|
||||
--namespace=GdkWin32 --nsversion=3.0 \
|
||||
--include=Gio-2.0 --include=GdkPixbuf-2.0 \
|
||||
--include=Pango-1.0 --include-uninstalled=./Gdk-$(APIVERSION).gir \
|
||||
--no-libtool --library=gdk-3.0 \
|
||||
--reparse-validate --add-include-path=$(G_IR_INCLUDEDIR) --add-include-path=. \
|
||||
--pkg-export gdk-win32-3.0 --warn-all --c-include="gdk/gdkwin32.h" \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION \
|
||||
--filelist=gdkwin32_list -o $@
|
||||
|
||||
Gtk-$(APIVERSION).gir: gtk_list
|
||||
$(PYTHON2) $(G_IR_SCANNER) --verbose -I.. -I..\gtk -I..\gdk \
|
||||
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
|
||||
-I$(BASEDIR)\include\pango-1.0 -I$(BASEDIR)\include\atk-1.0 \
|
||||
-I$(BASEDIR)\include\gdk-pixbuf-2.0 -I$(BASEDIR)\include \
|
||||
--namespace=Gtk --nsversion=3.0 \
|
||||
--include=Atk-1.0 \
|
||||
--include-uninstalled=./Gdk-$(APIVERSION).gir \
|
||||
--no-libtool --library=gtk-3.0 --library=gdk-3.0 \
|
||||
--reparse-validate --add-include-path=$(G_IR_INCLUDEDIR) --add-include-path=. \
|
||||
--pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" \
|
||||
-DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" \
|
||||
-DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" \
|
||||
-DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"@GTK_VERSION@\" \
|
||||
-DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs$(VSVER)\" \
|
||||
-DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file\" \
|
||||
-DGTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\" \
|
||||
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
|
||||
-DINCLUDE_IM_am_et -DINCLUDE_IM_cedilla -DINCLUDE_IM_cyrillic_translit \
|
||||
-DINCLUDE_IM_ime -DINCLUDE_IM_inuktitut -DINCLUDE_IM_ipa \
|
||||
-DINCLUDE_IM_multipress -DINCLUDE_IM_thai -DINCLUDE_IM_ti_er \
|
||||
-DINCLUDE_IM_ti_et -DINCLUDE_IM_viqr --filelist=gtk_list \
|
||||
-o $@
|
||||
|
||||
$(built_install_typelibs): $(built_install_girs)
|
||||
@-echo Compiling $*.typelib...
|
||||
@-$(G_IR_COMPILER) --includedir=. --debug --verbose $*.gir -o $@
|
||||
|
||||
install-introspection: setgirbuildnev $(built_install_girs) $(built_install_typelibs)
|
||||
@-copy *.gir $(G_IR_INCLUDEDIR)
|
||||
@-copy /b *.typelib $(G_IR_TYPELIBDIR)
|
||||
|
||||
!else
|
||||
all:
|
||||
@-echo $(ERROR_MSG)
|
||||
!endif
|
||||
|
||||
clean:
|
||||
@-del /f/q *.typelib
|
||||
@-del /f/q *.gir
|
||||
@-del /f/q gtk_list
|
||||
@-del /f/q gdkwin32_list
|
||||
@-del /f/q gdk_list
|
||||
@-del /f/q *.pyc
|
@@ -1,65 +0,0 @@
|
||||
# Common Utility NMake Makefile Template
|
||||
# Used to Generate Introspection files for various Projects
|
||||
|
||||
# Can Override with env vars as needed
|
||||
# You will need to have built gobject-introspection for this to work.
|
||||
# Change or pass in or set the following to suit your environment
|
||||
|
||||
BASEDIR = ..\..\vs$(VSVER)\$(PLAT)
|
||||
GIR_SUBDIR = share\gir-1.0
|
||||
GIR_TYPELIBDIR = lib\girepository-1.0
|
||||
G_IR_SCANNER = $(BASEDIR)\bin\g-ir-scanner
|
||||
G_IR_COMPILER = $(BASEDIR)\bin\g-ir-compiler.exe
|
||||
G_IR_INCLUDEDIR = $(BASEDIR)\$(GIR_SUBDIR)
|
||||
G_IR_TYPELIBDIR = $(BASEDIR)\$(GIR_TYPELIBDIR)
|
||||
|
||||
# Note: The PYTHON2 must be a Python 2.6.x or 2.7.x Interpretor!
|
||||
# Either having python.exe from Python 2.6.x/2.7.x in your PATH will work
|
||||
# or passing in PYTHON2=<full path to your Python 2.6.x/2.7.x interpretor> will do
|
||||
|
||||
# This is required, and gobject-introspection needs to be built
|
||||
# before this can be successfully run.
|
||||
PYTHON2=python
|
||||
|
||||
# Don't change anything following this line!
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
VALID_GCC_INSTPATH = FALSE
|
||||
|
||||
MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
|
||||
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files
|
||||
|
||||
ERROR_MSG =
|
||||
|
||||
BUILD_INTROSPECTION = TRUE
|
||||
|
||||
!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
|
||||
&& ![setlocal] \
|
||||
&& ![set file="pkgconfig.x"] \
|
||||
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \
|
||||
&& ![del $(ERRNUL) /q/f pkgconfig.x]
|
||||
!endif
|
||||
|
||||
!include pkgconfig.chksize
|
||||
!if "$(PKG_CHECK_SIZE)" == "0"
|
||||
VALID_PKG_CONFIG_PATH = TRUE
|
||||
!else
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
!endif
|
||||
|
||||
!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
|
||||
!endif
|
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug"
|
||||
VALID_CFGSET = TRUE
|
||||
!endif
|
||||
|
||||
!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
|
||||
!endif
|
||||
|
||||
!if "$(VALID_CFGSET)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_CFG)
|
||||
!endif
|
@@ -1,261 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
#expand *.in files
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import optparse
|
||||
|
||||
def parent_dir(path):
|
||||
if not os.path.isabs(path):
|
||||
path = os.path.abspath(path)
|
||||
if os.path.isfile(path):
|
||||
path = os.path.dirname(path)
|
||||
return os.path.split(path)[0]
|
||||
|
||||
def check_output_type (btype):
|
||||
print_bad_type = False
|
||||
output_type = -1
|
||||
if (btype is None):
|
||||
output_type = -1
|
||||
print_bad_type = False
|
||||
elif (btype == "vs9"):
|
||||
output_type = 1
|
||||
elif (btype == "vs10"):
|
||||
output_type = 2
|
||||
elif (btype == "nmake-exe"):
|
||||
output_type = 3
|
||||
else:
|
||||
output_type = -1
|
||||
print_bad_type = True
|
||||
if (output_type == -1):
|
||||
if (print_bad_type is True):
|
||||
print ("The entered output build file type '%s' is not valid" % btype)
|
||||
else:
|
||||
print ("Output build file type is not specified.\nUse -t <type> to specify the output build file type.")
|
||||
print ("Valid output build file types are: nmake-exe, vs9 , vs10")
|
||||
return output_type
|
||||
|
||||
def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
|
||||
'''
|
||||
path: path to the Makefile.am
|
||||
vars: predefined variables
|
||||
conds: condition variables for Makefile
|
||||
filters: if None, all variables defined are returned,
|
||||
otherwise, it is a list contains that variables should be returned
|
||||
'''
|
||||
cur_vars = vars.copy()
|
||||
RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
|
||||
RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
|
||||
RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
|
||||
RE_AM_VAR_ADD = re.compile(r'^\s*(\w+)\s*\+=(.*)$')
|
||||
RE_AM_CONTINUING = re.compile(r'\\\s*$')
|
||||
RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
|
||||
RE_AM_IFNOT = re.compile(r'^\s*if\s!+(\w+)')
|
||||
RE_AM_ELSE = re.compile(r'^\s*else')
|
||||
RE_AM_ENDIF = re.compile(r'^\s*endif')
|
||||
def am_eval(cont):
|
||||
return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
|
||||
with open(path, 'r') as f:
|
||||
contents = f.readlines()
|
||||
#combine continuing lines
|
||||
i = 0
|
||||
ncont = []
|
||||
while i < len(contents):
|
||||
line = contents[i]
|
||||
if RE_AM_CONTINUING.search(line):
|
||||
line = RE_AM_CONTINUING.sub('', line)
|
||||
j = i + 1
|
||||
while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
|
||||
line += RE_AM_CONTINUING.sub('', contents[j])
|
||||
j += 1
|
||||
else:
|
||||
if j < len(contents):
|
||||
line += contents[j]
|
||||
i = j
|
||||
else:
|
||||
i += 1
|
||||
ncont.append(line)
|
||||
|
||||
#include, var define, var evaluation
|
||||
i = -1
|
||||
skip = False
|
||||
oldskip = []
|
||||
while i < len(ncont) - 1:
|
||||
i += 1
|
||||
line = ncont[i]
|
||||
mo = RE_AM_IF.search(line)
|
||||
if mo:
|
||||
oldskip.append(skip)
|
||||
skip = False if mo.group(1) in conds and conds[mo.group(1)] \
|
||||
else True
|
||||
continue
|
||||
mo = RE_AM_IFNOT.search(line)
|
||||
if mo:
|
||||
oldskip.append(skip)
|
||||
skip = False if mo.group(1) not in conds and conds[mo.group(1)] \
|
||||
else True
|
||||
continue
|
||||
mo = RE_AM_ELSE.search(line)
|
||||
if mo:
|
||||
skip = not skip
|
||||
continue
|
||||
mo = RE_AM_ENDIF.search(line)
|
||||
if mo:
|
||||
if oldskip:
|
||||
skip = oldskip.pop()
|
||||
continue
|
||||
if not skip:
|
||||
mo = RE_AM_INCLUDE.search(line)
|
||||
if mo:
|
||||
cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
|
||||
continue
|
||||
mo = RE_AM_VAR.search(line)
|
||||
if mo:
|
||||
cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
|
||||
continue
|
||||
mo = RE_AM_VAR_ADD.search(line)
|
||||
if mo:
|
||||
try:
|
||||
cur_vars[mo.group(1)] += ' '
|
||||
except KeyError:
|
||||
cur_vars[mo.group(1)] = ''
|
||||
cur_vars[mo.group(1)] += am_eval(mo.group(2).strip())
|
||||
continue
|
||||
|
||||
#filter:
|
||||
if filters != None:
|
||||
ret = {}
|
||||
for i in filters:
|
||||
ret[i] = cur_vars.get(i, '')
|
||||
return ret
|
||||
else:
|
||||
return cur_vars
|
||||
|
||||
def process_include(src, dest, includes):
|
||||
RE_INCLUDE = re.compile(r'^\s*#include\s+"(.*)"')
|
||||
with open(src, 'r') as s:
|
||||
with open(dest, 'w') as d:
|
||||
for i in s:
|
||||
mo = RE_INCLUDE.search(i)
|
||||
if mo:
|
||||
target = ''
|
||||
for j in includes:
|
||||
#print "searching in ", j
|
||||
if mo.group(1) in os.listdir(j):
|
||||
target = os.path.join(j, mo.group(1))
|
||||
break
|
||||
if not target:
|
||||
raise Exception("Couldn't find include file %s" % mo.group(1))
|
||||
else:
|
||||
with open(target, 'r') as t:
|
||||
for inc in t.readlines():
|
||||
d.write(inc)
|
||||
else:
|
||||
d.write(i)
|
||||
|
||||
#Generate the source files listing that is used
|
||||
def generate_src_list (srcroot, srcdir, filters_src, filter_conds, filter_c, mk_am_file):
|
||||
mkfile = ''
|
||||
if mk_am_file is None or mk_am_file == '':
|
||||
mkfile = 'Makefile.am'
|
||||
else:
|
||||
mkfile = mk_am_file
|
||||
vars = read_vars_from_AM(os.path.join(srcdir, mkfile),
|
||||
vars = {'top_srcdir': srcroot},
|
||||
conds = filter_conds,
|
||||
filters = filters_src)
|
||||
files = []
|
||||
for src_filters_item in filters_src:
|
||||
files += vars[src_filters_item].split()
|
||||
if filter_c is True:
|
||||
sources = [i for i in files if i.endswith('.c') ]
|
||||
return sources
|
||||
else:
|
||||
return files
|
||||
|
||||
# Generate the Visual Studio 2008 Project Files from the templates
|
||||
def gen_vs9_project (projname, srcroot, srcdir_name, sources_list):
|
||||
vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.sourcefiles'), 'w') as vs9srclist:
|
||||
for i in sources_list:
|
||||
vs9srclist.write ('\t\t\t<File RelativePath="..\\..\\..\\' + srcdir_name + '\\' + i.replace('/', '\\') + '" />\n')
|
||||
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs9', projname + '.vcprojin'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs9', projname + '.vcproj'),
|
||||
includes = [vs_file_list_dir])
|
||||
|
||||
os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.sourcefiles'))
|
||||
|
||||
# Generate the Visual Studio 2010 Project Files from the templates
|
||||
def gen_vs10_project (projname, srcroot, srcdir_name, sources_list):
|
||||
vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.vs10.sourcefiles'), 'w') as vs10srclist:
|
||||
for j in sources_list:
|
||||
vs10srclist.write (' <ClCompile Include="..\\..\\..\\' + srcdir_name + '\\' + j.replace('/', '\\') + '" />\n')
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.vs10.sourcefiles.filters'), 'w') as vs10srclist_filter:
|
||||
for k in sources_list:
|
||||
vs10srclist_filter.write (' <ClCompile Include="..\\..\\..\\' + srcdir_name + '\\' + k.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
|
||||
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxprojin'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj'),
|
||||
includes = [vs_file_list_dir])
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj.filtersin'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj.filters'),
|
||||
includes = [vs_file_list_dir])
|
||||
|
||||
os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.vs10.sourcefiles'))
|
||||
os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.vs10.sourcefiles.filters'))
|
||||
|
||||
def gen_vs_inst_list (projname, srcroot, srcdirs, inst_lists, destdir_names, isVS9):
|
||||
vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
vsver = ''
|
||||
vsprops_line_ending = ''
|
||||
vsprops_file_ext = ''
|
||||
if isVS9 is True:
|
||||
vsver = '9'
|
||||
vsprops_line_ending = '
\n'
|
||||
vsprops_file_ext = '.vsprops'
|
||||
else:
|
||||
vsver = '10'
|
||||
vsprops_line_ending = '\n\n'
|
||||
vsprops_file_ext = '.props'
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.vs' + vsver + 'instfiles'), 'w') as vsinstlist:
|
||||
|
||||
for file_list, srcdir, dir_name in zip (inst_lists, srcdirs, destdir_names):
|
||||
for i in file_list:
|
||||
vsinstlist.write ('copy ..\\..\\..\\' +
|
||||
srcdir + '\\' +
|
||||
i.replace ('/', '\\') +
|
||||
' $(CopyDir)\\' +
|
||||
dir_name +
|
||||
vsprops_line_ending)
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs' + vsver, projname + '-install' + vsprops_file_ext + 'in'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs' + vsver, projname + '-install' + vsprops_file_ext),
|
||||
includes = [vs_file_list_dir])
|
||||
|
||||
os.unlink(os.path.join (vs_file_list_dir, projname + '.vs' + vsver + 'instfiles'))
|
||||
|
||||
def generate_nmake_makefiles(srcroot, srcdir, base_name, makefile_name, progs_list):
|
||||
file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
|
||||
with open (os.path.join (file_list_dir,
|
||||
base_name + '_progs'), 'w') as proglist:
|
||||
for i in progs_list:
|
||||
proglist.write ('\t' + i + '$(EXEEXT)\t\\\n')
|
||||
|
||||
|
||||
process_include (os.path.join(srcdir, makefile_name + 'in'),
|
||||
os.path.join(srcdir, makefile_name),
|
||||
includes = [file_list_dir])
|
||||
|
||||
os.unlink(os.path.join (file_list_dir, base_name + '_progs'))
|
||||
|
@@ -1,5 +1,31 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
GENERATED_ITEMS = \
|
||||
introspection.body.mak \
|
||||
Gdk_3_0_gir_list \
|
||||
GdkWin32_3_0_gir_list \
|
||||
Gtk_3_0_gir_list
|
||||
|
||||
MSVC_INTROSPECTION_INTERMEDIATE_FILES = Gdk-3.0.gir.msvc.introspect GdkWin32-3.0.gir.msvc.introspect Gtk-3.0.gir.msvc.introspect
|
||||
|
||||
introspection.body.mak: $(MSVC_INTROSPECTION_INTERMEDIATE_FILES)
|
||||
-$(RM) introspection.body.mak
|
||||
for F in `ls *.msvc.introspect`; do \
|
||||
case $$F in \
|
||||
*) cat $(top_builddir)/build/win32/$$F >>introspection.body.mak \
|
||||
;; \
|
||||
esac; \
|
||||
done
|
||||
$(RM) $(MSVC_INTROSPECTION_INTERMEDIATE_FILES)
|
||||
|
||||
DISTCLEANFILES = $(GENERATED_ITEMS)
|
||||
|
||||
else
|
||||
GENERATED_ITEMS =
|
||||
DISTCLEANFILES =
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
vs9 \
|
||||
vs10 \
|
||||
@@ -7,6 +33,13 @@ SUBDIRS = \
|
||||
vs12 \
|
||||
vs14
|
||||
|
||||
EXTRA_DIST += replace.py
|
||||
EXTRA_DIST += \
|
||||
detectenv-msvc.mak \
|
||||
introspection-msvc.mak \
|
||||
gtk-introspection-msvc.mak \
|
||||
replace.py \
|
||||
pc_base.py \
|
||||
gtkpc.py \
|
||||
$(GENERATED_ITEMS)
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -1,3 +1,8 @@
|
||||
# Common NMake Makefile module for checking the build environment
|
||||
# This can be copied from $(glib_srcroot)\build\win32 for GNOME items
|
||||
# that support MSVC builds and introspection under MSVC, and can be used
|
||||
# for building test programs as well.
|
||||
|
||||
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
|
||||
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
|
||||
!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
|
||||
@@ -35,6 +40,8 @@ VSVER = 10
|
||||
VSVER = 11
|
||||
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
|
||||
VSVER = 12
|
||||
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
|
||||
VSVER = 14
|
||||
!else
|
||||
VSVER = 0
|
||||
!endif
|
||||
@@ -42,20 +49,24 @@ VSVER = 0
|
||||
!if "$(VSVER)" == "0"
|
||||
MSG = ^
|
||||
This NMake Makefile set supports Visual Studio^
|
||||
9 (2008) through 12 (2013). Your Visual Studio^
|
||||
9 (2008) through 14 (2015). Your Visual Studio^
|
||||
version is not supported.
|
||||
!error $(MSG)
|
||||
!endif
|
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug"
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug"
|
||||
VALID_CFGSET = TRUE
|
||||
!endif
|
||||
|
||||
!if "$(CFG)" == "release"
|
||||
CFLAGS_ADD = /MD /O2
|
||||
# We want debugging symbols logged for all builds,
|
||||
# using .pdb files for release builds
|
||||
CFLAGS_BASE = /Zi
|
||||
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "Release"
|
||||
CFLAGS_ADD = /MD /O2 $(CFLAGS_BASE)
|
||||
!else
|
||||
CFLAGS_ADD = /MDd /Od /Zi
|
||||
CFLAGS_ADD = /MDd /Od $(CFLAGS_BASE)
|
||||
!endif
|
||||
|
||||
!if "$(PLAT)" == "x64"
|
43
build/win32/gtk-introspection-msvc.mak
Normal file
43
build/win32/gtk-introspection-msvc.mak
Normal file
@@ -0,0 +1,43 @@
|
||||
# NMake Makefile to build Introspection Files for GTK+
|
||||
|
||||
!include detectenv-msvc.mak
|
||||
|
||||
APIVERSION = 3.0
|
||||
|
||||
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
|
||||
|
||||
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
|
||||
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
|
||||
|
||||
!include introspection-msvc.mak
|
||||
|
||||
!if "$(BUILD_INTROSPECTION)" == "TRUE"
|
||||
|
||||
!if "$(PLAT)" == "x64"
|
||||
AT_PLAT=x86_64
|
||||
!else
|
||||
AT_PLAT=i686
|
||||
!endif
|
||||
|
||||
all: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
|
||||
|
||||
setgirbuildenv:
|
||||
@set PYTHONPATH=$(PREFIX)\lib\gobject-introspection
|
||||
@set PATH=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(PREFIX)\bin;$(PATH)
|
||||
@set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
|
||||
@set LIB=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(LIB)
|
||||
|
||||
!include introspection.body.mak
|
||||
|
||||
install-introspection: all
|
||||
@-copy *.gir $(G_IR_INCLUDEDIR)
|
||||
@-copy /b *.typelib $(G_IR_TYPELIBDIR)
|
||||
|
||||
!else
|
||||
all:
|
||||
@-echo $(ERROR_MSG)
|
||||
!endif
|
||||
|
||||
clean:
|
||||
@-del /f/q *.typelib
|
||||
@-del /f/q *.gir
|
97
build/win32/gtkpc.py
Normal file
97
build/win32/gtkpc.py
Normal file
@@ -0,0 +1,97 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Utility script to generate .pc files for GTK+
|
||||
# for Visual Studio builds, to be used for
|
||||
# building introspection files
|
||||
|
||||
# Author: Fan, Chun-wei
|
||||
# Date: April 26, 2016
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
from replace import replace_multi, replace
|
||||
from pc_base import BasePCItems
|
||||
|
||||
def main(argv):
|
||||
base_pc = BasePCItems()
|
||||
|
||||
gdk_parser = argparse.ArgumentParser(description='Setup basic .pc file info')
|
||||
gdk_parser.add_argument('--broadway',
|
||||
action='store_const',
|
||||
const=1,
|
||||
help='GDK with Broadway backend')
|
||||
gdk_parser.add_argument('--host',
|
||||
required=True,
|
||||
help='Build type')
|
||||
base_pc.setup(argv, gdk_parser)
|
||||
|
||||
atk_min_ver = '2.15.1'
|
||||
cairo_min_ver = '1.14.0'
|
||||
gdk_pixbuf_min_ver = '2.30.0'
|
||||
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
|
||||
glib_min_ver = '2.45.8'
|
||||
|
||||
cairo_backends = 'cairo-win32'
|
||||
gdk_backends = 'win32'
|
||||
gio_package = 'gio-2.0 >= ' + glib_min_ver
|
||||
broadway_extra_libs = ''
|
||||
|
||||
gdk_args = gdk_parser.parse_args()
|
||||
if getattr(gdk_args, 'broadway', None) is 1:
|
||||
# On Visual Studio, we link to zlib1.lib
|
||||
broadway_extra_libs = '-lzlib1'
|
||||
gdk_backends += ' broadway'
|
||||
cairo_backends += ' cairo'
|
||||
|
||||
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
|
||||
'@GDK_BACKENDS@': gdk_backends}
|
||||
|
||||
pkg_required_packages = 'gdk-pixbuf >= ' + gdk_pixbuf_min_ver + ' ' + \
|
||||
'cairo >= ' + cairo_min_ver + ' ' + \
|
||||
'cairo-gobject >= ' + cairo_min_ver
|
||||
|
||||
gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
|
||||
'pangowin32 pangocairo' + ' ' + \
|
||||
pkg_required_packages,
|
||||
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
|
||||
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
|
||||
'@GDK_EXTRA_CFLAGS@': '',
|
||||
'gdk-3': 'gdk-3.0'}
|
||||
|
||||
gtk_pc_replace_items = {'@host@': gdk_args.host,
|
||||
'@GTK_BINARY_VERSION@': '3.0.0',
|
||||
'@GTK_PACKAGES@': 'atk >= ' + atk_min_ver + ' ' + \
|
||||
pkg_required_packages + ' ' + \
|
||||
gio_package,
|
||||
'@GTK_PRIVATE_PACKAGES@': 'atk',
|
||||
'@GTK_EXTRA_CFLAGS@': '',
|
||||
'@GTK_EXTRA_LIBS@': '',
|
||||
'@GTK_EXTRA_CFLAGS@': '',
|
||||
'gtk-3': 'gtk-3.0'}
|
||||
|
||||
gail_pc_replace_items = {'gailutil-3': 'gailutil-3.0'}
|
||||
|
||||
pkg_replace_items.update(base_pc.base_replace_items)
|
||||
gdk_pc_replace_items.update(pkg_replace_items)
|
||||
gtk_pc_replace_items.update(pkg_replace_items)
|
||||
gail_pc_replace_items.update(base_pc.base_replace_items)
|
||||
|
||||
# Generate gdk-3.0.pc
|
||||
replace_multi(base_pc.top_srcdir + '/gdk-3.0.pc.in',
|
||||
base_pc.srcdir + '/gdk-3.0.pc',
|
||||
gdk_pc_replace_items)
|
||||
|
||||
# Generate gtk+-3.0.pc
|
||||
replace_multi(base_pc.top_srcdir + '/gtk+-3.0.pc.in',
|
||||
base_pc.srcdir + '/gtk+-3.0.pc',
|
||||
gtk_pc_replace_items)
|
||||
|
||||
# Generate gail-3.0.pc
|
||||
replace_multi(base_pc.top_srcdir + '/gail-3.0.pc.in',
|
||||
base_pc.srcdir + '/gail-3.0.pc',
|
||||
gail_pc_replace_items)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
94
build/win32/introspection-msvc.mak
Normal file
94
build/win32/introspection-msvc.mak
Normal file
@@ -0,0 +1,94 @@
|
||||
# Common NMake Makefile module for checking the build environment is sane
|
||||
# for building introspection files under MSVC/NMake.
|
||||
# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
|
||||
# that support MSVC builds and introspection under MSVC.
|
||||
|
||||
# Can override with env vars as needed
|
||||
# You will need to have built gobject-introspection for this to work.
|
||||
# Change or pass in or set the following to suit your environment
|
||||
|
||||
!if "$(PREFIX)" == ""
|
||||
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
|
||||
!endif
|
||||
|
||||
!if ![setlocal] && \
|
||||
![set PFX=$(PREFIX)] && \
|
||||
![for %P in (%PFX%) do @echo PREFIX_FULL=%~dpnfP > pfx.x]
|
||||
!endif
|
||||
!include pfx.x
|
||||
|
||||
!if "$(PKG_CONFIG_PATH)" == ""
|
||||
PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig
|
||||
!else
|
||||
PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig;$(PKG_CONFIG_PATH)
|
||||
!endif
|
||||
|
||||
!if ![del $(ERRNUL) /q/f pfx.x]
|
||||
!endif
|
||||
|
||||
# Note: The PYTHON must be the Python release series that was used to build
|
||||
# the GObject-introspection scanner Python module!
|
||||
# Either having python.exe your PATH will work or passing in
|
||||
# PYTHON=<full path to your Python interpretor> will do
|
||||
|
||||
# This is required, and gobject-introspection needs to be built
|
||||
# before this can be successfully run.
|
||||
!if "$(PYTHON)" == ""
|
||||
PYTHON=python
|
||||
!endif
|
||||
|
||||
# Path to the pkg-config tool, if not already in the PATH
|
||||
!if "$(PKG_CONFIG)" == ""
|
||||
PKG_CONFIG=pkg-config
|
||||
!endif
|
||||
|
||||
# Don't change anything following this line!
|
||||
|
||||
GIR_SUBDIR = share\gir-1.0
|
||||
GIR_TYPELIBDIR = lib\girepository-1.0
|
||||
G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
|
||||
G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
|
||||
G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR)
|
||||
G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR)
|
||||
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
|
||||
MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
|
||||
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files
|
||||
|
||||
ERROR_MSG =
|
||||
|
||||
BUILD_INTROSPECTION = TRUE
|
||||
|
||||
!if ![set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)] \
|
||||
&& ![$(PKG_CONFIG) --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
|
||||
&& ![setlocal] \
|
||||
&& ![set file="pkgconfig.x"] \
|
||||
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \
|
||||
&& ![del $(ERRNUL) /q/f pkgconfig.x]
|
||||
!endif
|
||||
|
||||
!include pkgconfig.chksize
|
||||
!if "$(PKG_CHECK_SIZE)" == "0"
|
||||
VALID_PKG_CONFIG_PATH = TRUE
|
||||
!else
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
!endif
|
||||
|
||||
!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
|
||||
!endif
|
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug"
|
||||
VALID_CFGSET = TRUE
|
||||
!endif
|
||||
|
||||
!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
|
||||
!endif
|
||||
|
||||
!if "$(VALID_CFGSET)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_CFG)
|
||||
!endif
|
108
build/win32/pc_base.py
Normal file
108
build/win32/pc_base.py
Normal file
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Simple utility script to generate the basic info
|
||||
# needed in a .pc (pkg-config) file, used especially
|
||||
# for introspection purposes
|
||||
|
||||
# This can be used in various projects where
|
||||
# there is the need to generate .pc files,
|
||||
# and is copied from GLib's $(srcroot)/build/win32
|
||||
|
||||
# Author: Fan, Chun-wei
|
||||
# Date: March 10, 2016
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
class BasePCItems:
|
||||
def __init__(self):
|
||||
self.base_replace_items = {}
|
||||
self.exec_prefix = ''
|
||||
self.includedir = ''
|
||||
self.libdir = ''
|
||||
self.prefix = ''
|
||||
self.srcdir = os.path.dirname(__file__)
|
||||
self.top_srcdir = self.srcdir + '\\..\\..'
|
||||
self.version = ''
|
||||
|
||||
def setup(self, argv, parser=None):
|
||||
if parser is None:
|
||||
parser = argparse.ArgumentParser(description='Setup basic .pc file info')
|
||||
parser.add_argument('--prefix', help='prefix of the installed library',
|
||||
required=True)
|
||||
parser.add_argument('--exec-prefix',
|
||||
help='prefix of the installed programs, \
|
||||
if different from the prefix')
|
||||
parser.add_argument('--includedir',
|
||||
help='includedir of the installed library, \
|
||||
if different from ${prefix}/include')
|
||||
parser.add_argument('--libdir',
|
||||
help='libdir of the installed library, \
|
||||
if different from ${prefix}/lib')
|
||||
parser.add_argument('--version', help='Version of the package',
|
||||
required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
self.version = args.version
|
||||
|
||||
# check whether the prefix and exec_prefix are valid
|
||||
if not os.path.exists(args.prefix):
|
||||
raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix)
|
||||
|
||||
# check and setup the exec_prefix
|
||||
if getattr(args, 'exec_prefix', None) is None:
|
||||
input_exec_prefix = args.prefix
|
||||
else:
|
||||
input_exec_prefix = args.exec_prefix
|
||||
if not os.path.exists(input_exec_prefix):
|
||||
raise SystemExit('Specified exec-prefix \'%s\' is invalid' %
|
||||
input_exec_prefix)
|
||||
|
||||
|
||||
# check and setup the includedir
|
||||
if getattr(args, 'includedir', None) is None:
|
||||
self.includedir = '${prefix}/include'
|
||||
else:
|
||||
if args.includedir.startswith('${prefix}'):
|
||||
includedir_use_shorthand = True
|
||||
input_includedir = args.prefix + args.includedir[len('${prefix}'):]
|
||||
else:
|
||||
includedir_use_shorthand = False
|
||||
input_includedir = args.includedir
|
||||
if not os.path.exists(input_includedir):
|
||||
raise SystemExit('Specified includedir \'%s\' is invalid' %
|
||||
args.includedir)
|
||||
if includedir_use_shorthand is True:
|
||||
self.includedir = args.includedir.replace('\\','/')
|
||||
else:
|
||||
self.includedir = os.path.abspath(input_includedir).replace('\\','/')
|
||||
|
||||
# check and setup the libdir
|
||||
if getattr(args, 'libdir', None) is None:
|
||||
self.libdir = '${prefix}/lib'
|
||||
else:
|
||||
if args.libdir.startswith('${prefix}'):
|
||||
libdir_use_shorthand = True
|
||||
input_libdir = args.prefix + args.libdir[len('${prefix}'):]
|
||||
else:
|
||||
libdir_use_shorthand = False
|
||||
input_libdir = args.libdir
|
||||
if not os.path.exists(input_libdir):
|
||||
raise SystemExit('Specified libdir \'%s\' is invalid' %
|
||||
args.libdir)
|
||||
if libdir_use_shorthand is True:
|
||||
self.libdir = args.libdir.replace('\\','/')
|
||||
else:
|
||||
self.libdir = os.path.abspath(input_libdir).replace('\\','/')
|
||||
|
||||
# use absolute paths for prefix and exec_prefix
|
||||
self.prefix = os.path.abspath(args.prefix).replace('\\','/')
|
||||
self.exec_prefix = os.path.abspath(input_exec_prefix).replace('\\','/')
|
||||
|
||||
# setup dictionary for replacing items in *.pc.in
|
||||
self.base_replace_items.update({'@VERSION@': self.version})
|
||||
self.base_replace_items.update({'@prefix@': self.prefix})
|
||||
self.base_replace_items.update({'@exec_prefix@': self.exec_prefix})
|
||||
self.base_replace_items.update({'@libdir@': self.libdir})
|
||||
self.base_replace_items.update({'@includedir@': self.includedir})
|
@@ -21,12 +21,19 @@ valid_actions = ['remove-prefix',
|
||||
'replace-str',
|
||||
'remove-str']
|
||||
|
||||
def replace(src, dest, instring, outstring):
|
||||
def replace_multi(src, dest, replace_items):
|
||||
with open(src, 'r') as s:
|
||||
with open(dest, 'w') as d:
|
||||
for line in s:
|
||||
i = line.replace(instring, outstring)
|
||||
d.write(i)
|
||||
replace_dict = dict((re.escape(key), value) \
|
||||
for key, value in replace_items.items())
|
||||
replace_pattern = re.compile("|".join(replace_dict.keys()))
|
||||
d.write(replace_pattern.sub(lambda m: \
|
||||
replace_dict[re.escape(m.group(0))], line))
|
||||
|
||||
def replace(src, dest, instring, outstring):
|
||||
replace_item = {instring: outstring}
|
||||
replace_multi(src, dest, replace_item)
|
||||
|
||||
def check_required_args(args, params):
|
||||
for param in params:
|
||||
|
@@ -33,6 +33,7 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxprojin \
|
||||
gdk3-win32.vcxproj.filtersin \
|
||||
gdk3-broadway.vcxprojin \
|
||||
@@ -60,6 +61,7 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxprojin \
|
||||
gailutil-3.vcxproj.filtersin \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
gtk3-build-defines.props \
|
||||
gtk3-copy-gdk-broadway.props \
|
||||
gtk3-gen-srcs.props \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
@@ -144,7 +144,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||
@@ -167,7 +167,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -187,7 +187,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -209,7 +209,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -234,7 +234,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -257,7 +257,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -277,7 +277,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -299,7 +299,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
@@ -86,7 +86,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -106,7 +106,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -131,7 +131,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -151,7 +151,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -168,13 +168,13 @@
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="gtk3-version-paths.props" />
|
||||
@@ -10,6 +10,10 @@
|
||||
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
|
||||
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
|
||||
<GtkGdkCommonLibs>imm32.lib</GtkGdkCommonLibs>
|
||||
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
|
||||
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
|
||||
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtk3builddefinesprops</_PropertySheetDisplayName>
|
||||
@@ -24,7 +28,7 @@
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<Link>
|
||||
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;epoxy.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
@@ -48,5 +52,17 @@
|
||||
<BuildMacro Include="GtkDefines">
|
||||
<Value>$(GtkDefines)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkGdkCommonLibs">
|
||||
<Value>$(GtkGdkCommonLibs)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GdkAdditionalLibs">
|
||||
<Value>$(GdkAdditionalLibs)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GdkBroadwayAdditionalLibs">
|
||||
<Value>$(GdkBroadwayAdditionalLibs)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkAdditionalLibs">
|
||||
<Value>$(GtkAdditionalLibs)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@@ -4,30 +4,19 @@
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<GenConfigH>
|
||||
copy ..\..\..\config.h.win32 ..\..\..\config.h
|
||||
</GenConfigH>
|
||||
<GenConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</GenConfigH>
|
||||
<GenGdkConfigHWin32>
|
||||
if exist ..\..\..\MSVC_$(Configuration) goto DONE_GDKCONFIG_H
|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD
|
||||
|
||||
if exist ..\..\..\MSVC_$(Configuration)_Broadway del ..\..\..\MSVC_$(Configuration)_Broadway
|
||||
|
||||
if exist $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll
|
||||
|
||||
if exist $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib del $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib
|
||||
|
||||
if "$(Configuration)" == "Release" del ..\..\..\MSVC_Debug
|
||||
|
||||
if "$(Configuration)" == "Debug" del ..\..\..\MSVC_Release
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\GDK_WIN32ONLY_BUILD
|
||||
|
||||
echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
|
||||
|
||||
:DONE_GDKCONFIG_H
|
||||
@@ -35,35 +24,23 @@ echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
|
||||
<GenGdkConfigHBroadway>
|
||||
if exist ..\..\..\MSVC_$(Configuration)_Broadway goto DONE_GDKCONFIG_H
|
||||
|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD
|
||||
|
||||
if exist ..\..\..\MSVC_Release del ..\..\..\MSVC_Release
|
||||
|
||||
if exist ..\..\..\MSVC_Debug del ..\..\..\MSVC_Debug
|
||||
|
||||
|
||||
if "$(Configuration)" == "Release_Broadway" del ..\..\..\MSVC_Debug_Broadway
|
||||
|
||||
if "$(Configuration)" == "Debug_Broadway" del ..\..\..\MSVC_Release_Broadway
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD
|
||||
|
||||
echo $(Configuration) > ..\..\..\MSVC_$(Configuration)_Broadway
|
||||
|
||||
:DONE_GDKCONFIG_H
|
||||
</GenGdkConfigHBroadway>
|
||||
<GenerateGtkDbusBuiltSources>
|
||||
cd ..\..\..\gtk
|
||||
|
||||
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
|
||||
|
||||
cd $(SolutionDir)
|
||||
</GenerateGtkDbusBuiltSources>
|
||||
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
|
||||
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk & $(PythonPath)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
|
||||
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk & $(PythonPathX64)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
|
||||
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
|
||||
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
|
||||
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
|
||||
@@ -81,9 +58,15 @@ cd $(SolutionDir)
|
||||
<BuildMacro Include="GenGdkConfigHBroadway">
|
||||
<Value>$(GenGdkConfigHBroadway)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GDbusCodeGenCmd">
|
||||
<Value>$(GDbusCodeGenCmd)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkDbusBuiltSources">
|
||||
<Value>$(GenerateGtkDbusBuiltSources)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkDbusBuiltSourcesX64">
|
||||
<Value>$(GenerateGtkDbusBuiltSourcesX64)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="CopyGtkWin32RC">
|
||||
<Value>$(CopyGtkWin32RC)</Value>
|
||||
</BuildMacro>
|
||||
|
@@ -5,12 +5,9 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
|
||||
<InstalledDlls>$(BinDir)\$(GtkDllPrefix)gdk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gtk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gailutil(GtkDllSuffix).dll</InstalledDlls>
|
||||
<InstalledBins>$(BinDir)\gtk3-demo.exe;$(BinDir)\gtk3-demo-application.exe;$(BinDir)\gtk3-icon-browser.exe;$(BinDir)\gtk-encode-symbolic-svg.exe</InstalledBins>
|
||||
<InstalledBroadwayBins>$(BinDir)\broadwayd.exe</InstalledBroadwayBins>
|
||||
<GtkDoInstallBin>
|
||||
mkdir $(CopyDir)\bin
|
||||
mkdir $(CopyDir)\lib
|
||||
mkdir $(CopyDir)\lib\pkgconfig
|
||||
|
||||
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
|
||||
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
|
||||
@@ -93,6 +90,10 @@ copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
|
||||
|
||||
:DONE_BIN
|
||||
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
|
||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||
</GtkDoInstallBin>
|
||||
<GtkDoInstall>
|
||||
echo off
|
||||
@@ -126,18 +127,22 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
|
||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Compiling gsettings XML Files..."
|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Generating icon cache......"
|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
</GtkDoInstall>
|
||||
<GtkDoInstallBroadwayHeaders>
|
||||
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
|
||||
#include "gdk3-broadway.vs10.headers"
|
||||
</GtkDoInstallBroadwayHeaders>
|
||||
<GtkPostInstall>
|
||||
echo "Compiling gsettings XML Files..."
|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Generating icon cache......"
|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
</GtkPostInstall>
|
||||
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
|
||||
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
|
||||
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtk3installsprops</_PropertySheetDisplayName>
|
||||
@@ -164,5 +169,17 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
|
||||
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
|
||||
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkPostInstall">
|
||||
<Value>$(GtkPostInstall)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkPC">
|
||||
<Value>$(GenerateGtkPC)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkPCX64">
|
||||
<Value>$(GenerateGtkPCX64)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkPCFiles">
|
||||
<Value>$(GtkPCFiles)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@@ -157,29 +157,63 @@
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\config.h.win32">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">blah;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Installing Build Results...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">blah;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\gtkpc.py">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkPC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenerateGtkPC) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkPCX64)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenerateGtkPCX64) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkPC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenerateGtkPC) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkPCX64)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenerateGtkPCX64) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
13
build/win32/vs10/gtk3-install.vcxproj.filters
Normal file
13
build/win32/vs10/gtk3-install.vcxproj.filters
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\gtkpc.py"><Filter>Resource Files</Filter></CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
15
build/win32/vs10/gtk3-prebuild.vcxproj.filters
Normal file
15
build/win32/vs10/gtk3-prebuild.vcxproj.filters
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32_broadway"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\demos\gtk-demo\demos.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -12,7 +12,8 @@
|
||||
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
|
||||
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
|
||||
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
|
||||
<PythonPath>c:\python27</PythonPath>
|
||||
<PythonPath>c:\python34</PythonPath>
|
||||
<PythonPathX64>$(PythonPath).x64</PythonPathX64>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
|
||||
@@ -54,5 +55,8 @@
|
||||
<BuildMacro Include="PythonPath">
|
||||
<Value>$(PythonPath)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="PythonPathX64">
|
||||
<Value>$(PythonPathX64)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@@ -4,6 +4,7 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
@@ -27,6 +28,7 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
|
@@ -4,6 +4,7 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
@@ -27,6 +28,7 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
|
@@ -4,6 +4,7 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
@@ -27,6 +28,7 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
|
@@ -42,7 +42,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -74,7 +74,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -104,7 +104,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -136,7 +136,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -170,7 +170,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -202,7 +202,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -232,7 +232,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -264,7 +264,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
|
@@ -42,7 +42,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -72,7 +72,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -106,7 +106,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -136,7 +136,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -180,14 +180,14 @@
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
|
@@ -43,4 +43,20 @@
|
||||
Name="GtkDefines"
|
||||
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs$(VSVer)\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGdkCommonLibs"
|
||||
Value="imm32.lib"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkBroadwayAdditionalLibs"
|
||||
Value="ws2_32.lib"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkAdditionalLibs"
|
||||
Value="winmm.lib dwmapi.lib setupapi.lib $(GtkGdkCommonLibs)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkAdditionalLibs"
|
||||
Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -54,13 +54,17 @@ echo $(ConfigurationName) > ..\..\..\MSVC_$(ConfigurationName)_Broadway
|
||||
:DONE_GDKCONFIG_H

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GDbusCodeGenCmd"
|
||||
Value="$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkDbusBuiltSources"
|
||||
Value="
|
||||
cd ..\..\..\gtk

|
||||
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml

|
||||
cd $(SolutionDir)

|
||||
"
|
||||
Value="cd ..\..\..\gtk & $(PythonPath)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkDbusBuiltSourcesX64"
|
||||
Value="cd ..\..\..\gtk & $(PythonPathX64)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="CopyGtkWin32RC"
|
||||
|
@@ -28,8 +28,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -41,8 +41,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -55,8 +55,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -68,8 +68,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -83,8 +83,8 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -97,8 +97,8 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -112,8 +112,8 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -126,14 +126,78 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gtkpc.py">
|
||||
<FileConfiguration Name="Debug|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug_Broadway|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release_Broadway|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug_Broadway|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release_Broadway|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="gtkinstallprops"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBin"
|
||||
Value="
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="gtkinstallprops"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBin"
|
||||
Value="
|
||||
mkdir $(CopyDir)\bin

|
||||
mkdir $(CopyDir)\lib

|
||||
mkdir $(CopyDir)\lib\pkgconfig

|
||||
|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb $(CopyDir)\bin

|
||||
@@ -90,11 +90,15 @@ copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin
�
|
||||
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin

|
||||
:DONE_BIN

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstall"
|
||||
Value="
|
||||
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig

|
||||
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig

|
||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstall"
|
||||
Value="
|
||||
echo off

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated

|
||||
@@ -128,20 +132,32 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
|
||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkPostInstall"
|
||||
Value="
|
||||
echo "Compiling gsettings XML Files..."

|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas

|
||||
|
||||
echo "Generating icon cache..."

|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBroadwayHeaders"
|
||||
Value="
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBroadwayHeaders"
|
||||
Value="
|
||||
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway

|
||||
#include "gdk3-broadway.headers"
|
||||
"
|
||||
/>
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkPC"
|
||||
Value="$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkPCX64"
|
||||
Value="$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -54,4 +54,8 @@
|
||||
Name="PythonPath"
|
||||
Value="c:\python27"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="PythonPathX64"
|
||||
Value="$(PythonPath).x64"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -50,6 +50,11 @@
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define to 1 if you have the `exp2' function. */
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
#define HAVE_EXP2 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `flockfile' function. */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
@@ -105,6 +110,11 @@
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
/* #undef HAVE_LOCALTIME_R */
|
||||
|
||||
/* Define to 1 if you have the `log2' function. */
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
#define HAVE_LOG2 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
|
75
configure.ac
75
configure.ac
@@ -10,8 +10,8 @@
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [21])
|
||||
m4_define([gtk_micro_version], [0])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_interface_age], [2])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -42,8 +42,8 @@ m4_define([gtk_binary_version], [3.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_major], [2])
|
||||
m4_define([glib_required_minor], [45])
|
||||
m4_define([glib_required_micro], [8])
|
||||
m4_define([glib_required_minor], [49])
|
||||
m4_define([glib_required_micro], [1])
|
||||
m4_define([glib_required_version],
|
||||
[glib_required_major.glib_required_minor.glib_required_micro])
|
||||
m4_define([glib_min_required_minor],
|
||||
@@ -60,7 +60,7 @@ m4_define([cairo_required_version], [1.14.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
||||
m4_define([introspection_required_version], [1.39.0])
|
||||
m4_define([wayland_required_version], [1.9.91])
|
||||
m4_define([wayland_protocols_required_version], [1.0])
|
||||
m4_define([wayland_protocols_required_version], [1.3])
|
||||
m4_define([mirclient_required_version], [0.11.0])
|
||||
m4_define([mircookie_required_version], [0.17.0])
|
||||
m4_define([epoxy_required_version], [1.0])
|
||||
@@ -161,6 +161,10 @@ AC_PROG_MKDIR_P
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# i18n stuff
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION([0.19.7])
|
||||
|
||||
GETTEXT_PACKAGE=gtk30
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
@@ -580,19 +584,22 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
|
||||
PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
|
||||
|
||||
# Remove this check once cairo_required_version reaches at least 1.14.4
|
||||
case $host_os in
|
||||
mingw*)
|
||||
# Remove this check once cairo_required_version reaches at least 1.16.0
|
||||
AS_CASE([$host_os],
|
||||
[mingw*],
|
||||
[
|
||||
PKG_CHECK_MODULES(CAIRO, [cairo >= cairo_required_version])
|
||||
gtk_save_LIBS="$LIBS"
|
||||
LIBS="$CAIRO_LIBS $LIBS"
|
||||
AC_CHECK_LIB([cairo], [cairo_win32_surface_create_with_format],
|
||||
[AC_MSG_RESULT([found])],
|
||||
[AC_MSG_ERROR(
|
||||
[cairo_win32_surface_create_with_format is not found in cairo library
|
||||
You need cairo version newer than 2015-04-14])])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
You need a cairo snapshot 1.15.x or 1.16.x release or newer])])
|
||||
LIBS="$gtk_save_LIBS"
|
||||
],
|
||||
[]
|
||||
)
|
||||
|
||||
|
||||
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
|
||||
@@ -682,46 +689,7 @@ if test "$gtk_ok" = "yes"; then
|
||||
[Define if _NL_PAPER_WIDTH is available])
|
||||
fi
|
||||
|
||||
# i18n stuff
|
||||
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
AC_MSG_CHECKING([whether xgettext supports ui files])
|
||||
if $ac_cv_path_XGETTEXT --output=- --color=no --language=Glade $srcdir/gtk/ui/gtkfilechooserwidget.ui > /dev/null 2>&1; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([GNU gettext 0.18.3 or newer is required])
|
||||
fi
|
||||
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_CONFIG_COMMANDS([po-properties],
|
||||
[[case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
|
||||
esac]],
|
||||
[[]])
|
||||
|
||||
dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
|
||||
dnl po-properties/POTFILES during configure; see GNOME #573515.
|
||||
dnl
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po-properties/Makefile.
|
||||
test -d po-properties || mkdir po-properties
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
popropsrcprefix="$srcdir/"
|
||||
else
|
||||
popropsrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
popropsrcprefix="../"
|
||||
fi
|
||||
rm -f po-properties/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
|
||||
dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
|
||||
|
||||
AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
|
||||
|
||||
dnl The DU4 header files don't provide library prototypes unless
|
||||
dnl -std1 is given to the native cc.
|
||||
@@ -894,7 +862,7 @@ AC_TYPE_UID_T
|
||||
|
||||
# Check for round(), rint(), isnan(), isinf() and nearbyint()
|
||||
AC_CHECK_LIB(m,round,,)
|
||||
AC_CHECK_FUNCS(round rint nearbyint sincos)
|
||||
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2)
|
||||
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
|
||||
|
||||
# Checks for gdkspawn
|
||||
@@ -1968,7 +1936,6 @@ docs/reference/libgail-util/Makefile
|
||||
docs/reference/libgail-util/version.xml
|
||||
docs/tools/Makefile
|
||||
build/Makefile
|
||||
build/gtk-introspection-msvc.mak
|
||||
build/win32/Makefile
|
||||
build/win32/vs9/Makefile
|
||||
build/win32/vs9/gtk3-version-paths.vsprops
|
||||
|
BIN
demos/gtk-demo/context_menu_cursor.png
Normal file
BIN
demos/gtk-demo/context_menu_cursor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@@ -4,7 +4,7 @@
|
||||
transition-property: color, background-color, border-color, background-image, padding, border-width;
|
||||
transition-duration: 1s;
|
||||
|
||||
font: Cantarell 20px;
|
||||
font: 20px Cantarell;
|
||||
}
|
||||
|
||||
window {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* Make the text editor has a nice style */
|
||||
.view {
|
||||
color: #2e3436;
|
||||
font: Monospace;
|
||||
font-family: Monospace;
|
||||
background-color: alpha(white, 0.30);
|
||||
}
|
||||
|
||||
|
@@ -54,6 +54,7 @@
|
||||
<file>all_scroll_cursor.png</file>
|
||||
<file>cell_cursor.png</file>
|
||||
<file>col_resize_cursor.png</file>
|
||||
<file>context_menu_cursor.png</file>
|
||||
<file>copy_cursor.png</file>
|
||||
<file>crosshair_cursor.png</file>
|
||||
<file>default_cursor.png</file>
|
||||
@@ -199,8 +200,10 @@
|
||||
<file>popover.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/glarea">
|
||||
<file>glarea-fragment.glsl</file>
|
||||
<file>glarea-vertex.glsl</file>
|
||||
<file>glarea-gl.fs.glsl</file>
|
||||
<file>glarea-gl.vs.glsl</file>
|
||||
<file>glarea-gles.fs.glsl</file>
|
||||
<file>glarea-gles.vs.glsl</file>
|
||||
</gresource>
|
||||
<gresource prefix="/font_features">
|
||||
<file>font-features.ui</file>
|
||||
|
@@ -24,14 +24,15 @@
|
||||
|
||||
typedef struct {
|
||||
GdkDevice *last_source;
|
||||
GHashTable *axes; /* axis label atom -> value */
|
||||
GdkDeviceTool *last_tool;
|
||||
gdouble *axes;
|
||||
GdkRGBA color;
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
} AxesInfo;
|
||||
|
||||
typedef struct {
|
||||
AxesInfo *pointer_info;
|
||||
GHashTable *pointer_info; /* GdkDevice -> AxesInfo */
|
||||
GHashTable *touch_info; /* GdkEventSequence -> AxesInfo */
|
||||
} EventData;
|
||||
|
||||
@@ -59,51 +60,22 @@ axes_info_new (void)
|
||||
|
||||
info = g_new0 (AxesInfo, 1);
|
||||
gdk_rgba_parse (&info->color, colors[cur_color]);
|
||||
info->axes = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) g_free);
|
||||
|
||||
cur_color = (cur_color + 1) % G_N_ELEMENTS (colors);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static void
|
||||
axes_info_free (AxesInfo *info)
|
||||
{
|
||||
g_hash_table_destroy (info->axes);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
axes_info_lookup (AxesInfo *info,
|
||||
const gchar *axis_label,
|
||||
gdouble *value)
|
||||
{
|
||||
gdouble *val;
|
||||
GdkAtom atom;
|
||||
|
||||
atom = gdk_atom_intern (axis_label, FALSE);
|
||||
|
||||
if (atom == GDK_NONE)
|
||||
return FALSE;
|
||||
|
||||
val = g_hash_table_lookup (info->axes, GDK_ATOM_TO_POINTER (atom));
|
||||
|
||||
if (!val)
|
||||
return FALSE;
|
||||
|
||||
*value = *val;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static EventData *
|
||||
event_data_new (void)
|
||||
{
|
||||
EventData *data;
|
||||
|
||||
data = g_new0 (EventData, 1);
|
||||
data->pointer_info = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) g_free);
|
||||
data->touch_info = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) axes_info_free);
|
||||
(GDestroyNotify) g_free);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -111,8 +83,7 @@ event_data_new (void)
|
||||
static void
|
||||
event_data_free (EventData *data)
|
||||
{
|
||||
if (data->pointer_info)
|
||||
axes_info_free (data->pointer_info);
|
||||
g_hash_table_destroy (data->pointer_info);
|
||||
g_hash_table_destroy (data->touch_info);
|
||||
g_free (data);
|
||||
}
|
||||
@@ -123,13 +94,14 @@ update_axes_from_event (GdkEvent *event,
|
||||
{
|
||||
GdkDevice *device, *source_device;
|
||||
GdkEventSequence *sequence;
|
||||
gdouble x, y, value;
|
||||
GList *l, *axes;
|
||||
GdkDeviceTool *tool;
|
||||
gdouble x, y;
|
||||
AxesInfo *info;
|
||||
|
||||
device = gdk_event_get_device (event);
|
||||
source_device = gdk_event_get_source_device (event);
|
||||
sequence = gdk_event_get_event_sequence (event);
|
||||
tool = gdk_event_get_device_tool (event);
|
||||
|
||||
if (event->type == GDK_TOUCH_END ||
|
||||
event->type == GDK_TOUCH_CANCEL)
|
||||
@@ -139,17 +111,19 @@ update_axes_from_event (GdkEvent *event,
|
||||
}
|
||||
else if (event->type == GDK_LEAVE_NOTIFY)
|
||||
{
|
||||
if (data->pointer_info)
|
||||
axes_info_free (data->pointer_info);
|
||||
data->pointer_info = NULL;
|
||||
g_hash_table_remove (data->pointer_info, device);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sequence)
|
||||
{
|
||||
if (!data->pointer_info)
|
||||
data->pointer_info = axes_info_new ();
|
||||
info = data->pointer_info;
|
||||
info = g_hash_table_lookup (data->pointer_info, device);
|
||||
|
||||
if (!info)
|
||||
{
|
||||
info = axes_info_new ();
|
||||
g_hash_table_insert (data->pointer_info, device, info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -163,41 +137,31 @@ update_axes_from_event (GdkEvent *event,
|
||||
}
|
||||
|
||||
if (info->last_source != source_device)
|
||||
{
|
||||
g_hash_table_remove_all (info->axes);
|
||||
info->last_source = source_device;
|
||||
}
|
||||
info->last_source = source_device;
|
||||
|
||||
if (info->last_tool != tool)
|
||||
info->last_tool = tool;
|
||||
|
||||
g_clear_pointer (&info->axes, g_free);
|
||||
|
||||
if (event->type == GDK_TOUCH_BEGIN ||
|
||||
event->type == GDK_TOUCH_UPDATE ||
|
||||
event->type == GDK_MOTION_NOTIFY ||
|
||||
event->type == GDK_BUTTON_PRESS ||
|
||||
event->type == GDK_BUTTON_RELEASE)
|
||||
event->type == GDK_TOUCH_UPDATE)
|
||||
{
|
||||
axes = gdk_device_list_axes (device);
|
||||
|
||||
if (sequence && event->touch.emulating_pointer)
|
||||
{
|
||||
if (data->pointer_info)
|
||||
axes_info_free (data->pointer_info);
|
||||
data->pointer_info = NULL;
|
||||
}
|
||||
|
||||
for (l = axes; l; l = l->next)
|
||||
{
|
||||
gdouble *ptr;
|
||||
|
||||
/* All those event types are compatible wrt axes position in the struct */
|
||||
if (!gdk_device_get_axis_value (device, event->motion.axes,
|
||||
l->data, &value))
|
||||
continue;
|
||||
|
||||
ptr = g_new0 (gdouble, 1);
|
||||
*ptr = value;
|
||||
g_hash_table_insert (info->axes, GDK_ATOM_TO_POINTER (l->data), ptr);
|
||||
}
|
||||
|
||||
g_list_free (axes);
|
||||
g_hash_table_remove (data->pointer_info, device);
|
||||
}
|
||||
if (event->type == GDK_MOTION_NOTIFY)
|
||||
{
|
||||
info->axes =
|
||||
g_memdup (event->motion.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (source_device));
|
||||
}
|
||||
else if (event->type == GDK_BUTTON_PRESS ||
|
||||
event->type == GDK_BUTTON_RELEASE)
|
||||
{
|
||||
info->axes =
|
||||
g_memdup (event->button.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (source_device));
|
||||
}
|
||||
|
||||
if (gdk_event_get_coords (event, &x, &y))
|
||||
@@ -242,7 +206,8 @@ draw_axes_info (cairo_t *cr,
|
||||
AxesInfo *info,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
gdouble pressure, tilt_x, tilt_y, wheel;
|
||||
gdouble pressure, tilt_x, tilt_y, distance, wheel, rotation, slider;
|
||||
GdkAxisFlags axes = gdk_device_get_axes (info->last_source);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
@@ -257,10 +222,19 @@ draw_axes_info (cairo_t *cr,
|
||||
|
||||
cairo_translate (cr, info->x, info->y);
|
||||
|
||||
if (axes_info_lookup (info, "Abs Pressure", &pressure))
|
||||
if (!info->axes)
|
||||
{
|
||||
cairo_restore (cr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_PRESSURE)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_PRESSURE,
|
||||
&pressure);
|
||||
|
||||
pattern = cairo_pattern_create_radial (0, 0, 0, 0, 0, 100);
|
||||
cairo_pattern_add_color_stop_rgba (pattern, pressure, 1, 0, 0, pressure);
|
||||
cairo_pattern_add_color_stop_rgba (pattern, 1, 0, 0, 1, 0);
|
||||
@@ -273,12 +247,49 @@ draw_axes_info (cairo_t *cr,
|
||||
cairo_pattern_destroy (pattern);
|
||||
}
|
||||
|
||||
if (axes_info_lookup (info, "Abs Tilt X", &tilt_x) &&
|
||||
axes_info_lookup (info, "Abs Tilt Y", &tilt_y))
|
||||
render_arrow (cr, tilt_x * 100, tilt_y * 100, "Tilt");
|
||||
|
||||
if (axes_info_lookup (info, "Abs Wheel", &wheel))
|
||||
if (axes & GDK_AXIS_FLAG_XTILT &&
|
||||
axes & GDK_AXIS_FLAG_YTILT)
|
||||
{
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_XTILT,
|
||||
&tilt_x);
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_YTILT,
|
||||
&tilt_y);
|
||||
|
||||
render_arrow (cr, tilt_x * 100, tilt_y * 100, "Tilt");
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_DISTANCE)
|
||||
{
|
||||
double dashes[] = { 5.0, 5.0 };
|
||||
cairo_text_extents_t extents;
|
||||
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_DISTANCE,
|
||||
&distance);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_move_to (cr, distance * 100, 0);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
|
||||
cairo_set_dash (cr, dashes, 2, 0.0);
|
||||
cairo_arc (cr, 0, 0, distance * 100, 0, 2 * G_PI);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, 0, -distance * 100);
|
||||
cairo_text_extents (cr, "Distance", &extents);
|
||||
cairo_rel_move_to (cr, -extents.width / 2, 0);
|
||||
cairo_show_text (cr, "Distance");
|
||||
|
||||
cairo_move_to (cr, 0, 0);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_WHEEL)
|
||||
{
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_WHEEL,
|
||||
&wheel);
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_set_line_width (cr, 10);
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
|
||||
@@ -289,9 +300,88 @@ draw_axes_info (cairo_t *cr,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_ROTATION)
|
||||
{
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_ROTATION,
|
||||
&rotation);
|
||||
rotation *= 2 * G_PI;
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_rotate (cr, - G_PI / 2);
|
||||
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
|
||||
cairo_set_line_width (cr, 5);
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, 0, 0, 100, 0, rotation);
|
||||
cairo_stroke (cr);
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_SLIDER)
|
||||
{
|
||||
cairo_pattern_t *pattern, *mask;
|
||||
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_SLIDER,
|
||||
&slider);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_move_to (cr, 0, -10);
|
||||
cairo_rel_line_to (cr, 0, -50);
|
||||
cairo_rel_line_to (cr, 10, 0);
|
||||
cairo_rel_line_to (cr, -5, 50);
|
||||
cairo_close_path (cr);
|
||||
|
||||
cairo_clip_preserve (cr);
|
||||
|
||||
pattern = cairo_pattern_create_linear (0, -10, 0, -60);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0, 0, 1, 0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 1, 1, 0, 0);
|
||||
cairo_set_source (cr, pattern);
|
||||
cairo_pattern_destroy (pattern);
|
||||
|
||||
mask = cairo_pattern_create_linear (0, -10, 0, -60);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0, 0, 0, 0, 1);
|
||||
cairo_pattern_add_color_stop_rgba (mask, slider, 0, 0, 0, 1);
|
||||
cairo_pattern_add_color_stop_rgba (mask, slider, 0, 0, 0, 0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1, 0, 0, 0, 0);
|
||||
cairo_mask (cr, mask);
|
||||
cairo_pattern_destroy (mask);
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
tool_type_to_string (GdkDeviceToolType tool_type)
|
||||
{
|
||||
switch (tool_type)
|
||||
{
|
||||
case GDK_DEVICE_TOOL_TYPE_PEN:
|
||||
return "Pen";
|
||||
case GDK_DEVICE_TOOL_TYPE_ERASER:
|
||||
return "Eraser";
|
||||
case GDK_DEVICE_TOOL_TYPE_BRUSH:
|
||||
return "Brush";
|
||||
case GDK_DEVICE_TOOL_TYPE_PENCIL:
|
||||
return "Pencil";
|
||||
case GDK_DEVICE_TOOL_TYPE_AIRBRUSH:
|
||||
return "Airbrush";
|
||||
case GDK_DEVICE_TOOL_TYPE_MOUSE:
|
||||
return "Mouse";
|
||||
case GDK_DEVICE_TOOL_TYPE_LENS:
|
||||
return "Lens cursor";
|
||||
case GDK_DEVICE_TOOL_TYPE_UNKNOWN:
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
draw_device_info (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
@@ -313,6 +403,19 @@ draw_device_info (GtkWidget *widget,
|
||||
g_string_append_printf (string, "\nSequence: %d",
|
||||
GPOINTER_TO_UINT (sequence));
|
||||
|
||||
if (info->last_tool)
|
||||
{
|
||||
const gchar *tool_type;
|
||||
guint64 serial;
|
||||
|
||||
tool_type = tool_type_to_string (gdk_device_tool_get_tool_type (info->last_tool));
|
||||
serial = gdk_device_tool_get_serial (info->last_tool);
|
||||
g_string_append_printf (string, "\nTool: %s", tool_type);
|
||||
|
||||
if (serial != 0)
|
||||
g_string_append_printf (string, ", Serial: %lx", serial);
|
||||
}
|
||||
|
||||
cairo_move_to (cr, 10, *y);
|
||||
layout = gtk_widget_create_pango_layout (widget, string->str);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
@@ -341,7 +444,7 @@ draw_cb (GtkWidget *widget,
|
||||
{
|
||||
EventData *data = user_data;
|
||||
GtkAllocation allocation;
|
||||
AxesInfo *touch_info;
|
||||
AxesInfo *info;
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
gint y = 0;
|
||||
@@ -349,27 +452,37 @@ draw_cb (GtkWidget *widget,
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
/* Draw Abs info */
|
||||
if (data->pointer_info)
|
||||
draw_axes_info (cr, data->pointer_info, &allocation);
|
||||
g_hash_table_iter_init (&iter, data->pointer_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
info = value;
|
||||
draw_axes_info (cr, info, &allocation);
|
||||
}
|
||||
|
||||
g_hash_table_iter_init (&iter, data->touch_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
touch_info = value;
|
||||
draw_axes_info (cr, touch_info, &allocation);
|
||||
info = value;
|
||||
draw_axes_info (cr, info, &allocation);
|
||||
}
|
||||
|
||||
/* Draw name, color legend and misc data */
|
||||
if (data->pointer_info)
|
||||
draw_device_info (widget, cr, NULL, &y, data->pointer_info);
|
||||
g_hash_table_iter_init (&iter, data->pointer_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
info = value;
|
||||
draw_device_info (widget, cr, NULL, &y, info);
|
||||
}
|
||||
|
||||
g_hash_table_iter_init (&iter, data->touch_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
touch_info = value;
|
||||
draw_device_info (widget, cr, key, &y, touch_info);
|
||||
info = value;
|
||||
draw_device_info (widget, cr, key, &y, info);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -393,11 +506,14 @@ do_event_axes (GtkWidget *toplevel)
|
||||
|
||||
box = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_set_support_multidevice (box, TRUE);
|
||||
gtk_widget_add_events (box,
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_SMOOTH_SCROLL_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_TOUCH_MASK);
|
||||
|
||||
event_data = event_data_new ();
|
||||
|
7
demos/gtk-demo/glarea-gles.fs.glsl
Normal file
7
demos/gtk-demo/glarea-gles.fs.glsl
Normal file
@@ -0,0 +1,7 @@
|
||||
precision highp float;
|
||||
|
||||
void main() {
|
||||
float lerpVal = gl_FragCoord.y / 500.0f;
|
||||
|
||||
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
|
||||
}
|
7
demos/gtk-demo/glarea-gles.vs.glsl
Normal file
7
demos/gtk-demo/glarea-gles.vs.glsl
Normal file
@@ -0,0 +1,7 @@
|
||||
attribute vec4 position;
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
void main() {
|
||||
gl_Position = mvp * position;
|
||||
}
|
@@ -93,7 +93,9 @@ create_shader (int type,
|
||||
|
||||
/* Initialize the shaders and link them into a program */
|
||||
static void
|
||||
init_shaders (GLuint *program_out,
|
||||
init_shaders (const char *vertex_path,
|
||||
const char *fragment_path,
|
||||
GLuint *program_out,
|
||||
GLuint *mvp_out)
|
||||
{
|
||||
GLuint vertex, fragment;
|
||||
@@ -102,7 +104,7 @@ init_shaders (GLuint *program_out,
|
||||
int status;
|
||||
GBytes *source;
|
||||
|
||||
source = g_resources_lookup_data ("/glarea/glarea-vertex.glsl", 0, NULL);
|
||||
source = g_resources_lookup_data (vertex_path, 0, NULL);
|
||||
vertex = create_shader (GL_VERTEX_SHADER, g_bytes_get_data (source, NULL));
|
||||
g_bytes_unref (source);
|
||||
|
||||
@@ -112,7 +114,7 @@ init_shaders (GLuint *program_out,
|
||||
return;
|
||||
}
|
||||
|
||||
source = g_resources_lookup_data ("/glarea/glarea-fragment.glsl", 0, NULL);
|
||||
source = g_resources_lookup_data (fragment_path, 0, NULL);
|
||||
fragment = create_shader (GL_FRAGMENT_SHADER, g_bytes_get_data (source, NULL));
|
||||
g_bytes_unref (source);
|
||||
|
||||
@@ -218,13 +220,29 @@ static GLuint mvp_location;
|
||||
static void
|
||||
realize (GtkWidget *widget)
|
||||
{
|
||||
const char *vertex_path, *fragment_path;
|
||||
GdkGLContext *context;
|
||||
|
||||
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||
|
||||
if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
|
||||
return;
|
||||
|
||||
context = gtk_gl_area_get_context (GTK_GL_AREA (widget));
|
||||
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
{
|
||||
vertex_path = "/glarea/glarea-gles.vs.glsl";
|
||||
fragment_path = "/glarea/glarea-gles.fs.glsl";
|
||||
}
|
||||
else
|
||||
{
|
||||
vertex_path = "/glarea/glarea-gl.vs.glsl";
|
||||
fragment_path = "/glarea/glarea-gl.fs.glsl";
|
||||
}
|
||||
|
||||
init_buffers (&position_buffer, NULL);
|
||||
init_shaders (&program, &mvp_location);
|
||||
init_shaders (vertex_path, fragment_path, &program, &mvp_location);
|
||||
}
|
||||
|
||||
/* We should tear down the state when unrealizing */
|
||||
|
@@ -28,7 +28,8 @@ source_toggled (GtkToggleButton *button)
|
||||
markup = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
gtk_text_buffer_get_start_iter (buffer, &start);
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
gtk_text_buffer_delete (buffer, &start, &end);
|
||||
gtk_text_buffer_insert_markup (buffer, &start, markup, -1);
|
||||
g_free (markup);
|
||||
|
||||
@@ -67,6 +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_pack_start (GTK_HEADER_BAR (header), show_source);
|
||||
gtk_widget_show_all (header);
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -12,10 +12,13 @@ static guint timeout = 0;
|
||||
static void
|
||||
change_direction (GtkRevealer *revealer)
|
||||
{
|
||||
gboolean revealed;
|
||||
if (gtk_widget_get_mapped (GTK_WIDGET (revealer)))
|
||||
{
|
||||
gboolean revealed;
|
||||
|
||||
revealed = gtk_revealer_get_child_revealed (revealer);
|
||||
gtk_revealer_set_reveal_child (revealer, !revealed);
|
||||
revealed = gtk_revealer_get_child_revealed (revealer);
|
||||
gtk_revealer_set_reveal_child (revealer, !revealed);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -1625,6 +1625,12 @@ reset_icon_size (GtkWidget *iv)
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
scale_format_value (GtkScale *scale, gdouble value)
|
||||
{
|
||||
return g_strdup (" ");
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
@@ -1690,6 +1696,7 @@ activate (GApplication *app)
|
||||
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);
|
||||
gtk_builder_add_callback_symbol (builder, "reset_icon_size", (GCallback)reset_icon_size);
|
||||
gtk_builder_add_callback_symbol (builder, "scale_format_value", (GCallback)scale_format_value);
|
||||
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
|
||||
|
@@ -1241,7 +1241,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict_to_fill_level">0</property>
|
||||
<property name="fill_level">75</property>
|
||||
<property name="draw_value">0</property>
|
||||
<property name="draw_value">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@@ -1254,7 +1254,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict_to_fill_level">0</property>
|
||||
<property name="fill_level">75</property>
|
||||
<property name="draw_value">0</property>
|
||||
<property name="draw_value">1</property>
|
||||
<signal name="format-value" handler="scale_format_value"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
@@ -4126,8 +4127,10 @@ bad things might happen.</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-height">70</property>
|
||||
<property name="max-content-height">120</property>
|
||||
<property name="min-content-width">100</property>
|
||||
<property name="max-content-width">100</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="open_popover_textview">
|
||||
<property name="visible">1</property>
|
||||
|
@@ -162,6 +162,7 @@ HTML_IMAGES = \
|
||||
images/grabbing_cursor.png \
|
||||
images/grab_cursor.png \
|
||||
images/hand_cursor.png \
|
||||
images/context_menu_cursor.png \
|
||||
images/help_cursor.png \
|
||||
images/move_cursor.png \
|
||||
images/ne_resize_cursor.png \
|
||||
|
@@ -24,7 +24,6 @@
|
||||
<xi:include href="xml/gdkscreen.xml" />
|
||||
<xi:include href="xml/gdkseat.xml" />
|
||||
<xi:include href="xml/gdkmonitor.xml" />
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
<xi:include href="xml/gdkdevice.xml" />
|
||||
<xi:include href="xml/regions.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
@@ -34,6 +33,7 @@
|
||||
<xi:include href="xml/windows.xml" />
|
||||
<xi:include href="xml/gdkframeclock.xml" />
|
||||
<xi:include href="xml/gdkframetimings.xml" />
|
||||
<xi:include href="xml/gdkdrawingcontext.xml" />
|
||||
<xi:include href="xml/gdkglcontext.xml" />
|
||||
<xi:include href="xml/events.xml" />
|
||||
<xi:include href="xml/event_structs.xml" />
|
||||
@@ -53,6 +53,7 @@
|
||||
<reference>
|
||||
<title>Deprecated</title>
|
||||
<xi:include href="xml/colors.xml" />
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
</reference>
|
||||
|
||||
<index id="api-index-full">
|
||||
@@ -107,6 +108,10 @@
|
||||
<title>Index of new symbols in 3.20</title>
|
||||
<xi:include href="xml/api-index-3.20.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-22" role="3.22">
|
||||
<title>Index of new symbols in 3.22</title>
|
||||
<xi:include href="xml/api-index-3.22.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
@@ -412,6 +412,9 @@ gdk_window_get_clip_region
|
||||
gdk_window_begin_paint_rect
|
||||
gdk_window_begin_paint_region
|
||||
gdk_window_end_paint
|
||||
gdk_window_begin_draw_frame
|
||||
gdk_window_end_draw_fram
|
||||
gdk_window_should_draw
|
||||
gdk_window_get_visible_region
|
||||
GdkWindowInvalidateHandlerFunc
|
||||
gdk_window_set_invalidate_handler
|
||||
@@ -612,6 +615,7 @@ gdk_pango_layout_get_clip_region
|
||||
gdk_pango_layout_line_get_clip_region
|
||||
gdk_pango_context_get
|
||||
gdk_pango_context_get_for_screen
|
||||
gdk_pango_context_get_for_display
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -621,6 +625,7 @@ gdk_window_create_similar_surface
|
||||
gdk_window_create_similar_image_surface
|
||||
gdk_cairo_create
|
||||
gdk_cairo_get_clip_rectangle
|
||||
gdk_cairo_get_drawing_context
|
||||
gdk_cairo_set_source_color
|
||||
gdk_cairo_set_source_rgba
|
||||
gdk_cairo_set_source_pixbuf
|
||||
@@ -720,6 +725,8 @@ GdkDevice
|
||||
GdkInputSource
|
||||
GdkInputMode
|
||||
GdkAxisUse
|
||||
GdkAxisFlags
|
||||
GdkDeviceToolType
|
||||
GdkDeviceType
|
||||
GdkGrabOwnership
|
||||
|
||||
@@ -741,6 +748,7 @@ gdk_device_get_display
|
||||
gdk_device_get_has_cursor
|
||||
gdk_device_get_n_axes
|
||||
gdk_device_get_n_keys
|
||||
gdk_device_get_axes
|
||||
gdk_device_warp
|
||||
gdk_device_get_seat
|
||||
|
||||
@@ -762,6 +770,10 @@ gdk_device_list_axes
|
||||
gdk_device_get_axis_value
|
||||
gdk_device_get_last_event_window
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_tool_get_serial
|
||||
gdk_device_tool_get_tool_type
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_AXIS_USE
|
||||
GDK_TYPE_EXTENSION_MODE
|
||||
@@ -874,6 +886,8 @@ gdk_events_get_center
|
||||
gdk_events_get_distance
|
||||
gdk_event_triggers_context_menu
|
||||
gdk_event_get_seat
|
||||
gdk_event_get_scancode
|
||||
gdk_event_get_pointer_emulated
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_event_handler_set
|
||||
@@ -888,6 +902,8 @@ gdk_event_get_device
|
||||
gdk_event_set_device
|
||||
gdk_event_get_source_device
|
||||
gdk_event_set_source_device
|
||||
gdk_event_get_device_tool
|
||||
gdk_event_set_device_tool
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_setting_get
|
||||
@@ -1349,6 +1365,8 @@ gdk_gl_context_set_debug_enabled
|
||||
gdk_gl_context_get_debug_enabled
|
||||
gdk_gl_context_set_forward_compatible
|
||||
gdk_gl_context_get_forward_compatible
|
||||
gdk_gl_context_set_use_es
|
||||
gdk_gl_context_get_use_es
|
||||
gdk_gl_context_is_legacy
|
||||
|
||||
<SUBSECTION>
|
||||
@@ -1395,3 +1413,19 @@ GDK_TYPE_MONITOR
|
||||
GDK_MONITOR
|
||||
GDK_IS_MONITOR
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkdrawingcontext</FILE>
|
||||
GdkDrawingContext
|
||||
gdk_drawing_context_get_window
|
||||
gdk_drawing_context_get_clip
|
||||
gdk_drawing_context_get_cairo_context
|
||||
gdk_drawing_context_is_valid
|
||||
|
||||
<SUBSECTION Standard>
|
||||
gdk_drawing_context_get_type
|
||||
GdkDrawingContextClass
|
||||
GDK_TYPE_DRAWING_CONTEXT
|
||||
GDK_DRAWING_CONTEXT
|
||||
GDK_IS_DRAWING_CONTEXT
|
||||
</SECTION>
|
||||
|
@@ -7,6 +7,7 @@ gdk_device_manager_get_type
|
||||
gdk_display_get_type
|
||||
gdk_display_manager_get_type
|
||||
gdk_drag_context_get_type
|
||||
gdk_drawing_context_get_type
|
||||
gdk_frame_clock_get_type
|
||||
gdk_gl_context_get_type
|
||||
gdk_keymap_get_type
|
||||
|
BIN
docs/reference/gdk/images/context_menu_cursor.png
Normal file
BIN
docs/reference/gdk/images/context_menu_cursor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -27,6 +27,7 @@ IGNORE_HFILES = \
|
||||
gtkadjustmentprivate.h \
|
||||
gtkallocatedbitmaskprivate.h \
|
||||
gtkappchooserprivate.h \
|
||||
gtkapplicationaccelsprivate.h \
|
||||
gtkapplicationprivate.h \
|
||||
gtkbindingsprivate.h \
|
||||
gtkbitmaskprivate.h \
|
||||
@@ -302,6 +303,7 @@ content_files = \
|
||||
gtk-update-icon-cache.xml \
|
||||
input-handling.xml \
|
||||
migrating-2to3.xml \
|
||||
migrating-3xtoy.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-GtkGrid.xml \
|
||||
migrating-GtkStyleContext.xml \
|
||||
@@ -328,6 +330,7 @@ expand_content_files = \
|
||||
glossary.xml \
|
||||
input-handling.xml \
|
||||
migrating-2to3.xml \
|
||||
migrating-3xtoy.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-GtkGrid.xml \
|
||||
migrating-GtkStyleContext.xml \
|
||||
|
@@ -43,10 +43,10 @@ To use broadwayd, start it like this:
|
||||
<programlisting>
|
||||
broadwayd :5
|
||||
</programlisting>
|
||||
Then point your web browser at <literal>http://127.0.0.1:8084</literal>.
|
||||
Then point your web browser at <literal>http://127.0.0.1:8085</literal>.
|
||||
Start your applications like this:
|
||||
<programlisting>
|
||||
BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -58,11 +58,11 @@ BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
<title><envar>BROADWAY_DISPLAY</envar></title>
|
||||
|
||||
<para>
|
||||
Specifies the Broadway display number. The default display is 1.
|
||||
Specifies the Broadway display number. The default display is 0.
|
||||
The display number determines the port to use when connecting
|
||||
to a Broadway application via the following formula:
|
||||
<programlisting>
|
||||
<replaceable>port</replaceable> = 8080 + (<replaceable>display</replaceable> - 1)
|
||||
<replaceable>port</replaceable> = 8080 + <replaceable>display</replaceable>
|
||||
</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
|
@@ -45,14 +45,14 @@ windows in the same web browser, by connecting to broadwayd.
|
||||
</para>
|
||||
<para>
|
||||
When using broadwayd, specify the display number to use, prefixed
|
||||
with a colon, similar to X. The default display number is 1.
|
||||
with a colon, similar to X. The default display number is 0.
|
||||
<programlisting>
|
||||
broadwayd :5
|
||||
</programlisting>
|
||||
Then point your web browser at <literal>http://127.0.0.1:8084</literal>.
|
||||
Then point your web browser at <literal>http://127.0.0.1:8085</literal>.
|
||||
Start your applications like this:
|
||||
<programlisting>
|
||||
BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
</programlisting>
|
||||
|
||||
You can add password protection for your session by creating a file in
|
||||
|
@@ -41,12 +41,13 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
|
||||
<para>
|
||||
GTK+ supports CSS properties and shorthands as far as they can be applied
|
||||
in the context of widgets, and only adds its own properties only when needed.
|
||||
in the context of widgets, and adds its own properties only when needed.
|
||||
All GTK+-specific properties have a -gtk prefix.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
All properties support the following keywords: inherit, initial, unset.
|
||||
All properties support the following keywords: inherit, initial, unset, with
|
||||
the same meaning as in <ulink url="https://www.w3.org/TR/css3-cascade/#defaulting-keywords">CSS</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -104,16 +105,16 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
follows:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>4 values:</term><listitem>top right bottom left</listitem>
|
||||
<term>4 values: </term><listitem>top right bottom left</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>3 values:</term><listitem>top horizontal left</listitem>
|
||||
<term>3 values: </term><listitem>top horizontal left</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>2 values:</term><listitem>vertical horizontal</listitem>
|
||||
<term>2 values: </term><listitem>vertical horizontal</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>1 value:</term><listitem>all</listitem>
|
||||
<term>1 value: </term><listitem>all</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
@@ -1028,6 +1029,10 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<para>
|
||||
GTK+ uses the CSS outline properties to render the 'focus rectangle'.
|
||||
</para>
|
||||
|
||||
<table pgwide="1">
|
||||
<title>Background properties</title>
|
||||
<tgroup cols="7">
|
||||
@@ -1142,6 +1147,10 @@ We use <literallayout> for syntax productions, and each line is put in a <code>
|
||||
<code>〈box shadow〉 = inset? && 〈length〉{2,4}? && 〈color〉?</code>
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
As in CSS, the background color is rendered underneath all the background image layers, so it will only be visible if
|
||||
background images are absent or have transparency.
|
||||
</para>
|
||||
|
||||
<table pgwide="1">
|
||||
<title>Transition properties</title>
|
||||
|
@@ -404,6 +404,7 @@
|
||||
<xi:include href="xml/migrating-smclient-GtkApplication.xml" />
|
||||
<xi:include href="xml/migrating-GtkGrid.xml" />
|
||||
<xi:include href="xml/migrating-checklist.sgml" />
|
||||
<xi:include href="xml/migrating-3xtoy.xml" />
|
||||
</part>
|
||||
|
||||
<part>
|
||||
|
@@ -8475,6 +8475,8 @@ gtk_gl_area_set_auto_render
|
||||
gtk_gl_area_get_auto_render
|
||||
gtk_gl_area_get_required_version
|
||||
gtk_gl_area_set_required_version
|
||||
gtk_gl_area_set_use_es
|
||||
gtk_gl_area_get_use_es
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_GL_AREA
|
||||
GTK_GL_AREA
|
||||
|
@@ -1133,7 +1133,7 @@ gtk_arrow_draw (GtkWidget *widget,
|
||||
The default values for the #GtkScrolledWindow:hscrollbar-policy and
|
||||
#GtkScrolledWindow:vscrollbar-policy properties have been changed from
|
||||
'never' to 'automatic'. If your application was relying on the default
|
||||
value, you will have explicitly set it explicitly.
|
||||
value, you will have to set it explicitly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -1205,6 +1205,12 @@ gtk_arrow_draw (GtkWidget *widget,
|
||||
have disappeared, and instead there are now
|
||||
gtk_window_set_has_resize_grip() and gtk_window_get_has_resize_grip().
|
||||
</para>
|
||||
<para>
|
||||
In more recent versions of GTK+ 3, the resize grip functionality has
|
||||
been removed entirely, in favor of invisible resize borders around the
|
||||
window. When updating to newer versions of GTK+ 3, you should simply
|
||||
remove all code dealing with resize grips.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
415
docs/reference/gtk/migrating-3xtoy.xml
Normal file
415
docs/reference/gtk/migrating-3xtoy.xml
Normal file
@@ -0,0 +1,415 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
]>
|
||||
<chapter id="gtk-migrating-3-x-to-y">
|
||||
<title>Migrating from one GTK+ 3 release to another</title>
|
||||
|
||||
<para>
|
||||
GTK+ 3 has seen considerable development over multiple stable releases.
|
||||
While we try to maintain compatibility as far as possible, some minor
|
||||
adjustments may be necessary when moving an application from one release
|
||||
of GTK+ 3 to the next.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following sections list noteworthy changes in GTK+ 3.x release that
|
||||
may or may not require applications to be updated.
|
||||
</para>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.2</title>
|
||||
|
||||
<para>
|
||||
The accessible implementations for GTK+ widgets have been integrated
|
||||
into libgtk itself, and the gail module does not exist anymore. This
|
||||
change should not affect applications very much.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.4</title>
|
||||
|
||||
<para>
|
||||
Scroll events have been separated from button events, and smooth
|
||||
scrolling has been added with a separate event mask. Widgets now
|
||||
need to have either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK in
|
||||
their event mask to receive scroll events. In addition, the
|
||||
GdkScrollDirection enumeration has gained a new member,
|
||||
GDK_SCROLL_SMOOTH, so switch statements will have to be amended
|
||||
to cover this case.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK+ now uses <Primary> instead of <Control> in keyboard
|
||||
accelerators, for improved cross-platform handling. This should not
|
||||
affect applications, unless they parse or create these accelerator
|
||||
manually.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The tacit assumption that the Alt key corresponds to the MOD1
|
||||
modifier under X11 is now a hard requirement.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The beagle search backend for the file chooser has been dropped.
|
||||
Tracker is the only supported search backend on Linux now.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkNotebook has been changed to destroy its action widgets when
|
||||
it gets destroyed itself. If your application is using action
|
||||
widgets in notebooks, you may have to adjust your code to take
|
||||
this into account.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkApplication no longer uses the gtk_ mainloop wrappers, so
|
||||
it is no longer possible to use gtk_main_quit() to stop it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The -uninstalled variants of the pkg-config files have been dropped.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Excessive dependencies have been culled from Requires: lines
|
||||
in .pc files. Dependent modules may have to declare dependencies
|
||||
that there were getting 'for free' in the past.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.6</title>
|
||||
|
||||
<para>
|
||||
The accessibility bridge code that exports accessible objects
|
||||
on the bus is now used by default; atk-bridge has been converted
|
||||
into a library that GTK+ links against. To void the linking,
|
||||
pass --without-atk-bridge when configuring GTK+.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK threading support has been deprecated. It is recommended to
|
||||
use g_idle_add(), g_main_context_invoke() and similar funtions
|
||||
to make all GTK+ calls from the main thread.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK+ now follows the XDG Base Directory specification for
|
||||
user configuration and data files. In detail,
|
||||
<itemizedlist>
|
||||
<listitem>$XDG_CONFIG_HOME/gtk-3.0/custom-papers is the new location
|
||||
for $HOME/.gtk-custom-papers</listitem>
|
||||
<listitem>$XDG_CONFIG_HOME/gtk-3.0/bookmarks is the new location
|
||||
for $HOME/.gtk-bookmarks</listitem>
|
||||
<listitem>$XDG_DATA_HOME/themes is preferred over $HOME/.themes</listitem>
|
||||
<listitem>$XDG_DATA_HOME/icons is preferred over $HOME/.icons.</listitem>
|
||||
</itemizedlist>
|
||||
Existing files from the old location will still be read
|
||||
if the new location does not exist.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
$HOME/.gtk-3.0 is no longer in the default module load path.
|
||||
If you want to load modules from there, add it to the GTK_PATH
|
||||
environment variable.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.8</title>
|
||||
|
||||
<para>
|
||||
GtkIconInfo has changed from being a boxed type to a GObject.
|
||||
This is technically an ABI change, but basically all existing code
|
||||
will keep working if its used as a boxed type, and it is not
|
||||
possible to instantiate GtkIconInfos outside GTK+, so this is
|
||||
not expected to be a big problem.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.10</title>
|
||||
|
||||
<para>
|
||||
GDK has been changed to allow only a single screen per display.
|
||||
Only the X11 backend had multiple screens before, and multi-screen
|
||||
setups (not multi-monitor!) are very rare nowadays. If you really
|
||||
need multiple X screens, open them as separate displays.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The behavior of GtkBox::expand has been changed to never propagate
|
||||
up. Previously, this was happening inconsistently. If you want the
|
||||
expand to propagate, use the GtkWidget h/v expand properties.
|
||||
If you experience sizing problems with widgets in ported code,
|
||||
carefully check the expand and fill flags of your boxes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkBin no longer provides default implementations for
|
||||
get_height_for_width, subclasses now have to provide their own
|
||||
implementation if they need height-for-width functionality.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Widget state propagation has been changed. Historically, all of
|
||||
active, prelight, selected, insensitive, inconsistent and backdrop
|
||||
have been propagated to children. This has now been restricted
|
||||
to just the insensitive and backdrop states. This mostly affects
|
||||
theming.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The way widget drawing happens has changed. Earlier versions handled
|
||||
one expose event per GdkWindow, each with a separate cairo_t. Now we
|
||||
only handle the expose event on the toplevel and reuse the same
|
||||
cairo_t (with the right translation and clipping) for the entire
|
||||
widget hierarchy, recursing down via the GtkWidget::draw signal.
|
||||
Having all rendering in the same call tree allows effects like
|
||||
opacity and offscreen rendering of entire widget sub-hierarchies.
|
||||
Generally this should not require any changes in widgets, but
|
||||
code looking at e.g. the current expose event may see different
|
||||
behavior than before.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The Gtk+ scrolling implementation has changed. gdk_window_scroll()
|
||||
and gdk_window_move_region() no longer copy the region on the
|
||||
window, but rather invalidate the entire scrolled region. This is
|
||||
slightly slower, but allowed us to implement a offscreen surface
|
||||
scrolling method which better fits modern hardware. Most scrolling
|
||||
widgets in Gtk+ have been converted to use this model for scrolling,
|
||||
but external widgets implementing scrolling using GdkWindow may see
|
||||
some slowdown.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.12</title>
|
||||
|
||||
<para>
|
||||
GtkWidget had a hack where if opacity is 0.999 we set up an opacity
|
||||
group when rendering the widget. This is no longer needed in 3.10,
|
||||
and GtkStack doesn't use it anymore. It has been removed in 3.12.
|
||||
GdStack is using it, so applications should be ported from GdStack
|
||||
to GtkStack in 3.12.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkHeaderBar in 3.10 was not ordering its pack-end children in
|
||||
the right way. This has been fixed in 3.12. Applications which
|
||||
pack multiple widgets at the end of a headerbar will have to
|
||||
be updated.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
gtk_text_view_add_child_in_window has changed behaviour a bit.
|
||||
It now always positions the child in buffer coordinates, where
|
||||
it used to inconsistently scroll with the buffer but then go
|
||||
reposition to a window-relative position on redraw.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A number of container widgets have been made more compliant with
|
||||
the uniform CSS rendering model by making them render backgrounds
|
||||
and borders. This may require some adjustments in applications that
|
||||
were making assumptions about containers never rendering backgrounds.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.14</title>
|
||||
|
||||
<para>
|
||||
A new state, GTK_STATE_FLAG_CHECKED, has been added for checked states
|
||||
of radio and check buttons and menuitems. Applications that are using
|
||||
GTK+ styles without widgets will need adjustments.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Adwaita is now the default theme on all platforms.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The icon theme code has become a little pickier about sizes and is not
|
||||
automatically scaling icons beyond the limits defined in the icon theme
|
||||
unless explicitly asked to do so with GTK_ICON_LOOKUP_FORCE_SIZE.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK+ now includes an interactive debugger which can be activated with
|
||||
the keyboard shortcuts Ctrl-Shift-d or Ctrl-Shift-i. If these shortcuts
|
||||
interfere with application keybindings, they can be disabled with the
|
||||
setting org.gtk.Settings.Debug.enable-inspector-keybinding.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Most widgets have been ported to use the new gesture framework internally
|
||||
for event handling. Traditional event handlers in derived widgets are still
|
||||
being called.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Using GTK+ under X11 without the X Render extension has been observed
|
||||
to be problematic. This combination is using code paths in cairo and
|
||||
graphics drivers which are rarely tested and likely buggy.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkTextView is now using a pixel-cache internally, and is drawing
|
||||
a background underneath the text. This can cause problems for applications
|
||||
which assumed that they could draw things below and above the text
|
||||
by chaining up in the ::draw implementation of their GtkTextView subclass.
|
||||
As a short-term workaround, you can make the application apply a
|
||||
custom theme to the text view with a transparent background. For
|
||||
a proper fix, use the new ::draw_layer vfunc.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.16</title>
|
||||
|
||||
<para>
|
||||
GTK+ now includes an OpenGL rendering widget. To support GL on various
|
||||
platforms, GTK+ uses libepoxy.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK+ no longer uses gtk-update-icon-cache during its build. The
|
||||
--enable-gtk2-dependency configure option has been removed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The introspection annotations for the x and y parameters of
|
||||
GtkMenuPositionFunc have been corrected from 'out' to 'inout'.
|
||||
If you are using such a function from language-bindings, this
|
||||
may require adjustments.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The lookup order for actions that are activated via keyboard
|
||||
accelerators has been changed to start at the currently focused
|
||||
widget. If your application is making use fo nested action groups
|
||||
via gtk_widget_insert_action_group, you may want to check that
|
||||
this change does not upset your accelerators.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The GtkScrollable interface has gained a new vfunc, get_border,
|
||||
that is used to position overshoot and undershoot indications that
|
||||
are drawn over the content by GtkScrolledWindow. Unless your scrollable
|
||||
has non-scrolling parts similar to treeview headers, there is no need
|
||||
to implement this vfunc.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The GtkSearchEntry widget has gained a number of new signals that
|
||||
are emitted when certain key sequences are seen. In particular, it
|
||||
now handles the Escape key and emits ::stop-search. Applications that
|
||||
expect to handle Escape themselves will need to be updated.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.18</title>
|
||||
|
||||
<para>
|
||||
The GtkListBox model support that was introduced in 3.16 has been
|
||||
changed to no longer call gtk_widget_show_all on rows created by
|
||||
the create_widget_func. You need to manage the visibility of child
|
||||
widgets yourself in your create_widget_func.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The alpha component of foreground colors that are applied to
|
||||
GtkCellRendererText is no longer ignored. If you don't want your
|
||||
text to be translucent, use opaque colors.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.20</title>
|
||||
|
||||
<para>
|
||||
The way theming works in GTK+ has been reworked fundamentally, to
|
||||
implement many more CSS features and make themes more expressive.
|
||||
As a result, custom CSS that is shipped with applications and third-party
|
||||
themes will need adjustments. Widgets now use element names much more
|
||||
than style classes; type names are no longer used in style matching.
|
||||
Every widget now documents the element names it has and the style classes
|
||||
it uses. The GTK+ inspector can also help with finding this information.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK+ now uses internal subobjects (also known as gadgets) for allocating
|
||||
and drawing widget parts. Applications that subclass GTK+ widgets may see
|
||||
warnings if they override the size_allocate vfunc and don't chain up.
|
||||
The proper way to subclass is to chain up in size_allocate. If you do not
|
||||
want to do that for some reason, you have to override the draw vfunc as
|
||||
well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Several fixes for window sizing and window placement with client-side
|
||||
decorations may affect applications that are saving and restoring window
|
||||
sizes. The recommended best practice for this which is known to work with
|
||||
client-side and server-side decorations and with older and newer versions
|
||||
of GTK+ is to use gtk_window_get_size() to save window sizes and
|
||||
gtk_window_set_default_size() to restore it.
|
||||
See https://wiki.gnome.org/HowDoI/SaveWindowState for a detailed example.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Geometry handling in GtkWindow has been removed. If you are using the
|
||||
functions gtk_window_resize_to_geometry, gtk_window_set_default_geometry,
|
||||
gtk_window_parse_geometry or gtk_window_set_geometry_hints, you may need
|
||||
to make some changes to your code.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkDrawingArea used to implicitly render the theme background before
|
||||
calling the ::draw handler. This is no longer the case. If you rely
|
||||
on having a theme-provided background, call gtk_render_background()
|
||||
from your ::draw handler.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The GtkFileChooser interface prerequisite changed from GtkWidget
|
||||
to GObject, allowing non-widget implementations of this interface.
|
||||
This is a minor change in ABI, as applications are no longer guaranteed
|
||||
that a GtkFileChooser also supports all GtkWidget methods. However, all
|
||||
previously existing implementations still derive from GtkWidget, so no
|
||||
existing code should break.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The way in which GtkLevelBar determines the offset to apply was a bit
|
||||
inconsistent in the past; this has been fixed. Applications that are using
|
||||
custom offsets should double-check that their levels look as expected.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Changes in GTK+ 3.22</title>
|
||||
|
||||
<para>
|
||||
The CSS parser has gotten a bit more selective in what it accepts as
|
||||
valid values for the font: shorthand. Following the CSS specification,
|
||||
at least a size and a family name are required now. If you want to
|
||||
change an individual facet of the font, like the weight, use the
|
||||
individual CSS properties: font-weight, font-size, font-family, etc.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The #GtkSizeGroup:ignore-hidden property has not been working properly
|
||||
for a long time, and we've not documented it as broken and deprecated.
|
||||
The recommended alternative for reserving space of widgets that are not
|
||||
currently shown in the UI is to use a #GtkStack (with some 'filler'
|
||||
widget, e.g. an empty #GtkBox, in another page).
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
@@ -19,7 +19,8 @@ nodist_bloatpad_SOURCES = bloatpad-gresources.c
|
||||
|
||||
resource_files = \
|
||||
bloatpad.gresources.xml \
|
||||
gtk/menus.ui
|
||||
gtk/menus.ui \
|
||||
gtk/help-overlay.ui
|
||||
|
||||
bloatpad-gresources.c: $(resource_files)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
|
||||
|
@@ -3,5 +3,6 @@
|
||||
<gresources>
|
||||
<gresource prefix="/org/gtk/bloatpad">
|
||||
<file preprocess="xml-stripblanks">gtk/menus.ui</file>
|
||||
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
88
examples/bp/gtk/help-overlay.ui
Normal file
88
examples/bp/gtk/help-overlay.ui
Normal file
@@ -0,0 +1,88 @@
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkShortcutsWindow" id="help_overlay">
|
||||
<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">General</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">app.new</property>
|
||||
<property name="title" translatable="yes">New Window</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">app.quit</property>
|
||||
<property name="title" translatable="yes">Quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.fullscreen</property>
|
||||
<property name="title" translatable="yes">Fullscreen</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.show-help-overlay</property>
|
||||
<property name="title" translatable="yes">Shortcuts</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title">Text</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.copy</property>
|
||||
<property name="title" translatable="yes">Copy</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.paste</property>
|
||||
<property name="title" translatable="yes">Paste</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.justify::left</property>
|
||||
<property name="title" translatable="yes">Justify left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.justify::center</property>
|
||||
<property name="title" translatable="yes">Justify center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.justify::right</property>
|
||||
<property name="title" translatable="yes">Justify right</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@@ -60,6 +60,12 @@
|
||||
<attribute name='action'>app.edit-accels</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name='label' translatable='yes'>Shortcuts...</attribute>
|
||||
<attribute name='action'>win.show-help-overlay</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
<submenu>
|
||||
<attribute name='label' translatable='yes'>_View</attribute>
|
||||
|
105
gdk/Makefile.am
105
gdk/Makefile.am
@@ -33,9 +33,13 @@ EXTRA_DIST += \
|
||||
gdkenumtypes.h.template \
|
||||
gdkversionmacros.h.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
GDK_CFLAGS_DEFINES = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
-DGDK_COMPILATION \
|
||||
-DGDK_COMPILATION
|
||||
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(GDK_CFLAGS_DEFINES) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-I$(top_srcdir) \
|
||||
@@ -66,10 +70,12 @@ gdk_public_h_sources = \
|
||||
gdkcairo.h \
|
||||
gdkcursor.h \
|
||||
gdkdevice.h \
|
||||
gdkdevicetool.h \
|
||||
gdkdevicemanager.h \
|
||||
gdkdisplay.h \
|
||||
gdkdisplaymanager.h \
|
||||
gdkdnd.h \
|
||||
gdkdrawingcontext.h \
|
||||
gdkevents.h \
|
||||
gdkframetimings.h \
|
||||
gdkglcontext.h \
|
||||
@@ -107,12 +113,15 @@ gdk_private_headers = \
|
||||
gdkcursorprivate.h \
|
||||
gdkdevicemanagerprivate.h \
|
||||
gdkdeviceprivate.h \
|
||||
gdkdevicetoolprivate.h \
|
||||
gdkdisplaymanagerprivate.h \
|
||||
gdkdisplayprivate.h \
|
||||
gdkdndprivate.h \
|
||||
gdkdrawingcontextprivate.h \
|
||||
gdkframeclockidle.h \
|
||||
gdkframeclockprivate.h \
|
||||
gdkglcontextprivate.h \
|
||||
gdkmonitorprivate.h \
|
||||
gdkscreenprivate.h \
|
||||
gdkseatprivate.h \
|
||||
gdkseatdefaultprivate.h \
|
||||
@@ -134,10 +143,12 @@ gdk_c_sources = \
|
||||
gdkcursor.c \
|
||||
gdkdeprecated.c \
|
||||
gdkdevice.c \
|
||||
gdkdevicetool.c \
|
||||
gdkdevicemanager.c \
|
||||
gdkdisplay.c \
|
||||
gdkdisplaymanager.c \
|
||||
gdkdnd.c \
|
||||
gdkdrawingcontext.c \
|
||||
gdkevents.c \
|
||||
gdkframetimings.c \
|
||||
gdkgl.c \
|
||||
@@ -167,6 +178,8 @@ gdk_built_sources = \
|
||||
gdkenumtypes.c \
|
||||
gdkmarshalers.h \
|
||||
gdkmarshalers.c \
|
||||
gdkresources.h \
|
||||
gdkresources.c \
|
||||
gdkversionmacros.h
|
||||
|
||||
#
|
||||
@@ -174,8 +187,8 @@ gdk_built_sources = \
|
||||
#
|
||||
|
||||
gdkincludedir = $(includedir)/gtk-3.0/gdk
|
||||
gdkinclude_HEADERS = $(gdk_public_h_sources) gdkenumtypes.h gdkversionmacros.h
|
||||
nodist_gdkinclude_HEADERS = gdkconfig.h
|
||||
gdkinclude_HEADERS = $(gdk_public_h_sources)
|
||||
nodist_gdkinclude_HEADERS = gdkconfig.h gdkenumtypes.h gdkversionmacros.h
|
||||
|
||||
deprecatedincludedir = $(includedir)/gtk-3.0/gdk/deprecated
|
||||
deprecatedinclude_HEADERS = $(deprecated_h_sources)
|
||||
@@ -185,7 +198,9 @@ common_sources = \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkmarshalers.c \
|
||||
gdkmarshalers.h
|
||||
gdkmarshalers.h \
|
||||
gdkresources.h \
|
||||
gdkresources.c
|
||||
|
||||
libgdk_3_la_SOURCES = $(common_sources)
|
||||
libgdk_3_la_CFLAGS = $(AM_CFLAGS) $(GDK_HIDDEN_VISIBILITY_CFLAGS)
|
||||
@@ -301,7 +316,6 @@ INTROSPECTION_GIRS += GdkX11-3.0.gir
|
||||
|
||||
endif # USE_X11
|
||||
|
||||
if OS_WIN32
|
||||
w32_introspection_files = \
|
||||
win32/gdkcursor-win32.c \
|
||||
win32/gdkdevicemanager-win32.c \
|
||||
@@ -332,7 +346,7 @@ w32_introspection_files = \
|
||||
win32/gdkwin32window.h \
|
||||
win32/gdkwindow-win32.c
|
||||
|
||||
|
||||
if OS_WIN32
|
||||
GdkWin32-3.0.gir: libgdk-3.la Gdk-3.0.gir Makefile
|
||||
GdkWin32_3_0_gir_SCANNERFLAGS = \
|
||||
--identifier-prefix=Gdk \
|
||||
@@ -438,6 +452,44 @@ stamp-gc-h: $(top_builddir)/config.status
|
||||
$(AM_V_at) cd $(top_builddir) && $(SHELL) ./config.status gdk/gdkconfig.h \
|
||||
&& echo timestamp > gdk/$(@F)
|
||||
|
||||
#
|
||||
# Resources
|
||||
#
|
||||
gdk.gresource.xml: Makefile.am
|
||||
$(AM_V_GEN) echo "<?xml version='1.0' encoding='UTF-8'?>" > $@; \
|
||||
echo "<gresources>" >> $@; \
|
||||
echo " <gresource prefix='/org/gtk/libgdk'>" >> $@; \
|
||||
for f in $(srcdir)/resources/glsl/*.glsl; do \
|
||||
n=`basename $$f`; \
|
||||
echo " <file alias='glsl/$$n'>resources/glsl/$$n</file>" >> $@; \
|
||||
done; \
|
||||
echo " </gresource>" >> $@; \
|
||||
echo "</gresources>" >> $@;
|
||||
|
||||
glsl_sources = \
|
||||
resources/glsl/gl3-texture-2d.fs.glsl \
|
||||
resources/glsl/gl3-texture-2d.vs.glsl \
|
||||
resources/glsl/gl3-texture-rect.fs.glsl \
|
||||
resources/glsl/gl3-texture-rect.vs.glsl \
|
||||
resources/glsl/gl2-texture-2d.fs.glsl \
|
||||
resources/glsl/gl2-texture-2d.fs.glsl \
|
||||
resources/glsl/gl2-texture-rect.vs.glsl \
|
||||
resources/glsl/gl2-texture-rect.vs.glsl \
|
||||
resources/glsl/gles2-texture.fs.glsl \
|
||||
resources/glsl/gles2-texture.vs.glsl
|
||||
|
||||
EXTRA_DIST += $(glsl_sources)
|
||||
CLEANFILES += gdk.gresource.xml
|
||||
|
||||
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(builddir)/gdk.gresource.xml)
|
||||
|
||||
gdkresources.h: gdk.gresource.xml
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \
|
||||
--sourcedir=$(srcdir) --c-name _gdk --generate-header --manual-register
|
||||
gdkresources.c: gdk.gresource.xml $(resource_files)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $< --target=$@ \
|
||||
--sourcedir=$(srcdir) --c-name _gdk --generate-source --manual-register
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gdk-3
|
||||
|
||||
@@ -454,9 +506,46 @@ gdk_3_HEADERS_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
# Introspection Items for MSVC
|
||||
MSVC_INTROSPECT_GIRS = Gdk-3.0.gir GdkWin32-3.0.gir
|
||||
|
||||
BASE_MSVC_GIR_CFLAGS = \
|
||||
$(GDK_CFLAGS_DEFINES) \
|
||||
-I../.. -I../../gdk -I.../../gdk/win32
|
||||
|
||||
INTROSPECTION_INTERMEDIATE_ITEMS = \
|
||||
$(top_builddir)/build/win32/Gdk-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/build/win32/Gdk_3_0_gir_list \
|
||||
$(top_builddir)/build/win32/GdkWin32-3.0.gir.msvc.introspect \
|
||||
$(top_builddir)/build/win32/GdkWin32_3_0_gir_list
|
||||
|
||||
Gdk_3_0_gir_MSVC_FILES = $(introspection_files)
|
||||
Gdk_3_0_gir_MSVC_EXPORT_PACKAGES = $(Gdk_3_0_gir_EXPORT_PACKAGES)
|
||||
Gdk_3_0_gir_MSVC_INCLUDE_GIRS = $(Gdk_3_0_gir_INCLUDES)
|
||||
Gdk_3_0_gir_MSVC_LIBS = gdk-3.0
|
||||
Gdk_3_0_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS)
|
||||
Gdk_3_0_gir_MSVC_SCANNERFLAGS = $(Gdk_3_0_gir_SCANNERFLAGS)
|
||||
|
||||
GdkWin32_3_0_gir_MSVC_FILES = $(w32_introspection_files)
|
||||
GdkWin32_3_0_gir_MSVC_INCLUDE_GIRS = $(GdkWin32_3_0_gir_INCLUDES)
|
||||
GdkWin32_3_0_gir_MSVC_LIBS = $(Gdk_3_0_gir_MSVC_LIBS)
|
||||
GdkWin32_3_0_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS)
|
||||
GdkWin32_3_0_gir_MSVC_SCANNERFLAGS = \
|
||||
--identifier-prefix=Gdk \
|
||||
--c-include="gdk/gdkwin32.h" \
|
||||
--include-uninstalled=./Gdk-3.0.gir
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvc-introspection
|
||||
|
||||
else
|
||||
INTROSPECTION_INTERMEDIATE_ITEMS =
|
||||
endif
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gdk-3.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gdk-3.headers
|
||||
$(top_builddir)/build/win32/vs9/gdk-3.headers \
|
||||
$(INTROSPECTION_INTERMEDIATE_ITEMS)
|
||||
|
||||
DISTCLEANFILES = gdkconfig.h stamp-gc-h
|
||||
|
||||
|
@@ -22,8 +22,8 @@
|
||||
#ifndef __GDK_BROADWAY_MONITOR_H__
|
||||
#define __GDK_BROADWAY_MONITOR_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
#if !defined (__GDKBROADWAY_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkbroadway.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkmonitor.h>
|
||||
|
@@ -98,6 +98,7 @@ _gdk_broadway_window_drag_begin (GdkWindow *window,
|
||||
|
||||
new_context = g_object_new (GDK_TYPE_BROADWAY_DRAG_CONTEXT,
|
||||
NULL);
|
||||
new_context->display = gdk_window_get_display (window);
|
||||
|
||||
return new_context;
|
||||
}
|
||||
|
@@ -273,7 +273,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
||||
if (message->touch.is_emulated)
|
||||
_gdk_event_set_pointer_emulated (event, TRUE);
|
||||
gdk_event_set_pointer_emulated (event, TRUE);
|
||||
|
||||
if (event_type == GDK_TOUCH_BEGIN || event_type == GDK_TOUCH_UPDATE)
|
||||
event->touch.state |= GDK_BUTTON1_MASK;
|
||||
@@ -295,6 +295,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
event->key.keyval = message->key.key;
|
||||
event->key.state = message->key.state;
|
||||
event->key.hardware_keycode = message->key.key;
|
||||
gdk_event_set_scancode (event, message->key.key);
|
||||
event->key.length = 0;
|
||||
gdk_event_set_device (event, device_manager->core_keyboard);
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
|
||||
|
23
gdk/gdk.c
23
gdk/gdk.c
@@ -30,6 +30,8 @@
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkintl.h"
|
||||
|
||||
#include "gdkresources.h"
|
||||
|
||||
#include "gdk-private.h"
|
||||
|
||||
#ifndef HAVE_XCONVERTCASE
|
||||
@@ -144,7 +146,8 @@ static const GDebugKey gdk_gl_keys[] = {
|
||||
{ "software-draw-gl", GDK_GL_SOFTWARE_DRAW_GL },
|
||||
{ "software-draw-surface", GDK_GL_SOFTWARE_DRAW_SURFACE },
|
||||
{ "texture-rectangle", GDK_GL_TEXTURE_RECTANGLE },
|
||||
{ "legacy", GDK_GL_LEGACY }
|
||||
{ "legacy", GDK_GL_LEGACY },
|
||||
{ "gles", GDK_GL_GLES },
|
||||
};
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
@@ -266,6 +269,22 @@ gdk_add_option_entries_libgtk_only (GOptionGroup *group)
|
||||
gdk_add_option_entries (group);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
register_resources (gpointer dummy G_GNUC_UNUSED)
|
||||
{
|
||||
_gdk_register_resource ();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_ensure_resources (void)
|
||||
{
|
||||
static GOnce register_resources_once = G_ONCE_INIT;
|
||||
|
||||
g_once (®ister_resources_once, register_resources, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_pre_parse (void)
|
||||
{
|
||||
@@ -274,6 +293,8 @@ gdk_pre_parse (void)
|
||||
|
||||
gdk_initialized = TRUE;
|
||||
|
||||
gdk_ensure_resources ();
|
||||
|
||||
/* We set the fallback program class here, rather than lazily in
|
||||
* gdk_get_program_class, since we don't want -name to override it.
|
||||
*/
|
||||
|
@@ -33,10 +33,12 @@
|
||||
#include <gdk/gdkcairo.h>
|
||||
#include <gdk/gdkcursor.h>
|
||||
#include <gdk/gdkdevice.h>
|
||||
#include <gdk/gdkdevicetool.h>
|
||||
#include <gdk/gdkdevicemanager.h>
|
||||
#include <gdk/gdkdisplay.h>
|
||||
#include <gdk/gdkdisplaymanager.h>
|
||||
#include <gdk/gdkdnd.h>
|
||||
#include <gdk/gdkdrawingcontext.h>
|
||||
#include <gdk/gdkenumtypes.h>
|
||||
#include <gdk/gdkevents.h>
|
||||
#include <gdk/gdkframeclock.h>
|
||||
|
@@ -25,13 +25,15 @@
|
||||
#include <gdk/gdkversionmacros.h>
|
||||
#include <gdk/deprecated/gdkcolor.h>
|
||||
#include <gdk/gdkrgba.h>
|
||||
#include <gdk/gdkdrawingcontext.h>
|
||||
#include <gdk/gdkpixbuf.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context())
|
||||
cairo_t * gdk_cairo_create (GdkWindow *window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_cairo_get_clip_rectangle (cairo_t *cr,
|
||||
GdkRectangle *rect);
|
||||
@@ -81,6 +83,8 @@ void gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GdkDrawingContext * gdk_cairo_get_drawing_context (cairo_t *cr);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -253,7 +253,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
* -  "default"
|
||||
* -  "help"
|
||||
* -  "pointer"
|
||||
* -  "context-menu"
|
||||
* -  "context-menu"
|
||||
* -  "progress"
|
||||
* -  "wait"
|
||||
* -  "cell"
|
||||
@@ -262,8 +262,8 @@ gdk_cursor_new_for_display (GdkDisplay *display,
|
||||
* -  "vertical-text"
|
||||
* -  "alias"
|
||||
* -  "copy"
|
||||
* -  "move"
|
||||
* -  "no-drop"
|
||||
* -  "move"
|
||||
* -  "not-allowed"
|
||||
* -  "grab"
|
||||
* -  "grabbing"
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkdevicetool.h"
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkintl.h"
|
||||
@@ -57,6 +58,7 @@ struct _GdkAxisInfo
|
||||
|
||||
enum {
|
||||
CHANGED,
|
||||
TOOL_CHANGED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
@@ -92,6 +94,8 @@ enum {
|
||||
PROP_PRODUCT_ID,
|
||||
PROP_SEAT,
|
||||
PROP_NUM_TOUCHES,
|
||||
PROP_AXES,
|
||||
PROP_TOOL,
|
||||
LAST_PROP
|
||||
};
|
||||
|
||||
@@ -305,6 +309,26 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
/**
|
||||
* GdkDevice:axes:
|
||||
*
|
||||
* The axes currently available for this device.
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
device_props[PROP_AXES] =
|
||||
g_param_spec_flags ("axes",
|
||||
P_("Axes"),
|
||||
P_("Axes"),
|
||||
GDK_TYPE_AXIS_FLAGS, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
device_props[PROP_TOOL] =
|
||||
g_param_spec_object ("tool",
|
||||
P_("Tool"),
|
||||
P_("The tool that is currently used with this device"),
|
||||
GDK_TYPE_DEVICE_TOOL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class, LAST_PROP, device_props);
|
||||
|
||||
@@ -327,6 +351,24 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* GdkDevice::tool-changed:
|
||||
* @device: the #GdkDevice that changed.
|
||||
* @tool: The new current tool
|
||||
*
|
||||
* The ::tool-changed signal is emitted on pen/eraser
|
||||
* #GdkDevice<!-- -->s whenever tools enter or leave proximity.
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
signals[TOOL_CHANGED] =
|
||||
g_signal_new (g_intern_static_string ("tool-changed"),
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__BOXED,
|
||||
G_TYPE_NONE, 1, GDK_TYPE_DEVICE_TOOL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -374,6 +416,8 @@ gdk_device_dispose (GObject *object)
|
||||
g_object_unref (associated);
|
||||
}
|
||||
|
||||
g_clear_object (&device->last_tool);
|
||||
|
||||
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@@ -477,6 +521,12 @@ gdk_device_get_property (GObject *object,
|
||||
case PROP_NUM_TOUCHES:
|
||||
g_value_set_uint (value, device->num_touches);
|
||||
break;
|
||||
case PROP_AXES:
|
||||
g_value_set_flags (value, device->axis_flags);
|
||||
break;
|
||||
case PROP_TOOL:
|
||||
g_value_set_object (value, device->last_tool);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -1515,7 +1565,10 @@ _gdk_device_reset_axes (GdkDevice *device)
|
||||
for (i = device->axes->len - 1; i >= 0; i--)
|
||||
g_array_remove_index (device->axes, i);
|
||||
|
||||
device->axis_flags = 0;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_N_AXES]);
|
||||
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_AXES]);
|
||||
}
|
||||
|
||||
guint
|
||||
@@ -1556,7 +1609,10 @@ _gdk_device_add_axis (GdkDevice *device,
|
||||
device->axes = g_array_append_val (device->axes, axis_info);
|
||||
pos = device->axes->len - 1;
|
||||
|
||||
device->axis_flags |= (1 << use);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_N_AXES]);
|
||||
g_object_notify_by_pspec (G_OBJECT (device), device_props[PROP_AXES]);
|
||||
|
||||
return pos;
|
||||
}
|
||||
@@ -1964,3 +2020,39 @@ gdk_device_get_seat (GdkDevice *device)
|
||||
|
||||
return device->seat;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_get_axes:
|
||||
* @device: a #GdkDevice
|
||||
*
|
||||
* Returns the axes currently available on the device.
|
||||
*
|
||||
* Since: 3.22
|
||||
**/
|
||||
GdkAxisFlags
|
||||
gdk_device_get_axes (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->axis_flags;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_device_update_tool (GdkDevice *device,
|
||||
GdkDeviceTool *tool)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||
g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER);
|
||||
|
||||
if (g_set_object (&device->last_tool, tool))
|
||||
{
|
||||
g_object_notify (G_OBJECT (device), "tool");
|
||||
g_signal_emit (device, signals[TOOL_CHANGED], 0, tool);
|
||||
}
|
||||
}
|
||||
|
||||
GdkInputMode
|
||||
gdk_device_get_input_mode (GdkDevice *device)
|
||||
{
|
||||
return device->mode;
|
||||
}
|
||||
|
@@ -47,6 +47,8 @@ typedef struct _GdkTimeCoord GdkTimeCoord;
|
||||
* as a touchscreen or tablet. This device type has been added in 3.4.
|
||||
* @GDK_SOURCE_TOUCHPAD: the device is an indirect touch device, such
|
||||
* as a touchpad. This device type has been added in 3.4.
|
||||
* @GDK_SOURCE_TRACKPOINT: the device is a trackpoint. This device type has been
|
||||
* added in 3.22
|
||||
*
|
||||
* An enumeration describing the type of an input device in general terms.
|
||||
*/
|
||||
@@ -58,7 +60,8 @@ typedef enum
|
||||
GDK_SOURCE_CURSOR,
|
||||
GDK_SOURCE_KEYBOARD,
|
||||
GDK_SOURCE_TOUCHSCREEN,
|
||||
GDK_SOURCE_TOUCHPAD
|
||||
GDK_SOURCE_TOUCHPAD,
|
||||
GDK_SOURCE_TRACKPOINT
|
||||
} GdkInputSource;
|
||||
|
||||
/**
|
||||
@@ -80,33 +83,6 @@ typedef enum
|
||||
GDK_MODE_WINDOW
|
||||
} GdkInputMode;
|
||||
|
||||
/**
|
||||
* GdkAxisUse:
|
||||
* @GDK_AXIS_IGNORE: the axis is ignored.
|
||||
* @GDK_AXIS_X: the axis is used as the x axis.
|
||||
* @GDK_AXIS_Y: the axis is used as the y axis.
|
||||
* @GDK_AXIS_PRESSURE: the axis is used for pressure information.
|
||||
* @GDK_AXIS_XTILT: the axis is used for x tilt information.
|
||||
* @GDK_AXIS_YTILT: the axis is used for y tilt information.
|
||||
* @GDK_AXIS_WHEEL: the axis is used for wheel information.
|
||||
* @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
|
||||
*
|
||||
* An enumeration describing the way in which a device
|
||||
* axis (valuator) maps onto the predefined valuator
|
||||
* types that GTK+ understands.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_AXIS_IGNORE,
|
||||
GDK_AXIS_X,
|
||||
GDK_AXIS_Y,
|
||||
GDK_AXIS_PRESSURE,
|
||||
GDK_AXIS_XTILT,
|
||||
GDK_AXIS_YTILT,
|
||||
GDK_AXIS_WHEEL,
|
||||
GDK_AXIS_LAST
|
||||
} GdkAxisUse;
|
||||
|
||||
/**
|
||||
* GdkDeviceType:
|
||||
* @GDK_DEVICE_TYPE_MASTER: Device is a master (or virtual) device. There will
|
||||
@@ -282,6 +258,9 @@ const gchar *gdk_device_get_product_id (GdkDevice *device);
|
||||
GDK_AVAILABLE_IN_3_20
|
||||
GdkSeat *gdk_device_get_seat (GdkDevice *device);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GdkAxisFlags gdk_device_get_axes (GdkDevice *device);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_H__ */
|
||||
|
@@ -138,6 +138,10 @@
|
||||
* Devices may also have associated “keys” or
|
||||
* macro buttons. Such keys can be globally set to map into normal X
|
||||
* keyboard events. The mapping is set using gdk_device_set_key().
|
||||
*
|
||||
* In GTK+ 3.20, a new #GdkSeat object has been introduced that
|
||||
* supersedes #GdkDeviceManager and should be preferred in newly
|
||||
* written code.
|
||||
*/
|
||||
|
||||
static void gdk_device_manager_set_property (GObject *object,
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#define __GDK_DEVICE_PRIVATE_H__
|
||||
|
||||
#include "gdkdevice.h"
|
||||
#include "gdkdevicetool.h"
|
||||
#include "gdkdevicemanager.h"
|
||||
#include "gdkevents.h"
|
||||
#include "gdkseat.h"
|
||||
@@ -47,6 +48,7 @@ struct _GdkDevice
|
||||
GdkInputMode mode;
|
||||
gboolean has_cursor;
|
||||
gint num_keys;
|
||||
GdkAxisFlags axis_flags;
|
||||
GdkDeviceKey *keys;
|
||||
GdkDeviceManager *manager;
|
||||
GdkDisplay *display;
|
||||
@@ -63,6 +65,7 @@ struct _GdkDevice
|
||||
gchar *product_id;
|
||||
|
||||
GdkSeat *seat;
|
||||
GdkDeviceTool *last_tool;
|
||||
};
|
||||
|
||||
struct _GdkDeviceClass
|
||||
@@ -183,6 +186,11 @@ GdkWindow * _gdk_device_window_at_position (GdkDevice *device,
|
||||
void gdk_device_set_seat (GdkDevice *device,
|
||||
GdkSeat *seat);
|
||||
|
||||
void gdk_device_update_tool (GdkDevice *device,
|
||||
GdkDeviceTool *tool);
|
||||
|
||||
GdkInputMode gdk_device_get_input_mode (GdkDevice *device);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_PRIVATE_H__ */
|
||||
|
173
gdk/gdkdevicetool.c
Normal file
173
gdk/gdkdevicetool.c
Normal file
@@ -0,0 +1,173 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* 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 <math.h>
|
||||
|
||||
#include "gdkdevicetoolprivate.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkintl.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GdkDeviceTool, gdk_device_tool, G_TYPE_OBJECT)
|
||||
|
||||
enum {
|
||||
TOOL_PROP_0,
|
||||
TOOL_PROP_SERIAL,
|
||||
TOOL_PROP_TOOL_TYPE,
|
||||
TOOL_PROP_AXES,
|
||||
N_TOOL_PROPS
|
||||
};
|
||||
|
||||
GParamSpec *tool_props[N_TOOL_PROPS] = { 0 };
|
||||
|
||||
static void
|
||||
gdk_device_tool_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkDeviceTool *tool = GDK_DEVICE_TOOL (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case TOOL_PROP_SERIAL:
|
||||
tool->serial = g_value_get_uint64 (value);
|
||||
break;
|
||||
case TOOL_PROP_TOOL_TYPE:
|
||||
tool->type = g_value_get_enum (value);
|
||||
break;
|
||||
case TOOL_PROP_AXES:
|
||||
tool->tool_axes = g_value_get_flags (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_device_tool_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkDeviceTool *tool = GDK_DEVICE_TOOL (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case TOOL_PROP_SERIAL:
|
||||
g_value_set_uint64 (value, tool->serial);
|
||||
break;
|
||||
case TOOL_PROP_TOOL_TYPE:
|
||||
g_value_set_enum (value, tool->type);
|
||||
break;
|
||||
case TOOL_PROP_AXES:
|
||||
g_value_set_flags (value, tool->tool_axes);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_device_tool_class_init (GdkDeviceToolClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->set_property = gdk_device_tool_set_property;
|
||||
object_class->get_property = gdk_device_tool_get_property;
|
||||
|
||||
tool_props[TOOL_PROP_SERIAL] = g_param_spec_uint64 ("serial",
|
||||
"Serial",
|
||||
"Serial number",
|
||||
0, G_MAXUINT64, 0,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY);
|
||||
tool_props[TOOL_PROP_TOOL_TYPE] = g_param_spec_enum ("tool-type",
|
||||
"Tool type",
|
||||
"Tool type",
|
||||
GDK_TYPE_DEVICE_TOOL_TYPE,
|
||||
GDK_DEVICE_TOOL_TYPE_UNKNOWN,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY);
|
||||
tool_props[TOOL_PROP_AXES] = g_param_spec_flags ("axes",
|
||||
"Axes",
|
||||
"Tool axes",
|
||||
GDK_TYPE_AXIS_FLAGS, 0,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY);
|
||||
|
||||
g_object_class_install_properties (object_class, N_TOOL_PROPS, tool_props);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_device_tool_init (GdkDeviceTool *tool)
|
||||
{
|
||||
}
|
||||
|
||||
GdkDeviceTool *
|
||||
gdk_device_tool_new (guint64 serial,
|
||||
GdkDeviceToolType type,
|
||||
GdkAxisFlags tool_axes)
|
||||
{
|
||||
return g_object_new (GDK_TYPE_DEVICE_TOOL,
|
||||
"serial", serial,
|
||||
"tool-type", type,
|
||||
"axes", tool_axes,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_tool_get_serial:
|
||||
* @tool: a #GdkDeviceTool
|
||||
*
|
||||
* Gets the serial of this tool, this value can be used to identify a
|
||||
* physical tool (eg. a tablet pen) across program executions.
|
||||
*
|
||||
* Returns: The serial ID for this tool
|
||||
*
|
||||
* Since: 3.22
|
||||
**/
|
||||
guint
|
||||
gdk_device_tool_get_serial (GdkDeviceTool *tool)
|
||||
{
|
||||
g_return_val_if_fail (tool != NULL, 0);
|
||||
|
||||
return tool->serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_tool_get_tool_type:
|
||||
* @tool: a #GdkDeviceTool
|
||||
*
|
||||
* Gets the #GdkDeviceToolType of the tool.
|
||||
*
|
||||
* Returns: The physical type for this tool. This can be used to figure out what
|
||||
* sort of pen is being used, such as an airbrush or a pencil.
|
||||
*
|
||||
* Since: 3.22
|
||||
**/
|
||||
GdkDeviceToolType
|
||||
gdk_device_tool_get_tool_type (GdkDeviceTool *tool)
|
||||
{
|
||||
g_return_val_if_fail (tool != NULL, GDK_DEVICE_TOOL_TYPE_UNKNOWN);
|
||||
|
||||
return tool->type;
|
||||
}
|
75
gdk/gdkdevicetool.h
Normal file
75
gdk/gdkdevicetool.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* 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 __GDK_DEVICE_TOOL_H__
|
||||
#define __GDK_DEVICE_TOOL_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkversionmacros.h>
|
||||
#include <gdk/gdktypes.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_DEVICE_TOOL (gdk_device_tool_get_type ())
|
||||
#define GDK_DEVICE_TOOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_TOOL, GdkDeviceTool))
|
||||
#define GDK_IS_DEVICE_TOOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_TOOL))
|
||||
|
||||
typedef struct _GdkDeviceTool GdkDeviceTool;
|
||||
|
||||
/**
|
||||
* GdkDeviceToolType:
|
||||
* @GDK_DEVICE_TOOL_TYPE_UNKNOWN: Tool is of an unknown type.
|
||||
* @GDK_DEVICE_TOOL_TYPE_PEN: Tool is a standard tablet stylus.
|
||||
* @GDK_DEVICE_TOOL_TYPE_ERASER: Tool is standard tablet eraser.
|
||||
* @GDK_DEVICE_TOOL_TYPE_BRUSH: Tool is a brush stylus.
|
||||
* @GDK_DEVICE_TOOL_TYPE_PENCIL: Tool is a pencil stylus.
|
||||
* @GDK_DEVICE_TOOL_TYPE_AIRBRUSH: Tool is an airbrush stylus.
|
||||
* @GDK_DEVICE_TOOL_TYPE_MOUSE: Tool is a mouse.
|
||||
* @GDK_DEVICE_TOOL_TYPE_LENS: Tool is a lens cursor.
|
||||
*
|
||||
* Indicates the specific type of tool being used being a tablet. Such as an
|
||||
* airbrush, pencil, etc.
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
typedef enum {
|
||||
GDK_DEVICE_TOOL_TYPE_UNKNOWN,
|
||||
GDK_DEVICE_TOOL_TYPE_PEN,
|
||||
GDK_DEVICE_TOOL_TYPE_ERASER,
|
||||
GDK_DEVICE_TOOL_TYPE_BRUSH,
|
||||
GDK_DEVICE_TOOL_TYPE_PENCIL,
|
||||
GDK_DEVICE_TOOL_TYPE_AIRBRUSH,
|
||||
GDK_DEVICE_TOOL_TYPE_MOUSE,
|
||||
GDK_DEVICE_TOOL_TYPE_LENS,
|
||||
} GdkDeviceToolType;
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GType gdk_device_tool_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
guint gdk_device_tool_get_serial (GdkDeviceTool *tool);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GdkDeviceToolType gdk_device_tool_get_tool_type (GdkDeviceTool *tool);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_TOOL_H__ */
|
46
gdk/gdkdevicetoolprivate.h
Normal file
46
gdk/gdkdevicetoolprivate.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* 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 __GDK_DEVICE_TOOL_PRIVATE_H__
|
||||
#define __GDK_DEVICE_TOOL_PRIVATE_H__
|
||||
|
||||
#include "gdkdevicetool.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GdkDeviceToolClass GdkDeviceToolClass;
|
||||
|
||||
struct _GdkDeviceTool
|
||||
{
|
||||
GObject parent_instance;
|
||||
guint64 serial;
|
||||
GdkDeviceToolType type;
|
||||
GdkAxisFlags tool_axes;
|
||||
};
|
||||
|
||||
struct _GdkDeviceToolClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GdkDeviceTool *gdk_device_tool_new (guint64 serial,
|
||||
GdkDeviceToolType type,
|
||||
GdkAxisFlags tool_axes);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_TOOL_PRIVATE_H__ */
|
@@ -79,6 +79,8 @@ enum {
|
||||
|
||||
static void gdk_display_dispose (GObject *object);
|
||||
static void gdk_display_finalize (GObject *object);
|
||||
static void gdk_display_put_event_nocopy (GdkDisplay *display,
|
||||
GdkEvent *event);
|
||||
|
||||
|
||||
static GdkAppLaunchContext *gdk_display_real_get_app_launch_context (GdkDisplay *display);
|
||||
@@ -467,6 +469,15 @@ gdk_display_peek_event (GdkDisplay *display)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_display_put_event_nocopy (GdkDisplay *display,
|
||||
GdkEvent *event)
|
||||
{
|
||||
_gdk_event_queue_append (display, event);
|
||||
/* If the main loop is blocking in a different thread, wake it up */
|
||||
g_main_context_wakeup (NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_display_put_event:
|
||||
* @display: a #GdkDisplay
|
||||
@@ -484,9 +495,7 @@ gdk_display_put_event (GdkDisplay *display,
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
g_return_if_fail (event != NULL);
|
||||
|
||||
_gdk_event_queue_append (display, gdk_event_copy (event));
|
||||
/* If the main loop is blocking in a different thread, wake it up */
|
||||
g_main_context_wakeup (NULL);
|
||||
gdk_display_put_event_nocopy (display, gdk_event_copy (event));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -712,10 +721,11 @@ gdk_display_get_window_at_pointer (GdkDisplay *display,
|
||||
}
|
||||
|
||||
static void
|
||||
generate_grab_broken_event (GdkWindow *window,
|
||||
GdkDevice *device,
|
||||
gboolean implicit,
|
||||
GdkWindow *grab_window)
|
||||
generate_grab_broken_event (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
GdkDevice *device,
|
||||
gboolean implicit,
|
||||
GdkWindow *grab_window)
|
||||
{
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
@@ -731,8 +741,7 @@ generate_grab_broken_event (GdkWindow *window,
|
||||
gdk_event_set_device (event, device);
|
||||
event->grab_broken.keyboard = (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD) ? TRUE : FALSE;
|
||||
|
||||
gdk_event_put (event);
|
||||
gdk_event_free (event);
|
||||
gdk_display_put_event_nocopy (display, event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,7 +840,7 @@ _gdk_display_break_touch_grabs (GdkDisplay *display,
|
||||
GdkTouchGrabInfo, i);
|
||||
|
||||
if (info->device == device && info->window != new_grab_window)
|
||||
generate_grab_broken_event (GDK_WINDOW (info->window),
|
||||
generate_grab_broken_event (display, GDK_WINDOW (info->window),
|
||||
device, TRUE, new_grab_window);
|
||||
}
|
||||
}
|
||||
@@ -1177,7 +1186,7 @@ _gdk_display_device_grab_update (GdkDisplay *display,
|
||||
|
||||
if ((next_grab == NULL && current_grab->implicit_ungrab) ||
|
||||
(next_grab != NULL && current_grab->window != next_grab->window))
|
||||
generate_grab_broken_event (GDK_WINDOW (current_grab->window),
|
||||
generate_grab_broken_event (display, GDK_WINDOW (current_grab->window),
|
||||
device,
|
||||
current_grab->implicit,
|
||||
next_grab? next_grab->window : NULL);
|
||||
@@ -2619,7 +2628,7 @@ gdk_display_get_monitor_at_point (GdkDisplay *display,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
GdkMonitor *nearest;
|
||||
GdkMonitor *nearest = NULL;
|
||||
int nearest_dist = G_MAXINT;
|
||||
int n_monitors, i;
|
||||
|
||||
@@ -2683,9 +2692,19 @@ gdk_display_get_monitor_at_window (GdkDisplay *display,
|
||||
int n_monitors, i;
|
||||
int area = 0;
|
||||
GdkMonitor *best = NULL;
|
||||
GdkDisplayClass *class;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
class = GDK_DISPLAY_GET_CLASS (display);
|
||||
if (class->get_monitor_at_window)
|
||||
{
|
||||
best = class->get_monitor_at_window (display, window);
|
||||
|
||||
if (best)
|
||||
return best;
|
||||
}
|
||||
|
||||
gdk_window_get_geometry (window, &win.x, &win.y, &win.width, &win.height);
|
||||
gdk_window_get_origin (window, &win.x, &win.y);
|
||||
|
||||
|
@@ -52,7 +52,7 @@ const gchar * gdk_display_get_name (GdkDisplay *display);
|
||||
|
||||
GDK_DEPRECATED_IN_3_10
|
||||
gint gdk_display_get_n_screens (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_3_20
|
||||
GdkScreen * gdk_display_get_screen (GdkDisplay *display,
|
||||
gint screen_num);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@@ -191,7 +191,7 @@ GdkMonitor * gdk_display_get_monitor_at_point (GdkDisplay *display,
|
||||
int x,
|
||||
int y);
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GdkMonitor * gdk_display_get_monitor_at_window (GdkDisplay *dsplay,
|
||||
GdkMonitor * gdk_display_get_monitor_at_window (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
|
||||
|
||||
|
@@ -246,6 +246,8 @@ struct _GdkDisplayClass
|
||||
GdkMonitor * (*get_monitor) (GdkDisplay *display,
|
||||
int index);
|
||||
GdkMonitor * (*get_primary_monitor) (GdkDisplay *display);
|
||||
GdkMonitor * (*get_monitor_at_window) (GdkDisplay *display,
|
||||
GdkWindow *window);
|
||||
|
||||
/* Signals */
|
||||
void (*opened) (GdkDisplay *display);
|
||||
|
@@ -273,6 +273,7 @@ gdk_drag_context_class_init (GdkDragContextClass *klass)
|
||||
/**
|
||||
* GdkDragContext::cancel:
|
||||
* @context: The object on which the signal is emitted
|
||||
* @reason: The reason the context was cancelled
|
||||
*
|
||||
* The drag and drop operation was cancelled.
|
||||
*
|
||||
@@ -752,7 +753,8 @@ gdk_drag_context_handle_source_event (GdkEvent *event)
|
||||
}
|
||||
|
||||
GdkCursor *
|
||||
gdk_drag_get_cursor (GdkDragAction action)
|
||||
gdk_drag_get_cursor (GdkDragContext *context,
|
||||
GdkDragAction action)
|
||||
{
|
||||
gint i;
|
||||
|
||||
@@ -761,7 +763,7 @@ gdk_drag_get_cursor (GdkDragAction action)
|
||||
break;
|
||||
|
||||
if (drag_cursors[i].cursor == NULL)
|
||||
drag_cursors[i].cursor = gdk_cursor_new_from_name (gdk_display_get_default (),
|
||||
drag_cursors[i].cursor = gdk_cursor_new_from_name (context->display,
|
||||
drag_cursors[i].name);
|
||||
return drag_cursors[i].cursor;
|
||||
}
|
||||
|
@@ -94,6 +94,8 @@ struct _GdkDragContext {
|
||||
/*< private >*/
|
||||
GdkDragProtocol protocol;
|
||||
|
||||
GdkDisplay *display;
|
||||
|
||||
gboolean is_source;
|
||||
GdkWindow *source_window;
|
||||
GdkWindow *dest_window;
|
||||
@@ -119,7 +121,8 @@ void gdk_drag_context_cancel (GdkDragContext *context,
|
||||
GdkDragCancelReason reason);
|
||||
gboolean gdk_drag_context_handle_source_event (GdkEvent *event);
|
||||
gboolean gdk_drag_context_handle_dest_event (GdkEvent *event);
|
||||
GdkCursor * gdk_drag_get_cursor (GdkDragAction action);
|
||||
GdkCursor * gdk_drag_get_cursor (GdkDragContext *context,
|
||||
GdkDragAction action);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
315
gdk/gdkdrawingcontext.c
Normal file
315
gdk/gdkdrawingcontext.c
Normal file
@@ -0,0 +1,315 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright 2016 Endless
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:gdkdrawingcontext
|
||||
* @Title: GdkDrawingContext
|
||||
* @Short_description: Drawing context for GDK windows
|
||||
*
|
||||
* #GdkDrawingContext is an object that represents the current drawing
|
||||
* state of a #GdkWindow.
|
||||
*
|
||||
* It's possible to use a #GdkDrawingContext to draw on a #GdkWindow
|
||||
* via rendering API like Cairo or OpenGL.
|
||||
*
|
||||
* A #GdkDrawingContext can only be created by calling gdk_window_begin_draw_frame()
|
||||
* and will be valid until a call to gdk_window_end_draw_frame().
|
||||
*
|
||||
* #GdkDrawingContext is available since GDK 3.22
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <cairo-gobject.h>
|
||||
|
||||
#include "gdkdrawingcontextprivate.h"
|
||||
|
||||
#include "gdkrectangle.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkintl.h"
|
||||
#include "gdkframeclockidle.h"
|
||||
#include "gdkwindowimpl.h"
|
||||
#include "gdkglcontextprivate.h"
|
||||
#include "gdk-private.h"
|
||||
|
||||
G_DEFINE_TYPE (GdkDrawingContext, gdk_drawing_context, G_TYPE_OBJECT)
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
|
||||
PROP_WINDOW,
|
||||
PROP_CLIP,
|
||||
|
||||
N_PROPS
|
||||
};
|
||||
|
||||
static GParamSpec *obj_property[N_PROPS];
|
||||
|
||||
static void
|
||||
gdk_drawing_context_dispose (GObject *gobject)
|
||||
{
|
||||
GdkDrawingContext *self = GDK_DRAWING_CONTEXT (gobject);
|
||||
|
||||
g_clear_object (&self->window);
|
||||
g_clear_pointer (&self->clip, cairo_region_destroy);
|
||||
g_clear_pointer (&self->cr, cairo_destroy);
|
||||
|
||||
G_OBJECT_CLASS (gdk_drawing_context_parent_class)->dispose (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_drawing_context_set_property (GObject *gobject,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkDrawingContext *self = GDK_DRAWING_CONTEXT (gobject);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_WINDOW:
|
||||
self->window = g_value_dup_object (value);
|
||||
break;
|
||||
|
||||
case PROP_CLIP:
|
||||
self->clip = g_value_dup_boxed (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_drawing_context_get_property (GObject *gobject,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkDrawingContext *self = GDK_DRAWING_CONTEXT (gobject);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_WINDOW:
|
||||
g_value_set_object (value, self->window);
|
||||
break;
|
||||
|
||||
case PROP_CLIP:
|
||||
g_value_set_boxed (value, self->clip);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_drawing_context_constructed (GObject *gobject)
|
||||
{
|
||||
GdkDrawingContext *self = GDK_DRAWING_CONTEXT (gobject);
|
||||
|
||||
if (self->window == NULL)
|
||||
{
|
||||
g_critical ("The drawing context of type %s does not have a window "
|
||||
"associated to it. Drawing contexts can only be created "
|
||||
"using gdk_window_begin_draw_frame().",
|
||||
G_OBJECT_TYPE_NAME (gobject));
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gdk_drawing_context_parent_class)->constructed (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_drawing_context_class_init (GdkDrawingContextClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->constructed = gdk_drawing_context_constructed;
|
||||
gobject_class->set_property = gdk_drawing_context_set_property;
|
||||
gobject_class->get_property = gdk_drawing_context_get_property;
|
||||
gobject_class->dispose = gdk_drawing_context_dispose;
|
||||
|
||||
/**
|
||||
* GdkDrawingContext:window:
|
||||
*
|
||||
* The #GdkWindow that created the drawing context.
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
obj_property[PROP_WINDOW] =
|
||||
g_param_spec_object ("window", "Window", "The window that created the context",
|
||||
GDK_TYPE_WINDOW,
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
/**
|
||||
* GdkDrawingContext:clip:
|
||||
*
|
||||
* The clip region applied to the drawing context.
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
obj_property[PROP_CLIP] =
|
||||
g_param_spec_boxed ("clip", "Clip", "The clip region of the context",
|
||||
CAIRO_GOBJECT_TYPE_REGION,
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (gobject_class, N_PROPS, obj_property);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_drawing_context_init (GdkDrawingContext *self)
|
||||
{
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t draw_context_key;
|
||||
|
||||
static void
|
||||
gdk_cairo_set_drawing_context (cairo_t *cr,
|
||||
GdkDrawingContext *context)
|
||||
{
|
||||
cairo_set_user_data (cr, &draw_context_key, context, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_cairo_get_drawing_context:
|
||||
* @cr: a Cairo context
|
||||
*
|
||||
* Retrieves the #GdkDrawingContext that created the Cairo
|
||||
* context @cr.
|
||||
*
|
||||
* Returns: (transfer none) (nullable): a #GdkDrawingContext, if any is set
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
GdkDrawingContext *
|
||||
gdk_cairo_get_drawing_context (cairo_t *cr)
|
||||
{
|
||||
g_return_val_if_fail (cr != NULL, NULL);
|
||||
|
||||
return cairo_get_user_data (cr, &draw_context_key);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drawing_context_get_cairo_context:
|
||||
* @context:
|
||||
*
|
||||
* Retrieves a Cairo context to be used to draw on the #GdkWindow
|
||||
* that created the #GdkDrawingContext.
|
||||
*
|
||||
* The returned context is guaranteed to be valid as long as the
|
||||
* #GdkDrawingContext is valid, that is between a call to
|
||||
* gdk_window_begin_draw_frame() and gdk_window_end_draw_frame().
|
||||
*
|
||||
* Returns: (transfer none): a Cairo context to be used to draw
|
||||
* the contents of the #GdkWindow. The context is owned by the
|
||||
* #GdkDrawingContext and should not be destroyed
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
cairo_t *
|
||||
gdk_drawing_context_get_cairo_context (GdkDrawingContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAWING_CONTEXT (context), NULL);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (context->window), NULL);
|
||||
|
||||
if (context->cr == NULL)
|
||||
{
|
||||
cairo_region_t *region;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
surface = _gdk_window_ref_cairo_surface (context->window);
|
||||
context->cr = cairo_create (surface);
|
||||
|
||||
gdk_cairo_set_drawing_context (context->cr, context);
|
||||
|
||||
region = gdk_window_get_current_paint_region (context->window);
|
||||
cairo_region_union (region, context->clip);
|
||||
gdk_cairo_region (context->cr, region);
|
||||
cairo_clip (context->cr);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
cairo_surface_destroy (surface);
|
||||
}
|
||||
|
||||
return context->cr;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drawing_context_get_window:
|
||||
* @context: a #GdkDrawingContext
|
||||
*
|
||||
* Retrieves the window that created the drawing @context.
|
||||
*
|
||||
* Returns: (transfer none): a #GdkWindow
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
GdkWindow *
|
||||
gdk_drawing_context_get_window (GdkDrawingContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAWING_CONTEXT (context), NULL);
|
||||
|
||||
return context->window;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drawing_context_get_clip:
|
||||
* @context: a #GdkDrawingContext
|
||||
*
|
||||
* Retrieves a copy of the clip region used when creating the @context.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a Cairo region
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
cairo_region_t *
|
||||
gdk_drawing_context_get_clip (GdkDrawingContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAWING_CONTEXT (context), NULL);
|
||||
|
||||
if (context->clip == NULL)
|
||||
return NULL;
|
||||
|
||||
return cairo_region_copy (context->clip);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_drawing_context_is_valid:
|
||||
* @context: a #GdkDrawingContext
|
||||
*
|
||||
* Checks whether the given #GdkDrawingContext is valid.
|
||||
*
|
||||
* Returns: %TRUE if the context is valid
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
gboolean
|
||||
gdk_drawing_context_is_valid (GdkDrawingContext *context)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAWING_CONTEXT (context), FALSE);
|
||||
|
||||
if (context->window == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (gdk_window_get_drawing_context (context->window) != context)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
53
gdk/gdkdrawingcontext.h
Normal file
53
gdk/gdkdrawingcontext.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
*
|
||||
* 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 __GDK_DRAWING_CONTEXT_H__
|
||||
#define __GDK_DRAWING_CONTEXT_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdkversionmacros.h>
|
||||
#include <gdk/gdktypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_DRAWING_CONTEXT (gdk_drawing_context_get_type ())
|
||||
|
||||
#define GDK_DRAWING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_DRAWING_CONTEXT, GdkDrawingContext))
|
||||
#define GDK_IS_DRAWING_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_DRAWING_CONTEXT))
|
||||
|
||||
typedef struct _GdkDrawingContext GdkDrawingContext;
|
||||
typedef struct _GdkDrawingContextClass GdkDrawingContextClass;
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GType gdk_drawing_context_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GdkWindow * gdk_drawing_context_get_window (GdkDrawingContext *context);
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
cairo_region_t *gdk_drawing_context_get_clip (GdkDrawingContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
gboolean gdk_drawing_context_is_valid (GdkDrawingContext *context);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
cairo_t * gdk_drawing_context_get_cairo_context (GdkDrawingContext *context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DRAWING_CONTEXT_H__ */
|
29
gdk/gdkdrawingcontextprivate.h
Normal file
29
gdk/gdkdrawingcontextprivate.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef __GDK_DRAWING_CONTEXT_PRIVATE_H__
|
||||
#define __GDK_DRAWING_CONTEXT_PRIVATE_H__
|
||||
|
||||
#include "gdkdrawingcontext.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_DRAWING_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAWING_CONTEXT, GdkDrawingContextClass))
|
||||
#define GDK_IS_DRAWING_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAWING_CONTEXT))
|
||||
#define GDK_DRAWING_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAWING_CONTEXT, GdkDrawingContextClass))
|
||||
|
||||
struct _GdkDrawingContext
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
GdkWindow *window;
|
||||
|
||||
cairo_region_t *clip;
|
||||
cairo_t *cr;
|
||||
};
|
||||
|
||||
struct _GdkDrawingContextClass
|
||||
{
|
||||
GObjectClass parent_instance;
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DRAWING_CONTEXT_PRIVATE_H__ */
|
113
gdk/gdkevents.c
113
gdk/gdkevents.c
@@ -295,6 +295,7 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
||||
while (pending_motions && pending_motions->next != NULL)
|
||||
{
|
||||
GList *next = pending_motions->next;
|
||||
gdk_event_free (pending_motions->data);
|
||||
display->queued_events = g_list_delete_link (display->queued_events,
|
||||
pending_motions);
|
||||
pending_motions = next;
|
||||
@@ -594,8 +595,8 @@ gdk_event_is_allocated (const GdkEvent *event)
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_event_set_pointer_emulated (GdkEvent *event,
|
||||
gboolean emulated)
|
||||
gdk_event_set_pointer_emulated (GdkEvent *event,
|
||||
gboolean emulated)
|
||||
{
|
||||
if (gdk_event_is_allocated (event))
|
||||
{
|
||||
@@ -608,8 +609,19 @@ _gdk_event_set_pointer_emulated (GdkEvent *event,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_get_pointer_emulated:
|
||||
* #event: a #GdkEvent
|
||||
*
|
||||
* Returns whether this event is an 'emulated' pointer event (typically
|
||||
* from a touch event), as opposed to a real one.
|
||||
*
|
||||
* Returns: %TRUE if this event is emulated
|
||||
*
|
||||
* Since: 3.22
|
||||
*/
|
||||
gboolean
|
||||
_gdk_event_get_pointer_emulated (GdkEvent *event)
|
||||
gdk_event_get_pointer_emulated (GdkEvent *event)
|
||||
{
|
||||
if (gdk_event_is_allocated (event))
|
||||
return (((GdkEventPrivate *) event)->flags & GDK_EVENT_POINTER_EMULATED) != 0;
|
||||
@@ -650,6 +662,7 @@ gdk_event_copy (const GdkEvent *event)
|
||||
new_private->device = private->device ? g_object_ref (private->device) : NULL;
|
||||
new_private->source_device = private->source_device ? g_object_ref (private->source_device) : NULL;
|
||||
new_private->seat = private->seat;
|
||||
new_private->tool = private->tool;
|
||||
}
|
||||
|
||||
switch (event->any.type)
|
||||
@@ -1296,6 +1309,8 @@ gdk_event_get_keyval (const GdkEvent *event,
|
||||
*
|
||||
* Extracts the hardware keycode from an event.
|
||||
*
|
||||
* Also see gdk_event_get_scancode().
|
||||
*
|
||||
* Returns: %TRUE if the event delivered a hardware keycode
|
||||
*
|
||||
* Since: 3.2
|
||||
@@ -2066,12 +2081,6 @@ gdk_get_show_events (void)
|
||||
return (_gdk_debug_flags & GDK_DEBUG_EVENTS) != 0;
|
||||
}
|
||||
|
||||
/* What do we do with G_IO_NVAL?
|
||||
*/
|
||||
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
|
||||
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
|
||||
#define EXCEPTION_CONDITION (G_IO_PRI)
|
||||
|
||||
static void
|
||||
gdk_synthesize_click (GdkDisplay *display,
|
||||
GdkEvent *event,
|
||||
@@ -2412,3 +2421,89 @@ gdk_event_set_seat (GdkEvent *event,
|
||||
priv->seat = seat;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_get_device_tool:
|
||||
* @event: a #GdkEvent
|
||||
*
|
||||
* If the event was generated by a device that supports
|
||||
* different tools (eg. a tablet), this function will
|
||||
* return a #GdkDeviceTool representing the tool that
|
||||
* caused the event. Otherwise, %NULL will be returned.
|
||||
*
|
||||
* Note: the #GdkDeviceTool<!-- -->s will be constant during
|
||||
* the application lifetime, if settings must be stored
|
||||
* persistently across runs, see gdk_device_tool_get_serial()
|
||||
*
|
||||
* Returns: (transfer none): The current device tool, or %NULL
|
||||
*
|
||||
* Since: 3.22
|
||||
**/
|
||||
GdkDeviceTool *
|
||||
gdk_event_get_device_tool (const GdkEvent *event)
|
||||
{
|
||||
GdkEventPrivate *private;
|
||||
|
||||
if (!gdk_event_is_allocated (event))
|
||||
return NULL;
|
||||
|
||||
private = (GdkEventPrivate *) event;
|
||||
return private->tool;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_set_device_tool:
|
||||
* @event: a #GdkEvent
|
||||
* @tool: (nullable): tool to set on the event, or %NULL
|
||||
*
|
||||
* Sets the device tool for this event, should be rarely used.
|
||||
*
|
||||
* Since: 3.22
|
||||
**/
|
||||
void
|
||||
gdk_event_set_device_tool (GdkEvent *event,
|
||||
GdkDeviceTool *tool)
|
||||
{
|
||||
GdkEventPrivate *private;
|
||||
|
||||
if (!gdk_event_is_allocated (event))
|
||||
return;
|
||||
|
||||
private = (GdkEventPrivate *) event;
|
||||
private->tool = tool;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_event_set_scancode (GdkEvent *event,
|
||||
guint16 scancode)
|
||||
{
|
||||
GdkEventPrivate *private = (GdkEventPrivate *) event;
|
||||
|
||||
private->key_scancode = scancode;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_event_get_scancode:
|
||||
* @event: a #GdkEvent
|
||||
*
|
||||
* Gets the keyboard low-level scancode of a key event.
|
||||
*
|
||||
* This is usually hardware_keycode. On Windows this is the high
|
||||
* word of WM_KEY{DOWN,UP} lParam which contains the scancode and
|
||||
* some extended flags.
|
||||
*
|
||||
* Returns: The associated keyboard scancode or 0
|
||||
*
|
||||
* Since: 3.22
|
||||
**/
|
||||
int
|
||||
gdk_event_get_scancode (GdkEvent *event)
|
||||
{
|
||||
GdkEventPrivate *private;
|
||||
|
||||
if (!gdk_event_is_allocated (event))
|
||||
return 0;
|
||||
|
||||
private = (GdkEventPrivate *) event;
|
||||
return private->key_scancode;
|
||||
}
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <gdk/gdktypes.h>
|
||||
#include <gdk/gdkdnd.h>
|
||||
#include <gdk/gdkdevice.h>
|
||||
#include <gdk/gdkdevicetool.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -1443,6 +1444,19 @@ GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_setting_get (const gchar *name,
|
||||
GValue *value);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
GdkDeviceTool *gdk_event_get_device_tool (const GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
void gdk_event_set_device_tool (GdkEvent *event,
|
||||
GdkDeviceTool *tool);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
int gdk_event_get_scancode (GdkEvent *event);
|
||||
|
||||
GDK_AVAILABLE_IN_3_22
|
||||
gboolean gdk_event_get_pointer_emulated (GdkEvent *event);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_EVENTS_H__ */
|
||||
|
@@ -416,12 +416,18 @@ _gdk_frame_clock_begin_frame (GdkFrameClock *frame_clock)
|
||||
priv->frame_counter++;
|
||||
priv->current = (priv->current + 1) % FRAME_HISTORY_MAX_LENGTH;
|
||||
|
||||
/* Try to steal the previous frame timing instead of discarding
|
||||
* and allocating a new one.
|
||||
*/
|
||||
if G_LIKELY (priv->n_timings == FRAME_HISTORY_MAX_LENGTH &&
|
||||
_gdk_frame_timings_steal (priv->timings[priv->current],
|
||||
priv->frame_counter))
|
||||
return;
|
||||
|
||||
if (priv->n_timings < FRAME_HISTORY_MAX_LENGTH)
|
||||
priv->n_timings++;
|
||||
else
|
||||
{
|
||||
gdk_frame_timings_unref(priv->timings[priv->current]);
|
||||
}
|
||||
gdk_frame_timings_unref (priv->timings[priv->current]);
|
||||
|
||||
priv->timings[priv->current] = _gdk_frame_timings_new (priv->frame_counter);
|
||||
}
|
||||
@@ -603,3 +609,45 @@ gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
|
||||
frame_counter--;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_flush_events (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[FLUSH_EVENTS], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_before_paint (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[BEFORE_PAINT], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_update (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[UPDATE], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_layout (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[LAYOUT], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[PAINT], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[AFTER_PAINT], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_frame_clock_emit_resume_events (GdkFrameClock *frame_clock)
|
||||
{
|
||||
g_signal_emit (frame_clock, signals[RESUME_EVENTS], 0);
|
||||
}
|
||||
|
@@ -307,7 +307,7 @@ gdk_frame_clock_flush_idle (void *data)
|
||||
priv->phase = GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS;
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS;
|
||||
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "flush-events");
|
||||
_gdk_frame_clock_emit_flush_events (clock);
|
||||
|
||||
if ((priv->requested & ~GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS) != 0 ||
|
||||
priv->updating_count > 0)
|
||||
@@ -366,7 +366,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
* in them.
|
||||
*/
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "before-paint");
|
||||
_gdk_frame_clock_emit_before_paint (clock);
|
||||
priv->phase = GDK_FRAME_CLOCK_PHASE_UPDATE;
|
||||
}
|
||||
/* fallthrough */
|
||||
@@ -377,7 +377,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
priv->updating_count > 0)
|
||||
{
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_UPDATE;
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "update");
|
||||
_gdk_frame_clock_emit_update (clock);
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
@@ -405,7 +405,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
priv->freeze_count == 0 && iter++ < 4)
|
||||
{
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_LAYOUT;
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "layout");
|
||||
_gdk_frame_clock_emit_layout (clock);
|
||||
}
|
||||
if (iter == 5)
|
||||
g_warning ("gdk-frame-clock: layout continuously requested, giving up after 4 tries");
|
||||
@@ -427,7 +427,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
if (priv->requested & GDK_FRAME_CLOCK_PHASE_PAINT)
|
||||
{
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_PAINT;
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "paint");
|
||||
_gdk_frame_clock_emit_paint (clock);
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
@@ -435,7 +435,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_AFTER_PAINT;
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "after-paint");
|
||||
_gdk_frame_clock_emit_after_paint (clock);
|
||||
/* the ::after-paint phase doesn't get repeated on freeze/thaw,
|
||||
*/
|
||||
priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;
|
||||
@@ -462,7 +462,7 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
if (priv->requested & GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS)
|
||||
{
|
||||
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS;
|
||||
g_signal_emit_by_name (G_OBJECT (clock), "resume-events");
|
||||
_gdk_frame_clock_emit_resume_events (clock);
|
||||
}
|
||||
|
||||
if (priv->freeze_count == 0)
|
||||
|
@@ -111,7 +111,17 @@ void _gdk_frame_clock_begin_frame (GdkFrameClock *clock);
|
||||
void _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
|
||||
GdkFrameTimings *timings);
|
||||
|
||||
GdkFrameTimings *_gdk_frame_timings_new (gint64 frame_counter);
|
||||
GdkFrameTimings *_gdk_frame_timings_new (gint64 frame_counter);
|
||||
gboolean _gdk_frame_timings_steal (GdkFrameTimings *timings,
|
||||
gint64 frame_counter);
|
||||
|
||||
void _gdk_frame_clock_emit_flush_events (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_before_paint (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_update (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_layout (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock);
|
||||
void _gdk_frame_clock_emit_resume_events (GdkFrameClock *frame_clock);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "gdkframeclockprivate.h"
|
||||
|
||||
/**
|
||||
@@ -48,6 +50,21 @@ _gdk_frame_timings_new (gint64 frame_counter)
|
||||
return timings;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_frame_timings_steal (GdkFrameTimings *timings,
|
||||
gint64 frame_counter)
|
||||
{
|
||||
if (timings->ref_count == 1)
|
||||
{
|
||||
memset (timings, 0, sizeof *timings);
|
||||
timings->ref_count = 1;
|
||||
timings->frame_counter = frame_counter;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_frame_timings_ref:
|
||||
* @timings: a #GdkFrameTimings
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user