Compare commits
445 Commits
GTK_2_7_2
...
GTK_2_4_11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b10588fe3 | ||
|
|
6ca81efdcc | ||
|
|
325a04fbcd | ||
|
|
52a6a1b0f8 | ||
|
|
7ccebc7269 | ||
|
|
ca27dff39a | ||
|
|
9975feaf20 | ||
|
|
784e23d524 | ||
|
|
a66f378d74 | ||
|
|
ce7993a5a0 | ||
|
|
068d429d5b | ||
|
|
eb8ae3642c | ||
|
|
46f404dd2d | ||
|
|
f252b50818 | ||
|
|
31aaf53f17 | ||
|
|
895a93c9cd | ||
|
|
7b69898bd4 | ||
|
|
00fc8b0d54 | ||
|
|
7c01e990d0 | ||
|
|
8577819a60 | ||
|
|
22ff6e3f7b | ||
|
|
f53c911a0d | ||
|
|
caae5c8123 | ||
|
|
3fa55dca40 | ||
|
|
58a54401f7 | ||
|
|
718b7b0f48 | ||
|
|
14fa6c2604 | ||
|
|
24b8bee242 | ||
|
|
7142292fa2 | ||
|
|
7ff7a6c7c1 | ||
|
|
523c9393c9 | ||
|
|
9bd1e7d6dd | ||
|
|
b915fe54f9 | ||
|
|
0aaac89cfd | ||
|
|
851a9de3f3 | ||
|
|
98769cab15 | ||
|
|
e8665cab15 | ||
|
|
9073be9fc4 | ||
|
|
a04fa6d9c6 | ||
|
|
c7a75ce4fe | ||
|
|
0b17e54c95 | ||
|
|
745f5693f3 | ||
|
|
70b23a7b03 | ||
|
|
6c3a8d215d | ||
|
|
6b3f5d0d67 | ||
|
|
7745b5ff2e | ||
|
|
fd83f1c36d | ||
|
|
ea747c393d | ||
|
|
76c0da0d5d | ||
|
|
062d21fe58 | ||
|
|
b1da918d3f | ||
|
|
5ba902e605 | ||
|
|
912095f4bf | ||
|
|
0216ec037d | ||
|
|
1800ebb2b9 | ||
|
|
35fe7f27f9 | ||
|
|
6f33202c91 | ||
|
|
7f0210fd09 | ||
|
|
434e95da34 | ||
|
|
17dcc1ac18 | ||
|
|
ce0c3d5ca1 | ||
|
|
156b2d8d3b | ||
|
|
50c3a75f3c | ||
|
|
b738ec5cd4 | ||
|
|
b2484c8f95 | ||
|
|
17ebc8414b | ||
|
|
13eb6884c6 | ||
|
|
4468c47dce | ||
|
|
912e49b912 | ||
|
|
a732d38919 | ||
|
|
285cb969b4 | ||
|
|
afc7f42ac9 | ||
|
|
7b4169c13b | ||
|
|
a621e55bb6 | ||
|
|
c4d3f3eb91 | ||
|
|
7418f2c815 | ||
|
|
08014324db | ||
|
|
3a146d9a5e | ||
|
|
678614e37a | ||
|
|
7034622b6e | ||
|
|
fdb93e840a | ||
|
|
b532358bed | ||
|
|
2c343b9e1a | ||
|
|
a02bdaa351 | ||
|
|
fcc540cbdc | ||
|
|
a039d716de | ||
|
|
1fb5246568 | ||
|
|
f699e32ccf | ||
|
|
929764860e | ||
|
|
b2882aad44 | ||
|
|
1c9d78fd2e | ||
|
|
1928afbfa7 | ||
|
|
a97b49d1ba | ||
|
|
6d657772ef | ||
|
|
1c03759148 | ||
|
|
ec01429338 | ||
|
|
a033cc27e4 | ||
|
|
517f9e62db | ||
|
|
1fa984600f | ||
|
|
baa44a15cf | ||
|
|
8bfbb78b47 | ||
|
|
4ee1f6f214 | ||
|
|
9a914f63c9 | ||
|
|
eb44a56ef0 | ||
|
|
5b73035853 | ||
|
|
8e3e9b1fbe | ||
|
|
c8c2a5c16e | ||
|
|
1108ffcb7f | ||
|
|
d03aad17d6 | ||
|
|
5952378001 | ||
|
|
72f4711274 | ||
|
|
45016319d0 | ||
|
|
7778781f8a | ||
|
|
b67781e243 | ||
|
|
989067eded | ||
|
|
1159220ac2 | ||
|
|
f2ad93c496 | ||
|
|
692875a219 | ||
|
|
75f1b42db4 | ||
|
|
5204cb3007 | ||
|
|
e77da6c140 | ||
|
|
6f2e3cc4ab | ||
|
|
da2ab86879 | ||
|
|
8b7c288f92 | ||
|
|
a0d84ec19a | ||
|
|
309bbf03c1 | ||
|
|
e4d85fa378 | ||
|
|
9f055423b7 | ||
|
|
882144878c | ||
|
|
ea8ea5d5cb | ||
|
|
4157993682 | ||
|
|
54b366f546 | ||
|
|
4e0ff51873 | ||
|
|
ba08829366 | ||
|
|
85f59d66e1 | ||
|
|
2f06d8ad44 | ||
|
|
03b6cf491d | ||
|
|
9573059b2d | ||
|
|
bf54ef87c6 | ||
|
|
64c73128d1 | ||
|
|
e56818a84f | ||
|
|
cd10630a0c | ||
|
|
6f75426b7d | ||
|
|
5d5a62f8ef | ||
|
|
93fed9bb4b | ||
|
|
32dba76d50 | ||
|
|
f48958e8a8 | ||
|
|
7a18b8a1d8 | ||
|
|
5e1613d2be | ||
|
|
cb004a2e5a | ||
|
|
65094784f2 | ||
|
|
63f5bcbb87 | ||
|
|
77090de17f | ||
|
|
ed0f6a27e8 | ||
|
|
e82cce5275 | ||
|
|
1df3a75ac4 | ||
|
|
08e9728fa0 | ||
|
|
965b411861 | ||
|
|
686f3dddad | ||
|
|
b203410c34 | ||
|
|
262b27294b | ||
|
|
cbf3179705 | ||
|
|
3401ff3f62 | ||
|
|
fc27ee6273 | ||
|
|
718e8073b4 | ||
|
|
57c4eb6f8d | ||
|
|
cf19843f22 | ||
|
|
0a7ad8d681 | ||
|
|
0b710f2617 | ||
|
|
2a8625f46e | ||
|
|
496fe33399 | ||
|
|
b34bef2341 | ||
|
|
c1b7eeefee | ||
|
|
4489472e1f | ||
|
|
bd2f564550 | ||
|
|
879386022f | ||
|
|
3c084768ad | ||
|
|
1e47f687ad | ||
|
|
67d71439c5 | ||
|
|
25d90b843d | ||
|
|
25630a7b6c | ||
|
|
30e654e71b | ||
|
|
81df15dbd4 | ||
|
|
f7c5f43a72 | ||
|
|
963ceb9356 | ||
|
|
61e13c4c77 | ||
|
|
82c31ad22b | ||
|
|
f2a519b6b3 | ||
|
|
f4adc0dba4 | ||
|
|
4dc5a17c15 | ||
|
|
d00889a3ed | ||
|
|
025b50b977 | ||
|
|
2b41c5d460 | ||
|
|
665ecdb8ec | ||
|
|
02ec92b2ed | ||
|
|
b439c49898 | ||
|
|
f34d6dbbe9 | ||
|
|
2020453616 | ||
|
|
aa5c0cb2d2 | ||
|
|
76900792f4 | ||
|
|
249b9c1218 | ||
|
|
afef1cc9db | ||
|
|
a114bc7096 | ||
|
|
8daf239a03 | ||
|
|
70076454c6 | ||
|
|
8996a22718 | ||
|
|
eb924984dc | ||
|
|
21ce0b3f20 | ||
|
|
27129904a9 | ||
|
|
f1fdab1574 | ||
|
|
d0e1b8482b | ||
|
|
f36342b52d | ||
|
|
79b790a09b | ||
|
|
cffa661b92 | ||
|
|
cdcbdeaf44 | ||
|
|
cfeee35965 | ||
|
|
70e6af9504 | ||
|
|
ed31e5a048 | ||
|
|
29e1292636 | ||
|
|
3a8845dafc | ||
|
|
c7d2a3cfd3 | ||
|
|
7dc629c56d | ||
|
|
a97f96b8d5 | ||
|
|
4190964158 | ||
|
|
b4c44e4c42 | ||
|
|
f911da5e90 | ||
|
|
3c1da10415 | ||
|
|
5233d0baf4 | ||
|
|
bce254c912 | ||
|
|
09ab5502c2 | ||
|
|
361743d885 | ||
|
|
4585e13bb2 | ||
|
|
3e5714b31b | ||
|
|
f560ca2abf | ||
|
|
2888c662b4 | ||
|
|
a6148c464b | ||
|
|
10eb81cc03 | ||
|
|
e8a9c6d40c | ||
|
|
0406f5c2f8 | ||
|
|
deff88d90c | ||
|
|
02defda7a2 | ||
|
|
591368e293 | ||
|
|
b201a24ed2 | ||
|
|
816acf018f | ||
|
|
41045df10d | ||
|
|
52897dca78 | ||
|
|
3787535900 | ||
|
|
617c2261ae | ||
|
|
f05ed3f6da | ||
|
|
56f933309d | ||
|
|
4fe91ca0a9 | ||
|
|
a796b1f9bc | ||
|
|
4d6333f0bf | ||
|
|
8900c03e11 | ||
|
|
2b18858303 | ||
|
|
6c2bc78064 | ||
|
|
cd592c2645 | ||
|
|
6413017f03 | ||
|
|
a44db0c5c4 | ||
|
|
7266f9a800 | ||
|
|
c1f8ca5929 | ||
|
|
5446f039d2 | ||
|
|
2b2719befc | ||
|
|
6fb41ab84b | ||
|
|
06332e35e6 | ||
|
|
a7343b31c3 | ||
|
|
4db49dde07 | ||
|
|
ca55b116a8 | ||
|
|
9171e7438f | ||
|
|
bdb5f882ab | ||
|
|
323dffbc3b | ||
|
|
af554cb133 | ||
|
|
2e6649ba17 | ||
|
|
733d0c9154 | ||
|
|
db9ce55567 | ||
|
|
c214874a8c | ||
|
|
175146c46d | ||
|
|
fd551b2522 | ||
|
|
e2d90b91c1 | ||
|
|
f979c5c56e | ||
|
|
a7ce2ab638 | ||
|
|
49639a9cd1 | ||
|
|
6f1882c24c | ||
|
|
2a98a16650 | ||
|
|
6f3cb8b1e1 | ||
|
|
fa57ef8aef | ||
|
|
4ec3a1d6bd | ||
|
|
f23bda0aad | ||
|
|
cb32f70d20 | ||
|
|
4e59943375 | ||
|
|
aa36444d7b | ||
|
|
6c7d7624de | ||
|
|
8c204e5162 | ||
|
|
cf41b53d71 | ||
|
|
7608f14b65 | ||
|
|
8291422086 | ||
|
|
4a34b201cb | ||
|
|
1c575522c7 | ||
|
|
4d67d33f02 | ||
|
|
7c02992921 | ||
|
|
50ff8e97f9 | ||
|
|
7cd37d663b | ||
|
|
06a15ebedb | ||
|
|
5bbe06755f | ||
|
|
154f5dad5b | ||
|
|
d9a12031a2 | ||
|
|
304f9655f9 | ||
|
|
e9786ce85d | ||
|
|
96ad6fc4bf | ||
|
|
df8a418a8f | ||
|
|
7cf485c594 | ||
|
|
0b9bdc7987 | ||
|
|
781d7b3364 | ||
|
|
1a12599fdb | ||
|
|
f1331d8410 | ||
|
|
529fb0f44f | ||
|
|
ac680cad1e | ||
|
|
632ce3d3ae | ||
|
|
cf098bba4b | ||
|
|
b4fa63e261 | ||
|
|
b5b88a69aa | ||
|
|
02f7f14cf2 | ||
|
|
b741e5d3a4 | ||
|
|
ad7adfb4e3 | ||
|
|
e782c03412 | ||
|
|
0fe0cbaf0c | ||
|
|
8faf265c12 | ||
|
|
faec05473d | ||
|
|
e753dc2e5a | ||
|
|
b85ef7f732 | ||
|
|
ebe22cd6d3 | ||
|
|
ef50ede3b6 | ||
|
|
292b331f5b | ||
|
|
eb86193b07 | ||
|
|
c518a56720 | ||
|
|
204d0e0003 | ||
|
|
af19500ed3 | ||
|
|
f408e1f17f | ||
|
|
c3e91c2604 | ||
|
|
bcd4a8cdb3 | ||
|
|
a7df1508a6 | ||
|
|
8dbbf8321b | ||
|
|
3cc2f664cd | ||
|
|
4fb311b311 | ||
|
|
96425d2e3c | ||
|
|
34121a9108 | ||
|
|
ce88affe29 | ||
|
|
af65cdb24e | ||
|
|
5ca944a813 | ||
|
|
8f382907d7 | ||
|
|
4915dc0ef8 | ||
|
|
105deb1810 | ||
|
|
3a364cd602 | ||
|
|
0ed32754f4 | ||
|
|
f740c34dcb | ||
|
|
c8a682947a | ||
|
|
d004f2901e | ||
|
|
569090f11e | ||
|
|
32eed3d40a | ||
|
|
37c0651b95 | ||
|
|
bb6dd7da57 | ||
|
|
2fb484d7cc | ||
|
|
d0c98af5f8 | ||
|
|
bec6655a7c | ||
|
|
d436ab3def | ||
|
|
6da13b2f0a | ||
|
|
35f8965bed | ||
|
|
d516dac5b2 | ||
|
|
b55a0e4921 | ||
|
|
71d1467304 | ||
|
|
41bf2931d2 | ||
|
|
aad633f661 | ||
|
|
d29d5fd365 | ||
|
|
f3e0bab511 | ||
|
|
34b133c8b9 | ||
|
|
876528e16b | ||
|
|
5f1caa9779 | ||
|
|
9f18204cc5 | ||
|
|
798e56c1e9 | ||
|
|
0c18fe881b | ||
|
|
ce4015d2ec | ||
|
|
3ac2421694 | ||
|
|
9846287396 | ||
|
|
5b9f86b96a | ||
|
|
c1a4a4cd56 | ||
|
|
516d2b85e5 | ||
|
|
24739f4261 | ||
|
|
f6e4a6ae2b | ||
|
|
3d7693a13c | ||
|
|
4f525073c6 | ||
|
|
9e4e9889da | ||
|
|
fbbd38ddb1 | ||
|
|
6e92d31415 | ||
|
|
a075ca97ed | ||
|
|
af177c8c1c | ||
|
|
e0e5f1fd52 | ||
|
|
1594006ba2 | ||
|
|
087ea955d9 | ||
|
|
41e1167283 | ||
|
|
0988088c47 | ||
|
|
47a464fcb6 | ||
|
|
78068978a0 | ||
|
|
7bdde1e104 | ||
|
|
f951eff62e | ||
|
|
653190b0df | ||
|
|
6caac23b8e | ||
|
|
2c2fdce82f | ||
|
|
205be12b37 | ||
|
|
245e344eff | ||
|
|
d9fb9d5963 | ||
|
|
be8d1d14b7 | ||
|
|
1322998cd6 | ||
|
|
5d2c80e124 | ||
|
|
0e7ede9036 | ||
|
|
cd396b22ae | ||
|
|
a2e52bc8cc | ||
|
|
fffd34a24d | ||
|
|
39043b9dcc | ||
|
|
5d21cd3b72 | ||
|
|
fccbe77810 | ||
|
|
79648eb953 | ||
|
|
458d964173 | ||
|
|
1cf67fae1b | ||
|
|
4635094c2f | ||
|
|
809c1777a4 | ||
|
|
61fddfc0ef | ||
|
|
d9808b04bb | ||
|
|
457e5acb0b | ||
|
|
37976d540d | ||
|
|
4b38323296 | ||
|
|
4c9adc8d19 | ||
|
|
3c032484c1 | ||
|
|
20016b1511 | ||
|
|
b95a071007 | ||
|
|
fa98ac6287 | ||
|
|
e3f5861fa0 | ||
|
|
c5f53b623c | ||
|
|
e6fbe340fa | ||
|
|
0f205e9172 | ||
|
|
f48cdf2100 | ||
|
|
b834eee6c6 | ||
|
|
620c316530 | ||
|
|
db0bc7fb3b | ||
|
|
bcf28d3444 | ||
|
|
e69970bd65 |
21
AUTHORS
21
AUTHORS
@@ -30,24 +30,3 @@ Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
There are many others who have contributed patches; we thank them,
|
||||
GTK+ is much better because of them.
|
||||
|
||||
|
||||
Over time, TK+ has incorporated some pieces of software which
|
||||
started as independent projects. We list the original authors here:
|
||||
|
||||
|
||||
MS-Windows theme engine
|
||||
-----------------------
|
||||
Raymond Penners
|
||||
Dom Lachowicz
|
||||
|
||||
|
||||
Pixbuf theme engine
|
||||
-------------------
|
||||
Owen Taylor
|
||||
|
||||
|
||||
IME input method
|
||||
----------------
|
||||
Takuro Ashie
|
||||
Kazuki IWAMOTO
|
||||
|
||||
6596
ChangeLog.pre-2-10
6596
ChangeLog.pre-2-10
File diff suppressed because it is too large
Load Diff
5099
ChangeLog.pre-2-6
5099
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
6596
ChangeLog.pre-2-8
6596
ChangeLog.pre-2-8
File diff suppressed because it is too large
Load Diff
4
INSTALL
4
INSTALL
@@ -18,8 +18,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.7.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.7.2 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.4.11.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.4.11 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
|
||||
@@ -13,9 +13,6 @@ EXTRA_DIST = \
|
||||
ChangeLog.pre-1-0 \
|
||||
ChangeLog.pre-1-2 \
|
||||
ChangeLog.pre-2-0 \
|
||||
ChangeLog.pre-2-2 \
|
||||
ChangeLog.pre-2-4 \
|
||||
ChangeLog.pre-2-6 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
config.h.win32 \
|
||||
@@ -23,6 +20,7 @@ EXTRA_DIST = \
|
||||
gtk-zip.sh.in \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/makefile.mingw \
|
||||
po/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
|
||||
898
NEWS
898
NEWS
@@ -1,771 +1,203 @@
|
||||
Overview of Changes from GTK+ 2.7.1 to GTK+ 2.7.2
|
||||
=================================================
|
||||
* GtkAboutDialog
|
||||
- Clean up the "trail" in the path bar when set_current_folder
|
||||
is called explicitly [Jonathan Blandford, Matthias Clasen]
|
||||
- Accept dropped files and directories on the file list [Sven
|
||||
Neumann, Matthias]
|
||||
* GtkTreeView
|
||||
- Make reusing cell renders work as well as it did in 2.6,
|
||||
but document it as being unsupported. [Kristian Rietveld]
|
||||
* GtkAboutDialog
|
||||
- Optionally wrap the license [Christian Rose, Christian Persch]
|
||||
* Menu
|
||||
- Make image menu items work in vertical menubars [Matthias]
|
||||
- Make orientation changes of menubars work [Matthias]
|
||||
* Win32
|
||||
- Implement named cursors and other new GDK apis [Hans Breuer]
|
||||
- Implement getting cursor images [Tor Lillqvist]
|
||||
* Bug fixes [J. Ali Harlow, Matthias, Diego Gonzalez,
|
||||
Kazuki IWAMOTO, Paul Cornett, Sebastian Bacher, Tor]
|
||||
* Documentation improvements [Benjamin Berg, Matthias,
|
||||
Steve Chaplin, Peter van den Bosch, Tim-Philipp Müller]
|
||||
* New and updated translations (en_CA,sr,sr@Latn)
|
||||
|
||||
Overview of Changes from GTK+ 2.7.0 to GTK+ 2.7.1
|
||||
=================================================
|
||||
* GtkTreeView
|
||||
- Change the keynav for header reordering and resizing
|
||||
to Alt-arrows and Shift-Alt-arrows [Calum Benson]
|
||||
* GtkTextView
|
||||
- Make movement by paragraphs up/down symmetric [Behnam
|
||||
Esfahbod]
|
||||
- Improve invisible text support [Matthias Clasen]
|
||||
* Some new stock items: GTK_STOCK_INFO, GTK_STOCK_FULLSCREEN,
|
||||
GTK_STOCK_LEAVE_FULLSCREEN [Kristof Vansant]
|
||||
* Handle broken grabs in many places [John Ehresman, Matthias]
|
||||
* GDK
|
||||
- Add a function to move a region [Søren Sandmann]
|
||||
- Fix endianness issues in the pixbuf drawing
|
||||
code [David Zeuthen, Owen Taylor]
|
||||
- Add a GrabBroken event that is emitted when grabs
|
||||
are broken [Simon Cooke, John Ehresman, Matthias]
|
||||
- Track implicit grabs [Matthias]
|
||||
* Win32
|
||||
- Improve and simplify line segment rendering [Tor Lillqvist]
|
||||
* Bug fixes [Georg Schwarz, Fabricio Barros Cabral,
|
||||
Benoit Carpentier, Markku Vire, Ryan Lortie, Matthias,
|
||||
Morten Welinder, Dan Winship, Manish Singh, Tom von
|
||||
Schwerdtner, Kjartan Maraas, Euan MacGregor, William Jon
|
||||
McCann, David Saxton, Padraig Brady]
|
||||
* Documentation improvements [Matthias, Ross Burton]
|
||||
* New and improved translations (es,et,nl,sk,th,zh_TW)
|
||||
|
||||
Overview of Changes from GTK+ 2.6.x to GTK+ 2.7.0
|
||||
=================================================
|
||||
* GtkTreeView
|
||||
- Kris is back !!!
|
||||
- Lots of scrolling/validation fixes [Kristian Rietveld]
|
||||
- Allow to "unsort" columns. [Richard Hult]
|
||||
- Support wrapping in GtkCellRendererText [Matthias Clasen]
|
||||
- Support tinting in GtkCellRendererPixbuf [Jorn Baayen]
|
||||
- Make enable-search control only typeahead search,
|
||||
not C-f search. [Sven Neumann]
|
||||
- Make double-click autosize treeview columns again [Matthias]
|
||||
- Fix insensitive appearance [Billy Biggs, Matthias]
|
||||
* GtkFileChooser
|
||||
- Don't select the first item in folder modes [Christian Neumair,
|
||||
Federico Mena Quintero]
|
||||
- Make save mode work again [Federico]
|
||||
- Allow bookmarks to be renamed [Sean Middleditch]
|
||||
- Ellipsize the preview label [Jeroen Zwartepoorte]
|
||||
- Use smaller icons [Vincent Noel]
|
||||
- Avoid a size allocation loop [Milosz Derzynski, Robert Ögren]
|
||||
- Don't stat children of /afs or /net network directories [Federico]
|
||||
- Improve sorting of filenames [Matthias]
|
||||
- Treat backup files like hidden files, and support
|
||||
.hidden files in the Unix backend [Sean Middleditch, Jan Arne Petersen]
|
||||
- Improve the re-rooting behaviour of the path bar [Benjamin Otte]
|
||||
* GtkIconView
|
||||
- Many fixes for scrolling and selection handling [Mathias Hasselmann]
|
||||
- Implement GtkCellLayout, use cell renderers [Matthias]
|
||||
- Support editing [Matthias]
|
||||
- Support DND [Matthias]
|
||||
- Add API to determine the visible part of the
|
||||
model [Jonathan Blandford]
|
||||
* GtkAboutDialog
|
||||
- Visual improvements, HIG compliance [Jorn Baayen]
|
||||
* GtkCalendar
|
||||
- Use nl_langinfo() to determine the first day of week,
|
||||
when it is available [Vincent Untz, Tommi Komulainen, Pierre Ossman]
|
||||
- Allow localization of the year format [Paisa Seeluangsawat]
|
||||
* GtkEntry
|
||||
- Allow completion popups to be wider than the entry [Ross Burton]
|
||||
- Add a property to suppress the popup for single matches [Matthias]
|
||||
- Don't blink the cursor if not editable [Nikos Kouremenos]
|
||||
* GtkTextView
|
||||
- Add a GtkTextBuffer::text property [Johan Dahlin]
|
||||
- Allow to set a paragraph background color [Gustavo Carneiro,
|
||||
Jeroen Zwartepoorte]
|
||||
- Don't blink the cursor if not editable [Nikos Kouremenos]
|
||||
- Make invisible text work a bit better [Jeroen]
|
||||
* GtkAlignment
|
||||
- Flip padding in RTL mode [Maciej Katafiasz]
|
||||
* GtkUIManager
|
||||
- Support invisible, expanding separators [Christian Persch]
|
||||
- Allow to construct menu tool buttons [Sven Neumann]
|
||||
* GtkIconCache
|
||||
- Cache image data and metadata as well [Anders Carlsson]
|
||||
* GtkMenu
|
||||
- Support vertical menubars [Matthias]
|
||||
- Make scrolling more efficient [Jorn Baayen, Søren Sandmann]
|
||||
- Allow to pop up menus without grabbing the keyboard [Michael
|
||||
Natterer]
|
||||
- Allow setting background images on menus [Benjamin Otte]
|
||||
* gtk-demo
|
||||
- Add demos for 2.6 features [Matthias, Mark McLoughlin]
|
||||
* Allow custom translation function for stock labels. [Funda Wang,
|
||||
Diego Gonzalez]
|
||||
* Add 16x16 versions for some some icons which were missing
|
||||
them [Jakub Steiner, Tuomas Kuosmanen, Vincent Noel]
|
||||
* Move a lot of constant data to the .rodata section [Matthias]
|
||||
* Don't copy property names, nicks and blurbs [Matthias]
|
||||
* Use Cairo for most drawing [Owen Taylor]
|
||||
* Allow themes to draw outside the widget's allocation [Owen]
|
||||
* Allow key names to be translated [Christian Rose]
|
||||
* Make all cursors used by GTK+ themeable [Matthias]
|
||||
* Support the ICCCM urgency hint [Havoc Pennington]
|
||||
* GDK
|
||||
- Work with XRender < 0.4 [Albert Chin, Billy Biggs]
|
||||
- Add API to warp the pointer [Matthias]
|
||||
- Support _NET_VIRTUAL_ROOTS [Carsten Haitzler]
|
||||
- Add API to obtain the last user interaction time [Elijah
|
||||
Newren]
|
||||
- Make some large arrays const [Ben Maurer, Tommi Komulainen]
|
||||
- Support Cairo drawing [Owen, Carl Worth]
|
||||
- Support Visuals with alpha channel [Owen, Keith Packard]
|
||||
- Support named cursors and cursor themes [Matthias]
|
||||
* gdk-pixbuf
|
||||
- Support saving BMP [Ivan Wong Yat Cheung]
|
||||
- Allow to specify compression level when saving
|
||||
in PNG format [Sven Neumann]
|
||||
- Add a way to construct animations from frames [Dom Lachowicz]
|
||||
- Accept BMP v4 [Matthias]
|
||||
* Win32 changes
|
||||
- Improve keyboard handling [Tor Lillqvist]
|
||||
- Improve clipboard handling [Ivan Wong]
|
||||
- Do delayed rendering for transfering images
|
||||
through the clipboard [Ivan Wong]
|
||||
- Improve tablet handling [Robert Ögren]
|
||||
- Initialize input devices lazily [Robert Ögren]
|
||||
- Make big windows work on NT [Ivan Wong]
|
||||
- Implement dashed lines correctly [Ivan Wong, Hans Breuer]
|
||||
- Handle 16 color display mode [Tor]
|
||||
- Support RGBA cursors [Tim Evans]
|
||||
- Fix DND on multi-monitor systems [Tor]
|
||||
- Use alternative button order [Tor]
|
||||
- Build fixes [Hans]
|
||||
- Bug fixes [Ivan Wong, Dave Neary, Daniel Atallah, Takuro Ashie,
|
||||
Robert Ögren, Kevin Stange, Tim Evans]
|
||||
* Other bug fixes [Alexander Hunziker, Alexander Larsson, Anders
|
||||
Carlsson, Andreas Volz, Arjan van de Ven, Billy Biggs, Chris Lee,
|
||||
Christian Neumair, Christian Persch, Crispin Flowerday, Damon Chaplin,
|
||||
David A. Knight, David Costanzo, Dennis Cranston, Diego Gonzalez,
|
||||
Dom Lachowicz, Doug Morgan, Doug Quale, Elijah Newren, Fabricio Barros
|
||||
Cabral, Federico, Felipe Heidrich, Felix Riemann, Frank Naumann,
|
||||
Frederic Crozat, Gary Kramlich, Gustavo Carneiro, Hans-Wolfgang Loidl,
|
||||
Havoc, Hazael Maldonado Torres, Ian Wienand, Ismael Juma, Jaap A. Haitsma,
|
||||
Jacob Kroon, Jakub Jellinek, Jean Marie Favreau, Jeff Franks, Jens Finke,
|
||||
Jim Evins, Joerg Sonnenberger, John Ellis, John Finlay, Jonathan,
|
||||
Jorn Baayen, Kazuki Iwamoto, Kirk Bridger, Kjartan Maraas, Leonard
|
||||
Michlmayr, Lorenzo Gil Sanchez, Manish Singh, Marc Meissner, Matthias,
|
||||
Michael Natterer, Mikael Hallendal, Milosz Derezynski, Morten Welinder,
|
||||
Murray Cumming, Nickolay V. Shmyrev, Niko Tyni, Nguyen Thai Ngoc Duy,
|
||||
Olaf Vitters, Olivier Sessink, Owen, Paolo Borelli, Patrick Fimml,
|
||||
Peter Bloomfield, Peter Wainwright, Phil Blundell, Philipp Langdale,
|
||||
Priit Laes, Reinout van Schouwen, Remus Draica, Richard Hult, Robert
|
||||
Staudinger, Rodney Dawes, Rodrigo Moya, Roman Kagan, Ryan Lortie,
|
||||
Samuel Hym, Seven Walter, Søren, Stefan Kost, Stepan Kasal,
|
||||
Stephen Kennedy, Sven Neumann, Theerud Lawtrakul, Thomas Leonard,
|
||||
Thomas Zajic, Tim-Philipp Müller, Tomislav Jonjic, Tommi Komulainen,
|
||||
Torsten Schoenfeld, Tristan Van Berkom, Victor Osadci, Vincent Ladeuil,
|
||||
Vincent Noel, Vincent Untz, Yury Puzis]
|
||||
* Documentation improvements [Alex Graveley, Ali Akcaagac, Bill
|
||||
Haneman, Billy Biggs, Christian Persch, Christian Rose, Dan Winship,
|
||||
George Kraft IV, Ghorban M. Tavakoly, Hubert Sokolowski, Jeff Franks,
|
||||
Jianfei Wang, Johan Dahlin, Jon-Kare Hellan, Karel Kulhavy, Ken
|
||||
Siersma, Maciej Katafiasz, Masao Mutoh, Mathias Hasselmann, Matthias,
|
||||
Michal Suchanek, Morten Welinder, Murray Cumming, Oliver Sessink, Owen,
|
||||
Richard Hult, Roger Light, Sebastian Bacher, Steve Chaplin, Sven Neumann,
|
||||
Torsten Schoenfeld, Vincent Untz, Worik Stanton]
|
||||
* New and improved translations (bg,ca,cs,cy,da,de,el,en_CA,en_GB,es,et,
|
||||
eu,fa,fi,hu,id,ja,nb,ne,nl,nn,no,pl,pt,pt_BR,ro,ru,rw,sk,sq,sr,sr@Latn,
|
||||
sv,th,uk,vi,xh,zh_CN,zh_TW)
|
||||
|
||||
Overview of Changes from GTK+ 2.6.0 to GTK+ 2.6.1
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Fix some possible threading deadlocks [Matthias Clasen]
|
||||
- Don't return errors from the private GTK_FILE_SYSTEM_ERROR
|
||||
domain [Murray Cumming]
|
||||
- Fix some crashes with unreadable directories [Federico Mena
|
||||
Quintero]
|
||||
- Add an "Open Location" item to the context menu [Federico]
|
||||
* GtkTreeView
|
||||
- Make sorting work again in list stores [Marcin Krzyzanowski]
|
||||
- Restrict column reordering to button 1 [Jonathan Blandford]
|
||||
* GtkComboBox
|
||||
- Make the button prelight [Ricardo Veguilla]
|
||||
- Fix state propagation [Carlos Garnacho Parro]
|
||||
* GtkMessageDialog
|
||||
- Don't show secondary label until it is set [Christian Persch]
|
||||
* GtkMenu
|
||||
- Make items activate immediately on button release [Søren Sandmann]
|
||||
- Submenus inherit their cascading direction [Matthias]
|
||||
* gdk-pixbuf
|
||||
- Fix a possible threading deadlock when loading
|
||||
animations [Callum McKenzie]
|
||||
- Make Hyper interpolation work again [Dennis Nezic]
|
||||
* Win32
|
||||
- Improve handling of UNC paths [Tor Lillqvist]
|
||||
- Show the correct Desktop folder in the file chooser [Tor]
|
||||
- Bug fixes [Tor]
|
||||
* Bug fixes [Torsten Schoenfeld, Morten Welinder,
|
||||
Marcin, Seth Nickell, Jonathan, Owen Taylor, Søren,
|
||||
Iñigo Serna, John Finlay, Zeeshan Ali, Robert Ögren,
|
||||
Billy Biggs, Brian Tarricone, Tor, Christian, Tristan
|
||||
Van Berkom, Elijah Newren, Federico, James M. Cape,
|
||||
Matthias, Arnaud Charlet]
|
||||
* Documentation improvements [Masao Mutoh, Torsten,
|
||||
Billy, Alessio Dessi, David Bourguignon, Tommi Komulainen,
|
||||
Dave Bordoley, Robert Ancell, Kentaro Fukuchi, Matthias,
|
||||
Christian Biere, Jonathan, Tommi, Stefan Kost]
|
||||
* New and improved translations (cs,cy,da,de,en_CA,es,ja,lt,nl,sq,sv,zh_CN)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.x to GTK+ 2.6.0
|
||||
=================================================
|
||||
|
||||
* New widgets
|
||||
- GtkIconView
|
||||
- GtkAboutDialog
|
||||
- GtkCellView
|
||||
- GtkFileChooserButton
|
||||
- GtkMenuToolButton
|
||||
|
||||
* New cell renderers
|
||||
- GtkCellRendererCombo
|
||||
- GtkCellRendererProgress
|
||||
|
||||
* Changes in GtkFileChooser
|
||||
- Many tweaks to keynav and other behaviour
|
||||
|
||||
* Changes in GtkTreeView
|
||||
- Hover selection
|
||||
- Hover expand
|
||||
- Separators
|
||||
- Insensitive rows
|
||||
- Typeahead
|
||||
|
||||
* Changes in GtkComboBox
|
||||
- Allow trees in combo boxes
|
||||
- Hover selection
|
||||
- Hover expand
|
||||
- Separators
|
||||
- Insensitive rows
|
||||
- Scrolling
|
||||
|
||||
* Changes in GtkLabel
|
||||
- Rotated text
|
||||
- Ellipsisation
|
||||
- Dnd from selectable labels
|
||||
- Selectable labels in the focus chain
|
||||
- Obey the Pango backspace-deletes-character attribute
|
||||
|
||||
* Changes in GtkTextView
|
||||
- Rotated text
|
||||
- Obey the Pango backspace-deletes-character attribute
|
||||
|
||||
* Changes in Clipboard/Selection/DND handling
|
||||
- Selection ownerchip change notification
|
||||
- API to handle text, image and file targets
|
||||
- Support text/plain target
|
||||
- Support clipboard persistency
|
||||
- Support xdnd v5
|
||||
- Reduce clipboard timeout to 30 seconds
|
||||
|
||||
* Theming
|
||||
- Follow icon theme specification for directory locations
|
||||
- Themed window icons
|
||||
- Themed images in GtkImage
|
||||
- Allow themes to displace focus rectangles on click
|
||||
- Various new stock icons
|
||||
|
||||
* Window Manager interaction
|
||||
- Support do-not-focus-on-map hint
|
||||
- Support _NET_WM_USER_TIME
|
||||
|
||||
* gdk-pixbuf:
|
||||
- License information for image loaders
|
||||
- Disable loaders
|
||||
- Simple rotation
|
||||
- Make threadsafe
|
||||
|
||||
* Performance improvements
|
||||
- Increase chunk size for incremental selection transfers
|
||||
- Get rid of many PLT entries
|
||||
- Icon theme caching
|
||||
- Sync counter mechanism to speed up resizes
|
||||
- Reimplement GtkListStore on top of a splay tree
|
||||
- Fix algorithmic problems in GtkUIManager
|
||||
|
||||
* Win32-specific changes
|
||||
- Integrate IME input method module
|
||||
- Integrate ms-windows (Wimp) theme engine
|
||||
|
||||
* Other changes
|
||||
- API for HIG-conform dialogs
|
||||
- API for stock-like buttons
|
||||
- New init API based on GOption
|
||||
- Setting for alternative button order
|
||||
- Setting for modules to load
|
||||
- Integrate pixbuf theme engine
|
||||
- Change notebook tabs with the scroll wheel
|
||||
- Ellipsisation in GtkCellRendererText, GtkProgressBar, GtkStatusbar
|
||||
- Clean up abi and enforce list of exported symbols
|
||||
|
||||
Overview of Changes from GTK+ 2.5.6 to GTK+ 2.6.0
|
||||
=================================================
|
||||
* GtkListStore
|
||||
- Emit rows_reordered if the list is reordered [Matthias Clasen]
|
||||
- Add functions to allow inserting rows with values [Matthias]
|
||||
* GtkTextView
|
||||
- Add function which allow to determine the character
|
||||
at a position [Padraig O'Briain, Matthias]
|
||||
* GtkFileChooser
|
||||
- Center select row during typeahead [Federico Mena Quintero]
|
||||
- Reset filters when necessary [Carlos Garnacho Parro]
|
||||
* GtkMenu
|
||||
- Make mnemonics without Alt work in menubars [Owen Taylor]
|
||||
- Scroll wheel scrolling [Matthias]
|
||||
* GtkLabel
|
||||
- Add a max-width-chars property to specify the maximal
|
||||
width of a label in characters [Christian Persch]
|
||||
* GtkIconView
|
||||
- Arrange items in a grid [Matthias]
|
||||
- Convert hardcoded spacing constants into properties [Matthias]
|
||||
* GtkCellRendererText
|
||||
- Add ::width-chars property [James M. Cape]
|
||||
* Win32
|
||||
- Implement keynav for the color picker [Hans Breuer]
|
||||
- Use GLib stdio wrappers [Tor Lillqvist]
|
||||
* Bug fixes [Kazuki IWAMOTO, Damon Chaplin, Matthias, Christian,
|
||||
Michael Natterer, Jonathan Blandford, Manish Singh, John Finlay,
|
||||
Robert Ögren, Mariano Suárez-Alvarez, Marco Pesenti Gritti,
|
||||
Tommi Komulainen, R. McFarland, Alexander Larsson, Dennis Cranston,
|
||||
Jorn Baayen]
|
||||
* Documentation improvements [Matthias, Jay Camp, Paolo Borelli,
|
||||
David Lodge]
|
||||
* New and improved translations (bg,nb,no,nso,pt_BR,zh_CN)
|
||||
|
||||
Overview of Changes from GTK+ 2.5.5 to GTK+ 2.5.6
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Improve keybindings [Davyd Madeley, Federico Mena Quintero]
|
||||
- Speed up loading of large directories [Federico]
|
||||
- Move "Browse for other folders" expander up [Federico]
|
||||
- Support DND from the path bar [Federico]
|
||||
* GtkColorSelectionDialog
|
||||
- Add keynav to the color picker [Frances Keenan, Matthias Clasen]
|
||||
* GtkButton
|
||||
- Allow construction of stock-like buttons [Matthias,
|
||||
Jonathan Blandford]
|
||||
* GtkLabel
|
||||
- Support DND for selectable labels [Matthias]
|
||||
- Support rotated text [Owen Taylor, Hans Breuer]
|
||||
* GtkTextView
|
||||
- Support rotated text [Owen Taylor]
|
||||
- Make it possible to select the first/last line
|
||||
when moving by lines [Paolo Borelli]
|
||||
* GtkTreeView
|
||||
- Make sorting of GtkListStore stable again [Søren Sandmann]
|
||||
- Change the behaviour of gtk_tree_sortable_get_sort_column_id()
|
||||
slightly to be more useful [Matthias]
|
||||
* GtkUIManager
|
||||
- Make some functions virtual to make deriving
|
||||
GtkUIManager easier [Michael Natterer]
|
||||
* GtkSettings
|
||||
- Handle changes to gtk-menu-images and gtk-button-images
|
||||
much more efficiently [Matthias]
|
||||
* GtkClipboard
|
||||
- Reduce timeout to 30 seconds [Billy Biggs]
|
||||
* Add pixbuf theme engine [Owen]
|
||||
* GDK
|
||||
- Compile against X11R5 [Matthias]
|
||||
- Add GdkPangoRenderer [Owen]
|
||||
- Support rotated text [Owen]
|
||||
- Add dead_hook and dead_horn keysyms [Samuel Thibault]
|
||||
- Determine direction of XKB groups from their content
|
||||
[Behdad Esfahbod, Ilya Konstantinov]
|
||||
* Win32
|
||||
- Notice when drives are plugged in or removed [Hans]
|
||||
- Ms-windows theme improvements: no tearoff menu items,
|
||||
button order, toolbar and statusbar grips, combobox
|
||||
arrows [Dom Lachowicz]
|
||||
- Fix im module loading [Tor Lillqvist]
|
||||
* Bug fixes [Vasco Alexandre da Silva Costa, Kazuki IWAMOTO,
|
||||
Erwann Chenede, Tim Janik, Gavin Romig-Koch, Jonathan,
|
||||
Manish Singh, Morten Welinder, Billy Biggs, Matthias, Owen,
|
||||
John Finlay, Christian Neumair, Sven Neumann, Felipe
|
||||
Heidrich, Martin Jeppensen, Kristian Høgsberg, Olivier
|
||||
Andrieu, Jody Goldberg, Søren, Dan Winship, Federico,
|
||||
Alex Larsson, James Henstridge, James M. Cape, Frederic Crozat,
|
||||
Dennis Cranston, Marcel Telka, Robert Ögren]
|
||||
* Documentation improvements [Matthias, Jonathan, Owen, Masao Mutoh,
|
||||
Billy Biggs]
|
||||
* New and updated translations (bg,ca,cs,da,de,en_CA,en_GB,es,hu,ja,nb,nso,rw,sq,zh_CN)
|
||||
|
||||
Overview of Changes from GTK+ 2.5.4 to GTK+ 2.5.5
|
||||
=================================================
|
||||
* gdk-pixbuf
|
||||
- Make threadsafe [Colin Walters]
|
||||
* GtkFileChooser
|
||||
- Make tooltips work better [Matthias Clasen]
|
||||
- Show files (grayed out) in folder modes [Nickolay V. Shmyrev]
|
||||
- Add predefined filter for image files [Anders Carlsson]
|
||||
- Support mime subclasses, aliases and superclasses
|
||||
like text/* [Tommi Komulainen, David A. Knight, Matthias]
|
||||
* GtkFileChooserButton
|
||||
- Remove support for CREATE_FOLDER and SAVE modes
|
||||
until a more satisfactory UI for these can be found [Seth Nickell,
|
||||
Matthias]
|
||||
- Make file DND work better [Christan Persch]
|
||||
* GtkAction
|
||||
- Add a function to obtain the accel path [Michael Natterer]
|
||||
* GtkUIManager
|
||||
- Major performance improvement [Dave Neary, Michael,
|
||||
Sven Neumann, Soeren Sandmann, Matthias]
|
||||
* GtkIconView
|
||||
- Make scrolling work with large icon views [Matthias]
|
||||
* GtkWindow
|
||||
- As a last resort, allow to use mnemonics without
|
||||
modifier [Pasupathi Duraisamy, Owen Taylor]
|
||||
* GtkProgressBar
|
||||
- Support ellipsizing the text [Morten Welinder, Matthias]
|
||||
* GtkStatusbar
|
||||
- Avoid resizing if the text of the label changes [He Qiangqiang,
|
||||
Owen, Christian]
|
||||
- Draw the resize grip better [Matthias, Christian]
|
||||
- Ellipsize the text [Matthias]
|
||||
* GtkClipboard
|
||||
- Add API for image transfer via copy-and-paste [Matthias]
|
||||
* DND
|
||||
- Fix DND to embedded windows (e.g. panel applets) [James Henstridge,
|
||||
Matthias]
|
||||
* Stock icons
|
||||
- Add RTL variants of the media icons [Bastien Nocera]
|
||||
* Win32
|
||||
- Build fixes [Hans Breuer, Tor Lillqvist]
|
||||
- Implement resize grips [Robert Ögren]
|
||||
- Bug fixes [Robert, Tor, J. Ali Harlow]
|
||||
* Bug fixes [Paolo Borelli, Kjartan Maraas, Olivier Andrieu,
|
||||
Torsten Schoenfeld, Matthias, Philip Langdale, Christian,
|
||||
Frances Keenan, Owen, Murray Cumming, Christophe Fergeau,
|
||||
Tristan Van Berkom, Adam Hooper, James M. Cape, Carlos Garnacho
|
||||
Parro, Mariano Suárez-Alvarez, John Finlay, Jonathan Blandford]
|
||||
* Documentation improvements [Masao Mutoh, Matthias,
|
||||
Torsten Schoenfeld, Matthew H. Plough, Salvador Fandiño,
|
||||
Owen, Vincent Untz, Jonathan, Bastien]
|
||||
* Updated translations (cs,da,en_CA,es,hu,ja,nl,sq)
|
||||
|
||||
Overview of Changes from GTK+ 2.5.3 to GTK+ 2.5.4
|
||||
=================================================
|
||||
Overview of Changes from GTK+ 2.4.10 to GTK+ 2.4.11
|
||||
===================================================
|
||||
* GtkFileChooser
|
||||
- Make path bar arrows larger [Matthias Clasen]
|
||||
- Make SELECT_FOLDER mode work [Matthias]
|
||||
- Speed up the completion popup, pop it up
|
||||
again after Tab [Matthias, Jens Bech Madsen]
|
||||
- Add some tooltips [Matthias]
|
||||
- Make path bar scroll [Matthias]
|
||||
- Improve preview updating [Tommi Komulainen]
|
||||
- Make the key / pop up the location dialog even
|
||||
on French keyboards, insert the /. [Frederic Crozat, Warren Togami]
|
||||
* GtkFileChooserButton
|
||||
- Show icons next to entry [James M. Cape]
|
||||
- Improve ellipsisation [James]
|
||||
* GtkMessageDialog
|
||||
- API additions to create HIG-conform dialogs [David Bordoley, Carlos
|
||||
Garnacho Parro]
|
||||
* Keyboard navigation
|
||||
- Put selectable labels in the regular tab focus
|
||||
chain [David Hawthorne, Matthias]
|
||||
- Skip selectable labels when looking for the initial
|
||||
focus widget in dialogs [Matthias]
|
||||
* Icon themes:
|
||||
- Use an mmap()ed cache for directory data. [Martijn Vernooij,
|
||||
Owen Taylor, Anders Carlsson]
|
||||
* Clipboard, DND:
|
||||
- Add convenience API for image and file transfers. [Matthias]
|
||||
- Add API for clipboard persistence [Anders]
|
||||
- Don't loose clipboard contents if a text buffer is
|
||||
finalized [Anders]
|
||||
* Add a GtkMenuToolButton widget which displays a
|
||||
dropdown menu from a toolbar button. [Paolo Borelli]
|
||||
* Make menus scroll faster [Soeren Sandmann]
|
||||
* Allow themes to displace focus recangles in buttons
|
||||
on click [Soeren, Matthias]
|
||||
* Add a public setting for button ordering [Owen Taylor, Matthias]
|
||||
* GtkImage
|
||||
- Support named icons [James Henstridge]
|
||||
* GtkAboutDialog
|
||||
- Support named icons [James Henstridge]
|
||||
* Add a function to obtain the string representation of
|
||||
accelerators used in GtkAccelLabel [John Spray, Matthias]
|
||||
- Speed up the completion popup [Matthias]
|
||||
- Update the preview when searching [Tommi Komulainen]
|
||||
- Pop up completions again when tab is pressed [Jon Bech Madsen]
|
||||
- Don't prepopulate the location entry [Matthias]
|
||||
* Win32 bug fixes [Robert Ögren]
|
||||
- Fix commandline option handling [Tor Lillqvist]
|
||||
- Make IME input method work better [Tor]
|
||||
* Other bug fixes [Joel Fredrikson, Darren Creutz,
|
||||
Manish Singh, Matthias, Tristan Van Berkom, Christian Persch,
|
||||
Padraig O'Briain, Owen, Jonathan Blandford,
|
||||
Michèle Garoche, Milosz Derezynski, Christopher Blizzard,
|
||||
Paolo, John Austin, Maryn Russell, Ken Harris, Reinout van
|
||||
Schouwen, Morten Welinder, Ross Burton, Bernd Demian, Gustavo
|
||||
Carneiro, John Finlay, Tim Janik, Damon Chaplin,
|
||||
Peter Zelesny, Soeren, John Cupitt, Federico Mena Quintero,
|
||||
Manuel Baena García, William Jon McCann, Olexiy Avramchenko,
|
||||
Sebastien Bacher, Kazuki IWAMOTO, Dan Williams, Vincent Noel,
|
||||
Billy Biggs, Olivier Andrieu, Thomas Fitzsimmons]
|
||||
* Documentation improvements [John Finlay, Billy Biggs, Matthias,
|
||||
Martyn Russell, Dave Cook, Jonathan, Owen, Shaun McCance, Anders]
|
||||
* New and updated translations (az_IR,cs,en_CA,en_GB,es,nb,nl,no,pt_BR,
|
||||
sq,sr,sr@Latn,zh_TW)
|
||||
* Other bug fixes [Federico Mena Quintero, Joel Fredrikson, Matthias,
|
||||
Padraig O'Briain, Michèle Garoche. Frederic Crozat,
|
||||
Jonathan Blandford, John Cupitt, Morten Welinder, Christian Persch,
|
||||
Lorenzo Gil Sanchez, Federico]
|
||||
Martyn Russell]
|
||||
* Documentation improvements [John Finlay, Billy Biggs, Jonathan,
|
||||
Owen Taylor]
|
||||
* New and updated translations (az_IR,ang,en_CA,gl,hu,it,nl)
|
||||
* Bugs fixed: 153185,153224,153628,145467,154191,153326,143826,147700,154186,154658,154703,153791,154444,152562,154188
|
||||
|
||||
Overview of Changes from GTK+ 2.5.2 to GTK+ 2.5.3
|
||||
=================================================
|
||||
Overview of Changes from GTK+ 2.4.9 to GTK+ 2.4.10
|
||||
==================================================
|
||||
* GtkFileChooser
|
||||
- Work better with older version of the gnome-vfs backend [Zack Cerza]
|
||||
- Keynav improvements [Jonathan Blandford]
|
||||
- Make position of pathbar down button stable [Jonathan]
|
||||
- Fix some memory leaks [Kjartan Maraas]
|
||||
- Make autocompletion less annoying in save mode [Owen Taylor]
|
||||
* GtkFileChooserButton
|
||||
- Allow mnemonic activation [Dennis Cranston, James M. Cape]
|
||||
* GtkComboBox
|
||||
- Work without a model [Mariano Suarez-Alvarez
|
||||
* GtkTreeView
|
||||
- Allow sorting of tree models to be turned off [Torsten Schoenfeld]
|
||||
* GtkRange
|
||||
- Add a::change-value signal [Thomas Fitzsimmons]
|
||||
* GtkEntryCompletion
|
||||
- Improve positioning of popups [Matthias]
|
||||
* Make input methods respect editability [Noah Levitt]
|
||||
* Add an setting to specify modules to load [Alex Graveley]
|
||||
* Use GOption for commandline argument parsing [Anders Carlsson]
|
||||
* Default theme
|
||||
- Improve drawing of expanders [Matthias Clasen]
|
||||
* Add a configure option to disable the use of ELF visibility
|
||||
attributes for PLT reduction
|
||||
* Make selection handling robust against invalid UTF-8 [Owen]
|
||||
* GtkEntryCompletion
|
||||
- Improve positioning of popups [Matthias]
|
||||
* Make selection handling robust against invalid UTF-8 [Owen Taylor]
|
||||
* gdk-pixbuf
|
||||
- Add a variant of gdk_pixbuf_new_from_file_at_size() which
|
||||
optionally ignores aspect ratio [Dom Lachowicz]
|
||||
- Fix saving of pixbufs with alpha-channel as jpeg [Emmanuel Pacaud]
|
||||
- Security fixes [Chris Evans]
|
||||
* Win32
|
||||
* Win32 bug fixes
|
||||
- Improve tablet handling [Robert Ögren]
|
||||
- Make tablets work on multi-monitor systems [Robert]
|
||||
- Handle screen resolution changes [Arjohn Kampman, Tor Lillqvist]
|
||||
- Add IME input method [Takuro Ashie, Kazuki IWAMOTO]
|
||||
- Add ms-windows (Wimp) theme engine [Raymond Penners, Dom Lachowicz,
|
||||
Havoc Pennington]
|
||||
- Fix loading of input modules on Win32 [Kazuki IWAMOTO]
|
||||
- Build fixes [Tor Lillqvist, Robert]
|
||||
* Other bug fixes [Hans Petter Jonsson, Tim Janik, Manish Singh,
|
||||
Soeren Sandmann, Bill Haneman, Padraig O'Briain, Olexi Avramchenko,
|
||||
Jonathan, Frederic Croszat, Matthias, Christian Persch, Felipe Heidrich,
|
||||
Lorenzo Gil Sanchez, Richard Hoelscher, Owen, Olivier Andrieu,
|
||||
Morten Welinder, Jean Bréfort, Alexander Larsson]
|
||||
* Documentation improvements [Matthias, Jonathan]
|
||||
* New and updated translations (ang,ar,en_CA,es,ne,pt_BR,ro,ru,uk)
|
||||
* Other bug fixes [Tim Janik, Bill Haneman, Padraig O'Briain,
|
||||
Frederic Croszat, Matthias, Felipe Heidrich, Lorenzo Gil
|
||||
Sanchez, Olivier Andrieu, Jean Bréfort, Christian Persch,
|
||||
Edd Dumbhill, Marco Pesenti Gritti]
|
||||
* Updated translations (ang,bn,cs,cy,de,en_CA,hu,ne,nn,ro,tr,uk)
|
||||
|
||||
Overview of Changes from GTK+ 2.5.1 to GTK+ 2.5.2
|
||||
Overview of Changes from GTK+ 2.4.7 to GTK+ 2.4.8
|
||||
=================================================
|
||||
* GtkFileChooserButton
|
||||
- New widget to go along with GtkFontButton and GtkColorButton
|
||||
for use in preference dialogs. [James M. Cape]
|
||||
* GtkFileChooser
|
||||
- Add getter and setter for the ::show-hidden property [Jeff Franks]
|
||||
- Allow paths to be entered as part of the filename. [Federico Mena Quintero]
|
||||
- Make separator in bookmarks pane unselectable [Matthias Clasen]
|
||||
- Improve activation on focus [Federico]
|
||||
- Avoid warnings when opened on non-default screens [Abel Daniel]
|
||||
- Fix some memory leaks [Federico]
|
||||
- Fix some memory leaks [Federico Mena Quintero]
|
||||
- Make save mode work with old versions of the
|
||||
gnome-vfs backend. [Zack Cerza]
|
||||
* GtkEntryCompletion
|
||||
- Warn if text column has wrong type [Fernando San Martin Woerner,
|
||||
Gustavo Carneiro]
|
||||
* GtkTextView
|
||||
- Obey the Pango backspace_deletes_character
|
||||
attribute [Noah Levitt, Teppitak Karoonboonyanan]
|
||||
* GtkTreeView
|
||||
- Add hover-expand mode [Matthias]
|
||||
- Fix fixed height mode [Michael Vogt, Tim-Philipp Müller, Pawel Salek]
|
||||
- Reimplement GtkListStore on top of a splay tree [Soeren Sandmann]
|
||||
* GtkEntry
|
||||
- Track the selection more accurately when dragging and
|
||||
selecting [Soeren]
|
||||
* GtkComboBox
|
||||
- Support trees in combo boxes [Matt Walton, Matthias]
|
||||
- Optimize non-spanning gridded layouts [Lorenzo Gil Sanchez, Matthias]
|
||||
- Handle sensitivity changes properly [Matthias]
|
||||
- Add a ::focus-on-click property [Matthias]
|
||||
* GtkIconView
|
||||
- Fix BROWSE selection mode [Matthias]
|
||||
- Make accessible [Padraig O'Briain]
|
||||
* GtkAboutDialog
|
||||
- Change the API to be more binding-friendly [Oliver Andrieu]
|
||||
* GtkUIManager
|
||||
- Accept paths with leading '/' everywhere. [David Malcolm]
|
||||
- Make GtkActionEntry* arguments const [Mariano Suarez-Alvarez]
|
||||
- Add a way to suppress overflow menu items [Christian Persch]
|
||||
* GtkPlug/GtkSocket
|
||||
- Use the sync counter mechanism to speed up resizes [Soeren]
|
||||
- Fix a redraw problem in fixed height mode [Pawel Salek]
|
||||
* GDK
|
||||
- Support XDND v5 [Owen Taylor, Matthias]
|
||||
- Complete the _NEW_WM_USER_TIME implementation [Elijah Newren]
|
||||
- Update the _NET_ACTIVE_WINDOW implementation [Elijah]
|
||||
* gdk-pixbuf
|
||||
- Avoid infinite loops for bad BMPs [Chris Evans, Manish Singh]
|
||||
- Fix a problem with GDK_INTERP_NEAREST scaling which caused
|
||||
Nautilus thumbnails to be misdrawn [Christoph Fergeau]
|
||||
- Avoid segfaults in gdk-pixbuf-csource [Matthias]
|
||||
- Fix progressive loading of 8bit pcx files [Magnus Bergman]
|
||||
- Handle edge pixels consistently [Brian Cameron, Matthias]
|
||||
- Handle OS/2 BMPs [Jon-Kare Hellan]
|
||||
* Performance
|
||||
- Get rid of many PLT entries for internally used exported symbols,
|
||||
and clean up the ABI at the same time and make make check check the
|
||||
list of exported symbols. [Arjan van de Ven, Matthias]
|
||||
* Look up icon themes in the directories specified in the
|
||||
icon theme spec [Matthias]
|
||||
* Win32 bug fixes [Robert Ögren, Hans Breuer, Tor Lillqvist, Tim Evans]
|
||||
* Other bug fixes [Matthias, Soeren, Pawel, David, Tor, Gustavo,
|
||||
Olivier, Manish, Robert, Christian Biere, Markku Vire, Markus Lausser,
|
||||
Thomas Leonard, Morten Welinder, Torsten Schoenfeld, Tim Janik,
|
||||
Tomislav Jonjic, Tommi Komulainen, Philip Langdale, Rich Wareham,
|
||||
Christian Persch, Vincent Noel, Christophe Fergeau]
|
||||
* Documentation improvements [Matthias, Mariano, Axel Simon,
|
||||
Jonathan Blandford]
|
||||
* New and updated translations (ang,br,bs,eu,lt,wa,zh_CN)
|
||||
- Avoid segfaults in gdk-pixbuf-csource [Matthias Clasen]
|
||||
* Win32 bug fixes [Tim Evans, Tor Lillqvist]
|
||||
* Other bug fixes [Gustavo, Torsten Schoenfeld, Manish, Tomislav Jonjic,
|
||||
Soeren Sandmann, Tommi Komulainen, Philip Langdale, Jon-Kare Hellan]
|
||||
* Documentation improvements [Matthias]
|
||||
* Updated translations (bs,da,fi,sq)
|
||||
|
||||
Overview of Changes from GTK+ 2.5.0 to GTK+ 2.5.1
|
||||
Overview of Changes from GTK+ 2.4.6 to GTK+ 2.4.7
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Fix for Open button not actually opening [Tommi Komulainen]
|
||||
- Fix crash when g_get_home_dir() returns NULL [Tor Lillqvist]
|
||||
|
||||
Overview of Changes from GTK+ 2.4.4 to GTK+ 2.4.6
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Set busy cursor while mounting [Federico Mena Quintero]
|
||||
- Set accessible name [Padraig O'Briain]
|
||||
- Improve activation on focus [Federico]
|
||||
- Accept paths in entry [Federico]
|
||||
* GtkTreeView
|
||||
- Support ellipsisation in GtkCellRendererText [Vincent Untz,
|
||||
Jonathan Blandford, Anders Carlsson]
|
||||
- Add a GtkCellRenderer::editing-started signal [Matthias Clasen]
|
||||
- Typeahead support [Jonathan]
|
||||
- Align the entry in GtkCellRendererText [Matthias]
|
||||
- Make DND work again [Ernst Persson, Matthias]
|
||||
- Improve appearance of search popup [Matthias]
|
||||
* GtkFileChooser
|
||||
- Activate the last focused widget [Federico Mena Quintero]
|
||||
- Add an "Add to shortcuts" item to the context menu [Federico]
|
||||
* GtkCombobox
|
||||
- Support scrolling in list mode [Matthias]
|
||||
- Add necessary API to make GtkComboBox accessible [Padraig O'Briain]
|
||||
- Change the API for separators to use a callback function
|
||||
instead of a boolean model column [Matthias]
|
||||
* GtkNotebook
|
||||
- Ignore scroll events from page content [Gabriel de Perthuis]
|
||||
* GtkAboutDialog
|
||||
- Visual improvements [Anders]
|
||||
* GtkIconView
|
||||
- Use XRender to draw selection rectangle [Anders]
|
||||
* GtkLabel
|
||||
- Support ellipsisation [Tim Van Wassenhove, James M. Cape]
|
||||
* Expose the menubar accel key as an XSetting [Scott James Remnant]
|
||||
* Add example code for clipboard handling to gtk-demo [Anders]
|
||||
* Bug fixes [Peter Zelesny, Guilherme Salgado, John Finlay,
|
||||
Tommi Komulainen, Matthias, Crispin Flowerday, Padraig,
|
||||
Morten Welinder, Olivier Sessink, Dafydd Harries, Soeren Sandmann,
|
||||
Michael Natterer, Nicolas Deves, Matthew Garrett, Lorenzo Gil Sanchez]
|
||||
* Documentation improvements [Federico, Matthias]
|
||||
* Updated translations (gu,hi,pt_BR,ru,sv,uz)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.1 to GTK+ 2.5.0
|
||||
=================================================
|
||||
* New widgets:
|
||||
- GtkIconView [Anders Carlsson]
|
||||
- GtkAboutDialog [Matthias Clasen]
|
||||
- GtkCellView [Matthias]
|
||||
* GtkFileChooser
|
||||
- change to newly-created folders [Federico Mena Quintero]
|
||||
- always show icons [Federico]
|
||||
- bug fixes [Federico, Christian Neumair, Alex Roitman]
|
||||
* GtkComboBox, GtkComboBoxEntry
|
||||
- add missing getters and some more convience API [Matthias,
|
||||
Christian Neumeir, Oliver Andrieu]
|
||||
- improve placement and sizing of popups [Matthias]
|
||||
- support insensitive items [Matthias]
|
||||
- support separators [Matthias]
|
||||
- handle empty or unset models better [Mariano Suarez-Alvarez]
|
||||
- bug fixes [Matthias, Jonathan Blandford, Oliver Andrieu, Paul
|
||||
Pongonyshev, Christian Persch]
|
||||
* GtkEntryCompletion
|
||||
- ignore enter events when the window pops up under the
|
||||
pointer [Anders]
|
||||
- bug fixes [Matthias]
|
||||
- support inline autocompletion [Matthias]
|
||||
- Draw focus indicator for empty tree views [Federico]
|
||||
- Make column dragging more robust [Matthias Clasen,
|
||||
Christian Biere]
|
||||
- Prevent DND on non-sources [Pawel Salek]
|
||||
* GtkUIManager
|
||||
- fix signal registration [Michael Natterer]
|
||||
- make generated XML parseable [Sven Neumann]
|
||||
- fix get_widget to return menus [Matthias]
|
||||
* GtkTreeView
|
||||
- hover-selection mode [Matthias]
|
||||
- support insensitive cells [Matthias]
|
||||
- support separators [Matthias]
|
||||
- make entry context menu work in editable text cells [Owen Taylor,
|
||||
Kristian Rietveld]
|
||||
- make DND work with treeviews in modal dialogs [Federico]
|
||||
- make empty treeviews focusable [Federico]
|
||||
- new GtkCellRendererProgress [Matthias, Tommi Komulainen,
|
||||
Christian Persch]
|
||||
- new GtkCellRendererCombo [Matthias]
|
||||
- bug fixes [Matthias, Federico]
|
||||
* GtkNotebook
|
||||
- allow to change tabs with the mouse wheel [Gabriel de Perthuis]
|
||||
* GtkWindow
|
||||
- support named themed window icons [Matthias, Calum Benson]
|
||||
* New stock icons: file, directory, about, edit, connect, disconnect,
|
||||
and media player icons for forward, next, pause, play, previous,
|
||||
record, rewind and stop
|
||||
* GDK
|
||||
- support do-not-focus-on-map hint [Elijah Newren]
|
||||
- fix RGBA cursors [Michael Natterer]
|
||||
- Accept paths with a leading / [David Malcolm]
|
||||
* Gdk
|
||||
- Fix handling of keep-above and keep-below
|
||||
state [Matthew Garret]
|
||||
- Add some missing error traps [Thomas Leonard]
|
||||
* gdk-pixbuf
|
||||
- reorganize headers [Matthias, Jeff Franks, Havoc Pennington]
|
||||
- flag to mark loaded images as scalable [Dom Lachowicz]
|
||||
- license information for loaders [Matthias]
|
||||
- simple multiple-of-90° rotation support [Matthias]
|
||||
- allow to disable loaders [Matthias]
|
||||
- bug fixes [Kouichirou Hiratsuka, Sven, Brian Cameron,
|
||||
Manish Singh, Morten Welinder]
|
||||
* X11 selections
|
||||
- make incremental transfer of MULTIPLE work [Matthias]
|
||||
- don't do incremental transfer in 4k chunks [Matthias]
|
||||
- add selection ownership change notification [Matthias]
|
||||
- support text/plain targets [Matthias]
|
||||
* Win32
|
||||
- bug fixes [Hans Breuer, John Ehresman, Tor Lillqvist,
|
||||
Robert Ögren, Benoît Carpentier, J. Ali Harlow, Laurent Sansonetti]
|
||||
* Performance improvements
|
||||
- predict exposes for override-redirect windows [Søren Sandmann]
|
||||
- unset the background when mapping or unmapping windows [Søren]
|
||||
- support the update counter spec for smoother resizing [Søren]
|
||||
* Misc bug fixes [Matthias, Owen, Søren, Anders, Padraig O'Briain,
|
||||
Crispin Flowerday, Michal Pasternak, Scott Tsai, Morten,
|
||||
Michael Natterer, Dmd Ljungmark, Sven, Billy Biggs,
|
||||
Mark McLoughlin, Sam Stephenson, John Finlay, David Hawthorne,
|
||||
Kent Sandvik, Davyd Madeley, Alexander Winston, Jean-François Wauthy,
|
||||
Jeff Franks, Philip Kendall, Baris Cicek Yevgen Muntyan,
|
||||
Bastien Nocera, Tim Janik, John Ehresman, Theppitak Karoonboonyanan,
|
||||
Nickolay V. Shmyrev, William Jon McCann, Paolo Maggi, Lorenzo Gil
|
||||
Sanchez, Jan-Marek Glogowski, Pawel Salek, Felipe Heidrich, Dmitry
|
||||
M. Shatrov, Alex Larsson, Michael Hallendal, Scott Bronson, Kjartan
|
||||
Maraas, Damien Carbery, Elke Meier]
|
||||
* Doc improvements [Matthias, Federico, Owen, Steve Chaplin, Tommi
|
||||
Komulainen, Bastien Nocera, Billy Biggs, Sampo Nurmentaus, Steffen
|
||||
Röcker, Doug Quale, Oliver Andrieu]
|
||||
* Updated translations (bg,lt,ne,tk,wa,en_GB)
|
||||
- Make incremental loading work for 8bit pcx
|
||||
files [Magnus Bergman]
|
||||
- Handle edge pixels consistently [Brian Cameron,
|
||||
Matthias]
|
||||
- Handle OS/2 BMPs [Jon-Kare Hellan]
|
||||
* Bug fixes for Copy-Paste behaviour in text widgets
|
||||
[Mikael Hallendal, Scott Bronson]
|
||||
* Memory leak fixes in multiple widgets [Kjartan Maraas,
|
||||
Tommi Komulainen, Crispin Flowerday, Matthias]
|
||||
* Win32 fixes [Robert Ögren, Tor Lillqvist, Hans Breuer
|
||||
* Other bug fixes [John Cupitt, Elke Meier, Matthias,
|
||||
Peter Zelezny, Guilherme Salgado, John Finlay, Tommi,
|
||||
Padaig, Olivier Sessink, Nicolas Deves, Lorenzo Gil
|
||||
Sanchez, Christian Persch, Morten Welinder, Markku Vire,
|
||||
Markus Lausser, Abel Daniel]
|
||||
* Documentation improvements [Owen Taylor, Matthias, Axel
|
||||
Simon, David, Federico, Mariano Suarez-Alvarez]
|
||||
* Updated translations (ang,az,bg,br,ca,cs,en_CA,es,fi,fr,hi,hu,
|
||||
it,ja,ko,mn,nb,nl,no,pl,pt,pt_BR,ru,sq,sr,sr@Latn,sr@ije,sv,uz,
|
||||
wa,zh_CN)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.3 to GTK+ 2.4.4
|
||||
=================================================
|
||||
* GtkFileChooser
|
||||
- Use Save button in save mode. [Federico Mena Quintero]
|
||||
- Check for errors when opening folders [Federico]
|
||||
- Fall back to stock icons if icon theme is not found [Federico]
|
||||
- Bug fixes [Federico, Alex Roitman, Owen Taylor]
|
||||
* GtkComboBox
|
||||
- Make it work without a model [Mariano Suarez-Alvarez, Christian Persch]
|
||||
- Improve placement of popup [David A. Knight]
|
||||
* GtkImage
|
||||
- Fix issues with partial redrawing [John Ehresman, Felipe Heidrich,
|
||||
Billy Biggs]
|
||||
* GtkEntry
|
||||
- Fix cursor movement with combining marks [Theppitak Karoonboonyanan]
|
||||
- Protect passwords better [Morten Welinder]
|
||||
* Win32 fixes
|
||||
- Fix build without wintab [J. Ali Harlow]
|
||||
- Improve Clipboard handling [Tor Lillqvist, John Ehresman]
|
||||
* Gdk
|
||||
- Make RGBA cursors work [Michael Natterer]
|
||||
- Work with odd XServers [Bastien Nocera]
|
||||
- Handle _NET_WM_STATE_ABOVE/_BELOW better [Billy Biggs]
|
||||
- Don't leak DND contexts [Alex Larsson]
|
||||
* gdk-pixbuf
|
||||
- Make tiff loader work with libtiff 3.6.1 [Marco Ghirlanda]
|
||||
- Fix math for GDK_INTERP_HYPER [Brian Cameron]
|
||||
- Fix Win32 exported symbols [Tor Lillqvist]
|
||||
* Documentation improvements [Billy Biggs, Matthias Clasen,
|
||||
Oliver Andrieu]
|
||||
* Other bug fixes [Federico, Michael, Matthias, Philip Kendall,
|
||||
Jean-François Wauthy, John Finlay, Jeff Franks, Tim Janik,
|
||||
Nickolay V. Shmyrev, Sampo Nurmentaus, William Jon McCann,
|
||||
Jan-Marek Glogowski, Yevgen Muntyan, Pawel Salek,
|
||||
Jonathan Blandford, Sunil, Dimitiry. M Shatrov]
|
||||
* Updated translations (bg,he,hu,ne,sq)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.2 to GTK+ 2.4.3
|
||||
=================================================
|
||||
* GtkButton
|
||||
- Give extra space to children of !CAN_FOCUS buttons [Matthias Clasen]
|
||||
* GtkFileChooser
|
||||
- Make DND work when the dialog is modal [Federico Mena Quintero]
|
||||
* GtkToolbar
|
||||
- Don't show empty overflow menu [Soeren Sandmann]
|
||||
- Don't show initial separator in overflow menu [Soeren]
|
||||
- Handle dynamic changes to overflow menu [Soeren]
|
||||
* Documentation improvements [Bastien Nocera, Matthias]
|
||||
* Other bug fixes [Matthias, Soeren, Sven Neumann]
|
||||
* Updated translations (hu,ne)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.1 to GTK+ 2.4.2
|
||||
=================================================
|
||||
* GtkUIManager
|
||||
- Install signals correctly [Michael Natterer]
|
||||
- Make the output of gtk_ui_manager_get_ui() parsable. [Michael]
|
||||
- Add a way to suppress stock accelerators. [David A Knight]
|
||||
* GtkClipboard
|
||||
- Fix INCRemental transfer of MULTIPLE targets [Matthias Clasen]
|
||||
- Increase the chunk size for INCRemental transfers [Matthias]
|
||||
* GtkFileChooser
|
||||
- Hide the combo box when appropriate [Christian Neumair]
|
||||
- bug fixes [Federico Mena Quintero]
|
||||
* GtkComboBox
|
||||
- add mouse/wheel bindings on the cellview [Matthias]
|
||||
- improve positioning of popup [Matthias]
|
||||
- make the selection follow the mouse [Matthias]
|
||||
* GtkEntryCompletion
|
||||
- make the selection follow the mouse [Matthias]
|
||||
- restrict popup size to monitor size [Matthias, DmD Ljungmark]
|
||||
- don't complete on paste [Anders Carlsson]
|
||||
* Win32
|
||||
- bug fixes [Benoît Carpentier, Hans Breuer, John Ehresman,
|
||||
Tor Lillqvist, Robert Ögren]
|
||||
* GtkButton/GtkArrow
|
||||
- Don't draw the focus over the button child [Matthias]
|
||||
- Increase default arrow size to compensate [Matthias]
|
||||
* Documentation improvements [Doug Quale, Matthias,
|
||||
Steffen Röcker, Steve Chaplin, Tommi Komulainen]
|
||||
* Other bug fixes [Billy Biggs, Crispin Flowerday,
|
||||
David Hawthorne, Federico, Havoc Pennington, John Finlay,
|
||||
Kouichirou Hiratsuka, Mark McLoughlin, Matthias, Michael,
|
||||
Michal Pasternak, Morten Welinder, Olivier Andrieu,
|
||||
Owen Taylor, Padraig O'Briain, Sam Stevenson, Scott Tsai,
|
||||
Soeren Sandmann, Sven Neumann]
|
||||
* Updated translations (bg,it,nl,tk,wa,zh_CN)
|
||||
|
||||
Overview of Changes from GTK+ 2.4.0 to GTK+ 2.4.1
|
||||
=================================================
|
||||
|
||||
123
README
123
README
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.7.2. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.4.11. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
@@ -28,86 +28,81 @@ See the file 'INSTALL'
|
||||
Release notes
|
||||
=============
|
||||
|
||||
* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
|
||||
a clipboard manager following the specification at
|
||||
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
|
||||
must be running. A sample implementation of such a clipboard manager
|
||||
is available at
|
||||
http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
|
||||
Applications can use the function gdk_display_supports_clipboard_persistence()
|
||||
to find out if clipboard persistence is available.
|
||||
|
||||
* Notification on clipboard ownership changes via GdkOwnerChange events
|
||||
requires the XFIXES X extension. Applications can use the function
|
||||
gdk_display_supports_selection_notification() to find out if ownerchip
|
||||
change notification is available.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
|
||||
specification. Setting the XDG_DATA_DIRS environtment variable may be
|
||||
necessary if your icons aren't installed in the default location
|
||||
/usr/share/icons.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
|
||||
to avoid a lot of disk searching overhead. GTK+ includes a utility named
|
||||
gtk-update-icon-cache to generate these cache files. For further details,
|
||||
see the gtk-update-icon-cache man page or the GTK+ documentation.
|
||||
|
||||
* To reduce code size and improve efficiency, GTK+, when compiled
|
||||
with the GNU toolchain, has separate internal and external entry
|
||||
points for exported functions. The internal names, which begin with
|
||||
IA__, may be seen when debugging a GTK+ program.
|
||||
|
||||
* The following functions have been deprecated in GTK+ 2.6:
|
||||
gdk_pango_context_set_colormap
|
||||
gtk_cell_renderer_editing_canceled
|
||||
|
||||
* The new GtkFileChooser widget emphasizes simplicity and thus does
|
||||
not provide a navigation entry by default when opening files.
|
||||
Experienced command line users will likely want to make heavy use of
|
||||
the location dialog brought up by the Control-L key shortcut.
|
||||
|
||||
* As compared to GTK+-1.2, the default configuration of GTK+-2 has been
|
||||
stream-lined to reduce confusion on the part of new users or users
|
||||
coming from other environments. Users used to older versions of
|
||||
GTK+ may want to make some adjustments to the default configuration.
|
||||
|
||||
- Emacs keybindings such as Control-A and Control-E to move to the
|
||||
ends of lines are not enabled by default in the editing widgets. To
|
||||
turn on Emacs keybindings, add the line:
|
||||
|
||||
gtk-key-theme-name = "Emacs"
|
||||
|
||||
To your ~/.gtkrc-2.0
|
||||
|
||||
- Editing of menu accelerators by pressing an accelerator over the
|
||||
menu item is disabled by default. To enable, it, add:
|
||||
|
||||
gtk-can-change-accels = 1
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
- To improve useability for keyboard operation, GTK+ now selects the
|
||||
contents of an entry when tabbing into it or when it is focused on
|
||||
initial window map. To disable this behavior, add:
|
||||
|
||||
gtk-entry-select-on-focus = 0
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. On some platforms, symbols beginning
|
||||
with prefixes such as _gtk, _gdk, and _pango will be exported
|
||||
from the library, on others not. In no case can applications
|
||||
use these private symbols. In addition to that, GTK+ 2.6 makes several
|
||||
symbols private which were not in any installed header files and
|
||||
were never intended to be exported.
|
||||
use these private symbols.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory
|
||||
and the framebuffer GDK backend included in the gdk/linux-fb directory
|
||||
of GTK+ are provided on an as-is basis and have not been tested at all.
|
||||
No guarantees about the degree of workingness or about future
|
||||
* GTK+-2.4 now requires version 2 of Xft; old fashioned core X
|
||||
fonts are no longer supported.
|
||||
|
||||
* There is a bug in the Xft library in XFree86-4.1 and possibly previous
|
||||
versions that causes random crashes when using the Pango Xft
|
||||
backend. If you want to use Xft fonts, you should upgrade to
|
||||
at least XFree86-4.2.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory of GTK+
|
||||
is provided on a as-is basis and has not been tested at all. No
|
||||
guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
|
||||
the filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
* While efforts have been made to make gdk-pixbuf robust against
|
||||
invalid images, using gdk-pixbuf to load untrusted data
|
||||
is not recommended, due to the likelyhood that there are
|
||||
additional problems where an invalid image could cause
|
||||
gdk-pixbuf to crash or worse.
|
||||
|
||||
* The assumption of GLib and GTK+ by default is that filenames on the
|
||||
filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
the GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then you
|
||||
may want to set the G_FILENAME_ENCODING environment variable:
|
||||
If you have filenames encoded in the encoding of your locale, then
|
||||
you may want to set the G_FILENAME_ENCODING environment variable:
|
||||
|
||||
G_FILENAME_ENCODING=@locale
|
||||
G_FILENAME_ENCODING=@local
|
||||
export G_FILENAME_ENCODING
|
||||
|
||||
(Earlier versions of GLib 2.x required a different environment variable
|
||||
(Earlier versions of GLib-2.x required a different environment variable
|
||||
setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
|
||||
is still supported, but G_FILENAME_ENCODING is preferred.)
|
||||
Best integration of GTK+ 2.6 with the environment is achieved by
|
||||
Best integration of GTK+-2.4 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
On Windows, filenames passed to GTK+ should always be in UTF-8, as
|
||||
in GLib 2.6. This is different than in previous versions of GTK+
|
||||
where the system codepage was used. As in GLib, for DLL ABI
|
||||
stability, applications built against previous versions of GTK+ will
|
||||
use entry points providing the old semantics.
|
||||
|
||||
When compiling against GTK+ 2.6, applications intended to be
|
||||
portable to Windows must take the UTF-8 file name encoding into
|
||||
consideration, and use the gstdio wrappers to access files whose
|
||||
names have been constructed from strings returned from GTK+ or GLib.
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
@@ -127,10 +122,10 @@ In the bug report please include:
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the tests or demos built with GTK+,
|
||||
such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior. As a
|
||||
last resort, you can also provide a pointer to a larger piece of software
|
||||
If you can reproduce it with the testgtk program that is built in the
|
||||
gtk/ subdirectory, that will be most convenient. Otherwise, please
|
||||
include a short test program that exhibits the behavior. As a last
|
||||
resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
@@ -152,7 +147,7 @@ Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
keyword fields. If the patch adds to or changes the GTK programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
|
||||
@@ -18,10 +18,10 @@ to ask people commiting to GTK+ to follow a few rules:
|
||||
gtk-devel-list-request@gnome.org.) This is a good place to ask
|
||||
about intended changes.
|
||||
|
||||
#gtk+ on GIMPNet (irc.gimp.org, irc.us.gimp.org, irc.eu.gimp.org, ...)
|
||||
is also a good place to find GTK+ developers to discuss changes with,
|
||||
however, email to gtk-devel-list is the most certain and preferred
|
||||
method.
|
||||
#gimp on byxnet (irc.gimp.org, irc2.gimp.org, irc3.gimp.org,
|
||||
irc.germany.gimp.org...)s also a good place to find GTK+ developers to
|
||||
discuss changes with, however, email to gtk-devel-list is the most
|
||||
certain and preferred method.
|
||||
|
||||
1) Ask _first_.
|
||||
|
||||
|
||||
121
README.in
121
README.in
@@ -28,86 +28,81 @@ See the file 'INSTALL'
|
||||
Release notes
|
||||
=============
|
||||
|
||||
* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
|
||||
a clipboard manager following the specification at
|
||||
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
|
||||
must be running. A sample implementation of such a clipboard manager
|
||||
is available at
|
||||
http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
|
||||
Applications can use the function gdk_display_supports_clipboard_persistence()
|
||||
to find out if clipboard persistence is available.
|
||||
|
||||
* Notification on clipboard ownership changes via GdkOwnerChange events
|
||||
requires the XFIXES X extension. Applications can use the function
|
||||
gdk_display_supports_selection_notification() to find out if ownerchip
|
||||
change notification is available.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
|
||||
specification. Setting the XDG_DATA_DIRS environtment variable may be
|
||||
necessary if your icons aren't installed in the default location
|
||||
/usr/share/icons.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
|
||||
to avoid a lot of disk searching overhead. GTK+ includes a utility named
|
||||
gtk-update-icon-cache to generate these cache files. For further details,
|
||||
see the gtk-update-icon-cache man page or the GTK+ documentation.
|
||||
|
||||
* To reduce code size and improve efficiency, GTK+, when compiled
|
||||
with the GNU toolchain, has separate internal and external entry
|
||||
points for exported functions. The internal names, which begin with
|
||||
IA__, may be seen when debugging a GTK+ program.
|
||||
|
||||
* The following functions have been deprecated in GTK+ 2.6:
|
||||
gdk_pango_context_set_colormap
|
||||
gtk_cell_renderer_editing_canceled
|
||||
|
||||
* The new GtkFileChooser widget emphasizes simplicity and thus does
|
||||
not provide a navigation entry by default when opening files.
|
||||
Experienced command line users will likely want to make heavy use of
|
||||
the location dialog brought up by the Control-L key shortcut.
|
||||
|
||||
* As compared to GTK+-1.2, the default configuration of GTK+-2 has been
|
||||
stream-lined to reduce confusion on the part of new users or users
|
||||
coming from other environments. Users used to older versions of
|
||||
GTK+ may want to make some adjustments to the default configuration.
|
||||
|
||||
- Emacs keybindings such as Control-A and Control-E to move to the
|
||||
ends of lines are not enabled by default in the editing widgets. To
|
||||
turn on Emacs keybindings, add the line:
|
||||
|
||||
gtk-key-theme-name = "Emacs"
|
||||
|
||||
To your ~/.gtkrc-2.0
|
||||
|
||||
- Editing of menu accelerators by pressing an accelerator over the
|
||||
menu item is disabled by default. To enable, it, add:
|
||||
|
||||
gtk-can-change-accels = 1
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
- To improve useability for keyboard operation, GTK+ now selects the
|
||||
contents of an entry when tabbing into it or when it is focused on
|
||||
initial window map. To disable this behavior, add:
|
||||
|
||||
gtk-entry-select-on-focus = 0
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. On some platforms, symbols beginning
|
||||
with prefixes such as _gtk, _gdk, and _pango will be exported
|
||||
from the library, on others not. In no case can applications
|
||||
use these private symbols. In addition to that, GTK+ 2.6 makes several
|
||||
symbols private which were not in any installed header files and
|
||||
were never intended to be exported.
|
||||
use these private symbols.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory
|
||||
and the framebuffer GDK backend included in the gdk/linux-fb directory
|
||||
of GTK+ are provided on an as-is basis and have not been tested at all.
|
||||
No guarantees about the degree of workingness or about future
|
||||
* GTK+-2.4 now requires version 2 of Xft; old fashioned core X
|
||||
fonts are no longer supported.
|
||||
|
||||
* There is a bug in the Xft library in XFree86-4.1 and possibly previous
|
||||
versions that causes random crashes when using the Pango Xft
|
||||
backend. If you want to use Xft fonts, you should upgrade to
|
||||
at least XFree86-4.2.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory of GTK+
|
||||
is provided on a as-is basis and has not been tested at all. No
|
||||
guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
|
||||
the filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
* While efforts have been made to make gdk-pixbuf robust against
|
||||
invalid images, using gdk-pixbuf to load untrusted data
|
||||
is not recommended, due to the likelyhood that there are
|
||||
additional problems where an invalid image could cause
|
||||
gdk-pixbuf to crash or worse.
|
||||
|
||||
* The assumption of GLib and GTK+ by default is that filenames on the
|
||||
filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
the GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then you
|
||||
may want to set the G_FILENAME_ENCODING environment variable:
|
||||
If you have filenames encoded in the encoding of your locale, then
|
||||
you may want to set the G_FILENAME_ENCODING environment variable:
|
||||
|
||||
G_FILENAME_ENCODING=@locale
|
||||
G_FILENAME_ENCODING=@local
|
||||
export G_FILENAME_ENCODING
|
||||
|
||||
(Earlier versions of GLib 2.x required a different environment variable
|
||||
(Earlier versions of GLib-2.x required a different environment variable
|
||||
setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
|
||||
is still supported, but G_FILENAME_ENCODING is preferred.)
|
||||
Best integration of GTK+ 2.6 with the environment is achieved by
|
||||
Best integration of GTK+-2.4 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
On Windows, filenames passed to GTK+ should always be in UTF-8, as
|
||||
in GLib 2.6. This is different than in previous versions of GTK+
|
||||
where the system codepage was used. As in GLib, for DLL ABI
|
||||
stability, applications built against previous versions of GTK+ will
|
||||
use entry points providing the old semantics.
|
||||
|
||||
When compiling against GTK+ 2.6, applications intended to be
|
||||
portable to Windows must take the UTF-8 file name encoding into
|
||||
consideration, and use the gstdio wrappers to access files whose
|
||||
names have been constructed from strings returned from GTK+ or GLib.
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
@@ -127,10 +122,10 @@ In the bug report please include:
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the tests or demos built with GTK+,
|
||||
such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior. As a
|
||||
last resort, you can also provide a pointer to a larger piece of software
|
||||
If you can reproduce it with the testgtk program that is built in the
|
||||
gtk/ subdirectory, that will be most convenient. Otherwise, please
|
||||
include a short test program that exhibits the behavior. As a last
|
||||
resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
@@ -152,7 +147,7 @@ Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
keyword fields. If the patch adds to or changes the GTK programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
|
||||
@@ -86,7 +86,7 @@ Manager for non-EastAsia locales that can be used on Win9x/NT4), you
|
||||
need the dimm.h header file. That is somewhat difficult to find, but
|
||||
http://msdn.microsoft.com/downloads/samples/internet/wizard/ seems to
|
||||
be a good place to look nowadays. If you use "autoconfiscated" build,
|
||||
pass the --with-ie55 flag to configure specifying the location of the
|
||||
pass the --with-ie55 flag to configure specifyin the location of the
|
||||
ie55_lib directory created by downloading the IE5.5 headers and libs
|
||||
from the above URL.
|
||||
|
||||
|
||||
@@ -91,8 +91,6 @@ if test -z "$ACLOCAL_FLAGS"; then
|
||||
done
|
||||
fi
|
||||
|
||||
rm -rf autom4te.cache
|
||||
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
|
||||
190
configure.in
190
configure.in
@@ -11,33 +11,31 @@ AC_PREREQ(2.54)
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [7])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_minor_version], [4])
|
||||
m4_define([gtk_micro_version], [11])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_interface_age], [11])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
m4_define([gtk_api_version], [2.0])
|
||||
|
||||
# Define a string for the earliest version that this release has
|
||||
# backwards binary compatibility with for all interfaces a module
|
||||
# might. Unless we add module-only API with lower stability
|
||||
# guarantees, this should be unchanged until we break binary compat
|
||||
# for GTK+.
|
||||
# forward/backwards binary compatibility with. This is used for module
|
||||
# locations. (Should this be backwards-compat instead?)
|
||||
#
|
||||
#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
|
||||
m4_define([gtk_binary_version], [2.4.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.7.1])
|
||||
m4_define([pango_required_version], [1.9.0])
|
||||
m4_define([glib_required_version], [2.4.0])
|
||||
m4_define([pango_required_version], [1.4.0])
|
||||
m4_define([atk_required_version], [1.0.1])
|
||||
|
||||
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk+],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
@@ -50,7 +48,6 @@ AM_CONFIG_HEADER(config.h)
|
||||
|
||||
#
|
||||
# For each of the libraries we build, we define the following
|
||||
|
||||
# substituted variables:
|
||||
#
|
||||
# foo_PACKAGES: pkg-config packages this library requires
|
||||
@@ -125,11 +122,6 @@ case "$host" in
|
||||
esac
|
||||
AC_MSG_RESULT([$os_win32])
|
||||
|
||||
case $host in
|
||||
*-*-linux*)
|
||||
os_linux=yes
|
||||
;;
|
||||
esac
|
||||
dnl Initialize libtool
|
||||
AC_PROG_CC
|
||||
AM_DISABLE_STATIC
|
||||
@@ -145,14 +137,12 @@ if test "$os_win32" = "yes"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
# Make sure we use 64-bit versions of various file stuff.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AM_PROG_AS
|
||||
AC_PATH_PROG(NM, nm, nm)
|
||||
|
||||
dnl Initialize maintainer mode
|
||||
AM_MAINTAINER_MODE
|
||||
@@ -171,7 +161,6 @@ AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
|
||||
|
||||
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
|
||||
AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
|
||||
AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
|
||||
|
||||
if test "$os_win32" = "yes"; then
|
||||
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
|
||||
@@ -190,6 +179,10 @@ AC_ARG_ENABLE(shm,
|
||||
[AC_HELP_STRING([--enable-shm],
|
||||
[support shared memory if available [default=yes]])],,
|
||||
[enable_shm="yes"])
|
||||
AC_ARG_ENABLE(ansi,
|
||||
[AC_HELP_STRING([--enable-ansi],
|
||||
[turn on strict ansi [default=no]])],,
|
||||
[enable_ansi=no])
|
||||
AC_ARG_ENABLE(xkb,
|
||||
[AC_HELP_STRING([--enable-xkb],
|
||||
[support XKB [default=maybe]])],,
|
||||
@@ -198,10 +191,6 @@ AC_ARG_ENABLE(rebuilds,
|
||||
[AC_HELP_STRING([--disable-rebuilds],
|
||||
[disable all source autogeneration rules])],,
|
||||
[enable_rebuilds=yes])
|
||||
AC_ARG_ENABLE(visibility,
|
||||
[AC_HELP_STRING([--disable-visibility],
|
||||
[don't use ELF visibility attributes])],,
|
||||
[enable_visibility=yes])
|
||||
|
||||
AC_ARG_WITH(xinput,
|
||||
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
|
||||
@@ -213,13 +202,15 @@ AC_ARG_WITH(ie55,
|
||||
[AC_HELP_STRING([--with-ie55=DIRECTORY],
|
||||
[IE5.5 libs and headers (for Active IMM)])])
|
||||
|
||||
GLIB_AC_DIVERT_BEFORE_HELP([
|
||||
if test "$platform_win32" = yes; then
|
||||
gdktarget=win32
|
||||
else
|
||||
gdktarget=x11
|
||||
fi
|
||||
])
|
||||
|
||||
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select non-default GDK target],
|
||||
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select GDK target [default=$gdktarget]],
|
||||
gdktarget=$with_gdktarget)
|
||||
|
||||
AC_SUBST(gdktarget)
|
||||
@@ -255,11 +246,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$enable_visibility" = "xno"; then
|
||||
GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
|
||||
|
||||
|
||||
@@ -398,18 +384,6 @@ AC_SUBST(REBUILD)
|
||||
|
||||
AC_CHECK_FUNCS(lstat mkstemp flockfile)
|
||||
|
||||
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
|
||||
AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
|
||||
AC_TRY_LINK([#include <langinfo.h>], [
|
||||
char c;
|
||||
c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
|
||||
], gtk_ok=yes, gtk_ok=no)
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
if test "$gtk_ok" = "yes"; then
|
||||
AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
|
||||
[Define if _NL_TIME_FIRST_WEEKDAY is available])
|
||||
fi
|
||||
|
||||
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
|
||||
AC_MSG_CHECKING(for sigsetjmp)
|
||||
AC_TRY_LINK([#include <setjmp.h>], [
|
||||
@@ -427,7 +401,7 @@ fi
|
||||
# sure that both po/ and po-properties/ have .po files that correspond
|
||||
# to your language. If you only add one to po/, the build will break
|
||||
# in po-properties/.
|
||||
ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
|
||||
ALL_LINGUAS="af am ang ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sr@ije sv ta th tk tr uk uz uz@Latn vi wa yi zh_CN zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
@@ -471,20 +445,6 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# see bug 162979
|
||||
#
|
||||
AC_MSG_CHECKING(for HP-UX)
|
||||
case $host_os in
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl NeXTStep cc seems to need this
|
||||
AC_MSG_CHECKING([for extra flags for POSIX compliance])
|
||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
@@ -501,13 +461,13 @@ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
|
||||
#
|
||||
|
||||
GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
|
||||
GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
|
||||
|
||||
AM_PATH_GLIB_2_0(glib_required_version, :,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB glib_required_version or better is required. The latest version of
|
||||
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
|
||||
gobject gmodule-no-export gthread)
|
||||
gobject gmodule gthread)
|
||||
|
||||
dnl
|
||||
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
|
||||
@@ -601,7 +561,6 @@ AC_C_CONST
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_MMAP
|
||||
|
||||
AC_CHECK_FUNCS(mallinfo)
|
||||
AC_CHECK_FUNCS(getresuid)
|
||||
AC_TYPE_UID_T
|
||||
|
||||
@@ -669,14 +628,6 @@ fi
|
||||
AC_MSG_RESULT($gdk_working_wctype)
|
||||
AC_SUBST(GDK_WLIBS)
|
||||
|
||||
# Check for uxtheme.h (for MS-Windows Engine)
|
||||
AC_MSG_CHECKING(for uxtheme.h)
|
||||
AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
|
||||
if test $gtk_uxtheme_h = yes; then
|
||||
AC_DEFINE(HAVE_UXTHEME_H,1,[Have uxtheme.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gtk_uxtheme_h)
|
||||
|
||||
|
||||
##################################################
|
||||
# Checks for gdk-pixbuf
|
||||
@@ -710,7 +661,7 @@ else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING(whether dynamic modules work)
|
||||
## for loop is to strip newline
|
||||
tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
|
||||
tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0`
|
||||
for I in $tmp; do
|
||||
dynworks=$I
|
||||
done
|
||||
@@ -764,7 +715,7 @@ dnl Test for libtiff
|
||||
[AC_CHECK_HEADER(tiffio.h,
|
||||
TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
|
||||
AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
|
||||
AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
|
||||
AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
|
||||
fi
|
||||
|
||||
if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
|
||||
@@ -997,7 +948,7 @@ fi
|
||||
|
||||
AC_SUBST(REBUILD_PNGS)
|
||||
|
||||
GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0"
|
||||
GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
|
||||
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
|
||||
GDK_PIXBUF_EXTRA_CFLAGS=
|
||||
GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
|
||||
@@ -1070,7 +1021,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
AC_MSG_ERROR([Xft Pango backend found but did not find freetype libraries])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Xft Pango backend is required for x11 target])
|
||||
AC_MSG_ERROR([Pango 1.2.0 and Xft backend is required for x11 target])
|
||||
fi
|
||||
|
||||
if $PKG_CONFIG --exists xft ; then : ; else
|
||||
@@ -1099,7 +1050,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
if test $pango_omitted_x_deps = yes ; then
|
||||
# Old versions of Xft didn't necessarily include -lX11 in the output
|
||||
x_libs="`$PKG_CONFIG --libs xft` -lX11 $X_EXTRA_LIBS"
|
||||
x_libs="`pkg-config --libs xft` -lX11 $X_EXTRA_LIBS"
|
||||
fi
|
||||
|
||||
## Strip the .la files
|
||||
@@ -1150,7 +1101,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
AC_CHECK_LIB(Xext, XineramaGetInfo,
|
||||
use_solaris_xinerama=yes,
|
||||
use_solaris_xinerama=no,
|
||||
-lXext $x_libs_for_checks)
|
||||
, -lXext $x_libs_for_checks)
|
||||
if test "x$use_solaris_xinerama" = "xyes"; then
|
||||
AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xext)
|
||||
@@ -1180,26 +1131,6 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
CPPFLAGS="$gtk_save_cppflags"
|
||||
|
||||
# Check for xReply
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
|
||||
AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
|
||||
AC_TRY_COMPILE([#include <X11/Xlibint.h>],
|
||||
[xReply *rep;],
|
||||
[AC_MSG_RESULT([no])],
|
||||
[AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
|
||||
#include <X11/Xlibint.h>],
|
||||
[xReply *rep;],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
|
||||
[Define if <X11/extensions/XIproto.h> needed for xReply])],
|
||||
[AC_MSG_RESULT([unknown])
|
||||
AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
|
||||
|
||||
CPPFLAGS="$gtk_save_cppflags"
|
||||
|
||||
# Check for shaped window extension
|
||||
|
||||
AC_CHECK_LIB(Xext, XShapeCombineMask,
|
||||
@@ -1215,18 +1146,10 @@ if test "x$gdktarget" = "xx11"; then
|
||||
,
|
||||
$x_libs_for_checks)
|
||||
|
||||
# Check for XInternAtoms (X11R6 specific)
|
||||
|
||||
AC_CHECK_LIB(X11, XInternAtoms,
|
||||
AC_DEFINE([HAVE_XINTERNATOMS], 1,
|
||||
[Define to 1 if you have the `XInternAtoms' function.]),
|
||||
,
|
||||
$x_libs_for_checks)
|
||||
|
||||
# Generic X11R6 check needed for XIM support; we could
|
||||
# probably use this to replace the above, but we'll
|
||||
# leave the separate checks for XConvertCase and XInternAtoms
|
||||
# for clarity
|
||||
# leave the separate XConvertCase check for clarity
|
||||
|
||||
have_x11r6=false
|
||||
AC_CHECK_LIB(X11, XAddConnectionWatch,
|
||||
have_x11r6=true,
|
||||
@@ -1287,25 +1210,6 @@ if test "x$gdktarget" = "xx11"; then
|
||||
GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xcursor` $GDK_EXTRA_CFLAGS"
|
||||
GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xcursor` $GDK_EXTRA_LIBS"
|
||||
fi
|
||||
|
||||
# X SYNC check
|
||||
AC_CHECK_LIB(Xext, XSyncQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/sync.h,
|
||||
[GTK_ADD_LIB(x_extra_libs, Xext)
|
||||
AC_DEFINE(HAVE_XSYNC, 1, Have the SYNC extension library)],
|
||||
:, [#include <X11/Xlib.h>])], : ,
|
||||
$X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
|
||||
|
||||
# Checks for XFixes extension
|
||||
|
||||
have_xfixes=false
|
||||
PKG_CHECK_MODULES(XFIXES, xfixes, have_xfixes=true, :)
|
||||
|
||||
if $have_xfixes ; then
|
||||
AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension)
|
||||
GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xfixes` $GDK_EXTRA_CFLAGS"
|
||||
GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS"
|
||||
fi
|
||||
|
||||
# Xshm checks
|
||||
|
||||
@@ -1417,7 +1321,7 @@ fi
|
||||
#
|
||||
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
PANGO_PACKAGES="pangoxft pangocairo"
|
||||
PANGO_PACKAGES=pangoxft
|
||||
|
||||
# We no longer use pangox, but if we find it, we link to it
|
||||
# for binary compatibility.
|
||||
@@ -1425,11 +1329,11 @@ if test "x$gdktarget" = "xx11"; then
|
||||
PANGO_PACKAGES="$PANGO_PACKAGES pangox"
|
||||
fi
|
||||
elif test "x$gdktarget" = "xwin32"; then
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
PANGO_PACKAGES=pangowin32
|
||||
elif test "x$gdktarget" = "xlinux-fb"; then
|
||||
PANGO_PACKAGES="pangoft2 pangocairo"
|
||||
PANGO_PACKAGES=pangoft2
|
||||
else
|
||||
PANGO_PACKAGES="pango pangocairo"
|
||||
PANGO_PACKAGES=pango
|
||||
fi
|
||||
|
||||
# Check for Pango flags
|
||||
@@ -1442,8 +1346,10 @@ if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
|
||||
AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** Pango not found. Pango built with Cairo support is required
|
||||
*** to build GTK+. See http://www.pango.org for Pango information.
|
||||
*** Pango not found. Pango is required to build GTK+.
|
||||
*** See http://www.pango.org for Pango information.
|
||||
*** For the framebuffer target, you will need to build
|
||||
*** Pango with freetype support.
|
||||
])
|
||||
fi
|
||||
|
||||
@@ -1511,16 +1417,12 @@ else
|
||||
LIBS="$gtk_save_LIBS"
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo"
|
||||
GTK_PACKAGES=atk
|
||||
GTK_EXTRA_LIBS=
|
||||
GTK_EXTRA_CFLAGS=
|
||||
GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
|
||||
|
||||
if test x"$os_win32" = xyes; then
|
||||
GTK_EXTRA_CFLAGS="$msnative_struct"
|
||||
fi
|
||||
|
||||
AC_SUBST(GTK_PACKAGES)
|
||||
AC_SUBST(GTK_EXTRA_LIBS)
|
||||
AC_SUBST(GTK_EXTRA_CFLAGS)
|
||||
@@ -1541,9 +1443,7 @@ AC_SUBST(GTK_XIM_FLAGS)
|
||||
# the effect is undefined; what it causes on Linux is that the
|
||||
# export list from -export-symbols-regex is ignored and everything
|
||||
# is exported
|
||||
#
|
||||
# We are using gmodule-no-export now, but I'm leaving the stripping
|
||||
# code in place for now, since pango and atk still require gmodule.
|
||||
#
|
||||
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
|
||||
if test -n "$export_dynamic"; then
|
||||
GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
@@ -1557,7 +1457,7 @@ fi
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
##################################################
|
||||
|
||||
GTK_DOC_CHECK([1.4])
|
||||
GTK_DOC_CHECK([1.0])
|
||||
|
||||
AC_CHECK_PROG(DB2HTML, db2html, true, false)
|
||||
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
|
||||
@@ -1585,7 +1485,6 @@ fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
|
||||
|
||||
|
||||
##################################################
|
||||
# Output commands
|
||||
##################################################
|
||||
@@ -1686,7 +1585,6 @@ docs/reference/gdk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
docs/reference/gtk/version.xml
|
||||
docs/faq/Makefile
|
||||
docs/tools/Makefile
|
||||
docs/tutorial/Makefile
|
||||
gdk-pixbuf/Makefile
|
||||
gdk-pixbuf/gdk_pixbuf.rc
|
||||
@@ -1707,23 +1605,9 @@ gtk/theme-bits/Makefile
|
||||
gtk/xdgmime/Makefile
|
||||
modules/Makefile
|
||||
modules/input/Makefile
|
||||
modules/engines/Makefile
|
||||
modules/engines/pixbuf/Makefile
|
||||
modules/engines/ms-windows/Makefile
|
||||
modules/engines/ms-windows/Theme/Makefile
|
||||
modules/engines/ms-windows/Theme/gtk-2.0/Makefile
|
||||
contrib/Makefile
|
||||
contrib/gdk-pixbuf-xlib/Makefile
|
||||
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo "configuration:
|
||||
target: $gdktarget"
|
||||
|
||||
if test "x$gdktarget" = "xlinux-fb"; then
|
||||
echo "Warning: The linux-fb GDK target is unmaintained"
|
||||
echo " and may not work or even compile"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,54 +1,26 @@
|
||||
2005-07-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.2 ===
|
||||
2004-10-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
2005-07-01 Matthias Clasen <mclasen@redhat.com>
|
||||
* === Released 2.4.11 ===
|
||||
|
||||
* === Released 2.7.1 ===
|
||||
|
||||
2005-06-20 Matthias Clasen <mclasen@redhat.com>
|
||||
2004-09-18 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.7.0 ===
|
||||
|
||||
2005-01-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.1 ===
|
||||
|
||||
2004-12-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.6.0 ===
|
||||
|
||||
2004-12-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.6 ===
|
||||
|
||||
2004-11-12 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.5 ===
|
||||
|
||||
2004-10-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.4 ===
|
||||
|
||||
2004-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.3 ===
|
||||
* === Released 2.4.10 ===
|
||||
|
||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.2 ===
|
||||
* === Released 2.4.9 ===
|
||||
|
||||
2004-08-01 Matthias Clasen <mclasen@redhat.com>
|
||||
2004-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.5.1 ===
|
||||
* === Released 2.4.8 ===
|
||||
|
||||
Tue Jul 20 23:26:10 2004 Matthias Clasen <maclas@gmx.de>
|
||||
Sat Aug 14 19:15:08 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c: Include config.h first. (#148034)
|
||||
* === Released 2.4.7 ===
|
||||
|
||||
Sun Jul 18 20:17:41 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
Tue Jul 20 23:27:12 2004 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* === released 2.5.0 ==
|
||||
* gdk-pixbuf-xlibrgb.c: Include config.h first. (#148034)
|
||||
|
||||
Tue Mar 9 09:33:54 2004 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
|
||||
@@ -547,11 +547,7 @@ rgb565amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
bpl = image->bytes_per_line;
|
||||
|
||||
for (yy = 0; yy < height; yy++) {
|
||||
#ifdef LITTLE
|
||||
s = srow;
|
||||
#else
|
||||
s = (guint16 *) srow;
|
||||
#endif
|
||||
o = (guint32 *) orow;
|
||||
for (xx = 0; xx < width; xx ++) {
|
||||
register guint32 data;
|
||||
@@ -674,11 +670,7 @@ rgb555msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
bpl = image->bytes_per_line;
|
||||
|
||||
for (yy = 0; yy < height; yy++) {
|
||||
#ifdef LITTLE
|
||||
s = srow;
|
||||
#else
|
||||
s = (guint32 *) srow;
|
||||
#endif
|
||||
o = (guint16 *) orow;
|
||||
for (xx = 1; xx < width; xx += 2) {
|
||||
register guint32 data;
|
||||
|
||||
@@ -821,7 +821,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
|
||||
|
||||
image_info->stage_buf = NULL;
|
||||
|
||||
image_info->own_gc = NULL;
|
||||
image_info->own_gc = 0;
|
||||
|
||||
image_info->red_shift = 0;
|
||||
image_info->red_prec = 0;
|
||||
@@ -908,7 +908,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
|
||||
image_info->x_visual_info->visual,
|
||||
1,
|
||||
XYBitmap,
|
||||
0, NULL, IMAGE_WIDTH, IMAGE_HEIGHT,
|
||||
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
|
||||
8,
|
||||
0);
|
||||
static_image[i]->data = malloc(IMAGE_WIDTH * IMAGE_HEIGHT >> 3);
|
||||
@@ -920,7 +920,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
|
||||
image_info->x_visual_info->visual,
|
||||
(unsigned int)image_info->x_visual_info->depth,
|
||||
ZPixmap,
|
||||
0, NULL,
|
||||
0, 0,
|
||||
IMAGE_WIDTH,
|
||||
IMAGE_HEIGHT,
|
||||
32, 0);
|
||||
@@ -3651,7 +3651,7 @@ xlib_rgb_get_visual (void)
|
||||
if (image_info)
|
||||
return image_info->x_visual_info->visual;
|
||||
else
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3668,7 +3668,7 @@ xlib_rgb_get_visual_info (void)
|
||||
if (image_info)
|
||||
return image_info->x_visual_info;
|
||||
else
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,23 +8,18 @@ demos = \
|
||||
appwindow.c \
|
||||
button_box.c \
|
||||
changedisplay.c \
|
||||
clipboard.c \
|
||||
colorsel.c \
|
||||
combobox.c \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
entry_completion.c \
|
||||
expander.c \
|
||||
hypertext.c \
|
||||
iconview.c \
|
||||
images.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
panes.c \
|
||||
pickers.c \
|
||||
pixbufs.c \
|
||||
rotated_text.c \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
@@ -77,14 +72,12 @@ IMAGEFILES= alphatest.png \
|
||||
floppybuddy.gif \
|
||||
gnome-applets.png \
|
||||
gnome-calendar.png \
|
||||
gnome-fs-directory.png \
|
||||
gnome-fs-regular.png \
|
||||
gnome-foot.png \
|
||||
gnome-gimp.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png \
|
||||
gtk-logo-rgb.gif
|
||||
gtk-logo-rgb.gif
|
||||
|
||||
democode_DATA = $(demos) $(IMAGEFILES)
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* Application main window
|
||||
*
|
||||
* Demonstrates a typical application window with menubar, toolbar, statusbar.
|
||||
* Demonstrates a typical application window, with menubar, toolbar, statusbar.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
@@ -48,8 +49,7 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You activated radio action: \"%s\" of type \"%s\".\n"
|
||||
"Current value: %d",
|
||||
"You activated radio action: \"%s\" of type \"%s\".\nCurrent value: %d",
|
||||
name, typename, value);
|
||||
|
||||
/* Close dialog on user response */
|
||||
@@ -62,115 +62,9 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate_email (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("send mail to %s\n", link);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_url (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("show url %s\n", link);
|
||||
}
|
||||
|
||||
static void
|
||||
about_cb (GtkAction *action,
|
||||
GtkWidget *window)
|
||||
{
|
||||
GdkPixbuf *pixbuf, *transparent;
|
||||
gchar *filename;
|
||||
|
||||
const gchar *authors[] = {
|
||||
"Peter Mattis",
|
||||
"Spencer Kimball",
|
||||
"Josh MacDonald",
|
||||
"and many more...",
|
||||
NULL
|
||||
};
|
||||
|
||||
const gchar *documentors[] = {
|
||||
"Owen Taylor",
|
||||
"Tony Gale",
|
||||
"Matthias Clasen <mclasen@redhat.com>",
|
||||
"and many more...",
|
||||
NULL
|
||||
};
|
||||
|
||||
const gchar *license =
|
||||
"This library is free software; you can redistribute it and/or\n"
|
||||
"modify it under the terms of the GNU Library General Public License as\n"
|
||||
"published by the Free Software Foundation; either version 2 of the\n"
|
||||
"License, or (at your option) any later version.\n"
|
||||
"\n"
|
||||
"This library is distributed in the hope that it will be useful,\n"
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
|
||||
"Library General Public License for more details.\n"
|
||||
"\n"
|
||||
"You should have received a copy of the GNU Library General Public\n"
|
||||
"License along with the Gnome Library; see the file COPYING.LIB. If not,\n"
|
||||
"write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
|
||||
"Boston, MA 02111-1307, USA.\n";
|
||||
|
||||
pixbuf = NULL;
|
||||
transparent = NULL;
|
||||
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
|
||||
if (filename)
|
||||
{
|
||||
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
|
||||
g_free (filename);
|
||||
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
gtk_about_dialog_set_email_hook (activate_email, NULL, NULL);
|
||||
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"name", "GTK+ Code Demos",
|
||||
"version", "2.4.3",
|
||||
"copyright", "(C) 1997-2004 The GTK+ Team",
|
||||
"license", license,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ functions.",
|
||||
"authors", authors,
|
||||
"documenters", documentors,
|
||||
"logo", transparent,
|
||||
NULL);
|
||||
|
||||
g_object_unref (transparent);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkAction action;
|
||||
} ToolMenuAction;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkActionClass parent_class;
|
||||
} ToolMenuActionClass;
|
||||
|
||||
G_DEFINE_TYPE(ToolMenuAction, tool_menu_action, GTK_TYPE_ACTION);
|
||||
|
||||
static void
|
||||
tool_menu_action_class_init (ToolMenuActionClass *class)
|
||||
{
|
||||
GTK_ACTION_CLASS (class)->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
|
||||
}
|
||||
|
||||
static void
|
||||
tool_menu_action_init (ToolMenuAction *action)
|
||||
{
|
||||
}
|
||||
|
||||
static GtkActionEntry entries[] = {
|
||||
{ "FileMenu", NULL, "_File" }, /* name, stock id, label */
|
||||
{ "OpenMenu", NULL, "_Open" }, /* name, stock id, label */
|
||||
{ "PreferencesMenu", NULL, "_Preferences" }, /* name, stock id, label */
|
||||
{ "ColorMenu", NULL, "_Color" }, /* name, stock id, label */
|
||||
{ "ShapeMenu", NULL, "_Shape" }, /* name, stock id, label */
|
||||
@@ -179,9 +73,9 @@ static GtkActionEntry entries[] = {
|
||||
"_New", "<control>N", /* label, accelerator */
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "File1", NULL, /* name, stock id */
|
||||
"File1", NULL, /* label, accelerator */
|
||||
"Open first file", /* tooltip */
|
||||
{ "Open", GTK_STOCK_OPEN, /* name, stock id */
|
||||
"_Open","<control>O", /* label, accelerator */
|
||||
"Open a file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Save", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"_Save","<control>S", /* label, accelerator */
|
||||
@@ -198,7 +92,7 @@ static GtkActionEntry entries[] = {
|
||||
{ "About", NULL, /* name, stock id */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
G_CALLBACK (about_cb) },
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Logo", "demo-gtk-logo", /* name, stock id */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
"GTK+", /* tooltip */
|
||||
@@ -282,12 +176,8 @@ static const gchar *ui_info =
|
||||
" <menuitem action='About'/>"
|
||||
" </menu>"
|
||||
" </menubar>"
|
||||
" <toolbar name='ToolBar'>"
|
||||
" <toolitem action='Open'>"
|
||||
" <menu action='OpenMenu'>"
|
||||
" <menuitem action='File1'/>"
|
||||
" </menu>"
|
||||
" </toolitem>"
|
||||
" <toolbar name='ToolBar'>"
|
||||
" <toolitem action='Open'/>"
|
||||
" <toolitem action='Quit'/>"
|
||||
" <separator action='Sep1'/>"
|
||||
" <toolitem action='Logo'/>"
|
||||
@@ -372,9 +262,7 @@ update_statusbar (GtkTextBuffer *buffer,
|
||||
gint count;
|
||||
GtkTextIter iter;
|
||||
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message,
|
||||
* underflow is allowed
|
||||
*/
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message, underflow is allowed */
|
||||
|
||||
count = gtk_text_buffer_get_char_count (buffer);
|
||||
|
||||
@@ -407,15 +295,8 @@ update_resize_grip (GtkWidget *widget,
|
||||
GdkEventWindowState *event,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN))
|
||||
{
|
||||
gboolean maximized;
|
||||
|
||||
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN);
|
||||
gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
|
||||
}
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
|
||||
gtk_statusbar_set_has_resize_grip (statusbar, !(event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)));
|
||||
}
|
||||
|
||||
|
||||
@@ -431,7 +312,6 @@ do_appwindow (GtkWidget *do_widget)
|
||||
GtkWidget *bar;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkActionGroup *action_group;
|
||||
GtkAction *open_action;
|
||||
GtkUIManager *merge;
|
||||
GError *error = NULL;
|
||||
|
||||
@@ -444,7 +324,6 @@ do_appwindow (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Application Window");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (window), "gtk-open");
|
||||
|
||||
/* NULL window variable when window is closed */
|
||||
g_signal_connect (window, "destroy",
|
||||
@@ -459,16 +338,9 @@ do_appwindow (GtkWidget *do_widget)
|
||||
*/
|
||||
|
||||
action_group = gtk_action_group_new ("AppWindowActions");
|
||||
open_action = g_object_new (tool_menu_action_get_type (),
|
||||
"name", "Open",
|
||||
"label", "_Open",
|
||||
"tooltip", "Open a file",
|
||||
"stock-id", GTK_STOCK_OPEN,
|
||||
NULL);
|
||||
gtk_action_group_add_action (action_group, open_action);
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
window);
|
||||
NULL);
|
||||
gtk_action_group_add_toggle_actions (action_group,
|
||||
toggle_entries, n_toggle_entries,
|
||||
NULL);
|
||||
@@ -484,8 +356,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
NULL);
|
||||
|
||||
merge = gtk_ui_manager_new ();
|
||||
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge,
|
||||
g_object_unref);
|
||||
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge, g_object_unref);
|
||||
gtk_ui_manager_insert_action_group (merge, action_group, 0);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_ui_manager_get_accel_group (merge));
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* The Button Box widgets are used to arrange buttons with padding.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
*
|
||||
* - Using GtkDialog
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
@@ -1,321 +0,0 @@
|
||||
/* Clipboard
|
||||
*
|
||||
* GtkClipboard is used for clipboard handling. This demo shows how to
|
||||
* copy and paste text to and from the clipboard.
|
||||
*
|
||||
* It also shows how to transfer images via the clipboard or via
|
||||
* drag-and-drop, and how to make clipboard contents persist after
|
||||
* the application exits. Clipboard persistence requires a clipboard
|
||||
* manager to run.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
void
|
||||
copy_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Get the clipboard object */
|
||||
clipboard = gtk_widget_get_clipboard (entry,
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
|
||||
/* Set clipboard text */
|
||||
gtk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)), -1);
|
||||
}
|
||||
|
||||
void
|
||||
paste_received (GtkClipboard *clipboard,
|
||||
const gchar *text,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Set the entry text */
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
}
|
||||
|
||||
void
|
||||
paste_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Get the clipboard object */
|
||||
clipboard = gtk_widget_get_clipboard (entry,
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
|
||||
/* Request the contents of the clipboard, contents_received will be
|
||||
called when we do get the contents.
|
||||
*/
|
||||
gtk_clipboard_request_text (clipboard,
|
||||
paste_received, entry);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
get_image_pixbuf (GtkImage *image)
|
||||
{
|
||||
gchar *stock_id;
|
||||
GtkIconSize size;
|
||||
|
||||
switch (gtk_image_get_storage_type (image))
|
||||
{
|
||||
case GTK_IMAGE_PIXBUF:
|
||||
return g_object_ref (gtk_image_get_pixbuf (image));
|
||||
case GTK_IMAGE_STOCK:
|
||||
gtk_image_get_stock (image, &stock_id, &size);
|
||||
return gtk_widget_render_icon (GTK_WIDGET (image),
|
||||
stock_id, size, NULL);
|
||||
default:
|
||||
g_warning ("Image storage type %d not handled",
|
||||
gtk_image_get_storage_type (image));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drag_begin (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||
gtk_drag_set_icon_pixbuf (context, pixbuf, -2, -2);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
void
|
||||
drag_data_get (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||
gtk_selection_data_set_pixbuf (selection_data, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint32 time,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
if (selection_data->length > 0)
|
||||
{
|
||||
pixbuf = gtk_selection_data_get_pixbuf (selection_data);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
copy_image (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||
|
||||
gtk_clipboard_set_image (clipboard, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
paste_image (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
pixbuf = gtk_clipboard_wait_for_image (clipboard);
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_press (GtkWidget *widget,
|
||||
GdkEventButton *button,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *menu;
|
||||
GtkWidget *item;
|
||||
|
||||
if (button->button != 3)
|
||||
return FALSE;
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, NULL);
|
||||
g_signal_connect (item, "activate", G_CALLBACK (copy_image), data);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PASTE, NULL);
|
||||
g_signal_connect (item, "activate", G_CALLBACK (paste_image), data);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, button->time);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_clipboard (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *vbox, *hbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry, *button;
|
||||
GtkWidget *ebox, *image;
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_COPY);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (copy_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_PASTE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (paste_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first image */
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
ebox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (ebox), image);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), ebox);
|
||||
|
||||
/* make ebox a drag source */
|
||||
gtk_drag_source_set (ebox, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag_begin",
|
||||
G_CALLBACK (drag_begin), image);
|
||||
g_signal_connect (ebox, "drag_data_get",
|
||||
G_CALLBACK (drag_data_get), image);
|
||||
|
||||
/* accept drops on ebox */
|
||||
gtk_drag_dest_set (ebox, GTK_DEST_DEFAULT_ALL,
|
||||
NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_dest_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag_data_received",
|
||||
G_CALLBACK (drag_data_received), image);
|
||||
|
||||
/* context menu on ebox */
|
||||
g_signal_connect (ebox, "button_press_event",
|
||||
G_CALLBACK (button_press), image);
|
||||
|
||||
/* Create the second image */
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_STOP,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
ebox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (ebox), image);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), ebox);
|
||||
|
||||
/* make ebox a drag source */
|
||||
gtk_drag_source_set (ebox, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag_begin",
|
||||
G_CALLBACK (drag_begin), image);
|
||||
g_signal_connect (ebox, "drag_data_get",
|
||||
G_CALLBACK (drag_data_get), image);
|
||||
|
||||
/* accept drops on ebox */
|
||||
gtk_drag_dest_set (ebox, GTK_DEST_DEFAULT_ALL,
|
||||
NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_dest_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag_data_received",
|
||||
G_CALLBACK (drag_data_received), image);
|
||||
|
||||
/* context menu on ebox */
|
||||
g_signal_connect (ebox, "button_press_event",
|
||||
G_CALLBACK (button_press), image);
|
||||
|
||||
/* tell the clipboard manager to make the data persistent */
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
gtk_clipboard_set_can_store (clipboard, NULL, 0);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -1,371 +0,0 @@
|
||||
/* Combo boxes
|
||||
*
|
||||
* The ComboBox widget allows to select one option out of a list.
|
||||
* The ComboBoxEntry additionally allows the user to enter a value
|
||||
* that is not in the list of options.
|
||||
*
|
||||
* How the options are displayed is controlled by cell renderers.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
enum
|
||||
{
|
||||
PIXBUF_COL,
|
||||
TEXT_COL
|
||||
};
|
||||
|
||||
static gchar *
|
||||
strip_underscore (const gchar *text)
|
||||
{
|
||||
gchar *p, *q;
|
||||
gchar *result;
|
||||
|
||||
result = g_strdup (text);
|
||||
p = q = result;
|
||||
while (*p)
|
||||
{
|
||||
if (*p != '_')
|
||||
{
|
||||
*q = *p;
|
||||
q++;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
*q = '\0';
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static GtkTreeModel *
|
||||
create_stock_icon_store (void)
|
||||
{
|
||||
gchar *stock_id[6] = {
|
||||
GTK_STOCK_DIALOG_WARNING,
|
||||
GTK_STOCK_STOP,
|
||||
GTK_STOCK_NEW,
|
||||
GTK_STOCK_CLEAR,
|
||||
NULL,
|
||||
GTK_STOCK_OPEN
|
||||
};
|
||||
|
||||
GtkStockItem item;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
gchar *label;
|
||||
gint i;
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (stock_id); i++)
|
||||
{
|
||||
if (stock_id[i])
|
||||
{
|
||||
pixbuf = gtk_widget_render_icon (cellview, stock_id[i],
|
||||
GTK_ICON_SIZE_BUTTON, NULL);
|
||||
gtk_stock_lookup (stock_id[i], &item);
|
||||
label = strip_underscore (item.label);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
PIXBUF_COL, pixbuf,
|
||||
TEXT_COL, label,
|
||||
-1);
|
||||
g_free (label);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
PIXBUF_COL, NULL,
|
||||
TEXT_COL, "separator",
|
||||
-1);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_destroy (cellview);
|
||||
|
||||
return GTK_TREE_MODEL (store);
|
||||
}
|
||||
|
||||
/* A GtkCellLayoutDataFunc that demonstrates how one can control
|
||||
* sensitivity of rows. This particular function does nothing
|
||||
* useful and just makes the second row insensitive.
|
||||
*/
|
||||
static void
|
||||
set_sensitive (GtkCellLayout *cell_layout,
|
||||
GtkCellRenderer *cell,
|
||||
GtkTreeModel *tree_model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gint *indices;
|
||||
gboolean sensitive;
|
||||
|
||||
path = gtk_tree_model_get_path (tree_model, iter);
|
||||
indices = gtk_tree_path_get_indices (path);
|
||||
sensitive = indices[0] != 1;
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
g_object_set (cell, "sensitive", sensitive, NULL);
|
||||
}
|
||||
|
||||
/* A GtkTreeViewRowSeparatorFunc that demonstrates how rows can be
|
||||
* rendered as separators. This particular function does nothing
|
||||
* useful and just turns the fourth row into a separator.
|
||||
*/
|
||||
static gboolean
|
||||
is_separator (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gboolean result;
|
||||
|
||||
path = gtk_tree_model_get_path (model, iter);
|
||||
result = gtk_tree_path_get_indices (path)[0] == 4;
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static GtkTreeModel *
|
||||
create_capital_store (void)
|
||||
{
|
||||
struct {
|
||||
gchar *group;
|
||||
gchar *capital;
|
||||
} capitals[] = {
|
||||
{ "A - B", NULL },
|
||||
{ NULL, "Albany" },
|
||||
{ NULL, "Annapolis" },
|
||||
{ NULL, "Atlanta" },
|
||||
{ NULL, "Augusta" },
|
||||
{ NULL, "Austin" },
|
||||
{ NULL, "Baton Rouge" },
|
||||
{ NULL, "Bismarck" },
|
||||
{ NULL, "Boise" },
|
||||
{ NULL, "Boston" },
|
||||
{ "C - D", NULL },
|
||||
{ NULL, "Carson City" },
|
||||
{ NULL, "Charleston" },
|
||||
{ NULL, "Cheyenne" },
|
||||
{ NULL, "Columbia" },
|
||||
{ NULL, "Columbus" },
|
||||
{ NULL, "Concord" },
|
||||
{ NULL, "Denver" },
|
||||
{ NULL, "Des Moines" },
|
||||
{ NULL, "Dover" },
|
||||
{ "E - J", NULL },
|
||||
{ NULL, "Frankfort" },
|
||||
{ NULL, "Harrisburg" },
|
||||
{ NULL, "Hartford" },
|
||||
{ NULL, "Helena" },
|
||||
{ NULL, "Honolulu" },
|
||||
{ NULL, "Indianapolis" },
|
||||
{ NULL, "Jackson" },
|
||||
{ NULL, "Jefferson City" },
|
||||
{ NULL, "Juneau" },
|
||||
{ "K - O" },
|
||||
{ NULL, "Lansing" },
|
||||
{ NULL, "Lincoln" },
|
||||
{ NULL, "Little Rock" },
|
||||
{ NULL, "Madison" },
|
||||
{ NULL, "Montgomery" },
|
||||
{ NULL, "Montpelier" },
|
||||
{ NULL, "Nashville" },
|
||||
{ NULL, "Oklahoma City" },
|
||||
{ NULL, "Olympia" },
|
||||
{ NULL, "P - S" },
|
||||
{ NULL, "Phoenix" },
|
||||
{ NULL, "Pierre" },
|
||||
{ NULL, "Providence" },
|
||||
{ NULL, "Raleigh" },
|
||||
{ NULL, "Richmond" },
|
||||
{ NULL, "Sacramento" },
|
||||
{ NULL, "Salem" },
|
||||
{ NULL, "Salt Lake City" },
|
||||
{ NULL, "Santa Fe" },
|
||||
{ NULL, "Springfield" },
|
||||
{ NULL, "St. Paul" },
|
||||
{ "T - Z", NULL },
|
||||
{ NULL, "Tallahassee" },
|
||||
{ NULL, "Topeka" },
|
||||
{ NULL, "Trenton" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
GtkTreeIter iter, iter2;
|
||||
GtkTreeStore *store;
|
||||
gint i;
|
||||
|
||||
store = gtk_tree_store_new (1, G_TYPE_STRING);
|
||||
|
||||
for (i = 0; capitals[i].group || capitals[i].capital; i++)
|
||||
{
|
||||
if (capitals[i].group)
|
||||
{
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter, 0, capitals[i].group, -1);
|
||||
}
|
||||
else if (capitals[i].capital)
|
||||
{
|
||||
gtk_tree_store_append (store, &iter2, &iter);
|
||||
gtk_tree_store_set (store, &iter2, 0, capitals[i].capital, -1);
|
||||
}
|
||||
}
|
||||
|
||||
return GTK_TREE_MODEL (store);
|
||||
}
|
||||
|
||||
static void
|
||||
is_capital_sensitive (GtkCellLayout *cell_layout,
|
||||
GtkCellRenderer *cell,
|
||||
GtkTreeModel *tree_model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gboolean sensitive;
|
||||
|
||||
sensitive = !gtk_tree_model_iter_has_child (tree_model, iter);
|
||||
|
||||
g_object_set (cell, "sensitive", sensitive, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
fill_combo_entry (GtkWidget *entry)
|
||||
{
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "One");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Two");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "2\302\275");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Three");
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_combobox (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *vbox, *frame, *box, *combo;
|
||||
GtkTreeModel *model;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Combo boxes");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
* insensitive rows
|
||||
*/
|
||||
frame = gtk_frame_new ("Some stock icons");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_stock_icon_store ();
|
||||
combo = gtk_combo_box_new_with_model (model);
|
||||
g_object_unref (model);
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
||||
"pixbuf", PIXBUF_COL,
|
||||
NULL);
|
||||
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
||||
renderer,
|
||||
set_sensitive,
|
||||
NULL, NULL);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
||||
"text", TEXT_COL,
|
||||
NULL);
|
||||
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
||||
renderer,
|
||||
set_sensitive,
|
||||
NULL, NULL);
|
||||
|
||||
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (combo),
|
||||
is_separator, NULL, NULL);
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
|
||||
|
||||
/* A combobox demonstrating trees.
|
||||
*/
|
||||
frame = gtk_frame_new ("Where are we ?");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_capital_store ();
|
||||
combo = gtk_combo_box_new_with_model (model);
|
||||
g_object_unref (model);
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
||||
"text", 0,
|
||||
NULL);
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
||||
renderer,
|
||||
is_capital_sensitive,
|
||||
NULL, NULL);
|
||||
|
||||
path = gtk_tree_path_new_from_indices (0, 8, -1);
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
gtk_tree_path_free (path);
|
||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter);
|
||||
|
||||
/* A GtkComboBoxEntry
|
||||
*/
|
||||
frame = gtk_frame_new ("Editable");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_entry_new_text ();
|
||||
fill_combo_entry (combo);
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
* Dialog widgets are used to pop up a transient window for user feedback.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
@@ -21,9 +22,8 @@ message_dialog_clicked (GtkButton *button,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"This message box has been popped up the following\n"
|
||||
"number of times:");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
"%d", i);
|
||||
"number of times:\n\n"
|
||||
"%d", i);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
i++;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* to clear the area.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
*
|
||||
* This demo demonstrates the use of editable cells in a GtkTreeView. If
|
||||
* you're new to the GtkTreeView widgets and associates, look into
|
||||
* the GtkListStore example first. It also shows how to use the
|
||||
* GtkCellRenderer::editing-started signal to do custom setup of the
|
||||
* editable widget.
|
||||
* the GtkListStore example first.
|
||||
*
|
||||
* The cell renderers used in this demo are GtkCellRendererText,
|
||||
* GtkCellRendererCombo and GtkCellRendererProgress.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -18,24 +15,18 @@ static GtkWidget *window = NULL;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint number;
|
||||
gchar *product;
|
||||
gint yummy;
|
||||
gint number;
|
||||
gchar *product;
|
||||
gboolean editable;
|
||||
}
|
||||
Item;
|
||||
|
||||
enum
|
||||
{
|
||||
COLUMN_ITEM_NUMBER,
|
||||
COLUMN_ITEM_PRODUCT,
|
||||
COLUMN_ITEM_YUMMY,
|
||||
NUM_ITEM_COLUMNS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
COLUMN_NUMBER_TEXT,
|
||||
NUM_NUMBER_COLUMNS
|
||||
COLUMN_NUMBER,
|
||||
COLUMN_PRODUCT,
|
||||
COLUMN_EDITABLE,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
static GArray *articles = NULL;
|
||||
@@ -49,32 +40,32 @@ add_items (void)
|
||||
|
||||
foo.number = 3;
|
||||
foo.product = g_strdup ("bottles of coke");
|
||||
foo.yummy = 20;
|
||||
foo.editable = TRUE;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 5;
|
||||
foo.product = g_strdup ("packages of noodles");
|
||||
foo.yummy = 50;
|
||||
foo.editable = TRUE;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 2;
|
||||
foo.product = g_strdup ("packages of chocolate chip cookies");
|
||||
foo.yummy = 90;
|
||||
foo.editable = TRUE;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 1;
|
||||
foo.product = g_strdup ("can vanilla ice cream");
|
||||
foo.yummy = 60;
|
||||
foo.editable = TRUE;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
foo.number = 6;
|
||||
foo.product = g_strdup ("eggs");
|
||||
foo.yummy = 10;
|
||||
foo.editable = TRUE;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
}
|
||||
|
||||
static GtkTreeModel *
|
||||
create_items_model (void)
|
||||
create_model (void)
|
||||
{
|
||||
gint i = 0;
|
||||
GtkListStore *model;
|
||||
@@ -86,8 +77,8 @@ create_items_model (void)
|
||||
add_items ();
|
||||
|
||||
/* create list store */
|
||||
model = gtk_list_store_new (NUM_ITEM_COLUMNS, G_TYPE_INT, G_TYPE_STRING,
|
||||
G_TYPE_INT, G_TYPE_BOOLEAN);
|
||||
model = gtk_list_store_new (NUM_COLUMNS, G_TYPE_INT, G_TYPE_STRING,
|
||||
G_TYPE_BOOLEAN);
|
||||
|
||||
/* add items */
|
||||
for (i = 0; i < articles->len; i++)
|
||||
@@ -95,46 +86,18 @@ create_items_model (void)
|
||||
gtk_list_store_append (model, &iter);
|
||||
|
||||
gtk_list_store_set (model, &iter,
|
||||
COLUMN_ITEM_NUMBER,
|
||||
g_array_index (articles, Item, i).number,
|
||||
COLUMN_ITEM_PRODUCT,
|
||||
g_array_index (articles, Item, i).product,
|
||||
COLUMN_ITEM_YUMMY,
|
||||
g_array_index (articles, Item, i).yummy,
|
||||
-1);
|
||||
COLUMN_NUMBER,
|
||||
g_array_index (articles, Item, i).number,
|
||||
COLUMN_PRODUCT,
|
||||
g_array_index (articles, Item, i).product,
|
||||
COLUMN_EDITABLE,
|
||||
g_array_index (articles, Item, i).editable,
|
||||
-1);
|
||||
}
|
||||
|
||||
return GTK_TREE_MODEL (model);
|
||||
}
|
||||
|
||||
static GtkTreeModel *
|
||||
create_numbers_model (void)
|
||||
{
|
||||
#define N_NUMBERS 10
|
||||
gint i = 0;
|
||||
GtkListStore *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
/* create list store */
|
||||
model = gtk_list_store_new (NUM_NUMBER_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
|
||||
|
||||
/* add numbers */
|
||||
for (i = 0; i < N_NUMBERS; i++)
|
||||
{
|
||||
char str[2] = { '0' + i, '\0' };
|
||||
|
||||
gtk_list_store_append (model, &iter);
|
||||
|
||||
gtk_list_store_set (model, &iter,
|
||||
COLUMN_NUMBER_TEXT, str,
|
||||
-1);
|
||||
}
|
||||
|
||||
return GTK_TREE_MODEL (model);
|
||||
|
||||
#undef N_NUMBERS
|
||||
}
|
||||
|
||||
static void
|
||||
add_item (GtkWidget *button, gpointer data)
|
||||
{
|
||||
@@ -146,15 +109,15 @@ add_item (GtkWidget *button, gpointer data)
|
||||
|
||||
foo.number = 0;
|
||||
foo.product = g_strdup ("Description here");
|
||||
foo.yummy = 50;
|
||||
foo.editable = TRUE;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
|
||||
COLUMN_ITEM_NUMBER, foo.number,
|
||||
COLUMN_ITEM_PRODUCT, foo.product,
|
||||
COLUMN_ITEM_YUMMY, foo.yummy,
|
||||
-1);
|
||||
COLUMN_NUMBER, foo.number,
|
||||
COLUMN_PRODUCT, foo.product,
|
||||
COLUMN_EDITABLE, foo.editable,
|
||||
-1);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -180,37 +143,11 @@ remove_item (GtkWidget *widget, gpointer data)
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
separator_row (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gint idx;
|
||||
|
||||
path = gtk_tree_model_get_path (model, iter);
|
||||
idx = gtk_tree_path_get_indices (path)[0];
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
return idx == 5;
|
||||
}
|
||||
|
||||
static void
|
||||
editing_started (GtkCellRenderer *cell,
|
||||
GtkCellEditable *editable,
|
||||
const gchar *path,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
|
||||
separator_row, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
cell_edited (GtkCellRendererText *cell,
|
||||
const gchar *path_string,
|
||||
const gchar *new_text,
|
||||
gpointer data)
|
||||
const gchar *path_string,
|
||||
const gchar *new_text,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
|
||||
@@ -222,31 +159,31 @@ cell_edited (GtkCellRendererText *cell,
|
||||
|
||||
switch (column)
|
||||
{
|
||||
case COLUMN_ITEM_NUMBER:
|
||||
case COLUMN_NUMBER:
|
||||
{
|
||||
gint i;
|
||||
gint i;
|
||||
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_array_index (articles, Item, i).number = atoi (new_text);
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_array_index (articles, Item, i).number = atoi (new_text);
|
||||
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, column,
|
||||
g_array_index (articles, Item, i).number, -1);
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, column,
|
||||
g_array_index (articles, Item, i).number, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
case COLUMN_ITEM_PRODUCT:
|
||||
case COLUMN_PRODUCT:
|
||||
{
|
||||
gint i;
|
||||
gchar *old_text;
|
||||
gint i;
|
||||
gchar *old_text;
|
||||
|
||||
gtk_tree_model_get (model, &iter, column, &old_text, -1);
|
||||
g_free (old_text);
|
||||
g_free (old_text);
|
||||
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_free (g_array_index (articles, Item, i).product);
|
||||
g_array_index (articles, Item, i).product = g_strdup (new_text);
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_free (g_array_index (articles, Item, i).product);
|
||||
g_array_index (articles, Item, i).product = g_strdup (new_text);
|
||||
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, column,
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, column,
|
||||
g_array_index (articles, Item, i).product, -1);
|
||||
}
|
||||
break;
|
||||
@@ -256,55 +193,34 @@ cell_edited (GtkCellRendererText *cell,
|
||||
}
|
||||
|
||||
static void
|
||||
add_columns (GtkTreeView *treeview,
|
||||
GtkTreeModel *items_model,
|
||||
GtkTreeModel *numbers_model)
|
||||
add_columns (GtkTreeView *treeview)
|
||||
{
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
||||
|
||||
/* number column */
|
||||
renderer = gtk_cell_renderer_combo_new ();
|
||||
g_object_set (renderer,
|
||||
"model", numbers_model,
|
||||
"text-column", COLUMN_NUMBER_TEXT,
|
||||
"has-entry", FALSE,
|
||||
"editable", TRUE,
|
||||
NULL);
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
g_signal_connect (renderer, "edited",
|
||||
G_CALLBACK (cell_edited), items_model);
|
||||
g_signal_connect (renderer, "editing-started",
|
||||
G_CALLBACK (editing_started), NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_ITEM_NUMBER));
|
||||
G_CALLBACK (cell_edited), model);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)COLUMN_NUMBER);
|
||||
|
||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Number", renderer,
|
||||
"text", COLUMN_ITEM_NUMBER,
|
||||
NULL);
|
||||
-1, "Number", renderer,
|
||||
"text", COLUMN_NUMBER,
|
||||
"editable", COLUMN_EDITABLE,
|
||||
NULL);
|
||||
|
||||
/* product column */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
g_object_set (renderer,
|
||||
"editable", TRUE,
|
||||
NULL);
|
||||
g_signal_connect (renderer, "edited",
|
||||
G_CALLBACK (cell_edited), items_model);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_ITEM_PRODUCT));
|
||||
G_CALLBACK (cell_edited), model);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)COLUMN_PRODUCT);
|
||||
|
||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Product", renderer,
|
||||
"text", COLUMN_ITEM_PRODUCT,
|
||||
NULL);
|
||||
|
||||
/* yummy column */
|
||||
renderer = gtk_cell_renderer_progress_new ();
|
||||
g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_ITEM_YUMMY));
|
||||
|
||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Yummy", renderer,
|
||||
"value", COLUMN_ITEM_YUMMY,
|
||||
NULL);
|
||||
|
||||
|
||||
-1, "Product", renderer,
|
||||
"text", COLUMN_PRODUCT,
|
||||
"editable", COLUMN_EDITABLE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -317,47 +233,43 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
GtkWidget *sw;
|
||||
GtkWidget *treeview;
|
||||
GtkWidget *button;
|
||||
GtkTreeModel *items_model;
|
||||
GtkTreeModel *numbers_model;
|
||||
GtkTreeModel *model;
|
||||
|
||||
/* create window, etc */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Shopping list");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Shopping list (you can edit the cells!)"),
|
||||
FALSE, FALSE, 0);
|
||||
gtk_label_new ("Shopping list (you can edit the cells!)"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
|
||||
/* create models */
|
||||
items_model = create_items_model ();
|
||||
numbers_model = create_numbers_model ();
|
||||
/* create model */
|
||||
model = create_model ();
|
||||
|
||||
/* create tree view */
|
||||
treeview = gtk_tree_view_new_with_model (items_model);
|
||||
treeview = gtk_tree_view_new_with_model (model);
|
||||
g_object_unref (model);
|
||||
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
|
||||
gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)),
|
||||
GTK_SELECTION_SINGLE);
|
||||
GTK_SELECTION_SINGLE);
|
||||
|
||||
add_columns (GTK_TREE_VIEW (treeview), items_model, numbers_model);
|
||||
|
||||
g_object_unref (numbers_model);
|
||||
g_object_unref (items_model);
|
||||
add_columns (GTK_TREE_VIEW (treeview));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
@@ -367,12 +279,12 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (add_item), items_model);
|
||||
G_CALLBACK (add_item), model);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Remove item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -6,6 +6,7 @@
|
||||
* shows.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
@@ -280,13 +281,13 @@ do_hypertext (GtkWidget *do_widget)
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
g_signal_connect (view, "key-press-event",
|
||||
g_signal_connect (G_OBJECT (view), "key-press-event",
|
||||
G_CALLBACK (key_press_event), NULL);
|
||||
g_signal_connect (view, "event-after",
|
||||
g_signal_connect (G_OBJECT (view), "event-after",
|
||||
G_CALLBACK (event_after), NULL);
|
||||
g_signal_connect (view, "motion-notify-event",
|
||||
g_signal_connect (G_OBJECT (view), "motion-notify-event",
|
||||
G_CALLBACK (motion_notify_event), NULL);
|
||||
g_signal_connect (view, "visibility-notify-event",
|
||||
g_signal_connect (G_OBJECT (view), "visibility-notify-event",
|
||||
G_CALLBACK (visibility_notify_event), NULL);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
|
||||
@@ -1,359 +0,0 @@
|
||||
/* Icon View
|
||||
*
|
||||
* The GtkIconView widget is used to display and manipulate icons. It
|
||||
* uses a GtkTreeModel for data storage, so the list store example
|
||||
* might be helpful.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
#define FOLDER_NAME "gnome-fs-directory.png"
|
||||
#define FILE_NAME "gnome-fs-regular.png"
|
||||
|
||||
enum
|
||||
{
|
||||
COL_PATH,
|
||||
COL_DISPLAY_NAME,
|
||||
COL_PIXBUF,
|
||||
COL_IS_DIRECTORY,
|
||||
NUM_COLS
|
||||
};
|
||||
|
||||
|
||||
static GdkPixbuf *file_pixbuf, *folder_pixbuf;
|
||||
gchar *parent;
|
||||
GtkToolItem *up_button;
|
||||
|
||||
/* Loads the images for the demo and returns whether the operation succeeded */
|
||||
static gboolean
|
||||
load_pixbufs (GError **error)
|
||||
{
|
||||
char *filename;
|
||||
|
||||
if (file_pixbuf)
|
||||
return TRUE; /* already loaded earlier */
|
||||
|
||||
/* demo_find_file() looks in the the current directory first,
|
||||
* so you can run gtk-demo without installing GTK, then looks
|
||||
* in the location where the file is installed.
|
||||
*/
|
||||
filename = demo_find_file (FILE_NAME, error);
|
||||
if (!filename)
|
||||
return FALSE; /* note that "error" was filled in and returned */
|
||||
|
||||
file_pixbuf = gdk_pixbuf_new_from_file (filename, error);
|
||||
g_free (filename);
|
||||
|
||||
if (!file_pixbuf)
|
||||
return FALSE; /* Note that "error" was filled with a GError */
|
||||
|
||||
filename = demo_find_file (FOLDER_NAME, error);
|
||||
if (!filename)
|
||||
return FALSE; /* note that "error" was filled in and returned */
|
||||
|
||||
folder_pixbuf = gdk_pixbuf_new_from_file (filename, error);
|
||||
g_free (filename);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
fill_store (GtkListStore *store)
|
||||
{
|
||||
GDir *dir;
|
||||
const gchar *name;
|
||||
GtkTreeIter iter;
|
||||
|
||||
/* First clear the store */
|
||||
gtk_list_store_clear (store);
|
||||
|
||||
/* Now go through the directory and extract all the file
|
||||
* information */
|
||||
dir = g_dir_open (parent, 0, NULL);
|
||||
if (!dir)
|
||||
return;
|
||||
|
||||
name = g_dir_read_name (dir);
|
||||
while (name != NULL)
|
||||
{
|
||||
gchar *path, *display_name;
|
||||
gboolean is_dir;
|
||||
|
||||
/* We ignore hidden files that start with a '.' */
|
||||
if (name[0] != '.')
|
||||
{
|
||||
path = g_build_filename (parent, name, NULL);
|
||||
|
||||
is_dir = g_file_test (path, G_FILE_TEST_IS_DIR);
|
||||
|
||||
display_name = g_filename_to_utf8 (name, -1, NULL, NULL, NULL);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COL_PATH, path,
|
||||
COL_DISPLAY_NAME, display_name,
|
||||
COL_IS_DIRECTORY, is_dir,
|
||||
COL_PIXBUF, is_dir ? folder_pixbuf : file_pixbuf,
|
||||
-1);
|
||||
g_free (path);
|
||||
g_free (display_name);
|
||||
}
|
||||
|
||||
name = g_dir_read_name (dir);
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
sort_func (GtkTreeModel *model,
|
||||
GtkTreeIter *a,
|
||||
GtkTreeIter *b,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean is_dir_a, is_dir_b;
|
||||
gchar *name_a, *name_b;
|
||||
int ret;
|
||||
|
||||
/* We need this function because we want to sort
|
||||
* folders before files.
|
||||
*/
|
||||
|
||||
|
||||
gtk_tree_model_get (model, a,
|
||||
COL_IS_DIRECTORY, &is_dir_a,
|
||||
COL_DISPLAY_NAME, &name_a,
|
||||
-1);
|
||||
|
||||
gtk_tree_model_get (model, b,
|
||||
COL_IS_DIRECTORY, &is_dir_b,
|
||||
COL_DISPLAY_NAME, &name_b,
|
||||
-1);
|
||||
|
||||
if (!is_dir_a && is_dir_b)
|
||||
ret = 1;
|
||||
else if (is_dir_a && !is_dir_b)
|
||||
ret = -1;
|
||||
else
|
||||
{
|
||||
ret = g_utf8_collate (name_a, name_b);
|
||||
}
|
||||
|
||||
g_free (name_a);
|
||||
g_free (name_b);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GtkListStore *
|
||||
create_store (void)
|
||||
{
|
||||
GtkListStore *store;
|
||||
|
||||
store = gtk_list_store_new (NUM_COLS,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_TYPE_BOOLEAN);
|
||||
|
||||
/* Set sort column and function */
|
||||
gtk_tree_sortable_set_default_sort_func (GTK_TREE_SORTABLE (store),
|
||||
sort_func,
|
||||
NULL, NULL);
|
||||
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
|
||||
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
|
||||
GTK_SORT_ASCENDING);
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
static void
|
||||
item_activated (GtkIconView *icon_view,
|
||||
GtkTreePath *tree_path,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkListStore *store;
|
||||
gchar *path;
|
||||
GtkTreeIter iter;
|
||||
gboolean is_dir;
|
||||
|
||||
store = GTK_LIST_STORE (user_data);
|
||||
|
||||
gtk_tree_model_get_iter (GTK_TREE_MODEL (store),
|
||||
&iter, tree_path);
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter,
|
||||
COL_PATH, &path,
|
||||
COL_IS_DIRECTORY, &is_dir,
|
||||
-1);
|
||||
|
||||
if (!is_dir)
|
||||
{
|
||||
g_free (path);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Replace parent with path and re-fill the model*/
|
||||
g_free (parent);
|
||||
parent = path;
|
||||
|
||||
fill_store (store);
|
||||
|
||||
/* Sensitize the up button */
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (up_button), TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
up_clicked (GtkToolItem *item,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkListStore *store;
|
||||
gchar *dir_name;
|
||||
|
||||
store = GTK_LIST_STORE (user_data);
|
||||
|
||||
dir_name = g_path_get_dirname (parent);
|
||||
g_free (parent);
|
||||
|
||||
parent = dir_name;
|
||||
|
||||
fill_store (store);
|
||||
|
||||
/* Maybe de-sensitize the up button */
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (up_button),
|
||||
strcmp (parent, "/") != 0);
|
||||
}
|
||||
|
||||
static void
|
||||
home_clicked (GtkToolItem *item,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkListStore *store;
|
||||
|
||||
store = GTK_LIST_STORE (user_data);
|
||||
|
||||
g_free (parent);
|
||||
parent = g_strdup (g_get_home_dir ());
|
||||
|
||||
fill_store (store);
|
||||
|
||||
/* Sensitize the up button */
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (up_button),
|
||||
TRUE);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_iconview (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GError *error;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GtkIconView demo");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
error = NULL;
|
||||
if (!load_pixbufs (&error))
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"Failed to load an image: %s",
|
||||
error->message);
|
||||
|
||||
g_error_free (error);
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkWidget *sw;
|
||||
GtkWidget *icon_view;
|
||||
GtkListStore *store;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *tool_bar;
|
||||
GtkToolItem *home_button;
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
tool_bar = gtk_toolbar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), tool_bar, FALSE, FALSE, 0);
|
||||
|
||||
up_button = gtk_tool_button_new_from_stock (GTK_STOCK_GO_UP);
|
||||
gtk_tool_item_set_is_important (up_button, TRUE);
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (up_button), FALSE);
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (tool_bar), up_button, -1);
|
||||
|
||||
home_button = gtk_tool_button_new_from_stock (GTK_STOCK_HOME);
|
||||
gtk_tool_item_set_is_important (home_button, TRUE);
|
||||
gtk_toolbar_insert (GTK_TOOLBAR (tool_bar), home_button, -1);
|
||||
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
|
||||
/* Create the store and fill it with the contents of '/' */
|
||||
parent = g_strdup ("/");
|
||||
store = create_store ();
|
||||
fill_store (store);
|
||||
|
||||
icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (store));
|
||||
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
|
||||
GTK_SELECTION_MULTIPLE);
|
||||
g_object_unref (store);
|
||||
|
||||
/* Connect to the "clicked" signal of the "Up" tool button */
|
||||
g_signal_connect (up_button, "clicked",
|
||||
G_CALLBACK (up_clicked), store);
|
||||
|
||||
/* Connect to the "clicked" signal of the "Home" tool button */
|
||||
g_signal_connect (home_button, "clicked",
|
||||
G_CALLBACK (home_clicked), store);
|
||||
|
||||
/* We now set which model columns that correspond to the text
|
||||
* and pixbuf of each item
|
||||
*/
|
||||
gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), COL_DISPLAY_NAME);
|
||||
gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (icon_view), COL_PIXBUF);
|
||||
|
||||
/* Connect to the "item_activated" signal */
|
||||
g_signal_connect (icon_view, "item_activated",
|
||||
G_CALLBACK (item_activated), store);
|
||||
gtk_container_add (GTK_CONTAINER (sw), icon_view);
|
||||
|
||||
gtk_widget_grab_focus (icon_view);
|
||||
}
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
* application binary can be self-contained.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "demo-common.h"
|
||||
@@ -196,7 +196,7 @@ progressive_timeout (gpointer data)
|
||||
}
|
||||
else
|
||||
{
|
||||
image_stream = g_fopen (filename, "rb");
|
||||
image_stream = fopen (filename, "r");
|
||||
g_free (filename);
|
||||
|
||||
if (!image_stream)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include <demos.h>
|
||||
|
||||
@@ -387,7 +386,7 @@ parse_chars (gchar *text,
|
||||
|
||||
/* While not as cool as c-mode, this will do as a quick attempt at highlighting */
|
||||
static void
|
||||
fontify (void)
|
||||
fontify ()
|
||||
{
|
||||
GtkTextIter start_iter, next_iter, tmp_iter;
|
||||
gint state;
|
||||
@@ -466,7 +465,7 @@ load_file (const gchar *filename)
|
||||
return;
|
||||
}
|
||||
|
||||
file = g_fopen (full_filename, "r");
|
||||
file = fopen (full_filename, "r");
|
||||
|
||||
if (!file)
|
||||
g_warning ("Cannot open %s: %s\n", full_filename, g_strerror (errno));
|
||||
@@ -666,7 +665,7 @@ create_text (GtkTextBuffer **buffer,
|
||||
|
||||
if (is_source)
|
||||
{
|
||||
font_desc = pango_font_description_from_string ("monospace");
|
||||
font_desc = pango_font_description_from_string ("Courier 12");
|
||||
gtk_widget_modify_font (text_view, font_desc);
|
||||
pango_font_description_free (font_desc);
|
||||
|
||||
@@ -696,7 +695,6 @@ create_tree (void)
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeStore *model;
|
||||
GtkTreeIter iter;
|
||||
GtkWidget *box, *label, *scrolled_window;
|
||||
|
||||
Demo *d = testgtk_demos;
|
||||
|
||||
@@ -764,29 +762,11 @@ create_tree (void)
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
|
||||
GTK_TREE_VIEW_COLUMN (column));
|
||||
|
||||
gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter);
|
||||
gtk_tree_selection_select_iter (GTK_TREE_SELECTION (selection), &iter);
|
||||
|
||||
g_signal_connect (selection, "changed", G_CALLBACK (selection_cb), model);
|
||||
g_signal_connect (tree_view, "row_activated", G_CALLBACK (row_activated_cb), model);
|
||||
|
||||
gtk_tree_view_collapse_all (GTK_TREE_VIEW (tree_view));
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view);
|
||||
|
||||
label = gtk_label_new ("Widget (double click for demo)");
|
||||
|
||||
box = gtk_notebook_new ();
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (box), scrolled_window, label);
|
||||
|
||||
gtk_widget_grab_focus (tree_view);
|
||||
|
||||
return box;
|
||||
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
|
||||
return tree_view;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -38,27 +38,20 @@ all : \
|
||||
DEMOS = \
|
||||
appwindow.c \
|
||||
button_box.c \
|
||||
clipboard.c \
|
||||
colorsel.c \
|
||||
dialog.c \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
entry_completion.c \
|
||||
expander.c \
|
||||
hypertext.c \
|
||||
iconview.c \
|
||||
images.c \
|
||||
editable_cells.c \
|
||||
images.c \
|
||||
item_factory.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
panes.c \
|
||||
pixbufs.c \
|
||||
rotated_text.c \
|
||||
pixbufs.c \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
tree_store.c \
|
||||
ui_manager.c \
|
||||
|
||||
|
||||
demos.h: $(DEMOS) geninclude.pl
|
||||
$(PERL) geninclude.pl $(DEMOS) > demos.h
|
||||
@@ -66,27 +59,20 @@ demos.h: $(DEMOS) geninclude.pl
|
||||
OBJECTS = \
|
||||
appwindow.obj \
|
||||
button_box.obj \
|
||||
changedisplay.obj \
|
||||
clipboard.obj \
|
||||
colorsel.obj \
|
||||
dialog.obj \
|
||||
drawingarea.obj \
|
||||
editable_cells.obj \
|
||||
entry_completion.obj \
|
||||
expander.obj \
|
||||
hypertext.obj \
|
||||
iconview.obj \
|
||||
editable_cells.obj \
|
||||
images.obj \
|
||||
item_factory.obj \
|
||||
list_store.obj \
|
||||
menus.obj \
|
||||
panes.obj \
|
||||
pixbufs.obj \
|
||||
rotated_text.obj \
|
||||
sizegroup.obj \
|
||||
stock_browser.obj \
|
||||
textview.obj \
|
||||
tree_store.obj \
|
||||
ui_manager.obj \
|
||||
main.obj \
|
||||
|
||||
gtk-demo.exe : demos.h $(OBJECTS)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* Menus
|
||||
*
|
||||
* There are several widgets involved in displaying menus. The
|
||||
* GtkMenuBar widget is a menu bar, which normally appears horizontally
|
||||
* at the top of an application, but can also be layed out vertically.
|
||||
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
|
||||
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
|
||||
* menu items (GtkMenuItem). Each menu item contains text and/or images
|
||||
* and can be selected by the user.
|
||||
* GtkMenuBar widget is a horizontal menu bar, which normally appears
|
||||
* at the top of an application. The GtkMenu widget is the actual menu
|
||||
* that pops up. Both GtkMenuBar and GtkMenu are subclasses of
|
||||
* GtkMenuShell; a GtkMenuShell contains menu items
|
||||
* (GtkMenuItem). Each menu item contains text and/or images and can
|
||||
* be selected by the user.
|
||||
*
|
||||
* There are several kinds of menu item, including plain GtkMenuItem,
|
||||
* GtkCheckMenuItem which can be checked/unchecked, GtkRadioMenuItem
|
||||
@@ -25,6 +25,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
@@ -70,59 +71,10 @@ create_menu (gint depth,
|
||||
return menu;
|
||||
}
|
||||
|
||||
static void
|
||||
change_orientation (GtkWidget *button,
|
||||
GtkWidget *menubar)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
GtkWidget *box = NULL;
|
||||
|
||||
parent = gtk_widget_get_parent (menubar);
|
||||
|
||||
if (GTK_IS_VBOX (parent))
|
||||
{
|
||||
box = gtk_widget_get_parent (parent);
|
||||
|
||||
g_object_ref (menubar);
|
||||
gtk_container_remove (GTK_CONTAINER (parent), menubar);
|
||||
gtk_container_add (GTK_CONTAINER (box), menubar);
|
||||
gtk_box_reorder_child (GTK_BOX (box), menubar, 0);
|
||||
g_object_unref (menubar);
|
||||
g_object_set (menubar,
|
||||
"pack-direction", GTK_PACK_DIRECTION_TTB,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
GList *children, *l;
|
||||
|
||||
children = gtk_container_get_children (GTK_CONTAINER (parent));
|
||||
for (l = children; l; l = l->next)
|
||||
{
|
||||
if (GTK_IS_VBOX (l->data))
|
||||
{
|
||||
box = l->data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_list_free (children);
|
||||
|
||||
g_object_ref (menubar);
|
||||
gtk_container_remove (GTK_CONTAINER (parent), menubar);
|
||||
gtk_container_add (GTK_CONTAINER (box), menubar);
|
||||
gtk_box_reorder_child (GTK_BOX (box), menubar, 0);
|
||||
g_object_unref (menubar);
|
||||
g_object_set (menubar,
|
||||
"pack-direction", GTK_PACK_DIRECTION_LTR,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_menus (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box;
|
||||
GtkWidget *box1;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *button;
|
||||
@@ -148,13 +100,9 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "menus");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
|
||||
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), box1);
|
||||
gtk_container_add (GTK_CONTAINER (window), box1);
|
||||
gtk_widget_show (box1);
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
@@ -184,13 +132,7 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
button = gtk_button_new_with_label ("Flip");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (change_orientation), menubar);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
button = gtk_button_new_with_label ("close");
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK(gtk_widget_destroy), window);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* each side of each widget.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/* Pickers
|
||||
*
|
||||
* These widgets are mainly intended for use in preference dialogs.
|
||||
* They allow to select colors, fonts, files and directories.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
GtkWidget *
|
||||
do_pickers (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *table, *label, *picker;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Pickers");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
table = gtk_table_new (4, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 10);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 3);
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 10);
|
||||
|
||||
label = gtk_label_new ("Color:");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
picker = gtk_color_button_new ();
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 0, 1);
|
||||
|
||||
label = gtk_label_new ("Font:");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
picker = gtk_font_button_new ();
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 1, 2);
|
||||
|
||||
label = gtk_label_new ("File:");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
picker = gtk_file_chooser_button_new ("Pick a File",
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 2, 3);
|
||||
|
||||
label = gtk_label_new ("Folder:");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
picker = gtk_file_chooser_button_new ("Pick a Folder",
|
||||
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4);
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), picker, 1, 2, 3, 4);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <math.h>
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
/* Rotated Text
|
||||
*
|
||||
* This demo shows how to use GDK and Pango to draw rotated and transformed
|
||||
* text. The use of GdkPangoRenderer in this example is a somewhat advanced
|
||||
* technique; most applications can simply use gdk_draw_layout(). We use
|
||||
* it here mostly because that allows us to work in user coordinates - that is,
|
||||
* coordinates prior to the application of the transformation matrix, rather
|
||||
* than device coordinates.
|
||||
*
|
||||
* As of GTK+-2.6, the ability to draw transformed and anti-aliased graphics
|
||||
* as shown in this example is only present for text. With GTK+-2.8, a new
|
||||
* graphics system called "Cairo" will be introduced that provides these
|
||||
* capabilities and many more for all types of graphics.
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static gboolean
|
||||
rotated_text_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
#define RADIUS 150
|
||||
#define N_WORDS 10
|
||||
#define FONT "Sans Bold 27"
|
||||
|
||||
PangoRenderer *renderer;
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
int width = widget->allocation.width;
|
||||
int height = widget->allocation.height;
|
||||
double device_radius;
|
||||
int i;
|
||||
|
||||
/* Get the default renderer for the screen, and set it up for drawing */
|
||||
renderer = gdk_pango_renderer_get_default (gtk_widget_get_screen (widget));
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), widget->window);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), widget->style->black_gc);
|
||||
|
||||
/* Set up a transformation matrix so that the user space coordinates for
|
||||
* the centered square where we draw are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* We first center, then change the scale */
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
pango_matrix_translate (&matrix,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
device_radius + (height - 2 * device_radius) / 2);
|
||||
pango_matrix_scale (&matrix, device_radius / RADIUS, device_radius / RADIUS);
|
||||
|
||||
/* Create a PangoLayout, set the font and text */
|
||||
context = gtk_widget_create_pango_context (widget);
|
||||
layout = pango_layout_new (context);
|
||||
pango_layout_set_text (layout, "Text", -1);
|
||||
desc = pango_font_description_from_string (FONT);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
GdkColor color;
|
||||
PangoMatrix rotated_matrix = matrix;
|
||||
int width, height;
|
||||
double angle = (360. * i) / N_WORDS;
|
||||
|
||||
/* Gradient from red at angle == 60 to blue at angle == 300 */
|
||||
color.red = 65535 * (1 + cos ((angle - 60) * G_PI / 180.)) / 2;
|
||||
color.green = 0;
|
||||
color.blue = 65535 - color.red;
|
||||
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, &color);
|
||||
|
||||
pango_matrix_rotate (&rotated_matrix, angle);
|
||||
|
||||
pango_context_set_matrix (context, &rotated_matrix);
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_layout_context_changed (layout);
|
||||
|
||||
pango_layout_get_size (layout, &width, &height);
|
||||
pango_renderer_draw_layout (renderer, layout,
|
||||
- width / 2, - RADIUS * PANGO_SCALE);
|
||||
}
|
||||
|
||||
/* Clean up default renderer, since it is shared */
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, NULL);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
|
||||
/* free the objects we created */
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_rotated_text (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *drawing_area;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
const GdkColor white = { 0, 0xffff, 0xffff, 0xffff };
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Rotated Text");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), drawing_area);
|
||||
|
||||
/* This overrides the background color from the theme */
|
||||
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
|
||||
|
||||
g_signal_connect (drawing_area, "expose-event",
|
||||
G_CALLBACK (rotated_text_expose_event), NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 2 * RADIUS, 2 * RADIUS);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -13,6 +13,7 @@
|
||||
* into a table, you would not include the GTK_FILL flag.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* and stock items.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h> /* for exit() */
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* from an array of actions and a description of the menu hierarchy.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
|
||||
@@ -1,392 +0,0 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <demos.h>
|
||||
|
||||
static GtkTextBuffer *info_buffer;
|
||||
static GtkTextBuffer *source_buffer;
|
||||
|
||||
static gchar *current_file = NULL;
|
||||
|
||||
enum {
|
||||
TITLE_COLUMN,
|
||||
FILENAME_COLUMN,
|
||||
FUNC_COLUMN,
|
||||
ITALIC_COLUMN,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
gboolean
|
||||
read_line (FILE *stream, GString *str)
|
||||
{
|
||||
int n_read = 0;
|
||||
|
||||
flockfile (stream);
|
||||
|
||||
g_string_truncate (str, 0);
|
||||
|
||||
while (1)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = getc_unlocked (stream);
|
||||
|
||||
if (c == EOF)
|
||||
goto done;
|
||||
else
|
||||
n_read++;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\r':
|
||||
case '\n':
|
||||
{
|
||||
int next_c = getc_unlocked (stream);
|
||||
|
||||
if (!(next_c == EOF ||
|
||||
(c == '\r' && next_c == '\n') ||
|
||||
(c == '\n' && next_c == '\r')))
|
||||
ungetc (next_c, stream);
|
||||
|
||||
goto done;
|
||||
}
|
||||
default:
|
||||
g_string_append_c (str, c);
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
funlockfile (stream);
|
||||
|
||||
return n_read > 0;
|
||||
}
|
||||
|
||||
void
|
||||
load_file (const gchar *filename)
|
||||
{
|
||||
FILE *file;
|
||||
GtkTextIter start, end;
|
||||
GString *buffer = g_string_new (NULL);
|
||||
int state = 0;
|
||||
gboolean in_para = 0;
|
||||
|
||||
if (current_file && !strcmp (current_file, filename))
|
||||
return;
|
||||
|
||||
g_free (current_file);
|
||||
current_file = g_strdup (filename);
|
||||
|
||||
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
|
||||
gtk_text_buffer_delete (info_buffer, &start, &end);
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||
gtk_text_buffer_delete (source_buffer, &start, &end);
|
||||
|
||||
file = fopen (filename, "r");
|
||||
if (!file)
|
||||
{
|
||||
g_warning ("Cannot open %s: %s\n", filename, g_strerror (errno));
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
|
||||
while (read_line (file, buffer))
|
||||
{
|
||||
gchar *p = buffer->str;
|
||||
gchar *q;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 0:
|
||||
/* Reading title */
|
||||
while (*p == '/' || *p == '*' || isspace (*p))
|
||||
p++;
|
||||
q = p + strlen (p);
|
||||
while (q > p && isspace (*(q - 1)))
|
||||
q--;
|
||||
|
||||
if (q > p)
|
||||
{
|
||||
int len_chars = g_utf8_pointer_to_offset (p, q);
|
||||
|
||||
end = start;
|
||||
|
||||
g_assert (strlen (p) >= q - p);
|
||||
gtk_text_buffer_insert (info_buffer, &end, p, q - p);
|
||||
start = end;
|
||||
|
||||
gtk_text_iter_backward_chars (&start, len_chars);
|
||||
gtk_text_buffer_apply_tag_by_name (info_buffer, "title", &start, &end);
|
||||
|
||||
start = end;
|
||||
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
/* Reading body of info section */
|
||||
while (isspace (*p))
|
||||
p++;
|
||||
if (*p == '*' && *(p + 1) == '/')
|
||||
{
|
||||
gtk_text_buffer_get_iter_at_offset (source_buffer, &start, 0);
|
||||
state++;
|
||||
}
|
||||
else
|
||||
{
|
||||
int len;
|
||||
|
||||
while (*p == '*' || isspace (*p))
|
||||
p++;
|
||||
|
||||
len = strlen (p);
|
||||
while (isspace (*(p + len - 1)))
|
||||
len--;
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
if (in_para)
|
||||
gtk_text_buffer_insert (info_buffer, &start, " ", 1);
|
||||
|
||||
g_assert (strlen (p) >= len);
|
||||
gtk_text_buffer_insert (info_buffer, &start, p, len);
|
||||
in_para = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
|
||||
in_para = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
/* Skipping blank lines */
|
||||
while (isspace (*p))
|
||||
p++;
|
||||
if (*p)
|
||||
{
|
||||
p = buffer->str;
|
||||
state++;
|
||||
/* Fall through */
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
case 3:
|
||||
/* Reading program body */
|
||||
gtk_text_buffer_insert (source_buffer, &start, p, -1);
|
||||
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
|
||||
}
|
||||
|
||||
gboolean
|
||||
button_press_event_cb (GtkTreeView *tree_view,
|
||||
GdkEventButton *event,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
if (event->type == GDK_2BUTTON_PRESS)
|
||||
{
|
||||
GtkTreePath *path = NULL;
|
||||
|
||||
gtk_tree_view_get_path_at_pos (tree_view,
|
||||
event->window,
|
||||
event->x,
|
||||
event->y,
|
||||
&path,
|
||||
NULL);
|
||||
|
||||
if (path)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gboolean italic;
|
||||
GVoidFunc func;
|
||||
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
gtk_tree_store_get (GTK_TREE_STORE (model),
|
||||
&iter,
|
||||
FUNC_COLUMN, &func,
|
||||
ITALIC_COLUMN, &italic,
|
||||
-1);
|
||||
(func) ();
|
||||
gtk_tree_store_set (GTK_TREE_STORE (model),
|
||||
&iter,
|
||||
ITALIC_COLUMN, !italic,
|
||||
-1);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
gtk_signal_emit_stop_by_name (GTK_OBJECT (tree_view),
|
||||
"button_press_event");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
selection_cb (GtkTreeSelection *selection,
|
||||
GtkTreeModel *model)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GValue value = {0, };
|
||||
|
||||
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
return;
|
||||
|
||||
gtk_tree_model_get_value (model, &iter,
|
||||
FILENAME_COLUMN,
|
||||
&value);
|
||||
load_file (g_value_get_string (&value));
|
||||
g_value_unset (&value);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_text (GtkTextBuffer **buffer,
|
||||
gboolean is_source)
|
||||
{
|
||||
GtkWidget *scrolled_window;
|
||||
GtkWidget *text_view;
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
text_view = gtk_text_view_new ();
|
||||
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
|
||||
|
||||
*buffer = gtk_text_buffer_new (NULL);
|
||||
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
|
||||
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
|
||||
|
||||
if (is_source)
|
||||
{
|
||||
font_desc = pango_font_description_from_string ("Courier 10");
|
||||
gtk_widget_modify_font (text_view, font_desc);
|
||||
pango_font_description_free (font_desc);
|
||||
}
|
||||
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), !is_source);
|
||||
|
||||
return scrolled_window;
|
||||
}
|
||||
|
||||
/* Technically a list, but if we do go to 80 demos, we may want to move to a tree */
|
||||
static GtkWidget *
|
||||
create_tree (void)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkCellRenderer *cell;
|
||||
GtkWidget *tree_view;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeStore *model;
|
||||
GtkTreeIter iter;
|
||||
gint i;
|
||||
|
||||
model = gtk_tree_store_new_with_types (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
|
||||
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
|
||||
gtk_tree_selection_set_type (GTK_TREE_SELECTION (selection),
|
||||
GTK_TREE_SELECTION_SINGLE);
|
||||
gtk_widget_set_usize (tree_view, 200, -1);
|
||||
|
||||
for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++)
|
||||
{
|
||||
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
|
||||
|
||||
gtk_tree_store_set (GTK_TREE_STORE (model),
|
||||
&iter,
|
||||
TITLE_COLUMN, testgtk_demos[i].title,
|
||||
FILENAME_COLUMN, testgtk_demos[i].filename,
|
||||
FUNC_COLUMN, testgtk_demos[i].func,
|
||||
ITALIC_COLUMN, FALSE,
|
||||
-1);
|
||||
}
|
||||
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes ("Widget",
|
||||
cell,
|
||||
"text", TITLE_COLUMN,
|
||||
"italic", ITALIC_COLUMN,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
|
||||
GTK_TREE_VIEW_COLUMN (column));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", selection_cb, model);
|
||||
gtk_signal_connect (GTK_OBJECT (tree_view), "button_press_event", GTK_SIGNAL_FUNC (button_press_event_cb), model);
|
||||
|
||||
return tree_view;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *notebook;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *tree;
|
||||
GtkTextTag *tag;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
tree = create_tree ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
create_text (&info_buffer, FALSE),
|
||||
gtk_label_new ("Info"));
|
||||
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
create_text (&source_buffer, TRUE),
|
||||
gtk_label_new ("Source"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title");
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Sans 18",
|
||||
NULL);
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "source");
|
||||
gtk_object_set (GTK_OBJECT (tag),
|
||||
"font", "Courier 10",
|
||||
"pixels_above_lines", 0,
|
||||
"pixels_below_lines", 0,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
|
||||
load_file (testgtk_demos[0].filename);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ buffer_to_pixbuf (const gchar *buf, gsize count, GError **err)
|
||||
if (gdk_pixbuf_loader_write (loader, buf, count, err) &&
|
||||
gdk_pixbuf_loader_close (loader, err)) {
|
||||
pixbuf = g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader));
|
||||
g_object_unref (loader);
|
||||
g_object_unref (G_OBJECT (loader));
|
||||
return pixbuf;
|
||||
} else {
|
||||
return NULL;
|
||||
@@ -138,7 +138,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data)
|
||||
do_compare (pixbuf,
|
||||
g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)),
|
||||
err);
|
||||
g_object_unref (loader);
|
||||
g_object_unref (G_OBJECT (loader));
|
||||
}
|
||||
}
|
||||
else if (evt->keyval == 'S') {
|
||||
@@ -194,7 +194,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data)
|
||||
do_compare (pixbuf,
|
||||
g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)),
|
||||
err);
|
||||
g_object_unref (loader);
|
||||
g_object_unref (G_OBJECT (loader));
|
||||
}
|
||||
}
|
||||
else if (evt->keyval == 'P') {
|
||||
@@ -248,7 +248,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data)
|
||||
do_compare (pixbuf,
|
||||
g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader)),
|
||||
err);
|
||||
g_object_unref (loader);
|
||||
g_object_unref (G_OBJECT (loader));
|
||||
}
|
||||
}
|
||||
else if (evt->keyval == 'I') {
|
||||
|
||||
@@ -427,7 +427,7 @@ new_testrgb_window (GdkPixbuf *pixbuf, gchar *title)
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
return drawing_area;
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
@@ -508,7 +508,7 @@ extern void pixbuf_init ();
|
||||
|
||||
void size_func (GdkPixbufLoader *loader, gint width, gint height, gpointer data)
|
||||
{
|
||||
gdk_pixbuf_loader_set_size (loader, width*2, height*2);
|
||||
gdk_pixbuf_loader_set_size (loader, width*2, height*2);
|
||||
}
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* gdk_rgb_set_verbose (TRUE);*/
|
||||
gdk_rgb_set_verbose (TRUE);
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
|
||||
|
||||
@@ -611,10 +611,8 @@ main (int argc, char **argv)
|
||||
|
||||
status.buf = g_malloc (readlen);
|
||||
|
||||
#if 0
|
||||
g_signal_connect (pixbuf_loader, "size_prepared",
|
||||
G_CALLBACK (size_func), NULL);
|
||||
#endif
|
||||
|
||||
g_signal_connect (pixbuf_loader, "area_prepared",
|
||||
G_CALLBACK (progressive_prepared_callback),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = tutorial faq reference tools
|
||||
SUBDIRS = tutorial faq reference
|
||||
|
||||
EXTRA_DIST = \
|
||||
defsformat.txt \
|
||||
|
||||
@@ -19,27 +19,20 @@ Without those packages make distcheck will *not* pass.
|
||||
3) Verify that the version in configure.in has been bumped after the last
|
||||
release. (Note that this is critical, a slip-up here will cause the soname
|
||||
to change).
|
||||
4) Make sure that make check is happy (If you don't do it here, make distcheck
|
||||
will also catch it, but it is kind of disheartening to see make distcheck fail
|
||||
due to an extraneous symbol after watching it build the docs for an hour...)
|
||||
5) Add === Released 2.x.y === at the top of all ChangeLog files
|
||||
6) make distcheck
|
||||
7) Fix broken stuff found by 5) repeat
|
||||
8) cvs commit; you'll have a bunch of po file changes, and maybe some
|
||||
4) Add === Released 2.x.y === at the top of all ChangeLog files
|
||||
5) make distcheck
|
||||
6) Fix broken stuff found by 5) repeat
|
||||
7) cvs commit; you'll have a bunch of po file changes, and maybe some
|
||||
doc changes too (NOTE: be sure to use cvs with compression, else you'll
|
||||
end up waiting for a long time :).
|
||||
9) If 7) fails because someone else committed inbetween, curse, cvs up,
|
||||
8) If 7) fails because someone else committed inbetween, curse, cvs up,
|
||||
fix conflicts and go to 5)
|
||||
10) type 'cvs tag GTK_2_x_y' in the toplevel directory
|
||||
11) You now have the tarball, and the CVS tag, now upload the tarball to
|
||||
9) type 'cvs tag GTK_2_x_y' in the toplevel directory
|
||||
10) You now have the tarball, and the CVS tag, now upload the tarball to
|
||||
gnome.org and gtk.org
|
||||
12) Go to the gnome-announce list archives, find the last announce message,
|
||||
11) Go to the gnome-announce list archives, find the last announce message,
|
||||
create a new message in the same form, replacing version numbers, commentary
|
||||
at the top about "what this release is about" and the Summary of changes.
|
||||
13) Send it to gnome-announce-list, gtk-list, gtk-app-devel-list and
|
||||
12) Send it to gnome-announce-list, gtk-list, gtk-app-devel-list and
|
||||
gtk-devel-list. Set reply-to to gnome-hackers.
|
||||
14) Bump the version number in configure.in.
|
||||
15) Create a new milestone in bugzilla and move the remaining bugs from the
|
||||
2.x.y milestone over to the new one.
|
||||
16) Add a link to the release announcement to www.gtk.org which lives in
|
||||
the gtk-web cvs module.
|
||||
13) Bump the version number in configure.in.
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
Notational conventions
|
||||
======================
|
||||
|
||||
We have a window W that we are tracking events on. Focus
|
||||
can be on the following classes of objects
|
||||
|
||||
None : defined by X protocol
|
||||
PointerRoot : defined by X protocol
|
||||
W : the window itself
|
||||
Ancestor : An ancestor of W, including W's root window
|
||||
Descendant : A descendant of W
|
||||
Other: : A window that is neither an ancestor or
|
||||
descendant of W
|
||||
|
||||
has_pointer(W): the pointer is in W or one of its descendants.
|
||||
|
||||
NotifyPointer events
|
||||
====================
|
||||
|
||||
X sends FocusIn or FocusOut events to W with a detail of NotifyPointer
|
||||
in the following transitions, when the pointer is inside W
|
||||
|
||||
Other => Ancestor: FocusIn
|
||||
Ancestor => {Other,None}: FocusOut
|
||||
Ancestor => PointerRoot: FocusOut, then FocusIn
|
||||
{None,W,Descendant,Other} => PointerRoot: FocusIn
|
||||
PointerRoot => Ancestor: FocusOut, then FocusIn
|
||||
PointerRoot => {None,W,Descendant,Other} => FocusOut
|
||||
|
||||
[ Ignoring keyboard grabs for the moment ]
|
||||
|
||||
Basic focus tracking algorithm
|
||||
==============================
|
||||
|
||||
Keystroke events are delivered within W if and only if one of two
|
||||
predicates hold:
|
||||
|
||||
has_focus_window(W): F==W || F==Descendant
|
||||
has_pointer_focus(W): (F==Ancestor || F==PointerRoot) && has_pointer(W)
|
||||
|
||||
These two conditions are mutually exclusive.
|
||||
|
||||
has_focus_window(W) is easy to track.
|
||||
|
||||
FocusIn: detail != NotifyInferior: Set has_focus_iwndow
|
||||
FocusOut: detail != NotifyInferior: Clear has_focus_iwndow
|
||||
|
||||
has_pointer_focus(W) is harder to track.
|
||||
|
||||
We can separate out the transitions from !has_pointer_focus(W) to
|
||||
has_pointer_focus(W) into four cases:
|
||||
|
||||
T1: [(F==W || F==Descendant) => F==Ancestor]; has_pointer(W)
|
||||
|
||||
T2: [(F==W || F==Descendant) => F==PointerRoot]; has_pointer(W)
|
||||
|
||||
T3: [(F==None || F==Other) => (F==PointerRoot || F==Ancestor)];
|
||||
has_pointer(W)
|
||||
|
||||
T4: [!has_pointer(W) => has_pointer(W)]; (F==Ancestor || F==PointerRoot)
|
||||
|
||||
All of these can be tracked by watching events on W.
|
||||
|
||||
T1:, we get a FocusOut with a mode of Ancestor or Virtual
|
||||
We need to separately track has_pointer(W) to distinguish
|
||||
this from the case where we get these events and !has_pointer(W)
|
||||
|
||||
T2, T3: together these are exactly the cases where we get
|
||||
FocusIn/NotifyPointer.
|
||||
|
||||
For T4, we get an EnterNotify with the focus flag set. An
|
||||
EnterNotify with a focus flag set will also be sent if
|
||||
F==W, so we have to to explicitly test for that case
|
||||
using has_focus_window(W)
|
||||
|
||||
|
||||
The transitions from has_pointer_focus(W) to !has_pointer_focus(W)
|
||||
are exactly the opposite
|
||||
|
||||
F1: [(F==W || F==Descendant) <= F==Ancestor]; has_pointer(W)
|
||||
|
||||
F2: [(F==W || F==Descendant) <= F==PointerRoot]; has_pointer(W)
|
||||
|
||||
F3: [(F==None || F==Other) <= (F==PointerRoot || F==Ancestor)];
|
||||
has_pointer(W)
|
||||
|
||||
F4: [!has_pointer(W) <= has_pointer(W)]; (F==Ancestor || F==PointerRoot)
|
||||
|
||||
And can be tracked in the same ways:
|
||||
|
||||
F1: we get a FocusIn with a mode of Ancestor or Virtual
|
||||
We need to separately track has_pointer(W) to distinguish
|
||||
this from the case we get these events and !has_pointer(W)
|
||||
|
||||
F2, F3: together these are exactly the cases where we get
|
||||
FocusOut/NotifyPointer.
|
||||
|
||||
F4: we get an LeaveNotify with the focus flag set. An
|
||||
LeaveNotify with a focus flag set will also be sent if
|
||||
F==W, so we have to to explicity test for that case
|
||||
using has_focus_window(W).
|
||||
|
||||
|
||||
Modifications for keyboard grabs
|
||||
================================
|
||||
|
||||
The above algorithm ignores keyboard grabs, which also
|
||||
generate focus events, and needs to be modified somewhat
|
||||
to take keyboard grabs into effect. The basic idea
|
||||
is that for has_pointer_focus(W)/has_window_focus(W) we track
|
||||
them ignoring grabs and ungrabs, and then supplement
|
||||
that with another predicate has_focus(W) which pays
|
||||
attention to grabs and ungrabs.
|
||||
|
||||
Modification 1:
|
||||
|
||||
When tracking has_pointer_focus(W), ignore all Focus
|
||||
events with a mode of NotifyGrab or NotifyUngrab.
|
||||
|
||||
Note that this means that with grabs, we don't perfectly.
|
||||
track the delivery of keyboard events ... since we think
|
||||
we are getting events in the case where
|
||||
|
||||
has_pointer_focus(W) && !(G == None || G==W || G==descendant)
|
||||
|
||||
But the X protocol doesn't provide sufficient information
|
||||
to do this right... example:
|
||||
|
||||
F=Ancestor, G=None => F=Ancestor, G=Ancestor
|
||||
|
||||
We stop getting events, but receive no notification.
|
||||
|
||||
The case of no window manager and keyboard grabs is pretty
|
||||
rare in any case.
|
||||
|
||||
Modification 2:
|
||||
|
||||
When tracking has_focus_window(W), ignore all Focus
|
||||
events with a mode of NotifyGrab or NotifyUngrab.
|
||||
|
||||
Modification 3: instead of calculating focus as
|
||||
|
||||
has_focus_window(W) || has_pointer_focus(W)
|
||||
|
||||
Calculate it as
|
||||
|
||||
has_focus(W) || has_pointer_focus(W)
|
||||
|
||||
where has_focus(W) is defined as:
|
||||
|
||||
has_focus(W): F==W || F==Descendant || G=W
|
||||
|
||||
Tracking has_focus(W) is done by
|
||||
|
||||
FocusIn: detail != NotifyInferior, mode != NotifyWhileGrabbed:
|
||||
set has_focus
|
||||
FocusOut: detail != NotifyInferior, mode != NotifyWhileGrabbed:
|
||||
clear has_focus
|
||||
|
||||
We still need to track has_focus_window(W) for the T4/F4
|
||||
transitions.
|
||||
@@ -1,163 +0,0 @@
|
||||
Information about the icon theme cache format used by GTK+
|
||||
for more information, see the mailing list threads at
|
||||
|
||||
http://mail.gnome.org/archives/gtk-devel-list/2004-April/msg00065.html
|
||||
http://lists.freedesktop.org/archives/xdg/2004-October/005140.html
|
||||
|
||||
|
||||
Back in May, Owen Taylor proposed [1] caching scheme for icon theme
|
||||
information, to reduce the amount of stating and disk seeking at
|
||||
application startup, and to reduce the memory overhead if each app
|
||||
allocates all the icon theme data separately.
|
||||
|
||||
The proposal is to keep the information about the icons in the
|
||||
directory tree below each icon theme directory in an mmap()able
|
||||
cache file (There is basically one cache file per index.theme file).
|
||||
|
||||
The cache doesn't try to hold all information from the index.theme files
|
||||
that you would need to do lookups; it turns out that with the icon theme
|
||||
specification, this isn't even sensible - you can install a
|
||||
|
||||
$HOME/.local/share/icons/Bluecurve/index.theme
|
||||
|
||||
That overrides
|
||||
|
||||
/usr/share/icons/Bluecurve/index.theme
|
||||
|
||||
and chances how lookup happens for icons in /usr/share/icons/Bluecurve.
|
||||
|
||||
We would like to propose the cache file format as an appendix to the
|
||||
icon theme specification. One thing which still needs to be investigated
|
||||
is caching of the actual image data; the file format is has an
|
||||
IMAGE_DATA_OFFSET member to allow adding that compatibly. An
|
||||
implementation of the caching scheme for GTK+ can be found at [2]. The
|
||||
cache generator which is included in the patch depends only on glib, and
|
||||
it may be a good idea to move it to freedesktop.org as well.
|
||||
|
||||
|
||||
Regards, Matthias Clasen
|
||||
|
||||
|
||||
The cache file format:
|
||||
|
||||
Header:
|
||||
2 CARD16 MAJOR_VERSION 1
|
||||
2 CARD16 MINOR_VERSION 0
|
||||
4 CARD32 HASH_OFFSET
|
||||
4 CARD32 DIRECTORY_LIST_OFFSET
|
||||
|
||||
DirectoryList:
|
||||
4 CARD32 N_DIRECTORIES
|
||||
4*N_DIRECTORIES CARD32 DIRECTORY_OFFSET
|
||||
|
||||
Hash:
|
||||
4 CARD32 N_BUCKETS
|
||||
4*N_BUCKETS CARD32 ICON_OFFSET
|
||||
|
||||
Icon:
|
||||
4 CARD32 CHAIN_OFFSET
|
||||
4 CARD32 NAME_OFFSET
|
||||
4 CARD32 IMAGE_LIST_OFFSET
|
||||
|
||||
ImageList:
|
||||
4 CARD32 N_IMAGES
|
||||
8*N_IMAGES Image IMAGES
|
||||
|
||||
Image:
|
||||
2 CARD16 DIRECTORY_INDEX
|
||||
2 ICON_FLAGS FLAGS
|
||||
4 CARD32 IMAGE_DATA_OFFSET
|
||||
|
||||
ICON_FLAGS
|
||||
HAS_SUFFIX_PNG 1
|
||||
HAS_SUFFIX_XPM 2
|
||||
HAS_SUFFIX_SVG 4
|
||||
HAS_ICON_FILE 8
|
||||
|
||||
ImageData:
|
||||
4 CARD32 IMAGE_PIXEL_DATA_OFFSET
|
||||
4 CARD32 IMAGE_META_DATA_OFFSET
|
||||
|
||||
4 CARD32 IMAGE_PIXEL_DATA_TYPE
|
||||
4 CARD32 IMAGE_PIXEL_DATA_LENGTH
|
||||
N/A N/A PIXEL_DATA
|
||||
|
||||
IMAGE_PIXEL_DATA_TYPE
|
||||
0 GdkPixdata format
|
||||
|
||||
MetaData:
|
||||
4 CARD32 EMBEDDED_RECT_OFFSET
|
||||
4 CARD32 ATTACH_POINT_LIST_OFFSET
|
||||
4 CARD32 DISPLAY_NAME_LIST_OFFSET
|
||||
|
||||
EmbeddedRect:
|
||||
2 CARD16 X0
|
||||
2 CARD16 Y0
|
||||
2 CARD16 X1
|
||||
2 CARD16 Y1
|
||||
|
||||
AttachPointList:
|
||||
4 CARD32 N_ATTACH_POINTS
|
||||
4*N_ATTACH_POINTS AttachPoint
|
||||
|
||||
AttachPoint:
|
||||
2 CARD16 X
|
||||
2 CARD16 Y
|
||||
|
||||
DisplayNameList:
|
||||
4 CARD32 N_DISPLAY_NAMES
|
||||
4*N_DISPLAY_NAMES DisplayName
|
||||
|
||||
DisplayName:
|
||||
4 CARD32 DISPLAY_LANG_OFFSET
|
||||
4 CARD32 DISPLAY_NAME_OFFSET
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
* All offsets are from in bytes from the beginning of the file
|
||||
|
||||
* Strings are zero-terminated
|
||||
|
||||
* Directories are stored as relative paths.
|
||||
|
||||
* All numbers are in network (big-endian) order. This is
|
||||
necessary because the data will be stored in arch-independent
|
||||
directories like /usr/share/icons or even in user's
|
||||
home directories.
|
||||
|
||||
* The hash function is that used by g_str_hash()
|
||||
|
||||
unsigned int
|
||||
icon_str_hash (gconstpointer key)
|
||||
{
|
||||
const char *p = key;
|
||||
unsigned int h = *p;
|
||||
|
||||
if (h)
|
||||
for (p += 1; *p != '\0'; p++)
|
||||
h = (h << 5) - h + *p;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
||||
This should not be implemented by calling g_str_hash(). For
|
||||
optimal results, N_BUCKETS should be typically be prime.
|
||||
|
||||
* The same file format is used for icon themes (e.g.,
|
||||
/usr/share/icons/Bluecurve) and for unthemed icon directories
|
||||
(e.g., /usr/share/pixmaps)
|
||||
|
||||
For an unthemed directory, N_DIRECTORIES==0 and each
|
||||
image has a DIRECTORY_INDEX field of 0xFFFF.
|
||||
|
||||
* Up-to-dateness of a cache file is determined simply:
|
||||
|
||||
If the mod-time on the directory where the cache file
|
||||
lives is newer than the mod-time of the cache file,
|
||||
the cache file is out of date.
|
||||
|
||||
* Cache files have to be written atomically - write to a
|
||||
temporary name, then move over the old file - so that
|
||||
clients that have the old cache file open and mmap'ed
|
||||
won't get corrupt data.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,14 +21,12 @@ CFILE_GLOB=$(top_srcdir)/gdk-pixbuf/*.c $(top_srcdir)/contrib/gdk-pixbuf-xlib/*.
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
pixops \
|
||||
gdk-pixbuf-alias.h \
|
||||
gdk-pixbuf-marshal.h \
|
||||
gdk-pixbuf-xlib-private.h \
|
||||
gdk-pixbuf-i18n.h \
|
||||
gdk-pixbuf-private.h \
|
||||
io-gif-animation.h \
|
||||
io-ani-animation.h \
|
||||
xpm-color-table.h \
|
||||
test-images.h
|
||||
|
||||
INCLUDES = \
|
||||
|
||||
@@ -6,16 +6,10 @@
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_pixbuf_version
|
||||
gdk_pixbuf_major_version
|
||||
gdk_pixbuf_minor_version
|
||||
gdk_pixbuf_micro_version
|
||||
GDK_PIXBUF_VERSION
|
||||
GDK_PIXBUF_MAJOR
|
||||
GDK_PIXBUF_MINOR
|
||||
GDK_PIXBUF_MICRO
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_PIXBUF_VAR
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -63,7 +57,6 @@ GdkPixbufDestroyNotify
|
||||
<FILE>file-loading</FILE>
|
||||
gdk_pixbuf_new_from_file
|
||||
gdk_pixbuf_new_from_file_at_size
|
||||
gdk_pixbuf_new_from_file_at_scale
|
||||
gdk_pixbuf_get_file_info
|
||||
</SECTION>
|
||||
|
||||
@@ -114,8 +107,6 @@ gdk_pixbuf_fill
|
||||
<FILE>animation</FILE>
|
||||
GdkPixbufAnimation
|
||||
GdkPixbufAnimationIter
|
||||
GdkPixbufAnimation
|
||||
GdkPixbufAnimationIter
|
||||
gdk_pixbuf_animation_new_from_file
|
||||
gdk_pixbuf_animation_ref
|
||||
gdk_pixbuf_animation_unref
|
||||
@@ -129,11 +120,6 @@ gdk_pixbuf_animation_iter_get_delay_time
|
||||
gdk_pixbuf_animation_iter_on_currently_loading_frame
|
||||
gdk_pixbuf_animation_iter_get_pixbuf
|
||||
|
||||
<SUBSECTION>
|
||||
GdkPixbufSimpleAnim
|
||||
gdk_pixbuf_simple_anim_new
|
||||
gdk_pixbuf_simple_anim_add_frame
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXBUF_ANIMATION
|
||||
GDK_TYPE_PIXBUF_ANIMATION
|
||||
@@ -142,22 +128,11 @@ GDK_IS_PIXBUF_ANIMATION_ITER
|
||||
GDK_PIXBUF_ANIMATION_ITER
|
||||
GDK_TYPE_PIXBUF_ANIMATION_ITER
|
||||
|
||||
GDK_PIXBUF_SIMPLE_ANIM_GET_CLASS
|
||||
GDK_IS_PIXBUF_SIMPLE_ANIM
|
||||
GDK_PIXBUF_SIMPLE_ANIM_CLASS
|
||||
GDK_IS_PIXBUF_SIMPLE_ANIM_CLASS
|
||||
GDK_TYPE_PIXBUF_SIMPLE_ANIM
|
||||
GDK_PIXBUF_SIMPLE_ANIM
|
||||
GdkPixbufSimpleAnimClass
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_pixbuf_non_anim_new
|
||||
|
||||
gdk_pixbuf_animation_get_type
|
||||
gdk_pixbuf_animation_iter_get_type
|
||||
|
||||
gdk_pixbuf_simple_anim_get_type
|
||||
gdk_pixbuf_simple_anim_iter_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -168,17 +143,12 @@ gdk_pixbuf_scale
|
||||
gdk_pixbuf_composite_color_simple
|
||||
gdk_pixbuf_composite
|
||||
gdk_pixbuf_composite_color
|
||||
GdkPixbufRotation
|
||||
gdk_pixbuf_rotate_simple
|
||||
gdk_pixbuf_flip
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_INTERP_TYPE
|
||||
GDK_TYPE_PIXBUF_ROTATION
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_interp_type_get_type
|
||||
gdk_pixbuf_rotation_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -216,10 +186,6 @@ gdk_pixbuf_format_get_description
|
||||
gdk_pixbuf_format_get_mime_types
|
||||
gdk_pixbuf_format_get_extensions
|
||||
gdk_pixbuf_format_is_writable
|
||||
gdk_pixbuf_format_is_scalable
|
||||
gdk_pixbuf_format_is_disabled
|
||||
gdk_pixbuf_format_set_disabled
|
||||
gdk_pixbuf_format_get_license
|
||||
GdkPixbufFormat
|
||||
GdkPixbufFormatFlags
|
||||
GdkPixbufModulePattern
|
||||
@@ -268,7 +234,6 @@ XlibRgbCmap
|
||||
XlibRgbDither
|
||||
xlib_rgb_init
|
||||
xlib_rgb_init_with_depth
|
||||
xlib_rgb_xpixel_from_rgb
|
||||
xlib_rgb_gc_set_foreground
|
||||
xlib_rgb_gc_set_background
|
||||
xlib_draw_rgb_image
|
||||
|
||||
@@ -130,24 +130,7 @@
|
||||
&gdk-pixbuf-query-loaders;
|
||||
</reference>
|
||||
|
||||
<index>
|
||||
<title>Index</title>
|
||||
</index>
|
||||
<index role="deprecated">
|
||||
<title>Index of deprecated symbols</title>
|
||||
</index>
|
||||
<index role="2.2">
|
||||
<title>Index of new symbols in 2.2</title>
|
||||
</index>
|
||||
<index role="2.4">
|
||||
<title>Index of new symbols in 2.4</title>
|
||||
</index>
|
||||
<index role="2.6">
|
||||
<title>Index of new symbols in 2.6</title>
|
||||
</index>
|
||||
<index role="2.8">
|
||||
<title>Index of new symbols in 2.8</title>
|
||||
</index>
|
||||
<index/>
|
||||
|
||||
&Porting-From-Imlib;
|
||||
|
||||
|
||||
@@ -20,30 +20,16 @@ Animated images.
|
||||
#GdkPixbufLoader
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
This object describes an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationIter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationIter ##### -->
|
||||
<para>
|
||||
|
||||
A #GdkPixbufAnimationIter provides the necessary functionality to
|
||||
display an animation. See gdk_pixbuf_animation_get_iter().
|
||||
</para>
|
||||
|
||||
|
||||
@@ -157,29 +143,3 @@ Animated images.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufSimpleAnim ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@width:
|
||||
@height:
|
||||
@rate:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_add_frame ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@pixbuf:
|
||||
|
||||
|
||||
|
||||
@@ -43,9 +43,6 @@ Creating a pixbuf from image data that is already in memory.
|
||||
gdk_pixbuf_finalize().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@ Loading a pixbuf from a file.
|
||||
#GdkPixbufLoader.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
@@ -55,21 +52,6 @@ End:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file_at_scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@width:
|
||||
@height:
|
||||
@preserve_aspect_ratio:
|
||||
@error:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@keep_aspect_ratio:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_file_info ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -6,11 +6,7 @@ Saving a pixbuf to a file.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions allow to save a #GdkPixbuf in a number of
|
||||
file formats. The formatted data can be written to a file
|
||||
or to a memory buffer. &gdk-pixbuf; can also call a user-defined
|
||||
callback on the data, which allows to e.g. write the image
|
||||
to a socket or store it in a database.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
@@ -18,9 +14,6 @@ to a socket or store it in a database.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_savev ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -69,9 +69,6 @@ Application-driven progressive image loading.
|
||||
gdk_pixbuf_new_from_file(), gdk_pixbuf_animation_new_from_file()
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufLoader ##### -->
|
||||
<para>
|
||||
The <structname>GdkPixbufLoader</structname> struct contains only private
|
||||
|
||||
@@ -23,9 +23,6 @@ Getting parts of an X drawable's image data into a pixbuf.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_get_from_drawable ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ Initializing the &gdk-pixbuf; Xlib library.
|
||||
XlibRGB
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_init ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@ Rendering a pixbuf to an X drawable.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_xlib_render_threshold_alpha ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@ Rendering RGB buffers to X drawables.
|
||||
GdkRGB
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT XlibRgbCmap ##### -->
|
||||
<para>
|
||||
FIXME: Describe this.
|
||||
@@ -65,15 +62,6 @@ displays.
|
||||
@prefDepth:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_xpixel_from_rgb ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@rgb:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION xlib_rgb_gc_set_foreground ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -90,9 +90,6 @@ put_pixel (GdkPixbuf *pixbuf, int x, int y, guchar red, guchar green, guchar blu
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufError ##### -->
|
||||
<para>
|
||||
An error code in the #GDK_PIXBUF_ERROR domain. Many &gdk-pixbuf;
|
||||
|
||||
@@ -16,9 +16,6 @@ you're linking against.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_version ##### -->
|
||||
<para>
|
||||
Contains the full version of the &gdk-pixbuf; library as a string.
|
||||
@@ -26,48 +23,6 @@ This is the version currently in use by a running program.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_major_version ##### -->
|
||||
<para>
|
||||
The major version number of the &gdk-pixbuf; library. (e.g. in
|
||||
&gdk-pixbuf; version 1.2.5 this is 1.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This variable is in the library, so represents the
|
||||
&gdk-pixbuf; library you have linked against. Contrast with the
|
||||
#GDK_PIXBUF_MAJOR macro, which represents the major version of the
|
||||
&gdk-pixbuf; headers you have included.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_minor_version ##### -->
|
||||
<para>
|
||||
The minor version number of the &gdk-pixbuf; library. (e.g. in
|
||||
&gdk-pixbuf; version 1.2.5 this is 2.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This variable is in the library, so represents the
|
||||
&gdk-pixbuf; library you have linked against. Contrast with the
|
||||
#GDK_PIXBUF_MINOR macro, which represents the minor version of the
|
||||
&gdk-pixbuf; headers you have included.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_pixbuf_micro_version ##### -->
|
||||
<para>
|
||||
The micro version number of the &gdk-pixbuf; library. (e.g. in
|
||||
&gdk-pixbuf; version 1.2.5 this is 5.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This variable is in the library, so represents the
|
||||
&gdk-pixbuf; library you have linked against. Contrast with the
|
||||
#GDK_PIXBUF_MICRO macro, which represents the micro version of the
|
||||
&gdk-pixbuf; headers you have included.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PIXBUF_VERSION ##### -->
|
||||
<para>
|
||||
Contains the full version of the &gdk-pixbuf; header as a string.
|
||||
|
||||
@@ -5,23 +5,15 @@ Inline data
|
||||
Functions for inlined pixbuf handling.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Using #GdkPixdata, images can be compiled into an application,
|
||||
making it unnecessary to refer to external image files at runtime.
|
||||
&gdk-pixbuf; includes a utility named gdk-pixbuf-csource, which
|
||||
can be used to convert image files into #GdkPixdata structures suitable
|
||||
for inclusion in C sources. To convert the #GdkPixdata structures back
|
||||
into #GdkPixbuf<!-- -->s, use gdk_pixbuf_from_pixdata.
|
||||
</para>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixdata ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -65,9 +65,6 @@ They are not covered by the same stability guarantees as the regular
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_set_option ##### -->
|
||||
<para>
|
||||
|
||||
@@ -132,42 +129,6 @@ They are not covered by the same stability guarantees as the regular
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_is_scalable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_is_disabled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_set_disabled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@disabled:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFormat ##### -->
|
||||
<para>
|
||||
A #GdkPixbufFormat contains information about the image format accepted by a
|
||||
@@ -183,9 +144,6 @@ use the <function>gdk_pixbuf_format_*</function> functions.
|
||||
@extensions: a %NULL-terminated array of typical filename extensions for the
|
||||
image format.
|
||||
@flags: a combination of #GdkPixbufFormatFlags.
|
||||
@disabled: a boolean determining whether the loader is disabled.
|
||||
@license: a string containing license information, typically set to
|
||||
shorthands like "GPL", "LGPL", etc.
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### ENUM GdkPixbufFormatFlags ##### -->
|
||||
@@ -195,10 +153,6 @@ operations.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_FORMAT_WRITABLE: the module can write out images in the format.
|
||||
@GDK_PIXBUF_FORMAT_SCALABLE: the image format is scalable
|
||||
@GDK_PIXBUF_FORMAT_THREADSAFE: the module is threadsafe. If this flag is not
|
||||
set, &gdk-pixbuf; will use a lock to prevent multiple threads from using
|
||||
this module at the same time. (Since 2.6)
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModulePattern ##### -->
|
||||
@@ -340,7 +294,7 @@ is loaded and must set the function pointers of the #GdkPixbufModule.
|
||||
@load_increment: continues an incremental load.
|
||||
@load_animation: loads an animation from a file.
|
||||
@save: saves a #GdkPixbuf to a file.
|
||||
@save_to_callback: saves a #GdkPixbuf by calling the given #GdkPixbufSaveFunc.
|
||||
@save_to_callback:
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
|
||||
<para>
|
||||
|
||||
@@ -45,9 +45,6 @@ Functions for reference counting and memory management on pixbufs.
|
||||
#GdkPixbuf, gdk_pixbuf_new_from_data().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_ref ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -71,9 +71,6 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link>.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInterpType ##### -->
|
||||
<para>
|
||||
This enumeration describes the different interpolation modes that
|
||||
@@ -203,34 +200,3 @@ End:
|
||||
@color2:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufRotation ##### -->
|
||||
<para>
|
||||
The possible rotations which can be passed to gdk_pixbuf_rotate_simple().
|
||||
To make them easier to use, their numerical values are the actual degrees.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_ROTATE_NONE: No rotation.
|
||||
@GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE: Rotate by 90 degrees.
|
||||
@GDK_PIXBUF_ROTATE_UPSIDEDOWN: Rotate by 180 degrees.
|
||||
@GDK_PIXBUF_ROTATE_CLOCKWISE: Rotate by 270 degrees.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_rotate_simple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@angle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_flip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@horizontal:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@ Utility and miscellaneous convenience functions.
|
||||
#GdkPixbuf
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_add_alpha ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ CFILE_GLOB=$(top_srcdir)/gdk/*.c
|
||||
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
gdkalias.h \
|
||||
gdkintl.h \
|
||||
gdkmarshalers.h \
|
||||
gdkkeysyms.h \
|
||||
@@ -28,7 +27,6 @@ IGNORE_HFILES= \
|
||||
gdkprivate.h \
|
||||
gdkpoly-generic.h \
|
||||
gdkregion-generic.h \
|
||||
keyname-table.h \
|
||||
linux-fb \
|
||||
nanox \
|
||||
win32 \
|
||||
@@ -60,8 +58,6 @@ content_files = \
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES = \
|
||||
images/rotated-text.png \
|
||||
\
|
||||
images/X_cursor.png \
|
||||
images/arrow.png \
|
||||
images/based_arrow_down.png \
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<!ENTITY gdk-Selections SYSTEM "xml/selections.xml">
|
||||
<!ENTITY gdk-Properties-and-Atoms SYSTEM "xml/properties.xml">
|
||||
<!ENTITY gdk-Pango-Interaction SYSTEM "xml/pango_interaction.xml">
|
||||
<!ENTITY gdk-Cairo-Interaction SYSTEM "xml/cairo_interaction.xml">
|
||||
<!ENTITY gdk-Points-Rectangles-and-Regions SYSTEM "xml/regions.xml">
|
||||
<!ENTITY gdk-Threads SYSTEM "xml/threads.xml">
|
||||
<!ENTITY gdk-Keys SYSTEM "xml/keys.xml">
|
||||
@@ -82,27 +81,10 @@
|
||||
&gdk-Input-Devices;
|
||||
|
||||
&gdk-Pango-Interaction;
|
||||
&gdk-Cairo-Interaction;
|
||||
|
||||
&gdk-X-Window-System-Interaction;
|
||||
</reference>
|
||||
|
||||
<index>
|
||||
<title>Index</title>
|
||||
</index>
|
||||
<index role="deprecated">
|
||||
<title>Index of deprecated symbols</title>
|
||||
</index>
|
||||
<index role="2.2">
|
||||
<title>Index of new symbols in 2.2</title>
|
||||
</index>
|
||||
<index role="2.4">
|
||||
<title>Index of new symbols in 2.4</title>
|
||||
</index>
|
||||
<index role="2.6">
|
||||
<title>Index of new symbols in 2.6</title>
|
||||
</index>
|
||||
<index role="2.8">
|
||||
<title>Index of new symbols in 2.8</title>
|
||||
</index>
|
||||
<index/>
|
||||
|
||||
</book>
|
||||
|
||||
@@ -61,6 +61,8 @@ GDK_TYPE_GRAB_STATUS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_TYPE_STATUS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkStatus
|
||||
GDKVAR
|
||||
gdk_axis_use_get_type
|
||||
@@ -108,10 +110,6 @@ gdk_window_type_get_type
|
||||
gdk_window_type_hint_get_type
|
||||
gdk_wm_decoration_get_type
|
||||
gdk_wm_function_get_type
|
||||
gdk_pointer_grab_info_libgtk_only
|
||||
gdk_keyboard_grab_info_libgtk_only
|
||||
gdk_add_option_entries_libgtk_only
|
||||
gdk_pre_parse_libgtk_only
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -142,16 +140,12 @@ gdk_display_get_pointer
|
||||
gdk_display_get_window_at_pointer
|
||||
GdkDisplayPointerHooks
|
||||
gdk_display_set_pointer_hooks
|
||||
gdk_display_warp_pointer
|
||||
gdk_display_supports_cursor_color
|
||||
gdk_display_supports_cursor_alpha
|
||||
gdk_display_get_default_cursor_size
|
||||
gdk_display_get_maximal_cursor_size
|
||||
gdk_display_get_default_group
|
||||
gdk_display_supports_selection_notification
|
||||
gdk_display_request_selection_notification
|
||||
gdk_display_supports_clipboard_persistence
|
||||
gdk_display_store_clipboard
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY_OBJECT
|
||||
GDK_IS_DISPLAY
|
||||
@@ -197,8 +191,6 @@ gdk_screen_get_system_colormap
|
||||
gdk_screen_get_system_visual
|
||||
gdk_screen_get_rgb_colormap
|
||||
gdk_screen_get_rgb_visual
|
||||
gdk_screen_get_rgba_colormap
|
||||
gdk_screen_get_rgba_visual
|
||||
gdk_screen_get_root_window
|
||||
gdk_screen_get_display
|
||||
gdk_screen_get_number
|
||||
@@ -328,7 +320,6 @@ gdk_rgb_get_visual
|
||||
gdk_rgb_get_colormap
|
||||
gdk_rgb_get_cmap
|
||||
gdk_rgb_ditherable
|
||||
gdk_rgb_colormap_ditherable
|
||||
gdk_rgb_set_verbose
|
||||
|
||||
<SUBSECTION Standard>
|
||||
@@ -467,10 +458,7 @@ GdkSegment
|
||||
gdk_draw_rectangle
|
||||
gdk_draw_arc
|
||||
gdk_draw_polygon
|
||||
gdk_draw_trapezoids
|
||||
GdkTrapezoid
|
||||
gdk_draw_glyphs
|
||||
gdk_draw_glyphs_transformed
|
||||
gdk_draw_layout_line
|
||||
gdk_draw_layout_line_with_colors
|
||||
gdk_draw_layout
|
||||
@@ -643,7 +631,6 @@ gdk_window_move
|
||||
gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_scroll
|
||||
gdk_window_move_region
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
@@ -673,14 +660,11 @@ gdk_window_process_all_updates
|
||||
gdk_window_process_updates
|
||||
gdk_window_set_debug_updates
|
||||
gdk_window_get_internal_paint_info
|
||||
gdk_window_enable_synchronized_configure
|
||||
gdk_window_configure_finished
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_set_user_data
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_set_accept_focus
|
||||
gdk_window_set_focus_on_map
|
||||
gdk_window_add_filter
|
||||
gdk_window_remove_filter
|
||||
GdkFilterFunc
|
||||
@@ -706,7 +690,6 @@ gdk_window_set_modal_hint
|
||||
gdk_window_set_type_hint
|
||||
gdk_window_set_skip_taskbar_hint
|
||||
gdk_window_set_skip_pager_hint
|
||||
gdk_window_set_urgency_hint
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_frame_extents
|
||||
@@ -834,14 +817,6 @@ GDK_TYPE_PROP_MODE
|
||||
<SECTION>
|
||||
<TITLE>Pango Interaction</TITLE>
|
||||
<FILE>pango_interaction</FILE>
|
||||
GdkPangoRenderer
|
||||
GdkPangoRendererClass
|
||||
gdk_pango_renderer_new
|
||||
gdk_pango_renderer_get_default
|
||||
gdk_pango_renderer_set_drawable
|
||||
gdk_pango_renderer_set_gc
|
||||
gdk_pango_renderer_set_stipple
|
||||
gdk_pango_renderer_set_override_color
|
||||
gdk_pango_context_get
|
||||
gdk_pango_context_get_for_screen
|
||||
gdk_pango_context_set_colormap
|
||||
@@ -851,27 +826,6 @@ gdk_pango_attr_embossed_new
|
||||
gdk_pango_attr_stipple_new
|
||||
gdk_pango_layout_get_clip_region
|
||||
gdk_pango_layout_line_get_clip_region
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_PANGO_RENDERER
|
||||
GDK_PANGO_RENDERER
|
||||
GDK_IS_PANGO_RENDERER
|
||||
GDK_PANGO_RENDERER_CLASS
|
||||
GDK_IS_PANGO_RENDERER_CLASS
|
||||
GDK_PANGO_RENDERER_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_pango_renderer_get_type
|
||||
GdkPangoRendererPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Cairo Interaction</TITLE>
|
||||
<FILE>cairo_interaction</FILE>
|
||||
gdk_cairo_create
|
||||
gdk_cairo_set_source_color
|
||||
gdk_cairo_set_source_pixbuf
|
||||
gdk_cairo_rectangle
|
||||
gdk_cairo_region
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -1100,8 +1054,6 @@ GdkEventClient
|
||||
GdkEventNoExpose
|
||||
GdkEventWindowState
|
||||
GdkEventSetting
|
||||
GdkEventOwnerChange
|
||||
GdkEventGrabBroken
|
||||
|
||||
<SUBSECTION>
|
||||
GdkScrollDirection
|
||||
@@ -1111,7 +1063,6 @@ GdkNotifyType
|
||||
GdkPropertyState
|
||||
GdkWindowState
|
||||
GdkSettingAction
|
||||
GdkOwnerChange
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_CROSSING_MODE
|
||||
@@ -1122,11 +1073,9 @@ GDK_TYPE_SCROLL_DIRECTION
|
||||
GDK_TYPE_SETTING_ACTION
|
||||
GDK_TYPE_VISIBILITY_STATE
|
||||
GDK_TYPE_WINDOW_STATE
|
||||
GDK_TYPE_OWNER_CHANGE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_event_get_type
|
||||
gdk_owner_change_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -1137,10 +1086,8 @@ GdkCursorType
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixmap
|
||||
gdk_cursor_new_from_pixbuf
|
||||
gdk_cursor_new_from_name
|
||||
gdk_cursor_new_for_display
|
||||
gdk_cursor_get_display
|
||||
gdk_cursor_get_image
|
||||
gdk_cursor_ref
|
||||
gdk_cursor_unref
|
||||
gdk_cursor_destroy
|
||||
@@ -1188,7 +1135,6 @@ gdk_drag_context_unref
|
||||
GdkDragContext
|
||||
GdkDragAction
|
||||
gdk_drag_status
|
||||
gdk_drag_drop_succeeded
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DRAG_CONTEXT
|
||||
@@ -1206,7 +1152,6 @@ gdk_drag_context_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gdk/gdkx.h</INCLUDE>
|
||||
<TITLE>X Window System Interaction</TITLE>
|
||||
<FILE>x_interaction</FILE>
|
||||
GDK_ROOT_WINDOW
|
||||
@@ -1255,8 +1200,6 @@ gdk_net_wm_supports
|
||||
gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_screen_get_window_manager_name
|
||||
gdk_x11_screen_lookup_visual
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_display_get_user_time
|
||||
gdk_x11_colormap_foreign_new
|
||||
gdk_x11_colormap_get_xcolormap
|
||||
gdk_x11_colormap_get_xdisplay
|
||||
@@ -1265,7 +1208,6 @@ gdk_x11_cursor_get_xdisplay
|
||||
gdk_x11_display_get_xdisplay
|
||||
gdk_x11_display_grab
|
||||
gdk_x11_display_ungrab
|
||||
gdk_x11_display_set_cursor_theme
|
||||
gdk_x11_register_standard_event_type
|
||||
gdk_x11_drawable_get_xdisplay
|
||||
gdk_x11_drawable_get_xid
|
||||
|
||||
@@ -5,7 +5,6 @@ gdk_display_manager_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_drawable_get_type
|
||||
gdk_window_object_get_type
|
||||
gdk_pango_renderer_get_type
|
||||
gdk_pixmap_get_type
|
||||
gdk_gc_get_type
|
||||
gdk_keymap_get_type
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,76 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cairo Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions to support using Cairo
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
<link href="http://cairographics.org">Cairo</link> is a graphics
|
||||
library that supports vector graphics and image compositing that
|
||||
can be used with GDK. Since 2.8, GTK+ does most of its drawing
|
||||
using Cairo.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK does not wrap the Cairo API, instead it allows to create Cairo
|
||||
contexts which can be used to draw on GDK drawables. Additional
|
||||
functions allow to convert GDK's rectangles and regions into
|
||||
Cairo paths and to use pixbufs as sources for drawing operations.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_set_source_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@pixbuf:
|
||||
@pixbuf_x:
|
||||
@pixbuf_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_rectangle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@rectangle:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@region:
|
||||
|
||||
|
||||
@@ -43,9 +43,6 @@ gdk_color_change() will probably become aliases.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkColor ##### -->
|
||||
<para>
|
||||
The #GdkColor structure is used to describe an
|
||||
@@ -65,6 +62,7 @@ allocated or unallocated color.
|
||||
The colormap structure contains the following public fields.
|
||||
</para>
|
||||
|
||||
@parent_instance:
|
||||
@size: For pseudo-color colormaps, the number of colors
|
||||
in the colormap.
|
||||
@colors: An array containing the current values in the
|
||||
|
||||
@@ -6,21 +6,7 @@ Standard and pixmap cursors
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to create and destroy cursors.
|
||||
There is a number of standard cursors, but it is also
|
||||
possible to construct new cursors from pixmaps and
|
||||
pixbufs. There may be limitations as to what kinds of
|
||||
cursors can be constructed on a given display, see
|
||||
gdk_display_supports_cursor_alpha(),
|
||||
gdk_display_supports_cursor_color(),
|
||||
gdk_display_get_default_cursor_size() and
|
||||
gdk_display_get_maximal_cursor_size().
|
||||
</para>
|
||||
<para>
|
||||
Cursors by themselves are not very interesting, they must be be
|
||||
bound to a window for users to see them. This is done with
|
||||
gdk_window_set_cursor() or by setting the cursor member of the
|
||||
#GdkWindowAttr struct passed to gdk_window_new().
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
@@ -28,15 +14,13 @@ gdk_window_set_cursor() or by setting the cursor member of the
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkCursor ##### -->
|
||||
<para>
|
||||
A <type>GdkCursor</type> structure represents a cursor.
|
||||
</para>
|
||||
|
||||
@type: the #GdkCursorType of the cursor
|
||||
@type:
|
||||
@ref_count:
|
||||
|
||||
<!-- ##### ENUM GdkCursorType ##### -->
|
||||
<para>
|
||||
@@ -120,9 +104,9 @@ The standard cursors available.
|
||||
@GDK_UR_ANGLE: <inlinegraphic format="PNG" fileref="ur_angle.png"></inlinegraphic>
|
||||
@GDK_WATCH: <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic>
|
||||
@GDK_XTERM: <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic>
|
||||
@GDK_LAST_CURSOR: last cursor type
|
||||
@GDK_LAST_CURSOR:
|
||||
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
|
||||
gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
|
||||
gdk_cursor_new_from_pixmap().
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new ##### -->
|
||||
<para>
|
||||
@@ -158,16 +142,6 @@ gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_for_display ##### -->
|
||||
<para>
|
||||
|
||||
@@ -187,15 +161,6 @@ gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_ref ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@ the GTK+ documentation for more information.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
|
||||
<para>
|
||||
</para>
|
||||
@@ -179,7 +176,7 @@ A <structname>GdkDragContext</structname> holds information about a
|
||||
drag in progress. It is used on both source and destination sides.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
@parent_instance:
|
||||
@protocol: the DND protocol which governs this drag.
|
||||
@is_source: %TRUE if the context is used on the source side.
|
||||
@source_window: the source of this drag.
|
||||
@@ -197,7 +194,7 @@ Used in #GdkDragContext to indicate what the destination
|
||||
should do with the dropped data.
|
||||
</para>
|
||||
|
||||
@GDK_ACTION_DEFAULT: Means nothing, and should not be used.
|
||||
@GDK_ACTION_DEFAULT:
|
||||
@GDK_ACTION_COPY: Copy the data.
|
||||
@GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
|
||||
it from the source using the DELETE target of the X selection protocol.
|
||||
@@ -216,12 +213,3 @@ should do with the dropped data.
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_drop_succeeded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ gtk_widget_create_pango_layout().
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDrawable ##### -->
|
||||
<para>
|
||||
An opaque structure representing an object that can be
|
||||
@@ -288,31 +285,6 @@ function.
|
||||
@npoints:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_trapezoids ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@trapezoids:
|
||||
@n_trapezoids:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkTrapezoid ##### -->
|
||||
<para>
|
||||
Specifies a trapezpoid for use by the gdk_draw_trapezoids().
|
||||
The trapezoids used here have parallel, horizontal top and
|
||||
bottom edges.
|
||||
</para>
|
||||
|
||||
@y1: the y coordinate of the start point.
|
||||
@x11: the x coordinate of the top left corner
|
||||
@x21: the x coordinate of the top right corner
|
||||
@y2: the y coordinate of the end point.
|
||||
@x12: the x coordinate of the bottom left corner
|
||||
@x22: the x coordinate of the bottom right corner
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_glyphs ##### -->
|
||||
<para>
|
||||
|
||||
@@ -326,20 +298,6 @@ bottom edges.
|
||||
@glyphs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_glyphs_transformed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@matrix:
|
||||
@font:
|
||||
@x:
|
||||
@y:
|
||||
@glyphs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_layout_line ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ required events are received. See gtk_widget_set_events().
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### UNION GdkEvent ##### -->
|
||||
<para>
|
||||
The #GdkEvent struct contains a union of all of the event structs,
|
||||
@@ -408,43 +405,6 @@ Generated when a setting is modified.
|
||||
%GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
|
||||
@name: the name of the setting.
|
||||
|
||||
<!-- ##### STRUCT GdkEventOwnerChange ##### -->
|
||||
<para>
|
||||
Generated when the owner of a selection changes. On X11, this information is
|
||||
only available if the X server supports the XFIXES extension.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_OWNER_CHANGE).
|
||||
@window: the window which received the event
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@owner: the new owner of the selection
|
||||
@reason: the reason for the ownership change as a #GdkOwnerChange value
|
||||
@selection: the atom identifying the selection
|
||||
@time: the timestamp of the event
|
||||
@selection_time: the time at which the selection ownership was taken over
|
||||
@Since: 2.6
|
||||
|
||||
<!-- ##### STRUCT GdkEventGrabBroken ##### -->
|
||||
<para>
|
||||
Generated when a pointer or keyboard grab is broken. On X11, this happens
|
||||
when the grab window becomes unviewable (i.e. it or one of its ancestors
|
||||
is unmapped), or if the same application grabs the pointer or keyboard
|
||||
again. Note that implicit grabs (which are initiated by button presses)
|
||||
can also cause #GdkEventGrabBroken events.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_GRAB_BROKEN)
|
||||
@window: the window which received the event, i.e. the window
|
||||
that previously owned the grab
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@keyboard: %TRUE if a keyboard grab was broken, %FALSE if a pointer
|
||||
grab was broken
|
||||
@implicit: %TRUE if the broken grab was implicit
|
||||
@grab_window: If this event is caused by another grab in the same
|
||||
application, @grab_window contains the new grab window. Otherwise
|
||||
@grab_window id %NULL.
|
||||
@Since: 2.8
|
||||
|
||||
<!-- ##### ENUM GdkScrollDirection ##### -->
|
||||
<para>
|
||||
Specifies the direction for #GdkEventScroll.
|
||||
@@ -494,7 +454,7 @@ full details of crossing event generation.
|
||||
which are not ancestors of each other and the window is part of
|
||||
the ancestor chain between one of these windows and their least
|
||||
common ancestor.
|
||||
@GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred.
|
||||
@GDK_NOTIFY_UNKNOWN:
|
||||
|
||||
<!-- ##### ENUM GdkPropertyState ##### -->
|
||||
<para>
|
||||
@@ -526,12 +486,3 @@ Specifies the kind of modification applied to a setting in a #GdkEventSetting.
|
||||
@GDK_SETTING_ACTION_CHANGED: a setting was changed.
|
||||
@GDK_SETTING_ACTION_DELETED: a setting was deleted.
|
||||
|
||||
<!-- ##### ENUM GdkOwnerChange ##### -->
|
||||
<para>
|
||||
Specifies why a selection ownership was changed.
|
||||
</para>
|
||||
|
||||
@GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
|
||||
@GDK_OWNER_CHANGE_DESTROY: the window was destroyed
|
||||
@GDK_OWNER_CHANGE_CLOSE: the client was closed
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@ The structs used for each type of event.
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkEventType ##### -->
|
||||
<para>
|
||||
Specifies the type of the event.
|
||||
@@ -84,14 +81,9 @@ has changed.
|
||||
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
|
||||
@GDK_NO_EXPOSE: indicates that the source region was completely available
|
||||
when parts of a drawable were copied. This is not very useful.
|
||||
@GDK_SCROLL: the scroll wheel was turned
|
||||
@GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
|
||||
for the possible window states
|
||||
@GDK_SETTING: a setting has been modified.
|
||||
@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
|
||||
was added in 2.6
|
||||
@GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
|
||||
was added in 2.8.
|
||||
@GDK_SCROLL:
|
||||
@GDK_WINDOW_STATE:
|
||||
@GDK_SETTING:
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
@@ -105,33 +97,32 @@ number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
|
||||
event is received each time the mouse moves. However, if the application
|
||||
spends a lot of time processing the event (updating the display, for example),
|
||||
it can easily lag behind the position of the mouse. When using the
|
||||
%GDK_POINTER_MOTION_HINT_MASK the server will only send a single
|
||||
%GDK_MOTION_NOTIFY event (which is marked as a hint) until the application
|
||||
asks for more, by calling gdk_window_get_pointer().
|
||||
%GDK_POINTER_MOTION_HINT_MASK the server will only send a single %GDK_MOTION_NOTIFY
|
||||
event (which is marked as a hint) until the application asks for more, by calling
|
||||
gdk_window_get_pointer().
|
||||
</para>
|
||||
|
||||
@GDK_EXPOSURE_MASK: receive expose events
|
||||
@GDK_POINTER_MOTION_MASK: receive all pointer motion events
|
||||
@GDK_POINTER_MOTION_HINT_MASK: see the explanation above
|
||||
@GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
|
||||
@GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
|
||||
@GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
|
||||
@GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
|
||||
@GDK_BUTTON_PRESS_MASK: receive button press events
|
||||
@GDK_BUTTON_RELEASE_MASK: receive button release events
|
||||
@GDK_KEY_PRESS_MASK: receive key press events
|
||||
@GDK_KEY_RELEASE_MASK: receive key release events
|
||||
@GDK_ENTER_NOTIFY_MASK: receive window enter events
|
||||
@GDK_LEAVE_NOTIFY_MASK: receive window leave events
|
||||
@GDK_FOCUS_CHANGE_MASK: receive focus change events
|
||||
@GDK_STRUCTURE_MASK: receive events about window configuration change
|
||||
@GDK_PROPERTY_CHANGE_MASK: receive property change events
|
||||
@GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
|
||||
@GDK_PROXIMITY_IN_MASK: receive proximity in events
|
||||
@GDK_PROXIMITY_OUT_MASK: receive proximity out events
|
||||
@GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
|
||||
child windows
|
||||
@GDK_SCROLL_MASK: receive scroll events
|
||||
@GDK_EXPOSURE_MASK:
|
||||
@GDK_POINTER_MOTION_MASK:
|
||||
@GDK_POINTER_MOTION_HINT_MASK:
|
||||
@GDK_BUTTON_MOTION_MASK:
|
||||
@GDK_BUTTON1_MOTION_MASK:
|
||||
@GDK_BUTTON2_MOTION_MASK:
|
||||
@GDK_BUTTON3_MOTION_MASK:
|
||||
@GDK_BUTTON_PRESS_MASK:
|
||||
@GDK_BUTTON_RELEASE_MASK:
|
||||
@GDK_KEY_PRESS_MASK:
|
||||
@GDK_KEY_RELEASE_MASK:
|
||||
@GDK_ENTER_NOTIFY_MASK:
|
||||
@GDK_LEAVE_NOTIFY_MASK:
|
||||
@GDK_FOCUS_CHANGE_MASK:
|
||||
@GDK_STRUCTURE_MASK:
|
||||
@GDK_PROPERTY_CHANGE_MASK:
|
||||
@GDK_VISIBILITY_NOTIFY_MASK:
|
||||
@GDK_PROXIMITY_IN_MASK:
|
||||
@GDK_PROXIMITY_OUT_MASK:
|
||||
@GDK_SUBSTRUCTURE_MASK:
|
||||
@GDK_SCROLL_MASK:
|
||||
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
||||
|
||||
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
|
||||
|
||||
@@ -261,9 +261,6 @@ here).
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkFont ##### -->
|
||||
<para>
|
||||
The <structname>GdkFont</structname> structure represents a font or fontset. It
|
||||
|
||||
@@ -30,9 +30,6 @@ be set by the latter method.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkGC ##### -->
|
||||
<para>
|
||||
The #GdkGC structure represents a graphics context.
|
||||
@@ -47,10 +44,8 @@ The #GdkGCValues structure holds a set of values used
|
||||
to create or modify a graphics context.
|
||||
</para>
|
||||
|
||||
@foreground: the foreground color. Note that gdk_gc_get_values()
|
||||
only sets the pixel value.
|
||||
@background: the background color. Note that gdk_gc_get_values()
|
||||
only sets the pixel value.
|
||||
@foreground: the foreground color.
|
||||
@background: the background color.
|
||||
@font: the default font.
|
||||
@function: the bitwise operation used when drawing.
|
||||
@fill: the fill style.
|
||||
@@ -122,21 +117,25 @@ useful. For bitmaps, %GDK_AND and %GDK_OR are also useful.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new ##### -->
|
||||
<para>
|
||||
Create a new graphics context with default values.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
@drawable: a #GdkDrawable. The created GC must always be used
|
||||
with drawables of the same depth as this one.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new_with_values ##### -->
|
||||
<para>
|
||||
|
||||
Create a new GC with the given initial values.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@values:
|
||||
@values_mask:
|
||||
@Returns:
|
||||
@drawable: a #GdkDrawable. The created GC must always be used
|
||||
with drawables of the same depth as this one.
|
||||
@values: a structure containing initial values for the GC.
|
||||
@values_mask: a bit mask indicating which fields in @values
|
||||
are set.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_screen ##### -->
|
||||
@@ -167,10 +166,10 @@ useful. For bitmaps, %GDK_AND and %GDK_OR are also useful.
|
||||
|
||||
<!-- ##### MACRO gdk_gc_destroy ##### -->
|
||||
<para>
|
||||
This function is obsolete and should not be used.
|
||||
Identical to gdk_gc_unref(). This function is obsolete
|
||||
and should not be used.
|
||||
</para>
|
||||
|
||||
@Deprecated: Use gdk_object_unref() instead
|
||||
<!-- # Unused Parameters # -->
|
||||
@gc: a #GdkGC.
|
||||
|
||||
@@ -187,29 +186,29 @@ This function is obsolete and should not be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_values ##### -->
|
||||
<para>
|
||||
|
||||
Retrieves the current values from a graphics context.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@values:
|
||||
@gc: a #GdkGC.
|
||||
@values: the #GdkGCValues structure in which to store the results.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_foreground ##### -->
|
||||
<para>
|
||||
|
||||
Sets the foreground color for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@color:
|
||||
@gc: a #GdkGC.
|
||||
@color: the new foreground color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_background ##### -->
|
||||
<para>
|
||||
|
||||
Sets the background color for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@color:
|
||||
@gc: a #GdkGC.
|
||||
@color: the new background color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_rgb_fg_color ##### -->
|
||||
@@ -232,29 +231,34 @@ This function is obsolete and should not be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_font ##### -->
|
||||
<para>
|
||||
|
||||
Sets the font for a graphics context. (Note that
|
||||
all text-drawing functions in GDK take a @font
|
||||
argument; the value set here is used when that
|
||||
argument is %NULL.)
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@font:
|
||||
@gc: a #GdkGC.
|
||||
@font: the new font.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_function ##### -->
|
||||
<para>
|
||||
|
||||
Determines how the current pixel values and the
|
||||
pixel values being drawn are combined to produce
|
||||
the final pixel values.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@gc: a #GdkGC.
|
||||
@function:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_fill ##### -->
|
||||
<para>
|
||||
|
||||
Set the fill mode for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@fill:
|
||||
@gc: a #GdkGC.
|
||||
@fill: the new fill mode.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkFill ##### -->
|
||||
@@ -275,75 +279,93 @@ Determines how primitives are drawn.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_tile ##### -->
|
||||
<para>
|
||||
|
||||
Set a tile pixmap for a graphics context.
|
||||
This will only be used if the fill mode
|
||||
is %GDK_TILED.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@tile:
|
||||
@gc: a #GdkGC.
|
||||
@tile: the new tile pixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_stipple ##### -->
|
||||
<para>
|
||||
|
||||
Set the stipple bitmap for a graphics context. The
|
||||
stipple will only be used if the fill mode is
|
||||
%GDK_STIPPLED or %GDK_OPAQUE_STIPPLED.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@stipple:
|
||||
@gc: a #GdkGC.
|
||||
@stipple: the new stipple bitmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_ts_origin ##### -->
|
||||
<para>
|
||||
|
||||
Set the origin when using tiles or stipples with
|
||||
the GC. The tile or stipple will be aligned such
|
||||
that the upper left corner of the tile or stipple
|
||||
will coincide with this point.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@gc: a #GdkGC.
|
||||
@x: the x-coordinate of the origin.
|
||||
@y: the y-coordinate of the origin.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_origin ##### -->
|
||||
<para>
|
||||
|
||||
Sets the origin of the clip mask. The coordinates are
|
||||
interpreted relative to the upper-left corner of
|
||||
the destination drawable of the current operation.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@gc: a #GdkGC.
|
||||
@x: the x-coordinate of the origin.
|
||||
@y: the y-coordinate of the origin.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_mask ##### -->
|
||||
<para>
|
||||
|
||||
Sets the clip mask for a graphics context from a bitmap.
|
||||
The clip mask is interpreted relative to the clip
|
||||
origin. (See gdk_gc_set_clip_origin()).
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@mask:
|
||||
@gc: the #GdkGC.
|
||||
@mask: a bitmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_rectangle ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a
|
||||
rectangle. The clip mask is interpreted relative to the clip
|
||||
origin. (See gdk_gc_set_clip_origin()).
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@rectangle:
|
||||
@gc: a #GdkGC.
|
||||
@rectangle: the rectangle to clip to.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
Sets the clip mask for a graphics context from a region structure.
|
||||
The clip mask is interpreted relative to the clip origin. (See
|
||||
gdk_gc_set_clip_origin()).
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@region:
|
||||
@gc: a #GdkGC.
|
||||
@region: the #GdkRegion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_subwindow ##### -->
|
||||
<para>
|
||||
|
||||
Sets how drawing with this GC on a window will affect child
|
||||
windows of that window.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@mode:
|
||||
@gc: a #GdkGC.
|
||||
@mode: the subwindow mode.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkSubwindowMode ##### -->
|
||||
@@ -357,23 +379,28 @@ windows of that window.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_exposures ##### -->
|
||||
<para>
|
||||
|
||||
Sets whether copying non-visible portions of a drawable
|
||||
using this graphics context generate exposure events
|
||||
for the corresponding regions of the destination
|
||||
drawable. (See gdk_draw_drawable()).
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@exposures:
|
||||
@gc: a #GdkGC.
|
||||
@exposures: if %TRUE, exposure events will be generated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_line_attributes ##### -->
|
||||
<para>
|
||||
|
||||
Sets various attributes of how lines are drawn. See
|
||||
the corresponding members of #GdkGCValues for full
|
||||
explanations of the arguments.
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@line_width:
|
||||
@line_style:
|
||||
@cap_style:
|
||||
@join_style:
|
||||
@gc: a #GdkGC.
|
||||
@line_width: the width of lines.
|
||||
@line_style: the dash-style for lines.
|
||||
@cap_style: the manner in which the ends of lines are drawn.
|
||||
@join_style: the in which lines are joined together.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkLineStyle ##### -->
|
||||
@@ -413,22 +440,28 @@ Determines how the joins between segments of a polygon are drawn.
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_dashes ##### -->
|
||||
<para>
|
||||
|
||||
Sets the way dashed-lines are drawn. Lines will be
|
||||
drawn with alternating on and off segments of the
|
||||
lengths specified in @dash_list. The manner in
|
||||
which the on and off segments are drawn is determined
|
||||
by the @line_style value of the GC. (This can
|
||||
be changed with gdk_gc_set_line_attributes())
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@dash_offset:
|
||||
@dash_list:
|
||||
@n:
|
||||
@gc: a #GdkGC.
|
||||
@dash_offset: the
|
||||
@dash_list: an array of dash lengths.
|
||||
@n: the number of elements in @dash_list.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_copy ##### -->
|
||||
<para>
|
||||
|
||||
Copy the set of values from one graphics context
|
||||
onto another graphics context.
|
||||
</para>
|
||||
|
||||
@dst_gc:
|
||||
@src_gc:
|
||||
@dst_gc: the destination graphics context.
|
||||
@src_gc: the source graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_colormap ##### -->
|
||||
|
||||
@@ -895,16 +895,6 @@ they will be ignored.
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_set_as_cairo_source ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@cr:
|
||||
@pixbuf_x:
|
||||
@pixbuf_y:
|
||||
|
||||
<!-- ##### VARIABLE gdk_progclass ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -28,9 +28,6 @@ Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplay ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplay</structname> struct is the GDK representation
|
||||
@@ -281,17 +278,6 @@ Applications should never have any reason to use this facility
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_warp_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_color ##### -->
|
||||
<para>
|
||||
|
||||
@@ -338,43 +324,3 @@ Applications should never have any reason to use this facility
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_selection_notification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_request_selection_notification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@selection:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_clipboard_persistence ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_store_clipboard ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@clipboard_window:
|
||||
@time_:
|
||||
@targets:
|
||||
@n_targets:
|
||||
|
||||
|
||||
|
||||
@@ -16,9 +16,6 @@ changes.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayManager ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplayManager</structname> struct has no interesting
|
||||
|
||||
@@ -22,9 +22,6 @@ form a large screen area.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkScreen ##### -->
|
||||
<para>
|
||||
This is a currently just a placeholder typedef for the first argument of
|
||||
@@ -103,24 +100,6 @@ when GDK gets multihead support.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_root_window ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -15,9 +15,6 @@ utility functions.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server.
|
||||
@@ -215,11 +212,6 @@ press and release events in pairs.
|
||||
It is equivalent to a pointer grab on the window with @owner_events set to
|
||||
%TRUE.
|
||||
</para>
|
||||
<para>
|
||||
If you set up anything at the time you take the grab that needs to be cleaned
|
||||
up when the grab ends, you should handle the #GdkEventGrabBroken events that
|
||||
are emitted when the grab ends unvoluntarily.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if %FALSE then all pointer events are reported with respect to
|
||||
@@ -288,11 +280,6 @@ Grabs the keyboard so that all events are passed to this
|
||||
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
|
||||
This overrides any previous keyboard grab by this client.
|
||||
</para>
|
||||
<para>
|
||||
If you set up anything at the time you take the grab that needs to be cleaned
|
||||
up when the grab ends, you should handle the #GdkEventGrabBroken events that
|
||||
are emitted when the grab ends unvoluntarily.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if %FALSE then all keyboard events are reported with respect to
|
||||
|
||||
@@ -55,15 +55,12 @@ displays.
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkImage ##### -->
|
||||
<para>
|
||||
The #GdkImage struct contains information on the image and the pixel data.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
@parent_instance:
|
||||
@type: the type of the image.
|
||||
@visual: the visual.
|
||||
@byte_order: the byte order.
|
||||
@@ -72,9 +69,10 @@ The #GdkImage struct contains information on the image and the pixel data.
|
||||
@depth: the depth of the image, i.e. the number of bits per pixel.
|
||||
@bpp: the number of bytes per pixel.
|
||||
@bpl: the number of bytes per line of the image.
|
||||
@bits_per_pixel: the number of bits per pixel.
|
||||
@bits_per_pixel:
|
||||
@mem: the pixel data.
|
||||
@colormap: the #GdkColormap associated with the image
|
||||
@colormap:
|
||||
@windowing_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new ##### -->
|
||||
<para>
|
||||
|
||||
@@ -31,9 +31,6 @@ callbacks.</para></listitem>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add_full ##### -->
|
||||
<para>
|
||||
Establish a callback when a condition becomes true on
|
||||
|
||||
@@ -89,9 +89,6 @@ and <structfield>ytilt</structfield>.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDevice ##### -->
|
||||
<para>
|
||||
A <structname>GdkDevice</structname> structure contains
|
||||
@@ -101,7 +98,7 @@ gdk_device_set_mode(), gdk_device_set_key() and gdk_device_set_axis_use()
|
||||
to configure various aspects of the device.
|
||||
</para>
|
||||
|
||||
@parent_instance: the parent instance
|
||||
@parent_instance:
|
||||
@name: the name of this device.
|
||||
@source: the type of this device.
|
||||
@mode: the mode of this device
|
||||
|
||||
@@ -80,9 +80,6 @@ gdk_keymap_translate_keyboard_state() just to get the keyval.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkKeymap ##### -->
|
||||
<para>
|
||||
A <structname>GdkKeymap</structname> defines the translation from keyboard state
|
||||
|
||||
@@ -2,209 +2,18 @@
|
||||
Pango Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Using Pango in GDK
|
||||
Low-level access to Pango
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pango is the text layout system used by GDK and GTK+. The functions
|
||||
and types in this section are used to render Pango objects to GDK.
|
||||
drawables, and also extend the set of Pango attributes to include
|
||||
stippling and embossing.
|
||||
|
||||
</para>
|
||||
<para>
|
||||
Creating a #PangoLayout object is the first step in rendering text,
|
||||
and requires getting a handle to a #PangoContext. For GTK+ programs,
|
||||
you'll usually want to use gtk_widget_get_pango_context(), or
|
||||
gtk_widget_create_pango_layout(), rather than using the lowlevel
|
||||
gdk_pango_context_get_for_screen(). Once you have a #PangoLayout, you
|
||||
can set the text and attributes of it with Pango functions like
|
||||
pango_layout_set_text() and get its size with pango_layout_get_size().
|
||||
(Note that Pango uses a fixed point system internally, so converting
|
||||
between Pango units and pixels using <link
|
||||
linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
|
||||
</para>
|
||||
<para>
|
||||
Rendering a Pango layout is done most simply with gdk_draw_layout();
|
||||
you can also draw pieces of the layout with gdk_draw_layout() or
|
||||
gdk_draw_glyphs(). #GdkPangoRenderer is a subclass of #PangoRenderer
|
||||
that is used internally to implement these functions. Using it
|
||||
directly or subclassing it can be useful in some cases. See the
|
||||
#GdkPangoRenderer documentation for details.
|
||||
</para>
|
||||
<example id="rotated-example">
|
||||
<title>Using #GdkPangoRenderer to draw transformed text</title>
|
||||
<!-- Note that this example is basically the same as
|
||||
demos/gtk-demo/rotated_text.c -->
|
||||
<programlisting>
|
||||
#define RADIUS 100
|
||||
#define N_WORDS 10
|
||||
#define FONT "Sans Bold 18"
|
||||
|
||||
GdkScreen *screen = gdk_drawable_get_screen (drawable);
|
||||
PangoRenderer *renderer;
|
||||
GdkGC *gc;
|
||||
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
double device_radius;
|
||||
int width, height;
|
||||
int i;
|
||||
|
||||
/* Get the default renderer for the screen, and set it up for drawing */
|
||||
renderer = gdk_pango_renderer_get_default (screen);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), drawable);
|
||||
|
||||
gc = gdk_gc_new (drawable);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), gc);
|
||||
|
||||
/* Set up a transformation matrix so that the user space coordinates for
|
||||
* where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* We first center, then change the scale */
|
||||
gdk_drawable_get_size (drawable, &width, &height);
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
|
||||
pango_matrix_translate (&matrix,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
device_radius + (height - 2 * device_radius) / 2);
|
||||
pango_matrix_scale (&matrix, device_radius / RADIUS, device_radius / RADIUS);
|
||||
|
||||
/* Create a PangoLayout, set the font and text */
|
||||
context = gdk_pango_context_get_for_screen (screen);
|
||||
layout = pango_layout_new (context);
|
||||
pango_layout_set_text (layout, "Text", -1);
|
||||
desc = pango_font_description_from_string (FONT);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
GdkColor color;
|
||||
PangoMatrix rotated_matrix = matrix;
|
||||
int width, height;
|
||||
double angle = (360. * i) / N_WORDS;
|
||||
|
||||
/* Gradient from red at angle == 60 to blue at angle == 300 */
|
||||
color.red = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
|
||||
color.green = 0;
|
||||
color.blue = 65535 - color.red;
|
||||
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, &color);
|
||||
|
||||
pango_matrix_rotate (&rotated_matrix, angle);
|
||||
|
||||
pango_context_set_matrix (context, &rotated_matrix);
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_layout_context_changed (layout);
|
||||
|
||||
pango_layout_get_size (layout, &width, &height);
|
||||
pango_renderer_draw_layout (renderer, layout,
|
||||
- width / 2, - RADIUS * PANGO_SCALE);
|
||||
}
|
||||
|
||||
/* Clean up default renderer, since it is shared */
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, NULL);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
|
||||
/* free the objects we created */
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
g_object_unref (gc);
|
||||
</programlisting>
|
||||
</example>
|
||||
<figure>
|
||||
<title>Output of <xref linkend="rotated-example"/></title>
|
||||
<graphic fileref="rotated-text.png" format="PNG"/>
|
||||
</figure>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPangoRenderer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GdkPangoRenderer:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPangoRendererClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@drawable:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_gc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@gc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_stipple ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@part:
|
||||
@stipple:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_renderer_set_override_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdk_renderer:
|
||||
@part:
|
||||
@color:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -6,9 +6,7 @@ Functions for rendering pixbufs on drawables
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions allow to render pixbufs on drawables. Pixbufs are
|
||||
client-side images. For details on how to create and manipulate
|
||||
pixbufs, see the #GdkPixbuf API documentation.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
@@ -16,9 +14,6 @@ pixbufs, see the #GdkPixbuf API documentation.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ pixel can be either on or off).
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user