Compare commits
256 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
749a1639cc | ||
|
|
cec2b23e6b | ||
|
|
f361d10ca1 | ||
|
|
ff76a7c353 | ||
|
|
5582c1f311 | ||
|
|
37a25985d1 | ||
|
|
82b355f5a8 | ||
|
|
c5e483055c | ||
|
|
b0f8c022a3 | ||
|
|
f29f8665fd | ||
|
|
071ba60b6e | ||
|
|
d9d3beb099 | ||
|
|
f85c1d6f26 | ||
|
|
e71cac0e1a | ||
|
|
28235d58b4 | ||
|
|
0bc92be1c2 | ||
|
|
398405fdac | ||
|
|
658c98d77a | ||
|
|
a672bb715a | ||
|
|
2042a08ab0 | ||
|
|
9e38c2e5ec | ||
|
|
dd0f5b6567 | ||
|
|
69c615fcb1 | ||
|
|
643006f533 | ||
|
|
f2bfc7d2c7 | ||
|
|
7904d1d663 | ||
|
|
25dc1c37fe | ||
|
|
fbbc6bb79b | ||
|
|
ca4cc77b50 | ||
|
|
b096092530 | ||
|
|
09ffe845d9 | ||
|
|
57c4adc842 | ||
|
|
e7fd4ff587 | ||
|
|
5b6c1d4f92 | ||
|
|
73ffaf1b0d | ||
|
|
31a101fb95 | ||
|
|
58f1891795 | ||
|
|
f4d3373525 | ||
|
|
3b8378fb2f | ||
|
|
1b44a18767 | ||
|
|
8cfb7a3a7f | ||
|
|
2c67a17bc5 | ||
|
|
c1dc8eed15 | ||
|
|
f1e4445bce | ||
|
|
c4f5ad3a0f | ||
|
|
e067c2a9c4 | ||
|
|
609b29d2a8 | ||
|
|
45664bc0f6 | ||
|
|
6ee45ace1b | ||
|
|
5f425b9f27 | ||
|
|
2fe21816cc | ||
|
|
adc808729b | ||
|
|
94946ec0e4 | ||
|
|
b8c0aff312 | ||
|
|
bf033cc8e6 | ||
|
|
81ecb7e80a | ||
|
|
87943c865c | ||
|
|
582a76843a | ||
|
|
e44ece4e36 | ||
|
|
60baed1179 | ||
|
|
1457497c10 | ||
|
|
3a259d847d | ||
|
|
9aff7ba8e5 | ||
|
|
0d37ee8e59 | ||
|
|
ab237e4a09 | ||
|
|
549ed2d785 | ||
|
|
09065c7696 | ||
|
|
39c59caa9d | ||
|
|
f7d4be45ff | ||
|
|
f84c758861 | ||
|
|
9af4e2c2c1 | ||
|
|
387cbde678 | ||
|
|
9e783527b3 | ||
|
|
472348534f | ||
|
|
35fbd14600 | ||
|
|
a66732b586 | ||
|
|
cf694bc246 | ||
|
|
e3585dacce | ||
|
|
2696fbc98f | ||
|
|
1dc1b2c93f | ||
|
|
1d7f1372d0 | ||
|
|
ec0e05525f | ||
|
|
9c8d313f38 | ||
|
|
bf4292b24c | ||
|
|
ceea5ef8fe | ||
|
|
56bc856b71 | ||
|
|
31be1165be | ||
|
|
36446419a3 | ||
|
|
dafcd60b6c | ||
|
|
0c27054e73 | ||
|
|
8c5d2437f7 | ||
|
|
57fbd241ff | ||
|
|
610a91de25 | ||
|
|
138d13b2a4 | ||
|
|
4d8116d641 | ||
|
|
432d618f51 | ||
|
|
ca8c78aecf | ||
|
|
5fc9179fce | ||
|
|
7e9215c616 | ||
|
|
51d3f7330c | ||
|
|
dfbb9d64b5 | ||
|
|
f0032274a8 | ||
|
|
f7b6505060 | ||
|
|
e4d9682836 | ||
|
|
c994d518a8 | ||
|
|
a8ebb5a029 | ||
|
|
bd67c09866 | ||
|
|
cac66b0176 | ||
|
|
18d5d86346 | ||
|
|
8ed5317593 | ||
|
|
f2167ac6fe | ||
|
|
09d622339a | ||
|
|
d922c751d5 | ||
|
|
529b689a35 | ||
|
|
50ad2bb2e7 | ||
|
|
70b686742c | ||
|
|
0c0f6961cb | ||
|
|
55fcbecc93 | ||
|
|
8dedc77abd | ||
|
|
45fe0becc7 | ||
|
|
5530d73ca0 | ||
|
|
e80f1861d0 | ||
|
|
c7fab5a23d | ||
|
|
8aea6870a7 | ||
|
|
f677652d7d | ||
|
|
a27ca7142b | ||
|
|
8ee4f373fe | ||
|
|
1a53f723c4 | ||
|
|
6c1036e9e9 | ||
|
|
bfa5cea589 | ||
|
|
2d3fabf22f | ||
|
|
9d432c2f96 | ||
|
|
cd20b58e1b | ||
|
|
057bccc78e | ||
|
|
62f50bfa0e | ||
|
|
028d675264 | ||
|
|
adccef1bd0 | ||
|
|
eacffc9508 | ||
|
|
d89fd19f87 | ||
|
|
78dc4e83a2 | ||
|
|
5cb0f9b3a5 | ||
|
|
85bb7d41e1 | ||
|
|
66dd5d22e6 | ||
|
|
a367726d57 | ||
|
|
0a474992c2 | ||
|
|
05f883f5b6 | ||
|
|
08cc81743b | ||
|
|
c6e0fe3855 | ||
|
|
46f5b022e5 | ||
|
|
301e78d7db | ||
|
|
de549ecdd3 | ||
|
|
d8880ebb77 | ||
|
|
383ddaa39e | ||
|
|
ebb80c587e | ||
|
|
c50b3669ee | ||
|
|
2a0c24e934 | ||
|
|
44bb96f2c8 | ||
|
|
8a846eb737 | ||
|
|
1209ae2cc8 | ||
|
|
ce69e17c53 | ||
|
|
c577abf769 | ||
|
|
4794f2b309 | ||
|
|
6fe89cc83a | ||
|
|
edf587b5d0 | ||
|
|
cef800524a | ||
|
|
44fb34e048 | ||
|
|
fa5b3494ce | ||
|
|
980b21ed3a | ||
|
|
565c6e3ba5 | ||
|
|
de4153065e | ||
|
|
a7cef089a8 | ||
|
|
c2a0b5322c | ||
|
|
1b4ae4ff25 | ||
|
|
0d4e66328c | ||
|
|
91ba6c2dc6 | ||
|
|
a57801b074 | ||
|
|
c1b5a2d0ef | ||
|
|
785183c7fb | ||
|
|
c2929809ff | ||
|
|
840d2ef409 | ||
|
|
a9274b2f0c | ||
|
|
32931e7d08 | ||
|
|
410b70f907 | ||
|
|
0aa1bd5e97 | ||
|
|
d7542b9af8 | ||
|
|
859145de52 | ||
|
|
5d2db8f012 | ||
|
|
1fa83a74f5 | ||
|
|
cb9aff42c7 | ||
|
|
1124ea7c72 | ||
|
|
ec80b47977 | ||
|
|
1fd687f7c2 | ||
|
|
f1fa35441e | ||
|
|
d7b7242847 | ||
|
|
a2e485757c | ||
|
|
2c79e71d98 | ||
|
|
c2d9124553 | ||
|
|
806bb88530 | ||
|
|
ea696a2362 | ||
|
|
87234fd57b | ||
|
|
31ec94faa5 | ||
|
|
2dcfebc67f | ||
|
|
d81b18a210 | ||
|
|
185087e553 | ||
|
|
26f74e40f6 | ||
|
|
ff76bf8ba7 | ||
|
|
099100a9d3 | ||
|
|
94d05dfaf8 | ||
|
|
f10a6beefc | ||
|
|
fa7fc23f44 | ||
|
|
f34a1f4807 | ||
|
|
8b4829abab | ||
|
|
f21dfb358d | ||
|
|
5a1a08f160 | ||
|
|
0cc2d916f1 | ||
|
|
dbe2343a7d | ||
|
|
bd118b7212 | ||
|
|
175116ac7d | ||
|
|
12cf52e468 | ||
|
|
c5162fa6e8 | ||
|
|
8aa2e2453e | ||
|
|
2488bbf9fc | ||
|
|
4dd906e7a7 | ||
|
|
4e3c34eab6 | ||
|
|
2083f3e262 | ||
|
|
c400e38f98 | ||
|
|
b2e2fe6ea3 | ||
|
|
115418d968 | ||
|
|
64fb36c3d8 | ||
|
|
2255a7225d | ||
|
|
f4dc453e09 | ||
|
|
a8749b2614 | ||
|
|
1c92d4b28d | ||
|
|
15c38b93e2 | ||
|
|
1fc3556064 | ||
|
|
31b514d831 | ||
|
|
752742d044 | ||
|
|
e49d754fdc | ||
|
|
22f7b3ee23 | ||
|
|
a704364549 | ||
|
|
21c7e08b21 | ||
|
|
2d509b1d84 | ||
|
|
5ef9c5a5bf | ||
|
|
77d170539a | ||
|
|
9255c12c87 | ||
|
|
f2b3c6e6a3 | ||
|
|
f6238492bc | ||
|
|
fab341df09 | ||
|
|
e11dcc5426 | ||
|
|
bee067608a | ||
|
|
9eea275ed7 | ||
|
|
39e60a0564 | ||
|
|
ac5905d0db | ||
|
|
c962023b0d | ||
|
|
a9d9b8581b | ||
|
|
78bd6b2844 |
7628
ChangeLog.pre-2-10
7628
ChangeLog.pre-2-10
File diff suppressed because it is too large
Load Diff
6062
ChangeLog.pre-2-2
6062
ChangeLog.pre-2-2
File diff suppressed because it is too large
Load Diff
7628
ChangeLog.pre-2-4
7628
ChangeLog.pre-2-4
File diff suppressed because it is too large
Load Diff
7628
ChangeLog.pre-2-6
7628
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
7628
ChangeLog.pre-2-8
7628
ChangeLog.pre-2-8
File diff suppressed because it is too large
Load Diff
8
INSTALL
8
INSTALL
@@ -4,8 +4,6 @@ Prerequisites
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, and Atk libraries, available at the same location as GTK+
|
||||
(Either Pango-1.0 or Pango-1.2 can be used with GTK+-2.2;
|
||||
Pango-1.2 is recommended.)
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
@@ -22,8 +20,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.3.0.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.3.0 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.0.6.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.0.6 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
@@ -35,7 +33,7 @@ The Details
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/html/gtk-building.html
|
||||
docs/reference/gtk/docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ Prerequisites
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, and Atk libraries, available at the same location as GTK+
|
||||
(Either Pango-1.0 or Pango-1.2 can be used with GTK+-2.2;
|
||||
Pango-1.2 is recommended.)
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
@@ -35,7 +33,7 @@ The Details
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/html/gtk-building.html
|
||||
docs/reference/gtk/docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
|
||||
40
Makefile.am
40
Makefile.am
@@ -4,10 +4,11 @@ SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib
|
||||
SUBDIRS = po $(SRC_SUBDIRS) docs build m4macros
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
gtk+.spec.in \
|
||||
makecopyright \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
@@ -15,9 +16,9 @@ EXTRA_DIST = \
|
||||
ChangeLog.pre-2-0 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
README.nanox \
|
||||
config.h.win32 \
|
||||
makefile.msc \
|
||||
gtk-zip.sh.in \
|
||||
gtk-zip.sh \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/makefile.mingw \
|
||||
@@ -149,17 +150,14 @@ install-data-hook:
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gdk-2.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-2.0.pc
|
||||
|
||||
dist-hook:
|
||||
dist-hook: gtk+.spec
|
||||
if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi
|
||||
fi \
|
||||
&& cp gtk+.spec $(distdir)
|
||||
|
||||
.PHONY: files release sanity snapshot
|
||||
|
||||
@@ -186,4 +184,26 @@ snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
|
||||
# This is a version of the automake-1.4 distcheck rule modified
|
||||
# to pass --enable-gtk-doc to ./configure
|
||||
#
|
||||
mydistcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base --enable-gtk-doc \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
|
||||
640
NEWS
640
NEWS
@@ -1,633 +1,3 @@
|
||||
Overview of Changes from GTK+-2.2.x to GTK+-2.3.0
|
||||
=================================================
|
||||
|
||||
* New Widgets
|
||||
- GtkFileChooser: a replacement for GtkFileSelection with
|
||||
replaceable backends, many new API features, better user
|
||||
interface (UI is still a work in progress) [Owen Taylor,
|
||||
Federico Mena Quintero]
|
||||
- New combo box widgets: GtkComboBox, GtkComboBoxEntry [Kristian Rietveld]
|
||||
- New "disclosure triangle" widget: GtkExpander [Marc McLoughlin]
|
||||
- "Picker button" widgets based on code from libgnomeui:
|
||||
GtkFontButton, GtkColorButton [Matthias Clasen]
|
||||
|
||||
* Widget improvements:
|
||||
- Autocompletion for entries: GtkEntryCompletion [Kristian]
|
||||
- Add separate padding for all 4 sides of GtkAlignment [Murray Cumming]
|
||||
- Add input-only event boxes for trapping events [Alex Larsson]
|
||||
- Support RTL flipping for GtkHPaned, tab navigation [Soeren, Matthias]
|
||||
- Support up to four scroll arrows on GtkNotebook and make which
|
||||
ones are displayed themeable. [Matthias]
|
||||
- GtkCalendar improvements: make the arrows spin, support RTL flipping,
|
||||
automatic week start selection, DND support, improve API
|
||||
for setting options [Matthias]; mousewheel support [Abigail Brady]
|
||||
- New properties: GtkButton::focus_on_click, GtkCheckMenuItem::draw_as_radio
|
||||
[Soeren, Matthias]
|
||||
- New functions: gtk_window_set_default_icon(),
|
||||
gtk_message_dialog_add_buttons(), gtk_button_box_get_child_secondary()
|
||||
[Matthias]
|
||||
- Add missing "role", "decorated", "gravity" properties for GtkWindow,
|
||||
"has_resize_grip" for GtkStatusBar. [Matthias]
|
||||
- Add child properties for GtkPaned [Matthias, Soeren]
|
||||
|
||||
* Menus
|
||||
- New action-based menu API: GtkUIManager, GtkActionGroup,
|
||||
GtkAction, etc. [James Henstridge, Matthias, Soeren Sandmann,
|
||||
Marco Pesenti Gritti, Philip Langdale]
|
||||
- Support for tabular menus [Kristian]
|
||||
- New positioning algorithm for popup menus [Soeren]
|
||||
|
||||
* GtkTextView [Matthias]
|
||||
- Add properties "accepts_tab" [Soeren], "overwrite" property
|
||||
[Jeroen Zwarepoorte], "buffer"
|
||||
- Add gtk_text_buffer_select_range()
|
||||
- Implement drag-selection by words/lines (also for Gtkentry)
|
||||
- Some fixes to invisible text handling
|
||||
- Add support for GTK_WRAP_WORD_CHAR [David Brigada]
|
||||
- Clean up handling of horizontal paging
|
||||
- Fix scrolling with non-visible cursor
|
||||
- Add internals documentation [Havoc Pennington]
|
||||
|
||||
* GtkToolbar [Soeren]
|
||||
- Add a more constistent and extensible toolbar API; preserve
|
||||
old API for backwards compatibility [James, Anders Carlsson, Owen]
|
||||
- Support for sliding buttons like OS X
|
||||
- Keyboard navigation
|
||||
- Support "priority text"
|
||||
- Overflow menu
|
||||
- Better handling of really wide buttons [David Bordoley]
|
||||
- Drawing improvements
|
||||
- Support context menu
|
||||
|
||||
* GtkTreeView [Kristian Rietveld]
|
||||
- Handle RTL [Matthias, Jonathan]
|
||||
- Add expand flag to column packing parameters [Jonathan, Kristian]
|
||||
- gtk_tree_path_free now silently returns on NULL paths
|
||||
- Move row reference updating code to closures
|
||||
- Fix TreeView DnD: make TreeStore DnD work, make drops on empty views work,
|
||||
get rid of gtk-tree-model-drop-append.
|
||||
- Add a filtering tree model: GtkTreeModelFilter [Kristian]
|
||||
|
||||
* gdk-pixbuf
|
||||
- Add a loader for PCX files [Josh Beam]
|
||||
- Improve calculation of filter weights for scaling [Brian Cameron, Owen]
|
||||
- Support TGA files with arbitrary origins [Matthias]
|
||||
- Add gdk_pixbuf_loader_new_with_mime_type() [Dom Lachowicz]
|
||||
gdk_pixbuf_new_from_file_at_size() [Dom, Owen, Matthias]
|
||||
- Add saving support for ICO and CUR
|
||||
- Improve handling of GIFs with oversized frames [Matthias]
|
||||
|
||||
* GDK:
|
||||
- Support for full-color / alpha-channel cursors [Matthias]
|
||||
- Remove support for non-X fonts and for pango-1.0; always require Xft2 [Owen]
|
||||
- Fix handling of recursive calls to gdk_window_begin_paint() [Soeren]
|
||||
- Many small changes to reduce round trips on startup;
|
||||
add gdk_display_flush() [Owen]
|
||||
- Use Xlib asynchronous APIs to reduce roundtrips on startup
|
||||
and during DND [Owen]
|
||||
- Other changes to improve DND for large-latency connections [Owen]
|
||||
- Add support for EWMH "above" and "below" states [Manuel Clos] (also
|
||||
in GtkWindow)
|
||||
- Add Add GDK_MOUSE_DEVICE envvar for linux-fb backend [Marc Welz]
|
||||
- Other small linux-fb fixes [Eric Warmenhoven]
|
||||
|
||||
* Miscellaneous
|
||||
- Add support for named themable icons; use this facility to
|
||||
provide the default stock icon images [Owen Taylor, based
|
||||
on code by Alex Larsson]
|
||||
- Add gtk_widget_queue_resize_no_redraw() for more efficient
|
||||
resizing; use for GtkTextView. Redraw less on focus changes. [Soeren]
|
||||
- Add gtk_widget_queue_resize_no_redraw() [Soeren]
|
||||
- Default theme improvements, especially for menus. Add some
|
||||
more style properties. [Soeren]
|
||||
- Add authentication stock icon [Matthias, art by Jakub Steiner]
|
||||
- Allow "none" to be set for input method GtkSettings [Hidetoshi Tajima]
|
||||
- Convert build system to automake-1.7; many cleanups and
|
||||
improvements. [James Henstridge, Owen]
|
||||
- Win32 fixes for new widgets [Hans Breuer]
|
||||
- Add right-to-left variants of some stock icons [Matthias]
|
||||
|
||||
* Documentation
|
||||
- Use XML source for man pages; add man pages for tools that didn't
|
||||
have them before [Matthias]
|
||||
- Tutorial improvements [Sebasitian Rittau, Tony Gale, Roger Leigh, Matthias]
|
||||
- FAQ improvements [Tony, Gonzalo Odiard, Owen]
|
||||
- Misc documentation improvements [Matthias, Frederic Lespez, Tomas Ogren,
|
||||
Martin Pool, Mariano Suarez-Alvarez]
|
||||
|
||||
* Deprecations
|
||||
- GtkItemFactory [Replaced by GtkUIManager]
|
||||
- GtkCombo, GtkOptionMenu [Replaced by GtkComboBox]
|
||||
- Miscellaneous functions that were renamed in
|
||||
GTK+-2.0 and GTK+-2.2 [Matthias, Manish Singh, Soeren]
|
||||
|
||||
Other contributors: Krasimir Angelov, Archit Baweja, Sebastien Bacher,
|
||||
Steve Chaplin, John Darrington, Daniel Elstner, Marco Pesenti Gritti,
|
||||
Jody Goldberg, David Hampton, Richard Kinder, Christian Persch,
|
||||
Roozbeh Pournader, Christian Reis, Christian Rose, Joe Shaw,
|
||||
Vasilis Vasaitis, Morten Welinder
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Overview of Changes in GTK+ 2.2.4
|
||||
=================================
|
||||
* Revert TreeView fix which broke context menus in different applications
|
||||
[Kristian Rietveld]
|
||||
* Typo fixes [Kjartan Maraas]
|
||||
* Make pressing END not put the menu in scrolling mode [Kris]
|
||||
* Misc bug fixes [Tor Lillqvist, Bruce Hochstetler, Kjartan, Tony Gale]
|
||||
* New and updated translations (sq, cy, hi, nl, de, es, zh_CN, ja, no, el)
|
||||
|
||||
Overview of Changes in GTK+ 2.2.3
|
||||
=================================
|
||||
* GdkPixbuf [Matthias Clasen]
|
||||
- Fix some problems with overflows when scaling down [Tomas Ögren]
|
||||
- Many GIF bug fixes [Matthias, Federico Mena Quintero]
|
||||
- Prefer 32-bpp ICOs, fix bugs with them
|
||||
- Fix problem with absolute filenames and gdk-pixbuf-query-loaders
|
||||
[Jens Elker]
|
||||
- Make gdk-pixbuf-csource include alignment magic [Brian Cameron]
|
||||
* Win32 [Tor Lillqvist]
|
||||
- Add multiple monitor support
|
||||
- Major event and key handling rewrite, including IME fixes
|
||||
- Fix handling of toplevel window positions
|
||||
- Add support for all window geometry hints (gridded geometry, etc.)
|
||||
- Fix DND to ignore drag window [Tony M Brown, Herman Bloggs]
|
||||
- Fix GdkImage memory leak [J. Ali Harlow]
|
||||
- Remove leftover OwnerGrabButtonMask emulation (fixes lots)
|
||||
- Misc bug fixes [Many from Hans Breuer, Tim Evans]
|
||||
- Build fixes and improvements [Peter Zelezny]
|
||||
* X11
|
||||
- Fix extremely common crash where we interpreted the timestamp
|
||||
field of a XKB event as a window ID and found a pixmap that matched.
|
||||
[Owen Taylor, with essential backtrace from Kjartan Maraas]
|
||||
- Fix CapsLock and NumLock for non-XKB [Robert Basch]
|
||||
- Fix problems with, eg. Ctrl-Alt-Backspace hiding Cntrl-Backspace [Owen]
|
||||
- Workaround Xinerama servers reporting wrong depths [Owen]
|
||||
* GtkTreeView [Kristian Rietveld]
|
||||
- Fix scrolling once more [Pedro Gimeno, Michael Natterer, Timo Sirainen]
|
||||
- Don't get confused by the Control key when handling selection
|
||||
from an accelerator like <Control>B [Michael Natterer]
|
||||
- Many misc fixes [Matthias, Marco Pesenti Gritti, Tim Janik, Alex Larsson,
|
||||
Tim-Philipp Müller, Michael Natterer, Josh Parsons, Yann Rouillard,
|
||||
Rene Seindel, Owen Taylor, Alp Toker, Morten Welinder]
|
||||
* Input methods
|
||||
- Handle input methods exiting and starting while the
|
||||
app is running [Hidetoshi Tajima]
|
||||
- Fix infinite loop when closing input methods [Owen,
|
||||
Takuro Ashie, Hidetoshi]
|
||||
- Add a 'cedilla' input method with c+acute => cedilla and use
|
||||
as the default for languages that use cedilla. [Gustavo De Nardin,
|
||||
Owen, Fco. Javier F. Serrador]
|
||||
- Fix status window for multihead [Owen, James Su]
|
||||
- Remember imcontext attributes when switching methods [Owen,
|
||||
Botond Botyanszki]
|
||||
* GtkFileSelection [Owen]
|
||||
- Fix selection of "UntitledN" on initial map [Mark Finlay]
|
||||
- Fix an annoying bug with cursor positioning on failed completion
|
||||
- Misc Fixes [Owen, Tor]
|
||||
* Other widgets
|
||||
- Fix problem with GtkOptionMenus coming up in the wrong place [Kristian]
|
||||
- Fix problem with spinbuttons not getting enough space [Morten Welinder,
|
||||
Kristian]
|
||||
- Fix an infinite loop when resizing GtkTextView [Owen, Frederic Crozat]
|
||||
- Don't include menu labels in gtk_notebook_forall [Owen]
|
||||
- Fix problem with XEMBED (GtkPlug) clients that don't take focus stealing
|
||||
focus [Owen]
|
||||
- Accept color drops with wrong format from KDE [Matthias]
|
||||
* Fix problem from gnome-theme-manager playing tricks and
|
||||
making event->window a pixmap. [Anders Carlsson]
|
||||
* Ignore Caps-lock when matching accelerators
|
||||
* Fix 5-year-old bug where toplevels didn't fully refresh properly
|
||||
on theme change [Owen, Rajkumar Siva]
|
||||
* Don't require precompiled gdk-pixbuf-csource when cross-compiling
|
||||
from a tarball [Owen]
|
||||
* Documentation improvements [Matthias, Noah Levitt, Tor, Doug Quale,
|
||||
Morten Welinder]
|
||||
* Misc bug fixes [Keith Bissett, Botond Botyanszki, Damien Carbery,
|
||||
Arno Charlet, Felipe Heidrich, Charles Kerr, George Lebl, Noah, Tor,
|
||||
Callum McKenzie, Michael Meeks, Denis Mikhalkin, Thomas Mirlacher,
|
||||
Kristian, Masahiro Sakai, Soeren Sandmann, Benedikt Spranger, Owen,
|
||||
Luis Villa]
|
||||
* New and updated translations (ar,az,cs,cy,be,de,es,fi,fr,he,hi,hu,id,is,it,
|
||||
ko,lt,ml,mn,nl,ne,no,pl,pt,pt_BR,ru,sk,sr,sr@Latn,ta,wa,zh_TW,zh_CN)
|
||||
|
||||
Overview of Changes in GTK+ 2.2.2
|
||||
=================================
|
||||
|
||||
* GdkPixbuf [Matthias Clasen]
|
||||
- Fix animation of slow-loading progressive GIFS
|
||||
- Fix long-standing animated GIF display bug with transparency
|
||||
- Misc bug and portability fixes [Rick Jones, Tim Mooney, Marijn Ross]
|
||||
* GDK [Owen Taylor]
|
||||
- Draw continuous underlines between Pango layout runs when
|
||||
possible [Kang Jeong-Hee]
|
||||
- Fix gdk_pixbuf_from_drawable() for big endian [Christian Petig]
|
||||
Major rewrite of 16-bit handling for pixbuf_from_drawable()
|
||||
* X11 backend [Owen]
|
||||
- Fix build on X11R5 [Albert Chin]
|
||||
- Fix switching keyboard layouts while running [Egmont Koblinger]
|
||||
- Work around RENDER extension bugs on certain Sun X servers [Morten Welinder]
|
||||
- Zero unused fields in client messages we send Lubos Lunak]
|
||||
- Fix occasional segfault when drawing pixbufs [Hans Petter Jansson]
|
||||
- Fix wrong initializaiton that was keeping XShm from being used.
|
||||
* Win32 backend [Tor Lillqvist]
|
||||
- Tweak line drawing
|
||||
- Mouse/cursor fixes [Allin Cottrell]
|
||||
- Better handling of floppy drives in GtkFileSelection
|
||||
- Misc fixes [Arnaud Charlet, Cedric Gustin, Martyn Russell]
|
||||
* Input methods [Hidetoshi Tajima]
|
||||
- Add rules for Greek accents to GtkIMContextSimple [Vasilis Vasaitis]
|
||||
- Fix sorting of rules in GtkIMContextSimple [Vasilis]
|
||||
- Miscellaneous GtkIMContextXIM fixes
|
||||
- Fix translation of input context names
|
||||
* Fix keyboard accelerators/bindings on Numeric Keypad [Owen, Olivier Ripoll]
|
||||
* Add Delete to GtkEntry context menu, Delete/Select All
|
||||
to GtkTextView context menu [Matthias]
|
||||
* Keynav tweaks in GtkFileSelection, GtkColorSel [Matthias]
|
||||
* Add C-A-PgUp/Down as alternative notebook page switching keys [Matthias]
|
||||
* GtkTextView
|
||||
- Fix redrawing on color-only changes [Owen, Gustavo Giráldez]
|
||||
- Don't scroll to cursor on focus in [Paolo Maggi]
|
||||
- Fix spot location reported to input method [Owen, TOKUNAGA Hiroyuki,
|
||||
Yao Zhang]
|
||||
- Miscellaneous bug fixes [Torbjörn Andersson, Matthias, Manual Clos,
|
||||
Padraig O'Briain, Owen]
|
||||
* GtkTreeView [Kristian Rietveld]
|
||||
- Fix prelighting [Sven Neumann]
|
||||
- Set drag cursor earlier to allow apps to override [Daniel Elstner]
|
||||
- Speed up insertions into GtkTreeModelSort [Owen, Jonathan Blandford]
|
||||
- Get background/cell area handling right in GtkTreeViewColumn [Vasco
|
||||
Alexandre da Silva Costa]
|
||||
- Bug fixes [Benjamin Bayart, Jonathan Blandford, Peter Bloomfield,
|
||||
Dave Cook, Felipe Heidrich, Richard Hult, Markus Lausser, Michael Natterer,
|
||||
Mariano Suarez-Alvarez, Owen]
|
||||
* Fix handling of border width for GtkToolbar [Rodney Dawes]
|
||||
* Rewrite adjustment handling of GtkViewport, fixing many bugs
|
||||
[Owen, Thomas Leonard, Michael]
|
||||
* Misc bug fixes [Dennis Björklund, Jonathan, Dave Bordoley, Rich Burridge,
|
||||
Anders Carlsson, Arnaud, Matthias, Vasco Alexandre da Silva Costa,
|
||||
Tim Evans, Larry Ewing, John Finlay, Jeff Franks, Jody Goldberg,
|
||||
Jason D. Hildebrand, Charles Kerr, Alex Larsson, Noah Levitt, Xan Lopez,
|
||||
Loban Rahman, Richard Reich, Soeren Sandmann, Charles Schmidt,
|
||||
Rajkumar Siva, Owen, Sergey V. Udaltsov, Morten Welinder, Michael Zucchi]
|
||||
* Code cleanups [Matthias, Glynn Foster, Britton Kerin, Sven Neumann,
|
||||
Doug Quale, Manish Singh, Morten Welinder]
|
||||
* Switch to using libtool-1.5
|
||||
* Build fixes [Matthias, J. Ali Harlow, Rich Kinder, Jon Nall, Sven,
|
||||
Christian Rose]
|
||||
* Documentation improvements [Matthias, Noah Levitt, Sven Neumann]
|
||||
* New and updated translations (am,az,be,ca,cs,cy,da,de,el,es,fa,fi,fr,id,
|
||||
it,ko,li,ml,mn,ms,nl,no,pl,pt,sr,sr@Latn,sv,ta,uk,yi,zh_TW)
|
||||
|
||||
Overview of Changes in GTK+ 2.2.1
|
||||
=================================
|
||||
* Win32 [Tor Lillqvist]
|
||||
- Improve setting of window position / decorations
|
||||
- Implement gdk_pixmap_foreign_new() [Naofumi Yasufuku]
|
||||
- Fix various file selection bugs
|
||||
- Improve scheme for locating pixbuf loader modules
|
||||
- Miscellaneous fixes [Alex Shaduri, Kenichi SUTO, Ed Woods]
|
||||
* GtkTreeView [Kristian Rietveld]
|
||||
- made GtkTreeSortable work as the documentation advertises [Jarek Dukat]
|
||||
- fixed gtk_tree_view_set_sort_column_id so you can disable sorting [Soeren
|
||||
Sandmann, Jarek Dukat]
|
||||
- TreeView search now works on all values transformable by GValue and not
|
||||
just strings [Muktha Narayan]
|
||||
- _move/_swap fixage in the Stores [Matthew Tuck, Paolo Maggi]
|
||||
- a lot of misc bug fixes [Alex Duggan, Carlos Garnacho Parro, Hans Petter
|
||||
Jansson, Kjartan Maraas, Soeren, Dave Camp, Murray Cumming, Dave Cook,
|
||||
Gaël Le Mignot, Vasco Alexandre da Silva Costa]
|
||||
* GtkTextView [Matthias Clasen]
|
||||
- Fix keynav with invisible cursor
|
||||
- Fix misdrawing of cursor [Owen Taylor] and selection
|
||||
- Many miscellaneous fixes [Narayana Pattipati, Daniel Elstner]
|
||||
* Fix problem with accidental inclusion of a main() [Matthias]
|
||||
* Documentation improvements [Matthias, Havoc Pennington]
|
||||
* Fix problem with GtkColorsel and pixmap themes [Daniel]
|
||||
* Fix race condition with GdkRGB in PseudoColor [Shivaram Upadhyayula]
|
||||
* Warning fixes [Manish Singh]
|
||||
* configure fixes [Akira Tagoh]
|
||||
* New and updated translations (ca,de,es,et,ko,mn,pl,pt,vi,zh_CN)
|
||||
* Miscellaneous bug fixes [Matthias, Daniel, Martin Gansser, Louis Garcia,
|
||||
Tommi Komulainen, Thomas Leonard, Ian Peters, Arvind Samptur,
|
||||
Soeren Sandmann, Hidetoshi Tajima, Owen]
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Overview of Changes in GTK+ 2.2.0
|
||||
=================================
|
||||
* Fix problem with the DND code and event filters [Bolian Yin, Owen Taylor]
|
||||
* GtkTreeView bug fixes [Kristian Rietveld, Soeren Sandmann, Matthias Clasen]
|
||||
* Documentation improvements [Matthias Clasen, Eric Warmenhoven,
|
||||
James M. Cape]
|
||||
* Example portability fix [Sven Neumann]
|
||||
* Updated translations (es,ja,lv,ms,nl,ru,sk,sv)
|
||||
|
||||
Overview of Changes in GTK+ 2.1.5
|
||||
=================================
|
||||
* GtkFileSel fixes [Owen Taylor]
|
||||
- Fix ..<tab> to go up a dir [Francisco Bustamante]
|
||||
- Fix UTF-8 operation, so that non-ASCII works [Kang Jeong-Hee]
|
||||
- Use g_utf8_collate() not strcmp for sorting [Gregory Merchan]
|
||||
* Only close dialogs on Escape if they have a cancel button. [James Willcox]
|
||||
* Fix problem with resizing gnome-terminal popup [Soeren Sandmann]
|
||||
* Add Home/End/Page_Up/Page_Down keybindings for menus [Owen,
|
||||
Narayana Pattipati, Marius Andreiana]
|
||||
* Xinerama fixes for GtkMenu [Matthias Clasen]
|
||||
* Fix long-standing problem with Ami and GtkEntry [Owen, Kang Jeong-Hee]
|
||||
* Documentation additions and fixes [Matthias]
|
||||
* New and updated translations (am,bg,da,fr,fi,de)
|
||||
* Miscellaneous bug and build fixes
|
||||
|
||||
Other contributors: Johan Dahlin, James Henstridge, Jon Nelson,
|
||||
Bastien Nocera, Christian Reis, Arvind Samptur, Anand Subra, Simon Wong
|
||||
|
||||
Overview of Changes in GTK+ 2.1.4
|
||||
=================================
|
||||
* Improved default color scheme [Soeren Sandmann, with advise from
|
||||
Tuomas Kuosmanen and Garrett LeSage]
|
||||
* Make pixmap creation functions take a GdkDrawable not a GdkWindow
|
||||
[Kristian Rietveld]
|
||||
* Support move-resize emulation for all edges. [Matthias Clasen]
|
||||
* Many fixes for X11 gdk_colormap_alloc_colors [Naofumi Yasufuku, Owen]
|
||||
* Remove extra selections for ButtonRelease in XInput code
|
||||
[Garry Osgood, Owen]
|
||||
* Another attempt at fixing X focus tracking [Owen]
|
||||
* linux-fb VT switch improvements [Eric Warmenhoven]
|
||||
* Win32 [Tor Lillqvist]
|
||||
- Bug and win98 portability fixes for new tile/stipple code [Hans Breuer]
|
||||
- Improve maximized/minimized tracking
|
||||
- Bug fixes
|
||||
* Fix problem with gtk_combo_set_popdown_strings() not changing
|
||||
the entry text [Owen]
|
||||
* Support RTL flipping for statusbars [Matthias]
|
||||
* GtkTreeView bug fixes [Kristian Rietveld, Juri Pakaste, Erik Simonsen,
|
||||
Richard Hult, Carlos Garnacho Parro]
|
||||
* Use octal escapes rather than literal UTF-8 in strings [Owen]
|
||||
* Make a lot of read-only data const. [Matthias, Morten Welinder]
|
||||
* Misc bug fixes
|
||||
* New and updated translations (cs,es,el,he,hu,lv,no,ro)
|
||||
|
||||
Other contributors: Anders Carlsson, Chris Blizzard, Stephen Brown,
|
||||
Erwann Chenede, Jon-Kare Hellan, John Finlay, Jarred Keuch,
|
||||
Kjartan Maraas, Christian Neumair
|
||||
|
||||
Overview of Changes in GTK+ 2.1.3
|
||||
=================================
|
||||
|
||||
GDK:
|
||||
* Win32 [Tor Lillqvist]
|
||||
- fixes to multihead API stubs
|
||||
- Comprehensively implement tiles and stipples
|
||||
- Handle tracking minimized/maximized [Arnaud Charlet]
|
||||
* linux-fb fixes [Eric Warmenhoven]
|
||||
* Use g_get_application_name() for default window titles and
|
||||
for the title of the client leader window [Owen, Havoc Pennington]
|
||||
* Complete resize-grippy support, move-resize emulation
|
||||
[Anders Carlsson, Matthias Clasen]
|
||||
|
||||
GTK+ Core:
|
||||
* On screen change, recreate the widget's Pango context [Owen]
|
||||
* Fix problems with focus ending up on unmapped widgets [Owen]
|
||||
* Make g_object_set (gtk_settings_get_default (), ...) to override
|
||||
settings from XSETTINGS and ~/.gtkrc [Jonathan Blandford]
|
||||
* Make GtkInputDialog multihead aware [Owen]
|
||||
* Add a ::screen-changed signal to GtkWidget [Owen Taylor]
|
||||
|
||||
Widget improvements:
|
||||
* Draw/check menu items insensitive [Soeren, Tim Evans]
|
||||
* Fix color usage for radio/check menu item indicators [Soeren]
|
||||
* Add ::snap-edge-set-property to GtkHandleBox [Owen, Matthias]
|
||||
* RTL flipping improvements for GtkHandleBox, GtkMenuItem, GtkOptionMenu,
|
||||
GtkCheckMenuItem [Matthias Clasen]
|
||||
* GtkCombo improvements [Owen]
|
||||
- Don't leave it behind when switching desktops [Matthias Clasen]
|
||||
- Fix longstanding bug with unwanted moving of selection [Mike Fulbright]
|
||||
- Don't change entry contents until window is popped back up
|
||||
- Keynav fixes
|
||||
* Menu scrolling behavioral improvements [Owen, Ettore Perazzoli]
|
||||
* GtkNotebook keynav improvements [Owen]
|
||||
* Handle painting text on dark-colored progressbars [Soeren]
|
||||
* GtkTreeView [Kristian Rietveld]
|
||||
- Privatize gtk_tree_store_move(), add gtk_tree_store_move_before/after()
|
||||
- Add GTK_CELL_RENDERER_FOCUSED flag
|
||||
- Keynav fixes, including adding boolean return values for keybinding
|
||||
signals (API breakage for API that noone should have been using)
|
||||
[Narayana Pattipati]
|
||||
- Add gtk_tree_view_column_cell_get_position()
|
||||
- Add an inconsistent state for GtkCellRendererToggle
|
||||
- Various bug fixes [Murray Cumming, Daniel Elstner, Vitaly Tishkov,
|
||||
Morten Welinder, Robert Kinsella, Soeren]
|
||||
|
||||
Input Methods:
|
||||
* Sort the input method list in the right click popup [Abigail Brady]
|
||||
* GtkIMContextXIM bug fixes [HideToshi Tajima]
|
||||
|
||||
General:
|
||||
* Make sure that parameters don't shadow system functions [Soeren Sandmann]
|
||||
* Deprecation cleanups [Manish Singh]
|
||||
* Don't grab the focus to the default button in a GtkDialog [Daniel Elstner]
|
||||
* Doc improvements, including adding Since: for 2.2. additions
|
||||
[Matthias Clasen]
|
||||
* Bug fixes, cleanups [Anders Carlsson, Daniel, Vitaly Tishkov, Matthias,
|
||||
Iain Holmes, Gregory Merchan, Havoc Pennington, Soeren, Morten Welinder]
|
||||
* Build fixes [Owen, Jeff Waugh, Dan Mills]
|
||||
|
||||
Overview of Changes in GTK+ 2.1.2
|
||||
=================================
|
||||
|
||||
* Fixes for GtkIMContextXIM [HideToshi Tajima, Owen Taylor]
|
||||
* Remove usage of XLookupString outside of GtkIMContextXIM [Owen]
|
||||
* Handle Shift/Caps/Num_Lock properly for non-Xkb [Owen]
|
||||
* Add a --screen option to set default screen [Balamurali Viswanathan, Owen]
|
||||
* Add simple support for startup notification [Havoc Pennington]
|
||||
* Handle focus indication for check and radio buttons without children
|
||||
[Dave Camp, Owen]
|
||||
* Much work on improve submenu navigation [Soeren Sandmann]
|
||||
* Add "selected_shadow_type" property for menus [Soeren]
|
||||
* Add "scrollbar_spacing" style property [Anders Carlsson, Owen]
|
||||
* Rework GtkPaned keynav [Soeren, Calum Benson]
|
||||
* Sensitivity and keynav fixes for GtkFileSelection [Muktha Narayan, Owen]
|
||||
* Removed mnemonics for GtkToolbar Items [Mikael Hallendal]
|
||||
* Tree view fixes and speedups
|
||||
[Kristian Rietveld, Daniel Elstner, Havoc Pennington]
|
||||
* Allow themes to set GtkTreeView even/odd row colors [Kristian]
|
||||
* Doc fixes and improvements [Matthias Clasen, Vitaly Tishkov]
|
||||
* Win32 fixes [Tor Lillqvist]
|
||||
* Misc cleanups and bug fixes
|
||||
|
||||
Other contributors: Phil Blundell, Erwann Chenede, Jeremy Katz,
|
||||
Padraig O'Briain, Havoc Pennington, Timo Sirainen, Nam SungHyun,
|
||||
Matt Wilson,
|
||||
|
||||
Overview of Changes in GTK+ 2.1.1
|
||||
=================================
|
||||
* Cleanup of use of deprecated functions in GTK+ [Manish Singh]
|
||||
* Add support for separately installed Pixbuf loaders [Matthias Clasen]
|
||||
* linux-fb improvements including window maximization. [Eric Warmenhoven]
|
||||
* Fix to compile again with Xft version 1 [Owen Taylor]
|
||||
* Fix handling of pointer on multiple screens [Owen]
|
||||
- Add gdk_event_set/get_screen() via evil hack
|
||||
- Add GdkDisplayPointerHooks to replace GdkPointerHooks
|
||||
- gdk_screen_get_window_at_pointer() => gdk_display_get_window_at_pointer()
|
||||
- Add gdk_display_get_pointer()
|
||||
- Make drag-and-drop between multiple screens work
|
||||
* Export gdk_event_new(), discourage stack allocated events [Owen]
|
||||
* gdk_draw_pixbuf() as better name for gdk_pixbuf_render_to_drawable() [Owen]
|
||||
* Basic support for RandR extension [Keith Packard, Owen]
|
||||
* Allow moving paned sliders all the way to the edge [Owen, Darin Adler]
|
||||
* Add tag_table construct property to GtkTextBuffer [Daniel Elstner]
|
||||
* gtk_window_set_[default_]icon_from_file [Owen, Havoc]
|
||||
* Fix handling of GtkSettings set from RC files on reload [Owen]
|
||||
* GtkTreeView work [Kristian Rietveld]
|
||||
- Stop editing on a focus out event for GtkCellRendererText
|
||||
[Andreas J. Guelzow]
|
||||
- Don't accept drops on auto-sorted models
|
||||
- Fix evil bug with insertions to GtkTreeModelSort [Hans Petter Jansson]
|
||||
* Fixes for GtkIMContextXIM
|
||||
[Takuro Ashie, Motonobu Ichimura, Owen, HideToshi Tajima]
|
||||
* Documentation fixes [Soeren Sandmann, Matthias Clasen; Joost Faassen,
|
||||
Alexey A. Malyshev, Ben Martin, Havoc Pennington, Boris Shingarov, Owen,
|
||||
Vitaly Tishkov, Dan Winship, Yao Zhang]
|
||||
* Some performance tweaks [Soeren, Padraig O'Briain]
|
||||
* Miscellaneous bug fixes
|
||||
|
||||
Other contributors: Jacob Berkman, Phil Blundell, Kenneth Christiansen,
|
||||
Murray Cumming, Bill Haneman, Jon-Kare Hellan, Hema Seetharamaiah
|
||||
|
||||
Overview of Changes from GTK+-2.0.x to GTK+-2.1.0
|
||||
=================================================
|
||||
|
||||
Multihead support: [Erwann Chenede, Owen Taylor]
|
||||
* Multihead support
|
||||
* Add GdkDisplay, GdkScreen structures
|
||||
* Add _for_display(), _for_screen() variants where needed in GDK and GTK+
|
||||
(In other cases, make the variants methods on GdkDisplay/GdkScreen
|
||||
* Adapt GTK+ widgets to be multihead safe
|
||||
* Allow initialization of GTK+ without opening a display with gtk_parse_args()
|
||||
* Add multihead support to demos/tests.
|
||||
|
||||
GDK:
|
||||
* Adapt win32 code to multihead reorganization [Hans Breuer, Tor Lillqvist]
|
||||
* Adapt linux-fb code to multihead reorganization [Eric Warmenhoven]
|
||||
* Miscellaneous linux-fb improvements [Eric]
|
||||
* Xinerama support [Erwann Chenede, Matthias Clasen]
|
||||
* Allow GDK backends to add custom argument parsing [Sven Neumann]
|
||||
* Add support for some addition NET window manager spec hints [Havoc Pennington]
|
||||
* Add ::keys-changed signal to GdkKeymap, handle keymap changes for keybindings [Owen]
|
||||
|
||||
GtkTreeView: [Kristian Rietveld]
|
||||
* Support stock pixbufs in GtkCellRendererPixbuf
|
||||
* Allow setting the cell background for cell renderers
|
||||
* Support focusing individual cell renderers and other focus fixes
|
||||
* Make resizing tree views more efficient [Soeren Sandmann]
|
||||
* Add gtk_tree_model_get_string_from_iter
|
||||
* Improve gtk_list_store_remove API
|
||||
* API additions:
|
||||
gtk_tree_model_sort_iter_is_valid(), gtk_tree_view_expand_to_path()
|
||||
Add gtk_tree_selection_get_selected_rows(),
|
||||
gtk_tree_selection_count_selected_rows()
|
||||
gtk_tree_path_new_from_indices(), gtk_{list,tree}_store_{reorder,swap,_move}
|
||||
|
||||
GTK+:
|
||||
* Add style property for drawing menu items without shadow [Soeren]
|
||||
* gtk_widget_modify_color_component/font(): Allow clearing
|
||||
current modifications. [Owen]
|
||||
* Add GtkWidget::is_focus, GtkWindow::is_active properties [Owen]
|
||||
* Some XEMBED changes for standards compliance and Qt compatibility [Owen]
|
||||
* Fix menus resizing when popped up or torn off [Owen]
|
||||
* Improve label behavior when it gets a too small allocation [Soeren]
|
||||
* Add support for depth 8 StaticColor visuals to gdkrgb [Matthias]
|
||||
* Theme drawing improvements [Soeren]
|
||||
* Add types for GtkRowReference, GtkClipboard [Jonathan Blandford, James Henstridge, Owen]
|
||||
* Use G_TYPE_FLAG_ABSTRACT for abstract types [Matthias]
|
||||
* Add gtk_menu_shell_select_first() [Owen]
|
||||
* Add gtk_notebook_get_n_pages() [Havoc Pennington]
|
||||
* Allow accel_path = NULL for gtk_menu_item_set_accel_path().
|
||||
* Allow icon sizes to be changed via a GtkSetting [Bill Haneman, Brian Cameron, Owen]
|
||||
|
||||
GdkPixbuf:
|
||||
* Improve gdk-pixbuf loader tests [Soeren Sandmann]
|
||||
* Use iTXT chunks when necessary in PNG image saver [Matthias]
|
||||
* Add incremental loading for progressive jpegs [Matthias]
|
||||
* Add load-at-size functionality [Matthias]
|
||||
* Add a loader for .ANI animations [Matthias]
|
||||
* Load hotspot for .ICO files [Matthias]
|
||||
|
||||
Docs:
|
||||
* Convert docs to Docbook XML [Matthias]
|
||||
* Doc improvements and fixes [Matthias, Soeren,
|
||||
Dennis Bj"orklund, Ross Burton, Manuel Clos, Alexey A. Malyshev, Brett Nash,
|
||||
Brian Tarricone, Owen, Vitaly Tishkov, Yao Zhang]
|
||||
* Tutorial improvements [Tony Gale]
|
||||
|
||||
General:
|
||||
* Add gtk-im-preedit-style/gtk-im-status-style XSETTINGS [Hidetoshi Tajima]
|
||||
* Clean up GDK and demos for deprecated functions [Manish Singh]
|
||||
* Misc fixes [Olexiy Avramchenko, Jacob Berkman, Anders Carlsson, David L. Cooper II, Robin Lu,
|
||||
Eric Mader, Mark McLoughlin, Padraig O'Briain, Laszlo Peter, Hidetoshi, Vitaly Tishkov,
|
||||
Shivaram Upadhyayula]
|
||||
|
||||
Overview of Changes in GTK+ 2.0.9
|
||||
=================================
|
||||
* Fix colormap refcounting, which caused frequent metacity crashes
|
||||
[Christopher James Lahey]
|
||||
* Lots of work on the Win32 backend [Tor Lillqvist]
|
||||
- Scrolling fixes
|
||||
- GdkGC clipping fixes and improvements
|
||||
- Started implementing all fill styles
|
||||
* GtkTreeView bug fixes [Kristian Rietveld]
|
||||
- Make TreeView reordering work on FreeBSD/Solaris [Heiner Eichmann]
|
||||
* Various bug fixes
|
||||
|
||||
Other contributors: Matthias Clasen, Arnaud Charlet, Vitaly Tishkov,
|
||||
Josh Parsons, Peter Bloomfield
|
||||
|
||||
Overview of Changes in GTK+ 2.0.8
|
||||
=================================
|
||||
* Fix typo in io-gif.c that broke loading GIFS [Akira Tagoh]
|
||||
* Improve redraws when scrolling on Win32 [Tor Lillqvist]
|
||||
* Fix problem with RENDER and XFree86-4.1 [Owen Taylor, Jamie Zawinski]
|
||||
* Fix problem with GtkImage placement [Owen, Sven Neumann, Soeren Sandmann]
|
||||
* Updated translation (el)
|
||||
|
||||
Overview of Changes in GTK+ 2.0.7
|
||||
=================================
|
||||
* Fix some memory leaks in gdk-pixbuf [Sven Neumann]
|
||||
* Pixbuf loader fixes [Federico Mena Quintero, Elliot Lee]
|
||||
* Support depth 8 StaticColor in GdkRGB [Matthias Clasen]
|
||||
* Win32 fixes and improvements [Tor Lillqvist]
|
||||
- Keyboard handling fixes [Florent Duguet]
|
||||
- Fixes for building and running on Cygwin [Masahiro Sakai]
|
||||
- Fix gdk_window_scroll(), other GdkWindow fixes
|
||||
- Misc bug and build fixes [Soren Andersen, Florent, Tim Evans,
|
||||
J. Ali Harlow, Andreas Holzmann, Iwasa Kazmi]
|
||||
* Improve tracking of toplevel focus state [Owen]
|
||||
* XIM input method fixes [Takuro Ashie, HideToshi Tajima]
|
||||
* Fix the longstanding problem with <,> keys and XIM [Owen Taylor]
|
||||
* Fix GtkIMContextSimple for us-intl keyboards [Alexandre Oliva]
|
||||
* GtkIMContextSimple updates for Eastern Europe [Stanislav Brabec]
|
||||
* Fix the "key bindings randomly stop working" problem [Sebastian Ritau]
|
||||
* GtkTextView fixes [Gustavo Giraldez, Padraig O'Briain, Shivaram Upadhyayula]
|
||||
* GtkTreeView bugfixes [Jonathan Blandford, Kristian Rietveld]
|
||||
- Various memleak, ref counting fixes [Jonathan, Jorn Baayen, Daniel
|
||||
Elstner, Morten Welinder]
|
||||
- gtk_tree_selection_selected_foreach now immediately returns if
|
||||
the model is being changed [Havoc Pennington]
|
||||
- Fix evil bug with insertions to GtkTreeModelSort [Hans Petter Jansson]
|
||||
* GtkCombo fixes [Marco Pesenti Gritti, Zimler Attila, Matthias, Owen]
|
||||
* Fix 64-bit problem with GtkFundamentalType [Ross Alexander, Manish Singh]
|
||||
* New and updated translations (am,be,bg,ca,cs,da,de,el,es,el,fa,fr,hi,hu,
|
||||
ja,ko,lv,ms,nl,no,pl,pt,pt_BR,ru,sk,sv,vi,zh_TW)
|
||||
* Many miscellaneous bug fixes
|
||||
|
||||
Other contributors: Jacob Berkman, Albert Chin, Chema Celorio,
|
||||
David L. Cooper II, Brent Fox, Tim Janik, Marco Pesenti Gritti,
|
||||
Alex Larsson, Zenith Lau, Thomas Leonard, Gaute Lindkvist,
|
||||
Paolo Maggi, Andy Wingo, Jami Pekannen, Joshua N Pritikin,
|
||||
Soeren Sandmann, Vitaly Tishkov, Morten Welinder
|
||||
|
||||
Overview of Changes in GTK+ 2.0.6
|
||||
=================================
|
||||
|
||||
@@ -664,7 +34,7 @@ Overview of Changes in GTK+ 2.0.4
|
||||
Owen Taylor]
|
||||
* Calculate screen size on win32 from the "logical DPI"
|
||||
[Joaquin Cuenca Abela, Tor Lillqvist]
|
||||
* Misc Win32 bug fixes. [Florent Duguet, Tor]
|
||||
* Misc Win32 bug fixes. [Florent Duguet, Torn]
|
||||
* Fix theme changes for GtkMenu [Soeren Sandmann]
|
||||
* Fix gdk_pixbuf_from_drawable() for big endian. [Federico Mena Quintero]
|
||||
* Fix encoding handling for gtk_file_selection_set_filename()
|
||||
@@ -676,7 +46,7 @@ Overview of Changes in GTK+ 2.0.4
|
||||
* Updated translations (ca,cs,da,es,et,fr,ms,nl,pl,pt,pt_BR,ru,sv)
|
||||
|
||||
Other contributors: Nicholas Allen, Jacob Berkman, Remus Draica,
|
||||
Nano Golveia, Tim Janik, Sergey Kuzminov, George Lebl, Garrett LeSage,
|
||||
Nano Golveia, Tim Janik, Sergey Kuzminov, George Lebl, Garrett Lesage,
|
||||
Robin Lu, Timo Meinen, Michel Selten, Boris Shingarov, Jeff Waugh
|
||||
|
||||
Overview of Changes in GTK+ 2.0.3
|
||||
@@ -724,20 +94,20 @@ Overview of Changes in GTK+ 2.0.1
|
||||
[Owen Taylor, with help from Tuomas Kuosmanen]
|
||||
* Win32 fixes, especially dashed line drawing
|
||||
[Tor Lillqvist, Hans Breuer]
|
||||
* Compile with -D_REENTRANT when appropriate [Sven Neumann]
|
||||
* Compile with -D_REENTRANT when appropriate [Sven Numann]
|
||||
* Compiler warning cleanups [Erwann Chenede]
|
||||
* Fix handling of font-name XSETTING [Richard Hestilow]
|
||||
* Make linux-fb backend compile again [Carlo E. Prelz, Alex Larsson]
|
||||
* Fix problems with inappropriate menu scroll arrows [Owen]
|
||||
* Stock icon improvements [Jakub Steiner, Tuomas]
|
||||
* Much work on pixbuf loader robustness [Matthias Clasen]
|
||||
* Documentation improvements [Matthias, Vitaly Tishkov]
|
||||
* Documentation improvements [Matthias, Vitaly Tiskkov]
|
||||
* Fix some crashes in GtkWindow accelerator handling code
|
||||
[Dave Camp, Matt Wilson]
|
||||
* Misc bug fixes
|
||||
|
||||
Other contributors: Jacob Berkman, Dennis Björklund, Seth Burgess,
|
||||
Murray Cumming, Johan Dahlin, John Ellis, Kang Jeong-Hee,
|
||||
Murray Cumming, Johan Dahlin, John Ellis, Kang Jeong-He,
|
||||
James Henstridge, Richard Hult, Thomas Leonard, LEE Sau Dan,
|
||||
Alexey A. Malyshev, Mark McLoughlin, Michael Meeks, Sven Neumann,
|
||||
Andras Salamon, Soeren Sandmann, Dan Winship, Yao Zhang
|
||||
|
||||
58
README
58
README
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.3.0. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.0.6. 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.
|
||||
@@ -25,13 +25,13 @@ Installation
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
Release notes
|
||||
=============
|
||||
GTK+-2.0.0 Specific Notes
|
||||
=========================
|
||||
|
||||
* 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.
|
||||
* The default configuration of GTK+ 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
|
||||
@@ -57,29 +57,47 @@ Release notes
|
||||
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.
|
||||
must not be used by applications. The intention was not to export
|
||||
symbols beginning with prefixes such as _gtk, _gdk, and _pango from
|
||||
the libraries at all, but due to a bug in libtool, they are actually
|
||||
exported at the moment on some platforms (including Linux).
|
||||
Applications that use these private symbols _will_ break when
|
||||
this bug is fixed.
|
||||
|
||||
* GTK+-2.3 now requires version 2 of Xft; old fashioned core X
|
||||
fonts are no longer supported.
|
||||
* The Xft library that GTK+ uses to display anti-aliased fonts will
|
||||
undergo a major version revision in the next few months. To deal with
|
||||
this, by default, GTK+ and Pango are built so that applications will
|
||||
not have explicit dependencies on version 1 on Xft. To make sure that
|
||||
your application will be binary compatible with future versions of
|
||||
GTK+:
|
||||
|
||||
- Do not configure Pango or GTK+ with the --enable-static or
|
||||
--enable-explicit otions, since they will cause dependencies on
|
||||
Xft version 1.
|
||||
|
||||
- Do not use Xft directly in your applicatons.
|
||||
|
||||
* 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.
|
||||
XFree86-4.2.
|
||||
|
||||
* Xft support is not on by default. To turn it on set the environment
|
||||
variable GDK_USE_XFT to '1'
|
||||
|
||||
GDK_USE_XFT=1
|
||||
export GDK_USE_XFT
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
* There are known problems with some of the image loaders in the
|
||||
gdk-pixbuf library included in GTK+ where corrupted images can cause
|
||||
crashes and conceivably worse problems. Until these problems are fixed
|
||||
(we hope to have this done for 2.0.1), gdk-pixbuf should not be used
|
||||
to load untrusted data.
|
||||
|
||||
* 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;
|
||||
@@ -92,7 +110,7 @@ Release notes
|
||||
G_BROKEN_FILENAMES=1
|
||||
export G_BROKEN_FILENAMES
|
||||
|
||||
Best integration of GTK+-2.2 with the environment is achieved by
|
||||
Best integration of GTK+-2.0 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
How to report bugs
|
||||
|
||||
56
README.in
56
README.in
@@ -25,13 +25,13 @@ Installation
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
Release notes
|
||||
=============
|
||||
GTK+-2.0.0 Specific Notes
|
||||
=========================
|
||||
|
||||
* 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.
|
||||
* The default configuration of GTK+ 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
|
||||
@@ -57,29 +57,47 @@ Release notes
|
||||
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.
|
||||
must not be used by applications. The intention was not to export
|
||||
symbols beginning with prefixes such as _gtk, _gdk, and _pango from
|
||||
the libraries at all, but due to a bug in libtool, they are actually
|
||||
exported at the moment on some platforms (including Linux).
|
||||
Applications that use these private symbols _will_ break when
|
||||
this bug is fixed.
|
||||
|
||||
* GTK+-2.3 now requires version 2 of Xft; old fashioned core X
|
||||
fonts are no longer supported.
|
||||
* The Xft library that GTK+ uses to display anti-aliased fonts will
|
||||
undergo a major version revision in the next few months. To deal with
|
||||
this, by default, GTK+ and Pango are built so that applications will
|
||||
not have explicit dependencies on version 1 on Xft. To make sure that
|
||||
your application will be binary compatible with future versions of
|
||||
GTK+:
|
||||
|
||||
- Do not configure Pango or GTK+ with the --enable-static or
|
||||
--enable-explicit otions, since they will cause dependencies on
|
||||
Xft version 1.
|
||||
|
||||
- Do not use Xft directly in your applicatons.
|
||||
|
||||
* 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.
|
||||
XFree86-4.2.
|
||||
|
||||
* Xft support is not on by default. To turn it on set the environment
|
||||
variable GDK_USE_XFT to '1'
|
||||
|
||||
GDK_USE_XFT=1
|
||||
export GDK_USE_XFT
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
* There are known problems with some of the image loaders in the
|
||||
gdk-pixbuf library included in GTK+ where corrupted images can cause
|
||||
crashes and conceivably worse problems. Until these problems are fixed
|
||||
(we hope to have this done for 2.0.1), gdk-pixbuf should not be used
|
||||
to load untrusted data.
|
||||
|
||||
* 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;
|
||||
@@ -92,7 +110,7 @@ Release notes
|
||||
G_BROKEN_FILENAMES=1
|
||||
export G_BROKEN_FILENAMES
|
||||
|
||||
Best integration of GTK+-2.2 with the environment is achieved by
|
||||
Best integration of GTK+-2.0 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
How to report bugs
|
||||
|
||||
32
README.nanox
Normal file
32
README.nanox
Normal file
@@ -0,0 +1,32 @@
|
||||
Gtk port to nano-X
|
||||
|
||||
STATUS
|
||||
|
||||
Once upon a time I got a few apps working, then started merging
|
||||
the new features added by Owen (32 bit sizes for windows and buffering).
|
||||
Since then I haven't found the time to work on it:-/
|
||||
|
||||
|
||||
TODO
|
||||
|
||||
Finish internal window manager abstraction or add proper support in nano-X.
|
||||
Fix event polling.
|
||||
Implement GdkImage, GdkRgb stuff.
|
||||
Put generic region code in generic gdk and/or use the region code from nano-X.
|
||||
Fix ugly automake stuff for make dist.
|
||||
|
||||
TODO in nano-X
|
||||
|
||||
We need to be able to clip and change the background of windows at runtime
|
||||
for apps to not look so ugly!
|
||||
Fonts: wait for better nano-X font implementation.
|
||||
Properties on windows.
|
||||
Provide a pango module.
|
||||
|
||||
If you want to work on this port or get additional informnation, get in
|
||||
touch with me.
|
||||
Configure gtk with the --with-gdktarget=nanox to compile with nano-X support.
|
||||
|
||||
Paolo Molaro
|
||||
lupus@linuxcare.com
|
||||
|
||||
34
README.win32
34
README.win32
@@ -33,11 +33,16 @@ Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
There are hand-written makefiles for mingw (look for makefile.mingw in
|
||||
various directories), but those haven't been kept up-to-date, and
|
||||
probably won't work without editing. Sorry. If you make them work
|
||||
again, by all means do submit patches.
|
||||
|
||||
Note that I use method 1 myself. Hans Breuer has been taking care of
|
||||
the MSVC makefiles. At times, we disagree a bit about various issues,
|
||||
and for instance the makefile.msc files will not produce identically
|
||||
named DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
and the makefile.msc files might not produce identically named DLLs
|
||||
and import libraries as the "autoconfiscated" makefiles and libtool
|
||||
do.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
@@ -67,22 +72,13 @@ references to the wntab32x library from the makefile before building.
|
||||
Libintl
|
||||
=======
|
||||
|
||||
Before building GTK+ you must also have GNU gettext. Get prebuilt
|
||||
binaries of gettext-runtime (0.12.1 or newer) from your nearest GNU
|
||||
ftp mirror. If you use gcc, you will also have to edit the libintl.h
|
||||
file from gettext a tiny bit: Change the
|
||||
|
||||
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
|
||||
|
||||
line to
|
||||
|
||||
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && (defined __STDC__ || defined __cplusplus)
|
||||
|
||||
around line 102.
|
||||
|
||||
If you use libtool, you will also have to copy intl.lib to libintl.a
|
||||
so that libtool will find them. Alternatively, use pexports and
|
||||
dlltool to generate a gcc import library.
|
||||
GTK wants to be built with the GNU "intl" library for
|
||||
internationalisation (i18n). Get the version ported to Win32 (not a
|
||||
very big deal) from the web site mentioned above. The "intl" library
|
||||
as gets built as a DLL called libintl-1.dll. If you don't want any
|
||||
i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
|
||||
config.h.win32 file, and remove references to the intl library from
|
||||
the makefiles.
|
||||
|
||||
ActiveIMM
|
||||
=========
|
||||
|
||||
200
TODO
Normal file
200
TODO
Normal file
@@ -0,0 +1,200 @@
|
||||
|
||||
Outstanding items:
|
||||
|
||||
* focus handling for GtkOptionMenu (needs the previous)
|
||||
|
||||
* implement gtk_default_draw_oval and other missing things in gtkstyle.c.
|
||||
|
||||
* enforce invariants on *_RESIZE* and *_REDRAW* flags.
|
||||
|
||||
* GtkToolTips: allocate GtkTooltipsData from memchunks
|
||||
|
||||
* Make all widget attributes configurable after the widget is created (timj).
|
||||
|
||||
* Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator
|
||||
is TRUE. (Radio buttons do not need to CAN_DEFAULT! OWT)
|
||||
|
||||
* More dialogs: Print, maybe others...
|
||||
|
||||
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||
|
||||
* Check return values on all calls to XIC[Get/Set]Values
|
||||
|
||||
* The "--geometry" option should be supported
|
||||
|
||||
- Having gdk_init() parse the geometry option. (putting it into
|
||||
GDK means you can use XParseGeometry() without wrapping it)
|
||||
|
||||
- Add a call gdk_get_geometry() that retrieves the results
|
||||
in a form like that returned by XParseGeometry()
|
||||
|
||||
- The application then can modify the results (as would gemvt)
|
||||
then call a routine gtk_window_set_geometry() on whatever
|
||||
it considers to be its main window.
|
||||
|
||||
- Then in some manner GtkWindow takes that into account when
|
||||
setting its hints. (Probably it uses the size and position
|
||||
as the current uposition and usize, and modulates that
|
||||
be the equivalents of the X flags
|
||||
|
||||
XValue, YValue, WidthValue, HeightValue, XNegative, or YNegative
|
||||
|
||||
( You'd have to extend gdk_window_set_hints to accept the
|
||||
window gravity option to get it right. )
|
||||
|
||||
* Allow moving the separator for paned widgets by dragging
|
||||
it directly instead of using the handle.
|
||||
|
||||
* Check into XAddConnectionWatch - is this needed for XIM?
|
||||
|
||||
* Places where a _full variant is needed:
|
||||
|
||||
gtk_init_add
|
||||
gtk_menu_popup
|
||||
gtk_toolbar_prepend_element
|
||||
gtk_toolbar_insert_element
|
||||
|
||||
* Try to rationally deal with someone else deleting one of our
|
||||
windows??? This would mean keeping track of our window heirarchy
|
||||
ourselves, for one thing, and will never be safe, because of
|
||||
race conditions.
|
||||
|
||||
* Should all the default handlers really return FALSE? This can
|
||||
cause confusing presses to be sent to containers that actually
|
||||
want to get events on themselves.
|
||||
|
||||
* The menu code should skip separators during keyboard navigation,
|
||||
whether they are sensitive or insensitive.
|
||||
|
||||
* OwnerButtonPressGrab needs to go!
|
||||
|
||||
Text/Edit widget:
|
||||
|
||||
Bugs:
|
||||
|
||||
- Really big font (150 pt), plus lots of editing caused segfault
|
||||
|
||||
Improvements:
|
||||
|
||||
- Unify the key binding support in some fashion between the
|
||||
Entry and Text widget widgets, use GtkBindings for this.
|
||||
|
||||
- Figure out a way not to recompute the geometry on insertions/deletions
|
||||
which are large, but not a significant fraction of the
|
||||
entire text. (e.g., compute the changes as when the widget
|
||||
is not frozen, but without the actual scrolling)
|
||||
|
||||
- Prune the line start cache. But since it is only 68 bytes
|
||||
per line, and it is a lot faster when lines are in the cache,
|
||||
it may be better not to, at least for now.
|
||||
|
||||
- Show the non-editable state by changing colors. (Use the
|
||||
style entries for insensitive?)
|
||||
|
||||
- Multibyte support for the Text widget.
|
||||
|
||||
- Unicode support to do the multi-byte right.
|
||||
|
||||
- Support an .inputrc. (The readline one doesn't really work,
|
||||
unless it is extended because it can't represent X keysyms,
|
||||
just terminal type input)
|
||||
|
||||
- A vi mode
|
||||
|
||||
- Word wrap, instead of line folding. (Should the continuation
|
||||
characters be shown?)
|
||||
|
||||
- Horizontal scrolling
|
||||
|
||||
- Disable pasting compound text
|
||||
|
||||
- When showing background pixmap (not editable) actually set
|
||||
the background pixmap as the windows bg pixmap, to improve
|
||||
appearance on exposes. But this would require using another
|
||||
window to get the origins.
|
||||
|
||||
- In word wrap mode, break:
|
||||
|
||||
aaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
|
||||
as:
|
||||
| Maximum column
|
||||
aaaaaaaaaaa bbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbb |
|
||||
|
||||
Instead of:
|
||||
|
|
||||
aaaaaaaaaaa |
|
||||
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbb |
|
||||
|
||||
- Blinking cursor
|
||||
|
||||
- API's : gtk_text_clear, gtk_text_delete_lines (gint start, gint end),
|
||||
gtk_text_append/prepend, gtk_text_insert_at (gint row, gint column),
|
||||
some function to get the row/column from the x/y-coordinates of a
|
||||
mouse click, some function to get the word/line under the mouse pointer
|
||||
[ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ]
|
||||
|
||||
- "changed" emitted when doing deletes on empty Text widget.
|
||||
|
||||
- Delete IC in editable->unrealize, not editable->finalize?
|
||||
|
||||
Themes
|
||||
======
|
||||
|
||||
- When a scale gets shown/hidden only queue a redraw on the
|
||||
non-window portion, not the whole area.
|
||||
|
||||
- In various places, to avoid shaping windows excessively,
|
||||
we set parent relative backgrounds. This is an ugly
|
||||
hack and needs a better solution. Plus, I don't think
|
||||
these parent-relative backgrounds always persist to
|
||||
when they are actually needed.
|
||||
|
||||
Such calls exist in: GtkButton, GtkHandeBox, GtkItem,
|
||||
GtkListItem, GtkMenu, GtkMenuItem, GtkMisc,
|
||||
GtkNoteBook, GtkOptionMenu, GtkPaned, GtkPreview,
|
||||
GtkSpinButton and GtkTreeItem.
|
||||
|
||||
- For menus and for GtkWindow's, the realize() function
|
||||
calls paint(), so that background pixmaps can be set
|
||||
ahead of time, and prevent flashing when the window is
|
||||
shown. This is an ugly hack and needs a better solution.
|
||||
|
||||
=======
|
||||
|
||||
Calendar Widget:
|
||||
|
||||
- The widget should be nicely resizeable vertical too.
|
||||
|
||||
- CALENDAR_MARGIN should be removed, uses INNER_BORDER and
|
||||
style->class->[xy]thickness insted.
|
||||
|
||||
- Flag to choose between using standard three letter abbreviated
|
||||
weekday name or just the first character from it. It looks like
|
||||
that is what most other calendar-widgets do.
|
||||
|
||||
- Arrows should resize with the header-font.
|
||||
|
||||
- The keyboard support has to be finished.
|
||||
|
||||
DND
|
||||
===
|
||||
|
||||
- Use a cursor instead of an ICON when over Motif windows,
|
||||
to get rid of the current junk that Motif leaves because
|
||||
of its XCopyArea stupidity for doing highlighting.
|
||||
|
||||
- Add a GTK_DRAG_VERIFY target flag and a "drag_data_verify"
|
||||
signal so that apps can easily check if a, say,
|
||||
text/uri-list URL looks OK during the drop.
|
||||
|
||||
- Check more for memory leaks.
|
||||
|
||||
- Drag and drop for Entry and Text widgets.
|
||||
|
||||
- Send synthetic motion events on structure changes so
|
||||
drag_enter/leave get sent properly. (See the popup
|
||||
in testdnd)
|
||||
739
TODO.xml
Normal file
739
TODO.xml
Normal file
@@ -0,0 +1,739 @@
|
||||
<!-- This is used to generate the online TODO list for GTK+ using
|
||||
the script docs/make-todo. Whenever a change to this file is
|
||||
committed to CVS,the file is run through make-todo and the online
|
||||
version updated. If you modify this file, you should check for
|
||||
parse errors by running:
|
||||
|
||||
$ docs/make-todo TODO.xml > /dev/null
|
||||
|
||||
before committing, or you may screw up the online version -->
|
||||
<todo logourl="gtk-logo-rgb.gif">
|
||||
<title>GTK+ TODO list</title>
|
||||
<section>
|
||||
<title>GDK</title>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>Add backing store support</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+'s drawing model involves clearing to a background, and
|
||||
then drawing widgets on top of this. Without having
|
||||
backing-store support, this results in flickering in various
|
||||
situations. Backing store cannot be added widget-by-widget,
|
||||
because the drawing in a particular window is not confined
|
||||
to a single widget. Instead it needs to be added per GDK
|
||||
window.
|
||||
</p>
|
||||
<p>
|
||||
The way this is done is by having
|
||||
<tt>gdk_window_begin_paint()</tt>
|
||||
and <tt>gdk_window_end_paint()</tt> functions that
|
||||
redirect all drawing to a particular window to an offscreen
|
||||
pixmap, and then copy that offscreen pixmap back onto the
|
||||
screen when the paint operation is done. The implementation
|
||||
of this is mostly complete in the <tt>gtk-no-flicker</tt> branch of
|
||||
GTK+.
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>32 Bit Coordinates</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+-1.2 and earlier share X's limitation on the
|
||||
size of coordinates and restrict all dimensions
|
||||
to 16 bit quantities. By clever use of X it is
|
||||
possible to lift this restriction and present a
|
||||
full 32-bit space to the user.
|
||||
</p>
|
||||
<p>
|
||||
There are some difficulties with performance in this
|
||||
approach - mostly because scrolling can involve mapping and
|
||||
unmapping lots of widgets, but in general, current
|
||||
trials in this area seem to work pretty well.
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Customizable double-click timeout</title>
|
||||
<description>
|
||||
<p>
|
||||
The current fixed double-click timeout in GTK+
|
||||
is too small for some users. This needs to be
|
||||
customizable
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
<bugs>#3958</bugs>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Make color handling more convenient</title>
|
||||
<description>
|
||||
<p>
|
||||
Add some color convenience functions; such as a way to get an
|
||||
allocated GdkColor from GdkRGB, and export functions from gtkstyle.c
|
||||
that lighten/darken a given color, and set a color from HSV in
|
||||
addition to RGB. Also, consider having static variables that contain
|
||||
preallocated common colors (gdk_blue, gdk_red, etc.), the problem
|
||||
being colormap issues.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Cursors</title>
|
||||
<description>
|
||||
<p>
|
||||
Two tasks: 1) move the cursors in the cursor font that people actually
|
||||
care about to the top of the gdkcursor.h header file, and put a nice
|
||||
list of the 15 cursors people actually care about in the docs 2) if
|
||||
the cursor font lacks some commonly-useful cursors (like magnifying
|
||||
glass), add these cursors to gdkcursor.h and then emulate them in
|
||||
gdk_cursor_new by transparently creating the cursor from a bitmap.
|
||||
The list of Qt cursors is worth http://doc.trolltech.com/qcursor.html
|
||||
looking at for this task.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="100%" target="2.0">
|
||||
<title>Make GdkRGB work on any visual</title>
|
||||
<description>
|
||||
<p>
|
||||
GdkRGB should be able to render to an arbitrary visual
|
||||
(i.e. the visual shouldn't be fixed at gdk_rgb_init()
|
||||
time). This will break gdk_rgb_gc_set_foreground() and
|
||||
friends, though.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- GDK -->
|
||||
|
||||
<section>
|
||||
<title>Internationalization</title>
|
||||
|
||||
<entry size="big" status="90%" target="2.0">
|
||||
<title>Integrate Pango</title>
|
||||
<description>
|
||||
<p>
|
||||
The purpose of the Pango project is to provide a system for
|
||||
layout and rendering of internationalized text. It handles
|
||||
most of the issues necessary to
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.pango.org</url>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>Switch to using UTF-8</title>
|
||||
<description>
|
||||
<p>
|
||||
This is closely related to Pango integration. Pango deals
|
||||
with all strings in terms of UTF-8; by switching GTK+ over
|
||||
to UTF-8 we make it considerably simpler for developers to
|
||||
support multiple languages properly while still retaining
|
||||
a large degree of compatibility with existing programs.
|
||||
</p>
|
||||
<p>
|
||||
Some work has already been done on this as part of the Win32
|
||||
port, since the Win32 port is currently using UTF-8 for all
|
||||
strings. In general, this should be an easy job; the hardest
|
||||
parts are places like GtkFileSelection, cut and paste, and
|
||||
input method support where there is interaction between GTK+
|
||||
and the operating system.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="60%" target="2.0">
|
||||
<title>Rewrite Input Method Support</title>
|
||||
<description>
|
||||
<p>
|
||||
Support for Input Methods is GTK+-1.2 is done via XIM, with
|
||||
supported styles being over-the-spot and the root-window
|
||||
styles. However, the over-the-spot style is not going to
|
||||
work well with the Pango integration, since it relies on the
|
||||
text rendering in the program being done in the standard
|
||||
Xlib style, so it will be necessary to also support
|
||||
on-the-spot input. On-the-spot input is done by supplying a
|
||||
set of callbacks that are invoked by the input methods.
|
||||
</p>
|
||||
<p>
|
||||
GTK+-2.0 will have a new system with loadable input method
|
||||
modules. These modules can either be implemented using XIM,
|
||||
or written from scratch.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
</section> <!-- i18n -->
|
||||
|
||||
<section>
|
||||
<title>GTK+ Core</title>
|
||||
|
||||
<entry size="big" status="60%" target="2.0">
|
||||
<title>GLib based object and type system</title>
|
||||
<description>
|
||||
<p>
|
||||
The GTK+ object system is already in use in quite a few different
|
||||
non-GUI applications; it would be desirable for these uses
|
||||
to have the object and type systems separated from the GUI portions
|
||||
of GTK+ and be generalized for non-GUI usage.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="1%" target="2.0">
|
||||
<title>Overall callback improvements</title>
|
||||
<description>
|
||||
<p>
|
||||
The GTK+ type and signal systems need significant improvements to
|
||||
allow signal creation with default handlers from language bindings
|
||||
and to aid language bindings in deriving new objects.
|
||||
One aspect of this is the Closure support, recently suggested by
|
||||
Karl Nelson <kenelson@ece.ucdavis.edu>, but this also
|
||||
requires a GLib based type and parameter system (ties in with
|
||||
"GLib based object and type system").
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="2.0">
|
||||
<title>State change notification</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+ objects emit various types of signals, some to perform
|
||||
arbitrary actions, some to allow customization from user code,
|
||||
and some signals are emitted to notify of certain changes
|
||||
of an object. For the latter, what really is required is a
|
||||
gneneric signal that can be used to monitor *any* kind of object
|
||||
changes. For that, all object changes need to be routed through
|
||||
a central point (otherwise the signal emissions are spread all
|
||||
over the object implementation), i.e. an object argument setter.
|
||||
The state change notification signal doesn't need to be emitted
|
||||
syncronously, in fact, it's probably most effective to always
|
||||
emit this asynchronously, so subsequent changes are accumulated.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="5%" target="2.0">
|
||||
<title>Widget as sensitivity/grab state machine</title>
|
||||
<description>
|
||||
<p>
|
||||
Maintenance of pointer and keybnoard grabs is currently very
|
||||
tedious and error-prone, most widget's cook up their own stuff
|
||||
in this regard.
|
||||
By moving the general concept of "Grabs" to the GTK+ level as
|
||||
a widget state, and providing a new signal for alterations of
|
||||
a widget's state ("visible", "visible+insensitive",
|
||||
"visible+grab", "hidden", "hidden+insensitive", etc.), things
|
||||
can be unified and more stabelize. A couple of bugs, such as
|
||||
insensitive widgets still holding a grab, or buttons that
|
||||
still think they are depressed when hidden, will be squeezed
|
||||
automatically with that.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="2.0">
|
||||
<title>Allow argument customization</title>
|
||||
<description>
|
||||
<p>
|
||||
Many types of object arguments (expander style in the CList,
|
||||
default padding in button boxes, etc), conceptually go with
|
||||
the theme, or as user preferences; they should not be set by
|
||||
a particular program.
|
||||
</p>
|
||||
<p>
|
||||
There needs to be a mechanism for themes to be able to
|
||||
control these arguments from the RC file.
|
||||
</p>
|
||||
</description>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="2.0">
|
||||
<title>Allow global customization</title>
|
||||
<description>
|
||||
<p>
|
||||
There are a number of global parameters in GTK+ and GDK that should be
|
||||
customizable by the user, such as the double-click timeout,
|
||||
or whether widgets should be backing-stored by default.
|
||||
</p>
|
||||
<p>
|
||||
If we had argument customization from an RC file, it might
|
||||
be possible to do this simply with a global object with
|
||||
arguments for the various global parameters that was
|
||||
customized in the same fashion as object arguments.
|
||||
</p>
|
||||
</description>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Gtk+ Modules installation directory</title>
|
||||
<description>
|
||||
<p>
|
||||
Gtk+ needs to support an extra lib/ directory, to search
|
||||
for dynamically loadable modules, it also needs to support
|
||||
an environment variable to specify module search paths.
|
||||
This has quite some cross-platform issues with the GModule
|
||||
code (especially on AIX).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="small" status="20%" target="2.0">
|
||||
<title>Convenient widget setup</title>
|
||||
<description>
|
||||
<p>
|
||||
Make it simpler to set all the basic attributes of a widget. Might
|
||||
want set_tooltip(), set_accel(), set_color(FOREGROUND, color),
|
||||
set_min_size() (usize does this, but needs a rename), set_whatsthis(),
|
||||
etc. set_accel() may not work for all widgets, may need a convenience
|
||||
API for button and label accelerators specifically.
|
||||
</p>
|
||||
<p>
|
||||
The idea is that it should be easy, out of the box, to set up a widget
|
||||
with all the nice touches and features the widget really should
|
||||
have. Users shouldn't need to do their own convenience functions for
|
||||
this.
|
||||
</p>
|
||||
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 2.0">
|
||||
<title>Make selections/clipboard more convenient</title>
|
||||
<description>
|
||||
<p>
|
||||
Make GtkSelectionData more like the MIME blobs in Swing and Qt.
|
||||
Consider a GtkClipboard object to simplify cut-and-paste handling.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="small" status="80%" target="2.0">
|
||||
<title>Stock label/icon system</title>
|
||||
<description>
|
||||
<p>
|
||||
A system like GnomeStock for getting a standard labels/icons
|
||||
for menus and toolbars. Should be extensible by themes, and
|
||||
by libgnomeui. Some work already done on this.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>Session Management</title>
|
||||
<description>
|
||||
<p>
|
||||
Look in to session management. Consider whether to use
|
||||
X11R6 SM, or some custom spec shared with KDE. Create
|
||||
GTK+ API for this.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>Online help enhancements</title>
|
||||
<description>
|
||||
<p>
|
||||
Look at a small "What's This" popup widget,
|
||||
and a What's This system in general (this part
|
||||
could maybe be done for 2.0). A more difficult, probably
|
||||
a post-2.0 task, is to integrate a very simple little
|
||||
help browser gizmo into GTK.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="medium" status="0%" target="2.0">
|
||||
<title>GUI-editable means of user configuration</title>
|
||||
<description>
|
||||
<p>
|
||||
Need to be able to set double click time, whether cursors
|
||||
blink, etc., from a control panel type of deal.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- Core -->
|
||||
|
||||
<section>
|
||||
<title>GTK+ Widgets</title>
|
||||
|
||||
<entry size="small" status="100%" target="2.0">
|
||||
<title>Make GtkFrame use a label</title>
|
||||
<description>
|
||||
<p>
|
||||
The title of a frame should simply be another child widget
|
||||
which, by default, holds a label widget. This will important
|
||||
with Pango where proper text behavior will be more complex to
|
||||
implement, but is also useful for certain user-interface
|
||||
designs. (It can be useful, for example, to put a checkbutton
|
||||
in that slot.)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="90%" target="2.0">
|
||||
<title>Replace GtkText Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
The GtkText widget is badly in need of replacement, since it
|
||||
is buggy and insufficiently feature rich. This is being done
|
||||
using Havoc Pennington's port of the Tk Text widget.
|
||||
</p>
|
||||
<p>
|
||||
As part of this job <a href="http://www.pango.org">Pango</a>
|
||||
support is being added to the replacement. The structure of
|
||||
the Tk text widget port is suited to this as it works
|
||||
paragraph-by-paragraph, and Pango works at a sub-paragraph
|
||||
scale. The main remaining tasks here are to implement
|
||||
incremental reflow to make performance acceptable and to
|
||||
implement embedded pixmaps and widgets.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="20%" target="2.0">
|
||||
<title>Improve Radio/Checkbutton Look</title>
|
||||
<description>
|
||||
<p>
|
||||
The default look for the radio and checkbuttons is both
|
||||
unattractive and not friendly to the user . Motif did not
|
||||
get this one right, and we should not keep on following the
|
||||
Motif look. The right thing here is probably to copy the
|
||||
Windows appearance for these controls fairly closely. This
|
||||
will fit in with well with the rest of the GTK+ look.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="99%" target="2.0">
|
||||
<title>Improve Submenu Navigation</title>
|
||||
<description>
|
||||
<p>
|
||||
Navigating through a deep menu tree in GTK+ is currently
|
||||
quite tricky, because as soon as one leaves a menu item,
|
||||
the submenu disappears. The way that the Macintosh is
|
||||
reputed to handle this is that to pop down the current
|
||||
submenu, you have to leave the triangle defined by the
|
||||
upper left hand corner of the menu item and right
|
||||
side of the submenu.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0 ?">
|
||||
<title>Improve Spinbutton Look</title>
|
||||
<description>
|
||||
<p>
|
||||
Spinbuttons currently appear to have lumpy boundaries,
|
||||
because sides of the arrows aren't at an angle that
|
||||
meshes well with the pixel grid. However, fixing this
|
||||
would require making the spinbuttons narrower and
|
||||
harder to hit. This points out a general problem with
|
||||
the spinbutton (and the arrows on the scrollbars) - the
|
||||
target area for clicks actually the bounding box of the
|
||||
arrows, but the user thinks that they must click on the
|
||||
arrows themselves. It would probably be more friendly
|
||||
to use a square button with an arrow drawn on top instead
|
||||
of a arrow-shaped button, the approach taken by most other
|
||||
windowing systems.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="90%" target="2.0">
|
||||
<title>Supply horizontable/vertical wrapping boxes</title>
|
||||
<description>
|
||||
<p>
|
||||
An often requested feature are wrapping containers, at this
|
||||
point, gimp's development version already uses such widgets:
|
||||
horizontable/vertical wrap boxes, that need to go into 2.0
|
||||
proper at some point.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>Improved generic combo support</title>
|
||||
<description>
|
||||
<p>
|
||||
Gtk+'s combo box has several drawbacks in design and
|
||||
implementation. An new attempt at providing the combo box
|
||||
functionality with improved flexibility has been made with
|
||||
the GtkClueHunter widget, sitting in the CVS module "gle".
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="40%" target="2.0?">
|
||||
<title>Add unified set of List/Tree/Grid widgets</title>
|
||||
<description>
|
||||
<p>
|
||||
Currently, GTK+ has a large number of list and tree widgets
|
||||
(GtkList, GtkTree, GtkCList, GtkCTree), none of which are
|
||||
ideal. The GtkList and GtkTree widgets perform badly on large
|
||||
number of items. (GtkTree widget is also quite buggy.) GtkCList
|
||||
and GtkCTree mostly solve the size problem, but are quite
|
||||
complex and, despite that, not very flexible. They are limited to
|
||||
displaying pixmaps and text, and can neither support arbitrary
|
||||
widgets nor custom drawing functions.
|
||||
</p>
|
||||
<p>
|
||||
In addition to list and tree widgets, a closely related need
|
||||
is a sheet widget that displays a (possibly editable) 2-D grid.
|
||||
It would be desirable to have a complete set of widgets that
|
||||
could be presented as the one-true-solution for these needs.
|
||||
Model/View techniques could be used effectively to increase
|
||||
both the simplicity and power of the interfaces.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>GtkImage</title>
|
||||
<description>
|
||||
<p>
|
||||
gdk-pixbuf is moving to become a GTK+ dependency, a new image-display
|
||||
widget is thus needed.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Attempt to fix GtkStatusbar</title>
|
||||
<description>
|
||||
<p>
|
||||
GtkStatusbar is too inconvenient to use.
|
||||
The only non-breakage-inducing fix we could
|
||||
come up with is to permit 0 as a context ID, so you
|
||||
don't have to use gtk_statusbar_get_context_id().
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="95%" target="2.0">
|
||||
<title>Decruft GtkProgress, GtkProgressbar</title>
|
||||
<description>
|
||||
<p>UPDATE: this is done, just need to apply the patch.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This interface is just a disaster of overcomplexity;
|
||||
it should pretty much just be set_percentage(),
|
||||
pulse() (to move during activity mode), and set_text().
|
||||
There's no reason that there are two objects, should
|
||||
just be one interface. Almost all the functions
|
||||
that currently exist should be deprecated.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Entry validation hooks</title>
|
||||
<description>
|
||||
<p>
|
||||
Simple hooks for validation in a GtkEntry. Pretty much just a
|
||||
"validate" callback which takes a string (current entry contents) and
|
||||
returns either VALID, INVALID, or COULDBEVALID. Then the
|
||||
GtkEntry calls this function if it's set, and does the appropriate
|
||||
UI things. GTK should come with validators for int and float,
|
||||
see GtkSpinButton where these are already implemented.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>pseudo-MDI Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Add a widget that lets you rearrange various views (similar to many
|
||||
IDEs, like Visual SlickEdit or JBuilder). Basically there should be a
|
||||
central slot and 4 slots around the sides; each slot holds one or more
|
||||
views. If two views are dropped in the same slot, then a notebook is
|
||||
created displaying both views. If a view is dropped outside the
|
||||
application window, it becomes a standalone window. It should be
|
||||
possible to restrict whether a view can be dropped on the sides,
|
||||
horizontal/vertical sides only, in the central content area, or in
|
||||
any of those places.
|
||||
</p>
|
||||
<p>
|
||||
(Havoc has a proposed interface for this, mail hp@redhat.com)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 2.0">
|
||||
<title>Icon List Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
A simple icon list widget, suitable for creating a file selector or
|
||||
the like.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 2.0">
|
||||
<title>Dock widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Add a widget like GnomeDock (perhaps based on GnomeDock)
|
||||
that allows people to put rearrangeable toolbars, menubars, etc.
|
||||
around a central content area. The widget should have hooks for
|
||||
saving the current positions of the various docked bars.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>Canvas widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Figure out how to get GnomeCanvas or a derived work into GTK+ itself.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="57%" target="2.0">
|
||||
<title>Menu scroll</title>
|
||||
<description>
|
||||
<p>
|
||||
When menus are bigger than the screen, allow scrolling
|
||||
as on the Mac.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="20%" target="2.0">
|
||||
<title>Toolbar/menubar wrap</title>
|
||||
<description>
|
||||
<p>
|
||||
When toolbars and menubars are too wide, do some sort of
|
||||
wrapping or drop-down deal. (See Windows/Mac apps for examples.)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Blink cursor in GtkEntry</title>
|
||||
<description>
|
||||
<p>
|
||||
Make the cursor optionally blink in GtkEntry. Beware, the entry code
|
||||
is somewhat in flux; mail Owen and ask.
|
||||
</p>
|
||||
</description>
|
||||
<contact>otaylor@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="100%" target="2.0">
|
||||
<title>Don't highlight first menu item when menus come up</title>
|
||||
<description>
|
||||
<p>
|
||||
Keep GtkMenu from prelighting the first menu item.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="100%" target="2.0">
|
||||
<title>Integrate new color selector</title>
|
||||
<description>
|
||||
<p>
|
||||
There's a new color selector in CVS (module gnome-colorsel),
|
||||
it needs to be folded in to GTK and any remaining issues resolved.
|
||||
(This new selector is API-compatible with the old one, and
|
||||
still called GtkColorSelector).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="70%" target="2.0">
|
||||
<title>Write new font selector</title>
|
||||
<description>
|
||||
<p>
|
||||
Pango introduces a new font handling system,
|
||||
replacing the XLFD system. Need a font selector for this.
|
||||
The XLFD selector should probably remain, for apps where
|
||||
it makes sense (like gnome-terminal probably).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Stack Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Jonathan has a widget like a tabless/frameless notebook, used for
|
||||
something like the GNOME control center where you want to toggle which
|
||||
widget is visible to the user. Needs to be cleaned up and considered
|
||||
for GTK.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org, jrb@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Clean up GtkNotebook</title>
|
||||
<description>
|
||||
<p>
|
||||
GtkNotebook currently breaks GTK invariants about
|
||||
mapping/visibility/etc., needs fixing.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- GTK+ -->
|
||||
</todo>
|
||||
|
||||
@@ -29,11 +29,8 @@
|
||||
#undef HAVE_STPCPY
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SOLARIS_XINERAMA
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_XFREE_XINERAMA
|
||||
#undef HAVE_XINERAMA
|
||||
#undef HAVE_WINSOCK_H
|
||||
#undef HAVE_WINTAB
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
394
acinclude.m4
394
acinclude.m4
@@ -11,69 +11,341 @@ AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP],
|
||||
$1
|
||||
AC_DIVERT_POP()])])])
|
||||
|
||||
# GTK_ADD_LIB(VAR,LIBNAME)
|
||||
# ---------------------------------
|
||||
# Helper macro to add a -lBlah to a variable, avoiding repeats
|
||||
# Note that this needs to be quoted when used in an enclosing macro
|
||||
AC_DEFUN([GTK_ADD_LIB],
|
||||
[ case "$$1 " in
|
||||
*-l$2[[\ \ ]]*) ;;
|
||||
*) $1="-l$2 $$1" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# Modified to never use included libintl.
|
||||
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||
#
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
# AC_DEFINE(ENABLE_NLS)
|
||||
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||
# AC_ARG_WITH(included-gettext,
|
||||
# [ --with-included-gettext use the GNU gettext library included here],
|
||||
# nls_cv_force_use_gnu_gettext=$withval,
|
||||
# nls_cv_force_use_gnu_gettext=no)
|
||||
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
nls_cv_force_use_gnu_gettext="no"
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
||||
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||
gt_cv_func_dgettext_libintl,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes,
|
||||
gt_cv_func_dgettext_libintl=no)],
|
||||
gt_cv_func_dgettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
LIBS="$LIBS -lintl";
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
|
||||
# Added by Martin Baulig 12/15/98 for libc5 systems
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
INTLLIBS=-lintl
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
AC_MSG_CHECKING([whether catgets can be used])
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets use catgets functions if available],
|
||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS)
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
# if test "$GENCAT" != "no"; then
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
# if test "$GMSGFMT" = "no"; then
|
||||
# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
# fi
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.cat
|
||||
# INSTOBJEXT=.cat
|
||||
# DATADIRNAME=lib
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
# fi
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" != "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
else
|
||||
# Unset this variable since we use the non-zero value as a flag.
|
||||
CATOBJEXT=
|
||||
# dnl Mark actions used to generate GNU NLS library.
|
||||
# INTLOBJS="\$(GETTOBJS)"
|
||||
# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# AC_SUBST(MSGFMT)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.gmo
|
||||
# INSTOBJEXT=.mo
|
||||
# DATADIRNAME=share
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# Checks the location of the XML Catalog
|
||||
# Usage:
|
||||
# JH_PATH_XML_CATALOG([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# Defines XMLCATALOG and XML_CATALOG_FILE substitutions
|
||||
AC_DEFUN([JH_PATH_XML_CATALOG],
|
||||
[
|
||||
# check for the presence of the XML catalog
|
||||
AC_ARG_WITH([xml-catalog],
|
||||
AC_HELP_STRING([--with-xml-catalog=CATALOG],
|
||||
[path to xml catalog to use]),,
|
||||
[with_xml_catalog=/etc/xml/catalog])
|
||||
jh_found_xmlcatalog=true
|
||||
XML_CATALOG_FILE="$with_xml_catalog"
|
||||
AC_SUBST([XML_CATALOG_FILE])
|
||||
AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)])
|
||||
if test -f "$XML_CATALOG_FILE"; then
|
||||
AC_MSG_RESULT([found])
|
||||
else
|
||||
jh_found_xmlcatalog=false
|
||||
AC_MSG_RESULT([not found])
|
||||
fi
|
||||
# # If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# # because some of the sources are only built for this goal.
|
||||
# if test "$PACKAGE" = gettext; then
|
||||
# USE_NLS=yes
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# fi
|
||||
|
||||
# check for the xmlcatalog program
|
||||
AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
|
||||
if test "x$XMLCATALOG" = xno; then
|
||||
jh_found_xmlcatalog=false
|
||||
fi
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
if $jh_found_xmlcatalog; then
|
||||
ifelse([$1],,[:],[$1])
|
||||
else
|
||||
ifelse([$2],,[AC_MSG_ERROR([could not find XML catalog])],[$2])
|
||||
fi
|
||||
])
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GTK_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY)
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
AM_GTK_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
||||
# Checks if a particular URI appears in the XML catalog
|
||||
# Usage:
|
||||
# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
AC_DEFUN([JH_CHECK_XML_CATALOG],
|
||||
[
|
||||
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
||||
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
||||
if $jh_found_xmlcatalog && \
|
||||
AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
||||
AC_MSG_RESULT([found])
|
||||
ifelse([$3],,,[$3
|
||||
])dnl
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
ifelse([$4],,
|
||||
[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],
|
||||
[$4])
|
||||
fi
|
||||
])
|
||||
|
||||
62
autogen.sh
62
autogen.sh
@@ -13,10 +13,10 @@ FILE=gdk
|
||||
DIE=0
|
||||
|
||||
have_libtool=false
|
||||
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
if libtool --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version | libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*|1.5*)
|
||||
1.4*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
@@ -25,34 +25,34 @@ if $have_libtool ; then : ; else
|
||||
echo
|
||||
echo "You must have libtool 1.4 installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have gtk-doc installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
|
||||
echo "libtool the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
have_automake=false
|
||||
if automake --version < /dev/null > /dev/null 2>&1 ; then
|
||||
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
||||
case $automake_version in
|
||||
1.2*|1.3*|1.4)
|
||||
;;
|
||||
*)
|
||||
have_automake=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_automake ; then : ; else
|
||||
echo
|
||||
echo "You must have automake 1.7.x installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
|
||||
echo "You must have automake 1.4-p1 installed to compile $PROJECT."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
@@ -72,9 +72,13 @@ if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`$ACLOCAL --print-ac-dir`
|
||||
acdir=`aclocal --print-ac-dir`
|
||||
m4list="glib-2.0.m4 glib-gettext.m4"
|
||||
|
||||
for file in $m4list
|
||||
@@ -91,15 +95,13 @@ if test -z "$ACLOCAL_FLAGS"; then
|
||||
done
|
||||
fi
|
||||
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit 1
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
|
||||
libtoolize --force || exit 1
|
||||
gtkdocize || exit 1
|
||||
# optionally feature autoheader
|
||||
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
||||
|
||||
autoheader || exit 1
|
||||
|
||||
$AUTOMAKE --add-missing || exit 1
|
||||
autoconf || exit 1
|
||||
automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
@@ -107,4 +109,4 @@ if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
fi
|
||||
fi
|
||||
686
configure.in
686
configure.in
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,8 @@
|
||||
|
||||
SUBDIRS =
|
||||
if USE_X11
|
||||
SUBDIRS += gdk-pixbuf-xlib
|
||||
XDIRS=gdk-pixbuf-xlib
|
||||
else
|
||||
XDIRS=
|
||||
endif
|
||||
|
||||
SUBDIRS=$(XDIRS)
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
Tue Oct 7 23:30:00 2003 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gdk-pixbuf-xlib.h: Add C++ guards. (123955, Harring Figueiredo)
|
||||
|
||||
2002-08-06 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* Makefile.am (lib_LTLIBRARIES): link against xlibs
|
||||
|
||||
2002-01-25 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merge from gdk-pixbuf stable.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
lib_LTLIBRARIES=libgdk_pixbuf_xlib-2.0.la
|
||||
|
||||
INCLUDES = \
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
-I$(top_srcdir) -I$(top_builddir) \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-I$(top_srcdir)/contrib \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
$(GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
@GDK_PIXBUF_XLIB_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
LDADDS = @STRIP_BEGIN@ \
|
||||
@GDK_PIXBUF_XLIB_DEP_LIBS@ \
|
||||
@STRIP_END@
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
-version-info $(LT_VERSION_INFO)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LIBADD = \
|
||||
$(GDK_PIXBUF_XLIB_DEP_LIBS)
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_SOURCES = \
|
||||
gdk-pixbuf-xlib-private.h \
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
#ifndef GDK_PIXBUF_XLIB_H
|
||||
#define GDK_PIXBUF_XLIB_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
|
||||
#include <X11/Xlib.h>
|
||||
@@ -83,9 +79,4 @@ GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* GDK_PIXBUF_XLIB_H */
|
||||
|
||||
@@ -2,53 +2,47 @@
|
||||
|
||||
SUBDIRS = gtk-demo
|
||||
|
||||
INCLUDES = \
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
@GTK_DEBUG_FLAGS@ \
|
||||
@GTK_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
DEPS = \
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@
|
||||
|
||||
LDADDS = \
|
||||
LDADDS = @STRIP_BEGIN@ \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@ \
|
||||
@STRIP_END@
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
testpixbuf \
|
||||
testpixbuf-drawable \
|
||||
testanimation \
|
||||
testpixbuf-save \
|
||||
testpixbuf-scale \
|
||||
pixbuf-demo
|
||||
|
||||
# Need to build test-inline-pixbufs.h for testpixbuf
|
||||
if HAVE_PNG
|
||||
noinst_PROGRAMS += testpixbuf
|
||||
BUILT_SOURCES = test-inline-pixbufs.h
|
||||
endif
|
||||
|
||||
if CROSS_COMPILING
|
||||
pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
|
||||
pixbuf_csource_deps=
|
||||
else
|
||||
pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource
|
||||
pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders
|
||||
pixbuf_csource=GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs $$topdir/gdk-pixbuf/gdk-pixbuf-csource
|
||||
endif
|
||||
|
||||
test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
|
||||
$(pixbuf_csource) --raw --build-list \
|
||||
apple_red $(srcdir)/apple-red.png \
|
||||
gnome_foot $(srcdir)/gnome-foot.png \
|
||||
> test-inline-pixbufs.h \
|
||||
|| (rm -f test-inline-pixbufs.h && false)
|
||||
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource apple-red.png gnome-foot.png
|
||||
(topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
|
||||
cd $(srcdir) && \
|
||||
$(pixbuf_csource) --build-list \
|
||||
apple_red apple-red.png gnome_foot gnome-foot.png >$$curdir/test-inline-pixbufs.h)
|
||||
|
||||
testpixbuf_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
|
||||
@@ -65,6 +59,7 @@ testanimation_LDADD = $(LDADDS)
|
||||
pixbuf_demo_LDADD = $(LDADDS)
|
||||
|
||||
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
|
||||
$(testpixbuf_OBJECTS): test-inline-pixbufs.h
|
||||
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
|
||||
testpixbuf_save_SOURCES = testpixbuf-save.c
|
||||
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
|
||||
@@ -81,5 +76,3 @@ EXTRA_DIST = \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png
|
||||
|
||||
DISTCLEANFILES = test-inline-pixbufs.h
|
||||
|
||||
@@ -4,4 +4,4 @@ Makefile.in
|
||||
.deps
|
||||
gtk-demo
|
||||
demos.h
|
||||
geninclude.pl
|
||||
|
||||
|
||||
@@ -4,56 +4,58 @@ democodedir=$(datadir)/gtk-2.0/demo
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
demos = \
|
||||
appwindow.c \
|
||||
button_box.c \
|
||||
changedisplay.c \
|
||||
colorsel.c \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
hypertext.c \
|
||||
images.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
panes.c \
|
||||
pixbufs.c \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
tree_store.c \
|
||||
ui_manager.c
|
||||
demos = @STRIP_BEGIN@ \
|
||||
appwindow.c \
|
||||
button_box.c \
|
||||
colorsel.c \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
images.c \
|
||||
item_factory.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
panes.c \
|
||||
pixbufs.c \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
tree_store.c \
|
||||
@STRIP_END@
|
||||
|
||||
INCLUDES = \
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
-DDEMOCODEDIR="\"$(democodedir)\"" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
@GTK_DEBUG_FLAGS@ \
|
||||
@GTK_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@
|
||||
|
||||
LDADDS = \
|
||||
LDADDS = @STRIP_BEGIN@ \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@ \
|
||||
@STRIP_END@
|
||||
|
||||
bin_PROGRAMS = gtk-demo
|
||||
|
||||
BUILT_SOURCES = demos.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
geninclude.pl \
|
||||
$(IMAGEFILES)
|
||||
|
||||
demos.h: @REBUILD@ $(demos) geninclude.pl
|
||||
(here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
|
||||
demos.h: $(demos) geninclude.pl
|
||||
(cd $(srcdir) && $(PERL) ./geninclude.pl $(demos) > demos.h)
|
||||
|
||||
gtk_demo_SOURCES = \
|
||||
$(demos) \
|
||||
@@ -78,5 +80,3 @@ IMAGEFILES= alphatest.png \
|
||||
gtk-logo-rgb.gif
|
||||
|
||||
democode_DATA = $(demos) $(IMAGEFILES)
|
||||
|
||||
DISTCLEANFILES = demos.h
|
||||
|
||||
@@ -8,23 +8,23 @@
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
activate_action (GtkAction *action)
|
||||
{
|
||||
const gchar *name = gtk_action_get_name (action);
|
||||
const gchar *typename = G_OBJECT_TYPE_NAME (action);
|
||||
|
||||
static void
|
||||
menuitem_cb (gpointer callback_data,
|
||||
guint callback_action,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (callback_data),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You activated action: \"%s\" of type \"%s\"",
|
||||
name, typename);
|
||||
"You selected or toggled the menu item: \"%s\"",
|
||||
gtk_item_factory_path_from_widget (widget));
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (dialog,
|
||||
g_signal_connect (G_OBJECT (dialog),
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
@@ -32,159 +32,55 @@ activate_action (GtkAction *action)
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
|
||||
static GtkItemFactoryEntry menu_items[] =
|
||||
{
|
||||
const gchar *name = gtk_action_get_name (GTK_ACTION (current));
|
||||
const gchar *typename = G_OBJECT_TYPE_NAME (GTK_ACTION (current));
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current));
|
||||
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
|
||||
{ "/_File", NULL, 0, 0, "<Branch>" },
|
||||
{ "/File/_New", "<control>N", menuitem_cb, 0, "<StockItem>", GTK_STOCK_NEW },
|
||||
{ "/File/_Open", "<control>O", menuitem_cb, 0, "<StockItem>", GTK_STOCK_OPEN },
|
||||
{ "/File/_Save", "<control>S", menuitem_cb, 0, "<StockItem>", GTK_STOCK_SAVE },
|
||||
{ "/File/Save _As...", NULL, menuitem_cb, 0, "<StockItem>", GTK_STOCK_SAVE },
|
||||
{ "/File/sep1", NULL, menuitem_cb, 0, "<Separator>" },
|
||||
{ "/File/_Quit", "<control>Q", menuitem_cb, 0, "<StockItem>", GTK_STOCK_QUIT },
|
||||
|
||||
if (active)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
{ "/_Preferences", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/_Color", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/Color/_Red", NULL, menuitem_cb, 0, "<RadioItem>" },
|
||||
{ "/_Preferences/Color/_Green", NULL, menuitem_cb, 0, "/Preferences/Color/Red" },
|
||||
{ "/_Preferences/Color/_Blue", NULL, menuitem_cb, 0, "/Preferences/Color/Red" },
|
||||
{ "/_Preferences/_Shape", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/Shape/_Square", NULL, menuitem_cb, 0, "<RadioItem>" },
|
||||
{ "/_Preferences/Shape/_Rectangle", NULL, menuitem_cb, 0, "/Preferences/Shape/Square" },
|
||||
{ "/_Preferences/Shape/_Oval", NULL, menuitem_cb, 0, "/Preferences/Shape/Rectangle" },
|
||||
|
||||
/* If you wanted this to be right justified you would use "<LastBranch>", not "<Branch>".
|
||||
* Right justified help menu items are generally considered a bad idea now days.
|
||||
*/
|
||||
{ "/_Help", NULL, 0, 0, "<Branch>" },
|
||||
{ "/Help/_About", NULL, menuitem_cb, 0 },
|
||||
};
|
||||
|
||||
static void
|
||||
toolbar_cb (GtkWidget *button,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You activated radio action: \"%s\" of type \"%s\".\nCurrent value: %d",
|
||||
name, typename, value);
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (data),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You selected a toolbar button");
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (dialog,
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (G_OBJECT (dialog),
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
|
||||
static GtkActionEntry entries[] = {
|
||||
{ "FileMenu", NULL, "_File" }, /* 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 */
|
||||
{ "HelpMenu", NULL, "_Help" }, /* name, stock id, label */
|
||||
{ "New", GTK_STOCK_NEW, /* name, stock id */
|
||||
"_New", "<control>N", /* label, accelerator */
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "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 */
|
||||
"Save current file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "SaveAs", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"Save _As...", NULL, /* label, accelerator */
|
||||
"Save to a file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Quit", GTK_STOCK_QUIT, /* name, stock id */
|
||||
"_Quit", "<control>Q", /* label, accelerator */
|
||||
"Quit", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "About", NULL, /* name, stock id */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Logo", "demo-gtk-logo", /* name, stock id */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
"GTK+", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
};
|
||||
static guint n_entries = G_N_ELEMENTS (entries);
|
||||
|
||||
|
||||
static GtkToggleActionEntry toggle_entries[] = {
|
||||
{ "Bold", GTK_STOCK_BOLD, /* name, stock id */
|
||||
"_Bold", "<control>B", /* label, accelerator */
|
||||
"Bold", /* tooltip */
|
||||
G_CALLBACK (activate_action),
|
||||
TRUE }, /* is_active */
|
||||
};
|
||||
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||
|
||||
enum {
|
||||
COLOR_RED,
|
||||
COLOR_GREEN,
|
||||
COLOR_BLUE
|
||||
};
|
||||
|
||||
static GtkRadioActionEntry color_entries[] = {
|
||||
{ "Red", NULL, /* name, stock id */
|
||||
"_Red", "<control>R", /* label, accelerator */
|
||||
"Blood", COLOR_RED }, /* tooltip, value */
|
||||
{ "Green", NULL, /* name, stock id */
|
||||
"_Green", "<control>G", /* label, accelerator */
|
||||
"Grass", COLOR_GREEN }, /* tooltip, value */
|
||||
{ "Blue", NULL, /* name, stock id */
|
||||
"_Blue", "<control>B", /* label, accelerator */
|
||||
"Sky", COLOR_BLUE }, /* tooltip, value */
|
||||
};
|
||||
static guint n_color_entries = G_N_ELEMENTS (color_entries);
|
||||
|
||||
enum {
|
||||
SHAPE_SQUARE,
|
||||
SHAPE_RECTANGLE,
|
||||
SHAPE_OVAL,
|
||||
};
|
||||
|
||||
static GtkRadioActionEntry shape_entries[] = {
|
||||
{ "Square", NULL, /* name, stock id */
|
||||
"_Square", "<control>S", /* label, accelerator */
|
||||
"Square", SHAPE_SQUARE }, /* tooltip, value */
|
||||
{ "Rectangle", NULL, /* name, stock id */
|
||||
"_Rectangle", "<control>R", /* label, accelerator */
|
||||
"Rectangle", SHAPE_RECTANGLE }, /* tooltip, value */
|
||||
{ "Oval", NULL, /* name, stock id */
|
||||
"_Oval", "<control>O", /* label, accelerator */
|
||||
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||
};
|
||||
static guint n_shape_entries = G_N_ELEMENTS (shape_entries);
|
||||
|
||||
static const gchar *ui_info =
|
||||
"<ui>"
|
||||
" <menubar name='MenuBar'>"
|
||||
" <menu action='FileMenu'>"
|
||||
" <menuitem action='New'/>"
|
||||
" <menuitem action='Open'/>"
|
||||
" <menuitem action='Save'/>"
|
||||
" <menuitem action='SaveAs'/>"
|
||||
" <separator/>"
|
||||
" <menuitem action='Quit'/>"
|
||||
" </menu>"
|
||||
" <menu action='PreferencesMenu'>"
|
||||
" <menu action='ColorMenu'>"
|
||||
" <menuitem action='Red'/>"
|
||||
" <menuitem action='Green'/>"
|
||||
" <menuitem action='Blue'/>"
|
||||
" </menu>"
|
||||
" <menu action='ShapeMenu'>"
|
||||
" <menuitem action='Square'/>"
|
||||
" <menuitem action='Rectangle'/>"
|
||||
" <menuitem action='Oval'/>"
|
||||
" </menu>"
|
||||
" <menuitem action='Bold'/>"
|
||||
" </menu>"
|
||||
" <menu action='HelpMenu'>"
|
||||
" <menuitem action='About'/>"
|
||||
" </menu>"
|
||||
" </menubar>"
|
||||
" <toolbar name='ToolBar'>"
|
||||
" <toolitem action='Open'/>"
|
||||
" <toolitem action='Quit'/>"
|
||||
" <separator action='Sep1'/>"
|
||||
" <toolitem action='Logo'/>"
|
||||
" </toolbar>"
|
||||
"</ui>";
|
||||
|
||||
|
||||
|
||||
/* This function registers our custom toolbar icons, so they can be themed.
|
||||
*
|
||||
* It's totally optional to do this, you could just manually insert icons
|
||||
@@ -241,14 +137,14 @@ register_stock_icons (void)
|
||||
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
|
||||
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
|
||||
gtk_icon_set_unref (icon_set);
|
||||
g_object_unref (pixbuf);
|
||||
g_object_unref (transparent);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
g_object_unref (G_OBJECT (transparent));
|
||||
}
|
||||
else
|
||||
g_warning ("failed to load GTK logo for toolbar");
|
||||
|
||||
/* Drop our reference to the factory, GTK will hold a reference. */
|
||||
g_object_unref (factory);
|
||||
g_object_unref (G_OBJECT (factory));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,30 +185,19 @@ mark_set_callback (GtkTextBuffer *buffer,
|
||||
update_statusbar (buffer, GTK_STATUSBAR (data));
|
||||
}
|
||||
|
||||
static void
|
||||
update_resize_grip (GtkWidget *widget,
|
||||
GdkEventWindowState *event,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
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)));
|
||||
}
|
||||
|
||||
|
||||
GtkWidget *
|
||||
do_appwindow (GtkWidget *do_widget)
|
||||
do_appwindow (void)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *toolbar;
|
||||
GtkWidget *statusbar;
|
||||
GtkWidget *contents;
|
||||
GtkWidget *sw;
|
||||
GtkWidget *bar;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkActionGroup *action_group;
|
||||
GtkUIManager *merge;
|
||||
GError *error = NULL;
|
||||
GtkAccelGroup *accel_group;
|
||||
GtkItemFactory *item_factory;
|
||||
|
||||
register_stock_icons ();
|
||||
|
||||
@@ -320,12 +205,10 @@ do_appwindow (GtkWidget *do_widget)
|
||||
*/
|
||||
|
||||
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), "Application Window");
|
||||
|
||||
/* NULL window variable when window is closed */
|
||||
g_signal_connect (window, "destroy",
|
||||
g_signal_connect (G_OBJECT (window), "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
@@ -333,53 +216,66 @@ do_appwindow (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
/* Create the menubar and toolbar
|
||||
/* Create the menubar
|
||||
*/
|
||||
|
||||
action_group = gtk_action_group_new ("AppWindowActions");
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
NULL);
|
||||
gtk_action_group_add_toggle_actions (action_group,
|
||||
toggle_entries, n_toggle_entries,
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
color_entries, n_color_entries,
|
||||
COLOR_RED,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
shape_entries, n_shape_entries,
|
||||
SHAPE_SQUARE,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
|
||||
merge = gtk_ui_manager_new ();
|
||||
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));
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
g_object_unref (accel_group);
|
||||
|
||||
if (!gtk_ui_manager_add_ui_from_string (merge, ui_info, -1, &error))
|
||||
{
|
||||
g_message ("building menus failed: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
|
||||
|
||||
/* Set up item factory to go away with the window */
|
||||
g_object_ref (item_factory);
|
||||
gtk_object_sink (GTK_OBJECT (item_factory));
|
||||
g_object_set_data_full (G_OBJECT (window),
|
||||
"<main>",
|
||||
item_factory,
|
||||
(GDestroyNotify) g_object_unref);
|
||||
|
||||
/* create menu items */
|
||||
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
|
||||
menu_items, window);
|
||||
|
||||
bar = gtk_ui_manager_get_widget (merge, "/MenuBar");
|
||||
gtk_widget_show (bar);
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
bar,
|
||||
gtk_item_factory_get_widget (item_factory, "<main>"),
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
bar = gtk_ui_manager_get_widget (merge, "/ToolBar");
|
||||
gtk_toolbar_set_tooltips (GTK_TOOLBAR (bar), TRUE);
|
||||
gtk_widget_show (bar);
|
||||
/* Create the toolbar
|
||||
*/
|
||||
toolbar = gtk_toolbar_new ();
|
||||
|
||||
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
|
||||
GTK_STOCK_OPEN,
|
||||
"This is a demo button with an 'open' icon",
|
||||
NULL,
|
||||
G_CALLBACK (toolbar_cb),
|
||||
window, /* user data for callback */
|
||||
-1); /* -1 means "append" */
|
||||
|
||||
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
|
||||
GTK_STOCK_QUIT,
|
||||
"This is a demo button with a 'quit' icon",
|
||||
NULL,
|
||||
G_CALLBACK (toolbar_cb),
|
||||
window, /* user data for callback */
|
||||
-1); /* -1 means "append" */
|
||||
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||
|
||||
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
|
||||
"demo-gtk-logo",
|
||||
"This is a demo button with a 'gtk' icon",
|
||||
NULL,
|
||||
G_CALLBACK (toolbar_cb),
|
||||
window, /* user data for callback */
|
||||
-1); /* -1 means "append" */
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
bar,
|
||||
toolbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
@@ -408,8 +304,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
200, 200);
|
||||
|
||||
contents = gtk_text_view_new ();
|
||||
gtk_widget_grab_focus (contents);
|
||||
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw),
|
||||
contents);
|
||||
|
||||
@@ -437,12 +332,6 @@ do_appwindow (GtkWidget *do_widget)
|
||||
G_CALLBACK (mark_set_callback),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
G_CALLBACK (update_resize_grip),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ create_bbox (gint horizontal,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_button_box (GtkWidget *do_widget)
|
||||
do_button_box (void)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *main_vbox;
|
||||
@@ -53,8 +53,6 @@ do_button_box (GtkWidget *do_widget)
|
||||
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), "Button Boxes");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
|
||||
@@ -1,627 +0,0 @@
|
||||
/* Change Display
|
||||
*
|
||||
* Demonstrates migrating a window between different displays and
|
||||
* screens. A display is a mouse and keyboard with some number of
|
||||
* associated monitors. A screen is a set of monitors grouped
|
||||
* into a single physical work area. The neat thing about having
|
||||
* multiple displays is that they can be on a completely separate
|
||||
* computers, as long as there is a network connection to the
|
||||
* computer where the application is running.
|
||||
*
|
||||
* Only some of the windowing systems where GTK+ runs have the
|
||||
* concept of multiple displays and screens. (The X Window System
|
||||
* is the main example.) Other windowing systems can only
|
||||
* handle one keyboard and mouse, and combine all monitors into
|
||||
* a single screen.
|
||||
*
|
||||
* This is a moderately complex example, and demonstrates:
|
||||
*
|
||||
* - Tracking the currently open displays and screens
|
||||
*
|
||||
* - Changing the screen for a window
|
||||
*
|
||||
* - Letting the user choose a window by clicking on it
|
||||
*
|
||||
* - Using GtkListStore and GtkTreeView
|
||||
*
|
||||
* - Using GtkDialog
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
/* The ChangeDisplayInfo structure corresponds to a toplevel window and
|
||||
* holds pointers to widgets inside the toplevel window along with other
|
||||
* information about the contents of the window.
|
||||
* This is a common organizational structure in real applications.
|
||||
*/
|
||||
typedef struct _ChangeDisplayInfo ChangeDisplayInfo;
|
||||
|
||||
struct _ChangeDisplayInfo
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkSizeGroup *size_group;
|
||||
|
||||
GtkTreeModel *display_model;
|
||||
GtkTreeModel *screen_model;
|
||||
GtkTreeSelection *screen_selection;
|
||||
|
||||
GdkDisplay *current_display;
|
||||
GdkScreen *current_screen;
|
||||
};
|
||||
|
||||
/* These enumerations provide symbolic names for the columns
|
||||
* in the two GtkListStore models.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
DISPLAY_COLUMN_NAME,
|
||||
DISPLAY_COLUMN_DISPLAY,
|
||||
DISPLAY_NUM_COLUMNS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SCREEN_COLUMN_NUMBER,
|
||||
SCREEN_COLUMN_SCREEN,
|
||||
SCREEN_NUM_COLUMNS
|
||||
};
|
||||
|
||||
/* Finds the toplevel window under the mouse pointer, if any.
|
||||
*/
|
||||
static GtkWidget *
|
||||
find_toplevel_at_pointer (GdkDisplay *display)
|
||||
{
|
||||
GdkWindow *pointer_window;
|
||||
GtkWidget *widget = NULL;
|
||||
|
||||
pointer_window = gdk_display_get_window_at_pointer (display, NULL, NULL);
|
||||
|
||||
/* The user data field of a GdkWindow is used to store a pointer
|
||||
* to the widget that created it.
|
||||
*/
|
||||
if (pointer_window)
|
||||
gdk_window_get_user_data (pointer_window, (gpointer*) &widget);
|
||||
|
||||
return widget ? gtk_widget_get_toplevel (widget) : NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_release_event_cb (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gboolean *clicked)
|
||||
{
|
||||
*clicked = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Asks the user to click on a window, then waits for them click
|
||||
* the mouse. When the mouse is released, returns the toplevel
|
||||
* window under the pointer, or NULL, if there is none.
|
||||
*/
|
||||
static GtkWidget *
|
||||
query_for_toplevel (GdkScreen *screen,
|
||||
const char *prompt)
|
||||
{
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GtkWidget *popup, *label, *frame;
|
||||
GdkCursor *cursor;
|
||||
GtkWidget *toplevel = NULL;
|
||||
|
||||
popup = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_screen (GTK_WINDOW (popup), screen);
|
||||
gtk_window_set_modal (GTK_WINDOW (popup), TRUE);
|
||||
gtk_window_set_position (GTK_WINDOW (popup), GTK_WIN_POS_CENTER);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||
gtk_container_add (GTK_CONTAINER (popup), frame);
|
||||
|
||||
label = gtk_label_new (prompt);
|
||||
gtk_misc_set_padding (GTK_MISC (label), 10, 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), label);
|
||||
|
||||
gtk_widget_show_all (popup);
|
||||
cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
|
||||
|
||||
if (gdk_pointer_grab (popup->window, FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK,
|
||||
NULL,
|
||||
cursor,
|
||||
GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
gboolean clicked = FALSE;
|
||||
|
||||
g_signal_connect (popup, "button-release-event",
|
||||
G_CALLBACK (button_release_event_cb), &clicked);
|
||||
|
||||
/* Process events until clicked is set by button_release_event_cb.
|
||||
* We pass in may_block=TRUE since we want to wait if there
|
||||
* are no events currently.
|
||||
*/
|
||||
while (!clicked)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
toplevel = find_toplevel_at_pointer (gdk_screen_get_display (screen));
|
||||
if (toplevel == popup)
|
||||
toplevel = NULL;
|
||||
}
|
||||
|
||||
gdk_cursor_unref (cursor);
|
||||
gtk_widget_destroy (popup);
|
||||
gdk_flush (); /* Really release the grab */
|
||||
|
||||
return toplevel;
|
||||
}
|
||||
|
||||
/* Prompts the user for a toplevel window to move, and then moves
|
||||
* that window to the currently selected display
|
||||
*/
|
||||
static void
|
||||
query_change_display (ChangeDisplayInfo *info)
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (info->window);
|
||||
GtkWidget *toplevel;
|
||||
|
||||
toplevel = query_for_toplevel (screen,
|
||||
"Please select the toplevel\n"
|
||||
"to move to the new screen");
|
||||
|
||||
if (toplevel)
|
||||
gtk_window_set_screen (GTK_WINDOW (toplevel), info->current_screen);
|
||||
else
|
||||
gdk_display_beep (gdk_screen_get_display (screen));
|
||||
}
|
||||
|
||||
/* Fills in the screen list based on the current display
|
||||
*/
|
||||
static void
|
||||
fill_screens (ChangeDisplayInfo *info)
|
||||
{
|
||||
gtk_list_store_clear (GTK_LIST_STORE (info->screen_model));
|
||||
|
||||
if (info->current_display)
|
||||
{
|
||||
gint n_screens = gdk_display_get_n_screens (info->current_display);
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < n_screens; i++)
|
||||
{
|
||||
GdkScreen *screen = gdk_display_get_screen (info->current_display, i);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (info->screen_model), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (info->screen_model), &iter,
|
||||
SCREEN_COLUMN_NUMBER, i,
|
||||
SCREEN_COLUMN_SCREEN, screen,
|
||||
-1);
|
||||
|
||||
if (i == 0)
|
||||
gtk_tree_selection_select_iter (info->screen_selection, &iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Called when the user clicks on a button in our dialog or
|
||||
* closes the dialog through the window manager. Unless the
|
||||
* "Change" button was clicked, we destroy the dialog.
|
||||
*/
|
||||
static void
|
||||
response_cb (GtkDialog *dialog,
|
||||
gint response_id,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
query_change_display (info);
|
||||
else
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
}
|
||||
|
||||
/* Called when the user clicks on "Open..." in the display
|
||||
* frame. Prompts for a new display, and then opens a connection
|
||||
* to that display.
|
||||
*/
|
||||
static void
|
||||
open_display_cb (GtkWidget *button,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *display_entry;
|
||||
GtkWidget *dialog_label;
|
||||
gchar *new_screen_name = NULL;
|
||||
GdkDisplay *result = NULL;
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons ("Open Display",
|
||||
GTK_WINDOW (info->window),
|
||||
GTK_DIALOG_MODAL,
|
||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
display_entry = gtk_entry_new ();
|
||||
gtk_entry_set_activates_default (GTK_ENTRY (display_entry), TRUE);
|
||||
dialog_label =
|
||||
gtk_label_new ("Please enter the name of\nthe new display\n");
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog_label);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), display_entry);
|
||||
|
||||
gtk_widget_grab_focus (display_entry);
|
||||
gtk_widget_show_all (GTK_BIN (dialog)->child);
|
||||
|
||||
while (!result)
|
||||
{
|
||||
gint response_id = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
if (response_id != GTK_RESPONSE_OK)
|
||||
break;
|
||||
|
||||
new_screen_name = gtk_editable_get_chars (GTK_EDITABLE (display_entry),
|
||||
0, -1);
|
||||
|
||||
if (strcmp (new_screen_name, "") != 0)
|
||||
{
|
||||
result = gdk_display_open (new_screen_name);
|
||||
if (!result)
|
||||
{
|
||||
gchar *error_msg =
|
||||
g_strdup_printf ("Can't open display :\n\t%s\nplease try another one\n",
|
||||
new_screen_name);
|
||||
gtk_label_set_text (GTK_LABEL (dialog_label), error_msg);
|
||||
g_free (error_msg);
|
||||
}
|
||||
|
||||
g_free (new_screen_name);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
/* Called when the user clicks on the "Close" button in the
|
||||
* "Display" frame. Closes the selected display.
|
||||
*/
|
||||
static void
|
||||
close_display_cb (GtkWidget *button,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
if (info->current_display)
|
||||
gdk_display_close (info->current_display);
|
||||
}
|
||||
|
||||
/* Called when the selected row in the display list changes.
|
||||
* Updates info->current_display, then refills the list of
|
||||
* screens.
|
||||
*/
|
||||
static void
|
||||
display_changed_cb (GtkTreeSelection *selection,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
DISPLAY_COLUMN_DISPLAY, &info->current_display,
|
||||
-1);
|
||||
else
|
||||
info->current_display = NULL;
|
||||
|
||||
fill_screens (info);
|
||||
}
|
||||
|
||||
/* Called when the selected row in the sceen list changes.
|
||||
* Updates info->current_screen.
|
||||
*/
|
||||
static void
|
||||
screen_changed_cb (GtkTreeSelection *selection,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
SCREEN_COLUMN_SCREEN, &info->current_screen,
|
||||
-1);
|
||||
else
|
||||
info->current_screen = NULL;
|
||||
}
|
||||
|
||||
/* This function is used both for creating the "Display" and
|
||||
* "Screen" frames, since they have a similar structure. The
|
||||
* caller hooks up the right context for the value returned
|
||||
* in tree_view, and packs any relevant buttons into button_vbox.
|
||||
*/
|
||||
static void
|
||||
create_frame (ChangeDisplayInfo *info,
|
||||
const char *title,
|
||||
GtkWidget **frame,
|
||||
GtkWidget **tree_view,
|
||||
GtkWidget **button_vbox)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkWidget *scrollwin;
|
||||
GtkWidget *hbox;
|
||||
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin, TRUE, TRUE, 0);
|
||||
|
||||
*tree_view = gtk_tree_view_new ();
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (scrollwin), *tree_view);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
|
||||
if (!info->size_group)
|
||||
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
gtk_size_group_add_widget (GTK_SIZE_GROUP (info->size_group), *button_vbox);
|
||||
}
|
||||
|
||||
/* If we have a stack of buttons, it often looks better if their contents
|
||||
* are left-aligned, rather than centered. This function creates a button
|
||||
* and left-aligns it contents.
|
||||
*/
|
||||
GtkWidget *
|
||||
left_align_button_new (const char *label)
|
||||
{
|
||||
GtkWidget *button = gtk_button_new_with_mnemonic (label);
|
||||
GtkWidget *child = gtk_bin_get_child (GTK_BIN (button));
|
||||
|
||||
gtk_misc_set_alignment (GTK_MISC (child), 0., 0.5);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
/* Creates the "Display" frame in the main window.
|
||||
*/
|
||||
GtkWidget *
|
||||
create_display_frame (ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *tree_view;
|
||||
GtkWidget *button_vbox;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeSelection *selection;
|
||||
GtkWidget *button;
|
||||
|
||||
create_frame (info, "Display", &frame, &tree_view, &button_vbox);
|
||||
|
||||
button = left_align_button_new ("_Open...");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
button = left_align_button_new ("_Close");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
||||
G_TYPE_STRING,
|
||||
GDK_TYPE_DISPLAY);
|
||||
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), info->display_model);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Name",
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", DISPLAY_COLUMN_NAME,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
g_signal_connect (selection, "changed",
|
||||
G_CALLBACK (display_changed_cb), info);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* Creates the "Screen" frame in the main window.
|
||||
*/
|
||||
GtkWidget *
|
||||
create_screen_frame (ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *tree_view;
|
||||
GtkWidget *button_vbox;
|
||||
GtkTreeViewColumn *column;
|
||||
|
||||
create_frame (info, "Screen", &frame, &tree_view, &button_vbox);
|
||||
|
||||
info->screen_model = (GtkTreeModel *)gtk_list_store_new (SCREEN_NUM_COLUMNS,
|
||||
G_TYPE_INT,
|
||||
GDK_TYPE_SCREEN);
|
||||
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), info->screen_model);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Number",
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", SCREEN_COLUMN_NUMBER,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
|
||||
|
||||
info->screen_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
g_signal_connect (info->screen_selection, "changed",
|
||||
G_CALLBACK (screen_changed_cb), info);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* Called when one of the currently open displays is closed.
|
||||
* Remove it from our list of displays.
|
||||
*/
|
||||
static void
|
||||
display_closed_cb (GdkDisplay *display,
|
||||
gboolean is_error,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gboolean valid;
|
||||
|
||||
for (valid = gtk_tree_model_get_iter_first (info->display_model, &iter);
|
||||
valid;
|
||||
valid = gtk_tree_model_iter_next (info->display_model, &iter))
|
||||
{
|
||||
GdkDisplay *tmp_display;
|
||||
|
||||
gtk_tree_model_get (info->display_model, &iter,
|
||||
DISPLAY_COLUMN_DISPLAY, &tmp_display,
|
||||
-1);
|
||||
if (tmp_display == display)
|
||||
{
|
||||
gtk_list_store_remove (GTK_LIST_STORE (info->display_model), &iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Adds a new display to our list of displays, and connects
|
||||
* to the "closed" signal so that we can remove it from the
|
||||
* list of displays again.
|
||||
*/
|
||||
static void
|
||||
add_display (ChangeDisplayInfo *info,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
const gchar *name = gdk_display_get_name (display);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (info->display_model), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (info->display_model), &iter,
|
||||
DISPLAY_COLUMN_NAME, name,
|
||||
DISPLAY_COLUMN_DISPLAY, display,
|
||||
-1);
|
||||
|
||||
g_signal_connect (display, "closed",
|
||||
G_CALLBACK (display_closed_cb), info);
|
||||
}
|
||||
|
||||
/* Called when a new display is opened
|
||||
*/
|
||||
static void
|
||||
display_opened_cb (GdkDisplayManager *manager,
|
||||
GdkDisplay *display,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
add_display (info, display);
|
||||
}
|
||||
|
||||
/* Adds all currently open displays to our list of displays,
|
||||
* and set up a signal connection so that we'll be notified
|
||||
* when displays are opened in the future as well.
|
||||
*/
|
||||
static void
|
||||
initialize_displays (ChangeDisplayInfo *info)
|
||||
{
|
||||
GdkDisplayManager *manager = gdk_display_manager_get ();
|
||||
GSList *displays = gdk_display_manager_list_displays (manager);
|
||||
GSList *tmp_list;
|
||||
|
||||
for (tmp_list = displays; tmp_list; tmp_list = tmp_list->next)
|
||||
add_display (info, tmp_list->data);
|
||||
|
||||
g_slist_free (tmp_list);
|
||||
|
||||
g_signal_connect (manager, "display_opened",
|
||||
G_CALLBACK (display_opened_cb), info);
|
||||
}
|
||||
|
||||
/* Cleans up when the toplevel is destroyed; we remove the
|
||||
* connections we use to track currently open displays, then
|
||||
* free the ChangeDisplayInfo structure.
|
||||
*/
|
||||
static void
|
||||
destroy_info (ChangeDisplayInfo *info)
|
||||
{
|
||||
GdkDisplayManager *manager = gdk_display_manager_get ();
|
||||
GSList *displays = gdk_display_manager_list_displays (manager);
|
||||
GSList *tmp_list;
|
||||
|
||||
g_signal_handlers_disconnect_by_func (manager,
|
||||
display_opened_cb,
|
||||
info);
|
||||
|
||||
for (tmp_list = displays; tmp_list; tmp_list = tmp_list->next)
|
||||
g_signal_handlers_disconnect_by_func (tmp_list->data,
|
||||
display_closed_cb,
|
||||
info);
|
||||
|
||||
g_slist_free (tmp_list);
|
||||
|
||||
g_object_unref (info->size_group);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_cb (GtkObject *object,
|
||||
ChangeDisplayInfo **info)
|
||||
{
|
||||
destroy_info (*info);
|
||||
*info = NULL;
|
||||
}
|
||||
|
||||
/* Main entry point. If the dialog for this demo doesn't yet exist, creates
|
||||
* it. Otherwise, destroys it.
|
||||
*/
|
||||
GtkWidget *
|
||||
do_changedisplay (GtkWidget *do_widget)
|
||||
{
|
||||
static ChangeDisplayInfo *info = NULL;
|
||||
|
||||
if (!info)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *frame;
|
||||
|
||||
info = g_new0 (ChangeDisplayInfo, 1);
|
||||
|
||||
info->window = gtk_dialog_new_with_buttons ("Change Screen or display",
|
||||
GTK_WINDOW (do_widget),
|
||||
GTK_DIALOG_NO_SEPARATOR,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||
"Change", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (info->window), 300, 400);
|
||||
|
||||
g_signal_connect (info->window, "response",
|
||||
G_CALLBACK (response_cb), info);
|
||||
g_signal_connect (info->window, "destroy",
|
||||
G_CALLBACK (destroy_cb), &info);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->window)->vbox), vbox,
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
frame = create_display_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
frame = create_screen_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
initialize_displays (info);
|
||||
|
||||
gtk_widget_show_all (info->window);
|
||||
return info->window;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (info->window);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -12,27 +12,6 @@ static GtkWidget *da;
|
||||
static GdkColor color;
|
||||
static GtkWidget *frame;
|
||||
|
||||
/* Expose callback for the drawing area
|
||||
*/
|
||||
static gboolean
|
||||
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
if (widget->window)
|
||||
{
|
||||
GtkStyle *style;
|
||||
|
||||
style = gtk_widget_get_style (widget);
|
||||
|
||||
gdk_draw_rectangle (widget->window,
|
||||
style->bg_gc[GTK_STATE_NORMAL],
|
||||
TRUE,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
change_color_callback (GtkWidget *button,
|
||||
gpointer data)
|
||||
@@ -65,7 +44,7 @@ change_color_callback (GtkWidget *button,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_colorsel (GtkWidget *do_widget)
|
||||
do_colorsel (void)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *button;
|
||||
@@ -78,8 +57,6 @@ do_colorsel (GtkWidget *do_widget)
|
||||
color.green = 0;
|
||||
|
||||
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), "Color Selection");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
@@ -99,12 +76,8 @@ do_colorsel (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
g_signal_connect (da, "expose_event",
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 200, 200);
|
||||
/* set the color */
|
||||
|
||||
@@ -93,7 +93,7 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_dialog (GtkWidget *do_widget)
|
||||
do_dialog (void)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
@@ -106,8 +106,6 @@ do_dialog (GtkWidget *do_widget)
|
||||
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), "Dialogs");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
@@ -26,7 +26,7 @@ scribble_configure_event (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref (pixmap);
|
||||
g_object_unref (G_OBJECT (pixmap));
|
||||
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
widget->allocation.width,
|
||||
@@ -209,8 +209,8 @@ checkerboard_expose (GtkWidget *da,
|
||||
++xcount;
|
||||
}
|
||||
|
||||
g_object_unref (gc1);
|
||||
g_object_unref (gc2);
|
||||
g_object_unref (G_OBJECT (gc1));
|
||||
g_object_unref (G_OBJECT (gc2));
|
||||
|
||||
/* return TRUE because we've handled this event, so no
|
||||
* further processing is required.
|
||||
@@ -219,7 +219,7 @@ checkerboard_expose (GtkWidget *da,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_drawingarea (GtkWidget *do_widget)
|
||||
do_drawingarea (void)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
@@ -229,8 +229,6 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
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), "Drawing Area");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
@@ -152,11 +152,13 @@ cell_edited (GtkCellRendererText *cell,
|
||||
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||
gint *column;
|
||||
|
||||
column = g_object_get_data (G_OBJECT (cell), "column");
|
||||
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
|
||||
switch (column)
|
||||
switch (GPOINTER_TO_INT (column))
|
||||
{
|
||||
case COLUMN_NUMBER:
|
||||
{
|
||||
@@ -199,7 +201,7 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* number column */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
g_signal_connect (renderer, "edited",
|
||||
g_signal_connect (G_OBJECT (renderer), "edited",
|
||||
G_CALLBACK (cell_edited), model);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)COLUMN_NUMBER);
|
||||
|
||||
@@ -211,7 +213,7 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* product column */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
g_signal_connect (renderer, "edited",
|
||||
g_signal_connect (G_OBJECT (renderer), "edited",
|
||||
G_CALLBACK (cell_edited), model);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)COLUMN_PRODUCT);
|
||||
|
||||
@@ -223,7 +225,7 @@ add_columns (GtkTreeView *treeview)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_editable_cells (GtkWidget *do_widget)
|
||||
do_editable_cells (void)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
@@ -236,11 +238,9 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
|
||||
/* create window, etc */
|
||||
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), "Shopping list");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
g_signal_connect (window, "destroy",
|
||||
g_signal_connect (G_OBJECT (window), "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
@@ -263,7 +263,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
|
||||
/* create tree view */
|
||||
treeview = gtk_tree_view_new_with_model (model);
|
||||
g_object_unref (model);
|
||||
g_object_unref (G_OBJECT (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);
|
||||
@@ -277,12 +277,12 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
g_signal_connect (button, "clicked",
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
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_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!@PERL@ -w
|
||||
|
||||
print <<EOT;
|
||||
typedef GtkWidget *(*GDoDemoFunc) (GtkWidget *do_widget);
|
||||
typedef GtkWidget *(*GDoDemoFunc) (void);
|
||||
|
||||
typedef struct _Demo Demo;
|
||||
|
||||
@@ -27,7 +27,7 @@ for $file (@ARGV) {
|
||||
|
||||
close INFO_FILE;
|
||||
|
||||
print "GtkWidget *do_$basename (GtkWidget *do_widget);\n";
|
||||
print "GtkWidget *do_$basename (void);\n";
|
||||
|
||||
push @demos, {"title" => $title, "file" => $file,
|
||||
"func" => "do_$basename"};
|
||||
|
||||
@@ -1,318 +0,0 @@
|
||||
/* Text Widget/Hypertext
|
||||
*
|
||||
* Usually, tags modify the appearance of text in the view, e.g. making it
|
||||
* bold or colored or underlined. But tags are not restricted to appearance.
|
||||
* They can also affect the behavior of mouse and key presses, as this demo
|
||||
* shows.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
/* Inserts a piece of text into the buffer, giving it the usual
|
||||
* appearance of a hyperlink in a web browser: blue and underlined.
|
||||
* Additionally, attaches some data on the tag, to make it recognizable
|
||||
* as a link.
|
||||
*/
|
||||
static void
|
||||
insert_link (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter,
|
||||
gchar *text,
|
||||
gint page)
|
||||
{
|
||||
GtkTextTag *tag;
|
||||
|
||||
tag = gtk_text_buffer_create_tag (buffer, NULL,
|
||||
"foreground", "blue",
|
||||
"underline", PANGO_UNDERLINE_SINGLE,
|
||||
NULL);
|
||||
g_object_set_data (G_OBJECT (tag), "page", GINT_TO_POINTER (page));
|
||||
gtk_text_buffer_insert_with_tags (buffer, iter, text, -1, tag, NULL);
|
||||
}
|
||||
|
||||
/* Fills the buffer with text and interspersed links. In any real
|
||||
* hypertext app, this method would parse a file to identify the links.
|
||||
*/
|
||||
static void
|
||||
show_page (GtkTextBuffer *buffer,
|
||||
gint page)
|
||||
{
|
||||
GtkTextIter iter;
|
||||
|
||||
gtk_text_buffer_set_text (buffer, "", 0);
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
|
||||
if (page == 1)
|
||||
{
|
||||
gtk_text_buffer_insert (buffer, &iter, "Some text to show that simple ", -1);
|
||||
insert_link (buffer, &iter, "hypertext", 3);
|
||||
gtk_text_buffer_insert (buffer, &iter, " can easily be realized with ", -1);
|
||||
insert_link (buffer, &iter, "tags", 2);
|
||||
gtk_text_buffer_insert (buffer, &iter, ".", -1);
|
||||
}
|
||||
else if (page == 2)
|
||||
{
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"A tag is an attribute that can be applied to some range of text. "
|
||||
"For example, a tag might be called \"bold\" and make the text inside "
|
||||
"the tag bold. However, the tag concept is more general than that; "
|
||||
"tags don't have to affect appearance. They can instead affect the "
|
||||
"behavior of mouse and key presses, \"lock\" a range of text so the "
|
||||
"user can't edit it, or countless other things.\n", -1);
|
||||
insert_link (buffer, &iter, "Go back", 1);
|
||||
}
|
||||
else if (page == 3)
|
||||
{
|
||||
GtkTextTag *tag;
|
||||
|
||||
tag = gtk_text_buffer_create_tag (buffer, NULL,
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
NULL);
|
||||
gtk_text_buffer_insert_with_tags (buffer, &iter, "hypertext:\n", -1, tag, NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"machine-readable text that is not sequential but is organized "
|
||||
"so that related items of information are connected.\n", -1);
|
||||
insert_link (buffer, &iter, "Go back", 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Looks at all tags covering the position of iter in the text view,
|
||||
* and if one of them is a link, follow it by showing the page identified
|
||||
* by the data attached to it.
|
||||
*/
|
||||
static void
|
||||
follow_if_link (GtkWidget *text_view,
|
||||
GtkTextIter *iter)
|
||||
{
|
||||
GSList *tags = NULL, *tagp = NULL;
|
||||
|
||||
tags = gtk_text_iter_get_tags (iter);
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
show_page (gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view)), page);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (tags)
|
||||
g_slist_free (tags);
|
||||
}
|
||||
|
||||
/* Links can be activated by pressing Enter.
|
||||
*/
|
||||
static gboolean
|
||||
key_press_event (GtkWidget *text_view,
|
||||
GdkEventKey *event)
|
||||
{
|
||||
GtkTextIter iter;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
switch (event->keyval)
|
||||
{
|
||||
case GDK_Return:
|
||||
case GDK_KP_Enter:
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
|
||||
gtk_text_buffer_get_insert (buffer));
|
||||
follow_if_link (text_view, &iter);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Links can also be activated by clicking.
|
||||
*/
|
||||
static gboolean
|
||||
event_after (GtkWidget *text_view,
|
||||
GdkEvent *ev)
|
||||
{
|
||||
GtkTextIter start, end, iter;
|
||||
GtkTextBuffer *buffer;
|
||||
GdkEventButton *event;
|
||||
gint x, y;
|
||||
|
||||
if (ev->type != GDK_BUTTON_RELEASE)
|
||||
return FALSE;
|
||||
|
||||
event = (GdkEventButton *)ev;
|
||||
|
||||
if (event->button != 1)
|
||||
return FALSE;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
|
||||
|
||||
/* we shouldn't follow a link if the user has selected something */
|
||||
gtk_text_buffer_get_selection_bounds (buffer, &start, &end);
|
||||
if (gtk_text_iter_get_offset (&start) != gtk_text_iter_get_offset (&end))
|
||||
return FALSE;
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
event->x, event->y, &x, &y);
|
||||
|
||||
gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (text_view), &iter, x, y);
|
||||
|
||||
follow_if_link (text_view, &iter);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean hovering_over_link = FALSE;
|
||||
GdkCursor *hand_cursor = NULL;
|
||||
GdkCursor *regular_cursor = NULL;
|
||||
|
||||
/* Looks at all tags covering the position (x, y) in the text view,
|
||||
* and if one of them is a link, change the cursor to the "hands" cursor
|
||||
* typically used by web browsers.
|
||||
*/
|
||||
static void
|
||||
set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GSList *tags = NULL, *tagp = NULL;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
gboolean hovering = FALSE;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (text_view);
|
||||
|
||||
gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
|
||||
|
||||
tags = gtk_text_iter_get_tags (&iter);
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
hovering = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hovering != hovering_over_link)
|
||||
{
|
||||
hovering_over_link = hovering;
|
||||
|
||||
if (hovering_over_link)
|
||||
gdk_window_set_cursor (gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT), hand_cursor);
|
||||
else
|
||||
gdk_window_set_cursor (gtk_text_view_get_window (text_view, GTK_TEXT_WINDOW_TEXT), regular_cursor);
|
||||
}
|
||||
|
||||
if (tags)
|
||||
g_slist_free (tags);
|
||||
}
|
||||
|
||||
/* Update the cursor image if the pointer moved.
|
||||
*/
|
||||
static gboolean
|
||||
motion_notify_event (GtkWidget *text_view,
|
||||
GdkEventMotion *event)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
event->x, event->y, &x, &y);
|
||||
|
||||
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
|
||||
|
||||
gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Also update the cursor image if the window becomes visible
|
||||
* (e.g. when a window covering it got iconified).
|
||||
*/
|
||||
static gboolean
|
||||
visibility_notify_event (GtkWidget *text_view,
|
||||
GdkEventVisibility *event)
|
||||
{
|
||||
gint wx, wy, bx, by;
|
||||
|
||||
gdk_window_get_pointer (text_view->window, &wx, &wy, NULL);
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
wx, wy, &bx, &by);
|
||||
|
||||
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), bx, by);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_hypertext (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *view;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
hand_cursor = gdk_cursor_new (GDK_HAND2);
|
||||
regular_cursor = gdk_cursor_new (GDK_XTERM);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Hypertext");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
g_signal_connect (G_OBJECT (view), "key-press-event",
|
||||
G_CALLBACK (key_press_event), NULL);
|
||||
g_signal_connect (G_OBJECT (view), "event-after",
|
||||
G_CALLBACK (event_after), NULL);
|
||||
g_signal_connect (G_OBJECT (view), "motion-notify-event",
|
||||
G_CALLBACK (motion_notify_event), NULL);
|
||||
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));
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_add (GTK_CONTAINER (window), sw);
|
||||
gtk_container_add (GTK_CONTAINER (sw), view);
|
||||
|
||||
show_page (buffer, 1);
|
||||
|
||||
gtk_widget_show_all (sw);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
g_object_unref (pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (pixbuf_loader));
|
||||
pixbuf_loader = NULL;
|
||||
|
||||
load_timeout = 0;
|
||||
@@ -173,7 +173,7 @@ progressive_timeout (gpointer data)
|
||||
return FALSE; /* uninstall the timeout */
|
||||
}
|
||||
|
||||
g_object_unref (pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (pixbuf_loader));
|
||||
pixbuf_loader = NULL;
|
||||
}
|
||||
}
|
||||
@@ -227,16 +227,16 @@ progressive_timeout (gpointer data)
|
||||
if (pixbuf_loader)
|
||||
{
|
||||
gdk_pixbuf_loader_close (pixbuf_loader, NULL);
|
||||
g_object_unref (pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (pixbuf_loader));
|
||||
pixbuf_loader = NULL;
|
||||
}
|
||||
|
||||
pixbuf_loader = gdk_pixbuf_loader_new ();
|
||||
|
||||
g_signal_connect (pixbuf_loader, "area_prepared",
|
||||
g_signal_connect (G_OBJECT (pixbuf_loader), "area_prepared",
|
||||
G_CALLBACK (progressive_prepared_callback), image);
|
||||
|
||||
g_signal_connect (pixbuf_loader, "area_updated",
|
||||
g_signal_connect (G_OBJECT (pixbuf_loader), "area_updated",
|
||||
G_CALLBACK (progressive_updated_callback), image);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ cleanup_callback (GtkObject *object,
|
||||
if (pixbuf_loader)
|
||||
{
|
||||
gdk_pixbuf_loader_close (pixbuf_loader, NULL);
|
||||
g_object_unref (pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (pixbuf_loader));
|
||||
pixbuf_loader = NULL;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ toggle_sensitivity_callback (GtkWidget *togglebutton,
|
||||
|
||||
|
||||
GtkWidget *
|
||||
do_images (GtkWidget *do_widget)
|
||||
do_images (void)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *vbox;
|
||||
@@ -322,8 +322,6 @@ do_images (GtkWidget *do_widget)
|
||||
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), "Images");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
@@ -444,7 +442,7 @@ do_images (GtkWidget *do_widget)
|
||||
button = gtk_toggle_button_new_with_mnemonic ("_Insensitive");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
g_signal_connect (G_OBJECT (button), "toggled",
|
||||
G_CALLBACK (toggle_sensitivity_callback),
|
||||
vbox);
|
||||
}
|
||||
|
||||
120
demos/gtk-demo/item_factory.c
Normal file
120
demos/gtk-demo/item_factory.c
Normal file
@@ -0,0 +1,120 @@
|
||||
/* Item Factory
|
||||
*
|
||||
* The GtkItemFactory object allows the easy creation of menus
|
||||
* from an array of descriptions of menu items.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
gtk_ifactory_cb (gpointer callback_data,
|
||||
guint callback_action,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
g_message ("ItemFactory: activated \"%s\"",
|
||||
gtk_item_factory_path_from_widget (widget));
|
||||
}
|
||||
|
||||
static GtkItemFactoryEntry menu_items[] =
|
||||
{
|
||||
{ "/_File", NULL, 0, 0, "<Branch>" },
|
||||
{ "/File/tearoff1", NULL, gtk_ifactory_cb, 0, "<Tearoff>" },
|
||||
{ "/File/_New", "<control>N", gtk_ifactory_cb, 0 },
|
||||
{ "/File/_Open", "<control>O", gtk_ifactory_cb, 0 },
|
||||
{ "/File/_Save", "<control>S", gtk_ifactory_cb, 0 },
|
||||
{ "/File/Save _As...", NULL, gtk_ifactory_cb, 0 },
|
||||
{ "/File/sep1", NULL, gtk_ifactory_cb, 0, "<Separator>" },
|
||||
{ "/File/_Quit", "<control>Q", gtk_ifactory_cb, 0 },
|
||||
|
||||
{ "/_Preferences", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/_Color", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/Color/_Red", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
|
||||
{ "/_Preferences/Color/_Green", NULL, gtk_ifactory_cb, 0, "/Preferences/Color/Red" },
|
||||
{ "/_Preferences/Color/_Blue", NULL, gtk_ifactory_cb, 0, "/Preferences/Color/Red" },
|
||||
{ "/_Preferences/_Shape", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/Shape/_Square", NULL, gtk_ifactory_cb, 0, "<RadioItem>" },
|
||||
{ "/_Preferences/Shape/_Rectangle", NULL, gtk_ifactory_cb, 0, "/Preferences/Shape/Square" },
|
||||
{ "/_Preferences/Shape/_Oval", NULL, gtk_ifactory_cb, 0, "/Preferences/Shape/Rectangle" },
|
||||
|
||||
{ "/_Help", NULL, 0, 0, "<LastBranch>" },
|
||||
{ "/Help/_About", NULL, gtk_ifactory_cb, 0 },
|
||||
};
|
||||
|
||||
static int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
|
||||
|
||||
GtkWidget *
|
||||
do_item_factory (void)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *box1;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *separator;
|
||||
GtkWidget *label;
|
||||
GtkWidget *button;
|
||||
GtkAccelGroup *accel_group;
|
||||
GtkItemFactory *item_factory;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
|
||||
g_object_set_data_full (G_OBJECT (window), "<main>",
|
||||
item_factory, (GDestroyNotify) g_object_unref);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Item Factory");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
|
||||
|
||||
/* preselect /Preferences/Shape/Oval over the other radios
|
||||
*/
|
||||
gtk_check_menu_item_set_active
|
||||
(GTK_CHECK_MENU_ITEM (gtk_item_factory_get_item (item_factory,
|
||||
"/Preferences/Shape/Oval")),
|
||||
TRUE);
|
||||
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box1);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box1),
|
||||
gtk_item_factory_get_widget (item_factory, "<main>"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Type\n<alt>\nto start");
|
||||
gtk_widget_set_size_request (label, 200, 200);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
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);
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* column for fixed toggles */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_signal_connect (renderer, "toggled",
|
||||
g_signal_connect (G_OBJECT (renderer), "toggled",
|
||||
G_CALLBACK (fixed_toggled), model);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Fixed?",
|
||||
@@ -155,7 +155,7 @@ add_columns (GtkTreeView *treeview)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_list_store (GtkWidget *do_widget)
|
||||
do_list_store (void)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
@@ -167,11 +167,9 @@ do_list_store (GtkWidget *do_widget)
|
||||
|
||||
/* create window, etc */
|
||||
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), "GtkListStore demo");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
g_signal_connect (G_OBJECT (window), "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
@@ -198,7 +196,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview),
|
||||
COLUMN_DESCRIPTION);
|
||||
|
||||
g_object_unref (model);
|
||||
g_object_unref (G_OBJECT (model));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
|
||||
@@ -28,31 +28,6 @@ struct _CallbackData
|
||||
GtkTreePath *path;
|
||||
};
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
#undef DEMOCODEDIR
|
||||
|
||||
static char *
|
||||
get_democodedir (void)
|
||||
{
|
||||
static char *result = NULL;
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
result = g_win32_get_package_installation_directory (NULL, NULL);
|
||||
if (result == NULL)
|
||||
result = "unknown-location";
|
||||
|
||||
result = g_strconcat (result, "\\share\\gtk-2.0\\demo", NULL);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#define DEMOCODEDIR get_democodedir ()
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* demo_find_file:
|
||||
* @base: base filename
|
||||
@@ -68,10 +43,9 @@ gchar *
|
||||
demo_find_file (const char *base,
|
||||
GError **err)
|
||||
{
|
||||
g_return_val_if_fail (err == NULL || *err == NULL, NULL);
|
||||
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
|
||||
|
||||
if (g_file_test ("gtk-logo-rgb.gif", G_FILE_TEST_EXISTS) &&
|
||||
g_file_test (base, G_FILE_TEST_EXISTS))
|
||||
if (g_file_test (base, G_FILE_TEST_EXISTS))
|
||||
return g_strdup (base);
|
||||
else
|
||||
{
|
||||
@@ -604,7 +578,7 @@ row_activated_cb (GtkTreeView *tree_view,
|
||||
&iter,
|
||||
ITALIC_COLUMN, !italic,
|
||||
-1);
|
||||
window = (func) (gtk_widget_get_toplevel (GTK_WIDGET (tree_view)));
|
||||
window = (func) ();
|
||||
|
||||
if (window != NULL)
|
||||
{
|
||||
@@ -748,7 +722,7 @@ create_tree (void)
|
||||
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
|
||||
g_object_set (cell,
|
||||
g_object_set (G_OBJECT (cell),
|
||||
"style", PANGO_STYLE_ITALIC,
|
||||
NULL);
|
||||
|
||||
@@ -816,8 +790,8 @@ setup_default_icon (void)
|
||||
list = g_list_append (list, transparent);
|
||||
gtk_window_set_default_icon_list (list);
|
||||
g_list_free (list);
|
||||
g_object_unref (pixbuf);
|
||||
g_object_unref (transparent);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
g_object_unref (G_OBJECT (transparent));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -837,8 +811,8 @@ main (int argc, char **argv)
|
||||
if (g_file_test ("../../gdk-pixbuf/libpixbufloader-pnm.la",
|
||||
G_FILE_TEST_EXISTS))
|
||||
{
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
|
||||
g_setenv ("GTK_IM_MODULE_FILE", "../../modules/input/gtk.immodules", TRUE);
|
||||
putenv ("GDK_PIXBUF_MODULEDIR=../../gdk-pixbuf");
|
||||
putenv ("GTK_IM_MODULE_FILE=../../modules/input/gtk.immodules");
|
||||
}
|
||||
/* -- End of hack -- */
|
||||
|
||||
|
||||
@@ -19,9 +19,12 @@
|
||||
* up when the menu item is selected. Typically, all menu items in a menu bar
|
||||
* have submenus.
|
||||
*
|
||||
* GtkUIManager provides a higher-level interface for creating menu bars
|
||||
* The GtkOptionMenu widget is a button that pops up a GtkMenu when clicked.
|
||||
* It's used inside dialogs and such.
|
||||
*
|
||||
* GtkItemFactory provides a higher-level interface for creating menu bars
|
||||
* and menus; while you can construct menus manually, most people don't
|
||||
* do that. There's a separate demo for GtkUIManager.
|
||||
* do that. There's a separate demo for GtkItemFactory.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -71,12 +74,14 @@ create_menu (gint depth,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_menus (GtkWidget *do_widget)
|
||||
do_menus (void)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box1;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *button;
|
||||
GtkWidget *optionmenu;
|
||||
GtkWidget *separator;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
@@ -86,8 +91,7 @@ do_menus (GtkWidget *do_widget)
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK(gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "delete-event",
|
||||
@@ -126,6 +130,62 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
menu = create_menu (1, FALSE);
|
||||
gtk_menu_set_accel_group (GTK_MENU (menu), accel_group);
|
||||
|
||||
menuitem = gtk_separator_menu_item_new ();
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
menuitem = gtk_check_menu_item_new_with_label ("Accelerate Me");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_widget_add_accelerator (menuitem,
|
||||
"activate",
|
||||
accel_group,
|
||||
GDK_F1,
|
||||
0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
menuitem = gtk_check_menu_item_new_with_label ("Accelerator Locked");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_widget_add_accelerator (menuitem,
|
||||
"activate",
|
||||
accel_group,
|
||||
GDK_F2,
|
||||
0,
|
||||
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
|
||||
menuitem = gtk_check_menu_item_new_with_label ("Accelerators Frozen");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_widget_add_accelerator (menuitem,
|
||||
"activate",
|
||||
accel_group,
|
||||
GDK_F2,
|
||||
0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_add_accelerator (menuitem,
|
||||
"activate",
|
||||
accel_group,
|
||||
GDK_F3,
|
||||
0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
|
||||
optionmenu = gtk_option_menu_new ();
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
||||
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), 3);
|
||||
gtk_box_pack_start (GTK_BOX (box2), optionmenu, TRUE, TRUE, 0);
|
||||
gtk_widget_show (optionmenu);
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
gtk_widget_show (separator);
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
@@ -112,7 +112,7 @@ create_pane_options (GtkPaned *paned,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_panes (GtkWidget *do_widget)
|
||||
do_panes (void)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *frame;
|
||||
@@ -124,8 +124,6 @@ do_panes (GtkWidget *do_widget)
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
@@ -205,15 +205,14 @@ cleanup_callback (GtkObject *object,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_pixbufs (GtkWidget *do_widget)
|
||||
do_pixbufs (void)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GError *error;
|
||||
|
||||
|
||||
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), "Pixbufs");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
@@ -253,7 +252,7 @@ do_pixbufs (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
|
||||
timeout_id = g_timeout_add (FRAME_DELAY, timeout, NULL);
|
||||
timeout_id = gtk_timeout_add (FRAME_DELAY, timeout, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,22 +17,29 @@
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
/* Convenience function to create a combo box holding a number of strings
|
||||
/* Convenience function to create an option menu holding a number of strings
|
||||
*/
|
||||
GtkWidget *
|
||||
create_combo_box (const char **strings)
|
||||
create_option_menu (const char **strings)
|
||||
{
|
||||
GtkWidget *combo_box;
|
||||
GtkWidget *menu;
|
||||
GtkWidget *option_menu;
|
||||
const char **str;
|
||||
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
for (str = strings; *str; str++)
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), *str);
|
||||
{
|
||||
GtkWidget *menu_item = gtk_menu_item_new_with_label (*str);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
}
|
||||
|
||||
return combo_box;
|
||||
option_menu = gtk_option_menu_new ();
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
|
||||
|
||||
return option_menu;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -42,7 +49,7 @@ add_row (GtkTable *table,
|
||||
const char *label_text,
|
||||
const char **options)
|
||||
{
|
||||
GtkWidget *combo_box;
|
||||
GtkWidget *option_menu;
|
||||
GtkWidget *label;
|
||||
|
||||
label = gtk_label_new_with_mnemonic (label_text);
|
||||
@@ -52,10 +59,10 @@ add_row (GtkTable *table,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
combo_box = create_combo_box (options);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), combo_box);
|
||||
gtk_size_group_add_widget (size_group, combo_box);
|
||||
gtk_table_attach (GTK_TABLE (table), combo_box,
|
||||
option_menu = create_option_menu (options);
|
||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), option_menu);
|
||||
gtk_size_group_add_widget (size_group, option_menu);
|
||||
gtk_table_attach (GTK_TABLE (table), option_menu,
|
||||
1, 2, row, row + 1,
|
||||
0, 0,
|
||||
0, 0);
|
||||
@@ -80,7 +87,7 @@ toggle_grouping (GtkToggleButton *check_button,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_sizegroup (GtkWidget *do_widget)
|
||||
do_sizegroup (void)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *frame;
|
||||
@@ -103,8 +110,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("GtkSizeGroup",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
NULL, 0,
|
||||
GTK_STOCK_CLOSE,
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
|
||||
@@ -34,7 +34,7 @@ stock_item_info_free (StockItemInfo *info)
|
||||
g_free (info->macro);
|
||||
g_free (info->accel_str);
|
||||
if (info->small_icon)
|
||||
g_object_unref (info->small_icon);
|
||||
g_object_unref (G_OBJECT (info->small_icon));
|
||||
|
||||
g_free (info);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ stock_item_info_copy (StockItemInfo *src)
|
||||
|
||||
info->small_icon = src->small_icon;
|
||||
if (info->small_icon)
|
||||
g_object_ref (info->small_icon);
|
||||
g_object_ref (G_OBJECT (info->small_icon));
|
||||
|
||||
return info;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ create_model (void)
|
||||
GSList *ids;
|
||||
GSList *tmp_list;
|
||||
|
||||
store = gtk_list_store_new (2, STOCK_ITEM_INFO_TYPE, G_TYPE_STRING);
|
||||
store = gtk_list_store_new (1, STOCK_ITEM_INFO_TYPE);
|
||||
|
||||
ids = gtk_stock_list_ids ();
|
||||
ids = g_slist_sort (ids, (GCompareFunc) strcmp);
|
||||
@@ -190,7 +190,7 @@ create_model (void)
|
||||
w, h,
|
||||
GDK_INTERP_BILINEAR);
|
||||
|
||||
g_object_unref (info.small_icon);
|
||||
g_object_unref (G_OBJECT (info.small_icon));
|
||||
info.small_icon = scaled;
|
||||
}
|
||||
}
|
||||
@@ -210,12 +210,12 @@ create_model (void)
|
||||
info.macro = id_to_macro (info.id);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter, 0, &info, 1, info.id, -1);
|
||||
gtk_list_store_set (store, &iter, 0, &info, -1);
|
||||
|
||||
g_free (info.macro);
|
||||
g_free (info.accel_str);
|
||||
if (info.small_icon)
|
||||
g_object_unref (info.small_icon);
|
||||
g_object_unref (G_OBJECT (info.small_icon));
|
||||
|
||||
tmp_list = g_slist_next (tmp_list);
|
||||
}
|
||||
@@ -339,6 +339,26 @@ macro_set_func_text (GtkTreeViewColumn *tree_column,
|
||||
stock_item_info_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
macro_set_func_pixbuf (GtkTreeViewColumn *tree_column,
|
||||
GtkCellRenderer *cell,
|
||||
GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
StockItemInfo *info;
|
||||
|
||||
gtk_tree_model_get (model, iter,
|
||||
0, &info,
|
||||
-1);
|
||||
|
||||
g_object_set (GTK_CELL_RENDERER (cell),
|
||||
"pixbuf", info->small_icon,
|
||||
NULL);
|
||||
|
||||
stock_item_info_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
id_set_func (GtkTreeViewColumn *tree_column,
|
||||
GtkCellRenderer *cell,
|
||||
@@ -400,7 +420,7 @@ label_set_func (GtkTreeViewColumn *tree_column,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_stock_browser (GtkWidget *do_widget)
|
||||
do_stock_browser (void)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
@@ -417,8 +437,6 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
GtkTreeViewColumn *column;
|
||||
|
||||
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), "Stock Icons and Items");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, 500);
|
||||
|
||||
@@ -438,7 +456,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
|
||||
treeview = gtk_tree_view_new_with_model (model);
|
||||
|
||||
g_object_unref (model);
|
||||
g_object_unref (G_OBJECT (model));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
@@ -449,8 +467,8 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
gtk_tree_view_column_pack_start (column,
|
||||
cell_renderer,
|
||||
FALSE);
|
||||
gtk_tree_view_column_set_attributes (column, cell_renderer,
|
||||
"stock_id", 1, NULL);
|
||||
gtk_tree_view_column_set_cell_data_func (column, cell_renderer,
|
||||
macro_set_func_pixbuf, NULL, NULL);
|
||||
cell_renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_tree_view_column_pack_start (column,
|
||||
cell_renderer,
|
||||
@@ -462,6 +480,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
column);
|
||||
|
||||
cell_renderer = gtk_cell_renderer_text_new ();
|
||||
|
||||
gtk_tree_view_insert_column_with_data_func (GTK_TREE_VIEW (treeview),
|
||||
-1,
|
||||
"Label",
|
||||
@@ -470,7 +489,6 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
cell_renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_tree_view_insert_column_with_data_func (GTK_TREE_VIEW (treeview),
|
||||
-1,
|
||||
"Accel",
|
||||
@@ -479,7 +497,6 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
cell_renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_tree_view_insert_column_with_data_func (GTK_TREE_VIEW (treeview),
|
||||
-1,
|
||||
"ID",
|
||||
@@ -526,7 +543,7 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
|
||||
|
||||
g_signal_connect (selection,
|
||||
g_signal_connect (G_OBJECT (selection),
|
||||
"changed",
|
||||
G_CALLBACK (selection_changed),
|
||||
NULL);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Text Widget/Multiple Views
|
||||
/* Text Widget
|
||||
*
|
||||
* The GtkTextView widget displays a GtkTextBuffer. One GtkTextBuffer
|
||||
* can be displayed by multiple GtkTextViews. This demo has two views
|
||||
@@ -84,7 +84,7 @@ create_tags (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_create_tag (buffer, "foreground_stipple",
|
||||
"foreground_stipple", stipple, NULL);
|
||||
|
||||
g_object_unref (stipple);
|
||||
g_object_unref (G_OBJECT (stipple));
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
|
||||
"pixels_above_lines", 30, NULL);
|
||||
@@ -174,7 +174,7 @@ insert_text (GtkTextBuffer *buffer)
|
||||
}
|
||||
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
pixbuf = scaled;
|
||||
|
||||
/* get start of buffer; each insertion will revalidate the
|
||||
@@ -332,10 +332,10 @@ insert_text (GtkTextBuffer *buffer)
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n", -1);
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch Süd) Grüß Gott\nGreek (Ελληνικά) Γειά σας\nHebrew שלום\nJapanese (日本語)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "وقد بدأ ثلاث من أكثر المؤسسات تقدما في شبكة اكسيون برامجها كمنظمات لا تسعى للربح، ثم تحولت في السنوات الخمس الماضية إلى مؤسسات مالية منظمة، وباتت جزءا من النظام المالي في بلدانها، ولكنها تتخصص في خدمة قطاع المشروعات الصغيرة. وأحد أكثر هذه المؤسسات نجاحا هو »بانكوسول« في بوليفيا.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can put widgets in the buffer: Here's a button: ", -1);
|
||||
@@ -356,7 +356,7 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
gtk_text_buffer_apply_tag_by_name (buffer, "word_wrap", &start, &end);
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -393,17 +393,27 @@ attach_widgets (GtkTextView *text_view)
|
||||
{
|
||||
widget = gtk_button_new_with_label ("Click Me");
|
||||
|
||||
g_signal_connect (widget, "clicked",
|
||||
g_signal_connect (G_OBJECT (widget), "clicked",
|
||||
G_CALLBACK (easter_egg_callback),
|
||||
NULL);
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
widget = gtk_combo_box_new_text ();
|
||||
GtkWidget *menu_item;
|
||||
GtkWidget *menu;
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 1");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 2");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 3");
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
widget = gtk_option_menu_new ();
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("Option 1");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
menu_item = gtk_menu_item_new_with_label ("Option 2");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
menu_item = gtk_menu_item_new_with_label ("Option 3");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu);
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
@@ -438,7 +448,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_textview (GtkWidget *do_widget)
|
||||
do_textview (void)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -451,8 +461,6 @@ do_textview (GtkWidget *do_widget)
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
|
||||
@@ -575,7 +583,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
|
||||
recursive_attach_view (0, GTK_TEXT_VIEW (view), anchor);
|
||||
|
||||
g_object_unref (buffer);
|
||||
g_object_unref (G_OBJECT (buffer));
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
|
||||
@@ -261,7 +261,7 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* column for holiday names */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
|
||||
|
||||
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Holiday",
|
||||
@@ -273,11 +273,11 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* alex column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)ALEX_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
|
||||
model);
|
||||
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Alex",
|
||||
renderer,
|
||||
@@ -296,11 +296,11 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* havoc column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)HAVOC_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
|
||||
model);
|
||||
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Havoc",
|
||||
renderer,
|
||||
@@ -318,11 +318,11 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* tim column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)TIM_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
|
||||
model);
|
||||
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Tim",
|
||||
renderer,
|
||||
@@ -341,11 +341,11 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* owen column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)OWEN_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
|
||||
model);
|
||||
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Owen",
|
||||
renderer,
|
||||
@@ -363,11 +363,11 @@ add_columns (GtkTreeView *treeview)
|
||||
|
||||
/* dave column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)DAVE_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (item_toggled),
|
||||
model);
|
||||
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|
||||
-1, "Dave",
|
||||
renderer,
|
||||
@@ -385,7 +385,7 @@ add_columns (GtkTreeView *treeview)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_tree_store (GtkWidget *do_widget)
|
||||
do_tree_store (void)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
@@ -396,10 +396,8 @@ do_tree_store (GtkWidget *do_widget)
|
||||
|
||||
/* create window, etc */
|
||||
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), "Card planning sheet");
|
||||
g_signal_connect (window, "destroy",
|
||||
g_signal_connect (G_OBJECT (window), "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
@@ -423,7 +421,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
|
||||
/* create tree view */
|
||||
treeview = gtk_tree_view_new_with_model (model);
|
||||
g_object_unref (model);
|
||||
g_object_unref (G_OBJECT (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_MULTIPLE);
|
||||
@@ -433,7 +431,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
/* expand all rows after the treeview widget has been realized */
|
||||
g_signal_connect (treeview, "realize",
|
||||
g_signal_connect (G_OBJECT (treeview), "realize",
|
||||
G_CALLBACK (gtk_tree_view_expand_all), NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
|
||||
}
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
/* UI Manager
|
||||
*
|
||||
* The GtkUIManager object allows the easy creation of menus
|
||||
* from an array of actions and a description of the menu hierarchy.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
activate_action (GtkAction *action)
|
||||
{
|
||||
g_message ("Action \"%s\" activated", gtk_action_get_name (action));
|
||||
}
|
||||
|
||||
static void
|
||||
activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
{
|
||||
g_message ("Radio action \"%s\" selected",
|
||||
gtk_action_get_name (GTK_ACTION (current)));
|
||||
}
|
||||
|
||||
static GtkActionEntry entries[] = {
|
||||
{ "FileMenu", NULL, "_File" }, /* 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 */
|
||||
{ "HelpMenu", NULL, "_Help" }, /* name, stock id, label */
|
||||
{ "New", GTK_STOCK_NEW, /* name, stock id */
|
||||
"_New", "<control>N", /* label, accelerator */
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "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 */
|
||||
"Save current file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "SaveAs", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"Save _As...", NULL, /* label, accelerator */
|
||||
"Save to a file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Quit", GTK_STOCK_QUIT, /* name, stock id */
|
||||
"_Quit", "<control>Q", /* label, accelerator */
|
||||
"Quit", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "About", NULL, /* name, stock id */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Logo", "demo-gtk-logo", /* name, stock id */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
"GTK+", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
};
|
||||
static guint n_entries = G_N_ELEMENTS (entries);
|
||||
|
||||
|
||||
static GtkToggleActionEntry toggle_entries[] = {
|
||||
{ "Bold", GTK_STOCK_BOLD, /* name, stock id */
|
||||
"_Bold", "<control>B", /* label, accelerator */
|
||||
"Bold", /* tooltip */
|
||||
G_CALLBACK (activate_action),
|
||||
TRUE }, /* is_active */
|
||||
};
|
||||
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||
|
||||
enum {
|
||||
COLOR_RED,
|
||||
COLOR_GREEN,
|
||||
COLOR_BLUE
|
||||
};
|
||||
|
||||
static GtkRadioActionEntry color_entries[] = {
|
||||
{ "Red", NULL, /* name, stock id */
|
||||
"_Red", "<control>R", /* label, accelerator */
|
||||
"Blood", COLOR_RED }, /* tooltip, value */
|
||||
{ "Green", NULL, /* name, stock id */
|
||||
"_Green", "<control>G", /* label, accelerator */
|
||||
"Grass", COLOR_GREEN }, /* tooltip, value */
|
||||
{ "Blue", NULL, /* name, stock id */
|
||||
"_Blue", "<control>B", /* label, accelerator */
|
||||
"Sky", COLOR_BLUE }, /* tooltip, value */
|
||||
};
|
||||
static guint n_color_entries = G_N_ELEMENTS (color_entries);
|
||||
|
||||
enum {
|
||||
SHAPE_SQUARE,
|
||||
SHAPE_RECTANGLE,
|
||||
SHAPE_OVAL,
|
||||
};
|
||||
|
||||
static GtkRadioActionEntry shape_entries[] = {
|
||||
{ "Square", NULL, /* name, stock id */
|
||||
"_Square", "<control>S", /* label, accelerator */
|
||||
"Square", SHAPE_SQUARE }, /* tooltip, value */
|
||||
{ "Rectangle", NULL, /* name, stock id */
|
||||
"_Rectangle", "<control>R", /* label, accelerator */
|
||||
"Rectangle", SHAPE_RECTANGLE }, /* tooltip, value */
|
||||
{ "Oval", NULL, /* name, stock id */
|
||||
"_Oval", "<control>O", /* label, accelerator */
|
||||
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||
};
|
||||
static guint n_shape_entries = G_N_ELEMENTS (shape_entries);
|
||||
|
||||
static const gchar *ui_info =
|
||||
"<ui>"
|
||||
" <menubar name='MenuBar'>"
|
||||
" <menu action='FileMenu'>"
|
||||
" <menuitem action='New'/>"
|
||||
" <menuitem action='Open'/>"
|
||||
" <menuitem action='Save'/>"
|
||||
" <menuitem action='SaveAs'/>"
|
||||
" <separator/>"
|
||||
" <menuitem action='Quit'/>"
|
||||
" </menu>"
|
||||
" <menu action='PreferencesMenu'>"
|
||||
" <menu action='ColorMenu'>"
|
||||
" <menuitem action='Red'/>"
|
||||
" <menuitem action='Green'/>"
|
||||
" <menuitem action='Blue'/>"
|
||||
" </menu>"
|
||||
" <menu action='ShapeMenu'>"
|
||||
" <menuitem action='Square'/>"
|
||||
" <menuitem action='Rectangle'/>"
|
||||
" <menuitem action='Oval'/>"
|
||||
" </menu>"
|
||||
" <menuitem action='Bold'/>"
|
||||
" </menu>"
|
||||
" <menu action='HelpMenu'>"
|
||||
" <menuitem action='About'/>"
|
||||
" </menu>"
|
||||
" </menubar>"
|
||||
" <toolbar name='ToolBar'>"
|
||||
" <toolitem action='Open'/>"
|
||||
" <toolitem action='Quit'/>"
|
||||
" <separator action='Sep1'/>"
|
||||
" <toolitem action='Logo'/>"
|
||||
" </toolbar>"
|
||||
"</ui>";
|
||||
|
||||
GtkWidget *
|
||||
do_ui_manager (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *box1;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *separator;
|
||||
GtkWidget *label;
|
||||
GtkWidget *button;
|
||||
GtkUIManager *ui;
|
||||
GtkActionGroup *actions;
|
||||
GError *error = NULL;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
|
||||
actions = gtk_action_group_new ("Actions");
|
||||
gtk_action_group_add_actions (actions, entries, n_entries, NULL);
|
||||
gtk_action_group_add_toggle_actions (actions,
|
||||
toggle_entries, n_toggle_entries,
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (actions,
|
||||
color_entries, n_color_entries,
|
||||
COLOR_RED,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (actions,
|
||||
shape_entries, n_shape_entries,
|
||||
SHAPE_OVAL,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
|
||||
ui = gtk_ui_manager_new ();
|
||||
gtk_ui_manager_insert_action_group (ui, actions, 0);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_ui_manager_get_accel_group (ui));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "UI Manager");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
if (!gtk_ui_manager_add_ui_from_string (ui, ui_info, -1, &error))
|
||||
{
|
||||
g_message ("building menus failed: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box1);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box1),
|
||||
gtk_ui_manager_get_widget (ui, "/MenuBar"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Type\n<alt>\nto start");
|
||||
gtk_widget_set_size_request (label, 200, 200);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
|
||||
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
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);
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (button);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ static guint timeout_id;
|
||||
static void
|
||||
destroy_cb (GtkObject *object, gpointer data)
|
||||
{
|
||||
g_source_remove (timeout_id);
|
||||
gtk_timeout_remove (timeout_id);
|
||||
timeout_id = 0;
|
||||
|
||||
gtk_main_quit ();
|
||||
@@ -225,7 +225,7 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
|
||||
timeout_id = g_timeout_add (FRAME_DELAY, timeout, NULL);
|
||||
timeout_id = gtk_timeout_add (FRAME_DELAY, timeout, NULL);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
gtk_main ();
|
||||
|
||||
@@ -12,8 +12,8 @@ file_exists (const char *filename)
|
||||
}
|
||||
|
||||
void
|
||||
pixbuf_init (void)
|
||||
pixbuf_init ()
|
||||
{
|
||||
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
|
||||
g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
|
||||
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf");
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ destroy_context (gpointer data)
|
||||
if (lc->pixbuf_loader)
|
||||
{
|
||||
gdk_pixbuf_loader_close (lc->pixbuf_loader, NULL);
|
||||
g_object_unref (lc->pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (lc->pixbuf_loader));
|
||||
}
|
||||
|
||||
g_free (lc);
|
||||
@@ -230,7 +230,7 @@ progressive_timeout (gpointer data)
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
g_object_unref (lc->pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (lc->pixbuf_loader));
|
||||
lc->pixbuf_loader = NULL;
|
||||
|
||||
lc->load_timeout = 0;
|
||||
@@ -238,7 +238,7 @@ progressive_timeout (gpointer data)
|
||||
return FALSE; /* uninstall the timeout */
|
||||
}
|
||||
|
||||
g_object_unref (lc->pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (lc->pixbuf_loader));
|
||||
lc->pixbuf_loader = NULL;
|
||||
}
|
||||
}
|
||||
@@ -271,7 +271,7 @@ progressive_timeout (gpointer data)
|
||||
if (lc->pixbuf_loader)
|
||||
{
|
||||
gdk_pixbuf_loader_close (lc->pixbuf_loader, NULL);
|
||||
g_object_unref (lc->pixbuf_loader);
|
||||
g_object_unref (G_OBJECT (lc->pixbuf_loader));
|
||||
lc->pixbuf_loader = NULL;
|
||||
}
|
||||
|
||||
@@ -357,12 +357,6 @@ do_image (const char *filename)
|
||||
|
||||
start_progressive_loading (image);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
g_signal_connect (window, "delete_event",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
return window;
|
||||
@@ -411,12 +405,6 @@ do_nonprogressive (const gchar *filename)
|
||||
image = gtk_image_new_from_file (filename);
|
||||
gtk_container_add (GTK_CONTAINER (frame), image);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
g_signal_connect (window, "delete_event",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
@@ -442,3 +430,4 @@ main (int argc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data)
|
||||
g_error_free (err);
|
||||
} else {
|
||||
compare_pixbufs (pixbuf, compare, "jpeg");
|
||||
g_object_unref (compare);
|
||||
g_object_unref (G_OBJECT (compare));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -126,7 +126,7 @@ keypress_check (GtkWidget *widget, GdkEventKey *evt, gpointer data)
|
||||
g_error_free (err);
|
||||
} else {
|
||||
compare_pixbufs (pixbuf, compare, "png");
|
||||
g_object_unref (compare);
|
||||
g_object_unref (G_OBJECT (compare));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,12 +11,7 @@ GtkWidget *darea;
|
||||
void
|
||||
set_interp_type (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
guint types[] = { GDK_INTERP_NEAREST,
|
||||
GDK_INTERP_BILINEAR,
|
||||
GDK_INTERP_TILES,
|
||||
GDK_INTERP_HYPER };
|
||||
|
||||
interp_type = types[gtk_combo_box_get_active (GTK_COMBO_BOX (widget))];
|
||||
interp_type = GPOINTER_TO_UINT (data);
|
||||
gtk_widget_queue_draw (darea);
|
||||
}
|
||||
|
||||
@@ -47,10 +42,10 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
interp_type, overall_alpha,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest,
|
||||
0, 0, event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
|
||||
gdk_pixbuf_render_to_drawable (dest, widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
0, 0, event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
|
||||
|
||||
g_object_unref (dest);
|
||||
|
||||
@@ -63,7 +58,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window, *vbox;
|
||||
GtkWidget *combo_box;
|
||||
GtkWidget *menuitem, *optionmenu, *menu;
|
||||
GtkWidget *alignment;
|
||||
GtkWidget *hbox, *label, *hscale;
|
||||
GtkAdjustment *adjustment;
|
||||
@@ -100,18 +95,37 @@ main(int argc, char **argv)
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
combo_box = gtk_combo_box_new_text ();
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("NEAREST");
|
||||
g_signal_connect (menuitem, "activate",
|
||||
G_CALLBACK (set_interp_type),
|
||||
GUINT_TO_POINTER (GDK_INTERP_NEAREST));
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("BILINEAR");
|
||||
g_signal_connect (menuitem, "activate",
|
||||
G_CALLBACK (set_interp_type),
|
||||
GUINT_TO_POINTER (GDK_INTERP_BILINEAR));
|
||||
gtk_widget_show (menuitem);
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("TILES");
|
||||
g_signal_connect (menuitem, "activate",
|
||||
G_CALLBACK (set_interp_type),
|
||||
GUINT_TO_POINTER (GDK_INTERP_TILES));
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "NEAREST");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "BILINEAR");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "TILES");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "HYPER");
|
||||
menuitem = gtk_menu_item_new_with_label ("HYPER");
|
||||
g_signal_connect (menuitem, "activate",
|
||||
G_CALLBACK (set_interp_type),
|
||||
GUINT_TO_POINTER (GDK_INTERP_HYPER));
|
||||
gtk_container_add (GTK_CONTAINER (menu), menuitem);
|
||||
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 1);
|
||||
|
||||
g_signal_connect (combo_box, "changed",
|
||||
G_CALLBACK (set_interp_type),
|
||||
NULL);
|
||||
optionmenu = gtk_option_menu_new ();
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
||||
gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), 1);
|
||||
|
||||
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
|
||||
@@ -130,7 +144,7 @@ main(int argc, char **argv)
|
||||
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (alignment), combo_box);
|
||||
gtk_container_add (GTK_CONTAINER (alignment), optionmenu);
|
||||
gtk_widget_show_all (vbox);
|
||||
|
||||
/* Compute the size without the drawing area, so we know how big to make the default size */
|
||||
|
||||
@@ -321,26 +321,16 @@ expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
|
||||
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
|
||||
|
||||
if (gdk_pixbuf_get_has_alpha (pixbuf)) {
|
||||
GdkPixbuf *dest;
|
||||
|
||||
gdk_window_set_back_pixmap (drawing_area->window, NULL, FALSE);
|
||||
|
||||
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
|
||||
|
||||
gdk_pixbuf_composite_color (pixbuf, dest,
|
||||
0, 0, event->area.width, event->area.height,
|
||||
-event->area.x, -event->area.y,
|
||||
(double) drawing_area->allocation.width / gdk_pixbuf_get_width (pixbuf),
|
||||
(double) drawing_area->allocation.height / gdk_pixbuf_get_height (pixbuf),
|
||||
GDK_INTERP_BILINEAR, 255,
|
||||
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
|
||||
|
||||
gdk_draw_pixbuf (drawing_area->window, drawing_area->style->fg_gc[GTK_STATE_NORMAL], dest,
|
||||
0, 0, event->area.x, event->area.y,
|
||||
event->area.width, event->area.height,
|
||||
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
|
||||
|
||||
g_object_unref (dest);
|
||||
gdk_draw_rgb_32_image (drawing_area->window,
|
||||
drawing_area->style->black_gc,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width,
|
||||
event->area.height,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
gdk_pixbuf_get_pixels (pixbuf)
|
||||
+ (event->area.y * gdk_pixbuf_get_rowstride (pixbuf))
|
||||
+ (event->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
|
||||
gdk_pixbuf_get_rowstride (pixbuf));
|
||||
} else {
|
||||
gdk_draw_rgb_image (drawing_area->window,
|
||||
drawing_area->style->white_gc,
|
||||
@@ -362,6 +352,8 @@ config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
|
||||
|
||||
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
|
||||
|
||||
g_print ("X:%d Y:%d\n", event->width, event->height);
|
||||
|
||||
#if 0
|
||||
if (((event->width) != gdk_pixbuf_get_width (pixbuf)) ||
|
||||
((event->height) != gdk_pixbuf_get_height (pixbuf)))
|
||||
@@ -439,8 +431,7 @@ update_timeout (gpointer data)
|
||||
GError *error;
|
||||
|
||||
done = FALSE;
|
||||
error = NULL;
|
||||
|
||||
error = FALSE;
|
||||
if (!feof (status->imagefile)) {
|
||||
gint nbytes;
|
||||
|
||||
@@ -448,6 +439,7 @@ update_timeout (gpointer data)
|
||||
status->imagefile);
|
||||
|
||||
|
||||
error = NULL;
|
||||
if (!gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes, &error)) {
|
||||
g_warning ("Error writing to loader: %s",
|
||||
error->message);
|
||||
@@ -458,13 +450,13 @@ update_timeout (gpointer data)
|
||||
|
||||
}
|
||||
else
|
||||
done = TRUE;
|
||||
done = TRUE;
|
||||
|
||||
if (done) {
|
||||
/* ignoring errors, we should not do that. */
|
||||
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader), NULL);
|
||||
gtk_widget_queue_draw (*status->rgbwin);
|
||||
g_object_unref (status->loader);
|
||||
g_object_unref (G_OBJECT (status->loader));
|
||||
fclose (status->imagefile);
|
||||
g_free (status->buf);
|
||||
}
|
||||
@@ -480,7 +472,6 @@ progressive_prepared_callback (GdkPixbufLoader* loader, gpointer data)
|
||||
GdkPixbuf* pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
|
||||
|
||||
g_assert (pixbuf != NULL);
|
||||
|
||||
g_object_ref (pixbuf); /* for the RGB window */
|
||||
@@ -496,9 +487,12 @@ progressive_updated_callback (GdkPixbufLoader* loader, guint x, guint y, guint w
|
||||
{
|
||||
GtkWidget** window_loc = data;
|
||||
|
||||
/* g_print ("progressive_updated_callback:\n\t%d\t%d\t%d\t%d\n", x, y, width, height); */
|
||||
|
||||
if (*window_loc != NULL)
|
||||
gtk_widget_queue_draw_area (*window_loc,
|
||||
x, y, width, height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -506,12 +500,6 @@ static int readlen = 4096;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@@ -599,7 +587,7 @@ main (int argc, char **argv)
|
||||
found_valid = TRUE;
|
||||
}
|
||||
}
|
||||
#if 1
|
||||
#if 1
|
||||
{
|
||||
GtkWidget* rgb_window = NULL;
|
||||
ProgressFileStatus status;
|
||||
@@ -610,10 +598,6 @@ main (int argc, char **argv)
|
||||
status.rgbwin = &rgb_window;
|
||||
|
||||
status.buf = g_malloc (readlen);
|
||||
|
||||
g_signal_connect (pixbuf_loader, "size_prepared",
|
||||
G_CALLBACK (size_func), NULL);
|
||||
|
||||
g_signal_connect (pixbuf_loader, "area_prepared",
|
||||
G_CALLBACK (progressive_prepared_callback),
|
||||
&rgb_window);
|
||||
@@ -626,7 +610,7 @@ main (int argc, char **argv)
|
||||
|
||||
status.readlen = readlen;
|
||||
|
||||
status.timeout = g_timeout_add (100, update_timeout, &status);
|
||||
status.timeout = gtk_timeout_add (100, update_timeout, &status);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
295
docs/Changes-1.2.txt
Normal file
295
docs/Changes-1.2.txt
Normal file
@@ -0,0 +1,295 @@
|
||||
|
||||
|
||||
DON'T EDIT THIS FILE - changes are now maintained in the reference
|
||||
manual, see docs/reference/gtk/changes-*.sgml. Also, when adding a
|
||||
change to the manual, you should amend the docs for all
|
||||
newly-deprecated features to point to the replacement for that
|
||||
feature, and be sure the GTK_DISABLE_DEPRECATED guards are in place in
|
||||
the header files. Be sure to add a note to the docs for EACH
|
||||
deprecated function; don't just do the changes-*.sgml change.
|
||||
|
||||
|
||||
|
||||
Incompatible Changes from GTK+-1.0 to GTK+-1.2:
|
||||
|
||||
* GtkAcceleratorTable has been replaced with GtkAccelGroup
|
||||
|
||||
* GtkMenuFactory has been replaced with GtkItemFactory, although
|
||||
a version of GtkMenuFactory is currently still provided to ease
|
||||
the migration phase.
|
||||
|
||||
* The GtkTypeInfo structures used in the gtk_*_type_init() functions have
|
||||
changed a bit, the old format:
|
||||
GtkTypeInfo bin_info =
|
||||
{
|
||||
"GtkBin",
|
||||
sizeof (GtkBin),
|
||||
sizeof (GtkBinClass),
|
||||
(GtkClassInitFunc) gtk_bin_class_init,
|
||||
(GtkObjectInitFunc) gtk_bin_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL,
|
||||
};
|
||||
|
||||
needs to be converted to:
|
||||
|
||||
static const GtkTypeInfo bin_info =
|
||||
{
|
||||
"GtkBin",
|
||||
sizeof (GtkBin),
|
||||
sizeof (GtkBinClass),
|
||||
(GtkClassInitFunc) gtk_bin_class_init,
|
||||
(GtkObjectInitFunc) gtk_bin_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
the GtkArgSetFunc and GtkArgGetFunc functions are not supported from the
|
||||
type system anymore, and you should make sure that your code only fills
|
||||
in these fields with NULL and doesn't use the deprecated function typedefs
|
||||
(GtkArgSetFunc) and (GtkArgGetFunc) anymore.
|
||||
|
||||
* A number of Gtk functions were renamed. For compatibility, gtkcompat.h
|
||||
#define's the old 1.0.x function names in terms of the new names.
|
||||
To assure your Gtk program doesn't rely on outdated function
|
||||
variants, compile your program with -DGTK_DISABLE_COMPAT_H to disable
|
||||
the compatibility aliases.
|
||||
|
||||
Here is the list of the old names and replacements:
|
||||
|
||||
Old: Replacement:
|
||||
|
||||
gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width
|
||||
gtk_check_menu_item_set_state gtk_check_menu_item_set_active
|
||||
gtk_container_border_width gtk_container_set_border_width
|
||||
gtk_label_set gtk_label_set_text
|
||||
gtk_notebook_current_page gtk_notebook_get_current_page
|
||||
gtk_packer_configure gtk_packer_set_child_packing
|
||||
gtk_paned_gutter_size gtk_paned_set_gutter_size
|
||||
gtk_paned_handle_size gtk_paned_set_handle_size
|
||||
gtk_scale_value_width gtk_scale_get_value_width
|
||||
gtk_style_apply_default_pixmap gtk_style_apply_default_background (1)
|
||||
gtk_toggle_button_set_state gtk_toggle_button_set_active
|
||||
gtk_window_position gtk_window_set_position
|
||||
|
||||
(1) gtk_style_apply_default_background() has an additional
|
||||
argument, gboolean set_bg. This parameter should be FALSE if
|
||||
the background is being set for a NO_WINDOW widget, otherwise
|
||||
true.
|
||||
|
||||
* During the development phase of the 1.1.x line of Gtk certain functions
|
||||
were deprecated and later removed. Functions affected are:
|
||||
|
||||
Removed: Replacement:
|
||||
gtk_clist_set_border gtk_clist_set_shadow_type
|
||||
gtk_container_block_resize gtk_container_set_resize_mode
|
||||
gtk_container_unblock_resize gtk_container_set_resize_mode
|
||||
gtk_container_need_resize gtk_container_check_resize
|
||||
gtk_ctree_show_stub gtk_ctree_set_show_stub
|
||||
gtk_ctree_set_reorderable gtk_clist_set_reorderable
|
||||
gtk_ctree_set_use_drag_icons gtk_clist_set_use_drag_icons
|
||||
gtk_entry_adjust_scroll (1)
|
||||
gtk_object_class_add_user_signal gtk_object_class_user_signal_new
|
||||
gtk_preview_put_row gtk_preview_put
|
||||
gtk_progress_bar_construct gtk_progress_set_adjustment
|
||||
gtk_scrolled_window_construct gtk_scrolled_window_set_{h|v}adjustment
|
||||
gtk_spin_button_construct gtk_spin_button_configure
|
||||
gtk_widget_thaw_accelerators gtk_widget_unlock_accelerators
|
||||
gtk_widget_freeze_accelerators gtk_widget_lock_accelerators
|
||||
|
||||
(1) This function is no longer needed as GtkEntry should automatically
|
||||
keep the scroll adjusted properly.
|
||||
|
||||
* Additionally, all gtk_*_interp functions were removed.
|
||||
gtk_*_full versions were provided as of GTK+-1.0 and should
|
||||
be used instead.
|
||||
|
||||
* GtkButton has been changed to derive from GtkBin.
|
||||
To access a button's child, use GTK_BIN (button)->child, instead
|
||||
of the old GTK_BUTTON (button)->child.
|
||||
|
||||
* The selection API has been slightly modified:
|
||||
|
||||
gtk_selection_add_handler() and gtk_selection_add_handler_full()
|
||||
have been removed. To supply the selection, one now register
|
||||
the targets one is interested in with:
|
||||
|
||||
void gtk_selection_add_target (GtkWidget *widget,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
guint info);
|
||||
|
||||
or:
|
||||
|
||||
void gtk_selection_add_targets (GtkWidget *widget,
|
||||
GdkAtom selection,
|
||||
GtkTargetEntry *targets,
|
||||
guint ntargets);
|
||||
|
||||
When a request for a selection is received, the new "selection_get"
|
||||
signal will be called:
|
||||
|
||||
void "selection_get" (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time);
|
||||
|
||||
A "time" parameter has also been added to the "selection_received"
|
||||
signal.
|
||||
|
||||
void "selection_received" (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint time);
|
||||
|
||||
* The old drag and drop API has been completely removed and replaced.
|
||||
See the reference documentation for details on the new API.
|
||||
|
||||
* Support for Themes has been added. In general, this does
|
||||
not affect application code, however, a few new rules should
|
||||
be observed:
|
||||
|
||||
- To set a shape for a window, you must use
|
||||
gtk_widget_shape_combine_mask() instead of
|
||||
gdk_window_shape_combine_mask(), or the shape will be
|
||||
reset when switching themes.
|
||||
|
||||
- It is no longer permissable to draw directly on an arbitrary
|
||||
widget, or to set an arbitrary widget's background pixmap.
|
||||
If you need to do that, use a GtkDrawingArea or (for a
|
||||
toplevel) the new GtkDrawWindow widget.
|
||||
|
||||
* The ScrolledWindow widget no longer creates a Viewport
|
||||
automatically. Instead, it has been generalized to accept
|
||||
any "self-scrolling" widget.
|
||||
|
||||
The self-scrolling widgets in the Gtk+ core are GtkViewport,
|
||||
GtkCList, GtkCTree, GtkText, and GtkLayout. All of these widgets can
|
||||
be added to a scrolled window as normal children with
|
||||
gtk_container_add() and scrollbars will be set up automatically.
|
||||
|
||||
To add scrollbars to a non self-scrolling widget, (such as a GtkList),
|
||||
first add it to a viewport, then add the viewport to a scrolled window.
|
||||
The scrolled window code provides a convenience function to do this:
|
||||
|
||||
void gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrollwin,
|
||||
GtkWidget *child);
|
||||
|
||||
This does exactly what it says - it creates a Viewport, adds the child
|
||||
widget to it, then adds the Viewport to the scrolled window.
|
||||
|
||||
The scrollbars have been removed from the GtkCList and GtkCTree,
|
||||
because they are now scrolled by simply adding them to a Scrolled
|
||||
Window. The scrollbar policy is set on the scrolled window with
|
||||
gtk_scrolled_window_set_policy() and not on the child widgets
|
||||
(e.g. GtkCList's gtk_clist_set_policy() was removed).
|
||||
|
||||
* The "main loop" of GTK+ has been moved to GLib. This should not
|
||||
affect existing programs, since compatibility functions have
|
||||
been provided. However, you may want to consider migrating
|
||||
your code to use the GLib main loop directly.
|
||||
|
||||
* the GTK_BASIC flag was removed, and with it the corresponding
|
||||
macro and function GTK_WIDGET_BASIC() and gtk_widget_basic().
|
||||
|
||||
* All freeze/thaw methods are now recursive - that is, if you
|
||||
freeze a widget n times, you must also thaw it n times.
|
||||
|
||||
Therefore, if you have code like:
|
||||
|
||||
gboolean frozen;
|
||||
frozen = GTK_CLIST_FROZEN (clist);
|
||||
gtk_clist_freeze (clist);
|
||||
[...]
|
||||
if (!frozen)
|
||||
gtk_clist_thaw (clist);
|
||||
|
||||
it will not work anymore. It must be, simply:
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
[...]
|
||||
gtk_clist_thaw (clist);
|
||||
|
||||
* The thread safety in GTK+ 1.2 is slightly different than
|
||||
that which appeared in early versions in the 1.1
|
||||
development track. The main difference is that it relies on
|
||||
the thread primitives in GLib, and on the thread-safe
|
||||
GLib main loop.
|
||||
|
||||
This means:
|
||||
|
||||
- You must call g_thread_init() before executing any
|
||||
other GTK+ or GDK functions in a threaded GTK+ program.
|
||||
|
||||
- Idles, timeouts, and input functions are executed outside
|
||||
of the main GTK+ lock. So, if you need to call GTK+
|
||||
inside of such a callback, you must surround the callback
|
||||
with a gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
|
||||
[ However, signals are still executed within the main
|
||||
GTK+ lock ]
|
||||
|
||||
In particular, this means, if you are writing widgets
|
||||
that might be used in threaded programs, you _must_
|
||||
surround timeouts and idle functions in this matter.
|
||||
|
||||
As always, you must also surround any calls to GTK+
|
||||
not made within a signal handler with a
|
||||
gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
|
||||
- There is no longer a special --with-threads configure
|
||||
option for GTK+. To use threads in a GTK+ program, you
|
||||
must:
|
||||
|
||||
a) If you want to use the native thread implementation,
|
||||
make sure GLib found this in configuration, otherwise,
|
||||
call you must provide a thread implementation to
|
||||
g_thread_init().
|
||||
|
||||
b) Link with the libraries returned by:
|
||||
|
||||
gtk-config --libs gthread
|
||||
|
||||
and use the cflags from:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
You can get these CFLAGS and LIBS by passing gthread
|
||||
as the fourth parameter to the AM_PATH_GTK automake
|
||||
macro.
|
||||
|
||||
* Prior to GTK+-1.2, there were two conflicting interpretations
|
||||
of widget->requistion. It was either taken to be
|
||||
the size that the widget requested, or that size
|
||||
modified by calls to gtk_widget_set_usize(). In GTK+-1.2,
|
||||
it is always interpreted the first way.
|
||||
|
||||
Container widgets are affected in two ways by this:
|
||||
|
||||
1) Container widgets should not pass widget->requisition
|
||||
as the second parameter to gtk_widget_size_request().
|
||||
Instead they should call it like:
|
||||
|
||||
GtkRequisition child_requisition;
|
||||
gtk_widget_size_request (widget, &child_requisition);
|
||||
|
||||
2) Container widgets should not access child->requisition
|
||||
directly. Either they should use the values returned
|
||||
by gtk_widget_size_request(), or they should call
|
||||
the new function:
|
||||
|
||||
void gtk_widget_get_child_requisition (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
|
||||
which returns the requisition of the given widget, modified
|
||||
by calls to gtk_widget_set_usize().
|
||||
|
||||
|
||||
|
||||
DON'T EDIT THIS FILE - changes are now maintained in the reference
|
||||
manual, see docs/reference/gtk/changes-*.sgml. Also, when adding a
|
||||
change to the manual, you should amend the docs for all
|
||||
newly-deprecated features to point to the replacement for that
|
||||
feature, and be sure the GTK_DISABLE_DEPRECATED guards are in place in
|
||||
the header files. Be sure to add a note to the docs for EACH
|
||||
deprecated function; don't just do the changes-*.sgml change.
|
||||
587
docs/Changes-2.0.txt
Normal file
587
docs/Changes-2.0.txt
Normal file
@@ -0,0 +1,587 @@
|
||||
|
||||
|
||||
|
||||
DON'T EDIT THIS FILE - changes are now maintained in the reference
|
||||
manual, see docs/reference/gtk/changes-*.sgml. Also, when adding a
|
||||
change to the manual, you should amend the docs for all
|
||||
newly-deprecated features to point to the replacement for that
|
||||
feature, and be sure the GTK_DISABLE_DEPRECATED guards are in place in
|
||||
the header files. Be sure to add a note to the docs for EACH
|
||||
deprecated function; don't just do the changes-*.sgml change.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Incompatible Changes from GTK+-1.2 to GTK+-2.0:
|
||||
|
||||
* gtk_container_get_toplevels() was removed and replaced with
|
||||
gtk_window_list_toplevels(), which has different memory management
|
||||
on the return value (gtk_window_list_toplevels() copies the GList
|
||||
and also references each widget in the list, so you have to
|
||||
g_list_free() the list after first unref'ing each list member).
|
||||
|
||||
* The gdk_time* functions have been removed. This functionality
|
||||
has been unused since the main loop was moved into GLib
|
||||
prior to 1.2.
|
||||
|
||||
* The signature for GtkPrintFunc (used for gtk_item_factory_dump_items)
|
||||
has been changed to take a 'const gchar *' instead of 'gchar *', to
|
||||
match what we do for glib, and other similar cases.
|
||||
|
||||
* The detail arguments in the GtkStyleClass structure are now 'const gchar *'.
|
||||
|
||||
* gtk_paned_set_gutter_size() has been removed, since the small handle tab
|
||||
has been changed to include the entire area previously occupied by
|
||||
the gutter.
|
||||
|
||||
* gtk_paned_set_handle_size() has been removed, in favor of a style property,
|
||||
since this is an option that only makes sense for themes to adjust.
|
||||
|
||||
* GDK no longer selects OwnerGrabButtonMask for button presses. This means
|
||||
that the automatic grab that occurs when the user presses a button
|
||||
will have owner_events = FALSE, so all events are redirected to the
|
||||
grab window, even events that would normally go to other windows of the
|
||||
window's owner.
|
||||
|
||||
* GtkColorSelectionDialog has now been moved into it's own set of files,
|
||||
gtkcolorseldialog.c and gtkcolorseldialog.h.
|
||||
|
||||
* gtk_widget_shape_combine_mask() now keeps a reference count on the
|
||||
mask pixmap that is passed in.
|
||||
|
||||
* the GtkPatternSpec has been moved to glib as GPatternSpec, the pattern
|
||||
arguments to gtk_item_factory_dump_items() and gtk_item_factory_dump_rc()
|
||||
have thusly been changed to take a GPatternSpec instead of GtkPatternSpec.
|
||||
|
||||
* Type system changes:
|
||||
- GTK_TYPE_OBJECT is not a fundamental type anymore. Type checks of the
|
||||
style (GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT)
|
||||
will not work anymore. As a replacement, (GTK_TYPE_IS_OBJECT (some_type))
|
||||
can be used now.
|
||||
- The following types vanished: GTK_TYPE_ARGS, GTK_TYPE_CALLBACK,
|
||||
GTK_TYPE_C_CALLBACK, GTK_TYPE_FOREIGN. The corresponding GtkArg
|
||||
fields and field access macros are also gone.
|
||||
- The following type aliases vanished: GTK_TYPE_FLAT_FIRST,
|
||||
GTK_TYPE_FLAT_LAST, GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST.
|
||||
- The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQNO() vanished, use of
|
||||
GTK_FUNDAMENTAL_TYPE() is discouraged. Instead, the corresponding GType
|
||||
API should be used: G_TYPE_FUNDAMENTAL(), G_TYPE_DERIVE_ID(),
|
||||
G_TYPE_BRANCH_SEQNO(). Note that the GLib type system doesn't build new
|
||||
type ids based on a global incremental sequential number anymore, but
|
||||
numbers new type ids sequentially per fundamental type branch.
|
||||
- The following type functions vanished/were replaced:
|
||||
Old Function Replacement
|
||||
gtk_type_query() - being investigated -
|
||||
gtk_type_set_varargs_type() -
|
||||
gtk_type_get_varargs_type() -
|
||||
gtk_type_check_object_cast() g_type_check_instance_cast()
|
||||
gtk_type_check_class_cast() g_type_check_class_cast()
|
||||
gtk_type_describe_tree() -
|
||||
gtk_type_describe_heritage() -
|
||||
gtk_type_free() -
|
||||
gtk_type_children_types() g_type_children()
|
||||
gtk_type_set_chunk_alloc() GTypeInfo.n_preallocs
|
||||
gtk_type_register_enum() g_enum_register_static()
|
||||
gtk_type_register_flags() g_flags_register_static()
|
||||
gtk_type_parent_class() g_type_parent() / g_type_class_peek_parent()
|
||||
Use of g_type_class_ref() / g_type_class_unref() and g_type_class_peek()
|
||||
is recommended over usage of gtk_type_class().
|
||||
Use of g_type_register_static() / g_type_register_dynamic() is recommended
|
||||
over usage of gtk_type_unique().
|
||||
|
||||
* Object system changes:
|
||||
GtkObject derives from GObject, so is not the basic object type anymore.
|
||||
This imposes the following source incompatible changes:
|
||||
- GtkObject has no klass field anymore, an object's class can be retrived
|
||||
with the object's coresponding GTK_<OBJECT>_GET_CLASS (object) macro.
|
||||
- GtkObjectClass has no type field anymore, a class's type can be retrived
|
||||
with the GTK_CLASS_TYPE (class) macro.
|
||||
- GtkObjectClass does not introduce the finalize() and shutdown() methods
|
||||
anymore. While shutdown() is intended for GTK+ internal use only, finalize()
|
||||
is required by a variety of object implementations. GObjectClass.finalize
|
||||
should be overriden here, e.g.:
|
||||
static void gtk_label_finalize (GObject *gobject)
|
||||
{
|
||||
GtkLabel *label = GTK_LABEL (gobject);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
static void gtk_label_class_init (GtkLabelClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
|
||||
|
||||
gobject_class->finalize = gtk_label_finalize;
|
||||
}
|
||||
|
||||
- the GtkObject::destroy signal can now be emitted multiple times on an object.
|
||||
::destroy implementations should check that make sure that they take this
|
||||
into account, by checking to make sure that resources are there before
|
||||
freeing them. For example:
|
||||
if (object->foo_data)
|
||||
{
|
||||
g_free (object->foo_data);
|
||||
object->foo_data = NULL;
|
||||
}
|
||||
|
||||
Also, ::destroy implementations have to release object references that
|
||||
the object holds. Code in finalize implementations such as:
|
||||
if (object->adjustment)
|
||||
{
|
||||
gtk_object_unref (object->adjustment);
|
||||
object->adjustment = NULL;
|
||||
}
|
||||
have to be moved into the ::destroy implementations. The reason for doing
|
||||
this is that all object reference cycles should be broken at destruction
|
||||
time.
|
||||
|
||||
Because the ::destroy signal can be emitted multiple times, it no longer
|
||||
makes sense to check if a widget has been destroyed using the
|
||||
GTK_OBJECT_DESTROYED() macro, and this macro has been removed. If
|
||||
catching destruction is still needed, it can be done with a signal
|
||||
connection to ::destroy.
|
||||
|
||||
* Signal system changes:
|
||||
The Gtk 2.0 signal merly proxies the GSignal system now.
|
||||
For future usage, direct use of the GSignal API is recommended,
|
||||
this avoids significant performance hits where GtkArg structures
|
||||
have to be converted into GValues. For language bindings,
|
||||
GSignal+GClosure provide a much more flexible and convenient
|
||||
mechanism to hook into signal emissions or install class default
|
||||
handlers, so the old GtkSignal API for language bindings is not
|
||||
supported anymore.
|
||||
Functions that got removed in the Gtk signal API:
|
||||
gtk_signal_n_emissions(), gtk_signal_n_emissions_by_name(),
|
||||
gtk_signal_set_funcs(), gtk_signal_handler_pending_by_id(),
|
||||
gtk_signal_add_emission_hook(), gtk_signal_add_emission_hook_full(),
|
||||
gtk_signal_remove_emission_hook(), gtk_signal_query().
|
||||
Also, the GtkCallbackMarshal argument to gtk_signal_connect_full() is
|
||||
not supported anymore.
|
||||
For many of the removed functions, similar variants are available
|
||||
in the g_signal_* namespace.
|
||||
The GSignal system perfomrs emissions in a slightly different manner than
|
||||
the old GtkSignal code. Signal handlers that are connected to signal "foo"
|
||||
on object "bar" while "foo" is being emitted, will not be called anymore
|
||||
during the emission they were connected within.
|
||||
|
||||
* Inserting and deleting text in GtkEntry though functions such
|
||||
as gtk_entry_insert_text() now leave the cursor at its original
|
||||
position in the text instead of moving it to the location of
|
||||
the insertion/deletion.
|
||||
|
||||
* The ->label field of GtkFrame widgets has been removed. (As part of
|
||||
a change to allow the arbitrary widgets in the title position.) The
|
||||
text can now be retrieved with the new function gtk_frame_get_text().
|
||||
|
||||
* The 'font' and 'font_set' declarations in RC files are now ignored. There
|
||||
is a new 'font_name' field that holds the string form of a Pango font
|
||||
|
||||
* A number of types in GDK have become subclasses of GObject. For the
|
||||
most part, this should not break anyone's code. However, it's now
|
||||
possible/encouraged to use g_object_ref()/g_object_unref() and other
|
||||
GObject features with these GDK types. The converted types are:
|
||||
GdkWindow, GdkDrawable, GdkPixmap, GdkImage, GdkGC, GdkDragContext,
|
||||
GdkColormap
|
||||
|
||||
* All drawables including pixmaps used to have a type tag, the
|
||||
GdkWindowType enumeration, which included GDK_WINDOW_PIXMAP.
|
||||
GdkWindowType is now a property of GdkWindow _only_, and there is
|
||||
no GDK_WINDOW_PIXMAP. You can use the GDK_IS_PIXMAP() macro to see
|
||||
if you have a pixmap, if you need to know that.
|
||||
|
||||
* GtkStyle and GtkRcStyle are now subclasses of GObject as well. This
|
||||
requires fairly extensive changes to theme engines quite badly, but
|
||||
shouldn't affect most other code.
|
||||
|
||||
* xthickness/ythickness have moved from GtkStyleClass to GtkStyle
|
||||
(from class to instance). This gives themes a bit more flexibility
|
||||
and is generally more of the Right Thing. You can trivially fix
|
||||
your code with s/style->klass->xthickness/style->xthickness/g and
|
||||
same for ythickness.
|
||||
|
||||
* Some GtkStyle draw_ methods have been removed (cross, oval, ramp)
|
||||
and others have been added (expander, layout). This will require
|
||||
changes to theme engines.
|
||||
|
||||
* If you were using private GDK types, they have been rearranged
|
||||
significantly. You shouldn't use private types. ;-)
|
||||
|
||||
* The visual for a widget, and also the default visual is now derived
|
||||
from the colormap for the widget and the default colormap.
|
||||
gtk_widget_set_visual(), gtk_widget_set_default_visual(), gtk_widget_push_visual()
|
||||
and gtk_widget_pop_visual() now do nothing. Since the visual always
|
||||
had to match that of the colormap, it is safe to simply delete
|
||||
all references to these functions.
|
||||
|
||||
* A number of functions in GDK have been renamed for consistency and
|
||||
clarity. #defines to provide backwards compatibility have been
|
||||
included, but can be disabled by defineing GDK_DISABLE_DEPRECATED.
|
||||
|
||||
#define gdk_draw_pixmap gdk_draw_drawable
|
||||
#define gdk_draw_bitmap gdk_draw_drawable
|
||||
|
||||
#define gdk_window_get_size gdk_drawable_get_size
|
||||
#define gdk_window_get_type gdk_window_get_window_type
|
||||
#define gdk_window_get_colormap gdk_drawable_get_colormap
|
||||
#define gdk_window_set_colormap gdk_drawable_set_colormap
|
||||
#define gdk_window_get_visual gdk_drawable_get_visual
|
||||
|
||||
#define gdk_window_ref gdk_drawable_ref
|
||||
#define gdk_window_unref gdk_drawable_unref
|
||||
#define gdk_bitmap_ref gdk_drawable_ref
|
||||
#define gdk_bitmap_unref gdk_drawable_unref
|
||||
#define gdk_pixmap_ref gdk_drawable_ref
|
||||
#define gdk_pixmap_unref gdk_drawable_unref
|
||||
|
||||
#define gdk_gc_destroy gdk_gc_unref
|
||||
#define gdk_image_destroy gdk_image_unref
|
||||
#define gdk_cursor_destroy gdk_cursor_unref
|
||||
|
||||
(Note that g_object_ref() and g_object_unref() may be used for all of
|
||||
the above _ref and _unref functions.)
|
||||
|
||||
#define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
|
||||
gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
|
||||
|
||||
#define gdk_rgb_get_cmap gdk_rgb_get_colormap
|
||||
|
||||
gtk_widget_popup() was removed, it was only usable for GtkWindows, and
|
||||
there the same effect can be achived by gtk_widget_set_uposition() and
|
||||
gtk_widget_show().
|
||||
|
||||
* gdk_pixmap_foreign_new() no longer calls XFreePixmap() on the
|
||||
pixmap when the GdkPixmap is finalized. This change corresponds
|
||||
to the behavior of gdk_window_foreign_new(), and fixes a lot
|
||||
of problems with code where the pixmap wasn't supposed to be
|
||||
freed. If XFreePixmap() is needed, it can be done using the
|
||||
destroy-notification facilities of g_object_set_data().
|
||||
|
||||
* GtkProgress/GtkProgressBar had serious problems in GTK 1.2.
|
||||
- Only 3 or 4 functions are really needed for 95% of progress
|
||||
interfaces; GtkProgress[Bar] had about 25 functions, and
|
||||
didn't even include these 3 or 4.
|
||||
- In activity mode, the API involves setting the adjustment
|
||||
to any random value, just to have the side effect of
|
||||
calling the progress bar update function - the adjustment
|
||||
is totally ignored in activity mode
|
||||
- You set the activity step as a pixel value, which means to
|
||||
set the activity step you basically need to connect to
|
||||
size_allocate
|
||||
- There are ctree_set_expander_style()-functions, to randomly
|
||||
change look-and-feel for no good reason
|
||||
- The split between GtkProgress and GtkProgressBar makes no sense
|
||||
to me whatsoever.
|
||||
This was a big wart on GTK and made people waste lots of time,
|
||||
both learning and using the interface.
|
||||
So, we have added what we feel is the correct API, and marked all the
|
||||
rest deprecated. However, the changes are 100% backward-compatible and
|
||||
should break no existing code.
|
||||
The following 5 functions are the new programming interface and you
|
||||
should consider changing your code to use them:
|
||||
void gtk_progress_bar_pulse (GtkProgressBar *pbar);
|
||||
void gtk_progress_bar_set_text (GtkProgressBar *pbar,
|
||||
const gchar *text);
|
||||
void gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
|
||||
gfloat fraction);
|
||||
|
||||
void gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar,
|
||||
gfloat fraction);
|
||||
void gtk_progress_bar_set_orientation (GtkProgressBar *pbar,
|
||||
GtkProgressBarOrientation orientation);
|
||||
|
||||
* The GtkNotebookPage structure has been removed from the public header files;
|
||||
this was never meant to be a public structure, and all functionality that
|
||||
could be done by accessing the struct fields of this structure should be
|
||||
accesible otherwise.
|
||||
|
||||
* GtkMenuPositionFunc has a new parameter push_in which controls how
|
||||
menus placed outside the screen is handled. If this is set to true and
|
||||
part of the menu is outside the screen then Gtk+ pushes it into the visible
|
||||
area. Otherwise the menu is cut of at the end of the visible screen area.
|
||||
|
||||
Regardles of what happens to the size of the menu, the result is always
|
||||
that the items are placed in the same place as if the menu was placed
|
||||
outside the screen, using menu scrolling if necessary.
|
||||
|
||||
* The "draw" signal and virtual method on GtkWidget has been removed.
|
||||
All drawing should now occur by invalidating a region of the widget
|
||||
(call gdk_window_invalidate_rect() or gtk_widget_queue_draw() for
|
||||
example to invalidate a region). GTK+ merges all invalid regions,
|
||||
and sends expose events to the widget in an idle handler for the
|
||||
invalid regions. gtk_widget_draw() is deprecated but still works; it
|
||||
adds the passed-in area to the invalid region and immediately sends
|
||||
expose events for the current invalid region.
|
||||
Most widgets will work fine if you just delete their "draw"
|
||||
implementation, since they will already have working expose_event
|
||||
implementations. The draw method was rarely called in practice
|
||||
anyway.
|
||||
|
||||
* The GdkExposeEvent has a new region field. This can be used instead
|
||||
of the area field if you want a more exact representation of the
|
||||
area to update.
|
||||
|
||||
* Sending synthetic exposes using gtk_widget_event is no longer allowed.
|
||||
If you just need an expose call you should use gdk_window_invalidate_rect()
|
||||
or gdk_window_invalidate_region() instead. For the case of container
|
||||
widgets that need to propagate expose events to NO_WINDOW children
|
||||
you can either use gtk_container_propagate_expose(), or chain to the
|
||||
default container expose handler.
|
||||
|
||||
* The draw_default and draw_focus methods/signals on GtkWidget are
|
||||
gone; simply draw things in your expose handler.
|
||||
gtk_widget_draw_focus() and gtk_widget_draw_default() wrapper
|
||||
functions are also gone; just queue a draw on the widget,
|
||||
or the part affected by the focus/default anyway.
|
||||
Also, GtkWidget now has default implementations for focus_in_event
|
||||
and focus_out_event. These set/unset GTK_HAS_FOCUS, and queue a
|
||||
draw. So if your focus in/out handler just does that, you can delete
|
||||
it.
|
||||
|
||||
* GtkText and GtkTree are buggy and broken. We don't recommend using
|
||||
them, and changing old code to avoid them is a good idea. The
|
||||
recommended alternatives are GtkTextView and GtkTreeView. The
|
||||
broken widgets are not declared in the headers by default; to use
|
||||
them, define the symbol GTK_ENABLE_BROKEN during compilation. In
|
||||
some future release, these widgets will be removed from GTK+.
|
||||
|
||||
* GdkColorContext is gone; you probably weren't using it anyway.
|
||||
Use GdkColormap and the gdk_rgb_* functions instead.
|
||||
|
||||
* GtkMenuBar now draws the GtkContainer::border_width space outside
|
||||
the frame, not inside the frame
|
||||
|
||||
* In GTK 1.2, if an event handler returned TRUE it prevented
|
||||
propagation of that event to parent widgets. That is, the
|
||||
event signal would not be emitted on parent widgets. In
|
||||
GTK 2.0, if an event handler returns TRUE, the current signal
|
||||
emission on the current widget is immediately stopped. That is,
|
||||
other callbacks connected to the signal will not be invoked.
|
||||
|
||||
* gtk_toolbar_new() no longer has arguments. This function
|
||||
was broken because the default GtkToolbarStyle (icons, text, both)
|
||||
is now a user preference, which is overridden when you call
|
||||
gtk_toolbar_set_style(). The constructor forced everyone to
|
||||
override the preference, which was undesirable. So to port
|
||||
your app, decide if you want to force the toolbar style
|
||||
or conform to the user's global defaults; if you want to force
|
||||
it, call gtk_toolbar_set_style().
|
||||
|
||||
The orientation arg was removed from toolbar_new() as well, just
|
||||
because it wasn't very useful and we were breaking the function
|
||||
anyway so had an opportunity to lose it. Call
|
||||
gtk_toolbar_set_orientation() to set toolbar orientation.
|
||||
|
||||
* GtkRange/GtkScrollbar/GtkScale were rewritten; this means that most
|
||||
theme engines won't draw them properly, and any custom subclasses of
|
||||
these widgets will need a rewrite (though if you could figure out
|
||||
how to subclass the old version of GtkRange, you have our
|
||||
respect). Also, GtkTroughType is gone.
|
||||
|
||||
* The GtkContainer::focus signal/virtualfunction and
|
||||
gtk_container_focus() call were replaced by
|
||||
GtkWidget::focus and gtk_widget_child_focus().
|
||||
The semantics are the same, so you should be able to just
|
||||
replace "container_class->focus = mywidget_focus" with
|
||||
"widget_class->focus = mywidget_focus" and replace
|
||||
gtk_container_focus() calls with gtk_widget_child_focus() calls.
|
||||
|
||||
The purpose of this change was to allow non-containers to have
|
||||
focusable elements.
|
||||
|
||||
* gtk_rc_set_image_loader() and gtk_rc_load_image() has been removed, now
|
||||
that GTK+ includes decent image loading capabilities itself.
|
||||
|
||||
* An extra GtkSettings argument has been added to
|
||||
gtk_rc_find_pixmap_in_path(). This function is only actually useful
|
||||
from a theme engine during parsing, at which point the GtkSettings
|
||||
is provided.
|
||||
|
||||
* The child argument facility in gtkcontainer.c has been converted
|
||||
to a child property facility using GParamSpec and other facilities
|
||||
for GObject.
|
||||
|
||||
- The set_child_arg and get_child_arg virtual methods have been
|
||||
replaced with set_child_property / get_child_property, which
|
||||
work similar to GObject->set_property/get_property.
|
||||
|
||||
- Other removed functions with the replacements:
|
||||
|
||||
gtk_container_add_child_arg_type => gtk_container_class_install_child_property
|
||||
gtk_container_query_child_args => gtk_container_class_list_child_properties
|
||||
gtk_container_child_getv => gtk_container_child_set_property
|
||||
gtk_container_child_setv => gtk_container_child_get_property
|
||||
gtk_container_add_with_args => gtk_container_add_with_properties
|
||||
gtk_container_addv => gtk_container_add / gtk_container_child_set_property
|
||||
|
||||
* gdk_image_get() (or rather its replacement,
|
||||
gdk_drawable_get_image()) now handles errors properly by returning
|
||||
NULL, previously it would crash. Also, a window being offscreen is
|
||||
no longer considered an error; instead, the area being contains
|
||||
undefined contents for the offscreen areas. In most cases, code
|
||||
using gdk_image_get() should really be ported to
|
||||
gdk_pixbuf_get_from_drawable().
|
||||
|
||||
* gtk_widget_set_usize() has been renamed to
|
||||
gtk_widget_set_size_request(), however the old name still exists
|
||||
unless you define GTK_DISABLE_DEPRECATED.
|
||||
|
||||
* gtk_widget_set_uposition() is deprecated; use gtk_window_move(),
|
||||
gtk_fixed_put(), or gtk_layout_put() instead.
|
||||
|
||||
* gtk_window_set_policy() is deprecated. To get the effect of
|
||||
"allow_shrink", call gtk_widget_set_size_request(window, 0, 0). To
|
||||
get the effect of "allow_grow", call
|
||||
gtk_window_set_resizable(window, TRUE). You didn't want the effect
|
||||
of auto_shrink, it made no sense. But maybe if you were using it you
|
||||
want to use gtk_window_resize (window, 1, 1) to snap a window back
|
||||
to its minimum size (the 1, 1 will be rounded up to the minimum
|
||||
window size).
|
||||
|
||||
* The core GTK+ now takes care of handling mapping, unmapping and
|
||||
realizing the child widgets of containers in
|
||||
gtk_widget_set_parent(). In most cases, this allows container
|
||||
implementations to be simplifid by removing the code in add()
|
||||
methods to map and realize children. However, there are
|
||||
a couple of things to watch out for here:
|
||||
|
||||
- If the parent is realized before the add() happens,
|
||||
gtk_widget_set_parent_window() must be called before
|
||||
gtk_widget_set_parent(), since gtk_widget_set_parent()
|
||||
will realize the child.
|
||||
|
||||
- If a container depended on its children not being mapped
|
||||
unless it did so itself (for example, GtkNotebook only
|
||||
mapped the current page), then the new function
|
||||
gtk_widget_set_child_visible() must be called to keep
|
||||
widgets that should not be mapped not mapped.
|
||||
|
||||
As part of this change, most containers also will no longer need
|
||||
custom implementations of the map() and unmap() virtual
|
||||
functions. The only cases where this is necessary are:
|
||||
|
||||
- For !NO_WINDOW widgets, if you create children of widget->window
|
||||
and don't map them in realize() then you must map them
|
||||
in map(). [ In almost all cases, you can simply map the
|
||||
windows in realize() ]
|
||||
|
||||
- For NO_WINDOW widgets, if you create windows in your realize()
|
||||
method, you must map then in map() and unmap them in unmap().
|
||||
|
||||
* gtk_widget_set_default_style (), gtk_widget_push_style (),
|
||||
and gtk_widget_pop_style () have been removed, since they
|
||||
did not work properly with themes and there were better
|
||||
alternatives for modifying the appearance of widgets.
|
||||
|
||||
You should generally use gtk_widget_modify_fg/bg/base/text/font
|
||||
instead.
|
||||
|
||||
* gtk_image_new() now takes no arguments and creates an empty GtkImage
|
||||
widget. To create a GtkImage widget from a GdkImage (the least
|
||||
common usage of GdkImage), use gtk_image_new_from_image.
|
||||
|
||||
* GTK_SELECTION_EXTENDED is now deprecated, and neither the
|
||||
GtkList/GtkTree nor the GtkCList/GtkCTree support
|
||||
GTK_SELECTION_EXTENDED anymore. However, the old extended behavior
|
||||
replaces MULTIPLE behavior.
|
||||
|
||||
* The following variables are no longer exported from GDK. (Other variables
|
||||
are also no longer exported; the following are the ones found used
|
||||
externally in a large sample of GTK+ code.)
|
||||
|
||||
Variable Replacement
|
||||
======== ===========
|
||||
gdk_null_window_warnings None - did nothing in GTK+-1.2.
|
||||
gdk_leader_window None - private variable
|
||||
gdk_screen gdk_x11_get_default_screen ()
|
||||
gdk_root_window gdk_x11_get_default_root_xwindow ()
|
||||
gdk_root_parent gdk_get_default_root_window ()
|
||||
gdk_error_code/gdk_error_warnings gdk_error_trap_push()/pop()
|
||||
gdk_display_name gdk_get_display ()
|
||||
gdk_wm_delete_window gdk_atom_intern ("WM_DELETE_WINDOW", FALSE)
|
||||
gdk_wm_take_focus gdk_atom_intern ("WM_TAKE_FOCUS", FALSE)
|
||||
gdk_wm_protocols gdk_atom_intern ("WM_PROTOCOLS", FALSE)
|
||||
|
||||
* The handling of Colormaps and widgets has been changed:
|
||||
|
||||
- The default colormap for widgets is now the GdkRGB colormap, not
|
||||
the system default colormap. If you try to use resources created for
|
||||
a widget (e.g., widget->style) with a window using the system
|
||||
colormap, errors will result on some machines.
|
||||
|
||||
- gtk_widget_push/pop_colormap() only cause the colormap to be
|
||||
explicitely set on toplevel widgets not on all widgets. The
|
||||
colormap for other widgets (when not set using
|
||||
gtk_widget_set_colormap()), is determined by finding the nearest
|
||||
ancestor with a colormap set on it explicitely, or if that
|
||||
fails, the default colormap.
|
||||
|
||||
* The default selected day for GtkCalendar is now the current day in the
|
||||
month, not the first day in the month. The current month and year
|
||||
were already used.
|
||||
|
||||
* GDK is no longer put into threaded mode automatically when
|
||||
g_thread_init() has been called. In order to use the
|
||||
global GDK thread mutex with gdk_threads_enter() and
|
||||
gdk_threads_leave(), you must call gdk_threads_init() explicitely.
|
||||
|
||||
If you aren't using GDK and GTK+ functions from multiple threads,
|
||||
there is no reason to call gdk_threads_init().
|
||||
|
||||
* The GtkPreviewInfo struct has had its visual and colormap fields
|
||||
removed. Also, gtk_preview_get_cmap() and gtk_preview_get_visual()
|
||||
are deprecated, as GdkRgb works on any colormap and visual. You no
|
||||
longer need to gtk_widget_push_cmap (gtk_preview_get_cmap ()) in
|
||||
your code.
|
||||
|
||||
* The GtkBox, GtkTable, and GtkAlignment widgets now call
|
||||
gtk_widget_set_redraw_on_allocate (widget, FALSE); on themselves.
|
||||
If you want to actually draw contents in a widget derived from
|
||||
one of these widgets, you'll probably want to change this
|
||||
in your init() function.
|
||||
|
||||
* A number of widgets are now NO_WINDOW widgets (most importantly
|
||||
GtkButton, but also GtkRange and GtkNotebook)
|
||||
|
||||
This has a couple of effects:
|
||||
|
||||
- If you are deriving from one of these widgets, you need to
|
||||
adapt your code appropriately -- for instance, drawing coordinates
|
||||
start from widget->allocation.x, widget->allocation.y.
|
||||
|
||||
- If you are embedding one of these widgets in a custom widget,
|
||||
you must make sure you call gtk_container_propagate_expose()
|
||||
correctly, as you must for any NO_WINDOW widgets.
|
||||
|
||||
GtkFixed is a little special; it is now created by default as
|
||||
a NO_WINDOW widget, but if you do
|
||||
|
||||
gtk_fixed_set_has_window (fixed, TRUE);
|
||||
|
||||
after creating a fixed widget, it will create a window and
|
||||
handle it properly.
|
||||
|
||||
* GtkLayout no longer has the xoffset, yoffset fields, which used
|
||||
to store the difference between world and window coordinates for
|
||||
layout->bin_window. These coordinate systems are now always
|
||||
the same.
|
||||
|
||||
* gtk_paint_focus(), gtk_draw_focus() and GtkStyle::draw_focus()
|
||||
have been changed a bit:
|
||||
|
||||
- A GtkStateType argument has been added to gtk_paint_focus()
|
||||
- The default implementation of GtkStyle::draw_focus virtual
|
||||
function now draws a focus rectangle whose width is
|
||||
determinted by the GtkWidget::focus-width style property.
|
||||
- The rectangle passed in is the bounding box, instead of
|
||||
the rectangle used in the gdk_draw_rectangle() call, so it is
|
||||
no longer necessary to subtract 1 from the width and height.
|
||||
|
||||
|
||||
|
||||
DON'T EDIT THIS FILE - changes are now maintained in the reference
|
||||
manual, see docs/reference/gtk/changes-*.sgml. Also, when adding a
|
||||
change to the manual, you should amend the docs for all
|
||||
newly-deprecated features to point to the replacement for that
|
||||
feature, and be sure the GTK_DISABLE_DEPRECATED guards are in place in
|
||||
the header files. Be sure to add a note to the docs for EACH
|
||||
deprecated function; don't just do the changes-*.sgml change.
|
||||
@@ -3,6 +3,7 @@
|
||||
SUBDIRS = tutorial faq reference
|
||||
|
||||
EXTRA_DIST = \
|
||||
debugging.txt \
|
||||
defsformat.txt \
|
||||
developers.txt \
|
||||
dnd_internals.txt \
|
||||
@@ -11,10 +12,9 @@ EXTRA_DIST = \
|
||||
sizing-test.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
text_widget_internals.txt \
|
||||
tree-column-sizing.txt \
|
||||
widget_geometry.txt \
|
||||
widget_system.txt \
|
||||
generation.txt \
|
||||
gtkdocs_fix \
|
||||
RELEASE-HOWTO
|
||||
gtkdocs_fix
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
How to do a GTK+ release?
|
||||
=========================
|
||||
|
||||
Make sure you have Owen's special autoconf and libtool RPMs, available at:
|
||||
http://people.redhat.com/otaylor/gtk/autotools/.
|
||||
|
||||
Also make sure you have the following packages installed with all their
|
||||
dependencies (I used the RPM package names from RedHat 9):
|
||||
* gtk-doc
|
||||
* linuxdoc-tools
|
||||
* docbook-utils
|
||||
|
||||
Without those packages make distcheck will *not* pass.
|
||||
|
||||
|
||||
0) Blow away your gtk+ directory, check a new version out
|
||||
1) autogen and build it, make sure to enable docs.
|
||||
2) Update NEWS based on ChangeLog
|
||||
3) Update version in configure.in, increase micro and interface age by 1.
|
||||
(Note that this is critical, a slip-up here will cause the soname to change).
|
||||
4) Add === Released 2.x.y === at the top of the ChangeLog
|
||||
5) make mydistcheck
|
||||
6) Fix broken stuff found by 4) 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 :).
|
||||
8) If 7) fails because someone else committed inbetween, curse, cvs up
|
||||
fix conflicts and go to 5)
|
||||
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
|
||||
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.
|
||||
12) Send it to gnome-announce-list, gtk-list, gtk-app-devel-list and
|
||||
gtk-devel-list. Set reply-to to gnome-hackers.
|
||||
106
docs/debugging.txt
Normal file
106
docs/debugging.txt
Normal file
@@ -0,0 +1,106 @@
|
||||
The GLIB, GDK, and GTK libraries have extensive support for
|
||||
debugging the library and your programs.
|
||||
|
||||
The amount of debugging being done can be determined both
|
||||
at run time and compile time.
|
||||
|
||||
COMPILE TIME OPTIONS
|
||||
--------------------
|
||||
|
||||
At compile time, the amount of debugging support included is
|
||||
determined by four macros:
|
||||
|
||||
G_ENABLE_DEBUG
|
||||
If set, enable support for runtime checking.
|
||||
|
||||
G_DISABLE_ASSERT
|
||||
If set, disable g_assert macros
|
||||
|
||||
G_DISABLE_CHECKS
|
||||
If set, disable the g_return_if_fail and g_return_val_if_fail macros
|
||||
|
||||
G_DISABLE_CAST_CHECKS
|
||||
If set, don't check casts between different object types
|
||||
|
||||
|
||||
Whether these macros are defined is controlled at configuration
|
||||
time by the --enable-debug option.
|
||||
|
||||
--enable-debug=minimum [default]
|
||||
Enable only inexpensive sanity checking
|
||||
sets G_DISABLE_CAST_CHECKS
|
||||
|
||||
--enable-debug=yes
|
||||
Enable all debugging support
|
||||
sets G_ENABLE_DEBUG
|
||||
|
||||
--enable-debug=no (or --disable-debug)
|
||||
Disable all debugging support (fastest)
|
||||
sets G_DISABLE_ASSERT, G_DISABLE_CHECKS, and G_DISABLE_CAST_CHECKS
|
||||
|
||||
Note that !G_DISABLE_CHECKS and --enable-debug=no are to be considered
|
||||
not only fast, but dangerous as they tend to destabilize even mostly
|
||||
bug-free software by changing the effect of many bugs from simple warnings
|
||||
into fatal crashes. Thus --enable-debug=no should *not* be used for
|
||||
stable releases of gtk+.
|
||||
|
||||
|
||||
RUNTIME OPTIONS
|
||||
----------------
|
||||
|
||||
At run time, if GTK+ was compiled with debugging enabled, different
|
||||
types of debugging information can be printed out. This is controlled
|
||||
by the:
|
||||
|
||||
GTK_DEBUG and GDK_DEBUG environment variables
|
||||
--gtk-debug and --gdk-debug command line options
|
||||
--gtk-no-debug and --gdk-no-debug command line options
|
||||
|
||||
First the environment variables are applied, then the command line
|
||||
options are applied in the order given on the command line.
|
||||
|
||||
Each of these can either be the special value 'all', or a sequence of
|
||||
':' separated options. (case is ignored). The environment variables
|
||||
and the --gtk-debug and --gdk-debug options add debugging options and
|
||||
the --gtk-no-debug and --gdk-no-debug options remove them.
|
||||
|
||||
As noted below, some of these are useful in application debugging, but
|
||||
most are only interested to those debugging the libraries
|
||||
|
||||
For instance:
|
||||
|
||||
GDK_DEBUG_FLAGS=misc:dnd testgtk --gdk-no-debug dnd --gdk-debug events
|
||||
|
||||
runs testgtk with the 'misc' and 'events' debugging options.
|
||||
|
||||
See glib/docs/debugging.txt for information about debugging signal emission
|
||||
and the object system.
|
||||
|
||||
|
||||
GDK_DEBUG
|
||||
---------
|
||||
|
||||
Application relevant options:
|
||||
|
||||
'events' - Show all events received by GTK
|
||||
|
||||
Options only interesting to library maintainers:
|
||||
|
||||
'misc' - Miscellaneous information
|
||||
'dnd' - Information about drag-and-drop
|
||||
'xim' - Information about X Input Method support
|
||||
|
||||
|
||||
GTK_DEBUG
|
||||
---------
|
||||
|
||||
Options only interesting to library maintainers:
|
||||
|
||||
'misc' - Miscellaneous information
|
||||
'text' - Information about text widget internals
|
||||
'tree' - Information about tree widget internals
|
||||
'updates' - Visual feedback about window updates
|
||||
|
||||
|
||||
- 2001-08-13 Matthias Clasen
|
||||
- 98/02/19 Owen Taylor
|
||||
@@ -2,18 +2,14 @@ EXTRA_DIST = \
|
||||
gtk-faq.sgml
|
||||
|
||||
if HAVE_DOCBOOK
|
||||
html:
|
||||
if test -w $(srcdir); then \
|
||||
(cd $(srcdir); \
|
||||
db2html gtk-faq.sgml; \
|
||||
test -d html && rm -r html; \
|
||||
mv gtk-faq html); \
|
||||
fi
|
||||
html:
|
||||
(cd $(srcdir); \
|
||||
db2html gtk-faq.sgml; \
|
||||
test -d html && rm -r html; \
|
||||
mv gtk-faq html)
|
||||
|
||||
pdf:
|
||||
if test -w $(srcdir); then \
|
||||
(cd $(srcdir); db2pdf gtk-faq.sgml); \
|
||||
fi
|
||||
(cd $(srcdir); db2pdf gtk-faq.sgml)
|
||||
|
||||
dist-hook: html
|
||||
cp -Rp $(srcdir)/html $(distdir)
|
||||
@@ -30,7 +26,7 @@ pdf:
|
||||
|
||||
dist-hook:
|
||||
echo "***"
|
||||
echo "*** Warning: FAQ not built"
|
||||
echo "*** Warning: Tutorial not built"
|
||||
echo "*** DISTRIBUTION IS INCOMPLETE"
|
||||
echo "***"
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,14 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
gdk-pixbuf-decl-list.txt
|
||||
gdk-pixbuf-decl.txt
|
||||
gdk-pixbuf-undocumented.txt
|
||||
gdk-pixbuf-unused.txt
|
||||
html
|
||||
sgml
|
||||
gdk-pixbuf.args
|
||||
gdk-pixbuf.hierarchy
|
||||
gdk-pixbuf.interfaces
|
||||
gdk-pixbuf.prerequisites
|
||||
gdk-pixbuf.signals
|
||||
deprecated
|
||||
html
|
||||
xml
|
||||
gdk-pixbuf-decl.txt
|
||||
gdk-pixbuf-decl-list.txt
|
||||
gdk-pixbuf-undocumented.txt
|
||||
gdk-pixbuf-unused.txt
|
||||
*.stamp
|
||||
*.lo
|
||||
.libs
|
||||
version.xml
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk-pixbuf
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-pixbuf.sgml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../../gdk-pixbuf
|
||||
|
||||
# Extra options to supply to gtkdoc-scan
|
||||
SCAN_OPTIONS=--source-dir=../../../contrib/gdk-pixbuf-xlib --deprecated-guards="GDK_PIXBUF_ENABLE_BROKEN|GDK_PIXBUF_DISABLE_DEPRECATED"
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../../gdk-pixbuf
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode --source-dir=../../../contrib/gdk-pixbuf-xlib
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB=$(top_srcdir)/gdk-pixbuf/*.h $(top_srcdir)/contrib/gdk-pixbuf-xlib/*.h
|
||||
@@ -26,62 +30,170 @@ IGNORE_HFILES= \
|
||||
gdk-pixbuf-i18n.h \
|
||||
gdk-pixbuf-private.h \
|
||||
io-gif-animation.h \
|
||||
io-ani-animation.h \
|
||||
test-images.h
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--main-sgml-file=$(DOC_MAIN_SGML_FILE) --sgml-mode --source-dir=../../../contrib/gdk-pixbuf-xlib --output-format=xml
|
||||
|
||||
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
|
||||
content_files = \
|
||||
version.xml \
|
||||
gdk-pixbuf-from-drawables.sgml \
|
||||
gdk-pixbuf-rendering.sgml \
|
||||
gdk-pixbuf.sgml \
|
||||
porting-from-imlib.sgml \
|
||||
gdk-pixbuf-csource.xml \
|
||||
gdk-pixbuf-query-loaders.xml
|
||||
# Extra files to add when scanning
|
||||
EXTRA_HFILES=
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES =
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
|
||||
content_files = \
|
||||
gdk-pixbuf-from-drawables.sgml \
|
||||
gdk-pixbuf.sgml \
|
||||
porting-from-imlib.sgml
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
extra_files =
|
||||
|
||||
########################################################################
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
GTKDOC_CFLAGS = @STRIP_BEGIN@ \
|
||||
@CFLAGS@ \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
@GTK_DEBUG_FLAGS@ \
|
||||
@GTK_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1
|
||||
GTKDOC_LIBS = @STRIP_BEGIN@ \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@ \
|
||||
@GTK_DEP_LIBS@ \
|
||||
@STRIP_END@
|
||||
|
||||
if ENABLE_MAN
|
||||
GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
|
||||
GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
|
||||
|
||||
%.1 : %.xml
|
||||
@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||
|
||||
####################################
|
||||
# Everything below here is generic #
|
||||
####################################
|
||||
|
||||
# We set GPATH here; this gives us semantics for GNU make
|
||||
# which are more like other make's VPATH, when it comes to
|
||||
# whether a source that is a target of one rule is then
|
||||
# searched for in VPATH/GPATH.
|
||||
#
|
||||
GPATH = $(srcdir)
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(content_files) \
|
||||
$(extra_files) \
|
||||
$(HTML_IMAGES) \
|
||||
$(DOC_MAIN_SGML_FILE) \
|
||||
$(DOC_MODULE).types \
|
||||
$(DOC_MODULE)-sections.txt \
|
||||
$(DOC_MODULE)-overrides.txt
|
||||
|
||||
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
|
||||
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
|
||||
|
||||
SCANOBJ_FILES = \
|
||||
$(DOC_MODULE).args \
|
||||
$(DOC_MODULE).hierarchy \
|
||||
$(DOC_MODULE).signals
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
all-local: html-build.stamp
|
||||
|
||||
#### scan ####
|
||||
|
||||
scan-build.stamp: $(HFILE_GLOB)
|
||||
@echo '*** Scanning header files ***'
|
||||
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
|
||||
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
|
||||
else \
|
||||
cd $(srcdir) ; \
|
||||
for i in $(SCANOBJ_FILES) ; do \
|
||||
test -f $$i || touch $$i ; \
|
||||
done \
|
||||
fi
|
||||
cd $(srcdir) && \
|
||||
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
|
||||
touch scan-build.stamp
|
||||
|
||||
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
|
||||
@true
|
||||
|
||||
#### templates ####
|
||||
|
||||
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
|
||||
@echo '*** Rebuilding template files ***'
|
||||
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
touch tmpl-build.stamp
|
||||
|
||||
tmpl.stamp: tmpl-build.stamp
|
||||
@true
|
||||
|
||||
#### sgml ####
|
||||
|
||||
sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
|
||||
@echo '*** Building SGML ***'
|
||||
cd $(srcdir) && \
|
||||
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
|
||||
touch sgml-build.stamp
|
||||
|
||||
sgml.stamp: sgml-build.stamp
|
||||
@true
|
||||
|
||||
#### html ####
|
||||
|
||||
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
|
||||
@echo '*** Building HTML ***'
|
||||
rm -rf $(srcdir)/html
|
||||
mkdir $(srcdir)/html
|
||||
cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
|
||||
@echo '-- Fixing Crossreferences'
|
||||
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
|
||||
touch html-build.stamp
|
||||
endif
|
||||
|
||||
BUILT_EXTRA_DIST = $(man_MANS)
|
||||
##############
|
||||
|
||||
dist-hook-local: $(BUILT_EXTRA_DIST)
|
||||
files='$(BUILT_EXTRA_DIST)'; \
|
||||
for f in $$files; do \
|
||||
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
||||
cp $$d/$$f $(distdir) || exit 1; done
|
||||
clean-local:
|
||||
rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
|
||||
|
||||
maintainer-clean-local: clean
|
||||
cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
|
||||
(installfiles=`echo $(srcdir)/html/*`; \
|
||||
if test "$$installfiles" = '$(srcdir)/html/*'; \
|
||||
then echo '-- Nothing to install' ; \
|
||||
else \
|
||||
for i in $$installfiles; do \
|
||||
echo '-- Installing '$$i ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
|
||||
done; \
|
||||
echo '-- Installing $(srcdir)/html/index.sgml' ; \
|
||||
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
|
||||
fi)
|
||||
|
||||
#
|
||||
# Require gtk-doc when making dist
|
||||
#
|
||||
if ENABLE_GTK_DOC
|
||||
dist-check-gtkdoc:
|
||||
else
|
||||
dist-check-gtkdoc:
|
||||
@echo "*** gtk-doc must be installed and enabled in order to make dist"
|
||||
@false
|
||||
endif
|
||||
|
||||
dist-hook: dist-check-gtkdoc dist-hook-local
|
||||
mkdir $(distdir)/tmpl
|
||||
mkdir $(distdir)/sgml
|
||||
mkdir $(distdir)/html
|
||||
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
|
||||
-cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
|
||||
-cp $(srcdir)/html/* $(distdir)/html
|
||||
|
||||
.PHONY : dist-hook-local
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
.\"Generated by db2man.xsl. Don't modify this, modify the source.
|
||||
.de Sh \" Subsection
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "GDK-PIXBUF-CSOURCE" 1 "" "" ""
|
||||
.SH NAME
|
||||
gdk-pixbuf-csource \- C code generation utility for GdkPixbuf images
|
||||
.SH "SYNOPSIS"
|
||||
|
||||
.nf
|
||||
\fBgdk-pixbuf-csource\fR [options] [image]
|
||||
.fi
|
||||
|
||||
.nf
|
||||
\fBgdk-pixbuf-csource\fR [options] --build-list [[name] [image]...]
|
||||
.fi
|
||||
|
||||
.SH "DESCRIPTION"
|
||||
|
||||
.PP
|
||||
\fBgdk-pixbuf-csource\fR is a small utility that generates C code containing images, useful for compiling images directly into programs\&.
|
||||
|
||||
.SH "INVOCATION"
|
||||
|
||||
.PP
|
||||
\fBgdk-pixbuf-csource\fR either takes as input one image file name to generate code for, or, using the \fB--build-list\fR option, a list of (\fIname\fR, \fIimage\fR) pairs to generate code for a list of images into named variables\&.
|
||||
|
||||
.SS "Options"
|
||||
|
||||
.TP
|
||||
\fB--stream\fR
|
||||
Generate pixbuf data stream (a single string containing a serialized GdkPixdata structure in network byte order)\&.
|
||||
|
||||
.TP
|
||||
\fB--struct\fR
|
||||
Generate GdkPixdata structure (needs the GdkPixdata structure definition from \fIgdk-pixdata\&.h\fR)\&.
|
||||
|
||||
.TP
|
||||
\fB--macros\fR
|
||||
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and *_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image\&.
|
||||
|
||||
.TP
|
||||
\fB--rle\fR
|
||||
Enables run-length encoding for the generated pixel data (default)\&.
|
||||
|
||||
.TP
|
||||
\fB--raw\fR
|
||||
Disables run-length encoding for the generated pixel data\&.
|
||||
|
||||
.TP
|
||||
\fB--extern\fR
|
||||
Generate extern symbols\&.
|
||||
|
||||
.TP
|
||||
\fB--static\fR
|
||||
Generate static symbols (default)\&.
|
||||
|
||||
.TP
|
||||
\fB--decoder\fR
|
||||
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition to decode run-length encoded image data\&.
|
||||
|
||||
.TP
|
||||
\fB--name=identifier\fR
|
||||
Specifies the identifier name (prefix) for the generated variables or macros (useful only if \fB--build-list\fR was not specified)\&.
|
||||
|
||||
.TP
|
||||
\fB--build-list\fR
|
||||
Enables (\fIname\fR, \fIimage\fR) pair parsing mode\&.
|
||||
|
||||
.TP
|
||||
\fB-h\fR, \fB--help\fR
|
||||
Print brief help and exit\&.
|
||||
|
||||
.TP
|
||||
\fB-v\fR, \fB--version\fR
|
||||
Print version and exit\&.
|
||||
|
||||
.TP
|
||||
\fB--g-fatal-warnings\fR
|
||||
Make warnings fatal (causes the program to abort)\&.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
||||
.PP
|
||||
The GdkPixbuf documentation, shipped with the Gtk+ distribution, available from www\&.gtk\&.org: \fIhttp://www.gtk.org\fR\&.
|
||||
|
||||
.SH "BUGS"
|
||||
|
||||
.PP
|
||||
None known yet\&.
|
||||
|
||||
.SH "AUTHOR"
|
||||
|
||||
.PP
|
||||
\fBgdk-pixbuf-csource\fR was written by Tim Janik <timj@gtk\&.org>\&.
|
||||
|
||||
.PP
|
||||
This manual page was provided by Tim Janik <timj@gtk\&.org>\&.
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
<refentry id="gdk-pixbuf-csource">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gdk-pixbuf-csource</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gdk-pixbuf-csource</refname>
|
||||
<refpurpose>C code generation utility for GdkPixbuf images</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gdk-pixbuf-csource</command>
|
||||
<arg choice="opt">options</arg>
|
||||
<arg choice="opt">image</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdk-pixbuf-csource</command>
|
||||
<arg choice="opt">options</arg>
|
||||
<arg choice="plain">--build-list</arg>
|
||||
<arg rep="repeat">
|
||||
<arg>name</arg>
|
||||
<arg>image</arg>
|
||||
</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-csource</command> is a small utility that generates C code
|
||||
containing images, useful for compiling images directly into programs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Invocation</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-csource</command> either takes as input one image file name
|
||||
to generate code for, or, using the <option>--build-list</option> option, a
|
||||
list of (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
|
||||
pairs to generate code for a list of images into named variables.
|
||||
</para>
|
||||
<refsect2><title>Options</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--stream</option></term>
|
||||
<listitem><para>
|
||||
Generate pixbuf data stream (a single string containing a serialized
|
||||
<structname>GdkPixdata</structname> structure in network byte order).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--struct</option></term>
|
||||
<listitem><para>
|
||||
Generate GdkPixdata structure (needs the <structname>GdkPixdata</structname>
|
||||
structure definition from <filename>gdk-pixdata.h</filename>).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--macros</option></term>
|
||||
<listitem><para>
|
||||
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and
|
||||
*_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--rle</option></term>
|
||||
<listitem><para>
|
||||
Enables run-length encoding for the generated pixel data (default).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--raw</option></term>
|
||||
<listitem><para>
|
||||
Disables run-length encoding for the generated pixel data.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--extern</option></term>
|
||||
<listitem><para>
|
||||
Generate extern symbols.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--static</option></term>
|
||||
<listitem><para>
|
||||
Generate static symbols (default).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--decoder</option></term>
|
||||
<listitem><para>
|
||||
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition
|
||||
to decode run-length encoded image data.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--name=identifier</option></term>
|
||||
<listitem><para>
|
||||
Specifies the identifier name (prefix) for the generated variables or
|
||||
macros (useful only if <option>--build-list</option> was not specified).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--build-list</option></term>
|
||||
<listitem><para>
|
||||
Enables (<replaceable>name</replaceable>, <replaceable>image</replaceable>)
|
||||
pair parsing mode.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--help</option></term>
|
||||
<listitem><para>
|
||||
Print brief help and exit.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-v</option>, <option>--version</option></term>
|
||||
<listitem><para>
|
||||
Print version and exit.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--g-fatal-warnings</option></term>
|
||||
<listitem><para>
|
||||
Make warnings fatal (causes the program to abort).
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>See also</title>
|
||||
<para>
|
||||
The <structname>GdkPixbuf</structname> documentation, shipped with the
|
||||
Gtk+ distribution, available from <ulink url="http://www.gtk.org">www.gtk.org</ulink>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Bugs</title>
|
||||
<para>
|
||||
None known yet.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Author</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-csource</command> was written by Tim Janik
|
||||
<email>timj@gtk.org</email>.
|
||||
</para>
|
||||
<para>
|
||||
This manual page was provided by Tim Janik <email>timj@gtk.org</email>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
.\"Generated by db2man.xsl. Don't modify this, modify the source.
|
||||
.de Sh \" Subsection
|
||||
.br
|
||||
.if t .Sp
|
||||
.ne 5
|
||||
.PP
|
||||
\fB\\$1\fR
|
||||
.PP
|
||||
..
|
||||
.de Sp \" Vertical space (when we can't use .PP)
|
||||
.if t .sp .5v
|
||||
.if n .sp
|
||||
..
|
||||
.de Ip \" List item
|
||||
.br
|
||||
.ie \\n(.$>=3 .ne \\$3
|
||||
.el .ne 3
|
||||
.IP "\\$1" \\$2
|
||||
..
|
||||
.TH "GDK-PIXBUF-QUERY" 1 "" "" ""
|
||||
.SH NAME
|
||||
gdk-pixbuf-query-loaders \- GdkPixbuf loader registration utility
|
||||
.SH "SYNOPSIS"
|
||||
|
||||
.nf
|
||||
\fBgdk-pixbuf-query-loaders\fR [module...]
|
||||
.fi
|
||||
|
||||
.SH "DESCRIPTION"
|
||||
|
||||
.PP
|
||||
\fBgdk-pixbuf-query-loaders\fR collects information about loadable modules for gdk-pixbuf and writes it to \fIstdout\fR\&.
|
||||
|
||||
.PP
|
||||
If called without arguments, it looks for modules in the gdk-pixbuf loader directory\&.
|
||||
|
||||
.PP
|
||||
If called with arguments, it looks for the specified modules\&. The arguments may be absolute or relative paths\&.
|
||||
|
||||
.SH "ENVIRONMENT"
|
||||
|
||||
.PP
|
||||
The environment variable \fBGDK_PIXBUF_MODULEDIR\fR can be used to specify a different loader directory\&. The default gdk-pixbuf loader directory is \fI\fIlibdir\fR/gtk-2\&.0/\fIversion\fR/loaders\fR\&.
|
||||
|
||||
.SH "BUGS"
|
||||
|
||||
.PP
|
||||
None known yet\&.
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<refentry id="gdk-pixbuf-query-loaders">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gdk-pixbuf-query-loaders</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gdk-pixbuf-query-loaders</refname>
|
||||
<refpurpose>GdkPixbuf loader registration utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gdk-pixbuf-query-loaders</command>
|
||||
<arg choice="opt" rep="repeat">module</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para>
|
||||
<command>gdk-pixbuf-query-loaders</command> collects information about loadable
|
||||
modules for <application>gdk-pixbuf</application> and writes it to <filename>stdout</filename>.
|
||||
</para>
|
||||
<para>
|
||||
If called without arguments, it looks for modules in the
|
||||
<application>gdk-pixbuf</application> loader directory.
|
||||
</para>
|
||||
<para>
|
||||
If called with arguments, it looks for the specified modules. The arguments
|
||||
may be absolute or relative paths.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Environment</title>
|
||||
<para>
|
||||
The environment variable <envar>GDK_PIXBUF_MODULEDIR</envar> can be used
|
||||
to specify a different loader directory. The default <application>gdk-pixbuf</application> loader
|
||||
directory is <filename><replaceable>libdir</replaceable>/gtk-2.0/<replaceable>version</replaceable>/loaders</filename>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Bugs</title>
|
||||
<para>
|
||||
None known yet.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
||||
@@ -48,15 +48,14 @@ gdk_pixbuf_error_get_type
|
||||
|
||||
<SECTION>
|
||||
<FILE>refcounting</FILE>
|
||||
GdkPixbufDestroyNotify
|
||||
gdk_pixbuf_ref
|
||||
gdk_pixbuf_unref
|
||||
GdkPixbufDestroyNotify
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>file-loading</FILE>
|
||||
gdk_pixbuf_new_from_file
|
||||
gdk_pixbuf_new_from_file_at_size
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -99,6 +98,7 @@ gdk_pixbuf_fill
|
||||
|
||||
<SECTION>
|
||||
<FILE>animation</FILE>
|
||||
GdkPixbufFrame
|
||||
GdkPixbufAnimation
|
||||
GdkPixbufAnimationIter
|
||||
gdk_pixbuf_animation_new_from_file
|
||||
@@ -123,8 +123,6 @@ GDK_PIXBUF_ANIMATION_ITER
|
||||
GDK_TYPE_PIXBUF_ANIMATION_ITER
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_pixbuf_non_anim_new
|
||||
|
||||
gdk_pixbuf_animation_get_type
|
||||
gdk_pixbuf_animation_iter_get_type
|
||||
</SECTION>
|
||||
@@ -148,13 +146,9 @@ gdk_interp_type_get_type
|
||||
<SECTION>
|
||||
<FILE>gdk-pixbuf-loader</FILE>
|
||||
<TITLE>GdkPixbufLoader</TITLE>
|
||||
GdkPixbufLoader
|
||||
gdk_pixbuf_loader_new
|
||||
gdk_pixbuf_loader_new_with_type
|
||||
gdk_pixbuf_loader_new_with_mime_type
|
||||
gdk_pixbuf_loader_get_format
|
||||
gdk_pixbuf_loader_write
|
||||
gdk_pixbuf_loader_set_size
|
||||
gdk_pixbuf_loader_get_pixbuf
|
||||
gdk_pixbuf_loader_get_animation
|
||||
gdk_pixbuf_loader_close
|
||||
@@ -166,41 +160,17 @@ GDK_IS_PIXBUF_LOADER
|
||||
GDK_PIXBUF_LOADER_CLASS
|
||||
GDK_IS_PIXBUF_LOADER_CLASS
|
||||
<SUBSECTION Private>
|
||||
GdkPixbufLoaderClass
|
||||
GdkPixbufLoader
|
||||
gdk_pixbuf_loader_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Module Interface</TITLE>
|
||||
<FILE>module_interface</FILE>
|
||||
gdk_pixbuf_set_option
|
||||
gdk_pixbuf_get_formats
|
||||
gdk_pixbuf_format_get_name
|
||||
gdk_pixbuf_format_get_description
|
||||
gdk_pixbuf_format_get_mime_types
|
||||
gdk_pixbuf_format_get_extensions
|
||||
gdk_pixbuf_format_is_writable
|
||||
GdkPixbufFormat
|
||||
GdkPixbufFormatFlags
|
||||
GdkPixbufModulePattern
|
||||
GdkPixbufModuleFillVtableFunc
|
||||
GdkPixbufModuleFillInfoFunc
|
||||
GdkPixbufModuleSizeFunc
|
||||
GdkPixbufModulePreparedFunc
|
||||
GdkPixbufModuleUpdatedFunc
|
||||
ModuleFillVtableFunc
|
||||
ModulePreparedNotifyFunc
|
||||
ModuleUpdatedNotifyFunc
|
||||
GdkPixbufModule
|
||||
|
||||
<SUBSECTION Animation>
|
||||
GdkPixbufAnimationClass
|
||||
GdkPixbufAnimationIterClass
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXBUF_ANIMATION_GET_CLASS
|
||||
GDK_IS_PIXBUF_ANIMATION_ITER_CLASS
|
||||
GDK_PIXBUF_ANIMATION_ITER_CLASS
|
||||
GDK_IS_PIXBUF_ANIMATION_CLASS
|
||||
GDK_PIXBUF_ANIMATION_ITER_GET_CLASS
|
||||
GDK_PIXBUF_ANIMATION_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
||||
@@ -1,38 +1,34 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY gdk-pixbuf-gdk-pixbuf SYSTEM "xml/gdk-pixbuf.xml">
|
||||
<!ENTITY gdk-pixbuf-refcounting SYSTEM "xml/refcounting.xml">
|
||||
<!ENTITY gdk-pixbuf-file-loading SYSTEM "xml/file-loading.xml">
|
||||
<!ENTITY gdk-pixbuf-file-saving SYSTEM "xml/file-saving.xml">
|
||||
<!ENTITY gdk-pixbuf-creating SYSTEM "xml/creating.xml">
|
||||
<!ENTITY gdk-pixbuf-inline SYSTEM "xml/inline.xml">
|
||||
<!ENTITY gdk-pixbuf-scaling SYSTEM "xml/scaling.xml">
|
||||
<!ENTITY gdk-pixbuf-rendering SYSTEM "gdk-pixbuf-rendering.sgml">
|
||||
<!ENTITY gdk-pixbuf-from-drawables SYSTEM "gdk-pixbuf-from-drawables.sgml">
|
||||
<!ENTITY gdk-pixbuf-util SYSTEM "xml/util.xml">
|
||||
<!ENTITY gdk-pixbuf-animation SYSTEM "xml/animation.xml">
|
||||
<!ENTITY GdkPixbufLoader SYSTEM "xml/gdk-pixbuf-loader.xml">
|
||||
<!ENTITY module-interface SYSTEM "xml/module_interface.xml">
|
||||
<!ENTITY initialization-versions SYSTEM "xml/initialization_versions.xml">
|
||||
<!ENTITY gdk-pixbuf-gdk-pixbuf-xlib-init SYSTEM "xml/gdk-pixbuf-xlib-init.xml">
|
||||
<!ENTITY gdk-pixbuf-gdk-pixbuf-xlib-rendering SYSTEM "xml/gdk-pixbuf-xlib-rendering.xml">
|
||||
<!ENTITY gdk-pixbuf-gdk-pixbuf-xlib-from-drawables SYSTEM "xml/gdk-pixbuf-xlib-from-drawables.xml">
|
||||
<!ENTITY gdk-pixbuf-gdk-pixbuf-xlib-rgb SYSTEM "xml/gdk-pixbuf-xlib-rgb.xml">
|
||||
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN"[
|
||||
|
||||
<!ENTITY Porting-From-Imlib SYSTEM "porting-from-imlib.sgml">
|
||||
<!entity gdk-pixbuf-gdk-pixbuf SYSTEM "sgml/gdk-pixbuf.sgml">
|
||||
<!entity gdk-pixbuf-refcounting SYSTEM "sgml/refcounting.sgml">
|
||||
<!entity gdk-pixbuf-file-loading SYSTEM "sgml/file-loading.sgml">
|
||||
<!entity gdk-pixbuf-file-saving SYSTEM "sgml/file-saving.sgml">
|
||||
<!entity gdk-pixbuf-creating SYSTEM "sgml/creating.sgml">
|
||||
<!entity gdk-pixbuf-inline SYSTEM "sgml/inline.sgml">
|
||||
<!entity gdk-pixbuf-scaling SYSTEM "sgml/scaling.sgml">
|
||||
<!entity gdk-pixbuf-rendering SYSTEM "gdk-pixbuf-rendering.sgml">
|
||||
<!entity gdk-pixbuf-from-drawables SYSTEM "gdk-pixbuf-from-drawables.sgml">
|
||||
<!entity gdk-pixbuf-util SYSTEM "sgml/util.sgml">
|
||||
<!entity gdk-pixbuf-animation SYSTEM "sgml/animation.sgml">
|
||||
<!entity GdkPixbufLoader SYSTEM "sgml/gdk-pixbuf-loader.sgml">
|
||||
<!entity module-interface SYSTEM "sgml/module_interface.sgml">
|
||||
<!entity initialization-versions SYSTEM "sgml/initialization_versions.sgml">
|
||||
<!entity gdk-pixbuf-gdk-pixbuf-xlib-init SYSTEM "sgml/gdk-pixbuf-xlib-init.sgml">
|
||||
<!entity gdk-pixbuf-gdk-pixbuf-xlib-rendering SYSTEM "sgml/gdk-pixbuf-xlib-rendering.sgml">
|
||||
<!entity gdk-pixbuf-gdk-pixbuf-xlib-from-drawables SYSTEM "sgml/gdk-pixbuf-xlib-from-drawables.sgml">
|
||||
<!entity gdk-pixbuf-gdk-pixbuf-xlib-rgb SYSTEM "sgml/gdk-pixbuf-xlib-rgb.sgml">
|
||||
|
||||
<!ENTITY gdk-pixbuf "<application>gdk-pixbuf</application>">
|
||||
<!ENTITY Imlib "<application>Imlib</application>">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
<!ENTITY gdk-pixbuf-csource SYSTEM "gdk-pixbuf-csource.xml">
|
||||
<!ENTITY gdk-pixbuf-query-loaders SYSTEM "gdk-pixbuf-query-loaders.xml">
|
||||
<!entity Porting-From-Imlib SYSTEM "porting-from-imlib.sgml">
|
||||
|
||||
<!entity gdk-pixbuf "<application>gdk-pixbuf</application>">
|
||||
<!entity Imlib "<application>Imlib</application>">
|
||||
]>
|
||||
|
||||
<book id="index">
|
||||
<bookinfo>
|
||||
<title>The &gdk-pixbuf; Library</title>
|
||||
<releaseinfo>Version &version;</releaseinfo>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Federico</firstname>
|
||||
@@ -116,22 +112,6 @@
|
||||
&gdk-pixbuf-gdk-pixbuf-xlib-rgb;
|
||||
</reference>
|
||||
|
||||
<reference>
|
||||
<title>Tools Reference</title>
|
||||
|
||||
<partintro>
|
||||
<para>
|
||||
This part presents the tools which are shipped with the
|
||||
&gdk-pixbuf; library.
|
||||
</para>
|
||||
</partintro>
|
||||
|
||||
&gdk-pixbuf-csource;
|
||||
&gdk-pixbuf-query-loaders;
|
||||
</reference>
|
||||
|
||||
<index/>
|
||||
|
||||
&Porting-From-Imlib;
|
||||
|
||||
<!-- License -->
|
||||
|
||||
@@ -5,7 +5,7 @@ Animations
|
||||
Animated images.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
<para><anchor id="GdkPixbufAnimation">
|
||||
The &gdk-pixbuf; library provides a simple mechanism to load and represent
|
||||
animations. An animation is conceptually a series of frames to be displayed
|
||||
over time. Each frame is the same size. The animation may not be represented
|
||||
@@ -20,6 +20,12 @@ Animated images.
|
||||
#GdkPixbufLoader
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFrame ##### -->
|
||||
<para>
|
||||
This object describes an individual frame of an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
||||
<para>
|
||||
This object describes an animation.
|
||||
|
||||
@@ -40,15 +40,3 @@ End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_new_from_file_at_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@width:
|
||||
@height:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -21,28 +21,21 @@ Application-driven progressive image loading.
|
||||
To use #GdkPixbufLoader to load an image, just create a new one,
|
||||
and call gdk_pixbuf_loader_write() to send the data to it. When
|
||||
done, gdk_pixbuf_loader_close() should be called to end the stream
|
||||
and finalize everything. The loader will emit three important
|
||||
and finalize everything. The loader will emit two important
|
||||
signals throughout the process. The first, "<link
|
||||
linkend="GdkPixbufLoader-size-prepared">size_prepared</link>",
|
||||
will be called as soon as the image has enough information to
|
||||
determine the size of the image to be used. If you want to scale
|
||||
the image while loading it, you can call gdk_pixbuf_loader_set_size()
|
||||
in response to this signal.
|
||||
</para>
|
||||
|
||||
<para>The second signal, "<link
|
||||
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>",
|
||||
will be called as soon as the pixbuf of the desired has been
|
||||
allocated. You can obtain it by calling gdk_pixbuf_loader_get_pixbuf().
|
||||
If you want to use it, simply ref it.
|
||||
In addition, no actual information will be passed in yet, so the
|
||||
will be called as soon as the image has enough information to
|
||||
determine the size of the image to be used. It will pass a
|
||||
@GdkPixbuf in. If you want to use it, you can simply ref it. In
|
||||
addition, no actual information will be passed in yet, so the
|
||||
pixbuf can be safely filled with any temporary graphics (or an
|
||||
initial color) as needed. You can also call
|
||||
gdk_pixbuf_loader_get_pixbuf() later and get the same pixbuf.
|
||||
initial color) as needed. You can also call the
|
||||
gdk_pixbuf_loader_get_pixbuf() once this signal has been emitted
|
||||
and get the same pixbuf.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The last signal, "<link
|
||||
The other signal, "<link
|
||||
linkend="GdkPixbufLoader-area-updated">area_updated</link>" gets
|
||||
called every time a region is updated. This way you can update a
|
||||
partially completed image. Note that you do not know anything
|
||||
@@ -69,75 +62,6 @@ Application-driven progressive image loading.
|
||||
gdk_pixbuf_new_from_file(), gdk_pixbuf_animation_new_from_file()
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufLoader ##### -->
|
||||
<para>
|
||||
The <structname>GdkPixbufLoader</structname> struct contains only private
|
||||
fields.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
|
||||
<para>
|
||||
This signal is emitted when the pixbuf loader has allocated the pixbuf
|
||||
in the desired size. After this signal is emitted, applications can
|
||||
call gdk_pixbuf_loader_get_pixbuf() to fetch the partially-loaded pixbuf.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
|
||||
<para>
|
||||
This signal is emitted when a significant area of the image being
|
||||
loaded has been updated. Normally it means that a complete
|
||||
scanline has been read in, but it could be a different area as
|
||||
well. Applications can use this signal to know when to repaint
|
||||
areas of an image that is being loaded.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: Loader which emitted the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
<!-- # Unused Parameters # -->
|
||||
@x: X offset of upper-left corner of the updated area.
|
||||
@y: Y offset of upper-left corner of the updated area.
|
||||
@width: Width of updated area.
|
||||
@height: Height of updated area.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
|
||||
<para>
|
||||
This signal is emitted when gdk_pixbuf_loader_close() is called.
|
||||
It can be used by different parts of an application to receive
|
||||
notification when an image loader is closed by the code that
|
||||
drives it.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::size-prepared ##### -->
|
||||
<para>
|
||||
This signal is emitted when the pixbuf loader has been fed the
|
||||
initial amount of data that is required to figure out the size
|
||||
of the image that it will create. Applications can call
|
||||
gdk_pixbuf_loader_set_size() in response to this signal to set
|
||||
the desired size to which the image should be scaled.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
<!-- # Unused Parameters # -->
|
||||
@width: the original width of the image
|
||||
@height: the original height of the image
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_new ##### -->
|
||||
<para>
|
||||
|
||||
@@ -156,25 +80,6 @@ End:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_new_with_mime_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@mime_type:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_get_format ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_write ##### -->
|
||||
<para>
|
||||
|
||||
@@ -187,16 +92,6 @@ End:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_set_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@loader:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_loader_get_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
@@ -225,3 +120,56 @@ End:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
|
||||
<para>
|
||||
This signal is emitted when the pixbuf loader has been fed the
|
||||
initial amount of data that is required to figure out the size and
|
||||
format of the image that it will create. After this signal is
|
||||
emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to
|
||||
fetch the partially-loaded pixbuf.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@loader: Loader which emitted the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
|
||||
<para>
|
||||
This signal is emitted when a significant area of the image being
|
||||
loaded has been updated. Normally it means that a complete
|
||||
scanline has been read in, but it could be a different area as
|
||||
well. Applications can use this signal to know when to repaint
|
||||
areas of an image that is being loaded.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
<!-- # Unused Parameters # -->
|
||||
@loader: Loader which emitted the signal.
|
||||
@x: X offset of upper-left corner of the updated area.
|
||||
@y: Y offset of upper-left corner of the updated area.
|
||||
@width: Width of updated area.
|
||||
@height: Height of updated area.
|
||||
|
||||
<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
|
||||
<para>
|
||||
This signal is emitted when gdk_pixbuf_loader_close() is called.
|
||||
It can be used by different parts of an application to receive
|
||||
notification when an image loader is closed by the code that
|
||||
drives it.
|
||||
</para>
|
||||
|
||||
@gdkpixbufloader: the object which received the signal.
|
||||
<!-- # Unused Parameters # -->
|
||||
@loader: Loader which emitted the signal.
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
@@ -365,12 +365,6 @@ XlibRGB
|
||||
|
||||
@obj: A GTK+ object.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFrame ##### -->
|
||||
<para>
|
||||
This object describes an individual frame of an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufFrameAction ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Information that describes an image.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para>
|
||||
<para><anchor id="GdkPixbuf">
|
||||
The <structname>GdkPixbuf</structname> structure contains
|
||||
information that describes an image in memory.
|
||||
</para>
|
||||
@@ -51,7 +51,7 @@ information on error domains and error codes.
|
||||
<para>
|
||||
These values can be passed to
|
||||
gdk_pixbuf_render_to_drawable_alpha() to control how the alpha
|
||||
channel of an image should be handled. This function can create a
|
||||
chanel of an image should be handled. This function can create a
|
||||
bilevel clipping mask (black and white) and use it while painting
|
||||
the image. In the future, when the X Window System gets an alpha
|
||||
channel extension, it will be possible to do full alpha
|
||||
@@ -71,8 +71,7 @@ In the future it will do full alpha compositing.
|
||||
This is the main structure in the &gdk-pixbuf; library. It is
|
||||
used to represent images. It contains information about the
|
||||
image's pixel data, its color space, bits per sample, width and
|
||||
height, and the rowstride (the number of bytes between the start of
|
||||
one row and the start of the next).
|
||||
height, and the rowstride or number of bytes between rows.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
@@ -6,58 +6,7 @@ Extending &gdk-pixbuf;
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
If &gdk-pixbuf; has been compiled with GModule support, it can be extended by
|
||||
modules which can load (and perhaps also save) new image and animation
|
||||
formats. Each loadable module must export a
|
||||
#GdkPixbufModuleFillInfoFunc function named <function>fill_info</function> and
|
||||
a #GdkPixbufModuleFillVtableFunc function named
|
||||
<function>fill_vtable</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to make format-checking work before actually loading the modules
|
||||
(which may require dlopening image libraries), modules export their
|
||||
signatures (and other information) via the <function>fill_info</function>
|
||||
function. An external utility, <command>gdk-pixbuf-query-loaders</command>,
|
||||
uses this to create a text file containing a list of all available loaders and
|
||||
their signatures. This file is then read at runtime by &gdk-pixbuf; to obtain
|
||||
the list of available loaders and their signatures.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Modules may only implement a subset of the functionality available via
|
||||
#GdkPixbufModule. If a particular functionality is not implemented, the
|
||||
<function>fill_vtable</function> function will simply not set the corresponding
|
||||
function pointers of the #GdkPixbufModule structure. If a module supports
|
||||
incremental loading (i.e. provides #begin_load, #stop_load and
|
||||
#load_increment), it doesn't have to implement #load, since &gdk-pixbuf; can
|
||||
supply a generic #load implementation wrapping the incremental loading.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Installing a module is a two-step process:
|
||||
<itemizedlist>
|
||||
<listitem><para>copy the module file(s) to the loader directory (normally
|
||||
<filename><replaceable>libdir</replaceable>/gtk-2.0/<replaceable>version</replaceable>/loaders</filename>,
|
||||
unless overridden by the environment variable
|
||||
<envar>GDK_PIXBUF_MODULEDIR</envar>)
|
||||
</para></listitem>
|
||||
<listitem><para>call <command>gdk-pixbuf-query-loaders</command> to update the
|
||||
module file (normally
|
||||
<filename><replaceable>sysconfdir</replaceable>/gtk-2.0/gdk-pixbuf.loaders</filename>,
|
||||
unless overridden by the environment variable
|
||||
<envar>GDK_PIXBUF_MODULE_FILE</envar>)
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The &gdk-pixbuf; interfaces needed for implementing modules are contained in
|
||||
<filename>gdk-pixbuf-io.h</filename> (and
|
||||
<filename>gdk-pixbuf-animation.h</filename> if the module supports animations).
|
||||
They are not covered by the same stability guarantees as the regular
|
||||
&gdk-pixbuf; API. To underline this fact, they are protected by
|
||||
<literal>#ifdef GDK_PIXBUF_ENABLE_BACKEND</literal>.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
@@ -65,169 +14,16 @@ They are not covered by the same stability guarantees as the regular
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_set_option ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@key:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_get_formats ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_mime_types ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_get_extensions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_format_is_writable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufFormat ##### -->
|
||||
<para>
|
||||
A #GdkPixbufFormat contains information about the image format accepted by a
|
||||
module. Only modules should access the fields directly, applications should
|
||||
use the <function>gdk_pixbuf_format_*</function> functions.
|
||||
</para>
|
||||
|
||||
@name: the name of the image format.
|
||||
@signature: the signature of the module.
|
||||
@domain: the message domain for the @description.
|
||||
@description: a description of the image format.
|
||||
@mime_types: a %NULL-terminated array of MIME types for the image format.
|
||||
@extensions: a %NULL-terminated array of typical filename extensions for the
|
||||
image format.
|
||||
@flags: a combination of #GdkPixbufFormatFlags.
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### ENUM GdkPixbufFormatFlags ##### -->
|
||||
<para>
|
||||
Flags which allow a module to specify further details about the supported
|
||||
operations.
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_FORMAT_WRITABLE: the module can write out images in the format.
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModulePattern ##### -->
|
||||
<para>
|
||||
The signature of a module is a set of prefixes. Prefixes are encoded as
|
||||
pairs of ordinary strings, where the second string, if not %NULL, must be
|
||||
of the same length as the first one and may contain ' ', '!', 'x', 'z',
|
||||
and 'n' to indicate bytes that must be matched, not matched,
|
||||
"don't-care"-bytes, zeros and non-zeros.
|
||||
Each prefix has an associated integer that describes the relevance of
|
||||
the prefix, with 0 meaning a mismatch and 100 a "perfect match".
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The signature of a module is stored as an array of
|
||||
#GdkPixbufModulePattern<!-- -->s. The array is terminated by a pattern
|
||||
where the @prefix is %NULL.
|
||||
</para>
|
||||
|
||||
<informalexample><programlisting>
|
||||
GdkPixbufModulePattern *signature[] = {
|
||||
{ "abcdx", " !x z", 100 },
|
||||
{ "bla", NULL, 90 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
</programlisting>
|
||||
The example matches e.g. "auud\0" with relevance 100, and "blau" with
|
||||
relevance 90.</informalexample>
|
||||
|
||||
@prefix: the prefix for this pattern
|
||||
@mask: mask containing bytes which modify how the prefix is matched against
|
||||
test data
|
||||
@relevance: relevance of this pattern
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleFillVtableFunc ##### -->
|
||||
<!-- ##### USER_FUNCTION ModuleFillVtableFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function used to set the vtable of a
|
||||
#GdkPixbufModule when it is loaded.
|
||||
#GdkPixbufModule when it is loaded.
|
||||
</para>
|
||||
|
||||
@module: a #GdkPixbufModule.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleFillInfoFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function used to fill a
|
||||
#GdkPixbufFormat structure with information about a module.
|
||||
</para>
|
||||
|
||||
@info: a #GdkPixbufFormat.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleSizeFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function that gets called once the size
|
||||
of the loaded image is known.
|
||||
</para>
|
||||
<para>
|
||||
The function is expected to set @width and @height to the desired
|
||||
size to which the image should be scaled. If a module has no efficient
|
||||
way to achieve the desired scaling during the loading of the image, it may
|
||||
either ignore the size request, or only approximate it -- &gdk-pixbuf; will
|
||||
then perform the required scaling on the completely loaded image.
|
||||
</para>
|
||||
|
||||
@width: pointer to a location containing the current image width
|
||||
@height: pointer to a location containing the current image height
|
||||
@user_data: the loader.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModulePreparedFunc ##### -->
|
||||
<!-- ##### USER_FUNCTION ModulePreparedNotifyFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function that gets called once the initial
|
||||
setup of @pixbuf is done.
|
||||
@@ -241,10 +37,9 @@ signal.
|
||||
@pixbuf: the #GdkPixbuf that is currently being loaded.
|
||||
@anim: if an animation is being loaded, the #GdkPixbufAnimation, else %NULL.
|
||||
@user_data: the loader.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufModuleUpdatedFunc ##### -->
|
||||
<!-- ##### USER_FUNCTION ModuleUpdatedNotifyFunc ##### -->
|
||||
<para>
|
||||
Defines the type of the function that gets called every time a region
|
||||
of @pixbuf is updated.
|
||||
@@ -261,7 +56,6 @@ signal.
|
||||
@width: the width of the updated area.
|
||||
@height: the height of the updated area.
|
||||
@user_data: the loader.
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufModule ##### -->
|
||||
@@ -271,16 +65,17 @@ images in a certain file format.
|
||||
</para>
|
||||
<para>
|
||||
A #GdkPixbufModule can be loaded dynamically from a #GModule.
|
||||
Each loadable module must contain a #GdkPixbufModuleFillVtableFunc function
|
||||
named <function>fill_vtable</function>, which will get called when the module
|
||||
is loaded and must set the function pointers of the #GdkPixbufModule.
|
||||
Each loadable module must contain a #ModuleFillVtableFunc function named
|
||||
<function>gdk_pixbuf__<replaceable>module_name</replaceable>_fill_vtable</function>.
|
||||
It will get called when the module is loaded and must set the function
|
||||
pointers of the #GdkPixbufModule.
|
||||
</para>
|
||||
|
||||
@module_name: the name of the module, usually the same as the
|
||||
usual file extension for images of this type, eg. "xpm", "jpeg" or "png".
|
||||
@module_path: the path from which the module is loaded.
|
||||
@format_check: checks if the given data is the beginning of a valid image
|
||||
in the format supported by the module.
|
||||
@module: the loaded #GModule.
|
||||
@info: a #GdkPixbufFormat holding information about the module.
|
||||
@load: loads an image from a file.
|
||||
@load_xpm_data: loads an image from data in memory.
|
||||
@begin_load: begins an incremental load.
|
||||
@@ -289,32 +84,3 @@ is loaded and must set the function pointers of the #GdkPixbufModule.
|
||||
@load_animation: loads an animation from a file.
|
||||
@save: saves a #GdkPixbuf to a file.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationClass ##### -->
|
||||
<para>
|
||||
Modules supporting animations must derive a type from
|
||||
#GdkPixbufAnimation, providing suitable implementations of the
|
||||
virtual functions.
|
||||
</para>
|
||||
|
||||
@parent_class:
|
||||
@is_static_image: returns whether the given animation is just a static image.
|
||||
@get_static_image: returns a static image representing the given animation.
|
||||
@get_size: fills @width and @height with the frame size of the animation.
|
||||
@get_iter: returns an iterator for the given animation.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationIterClass ##### -->
|
||||
<para>
|
||||
Modules supporting animations must derive a type from
|
||||
#GdkPixbufAnimationIter, providing suitable implementations of the
|
||||
virtual functions.
|
||||
</para>
|
||||
|
||||
@parent_class:
|
||||
@get_delay_time: returns the time in milliseconds that the current frame
|
||||
should be shown.
|
||||
@get_pixbuf: returns the current frame.
|
||||
@on_currently_loading_frame: returns whether the current frame of @iter is
|
||||
being loaded.
|
||||
@advance: advances the iterator to @current_time, possibly changing the
|
||||
current frame.
|
||||
|
||||
|
||||
@@ -40,11 +40,42 @@ Functions for reference counting and memory management on pixbufs.
|
||||
responsibility to free the pixel array.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As an extension to traditional reference counting, #GdkPixbuf
|
||||
structures support defining a handler for the last unref
|
||||
operation. If g_object_unref() is called on a #GdkPixbuf
|
||||
structure that has a reference count of 1, i.e. its last
|
||||
reference, then the pixbuf's last unref handler function will be
|
||||
called. It is up to this function to determine whether to
|
||||
finalize the pixbuf using gdk_pixbuf_finalize() or to just
|
||||
continue execution. This can be used to implement a pixbuf cache
|
||||
efficiently; please see the programmer's documentation for
|
||||
details.
|
||||
</para>
|
||||
|
||||
<!-- FIXME: link the last sentence above to the relevant section of
|
||||
the programmer's docs.
|
||||
-->
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbuf, gdk_pixbuf_new_from_data().
|
||||
</para>
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufDestroyNotify ##### -->
|
||||
<para>
|
||||
A function of this type is responsible for freeing the pixel array
|
||||
of a pixbuf. The gdk_pixbuf_new_from_data() function lets you
|
||||
pass in a pre-allocated pixel array so that a pixbuf can be
|
||||
created from it; in this case you will need to pass in a function
|
||||
of #GdkPixbufDestroyNotify so that the pixel data can be freed
|
||||
when the pixbuf is finalized.
|
||||
</para>
|
||||
|
||||
@pixels: The pixel array of the pixbuf that is being finalized.
|
||||
@data: User closure data.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_ref ##### -->
|
||||
<para>
|
||||
|
||||
@@ -62,17 +93,3 @@ Functions for reference counting and memory management on pixbufs.
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkPixbufDestroyNotify ##### -->
|
||||
<para>
|
||||
A function of this type is responsible for freeing the pixel array
|
||||
of a pixbuf. The gdk_pixbuf_new_from_data() function lets you
|
||||
pass in a pre-allocated pixel array so that a pixbuf can be
|
||||
created from it; in this case you will need to pass in a function
|
||||
of #GdkPixbufDestroyNotify so that the pixel data can be freed
|
||||
when the pixbuf is finalized.
|
||||
</para>
|
||||
|
||||
@pixels: The pixel array of the pixbuf that is being finalized.
|
||||
@data: User closure data.
|
||||
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
@GTK_VERSION@
|
||||
@@ -1,18 +1,14 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
gdk-decl-list.txt
|
||||
sgml
|
||||
html
|
||||
gdk.args
|
||||
gdk.signals
|
||||
gdk.hierarchy
|
||||
gdk-decl.txt
|
||||
gdk-decl-list.txt
|
||||
gdk-undocumented.txt
|
||||
gdk-unused.txt
|
||||
gdk.args
|
||||
gdk.hierarchy
|
||||
gdk.interfaces
|
||||
gdk.prerequisites
|
||||
gdk.signals
|
||||
deprecated
|
||||
html
|
||||
xml
|
||||
*.stamp
|
||||
*.lo
|
||||
.libs
|
||||
version.xml
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-docs.sgml
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../../gdk
|
||||
|
||||
# Extra options to supply to gtkdoc-scan
|
||||
SCAN_OPTIONS=--deprecated-guards="GDK_ENABLE_BROKEN|GDK_DISABLE_DEPRECATED"
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../../gdk
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB=$(top_srcdir)/gdk/*.h $(top_srcdir)/gdk/x11/gdkx.h
|
||||
@@ -20,8 +24,6 @@ CFILE_GLOB=$(top_srcdir)/gdk/*.c
|
||||
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
gdkintl.h \
|
||||
gdkmarshalers.h \
|
||||
gdkkeysyms.h \
|
||||
gdkinternals.h \
|
||||
gdkprivate.h \
|
||||
@@ -36,26 +38,6 @@ IGNORE_HFILES= \
|
||||
EXTRA_HFILES= \
|
||||
../../../gdk/x11/gdkx.h
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib)
|
||||
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
|
||||
content_files = \
|
||||
version.xml \
|
||||
multihead.sgml
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES = \
|
||||
images/X_cursor.png \
|
||||
@@ -136,10 +118,147 @@ HTML_IMAGES = \
|
||||
images/watch.png \
|
||||
images/xterm.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
|
||||
content_files =
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
extra_files =
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
GTKDOC_CFLAGS =
|
||||
GTKDOC_LIBS =
|
||||
|
||||
# Commands for compiling and linking
|
||||
GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
|
||||
GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
|
||||
|
||||
|
||||
####################################
|
||||
# Everything below here is generic #
|
||||
####################################
|
||||
|
||||
# We set GPATH here; this gives us semantics for GNU make
|
||||
# which are more like other make's VPATH, when it comes to
|
||||
# whether a source that is a target of one rule is then
|
||||
# searched for in VPATH/GPATH.
|
||||
#
|
||||
GPATH = $(srcdir)
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(content_files) \
|
||||
$(extra_files) \
|
||||
$(HTML_IMAGES) \
|
||||
$(DOC_MAIN_SGML_FILE) \
|
||||
$(DOC_MODULE).types \
|
||||
$(DOC_MODULE)-sections.txt \
|
||||
$(DOC_MODULE)-overrides.txt
|
||||
|
||||
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
|
||||
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
|
||||
|
||||
SCANOBJ_FILES = \
|
||||
$(DOC_MODULE).args \
|
||||
$(DOC_MODULE).hierarchy \
|
||||
$(DOC_MODULE).signals
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
all-local: html-build.stamp
|
||||
|
||||
#### scan ####
|
||||
|
||||
scan-build.stamp: $(HFILE_GLOB)
|
||||
@echo '*** Scanning header files ***'
|
||||
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
|
||||
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
|
||||
else \
|
||||
cd $(srcdir) ; \
|
||||
for i in $(SCANOBJ_FILES) ; do \
|
||||
test -f $$i || touch $$i ; \
|
||||
done \
|
||||
fi
|
||||
cd $(srcdir) && \
|
||||
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
|
||||
touch scan-build.stamp
|
||||
|
||||
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
|
||||
@true
|
||||
|
||||
#### templates ####
|
||||
|
||||
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
|
||||
@echo '*** Rebuilding template files ***'
|
||||
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
touch tmpl-build.stamp
|
||||
|
||||
tmpl.stamp: tmpl-build.stamp
|
||||
@true
|
||||
|
||||
#### sgml ####
|
||||
|
||||
sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
|
||||
@echo '*** Building SGML ***'
|
||||
cd $(srcdir) && \
|
||||
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
|
||||
touch sgml-build.stamp
|
||||
|
||||
sgml.stamp: sgml-build.stamp
|
||||
@true
|
||||
|
||||
#### html ####
|
||||
|
||||
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
|
||||
@echo '*** Building HTML ***'
|
||||
rm -rf $(srcdir)/html
|
||||
mkdir $(srcdir)/html
|
||||
cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
|
||||
@echo '-- Fixing Crossreferences'
|
||||
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
|
||||
touch html-build.stamp
|
||||
endif
|
||||
|
||||
##############
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
|
||||
|
||||
maintainer-clean-local: clean
|
||||
cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
|
||||
(installfiles=`echo $(srcdir)/html/*`; \
|
||||
if test "$$installfiles" = '$(srcdir)/html/*'; \
|
||||
then echo '-- Nothing to install' ; \
|
||||
else \
|
||||
for i in $$installfiles; do \
|
||||
echo '-- Installing '$$i ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
|
||||
done; \
|
||||
echo '-- Installing $(srcdir)/html/index.sgml' ; \
|
||||
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
|
||||
fi)
|
||||
|
||||
#
|
||||
# Require gtk-doc when making dist
|
||||
#
|
||||
if ENABLE_GTK_DOC
|
||||
dist-check-gtkdoc:
|
||||
else
|
||||
dist-check-gtkdoc:
|
||||
@echo "*** gtk-doc must be installed and enabled in order to make dist"
|
||||
@false
|
||||
endif
|
||||
|
||||
dist-hook: dist-check-gtkdoc dist-hook-local
|
||||
mkdir $(distdir)/tmpl
|
||||
mkdir $(distdir)/sgml
|
||||
mkdir $(distdir)/html
|
||||
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
|
||||
-cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
|
||||
-cp $(srcdir)/html/* $(distdir)/html
|
||||
|
||||
.PHONY : dist-hook-local
|
||||
|
||||
@@ -1,52 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY gdk-General SYSTEM "xml/general.xml">
|
||||
<!ENTITY gdk-Bitmaps-and-Pixmaps SYSTEM "xml/pixmaps.xml">
|
||||
<!ENTITY gdk-Images SYSTEM "xml/images.xml">
|
||||
<!ENTITY gdk-GdkRGB SYSTEM "xml/rgb.xml">
|
||||
<!ENTITY gdk-Pixbufs SYSTEM "xml/pixbufs.xml">
|
||||
<!ENTITY gdk-Colormaps-and-Colors SYSTEM "xml/colors.xml">
|
||||
<!ENTITY gdk-Fonts SYSTEM "xml/fonts.xml">
|
||||
<!ENTITY gdk-Drawing-Primitives SYSTEM "xml/drawing.xml">
|
||||
<!ENTITY gdk-Graphics-Contexts SYSTEM "xml/gcs.xml">
|
||||
<!ENTITY gdk-Visuals SYSTEM "xml/visuals.xml">
|
||||
<!ENTITY gdk-Windows SYSTEM "xml/windows.xml">
|
||||
<!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-Points-Rectangles-and-Regions SYSTEM "xml/regions.xml">
|
||||
<!ENTITY gdk-Threads SYSTEM "xml/threads.xml">
|
||||
<!ENTITY gdk-Keys SYSTEM "xml/keys.xml">
|
||||
<!ENTITY gdk-Input-Devices SYSTEM "xml/input_devices.xml">
|
||||
<!ENTITY gdk-Events SYSTEM "xml/events.xml">
|
||||
<!ENTITY gdk-Event-Structures SYSTEM "xml/event_structs.xml">
|
||||
<!ENTITY gdk-Cursors SYSTEM "xml/cursors.xml">
|
||||
<!ENTITY gdk-Input SYSTEM "xml/input.xml">
|
||||
<!ENTITY gdk-Drag-and-Drop SYSTEM "xml/dnd.xml">
|
||||
<!ENTITY gdk-X-Window-System-Interaction SYSTEM "xml/x_interaction.xml">
|
||||
<!ENTITY gdk-Screen SYSTEM "xml/gdkscreen.xml">
|
||||
<!ENTITY gdk-Display SYSTEM "xml/gdkdisplay.xml">
|
||||
<!ENTITY gdk-DisplayManager SYSTEM "xml/gdkdisplaymanager.xml">
|
||||
<!ENTITY gdk-Multihead SYSTEM "multihead.sgml">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
|
||||
<!notation PNG system "PNG">
|
||||
<!entity % local.notation.class "| PNG">
|
||||
|
||||
<!entity gdk-General SYSTEM "sgml/general.sgml">
|
||||
<!entity gdk-Bitmaps-and-Pixmaps SYSTEM "sgml/pixmaps.sgml">
|
||||
<!entity gdk-Images SYSTEM "sgml/images.sgml">
|
||||
<!entity gdk-GdkRGB SYSTEM "sgml/rgb.sgml">
|
||||
<!entity gdk-Pixbufs SYSTEM "sgml/pixbufs.sgml">
|
||||
<!entity gdk-Colormaps-and-Colors SYSTEM "sgml/colors.sgml">
|
||||
<!entity gdk-Fonts SYSTEM "sgml/fonts.sgml">
|
||||
<!entity gdk-Drawing-Primitives SYSTEM "sgml/drawing.sgml">
|
||||
<!entity gdk-Graphics-Contexts SYSTEM "sgml/gcs.sgml">
|
||||
<!entity gdk-Visuals SYSTEM "sgml/visuals.sgml">
|
||||
<!entity gdk-Windows SYSTEM "sgml/windows.sgml">
|
||||
<!entity gdk-Selections SYSTEM "sgml/selections.sgml">
|
||||
<!entity gdk-Properties-and-Atoms SYSTEM "sgml/properties.sgml">
|
||||
<!entity gdk-Pango-Interaction SYSTEM "sgml/pango_interaction.sgml">
|
||||
<!entity gdk-Points-Rectangles-and-Regions SYSTEM "sgml/regions.sgml">
|
||||
<!entity gdk-Threads SYSTEM "sgml/threads.sgml">
|
||||
<!entity gdk-Keys SYSTEM "sgml/keys.sgml">
|
||||
<!entity gdk-Input-Devices SYSTEM "sgml/input_devices.sgml">
|
||||
<!entity gdk-Events SYSTEM "sgml/events.sgml">
|
||||
<!entity gdk-Event-Structures SYSTEM "sgml/event_structs.sgml">
|
||||
<!entity gdk-Cursors SYSTEM "sgml/cursors.sgml">
|
||||
<!entity gdk-Input SYSTEM "sgml/input.sgml">
|
||||
<!entity gdk-Drag-and-Drop SYSTEM "sgml/dnd.sgml">
|
||||
<!entity gdk-X-Window-System-Interaction SYSTEM "sgml/x_interaction.sgml">
|
||||
]>
|
||||
|
||||
<book id="index">
|
||||
<bookinfo>
|
||||
<title>GDK Reference Manual</title>
|
||||
<releaseinfo>for GDK &version;</releaseinfo>
|
||||
</bookinfo>
|
||||
|
||||
<reference id="reference">
|
||||
<title>API Reference</title>
|
||||
&gdk-General;
|
||||
|
||||
&gdk-Multihead;
|
||||
&gdk-Display;
|
||||
&gdk-DisplayManager;
|
||||
&gdk-Screen;
|
||||
|
||||
&gdk-Points-Rectangles-and-Regions;
|
||||
&gdk-Graphics-Contexts;
|
||||
&gdk-Drawing-Primitives;
|
||||
@@ -84,7 +74,4 @@
|
||||
|
||||
&gdk-X-Window-System-Interaction;
|
||||
</reference>
|
||||
|
||||
<index/>
|
||||
|
||||
</book>
|
||||
|
||||
@@ -6,12 +6,10 @@
|
||||
<FILE>general</FILE>
|
||||
gdk_init
|
||||
gdk_init_check
|
||||
gdk_parse_args
|
||||
gdk_get_display_arg_name
|
||||
gdk_set_locale
|
||||
gdk_set_sm_client_id
|
||||
gdk_exit
|
||||
gdk_notify_startup_complete
|
||||
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_program_class
|
||||
@@ -112,111 +110,6 @@ gdk_wm_decoration_get_type
|
||||
gdk_wm_function_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkdisplay</FILE>
|
||||
<TITLE>GdkDisplay</TITLE>
|
||||
GdkDisplay
|
||||
gdk_display_open
|
||||
gdk_display_get_default
|
||||
gdk_display_get_name
|
||||
gdk_display_get_n_screens
|
||||
gdk_display_get_screen
|
||||
gdk_display_get_default_screen
|
||||
gdk_display_pointer_ungrab
|
||||
gdk_display_keyboard_ungrab
|
||||
gdk_display_pointer_is_grabbed
|
||||
gdk_display_beep
|
||||
gdk_display_sync
|
||||
gdk_display_flush
|
||||
gdk_display_close
|
||||
gdk_display_list_devices
|
||||
gdk_display_get_event
|
||||
gdk_display_peek_event
|
||||
gdk_display_put_event
|
||||
gdk_display_add_client_message_filter
|
||||
gdk_display_set_double_click_time
|
||||
gdk_display_get_pointer
|
||||
gdk_display_get_window_at_pointer
|
||||
GdkDisplayPointerHooks
|
||||
gdk_display_set_pointer_hooks
|
||||
gdk_display_supports_cursor_color
|
||||
gdk_display_supports_cursor_alpha
|
||||
gdk_display_get_default_cursor_size
|
||||
gdk_display_get_maximal_cursor_size
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY_OBJECT
|
||||
GDK_IS_DISPLAY
|
||||
GDK_TYPE_DISPLAY
|
||||
GDK_DISPLAY_CLASS
|
||||
GDK_IS_DISPLAY_CLASS
|
||||
GDK_DISPLAY_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_display_open_default_libgtk_only
|
||||
gdk_display_get_type
|
||||
GdkDisplayClass
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkdisplaymanager</FILE>
|
||||
<TITLE>GdkDisplayManager</TITLE>
|
||||
GdkDisplayManager
|
||||
gdk_display_manager_get
|
||||
gdk_display_manager_get_default_display
|
||||
gdk_display_manager_set_default_display
|
||||
gdk_display_manager_list_displays
|
||||
gdk_display_get_core_pointer
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY_MANAGER
|
||||
GDK_DISPLAY_MANAGER_CLASS
|
||||
GDK_DISPLAY_MANAGER_GET_CLASS
|
||||
GDK_IS_DISPLAY_MANAGER_CLASS
|
||||
GDK_IS_DISPLAY_MANAGER
|
||||
GDK_TYPE_DISPLAY_MANAGER
|
||||
GdkDisplayManagerClass
|
||||
gdk_display_manager_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkscreen</FILE>
|
||||
<TITLE>GdkScreen</TITLE>
|
||||
GdkScreen
|
||||
gdk_screen_get_default
|
||||
gdk_screen_get_default_colormap
|
||||
gdk_screen_set_default_colormap
|
||||
gdk_screen_get_system_colormap
|
||||
gdk_screen_get_system_visual
|
||||
gdk_screen_get_rgb_colormap
|
||||
gdk_screen_get_rgb_visual
|
||||
gdk_screen_get_root_window
|
||||
gdk_screen_get_display
|
||||
gdk_screen_get_number
|
||||
gdk_screen_get_width
|
||||
gdk_screen_get_height
|
||||
gdk_screen_get_width_mm
|
||||
gdk_screen_get_height_mm
|
||||
gdk_screen_list_visuals
|
||||
gdk_screen_get_toplevel_windows
|
||||
gdk_screen_make_display_name
|
||||
gdk_screen_get_n_monitors
|
||||
gdk_screen_get_monitor_geometry
|
||||
gdk_screen_get_monitor_at_point
|
||||
gdk_screen_get_monitor_at_window
|
||||
gdk_screen_broadcast_client_message
|
||||
gdk_screen_get_setting
|
||||
<SUBSECTION Standard>
|
||||
GDK_SCREEN
|
||||
GDK_IS_SCREEN
|
||||
GDK_TYPE_SCREEN
|
||||
GDK_SCREEN_CLASS
|
||||
GDK_IS_SCREEN_CLASS
|
||||
GDK_SCREEN_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GdkScreenClass
|
||||
gdk_screen_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Bitmaps and Pixmaps</TITLE>
|
||||
<FILE>pixmaps</FILE>
|
||||
@@ -347,7 +240,6 @@ gdk_colormap_alloc_color
|
||||
gdk_colormap_free_colors
|
||||
gdk_colormap_query_color
|
||||
gdk_colormap_get_visual
|
||||
gdk_colormap_get_screen
|
||||
gdk_colors_store
|
||||
gdk_color_copy
|
||||
gdk_color_free
|
||||
@@ -382,12 +274,8 @@ gdk_color_get_type
|
||||
GdkFont
|
||||
GdkFontType
|
||||
gdk_font_load
|
||||
gdk_font_load_for_display
|
||||
gdk_fontset_load
|
||||
gdk_fontset_load_for_display
|
||||
gdk_font_from_description
|
||||
gdk_font_from_description_for_display
|
||||
gdk_font_get_display
|
||||
gdk_font_ref
|
||||
gdk_font_unref
|
||||
gdk_font_id
|
||||
@@ -409,6 +297,10 @@ gdk_string_height
|
||||
gdk_text_height
|
||||
gdk_char_height
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_font_full_name_get
|
||||
gdk_font_full_name_free
|
||||
|
||||
<SUBSECTION>
|
||||
GdkWChar
|
||||
gdk_wcstombs
|
||||
@@ -430,8 +322,6 @@ gdk_drawable_ref
|
||||
gdk_drawable_unref
|
||||
gdk_drawable_set_data
|
||||
gdk_drawable_get_data
|
||||
gdk_drawable_get_display
|
||||
gdk_drawable_get_screen
|
||||
gdk_drawable_get_visual
|
||||
gdk_drawable_set_colormap
|
||||
gdk_drawable_get_colormap
|
||||
@@ -445,7 +335,6 @@ gdk_draw_point
|
||||
gdk_draw_points
|
||||
gdk_draw_line
|
||||
gdk_draw_lines
|
||||
gdk_draw_pixbuf
|
||||
gdk_draw_segments
|
||||
GdkSegment
|
||||
gdk_draw_rectangle
|
||||
@@ -466,7 +355,6 @@ gdk_draw_pixmap
|
||||
gdk_draw_drawable
|
||||
gdk_draw_image
|
||||
gdk_drawable_get_image
|
||||
gdk_drawable_copy_to_image
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DRAWABLE
|
||||
@@ -492,7 +380,6 @@ GdkFunction
|
||||
|
||||
gdk_gc_new
|
||||
gdk_gc_new_with_values
|
||||
gdk_gc_get_screen
|
||||
gdk_gc_ref
|
||||
gdk_gc_unref
|
||||
gdk_gc_destroy
|
||||
@@ -567,7 +454,6 @@ gdk_visual_get_best_with_type
|
||||
gdk_visual_get_best_with_both
|
||||
gdk_visual_ref
|
||||
gdk_visual_unref
|
||||
gdk_visual_get_screen
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_BYTE_ORDER
|
||||
@@ -597,6 +483,7 @@ GdkWindowEdge
|
||||
GdkWindowTypeHint
|
||||
GdkWindowAttr
|
||||
GdkWindowAttributesType
|
||||
GdkScreen
|
||||
gdk_window_new
|
||||
gdk_window_destroy
|
||||
gdk_window_ref
|
||||
@@ -616,10 +503,6 @@ gdk_window_stick
|
||||
gdk_window_unstick
|
||||
gdk_window_maximize
|
||||
gdk_window_unmaximize
|
||||
gdk_window_fullscreen
|
||||
gdk_window_unfullscreen
|
||||
gdk_window_set_keep_above
|
||||
gdk_window_set_keep_below
|
||||
gdk_window_move
|
||||
gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
@@ -680,8 +563,6 @@ gdk_window_set_geometry_hints
|
||||
gdk_window_set_icon_list
|
||||
gdk_window_set_modal_hint
|
||||
gdk_window_set_type_hint
|
||||
gdk_window_set_skip_taskbar_hint
|
||||
gdk_window_set_skip_pager_hint
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_frame_extents
|
||||
@@ -767,13 +648,10 @@ GDK_SELECTION_TYPE_PIXMAP
|
||||
GDK_SELECTION_TYPE_WINDOW
|
||||
GDK_SELECTION_TYPE_STRING
|
||||
gdk_selection_owner_set
|
||||
gdk_selection_owner_set_for_display
|
||||
gdk_selection_owner_get
|
||||
gdk_selection_owner_get_for_display
|
||||
gdk_selection_convert
|
||||
gdk_selection_property_get
|
||||
gdk_selection_send_notify
|
||||
gdk_selection_send_notify_for_display
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -784,16 +662,12 @@ GDK_ATOM_TO_POINTER
|
||||
GDK_POINTER_TO_ATOM
|
||||
GDK_NONE
|
||||
gdk_text_property_to_text_list
|
||||
gdk_text_property_to_text_list_for_display
|
||||
gdk_free_text_list
|
||||
gdk_text_property_to_utf8_list
|
||||
gdk_text_property_to_utf8_list_for_display
|
||||
gdk_string_to_compound_text
|
||||
gdk_string_to_compound_text_for_display
|
||||
gdk_free_compound_text
|
||||
gdk_utf8_to_string_target
|
||||
gdk_utf8_to_compound_text
|
||||
gdk_utf8_to_compound_text_for_display
|
||||
gdk_atom_intern
|
||||
gdk_atom_name
|
||||
gdk_property_get
|
||||
@@ -809,7 +683,6 @@ GDK_TYPE_PROP_MODE
|
||||
<TITLE>Pango Interaction</TITLE>
|
||||
<FILE>pango_interaction</FILE>
|
||||
gdk_pango_context_get
|
||||
gdk_pango_context_get_for_screen
|
||||
gdk_pango_context_set_colormap
|
||||
GdkPangoAttrEmbossed
|
||||
GdkPangoAttrStipple
|
||||
@@ -886,7 +759,6 @@ gdk_threads_mutex
|
||||
GdkKeymap
|
||||
GdkKeymapKey
|
||||
gdk_keymap_get_default
|
||||
gdk_keymap_get_for_display
|
||||
gdk_keymap_lookup_key
|
||||
gdk_keymap_translate_keyboard_state
|
||||
gdk_keymap_get_entries_for_keyval
|
||||
@@ -982,7 +854,6 @@ gdk_event_peek
|
||||
gdk_event_get
|
||||
gdk_event_get_graphics_expose
|
||||
gdk_event_put
|
||||
gdk_event_new
|
||||
gdk_event_copy
|
||||
gdk_event_free
|
||||
gdk_event_get_time
|
||||
@@ -997,15 +868,12 @@ GdkEventFunc
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_event_send_client_message
|
||||
gdk_event_send_client_message_for_display
|
||||
gdk_event_send_clientmessage_toall
|
||||
gdk_add_client_message_filter
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_show_events
|
||||
gdk_set_show_events
|
||||
gdk_event_set_screen
|
||||
gdk_event_get_screen
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_setting_get
|
||||
@@ -1071,9 +939,6 @@ GdkCursor
|
||||
GdkCursorType
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixmap
|
||||
gdk_cursor_new_from_pixbuf
|
||||
gdk_cursor_new_for_display
|
||||
gdk_cursor_get_display
|
||||
gdk_cursor_ref
|
||||
gdk_cursor_unref
|
||||
gdk_cursor_destroy
|
||||
@@ -1109,13 +974,11 @@ gdk_drop_reply
|
||||
gdk_drag_context_new
|
||||
gdk_drag_drop
|
||||
gdk_drag_find_window
|
||||
gdk_drag_find_window_for_screen
|
||||
gdk_drag_context_ref
|
||||
gdk_drag_begin
|
||||
gdk_drag_motion
|
||||
gdk_drop_finish
|
||||
gdk_drag_get_protocol
|
||||
gdk_drag_get_protocol_for_display
|
||||
GdkDragProtocol
|
||||
gdk_drag_context_unref
|
||||
GdkDragContext
|
||||
@@ -1147,7 +1010,6 @@ GDK_WINDOW_XDISPLAY
|
||||
GDK_WINDOW_XID
|
||||
GDK_PIXMAP_XDISPLAY
|
||||
GDK_PIXMAP_XID
|
||||
GDK_DISPLAY_XDISPLAY
|
||||
GDK_DRAWABLE_XDISPLAY
|
||||
GDK_DRAWABLE_XID
|
||||
GDK_IMAGE_XDISPLAY
|
||||
@@ -1155,9 +1017,6 @@ GDK_IMAGE_XIMAGE
|
||||
GDK_GC_XDISPLAY
|
||||
GDK_COLORMAP_XDISPLAY
|
||||
GDK_COLORMAP_XCOLORMAP
|
||||
GDK_SCREEN_XDISPLAY
|
||||
GDK_SCREEN_XNUMBER
|
||||
GDK_SCREEN_XSCREEN
|
||||
GDK_VISUAL_XVISUAL
|
||||
GDK_FONT_XDISPLAY
|
||||
GDK_FONT_XFONT
|
||||
@@ -1169,31 +1028,17 @@ GDK_WINDOW_XWINDOW
|
||||
gdkx_visual_get
|
||||
gdkx_colormap_get
|
||||
gdk_pixmap_foreign_new
|
||||
gdk_pixmap_foreign_new_for_display
|
||||
gdk_window_foreign_new
|
||||
gdk_window_foreign_new_for_display
|
||||
gdk_xid_table_lookup
|
||||
gdk_xid_table_lookup_for_display
|
||||
gdk_window_lookup
|
||||
gdk_window_lookup_for_display
|
||||
gdk_pixmap_lookup
|
||||
gdk_pixmap_lookup_for_display
|
||||
gdk_font_lookup
|
||||
gdk_font_lookup_for_display
|
||||
gdk_x11_lookup_xdisplay
|
||||
gdk_x11_get_server_time
|
||||
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_colormap_foreign_new
|
||||
gdk_x11_colormap_get_xcolormap
|
||||
gdk_x11_colormap_get_xdisplay
|
||||
gdk_x11_cursor_get_xcursor
|
||||
gdk_x11_cursor_get_xdisplay
|
||||
gdk_x11_display_get_xdisplay
|
||||
gdk_x11_display_grab
|
||||
gdk_x11_display_ungrab
|
||||
gdk_x11_drawable_get_xdisplay
|
||||
gdk_x11_drawable_get_xid
|
||||
gdk_x11_font_get_name
|
||||
@@ -1207,18 +1052,12 @@ gdk_x11_get_default_xdisplay
|
||||
gdk_x11_grab_server
|
||||
gdk_x11_image_get_xdisplay
|
||||
gdk_x11_image_get_ximage
|
||||
gdk_x11_screen_get_screen_number
|
||||
gdk_x11_screen_get_xscreen
|
||||
gdk_x11_ungrab_server
|
||||
gdk_x11_visual_get_xvisual
|
||||
gdk_x11_atom_to_xatom
|
||||
gdk_x11_atom_to_xatom_for_display
|
||||
gdk_x11_xatom_to_atom
|
||||
gdk_x11_xatom_to_atom_for_display
|
||||
gdk_x11_get_xatom_by_name
|
||||
gdk_x11_get_xatom_by_name_for_display
|
||||
gdk_x11_get_xatom_name
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_display
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
gdk_display_get_type
|
||||
gdk_display_manager_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_drawable_get_type
|
||||
gdk_window_object_get_type
|
||||
gdk_pixmap_get_type
|
||||
gdk_gc_get_type
|
||||
gdk_keymap_get_type
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
<refentry id="multihead" revision="1 May 2002">
|
||||
<refmeta>
|
||||
<refentrytitle>Multi-head Support Overview</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
<refmiscinfo>GDK Library</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>Multi-head Support Overview</refname>
|
||||
<refpurpose>Overview of GdkDisplay and GdkScreen</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1>
|
||||
<title>Overview</title>
|
||||
<para>
|
||||
Multihead support is based around two main object types:
|
||||
<itemizedlist>
|
||||
<listitem><para>GdkDisplay</para></listitem>
|
||||
<listitem><para>GdkScreen</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<link linkend="gdk-GdkDisplay">GdkDisplay</link> objects are the GDK
|
||||
representation of the X Display which can be described as <emphasis>a
|
||||
workstation consisting of a keyboard a pointing device (such as a
|
||||
mouse) and one or more screens</emphasis>.
|
||||
It is used to open and keep track of various <link
|
||||
linkend="gdk-GdkScreen">GdkScreen</link> objects currently
|
||||
instanciated by the application. It is also used to grab and release
|
||||
the keyboard and the mouse pointer.
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="gdk-GdkScreen">GdkScreen</link> objects are the GDK
|
||||
representation of a physical screen. It is used throughout GDK and GTK+
|
||||
to specify which screen the top level windows are to be displayed on.
|
||||
It is also used to query the screen specification and default settings such as
|
||||
the default colormap (<link linkend="gdk-screen-get-default-colormap">gdk_screen_get_default_colormap</link>()),
|
||||
the screen width (<link linkend="gdk-screen-get-width">gdk_screen_get_width</link>()), etc.
|
||||
</para>
|
||||
<para>
|
||||
The following code samples demonstrate common usage of the objects described above.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Testing the number of screen on the current display</title>
|
||||
<programlisting><!--
|
||||
-->gint num_screen = 0;
|
||||
gchar *displayname = NULL;
|
||||
GdkScreen **screen_list;
|
||||
GdkDisplay *display;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
display = gdk_display_get_default ();
|
||||
num_screen = gdk_display_get_n_screens (display);
|
||||
displayname = gdk_display_get_name (display);
|
||||
if (num_screen <= 1)
|
||||
{
|
||||
printf ("This Xserver (%s) manages only one screen. exiting...\n",
|
||||
displayname);
|
||||
exit (1);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("This Xserver (%s) manages %d screens.\n", displayname,
|
||||
num_screen);
|
||||
}<!--
|
||||
|
||||
--> </programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Opening a second display</title>
|
||||
<programlisting><!--
|
||||
-->gchar *second_screen_name;
|
||||
GdkDisplay *second_display;
|
||||
GdkScreen *second_screen;
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* screen2_name needs to be initialized before calling
|
||||
/* gdk_display_new() */
|
||||
second_display = gdk_display_new (&argc, &argv, second_screen_name);
|
||||
if (second_display)
|
||||
second_screen = gdk_display_get_default_screen (second_display);
|
||||
else
|
||||
{
|
||||
g_print ("Can't open display :\n\t%s\n\n",
|
||||
second_screen_name);
|
||||
exit (1);
|
||||
}
|
||||
/* now GdkScreen can be assigned to GtkWindows */
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (window, second_screen);<!--
|
||||
--></programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>See Also</title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-GdkDisplay">GdkDisplay</link></term>
|
||||
<listitem><para>the GDK Object used to represent and manipulate display
|
||||
related data</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-GdkScreen">GdkScreen</link></term>
|
||||
<listitem><para>the GDK Object used to represent and query screen related
|
||||
data</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gdk-docs.sgml" "book" "refentry" "")
|
||||
End:
|
||||
-->
|
||||
@@ -2,7 +2,7 @@
|
||||
Colormaps and Colors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Manipulation of colors and colormaps
|
||||
manipulation of colors and colormaps.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -72,11 +72,14 @@ The colormap structure contains the following public fields.
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_new ##### -->
|
||||
<para>
|
||||
Creates a new colormap for the given visual.
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@allocate:
|
||||
@Returns:
|
||||
@visual: a #GdkVisual.
|
||||
@allocate: if %TRUE, the newly created colormap will be
|
||||
a private colormap, and all colors in it will be
|
||||
allocated for the applications use.
|
||||
@Returns: the new #GdkColormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_ref ##### -->
|
||||
@@ -98,57 +101,82 @@ The colormap structure contains the following public fields.
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
|
||||
<para>
|
||||
Returns the system's default colormap.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the default colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
|
||||
<para>
|
||||
Returns the size of the system's default colormap.
|
||||
(See the description of struct #GdkColormap for an
|
||||
explanation of the size of a colormap.)
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the size of the system's default colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_change ##### -->
|
||||
<para>
|
||||
Changes the value of the first @ncolors in a private colormap
|
||||
to match the values in the <structfield>colors</structfield>
|
||||
array in the color map. This function is obsolete and
|
||||
should not be used. See gdk_color_change().
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@ncolors:
|
||||
@colormap: a #GdkColormap.
|
||||
@ncolors: the number of colors to change.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
|
||||
<para>
|
||||
Allocates colors from a colormap.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@ncolors:
|
||||
@writeable:
|
||||
@best_match:
|
||||
@success:
|
||||
@Returns:
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: The color values to allocate. On return, the pixel
|
||||
values for allocated colors will be filled in.
|
||||
@ncolors: The number of colors in @colors.
|
||||
@writeable: If %TRUE, the colors are allocated writeable
|
||||
(their values can later be changed using gdk_color_change()).
|
||||
Writeable colors cannot be shared between applications.
|
||||
@best_match: If %TRUE, GDK will attempt to do matching against
|
||||
existing colors if the colors cannot be allocated as
|
||||
requested.
|
||||
@success: An array of length @ncolors. On return, this
|
||||
indicates whether the corresponding color in @colors was
|
||||
sucessfully allocated or not.
|
||||
@Returns: The number of colors that were not sucessfully
|
||||
allocated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
|
||||
<para>
|
||||
Allocates a single color from a colormap.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@writeable:
|
||||
@best_match:
|
||||
@Returns:
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the color to allocate. On return the
|
||||
<structfield>pixel</structfield> field will be
|
||||
filled in if allocation succeeds.
|
||||
@writeable: If %TRUE, the color is allocated writeable
|
||||
(their values can later be changed using gdk_color_change()).
|
||||
Writeable colors cannot be shared between applications.
|
||||
@best_match: If %TRUE, GDK will attempt to do matching against
|
||||
existing colors if the color cannot be allocated as
|
||||
requested.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
|
||||
<para>
|
||||
Frees previously allocated colors.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@ncolors:
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: the colors to free.
|
||||
@ncolors: the number of colors in @colors.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_query_color ##### -->
|
||||
@@ -163,127 +191,166 @@ The colormap structure contains the following public fields.
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
|
||||
<para>
|
||||
Returns the visual for which a given colormap was created.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cmap:
|
||||
@Returns:
|
||||
@colormap: a #GdkColormap.
|
||||
@Returns: the visual of the colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_store ##### -->
|
||||
<para>
|
||||
Changes the value of the first @ncolors colors in
|
||||
a private colormap. This function is obsolete and
|
||||
should not be used. See gdk_color_change().
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@colors:
|
||||
@ncolors:
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: the new color values.
|
||||
@ncolors: the number of colors to change.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_copy ##### -->
|
||||
<para>
|
||||
Makes a copy of a color structure. The result
|
||||
must be freed using gdk_color_free().
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@Returns:
|
||||
@color: a #GdkColor.
|
||||
@Returns: a copy of @color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_free ##### -->
|
||||
<para>
|
||||
Frees a color structure created with
|
||||
gdk_color_copy().
|
||||
</para>
|
||||
|
||||
@color:
|
||||
@color: a #GdkColor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_alloc ##### -->
|
||||
<para>
|
||||
Allocates colors from a colormap. This function
|
||||
is obsolete. See gdk_colormap_alloc_colors().
|
||||
For full documentation of the fields, see
|
||||
the Xlib documentation for <function>XAllocColorCells()</function>.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@contiguous:
|
||||
@planes:
|
||||
@nplanes:
|
||||
@pixels:
|
||||
@npixels:
|
||||
@colormap: a #GdkColormap.
|
||||
@contiguous: if %TRUE, the colors should be allocated
|
||||
in contiguous color cells.
|
||||
@planes: an array in which to store the plane masks.
|
||||
@nplanes: the number of planes to allocate. (Or zero,
|
||||
to indicate that the color allocation should not be
|
||||
planar.)
|
||||
@pixels: an array into which to store allocated pixel
|
||||
values.
|
||||
@npixels: the number of pixels in each plane to allocate.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_free ##### -->
|
||||
<para>
|
||||
Frees colors allocated with gdk_colors_alloc(). This
|
||||
function is obsolete. See gdk_colormap_free_colors().
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@pixels:
|
||||
@npixels:
|
||||
@planes:
|
||||
@colormap: a #GdkColormap.
|
||||
@pixels: the pixel values of the colors to free.
|
||||
@npixels: the number of values in @pixels.
|
||||
@planes: the plane masks for all planes to free, OR'd
|
||||
together.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_white ##### -->
|
||||
<para>
|
||||
Returns the white color for a given colormap. The resulting
|
||||
value has already allocated been allocated.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the location to store the color.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_black ##### -->
|
||||
<para>
|
||||
Returns the black color for a given colormap. The resulting
|
||||
value has already benn allocated.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the location to store the color.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_parse ##### -->
|
||||
<para>
|
||||
Parses a textual specification of a color and fill in
|
||||
the <structfield>red</structfield>,
|
||||
<structfield>green</structfield>, and
|
||||
<structfield>blue</structfield> fields of a
|
||||
#GdkColor structure. The color is <emphasis>not</emphasis>
|
||||
allocated, you must call gdk_colormap_alloc_color() yourself.
|
||||
The text string can be in any of the forms accepted
|
||||
by <function>XParseColor</function>; these include
|
||||
name for a color from <filename>rgb.txt</filename>, such as
|
||||
<literal>DarkSlateGray</literal>, or a hex specification
|
||||
such as <literal>305050</literal>.
|
||||
</para>
|
||||
|
||||
@spec:
|
||||
@color:
|
||||
@spec: the string specifying the color.
|
||||
@color: the #GdkColor to fill in
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_alloc ##### -->
|
||||
<para>
|
||||
Allocates a single color from a colormap.
|
||||
This function is obsolete. See gdk_colormap_alloc_color().
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@Returns:
|
||||
@colormap: a #GdkColormap.
|
||||
@color: The color to allocate. On return, the
|
||||
<structfield>pixel</structfield> field will be
|
||||
filled in.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_change ##### -->
|
||||
<para>
|
||||
Changes the value of a color that has already
|
||||
been allocated. If @colormap is not a private
|
||||
colormap, then the color must have been allocated
|
||||
using gdk_colormap_alloc_colors() with the
|
||||
@writeable set to %TRUE.
|
||||
</para>
|
||||
|
||||
@colormap:
|
||||
@color:
|
||||
@colormap: a #GdkColormap.
|
||||
@color: a #GdkColor, with the color to change
|
||||
in the <structfield>pixel</structfield> field,
|
||||
and the new value in the remaining fields.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_equal ##### -->
|
||||
<para>
|
||||
Compares two colors.
|
||||
</para>
|
||||
|
||||
@colora:
|
||||
@colorb:
|
||||
@Returns:
|
||||
@colora: a #GdkColor.
|
||||
@colorb: another #GdkColor.
|
||||
@Returns: %TRUE if the two colors compare equal
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_hash ##### -->
|
||||
<para>
|
||||
A hash function suitable for using for a hash
|
||||
table that stores #GdkColor's.
|
||||
</para>
|
||||
|
||||
@colora:
|
||||
@Returns:
|
||||
@colora: a #GdkColor.
|
||||
@Returns: The hash function appled to @colora
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Cursors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Standard and pixmap cursors
|
||||
standard and pixmap cursors.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -27,83 +27,83 @@ A <type>GdkCursor</type> structure represents a cursor.
|
||||
The standard cursors available.
|
||||
</para>
|
||||
|
||||
@GDK_X_CURSOR: <inlinegraphic format="PNG" fileref="X_cursor.png"></inlinegraphic>
|
||||
@GDK_ARROW: <inlinegraphic format="PNG" fileref="arrow.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_DOWN: <inlinegraphic format="PNG" fileref="based_arrow_down.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_UP: <inlinegraphic format="PNG" fileref="based_arrow_up.png"></inlinegraphic>
|
||||
@GDK_BOAT: <inlinegraphic format="PNG" fileref="boat.png"></inlinegraphic>
|
||||
@GDK_BOGOSITY: <inlinegraphic format="PNG" fileref="bogosity.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_LEFT_CORNER: <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_SIDE: <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_TEE: <inlinegraphic format="PNG" fileref="bottom_tee.png"></inlinegraphic>
|
||||
@GDK_BOX_SPIRAL: <inlinegraphic format="PNG" fileref="box_spiral.png"></inlinegraphic>
|
||||
@GDK_CENTER_PTR: <inlinegraphic format="PNG" fileref="center_ptr.png"></inlinegraphic>
|
||||
@GDK_CIRCLE: <inlinegraphic format="PNG" fileref="circle.png"></inlinegraphic>
|
||||
@GDK_CLOCK: <inlinegraphic format="PNG" fileref="clock.png"></inlinegraphic>
|
||||
@GDK_COFFEE_MUG: <inlinegraphic format="PNG" fileref="coffee_mug.png"></inlinegraphic>
|
||||
@GDK_CROSS: <inlinegraphic format="PNG" fileref="cross.png"></inlinegraphic>
|
||||
@GDK_CROSS_REVERSE: <inlinegraphic format="PNG" fileref="cross_reverse.png"></inlinegraphic>
|
||||
@GDK_CROSSHAIR: <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic>
|
||||
@GDK_DIAMOND_CROSS: <inlinegraphic format="PNG" fileref="diamond_cross.png"></inlinegraphic>
|
||||
@GDK_DOT: <inlinegraphic format="PNG" fileref="dot.png"></inlinegraphic>
|
||||
@GDK_DOTBOX: <inlinegraphic format="PNG" fileref="dotbox.png"></inlinegraphic>
|
||||
@GDK_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="double_arrow.png"></inlinegraphic>
|
||||
@GDK_DRAFT_LARGE: <inlinegraphic format="PNG" fileref="draft_large.png"></inlinegraphic>
|
||||
@GDK_DRAFT_SMALL: <inlinegraphic format="PNG" fileref="draft_small.png"></inlinegraphic>
|
||||
@GDK_DRAPED_BOX: <inlinegraphic format="PNG" fileref="draped_box.png"></inlinegraphic>
|
||||
@GDK_EXCHANGE: <inlinegraphic format="PNG" fileref="exchange.png"></inlinegraphic>
|
||||
@GDK_FLEUR: <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic>
|
||||
@GDK_GOBBLER: <inlinegraphic format="PNG" fileref="gobbler.png"></inlinegraphic>
|
||||
@GDK_GUMBY: <inlinegraphic format="PNG" fileref="gumby.png"></inlinegraphic>
|
||||
@GDK_HAND1: <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic>
|
||||
@GDK_HAND2: <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic>
|
||||
@GDK_HEART: <inlinegraphic format="PNG" fileref="heart.png"></inlinegraphic>
|
||||
@GDK_ICON: <inlinegraphic format="PNG" fileref="icon.png"></inlinegraphic>
|
||||
@GDK_IRON_CROSS: <inlinegraphic format="PNG" fileref="iron_cross.png"></inlinegraphic>
|
||||
@GDK_LEFT_PTR: <inlinegraphic format="PNG" fileref="left_ptr.png"></inlinegraphic>
|
||||
@GDK_LEFT_SIDE: <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic>
|
||||
@GDK_LEFT_TEE: <inlinegraphic format="PNG" fileref="left_tee.png"></inlinegraphic>
|
||||
@GDK_LEFTBUTTON: <inlinegraphic format="PNG" fileref="leftbutton.png"></inlinegraphic>
|
||||
@GDK_LL_ANGLE: <inlinegraphic format="PNG" fileref="ll_angle.png"></inlinegraphic>
|
||||
@GDK_LR_ANGLE: <inlinegraphic format="PNG" fileref="lr_angle.png"></inlinegraphic>
|
||||
@GDK_MAN: <inlinegraphic format="PNG" fileref="man.png"></inlinegraphic>
|
||||
@GDK_MIDDLEBUTTON: <inlinegraphic format="PNG" fileref="middlebutton.png"></inlinegraphic>
|
||||
@GDK_MOUSE: <inlinegraphic format="PNG" fileref="mouse.png"></inlinegraphic>
|
||||
@GDK_PENCIL: <inlinegraphic format="PNG" fileref="pencil.png"></inlinegraphic>
|
||||
@GDK_PIRATE: <inlinegraphic format="PNG" fileref="pirate.png"></inlinegraphic>
|
||||
@GDK_PLUS: <inlinegraphic format="PNG" fileref="plus.png"></inlinegraphic>
|
||||
@GDK_QUESTION_ARROW: <inlinegraphic format="PNG" fileref="question_arrow.png"></inlinegraphic>
|
||||
@GDK_RIGHT_PTR: <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic>
|
||||
@GDK_RIGHT_SIDE: <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic>
|
||||
@GDK_RIGHT_TEE: <inlinegraphic format="PNG" fileref="right_tee.png"></inlinegraphic>
|
||||
@GDK_RIGHTBUTTON: <inlinegraphic format="PNG" fileref="rightbutton.png"></inlinegraphic>
|
||||
@GDK_RTL_LOGO: <inlinegraphic format="PNG" fileref="rtl_logo.png"></inlinegraphic>
|
||||
@GDK_SAILBOAT: <inlinegraphic format="PNG" fileref="sailboat.png"></inlinegraphic>
|
||||
@GDK_SB_DOWN_ARROW: <inlinegraphic format="PNG" fileref="sb_down_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_H_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_LEFT_ARROW: <inlinegraphic format="PNG" fileref="sb_left_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_RIGHT_ARROW: <inlinegraphic format="PNG" fileref="sb_right_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_UP_ARROW: <inlinegraphic format="PNG" fileref="sb_up_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_V_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SHUTTLE: <inlinegraphic format="PNG" fileref="shuttle.png"></inlinegraphic>
|
||||
@GDK_SIZING: <inlinegraphic format="PNG" fileref="sizing.png"></inlinegraphic>
|
||||
@GDK_SPIDER: <inlinegraphic format="PNG" fileref="spider.png"></inlinegraphic>
|
||||
@GDK_SPRAYCAN: <inlinegraphic format="PNG" fileref="spraycan.png"></inlinegraphic>
|
||||
@GDK_STAR: <inlinegraphic format="PNG" fileref="star.png"></inlinegraphic>
|
||||
@GDK_TARGET: <inlinegraphic format="PNG" fileref="target.png"></inlinegraphic>
|
||||
@GDK_TCROSS: <inlinegraphic format="PNG" fileref="tcross.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_ARROW: <inlinegraphic format="PNG" fileref="top_left_arrow.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_CORNER: <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_SIDE: <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic>
|
||||
@GDK_TOP_TEE: <inlinegraphic format="PNG" fileref="top_tee.png"></inlinegraphic>
|
||||
@GDK_TREK: <inlinegraphic format="PNG" fileref="trek.png"></inlinegraphic>
|
||||
@GDK_UL_ANGLE: <inlinegraphic format="PNG" fileref="ul_angle.png"></inlinegraphic>
|
||||
@GDK_UMBRELLA: <inlinegraphic format="PNG" fileref="umbrella.png"></inlinegraphic>
|
||||
@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_X_CURSOR: <inlinegraphic format="png" fileref="X_cursor.png"></inlinegraphic>
|
||||
@GDK_ARROW: <inlinegraphic format="png" fileref="arrow.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_DOWN: <inlinegraphic format="png" fileref="based_arrow_down.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_UP: <inlinegraphic format="png" fileref="based_arrow_up.png"></inlinegraphic>
|
||||
@GDK_BOAT: <inlinegraphic format="png" fileref="boat.png"></inlinegraphic>
|
||||
@GDK_BOGOSITY: <inlinegraphic format="png" fileref="bogosity.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_LEFT_CORNER: <inlinegraphic format="png" fileref="bottom_left_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_RIGHT_CORNER: <inlinegraphic format="png" fileref="bottom_right_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_SIDE: <inlinegraphic format="png" fileref="bottom_side.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_TEE: <inlinegraphic format="png" fileref="bottom_tee.png"></inlinegraphic>
|
||||
@GDK_BOX_SPIRAL: <inlinegraphic format="png" fileref="box_spiral.png"></inlinegraphic>
|
||||
@GDK_CENTER_PTR: <inlinegraphic format="png" fileref="center_ptr.png"></inlinegraphic>
|
||||
@GDK_CIRCLE: <inlinegraphic format="png" fileref="circle.png"></inlinegraphic>
|
||||
@GDK_CLOCK: <inlinegraphic format="png" fileref="clock.png"></inlinegraphic>
|
||||
@GDK_COFFEE_MUG: <inlinegraphic format="png" fileref="coffee_mug.png"></inlinegraphic>
|
||||
@GDK_CROSS: <inlinegraphic format="png" fileref="cross.png"></inlinegraphic>
|
||||
@GDK_CROSS_REVERSE: <inlinegraphic format="png" fileref="cross_reverse.png"></inlinegraphic>
|
||||
@GDK_CROSSHAIR: <inlinegraphic format="png" fileref="crosshair.png"></inlinegraphic>
|
||||
@GDK_DIAMOND_CROSS: <inlinegraphic format="png" fileref="diamond_cross.png"></inlinegraphic>
|
||||
@GDK_DOT: <inlinegraphic format="png" fileref="dot.png"></inlinegraphic>
|
||||
@GDK_DOTBOX: <inlinegraphic format="png" fileref="dotbox.png"></inlinegraphic>
|
||||
@GDK_DOUBLE_ARROW: <inlinegraphic format="png" fileref="double_arrow.png"></inlinegraphic>
|
||||
@GDK_DRAFT_LARGE: <inlinegraphic format="png" fileref="draft_large.png"></inlinegraphic>
|
||||
@GDK_DRAFT_SMALL: <inlinegraphic format="png" fileref="draft_small.png"></inlinegraphic>
|
||||
@GDK_DRAPED_BOX: <inlinegraphic format="png" fileref="draped_box.png"></inlinegraphic>
|
||||
@GDK_EXCHANGE: <inlinegraphic format="png" fileref="exchange.png"></inlinegraphic>
|
||||
@GDK_FLEUR: <inlinegraphic format="png" fileref="fleur.png"></inlinegraphic>
|
||||
@GDK_GOBBLER: <inlinegraphic format="png" fileref="gobbler.png"></inlinegraphic>
|
||||
@GDK_GUMBY: <inlinegraphic format="png" fileref="gumby.png"></inlinegraphic>
|
||||
@GDK_HAND1: <inlinegraphic format="png" fileref="hand1.png"></inlinegraphic>
|
||||
@GDK_HAND2: <inlinegraphic format="png" fileref="hand2.png"></inlinegraphic>
|
||||
@GDK_HEART: <inlinegraphic format="png" fileref="heart.png"></inlinegraphic>
|
||||
@GDK_ICON: <inlinegraphic format="png" fileref="icon.png"></inlinegraphic>
|
||||
@GDK_IRON_CROSS: <inlinegraphic format="png" fileref="iron_cross.png"></inlinegraphic>
|
||||
@GDK_LEFT_PTR: <inlinegraphic format="png" fileref="left_ptr.png"></inlinegraphic>
|
||||
@GDK_LEFT_SIDE: <inlinegraphic format="png" fileref="left_side.png"></inlinegraphic>
|
||||
@GDK_LEFT_TEE: <inlinegraphic format="png" fileref="left_tee.png"></inlinegraphic>
|
||||
@GDK_LEFTBUTTON: <inlinegraphic format="png" fileref="leftbutton.png"></inlinegraphic>
|
||||
@GDK_LL_ANGLE: <inlinegraphic format="png" fileref="ll_angle.png"></inlinegraphic>
|
||||
@GDK_LR_ANGLE: <inlinegraphic format="png" fileref="lr_angle.png"></inlinegraphic>
|
||||
@GDK_MAN: <inlinegraphic format="png" fileref="man.png"></inlinegraphic>
|
||||
@GDK_MIDDLEBUTTON: <inlinegraphic format="png" fileref="middlebutton.png"></inlinegraphic>
|
||||
@GDK_MOUSE: <inlinegraphic format="png" fileref="mouse.png"></inlinegraphic>
|
||||
@GDK_PENCIL: <inlinegraphic format="png" fileref="pencil.png"></inlinegraphic>
|
||||
@GDK_PIRATE: <inlinegraphic format="png" fileref="pirate.png"></inlinegraphic>
|
||||
@GDK_PLUS: <inlinegraphic format="png" fileref="plus.png"></inlinegraphic>
|
||||
@GDK_QUESTION_ARROW: <inlinegraphic format="png" fileref="question_arrow.png"></inlinegraphic>
|
||||
@GDK_RIGHT_PTR: <inlinegraphic format="png" fileref="right_ptr.png"></inlinegraphic>
|
||||
@GDK_RIGHT_SIDE: <inlinegraphic format="png" fileref="right_side.png"></inlinegraphic>
|
||||
@GDK_RIGHT_TEE: <inlinegraphic format="png" fileref="right_tee.png"></inlinegraphic>
|
||||
@GDK_RIGHTBUTTON: <inlinegraphic format="png" fileref="rightbutton.png"></inlinegraphic>
|
||||
@GDK_RTL_LOGO: <inlinegraphic format="png" fileref="rtl_logo.png"></inlinegraphic>
|
||||
@GDK_SAILBOAT: <inlinegraphic format="png" fileref="sailboat.png"></inlinegraphic>
|
||||
@GDK_SB_DOWN_ARROW: <inlinegraphic format="png" fileref="sb_down_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_H_DOUBLE_ARROW: <inlinegraphic format="png" fileref="sb_h_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_LEFT_ARROW: <inlinegraphic format="png" fileref="sb_left_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_RIGHT_ARROW: <inlinegraphic format="png" fileref="sb_right_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_UP_ARROW: <inlinegraphic format="png" fileref="sb_up_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_V_DOUBLE_ARROW: <inlinegraphic format="png" fileref="sb_v_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SHUTTLE: <inlinegraphic format="png" fileref="shuttle.png"></inlinegraphic>
|
||||
@GDK_SIZING: <inlinegraphic format="png" fileref="sizing.png"></inlinegraphic>
|
||||
@GDK_SPIDER: <inlinegraphic format="png" fileref="spider.png"></inlinegraphic>
|
||||
@GDK_SPRAYCAN: <inlinegraphic format="png" fileref="spraycan.png"></inlinegraphic>
|
||||
@GDK_STAR: <inlinegraphic format="png" fileref="star.png"></inlinegraphic>
|
||||
@GDK_TARGET: <inlinegraphic format="png" fileref="target.png"></inlinegraphic>
|
||||
@GDK_TCROSS: <inlinegraphic format="png" fileref="tcross.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_ARROW: <inlinegraphic format="png" fileref="top_left_arrow.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_CORNER: <inlinegraphic format="png" fileref="top_left_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_RIGHT_CORNER: <inlinegraphic format="png" fileref="top_right_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_SIDE: <inlinegraphic format="png" fileref="top_side.png"></inlinegraphic>
|
||||
@GDK_TOP_TEE: <inlinegraphic format="png" fileref="top_tee.png"></inlinegraphic>
|
||||
@GDK_TREK: <inlinegraphic format="png" fileref="trek.png"></inlinegraphic>
|
||||
@GDK_UL_ANGLE: <inlinegraphic format="png" fileref="ul_angle.png"></inlinegraphic>
|
||||
@GDK_UMBRELLA: <inlinegraphic format="png" fileref="umbrella.png"></inlinegraphic>
|
||||
@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:
|
||||
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
|
||||
gdk_cursor_new_from_pixmap().
|
||||
@@ -119,46 +119,56 @@ The standard cursors available.
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixmap ##### -->
|
||||
<para>
|
||||
Creates a new cursor from a given pixmap and mask. Both the pixmap and mask
|
||||
must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
|
||||
The standard cursor size is 16 by 16 pixels. You can create a bitmap
|
||||
from inline data as in the below example.
|
||||
</para>
|
||||
<example><title>Creating a custom cursor.</title>
|
||||
<programlisting>
|
||||
/* This data is in X bitmap format, and can be created with the 'bitmap'
|
||||
utility. */
|
||||
#define cursor1_width 16
|
||||
#define cursor1_height 16
|
||||
static unsigned char cursor1_bits[] = {
|
||||
0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
|
||||
0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
|
||||
0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
|
||||
|
||||
@source:
|
||||
@mask:
|
||||
@fg:
|
||||
@bg:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
static unsigned char cursor1mask_bits[] = {
|
||||
0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
|
||||
0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
|
||||
0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@pixbuf:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
GdkCursor *cursor;
|
||||
GdkPixmap *source, *mask;
|
||||
GdkColor fg = { 0, 65535, 0, 0 }; /* Red. */
|
||||
GdkColor bg = { 0, 0, 0, 65535 }; /* Blue. */
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@cursor_type:
|
||||
@Returns:
|
||||
source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
|
||||
cursor1_width, cursor1_height);
|
||||
mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
|
||||
cursor1_width, cursor1_height);
|
||||
cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 8, 8);
|
||||
gdk_pixmap_unref (source);
|
||||
gdk_pixmap_unref (mask);
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_display ##### -->
|
||||
<para>
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
@source: the pixmap specifying the cursor.
|
||||
@mask: the pixmap specifying the mask, which must be the same size as @source.
|
||||
@fg: the foreground color, used for the bits in the source which are 1.
|
||||
The color does not have to be allocated first.
|
||||
@bg: the background color, used for the bits in the source which are 0.
|
||||
The color does not have to be allocated first.
|
||||
@x: the horizontal offset of the 'hotspot' of the cursor.
|
||||
@y: the vertical offset of the 'hotspot' of the cursor.
|
||||
@Returns: a new #GdkCursor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_ref ##### -->
|
||||
@@ -183,5 +193,7 @@ The standard cursors available.
|
||||
Destroys a cursor, freeing any resources allocated for it.
|
||||
</para>
|
||||
|
||||
<!-- # Unused Parameters # -->
|
||||
@cursor: a #GdkCursor.
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Drag and Drop
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for controlling drag and drop handling
|
||||
functions for controlling drag and drop handling.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -24,128 +24,142 @@ the GTK+ documentation for more information.
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
|
||||
<para>
|
||||
Returns the selection atom for the current source window.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
@context: a #GdkDragContext.
|
||||
@Returns: the selection atom.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_abort ##### -->
|
||||
<para>
|
||||
Aborts a drag without dropping.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag source.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time_:
|
||||
@context: a #GdkDragContext.
|
||||
@time: the timestamp for this operation.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_reply ##### -->
|
||||
<para>
|
||||
Accepts or rejects a drop.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag destination in response
|
||||
to a drop initiated by the drag source.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@ok:
|
||||
@time_:
|
||||
@context: a #GdkDragContext.
|
||||
@ok: %TRUE if the drop is accepted.
|
||||
@time: the timestamp for this operation.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkDragContext.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the newly created #GdkDragContext.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_drop ##### -->
|
||||
<para>
|
||||
Drops on the current destination.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag source.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time_:
|
||||
@context: a #GdkDragContext.
|
||||
@time: the timestamp for this operation.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_find_window ##### -->
|
||||
<para>
|
||||
Finds the destination window and DND protocol to use at the
|
||||
given pointer position.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@drag_window:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_find_window_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
This function is called by the drag source to obtain the
|
||||
@dest_window and @protocol parameters for gdk_drag_motion().
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@drag_window:
|
||||
@screen:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
@context: a #GdkDragContext.
|
||||
@drag_window: a window which may be at the pointer position, but
|
||||
should be ignored, since it is put up by the drag source as an icon.
|
||||
@x_root: the x position of the pointer in root coordinates.
|
||||
@y_root: the y position of the pointer in root coordinates.
|
||||
@dest_window: location to store the destination window in.
|
||||
@protocol: location to store the DND protocol in.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_ref ##### -->
|
||||
<para>
|
||||
Deprecated function; use g_object_ref() instead.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@context: a #GdkDragContext.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_begin ##### -->
|
||||
<para>
|
||||
Starts a drag and creates a new drag context for it.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag source.
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@targets:
|
||||
@Returns:
|
||||
@window: the source window for this drag.
|
||||
@targets: the list of offered targets.
|
||||
@Returns: a newly created #GdkDragContext.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_motion ##### -->
|
||||
<para>
|
||||
Updates the drag context when the pointer moves or the
|
||||
set of actions changes.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag source.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@suggested_action:
|
||||
@possible_actions:
|
||||
@time_:
|
||||
@Returns:
|
||||
@context: a #GdkDragContext.
|
||||
@dest_window: the new destination window, obtained by gdk_drag_find_window().
|
||||
@protocol: the DND protocol in use, obtained by gdk_drag_find_window().
|
||||
@x_root: the x position of the pointer in root coordinates.
|
||||
@y_root: the y position of the pointer in root coordinates.
|
||||
@suggested_action: the suggested action.
|
||||
@possible_actions: the possible actions.
|
||||
@time: the timestamp for this operation.
|
||||
@Returns: FIXME
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_finish ##### -->
|
||||
<para>
|
||||
Ends the drag operation after a drop.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag destination.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@success:
|
||||
@time_:
|
||||
@context: a #GtkDragContext.
|
||||
@success: %TRUE if the data was successfully received.
|
||||
@time: the timestamp for this operation.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_protocol ##### -->
|
||||
<para>
|
||||
Finds out the DND protocol supported by a window.
|
||||
</para>
|
||||
|
||||
@xid:
|
||||
@protocol:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_protocol_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@xid:
|
||||
@protocol:
|
||||
@Returns:
|
||||
@xid: the X id of the destination window.
|
||||
@protocol: location where the supported DND protocol is returned.
|
||||
@Returns: the X id of the window where the drop should happen. This
|
||||
may be @xid or the X id of a proxy window, or None if @xid doesn't
|
||||
support Drag and Drop.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkDragProtocol ##### -->
|
||||
@@ -165,9 +179,10 @@ which DND is done.
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_unref ##### -->
|
||||
<para>
|
||||
Deprecated function; use g_object_unref() instead.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@context: a #GdkDragContext.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDragContext ##### -->
|
||||
@@ -206,10 +221,16 @@ should do with the dropped data.
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_status ##### -->
|
||||
<para>
|
||||
Selects one of the actions offered by the drag source.
|
||||
</para>
|
||||
<para>
|
||||
This function is called by the drag destination in response to
|
||||
gdk_drag_motion() called by the drag source.
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@action:
|
||||
@time_:
|
||||
@context: a #GdkDragContext.
|
||||
@action: the selected action which will be taken when a drop happens,
|
||||
or 0 to indicate that a drop will not be accepted.
|
||||
@time: the timestamp for this operation.
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Drawing Primitives
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for drawing points, lines, arcs, and text
|
||||
functions for drawing points, lines, arcs, and text.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -19,12 +19,6 @@ the number of arguments needed for each drawing operation. See the
|
||||
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
|
||||
more information.
|
||||
</para>
|
||||
<para id="pango-data-structures">
|
||||
Some of the drawing operations take Pango data structures like #PangoContext,
|
||||
#PangoLayout or #PangoLayoutLine as arguments. If you're using GTK+, the ususal
|
||||
way to obtain these structures is via gtk_widget_create_pango_context() or
|
||||
gtk_widget_create_pango_layout().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@@ -38,6 +32,7 @@ drawn onto. This can be a #GdkPixmap, a #GdkBitmap,
|
||||
or a #GdkWindow.
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_ref ##### -->
|
||||
<para>
|
||||
@@ -77,24 +72,6 @@ or a #GdkWindow.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_visual ##### -->
|
||||
<para>
|
||||
|
||||
@@ -161,74 +138,65 @@ or a #GdkWindow.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_point ##### -->
|
||||
<para>
|
||||
Draws a point, using the foreground color and other attributes of the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the point.
|
||||
@y: the y coordinate of the point.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_points ##### -->
|
||||
<para>
|
||||
Draws a number of points, using the foreground color and other attributes of
|
||||
the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@points:
|
||||
@npoints:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@points: an array of #GdkPoint structures.
|
||||
@npoints: the number of points to be drawn.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_line ##### -->
|
||||
<para>
|
||||
Draws a line, using the foreground color and other attributes of the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@x1_:
|
||||
@y1_:
|
||||
@x2_:
|
||||
@y2_:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@x1: the x coordinate of the start point.
|
||||
@y1: the y coordinate of the start point.
|
||||
@x2: the x coordinate of the end point.
|
||||
@y2: the y coordinate of the end point.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_lines ##### -->
|
||||
<para>
|
||||
Draws a series of lines connecting the given points.
|
||||
The way in which joins between lines are draw is determined by the
|
||||
#GdkCapStyle value in the #GdkGC. This can be set with
|
||||
gdk_gc_set_line_attributes().
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@points:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@points: an array of #GdkPoint structures specifying the endpoints of the
|
||||
lines.
|
||||
@npoints:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@pixbuf:
|
||||
@src_x:
|
||||
@src_y:
|
||||
@dest_x:
|
||||
@dest_y:
|
||||
@width:
|
||||
@height:
|
||||
@dither:
|
||||
@x_dither:
|
||||
@y_dither:
|
||||
@npoints: the size of the @points array.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_segments ##### -->
|
||||
<para>
|
||||
Draws a number of unconnected lines.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@segs:
|
||||
@nsegs:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@segs: an array of #GdkSegment structures specifying the start and end points
|
||||
of the lines to be drawn,
|
||||
@nsegs: the number of line segments to draw, i.e. the size of the @segs array.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkSegment ##### -->
|
||||
@@ -244,45 +212,60 @@ function.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rectangle ##### -->
|
||||
<para>
|
||||
Draws a rectangular outline or filled rectangle, using the foreground color
|
||||
and other attributes of the #GdkGC.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A rectangle drawn filled is 1 pixel smaller in both dimensions than a rectangle
|
||||
outlined. Calling <literal>gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20)</literal> results
|
||||
in a filled rectangle 20 pixels wide and 20 pixels high. Calling
|
||||
<literal>gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20)</literal> results in an outlined
|
||||
rectangle with corners at (0, 0), (0, 20), (20, 20), and (20, 0), which
|
||||
makes it 21 pixels wide and 21 pixels high.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@filled:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: %TRUE if the rectangle should be filled.
|
||||
@x: the x coordinate of the left edge of the rectangle.
|
||||
@y: the y coordinate of the top edge of the rectangle.
|
||||
@width: the width of the rectangle.
|
||||
@height: the height of the rectangle.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_arc ##### -->
|
||||
<para>
|
||||
Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
|
||||
rectangle of the entire ellipse, and the start and end angles of the part of
|
||||
the ellipse to be drawn.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@filled:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@angle1:
|
||||
@angle2:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: %TRUE if the arc should be filled, producing a 'pie slice'.
|
||||
@x: the x coordinate of the left edge of the bounding rectangle.
|
||||
@y: the y coordinate of the top edge of the bounding rectangle.
|
||||
@width: the width of the bounding rectangle.
|
||||
@height: the height of the bounding rectangle.
|
||||
@angle1: the start angle of the arc, relative to the 3 o'clock position,
|
||||
counter-clockwise, in 1/64ths of a degree.
|
||||
@angle2: the end angle of the arc, relative to @angle1, in 1/64ths of a degree.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_polygon ##### -->
|
||||
<para>
|
||||
Draws an outlined or filled polygon.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@filled:
|
||||
@points:
|
||||
@npoints:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: %TRUE if the polygon should be filled. The polygon is closed
|
||||
automatically, connecting the last point to the first point if necessary.
|
||||
@points: an array of #GdkPoint structures specifying the points making up the
|
||||
polygon.
|
||||
@npoints: the number of points.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_glyphs ##### -->
|
||||
@@ -352,40 +335,45 @@ function.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_string ##### -->
|
||||
<para>
|
||||
Draws a string of characters in the given font or fontset.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@font:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@string:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@string: the string of characters to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text ##### -->
|
||||
<para>
|
||||
Draws a number of characters in the given font or fontset.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@font:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@text:
|
||||
@text_length:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@text: the characters to draw.
|
||||
@text_length: the number of characters of @text to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text_wc ##### -->
|
||||
<para>
|
||||
Draws a number of wide characters using the given font of fontset.
|
||||
If the font is a 1-byte font, the string is converted into 1-byte characters
|
||||
(discarding the high bytes) before output.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@font:
|
||||
@gc:
|
||||
@x:
|
||||
@y:
|
||||
@text:
|
||||
@text_length:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@text: the wide characters to draw.
|
||||
@text_length: the number of characters to draw.
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_draw_pixmap ##### -->
|
||||
@@ -393,7 +381,18 @@ function.
|
||||
Draws a pixmap, or a part of a pixmap, onto another drawable.
|
||||
</para>
|
||||
|
||||
@Deprecated: Use gdk_draw_drawable() instead.
|
||||
<!-- # Unused Parameters # -->
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@src: the source #GdkPixmap to draw.
|
||||
@xsrc: the left edge of the source rectangle within @src.
|
||||
@ysrc: the top of the source rectangle within @src.
|
||||
@xdest: the x coordinate of the destination within @drawable.
|
||||
@ydest: the y coordinate of the destination within @drawable.
|
||||
@width: the width of the area to be copied, or -1 to make the area extend to
|
||||
the right edge of the source pixmap.
|
||||
@height: the height of the area to be copied, or -1 to make the area extend
|
||||
to the bottom edge of the source pixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_drawable ##### -->
|
||||
@@ -414,17 +413,21 @@ Draws a pixmap, or a part of a pixmap, onto another drawable.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_image ##### -->
|
||||
<para>
|
||||
Draws a #GdkImage onto a drawable.
|
||||
The depth of the #GdkImage must match the depth of the #GdkDrawable.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@gc:
|
||||
@image:
|
||||
@xsrc:
|
||||
@ysrc:
|
||||
@xdest:
|
||||
@ydest:
|
||||
@width:
|
||||
@height:
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@image: the #GdkImage to draw.
|
||||
@xsrc: the left edge of the source rectangle within @image.
|
||||
@ysrc: the top of the source rectangle within @image.
|
||||
@xdest: the x coordinate of the destination within @drawable.
|
||||
@ydest: the y coordinate of the destination within @drawable.
|
||||
@width: the width of the area to be copied, or -1 to make the area extend to
|
||||
the right edge of @image.
|
||||
@height: the height of the area to be copied, or -1 to make the area extend
|
||||
to the bottom edge of @image.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_image ##### -->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Event Structures
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Data structures specific to each type of event
|
||||
data structures specific to each type of event.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -91,17 +91,12 @@ Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@keyval: the key that was pressed or released. See the <filename><gdk/gdkkeysym.h></filename>
|
||||
header file for a complete list of GDK key codes.
|
||||
@length: the length of @string.
|
||||
@string: a string containing the an approximation of the text that
|
||||
would result from this keypress. The only correct way to handle text
|
||||
input of text is using input methods (see #GtkIMContext), so this
|
||||
field is deprecated and should never be used.
|
||||
(gdk_unicode_to_keyval() provides a non-deprecated way of getting
|
||||
an approximate translation for a key.) The string is encoded in the encoding
|
||||
of the current locale (Note: this for backwards compatibility:
|
||||
strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
|
||||
In some cases, the translation of the key code will be a single
|
||||
NUL byte, in which case looking at @length is necessary to distinguish
|
||||
it from the an empty translation.
|
||||
@string: a nul-terminated multi-byte string containing the composed characters
|
||||
resulting from the key press. When text is being input, in a #GtkEntry for
|
||||
example, it is these characters which should be added to the input buffer.
|
||||
When using <link linkend="gdk-Input-Methods">Input Methods</link> to support
|
||||
internationalized text input, the composed characters appear here after the
|
||||
pre-editing has been completed.
|
||||
@hardware_keycode: the raw code of the key that was pressed or released.
|
||||
@group: the keyboard group.
|
||||
|
||||
@@ -203,8 +198,7 @@ Generated when the pointer moves.
|
||||
the mouse.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@is_hint: set to 1 if this event is just a hint, see the %GDK_POINTER_MOTION_HINT_MASK
|
||||
value of #GdkEventMask.
|
||||
@is_hint:
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
@@ -472,9 +466,6 @@ Specifies the state of a toplevel window.
|
||||
@GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
|
||||
@GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
|
||||
@GDK_WINDOW_STATE_STICKY: the window is sticky.
|
||||
@GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without decorations.
|
||||
@GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
|
||||
@GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
|
||||
|
||||
<!-- ##### ENUM GdkSettingAction ##### -->
|
||||
<para>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Events
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling events from the window system
|
||||
functions for handling events from the window system.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -97,9 +97,8 @@ 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 %GDK_MOTION_NOTIFY
|
||||
events when the application asks for them, by calling gdk_window_get_pointer().
|
||||
</para>
|
||||
|
||||
@GDK_EXPOSURE_MASK:
|
||||
@@ -150,59 +149,71 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_pending ##### -->
|
||||
<para>
|
||||
Checks if any events are waiting to be processed.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: %TRUE if any events are pending.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_peek ##### -->
|
||||
<para>
|
||||
Gets a copy of the first #GdkEvent in the event queue.
|
||||
(Note that this function will not get more events from the X server.
|
||||
It only checks the events that have already been moved to the GDK event queue.)
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: a copy of the first #GdkEvent on the event queue, or %NULL if no
|
||||
events are in the queue. The returned #GdkEvent should be freed with
|
||||
gdk_event_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get ##### -->
|
||||
<para>
|
||||
Gets the next #GdkEvent to be processed, fetching events from the X server if
|
||||
necessary.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the next #GdkEvent to be processed, or %NULL if no events are pending.
|
||||
The returned #GdkEvent should be freed with gdk_event_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
|
||||
<para>
|
||||
Waits for a GraphicsExpose or NoExpose event from the X server.
|
||||
This is used in the #GtkText and #GtkCList widgets in GTK+ to make sure any
|
||||
GraphicsExpose events are handled before the widget is scrolled.
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
@window: the #GdkWindow to wait for the events for.
|
||||
@Returns: a #GdkEventExpose if a GraphicsExpose was received, or %NULL if a
|
||||
NoExpose event was received.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_put ##### -->
|
||||
<para>
|
||||
Appends a copy of the given event onto the front of the event queue.
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@Returns:
|
||||
@event: a #GdkEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_copy ##### -->
|
||||
<para>
|
||||
Copies a #GdkEvent, copying or incrementing the reference count of the
|
||||
resources associated with it (e.g. #GdkWindow's and strings).
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
@event: a #GdkEvent.
|
||||
@Returns: a copy of @event. The returned #GdkEvent should be freed with
|
||||
gdk_event_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_free ##### -->
|
||||
<para>
|
||||
Frees a #GdkEvent, freeing or decrementing any resources associated with it.
|
||||
Note that this function should only be called with events returned from
|
||||
gdk_event_peek(), gdk_event_get(), gdk_event_get_graphics_expose() and
|
||||
gdk_event_copy().
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
@@ -210,10 +221,12 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_time ##### -->
|
||||
<para>
|
||||
Gets the timestamp from a #GdkEvent.
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
@event: a #GdkEvent.
|
||||
@Returns: the timestamp from @event, or %GDK_CURRENT_TIME if the event has
|
||||
no timestamp.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_state ##### -->
|
||||
@@ -261,11 +274,17 @@ is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
|
||||
<para>
|
||||
Sets the function to call to handle all events from GDK.
|
||||
</para>
|
||||
<para>
|
||||
Note that GTK+ uses this to install its own event handler, so it is probably
|
||||
not useful for GTK+ applications.
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@data:
|
||||
@notify:
|
||||
@func: the function to call to handle events from GDK.
|
||||
@data: user data to pass to the function.
|
||||
@notify: the function to call when the handler function is removed, i.e. when
|
||||
gdk_event_handler_set() is called with another event handler.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
|
||||
@@ -281,82 +300,73 @@ gdk_event_handler_set().
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
|
||||
<para>
|
||||
Sends an X ClientMessage event to a given window.
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@winid:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@xid:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
|
||||
<para>
|
||||
|
||||
This could be used for communicating between different applications,
|
||||
though the amount of data is limited to 20 bytes.
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event:
|
||||
@winid:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@xid:
|
||||
@event: the #GdkEvent to send, which should be a #GdkEventClient.
|
||||
@xid: the window to send the X ClientMessage event to.
|
||||
@Returns: non-zero on success.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
|
||||
<para>
|
||||
Sends an X ClientMessage event to all toplevel windows.
|
||||
</para>
|
||||
<para>
|
||||
Toplevel windows are determined by checking for the WM_STATE property, as
|
||||
described in the Inter-Client Communication Conventions Manual (ICCCM).
|
||||
If no windows are found with the WM_STATE property set, the message is sent
|
||||
to all children of the root window.
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@event: the #GdkEvent to send, which should be a #GdkEventClient.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
|
||||
<para>
|
||||
Adds a filter to be called when X ClientMessage events are received.
|
||||
</para>
|
||||
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
@message_type: the type of ClientMessage events to receive. This will be
|
||||
checked against the <structfield>message_type</structfield> field of the
|
||||
XClientMessage event struct.
|
||||
@func: the function to call to process the event.
|
||||
@data: user data to pass to @func.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_show_events ##### -->
|
||||
<para>
|
||||
Returns non-zero if event debugging output is enabled.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: non-zero if event debugging output is enabled.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_show_events ##### -->
|
||||
<para>
|
||||
Sets whether event debugging information is output.
|
||||
Note that GTK+ must be compiled with debugging enabled, i.e. using the
|
||||
<option>--enable-debug</option> configure option.
|
||||
</para>
|
||||
|
||||
@show_events:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
@show_events: %TRUE to output event debugging information.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_setting_get ##### -->
|
||||
<para>
|
||||
Obtains a desktop-wide setting, such as the double-click time.
|
||||
</para>
|
||||
<para>
|
||||
FIXME needs a list of valid settings here, or a link to
|
||||
more information.
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@value:
|
||||
@Returns:
|
||||
@name: the name of the setting.
|
||||
@value: location to store the value of the setting.
|
||||
@Returns: %TRUE if the value has been successfully stored.
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Fonts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Loading and manipulating fonts
|
||||
loading and manipulating fonts
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -30,8 +30,8 @@ full description:
|
||||
<para>
|
||||
The fields in the XLFD are:
|
||||
|
||||
<informaltable pgwide="1" frame="none">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<informaltable pgwide=1 frame="none">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
@@ -287,38 +287,30 @@ are currently:
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_load ##### -->
|
||||
<para>
|
||||
Loads a font.
|
||||
</para>
|
||||
|
||||
@font_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_load_for_display ##### -->
|
||||
<para>
|
||||
|
||||
The font may be newly loaded or looked up the font in a cache.
|
||||
You should make no assumptions about the initial reference count.
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@font_name:
|
||||
@Returns:
|
||||
@font_name: a XLFD describing the font to load.
|
||||
@Returns: a #GdkFont, or %NULL if the font could not be loaded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_fontset_load ##### -->
|
||||
<para>
|
||||
Loads a fontset.
|
||||
</para>
|
||||
|
||||
@fontset_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_fontset_load_for_display ##### -->
|
||||
<para>
|
||||
|
||||
The fontset may be newly loaded or looked up in a cache.
|
||||
You should make no assumptions about the initial reference count.
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@fontset_name:
|
||||
@Returns:
|
||||
@fontset_name: a comma-separated list of XLFDs describing
|
||||
the component fonts of the fontset to load.
|
||||
@Returns: a #GdkFont, or %NULL if the fontset could not be loaded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_from_description ##### -->
|
||||
@@ -330,199 +322,246 @@ are currently:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_from_description_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@font_desc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_ref ##### -->
|
||||
<para>
|
||||
Increases the reference count of a font by one.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@Returns: @font
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_unref ##### -->
|
||||
<para>
|
||||
Decreases the reference count of a font by one.
|
||||
If the result is zero, destroys the font.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@font: a #GdkFont
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_id ##### -->
|
||||
<para>
|
||||
Returns the X Font ID for the given font.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@Returns:
|
||||
@font: a #GdkFont.
|
||||
@Returns: the numeric X Font ID
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_equal ##### -->
|
||||
<para>
|
||||
Compares two fonts for equality. Single fonts compare equal
|
||||
if they have the same X font ID. This operation does
|
||||
not currently work correctly for fontsets.
|
||||
</para>
|
||||
|
||||
@fonta:
|
||||
@fontb:
|
||||
@Returns:
|
||||
@fonta: a #GdkFont.
|
||||
@fontb: another #GdkFont.
|
||||
@Returns: %TRUE if the fonts are equal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_extents ##### -->
|
||||
<para>
|
||||
Returns the metrics of a nul-terminated string.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@lbearing:
|
||||
@rbearing:
|
||||
@width:
|
||||
@ascent:
|
||||
@descent:
|
||||
@font: a #GdkFont.
|
||||
@string: the nul-terminated string to measure.
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents ##### -->
|
||||
<para>
|
||||
Returns the metrics of a string.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@lbearing:
|
||||
@rbearing:
|
||||
@width:
|
||||
@ascent:
|
||||
@descent:
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure
|
||||
@text_length: the length of the text in bytes. (If the
|
||||
font is a 16-bit font, this is twice the length
|
||||
of the text in characters.)
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents_wc ##### -->
|
||||
<para>
|
||||
Returns the metrics of a string of wide characters.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@lbearing:
|
||||
@rbearing:
|
||||
@width:
|
||||
@ascent:
|
||||
@descent:
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in character.
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_width ##### -->
|
||||
<para>
|
||||
Determines the width of a nul-terminated string.
|
||||
(The distance from the origin of the string to the
|
||||
point where the next string in a sequence of strings
|
||||
should be drawn)
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@string: the nul-terminated string to measure
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width ##### -->
|
||||
<para>
|
||||
Determines the width of a given string.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width_wc ##### -->
|
||||
<para>
|
||||
Determines the width of a given wide-character string.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in characters.
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width ##### -->
|
||||
<para>
|
||||
Determines the width of a given character.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the width of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width_wc ##### -->
|
||||
<para>
|
||||
Determines the width of a given wide character. (Encoded
|
||||
in the wide-character encoding of the current locale).
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the width of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a nul-terminated string when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
See gdk_string_width().
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@string: the nul-terminated string to measure.
|
||||
@Returns: the right bearing of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a string when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
See gdk_text_width().
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the right bearing of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a character when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the right bearing of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given nul-terminated
|
||||
string. This value is not generally useful, because you
|
||||
cannot determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_string_extents().
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@string:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@string: the nul-terminated string to measure.
|
||||
@Returns: the height of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given string.
|
||||
This value is not generally useful, because you cannot
|
||||
determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_text_extents().
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@text:
|
||||
@text_length:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the height of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given character.
|
||||
This value is not generally useful, because you cannot
|
||||
determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_text_extents().
|
||||
</para>
|
||||
|
||||
@font:
|
||||
@character:
|
||||
@Returns:
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the height of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
|
||||
<para>
|
||||
Returns a comma-separated list of XLFDs for the
|
||||
fonts making up a given #GdkFont.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@Returns: a newly-allocated string containing a list of XLFDs,
|
||||
should be freed with gdk_font_full_name_free() when no longer needed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
|
||||
<para>
|
||||
Frees a full font name obtained from gdk_font_full_name_get().
|
||||
</para>
|
||||
|
||||
@name: a full font name.
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkWChar ##### -->
|
||||
@@ -562,19 +601,28 @@ for more detailed information on wide and multi-byte characters.
|
||||
|
||||
<!-- ##### FUNCTION gdk_wcstombs ##### -->
|
||||
<para>
|
||||
Converts a wide character string to a multi-byte string.
|
||||
(The function name comes from an acronym of 'Wide Character String TO
|
||||
Multi-Byte String').
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@Returns:
|
||||
@src: a wide character string.
|
||||
@Returns: the multi-byte string corresponding to @src, or %NULL if the
|
||||
conversion failed. The returned string should be freed with g_free() when no
|
||||
longer needed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_mbstowcs ##### -->
|
||||
<para>
|
||||
Converts a multi-byte string to a wide character string.
|
||||
(The function name comes from an acronym of 'Multi-Byte String TO Wide
|
||||
Character String').
|
||||
</para>
|
||||
|
||||
@dest:
|
||||
@src:
|
||||
@dest_max:
|
||||
@Returns:
|
||||
@dest: the space to place the converted wide character string into.
|
||||
@src: the multi-byte string to convert, which must be nul-terminated.
|
||||
@dest_max: the maximum number of wide characters to place in @dest.
|
||||
@Returns: the number of wide characters written into @dest, or -1 if the
|
||||
conversion failed.
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Graphics Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Objects to encapsulate drawing properties
|
||||
objects to encapsulate drawing properties.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -37,6 +37,12 @@ It is an opaque structure with no user-visible
|
||||
elements.
|
||||
</para>
|
||||
|
||||
@parent_instance:
|
||||
@clip_x_origin:
|
||||
@clip_y_origin:
|
||||
@ts_x_origin:
|
||||
@ts_y_origin:
|
||||
@colormap:
|
||||
|
||||
<!-- ##### STRUCT GdkGCValues ##### -->
|
||||
<para>
|
||||
@@ -138,15 +144,6 @@ Create a new GC with the given initial values.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gc:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_ref ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -596,31 +596,6 @@ status information, so the application does not need to do anything.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_sm_client_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@sm_client_id:
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
|
||||
<para>
|
||||
Frees a full font name obtained from gdk_font_full_name_get().
|
||||
</para>
|
||||
|
||||
@name: a full font name.
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
|
||||
<para>
|
||||
Returns a comma-separated list of XLFDs for the
|
||||
fonts making up a given #GdkFont.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@Returns: a newly-allocated string containing a list of XLFDs,
|
||||
should be freed with gdk_font_full_name_free() when no longer needed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_client_window ##### -->
|
||||
<para>
|
||||
|
||||
@@ -630,20 +605,6 @@ fonts making up a given #GdkFont.
|
||||
@win:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
|
||||
<para>
|
||||
Destroys the given #GdkICAttr struct, freeing the allocated memory.
|
||||
@@ -839,7 +800,7 @@ Sets the key event generated when a macro button is pressed.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@index_: the index of the macro button.
|
||||
@index: the index of the macro button.
|
||||
@keyval: the key value for the #GdkKeypressEvent to generate.
|
||||
(a value of 0 means no event will be generated.)
|
||||
@modifiers: the modifier field for the generated
|
||||
@@ -887,14 +848,6 @@ they will be ignored.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_open_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### VARIABLE gdk_progclass ##### -->
|
||||
<para>
|
||||
|
||||
@@ -907,50 +860,9 @@ they will be ignored.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_use_virtual_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### VARIABLE gdk_selection_property ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
<!-- ##### FUNCTION gdkx_visual_get_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@xvisualid:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -1,308 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkDisplay
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkDisplay objects purpose are two fold:
|
||||
<itemizedlist>
|
||||
<listitem><para>To grab/ungrab keyboard focus and mouse pointer</para></listitem>
|
||||
<listitem><para>To manage and provide information about the #GdkScreen(s)
|
||||
available for this #GdkDisplay
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
#GdkDisplay objects are the GDK representation of the X Display which can be
|
||||
described as <emphasis>a workstation consisting of a keyboard a pointing
|
||||
device (such as a mouse) and one or more screens</emphasis>.
|
||||
It is used to open and keep track of various #GdkScreen objects currently
|
||||
instanciated by the application. It is also used to grab and release the keyboard
|
||||
and the mouse pointer.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkDisplay ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplay</structname> struct is the GDK representation
|
||||
of an X display. All its fields are private and should not be accessed directly.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplay::closed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplay: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_open ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_n_screens ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_beep ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_sync ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_flush ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_list_devices ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_peek_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_put_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_add_client_message_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_double_click_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@msec:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayPointerHooks ##### -->
|
||||
<para>
|
||||
A table of pointers to functions for getting quantities related to
|
||||
the current pointer position. Each #GdkDisplay has a table of this type,
|
||||
which can be set using gdk_display_set_pointer_hooks().
|
||||
</para>
|
||||
<para>
|
||||
This is only useful for such low-level tools as an event recorder.
|
||||
Applications should never have any reason to use this facility
|
||||
</para>
|
||||
|
||||
@get_pointer: Obtains the current pointer position and modifier state.
|
||||
The position is given in coordinates relative to the window containing
|
||||
the pointer, which is returned in @window.
|
||||
@window_get_pointer: Obtains the window underneath the mouse pointer.
|
||||
Current pointer position and modifier state are returned in @x, @y and
|
||||
@mask. The position is given in coordinates relative to @window.
|
||||
@window_at_pointer: Obtains the window underneath the mouse pointer,
|
||||
returning the location of that window in @win_x, @win_y. Returns %NULL
|
||||
if the window under the mouse pointer is not known to GDK (for example,
|
||||
belongs to another application).
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_pointer_hooks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@new_hooks:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_cursor_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_maximal_cursor_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkDisplayManager
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Maintains a list of all open <type>GdkDisplay</type>s
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The purpose of the #GdkDisplayManager singleton object is to offer
|
||||
notification when displays appear or disappear or the default display
|
||||
changes.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayManager ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplayManager</structname> struct has no interesting
|
||||
fields.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplayManager::display-opened ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplaymanager: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### ARG GdkDisplayManager:default-display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_get_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_set_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_list_displays ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_core_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkScreen
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Object representing a physical screen
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkScreen objects are the GDK representation of a physical screen. It is used
|
||||
throughout GDK and GTK+ to specify which screen the top level windows
|
||||
are to be displayed on.
|
||||
It is also used to query the screen specification and default settings such as
|
||||
the default colormap (gdk_screen_get_default_colormap()),
|
||||
the screen width (gdk_screen_get_width()), etc.
|
||||
</para>
|
||||
<para>Note that a screen may consist of multiple monitors which are merged to
|
||||
form a large screen area.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkScreen ##### -->
|
||||
<para>
|
||||
This is a currently just a placeholder typedef for the first argument of
|
||||
the @window_at_pointer function in #GdkPointerHooks. It will be used
|
||||
when GDK gets multihead support.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::size-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_default_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_default_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@colormap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgb_colormap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgb_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_root_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_number ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_width_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_height_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_list_visuals ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_toplevel_windows ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_make_display_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_n_monitors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_geometry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@dest:
|
||||
<!-- # Unused Parameters # -->
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_at_point ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_at_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@window:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@anid:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_broadcast_client_message ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_setting ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@name:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
General
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Library initialization and miscellaneous functions
|
||||
library initialization and miscellaneous functions.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -53,23 +53,6 @@ by GTK+ applications.
|
||||
@Returns: %TRUE if initialization succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_parse_args ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display_arg_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_locale ##### -->
|
||||
<para>
|
||||
Initializes the support for internationalization by calling the <function>setlocale()</function>
|
||||
@@ -96,9 +79,24 @@ locale.
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
|
||||
<para>
|
||||
Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window so that
|
||||
the window manager can save the application's state using the X11R6 ICCCM
|
||||
session management protocol.
|
||||
</para>
|
||||
<para>
|
||||
The leader window is automatically created by GDK and never shown. It's only
|
||||
use is for session management. The <literal>WM_CLIENT_LEADER</literal> property is automatically
|
||||
set on all X windows created by the application to point to the leader window.
|
||||
</para>
|
||||
<para>
|
||||
See the X Session Management Library documentation for more information on
|
||||
session management and the Inter-Client Communication Conventions Manual
|
||||
(ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
|
||||
(Both documents are part of the X Window System distribution.)
|
||||
</para>
|
||||
|
||||
@sm_client_id:
|
||||
@sm_client_id: the client id assigned by the session manager when the
|
||||
connection was opened, or %NULL to remove the property.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_exit ##### -->
|
||||
@@ -115,13 +113,6 @@ of g_atexit()).
|
||||
@error_code: the error code to pass to the <function>exit()</function> call.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_notify_startup_complete ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_program_class ##### -->
|
||||
<para>
|
||||
Gets the program class. Unless the program class has explicitly
|
||||
@@ -163,30 +154,38 @@ trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width ##### -->
|
||||
<para>
|
||||
Returns the width of the screen in pixels.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the width of the screen in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height ##### -->
|
||||
<para>
|
||||
Returns the height of the screen in pixels.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the height of the screen in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
|
||||
<para>
|
||||
Returns the width of the screen in millimeters.
|
||||
Note that on many X servers this value will not be correct.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the width of the screen in millimeters, though it is not always
|
||||
correct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
|
||||
<para>
|
||||
Returns the height of the screen in millimeters.
|
||||
Note that on many X servers this value will not be correct.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: the height of the screen in millimeters, though it is not always
|
||||
correct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
|
||||
@@ -228,7 +227,7 @@ and leave events will be generated as necessary.
|
||||
@cursor: the cursor to display while the grab is active. If this is %NULL then
|
||||
the normal cursors are used for @window and its descendants, and the cursor
|
||||
for @window is used for all other windows.
|
||||
@time_: the timestamp of the event which led to this pointer grab. This usually
|
||||
@time: the timestamp of the event which led to this pointer grab. This usually
|
||||
comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if
|
||||
the time isn't known.
|
||||
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
||||
@@ -250,19 +249,26 @@ success or the reason for the failure of the grab attempt.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
Ungrabs the pointer, if it is grabbed by this application.
|
||||
</para>
|
||||
|
||||
@time_:
|
||||
@time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
Returns %TRUE if the pointer is currently grabbed by this application.
|
||||
</para>
|
||||
<para>
|
||||
Note that the return value is not completely reliable since the X server may
|
||||
automatically ungrab the pointer, without informing the application, if the
|
||||
grab window becomes unviewable. It also does not take passive pointer grabs
|
||||
into account.
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
@Returns: %TRUE if the pointer is currently grabbed by this application.
|
||||
Though this value is not always correct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_double_click_time ##### -->
|
||||
@@ -286,20 +292,23 @@ This overrides any previous keyboard grab by this client.
|
||||
normal, but keyboard events outside this application are reported with respect
|
||||
to @window. Both key press and key release events are always reported,
|
||||
independant of the event mask set by the application.
|
||||
@time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
@time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
Ungrabs the keyboard, if it is grabbed by this application.
|
||||
</para>
|
||||
|
||||
@time_:
|
||||
@time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_beep ##### -->
|
||||
<para>
|
||||
Emits a short beep.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -337,16 +346,16 @@ of exiting the application. It should only be used if it is not possible to
|
||||
avoid the X error in any other way.
|
||||
</para>
|
||||
<example>
|
||||
<title>Trapping an X error</title>
|
||||
<title>Trapping an X error.</title>
|
||||
<programlisting>
|
||||
gdk_error_trap_push (<!-- -->);
|
||||
gdk_error_trap_push (<!>);
|
||||
|
||||
/* ... Call the X function which may cause an error here ... */
|
||||
|
||||
/* Flush the X queue to catch errors now. */
|
||||
gdk_flush (<!-- -->);
|
||||
gdk_flush (<!>);
|
||||
|
||||
if (gdk_error_trap_pop (<!-- -->))
|
||||
if (gdk_error_trap_pop (<!>))
|
||||
{
|
||||
/* ... Handle the error here ... */
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Images
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A client-side area for bit-mapped graphics
|
||||
an area for bit-mapped graphics stored on the X Windows client.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -105,25 +105,32 @@ and if that fails then %GDK_IMAGE_NORMAL will be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new_bitmap ##### -->
|
||||
<para>
|
||||
Creates a new #GdkImage with a depth of 1 from the given data.
|
||||
<warning><para>THIS FUNCTION IS INCREDIBLY BROKEN. The passed-in data must
|
||||
be allocated by malloc() (NOT g_malloc()) and will be freed when the
|
||||
image is freed.</para></warning>
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@data:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
@visual: the #GdkVisual to use for the image.
|
||||
@data: the pixel data.
|
||||
@width: the width of the image in pixels.
|
||||
@height: the height of the image in pixels.
|
||||
@Returns: a new #GdkImage.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get ##### -->
|
||||
<para>
|
||||
Gets part of a #GdkWindow and stores it in a new #GdkImage.
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
@x: the left edge of the rectangle to copy from @window.
|
||||
@y: the top edge of the rectangle to copy from @window.
|
||||
@width: the width of the area to copy, in pixels.
|
||||
@height: the height of the area to copy, in pixels.
|
||||
@Returns: a new #GdkImage with a copy of the given area of @window.
|
||||
<!-- # Unused Parameters # -->
|
||||
@window: the #GdkWindow to copy from.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_ref ##### -->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Input
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Callbacks on file descriptors
|
||||
Callbacks on file descriptors.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
@@ -55,8 +55,8 @@ of this enumeration correspond to the @readfds,
|
||||
@writefds, and @exceptfds arguments to the
|
||||
<function>select</function> system call.
|
||||
|
||||
<informaltable pgwide="1" frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user