forked from AuroraMiddleware/gtk
Merge branch 'master' into broadway2
Doesn't build, but fixed up actual conflicts Conflicts: configure.ac gdk/Makefile.am gtk/Makefile.am
This commit is contained in:
commit
920e8b4343
62
Makefile.am
62
Makefile.am
@ -47,47 +47,45 @@ MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/install-sh \
|
||||
$(srcdir)/ltmain.sh \
|
||||
$(srcdir)/missing \
|
||||
$(srcdir)/mkinstalldirs \
|
||||
$(srcdir)/omf.make \
|
||||
$(srcdir)/xmldocs.make \
|
||||
$(srcdir)/gtk-doc.make \
|
||||
$(srcdir)/ChangeLog \
|
||||
`find "$(srcdir)" -type f -name Makefile.in -print`
|
||||
|
||||
GDKTARGET=@gdktarget@
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-$(GDKTARGET)-3.0.pc: gtk+-3.0.pc
|
||||
rm -f gtk+-$(GDKTARGET)-3.0.pc && \
|
||||
cp gtk+-3.0.pc gtk+-$(GDKTARGET)-3.0.pc
|
||||
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc: gtk+-3.0.pc
|
||||
rm -f $@ && \
|
||||
cp gtk+-3.0.pc $@
|
||||
|
||||
gdk-$(GDKTARGET)-3.0.pc: gdk-3.0.pc
|
||||
rm -f gdk-$(GDKTARGET)-3.0.pc && \
|
||||
cp gdk-3.0.pc gdk-$(GDKTARGET)-3.0.pc
|
||||
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc: gdk-3.0.pc
|
||||
rm -f $@ && \
|
||||
cp gdk-3.0.pc $@
|
||||
|
||||
gtk+-$(GDKTARGET)-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
|
||||
rm -f gtk+-$(GDKTARGET)-3.0-uninstalled.pc && \
|
||||
cp gtk+-3.0-uninstalled.pc gtk+-$(GDKTARGET)-3.0-uninstalled.pc
|
||||
|
||||
gdk-$(GDKTARGET)-3.0-uninstalled.pc: gdk-3.0-uninstalled.pc
|
||||
rm -f gdk-$(GDKTARGET)-3.0-uninstalled.pc && \
|
||||
cp gdk-3.0-uninstalled.pc gdk-$(GDKTARGET)-3.0-uninstalled.pc
|
||||
gtk+-*-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
|
||||
rm -f $@ && \
|
||||
cp gtk+-3.0-uninstalled.pc $@
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-$(GDKTARGET)-3.0.pc gtk+-$(GDKTARGET)-3.0.pc gail-3.0.pc
|
||||
pkgconfig_DATA = gdk-3.0.pc gtk+-3.0.pc gail-3.0.pc
|
||||
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gtk+-%-3.0.pc}
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gdk-%-3.0.pc}
|
||||
|
||||
if OS_UNIX
|
||||
pkgconfig_DATA += gtk+-unix-print-3.0.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES = \
|
||||
gtk+-unix-print-3.0.pc \
|
||||
gtk+-$(GDKTARGET)-3.0.pc \
|
||||
gdk-$(GDKTARGET)-3.0.pc \
|
||||
gail-3.0.pc \
|
||||
gtk+-$(GDKTARGET)-3.0-uninstalled.pc \
|
||||
gdk-$(GDKTARGET)-3.0-uninstalled.pc \
|
||||
gail-3.0-uninstalled.pc \
|
||||
DISTCLEANFILES = \
|
||||
gtk+-unix-print-3.0.pc \
|
||||
gtk+-3.0.pc \
|
||||
gtk+-x11-3.0.pc \
|
||||
gdk-3.0.pc \
|
||||
gdk-x11-3.0.pc \
|
||||
gail-3.0.pc \
|
||||
gtk+-3.0-uninstalled.pc \
|
||||
gail-3.0-uninstalled.pc \
|
||||
config.lt
|
||||
|
||||
distclean-local:
|
||||
@ -96,8 +94,7 @@ distclean-local:
|
||||
fi
|
||||
|
||||
ChangeLog:
|
||||
@echo Creating $@
|
||||
@if test -d "$(srcdir)/.git"; then \
|
||||
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
|
||||
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log GTK_2_16_0^^.. --stat) | fmt --split-only > $@.tmp \
|
||||
&& mv -f $@.tmp $@ \
|
||||
|| ($(RM) $@.tmp; \
|
||||
@ -109,20 +106,7 @@ ChangeLog:
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
|
||||
## copy the default target for this platform to gdk-3.0.pc and gtk+-3.0.pc
|
||||
DEFAULT_GDKTARGET=x11
|
||||
install-data-hook:
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
test -f gdk-$(DEFAULT_GDKTARGET)-3.0.pc && \
|
||||
test -f gtk+-$(DEFAULT_GDKTARGET)-3.0.pc && \
|
||||
rm -f gdk-3.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-3.0.pc gdk-3.0.pc && \
|
||||
rm -f gtk+-3.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-3.0.pc gtk+-3.0.pc) || \
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
rm -f gdk-3.0.pc && cp -f gdk-$(GDKTARGET)-3.0.pc gdk-3.0.pc && \
|
||||
rm -f gtk+-3.0.pc && cp -f gtk+-$(GDKTARGET)-3.0.pc gtk+-3.0.pc)
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gdk-3.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
|
||||
|
||||
dist-hook:
|
||||
|
@ -17,9 +17,15 @@ XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \
|
||||
1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 \
|
||||
9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 \
|
||||
9995 9996 9997 9998 9999
|
||||
|
||||
if USE_X11
|
||||
SKIP_GDKTARGET = \
|
||||
test "$(gdktarget)" != "x11" \
|
||||
&& echo "Gtk+Tests:INFO: Skipping GUI tests for non-X11 target."
|
||||
false
|
||||
else
|
||||
SKIP_GDKTARGET = \
|
||||
echo "Gtk+Tests:INFO: Skipping GUI tests for non-X11 target."
|
||||
endif
|
||||
|
||||
XVFB_START = \
|
||||
${XVFB} -help 2>/dev/null 1>&2 \
|
||||
&& XID=`for id in $(XIDS) ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \
|
||||
|
293
NEWS
293
NEWS
@ -1,3 +1,296 @@
|
||||
Overview of Changes in GTK+ 2.99.2
|
||||
==================================
|
||||
|
||||
* More widget are using GtkStyleContext directly:
|
||||
GtkToolItemGroup, GtkMenuItem, GtkImageMenuItem, GtkMenu,
|
||||
GtkTearoffMenuItem, GtkCheckMenuItem, GtkMenuShell
|
||||
|
||||
* gtk-builder-convert now accepts a --target-version option
|
||||
|
||||
* Bug fixes:
|
||||
637965 GtkTreeCellDataFunc called with a wrong column arguments
|
||||
639127 Misc Win32 GDK building problems
|
||||
639157 GtkOrientable should add/remove "horizontal" and "vert...
|
||||
639209 Allow toggling the GtkSwitch by clicking the handle
|
||||
639286 include gtk/gtktextattributes.h not installed
|
||||
639327 gtk-builder-convert needs to convert gtkcomboboxentry...
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Basque
|
||||
Hebrew
|
||||
|
||||
Overview of Changes from GTK+ 2.99.0 to 2.99.1
|
||||
==============================================
|
||||
|
||||
* More widgets are using GtkStyleContext directly:
|
||||
GtkColorButton, GtkColorSelection, GtkHSV,
|
||||
GtkFontSelection, GtkPrintUnixDialog, GtkImage,
|
||||
GtkLayout, GtkViewport, GtkTextDisplay, GtkTextUtil,
|
||||
GtkCalendar
|
||||
|
||||
* GtkBuilder support has been added for setting menus
|
||||
on GtkMenuToolButtons and for adding tags to
|
||||
GtkTextTagTable as well as adding items to
|
||||
GtkComboBoxText
|
||||
|
||||
* Bug fixes:
|
||||
350618 start rubber banding on "white space"
|
||||
612918 Support disabling X11 extensions
|
||||
635687 problem with pygtk or gtk with gtk.Plug and gtk.Socket...
|
||||
638017 GtkTextView: Crash in gtk_text_view_set_tabs()
|
||||
638119 GtkSpinner animation not correctly stopped...
|
||||
638880 Need a setter for has_user_ref_count
|
||||
639030 Small cleanup in gailtextview code.
|
||||
639047 Fix remaining usage of g[dk]ktargetlib.
|
||||
639079 Obtain the fg color from the renderer
|
||||
639105 Port GtkTextDisplay to StyleContext.
|
||||
639106 New CSS style misses distinction between "selected focused"...
|
||||
639127 Misc Win32 GDK building problems
|
||||
639157 GtkOrientable should add/ remove "horizontal" and "vertical"...
|
||||
|
||||
* Translation updates:
|
||||
British English
|
||||
Galician
|
||||
Hebrew
|
||||
Indonesian
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.7 to 2.99.0
|
||||
==============================================
|
||||
|
||||
* Deprecations and removals:
|
||||
- Long-obsolete linuxfb-related GtkWindow APIs have been dropped
|
||||
- All remaining G_SEALed struct members have been removed
|
||||
- GtkThemeEngine has been removed
|
||||
- gdk_display_get_window_at_device_position() has been renamed to
|
||||
gdk_device_get_window_at_position()
|
||||
- gdk_display_get_device_state() has been renamed to
|
||||
gdk_device_get_position()
|
||||
- gdk_device_set_source() has been dropped
|
||||
- gdk_set_pointer_hooks(), gdk_display_set_pointer_hooks() and
|
||||
gdk_display_set_device_hooks() have been removed
|
||||
- The deprecated GtkNotebook:tab-pack child property has been removed
|
||||
- The deprecated gtk_quit_add() functions have been removed
|
||||
- The GtkRange update-policy facility has been removed
|
||||
|
||||
* The gtk-update-icon-cache and gtk-builder-convert utilities have
|
||||
been renamed back to their un-suffixed names. Distributions will
|
||||
have to resolve the conflict between GTK+ 2.x and 3.0 packages
|
||||
by dropping one set of the utilities and adding a dependency.
|
||||
|
||||
* It is now possible to include multiple GDK backends in a single
|
||||
library. The --with-gdk-backend option has been split into separate
|
||||
--enable-{x11,win32,quartz}-backend options.
|
||||
|
||||
* The GDK Quartz backend has been ported to the new GDK backend API
|
||||
|
||||
* A number of widgets have been ported to use GtkStyleContext directly:
|
||||
GtkAccelLabel, GtkArrow, GtkSeparator, GtkSpinButton, GtkMessageDialog,
|
||||
GtkFrame, GtkEventBox, GtkScrolledWindow, GtkProgressBar, GtkEntry,
|
||||
GtkFileChooserEntry, GtkSwitch, GtkHandleBox, GtkToolbar, GtkFixed,
|
||||
GtkToolPalette, GtkAboutDialog, GtkAssistant, GtkTrayIcon, GtkPaned,
|
||||
GtkToolButton, GtkSocket, GtkRecentChooser, GtkTooltip, GtkPathBar,
|
||||
GtkWin32EmbedWidget, GtkCellView, GtkDialog, GtkDrawingArea, GtkPlug,
|
||||
GtkEntryCompletion, GtkFileChooserButton, GtkFileChooser, GtkHandleBox,
|
||||
GtkLinkButton, GtkOffscreenWindow
|
||||
|
||||
* Various problems with width-for-height geometry management have been
|
||||
fixed in GtkAlignment, GtkCheckButton, GtkBin
|
||||
|
||||
* The GtkComboBox, GtkIconView and GtkCellView widgets have been ported
|
||||
to use GtkCellArea for their cell layouts
|
||||
|
||||
* The cups print backend can now send print jobs directly in PDF if
|
||||
cups supports it
|
||||
|
||||
* GtkNumerableIcon is a variant of GEmblemedIcon for using numbers
|
||||
as emblems
|
||||
|
||||
* Bugs fixed:
|
||||
144324 Leaking dnd contexts with XDnD
|
||||
165987 unsets DESKTOP_STARTUP_ID
|
||||
307963 GtkSpinButton clamps value with the wrong maximum.
|
||||
321958 gtk.Calendar Notes should also say the format of year
|
||||
533745 Segfault on gdk.DragContext.drag_get_selection()
|
||||
553404 Out-of-date comment in gtk_text_view_add_child_in_window()
|
||||
559503 Description should mention gregorian
|
||||
560177 Applications should send print jobs to CUPS in PDF format...
|
||||
562182 gtk_init() docs inaccurate
|
||||
599130 Ending a drag using space or enter doesn't always cause a...
|
||||
617312 Move documentation to inline comments: GtkDialog
|
||||
617315 Move documentation to inline comments: GtkDrawingArea
|
||||
617322 Move documentation to inline comments: GtkEntryCompletion
|
||||
617327 Move documentation to inline comments: GtkExpander
|
||||
617471 Migrate API docs from templates to source files...
|
||||
621720 Use $(AM_V_GEN) to silent the build a bit.
|
||||
622125 Note that gtk_show_uri needs gvfs to spawn URLs
|
||||
629955 Deprecate/remove gtk_main and gtk_init_add/remove* API
|
||||
633795 gdk_event_get_state wrongly extracts GDK_PROPERTY_NOTIFY...
|
||||
634711 Xlib warning when RANDR is missing
|
||||
635299 add gtk_selection_data_get_data_with_length API...
|
||||
637691 Eating events breaks proxied DND
|
||||
637721 gtk 2.91.6 issue with gtkcellrendererprogress
|
||||
637736 [GtkAboutDialog] Newlines are ignored in translator-credits
|
||||
637763 [GtkAboutDialog] no longer display contact link
|
||||
637834 gtk_widget_verify_invariants: relax toplevel checks
|
||||
637849 Shell segfaults when unicode characters after U+00FF...
|
||||
637895 gdk_pointer_grab() deprecated comment is not helpful enough
|
||||
637907 gtkwindow.h includes a private header
|
||||
637910 GtkSpinner - does not animate
|
||||
637958 print dialog doesn't fit on netbook screen size
|
||||
637974 Gtk+ 2.91.7 build of introspection fails
|
||||
638179 in draw signal handle call gtk_style_context_add_provider...
|
||||
638193 GtkSpinButton documentation out of date
|
||||
638231 GtkSwitch states translation
|
||||
638386 gdk_x11_display_init_input careless
|
||||
638580 'application' window's property released too late
|
||||
638608 gtkenums: add GTK_STATE_FLAG_NORMAL = 0
|
||||
|
||||
* Updated translations:
|
||||
Estonian
|
||||
Kurdish
|
||||
Norwegian bokmål
|
||||
Punjabi
|
||||
Spanish
|
||||
Swedish
|
||||
Uighur
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.6 to 2.91.7
|
||||
==============================================
|
||||
|
||||
* The treeview-refactor branch has been merged, bringing more
|
||||
flexible cell arrangement with GtkCellArea, GtkCellAreaBox, etc
|
||||
|
||||
* The gdk-backend branch has been merged. This branch cleans up the
|
||||
internal frontend/backend separation in GDK, with the ultimate goal
|
||||
of allowing to build a single gdk library that contains multiple
|
||||
backends (interesting combinations are x11+wayland or quartz+x11).
|
||||
|
||||
For now, GDK is still restricted to a single backend, but
|
||||
as a first step, the libraries no longer include the backend name
|
||||
in their soname, but are just libgdk-3.0.so and libgtk-3.0.so.
|
||||
|
||||
Only the x11 backend has been kept up to date with this cleanup
|
||||
work, other backends are broken in this release.
|
||||
|
||||
* Deprecations and removals:
|
||||
- G_SEALed struct members have been removed from GtkWindowGroup,
|
||||
GtkDrawingArea, GtkTreeStore, GtkTreeModelSort, GtkTreeSelection,
|
||||
GtkSocket, GtkPrintJob, GtkSelectionData
|
||||
- Input device handling:
|
||||
- gdk_display_list_devices, gdk_display_get_core_pointer,
|
||||
gdk_input_set_extension_events, gtk_widget_set_extension_events,
|
||||
gdk_devices_list have been removed
|
||||
- gdk_display_warp_device has been replaced by gdk_device_warp
|
||||
- gdk_enable_multidevice has been replaced by gdk_disable_multidevice
|
||||
- Drag-and-Drop:
|
||||
gdk_drag_context_new, gdk_drag_find_window and gdk_drag_get_protocol
|
||||
have been removed
|
||||
- Property handling:
|
||||
Functions that deal with X11-specific encodings such as Compound Text
|
||||
have been moved to backend-specific API:
|
||||
gdk_string_to_compound_text[_for_display],
|
||||
gdk_utf8_to_compound_text[_for_display], gdk_free_compound_text,
|
||||
gdk_text_property_to_text_list[_for_display], gdk_free_text_list,
|
||||
gdk_text_property_to_utf8_list
|
||||
- Foreign windows:
|
||||
Functions for dealing with GdkWindow wrappers around foreign
|
||||
windows have been moved to backend-specific API.
|
||||
- Application launching:
|
||||
The gdk_spawn_* APIs have been removed, since they were trivial
|
||||
wrappers around g_spawn_* on most platforms and can be replaced
|
||||
by GIO GAppInfo APIs.
|
||||
- Misc. other functions: gdk_net_wm_supports, gdk_set_locale,
|
||||
gdkx_visual_get have been either removed, gdk_set_sm_client_id
|
||||
has been moved to backend-specific API.
|
||||
|
||||
* A number of GTK+ widgets have been ported to use GtkStyleContext
|
||||
directly for rendering
|
||||
|
||||
* The tracker search backend for the file chooser has been updated
|
||||
to work with libtracker-sparql as available in tracker >= 0.9
|
||||
|
||||
* The GtkAboutDialog has been given a facelift. It no longer
|
||||
opens second-level dialogs
|
||||
|
||||
* The GDK X11 backend now uses XI2 (including multi-device capabilities)
|
||||
by default. Use gdk_disable_multidevice() to switch back to the
|
||||
XI1/Core implementation
|
||||
|
||||
* Bug fixes:
|
||||
629923 Consider always calling unmap() when unsetting MAPPED flag
|
||||
634657 Dynamically attached calendar does not respond to mouse clicks
|
||||
635401 Setting conflict warning does not disappear when conflict is fixed
|
||||
636732 Gtk+ fails to build
|
||||
636777 Leak in gtk_css_provider_get_named
|
||||
637018 Add checks for id-column/entry-text-column >= 0
|
||||
637069 Custom print settings set in custom-widget-apply are lost
|
||||
637155 Remove vestiges of support for themes using XSHAPE
|
||||
637156 Optimize gtk_widget_shape_combine_region (widget, NULL, ...)
|
||||
637189 gtk_cell_renderer_spin_start_editing uses g_ascii_strtod but...
|
||||
637243 docs: fix link failure on gtk-doc scanner binaries
|
||||
637256 gtkstylecontext: fix typos in annotations
|
||||
637464 Fix GdkWindowFilter internal refcounting
|
||||
637471 GTK2_RC_FILES should be renamed to GTK3_RC_FILES
|
||||
637520 Gtk+ seems to have broken Mutter
|
||||
637606 Missing out annotations for gtk_accelerator_parse and...
|
||||
637608 Problems with the new AboutDialog
|
||||
|
||||
* Translation updates:
|
||||
Estonian
|
||||
Hebrew
|
||||
Kazakh
|
||||
Norwegian bokmål
|
||||
Persian
|
||||
Spanish
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.5 to 2.91.6
|
||||
==============================================
|
||||
|
||||
* Deprecations, cleanups and API changes:
|
||||
- GdkDrawable and some X11-specific APIs have been removed
|
||||
- GtkStyle and GtkRcStyle have been deprecated
|
||||
- The GdkWindowClass enumeration is now GdkWindowWindowClass
|
||||
- gdk_window_get_geometry lost its depth argument
|
||||
- The old, unused gtk_decorated_window_... functions have
|
||||
been removed.
|
||||
|
||||
* GtkComboBox has gained an 'active id' property that is
|
||||
intended for easy binding to settings
|
||||
|
||||
* GtkAppChooser: A new family of widgets that allow choosing
|
||||
an application to open a file. This is strongly based on
|
||||
the corresponding nautilus dialog, which it is replacing.
|
||||
|
||||
* The GtkStyleContext branch has been merged, changing the APIs
|
||||
that are used to do themed drawing, and the theme engine interfaces.
|
||||
Among the new classes are GtkStyleContext (replacing GtkStyle) and
|
||||
GtkCssProvider (replacing the gtkrc parser). The migration guide
|
||||
contains a chapter about porting from GtkStyle to GtkStyleContext.
|
||||
|
||||
* Bugs fixed:
|
||||
549720 Add a way to hide GtkScale's slider
|
||||
582557 need open with dialog box to use with IBM's Lotus Notes...
|
||||
619148 "active ID" properties (GtkComboBox)
|
||||
636060 use ATK_DEFINE_TYPE where possible
|
||||
636129 invalid uninstantiatable type `(null)' in cast to `GtkSpinner'
|
||||
636388 gtk3-demo craches (segfault) when pressing a key in the textarea...
|
||||
636511 New style override functions do not work on textview
|
||||
|
||||
* Updated translations:
|
||||
Estonian
|
||||
Galician
|
||||
Hebrew
|
||||
Persian
|
||||
Slovenian
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.4 to 2.91.5
|
||||
==============================================
|
||||
|
||||
|
@ -85,7 +85,7 @@ LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
|
||||
LIBS=-lintl \
|
||||
CFLAGS=-O2 \
|
||||
./configure \
|
||||
--with-gdktarget=win32 \
|
||||
--enable-win32-backend \
|
||||
--disable-gdiplus \
|
||||
--with-included-immodules \
|
||||
--without-libjasper \
|
||||
|
134
autogen.sh
134
autogen.sh
@ -1,130 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
test -n "$srcdir" || srcdir=`dirname "$0"`
|
||||
test -n "$srcdir" || srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=Gtk+
|
||||
TEST_TYPE=-d
|
||||
FILE=gdk
|
||||
olddir=`pwd`
|
||||
cd "$srcdir"
|
||||
|
||||
DIE=0
|
||||
|
||||
have_libtool=false
|
||||
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version |
|
||||
head -1 |
|
||||
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
|
||||
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
2.*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_libtool ; then : ; else
|
||||
echo
|
||||
echo "You must have libtool 2.2 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/"
|
||||
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/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.11
|
||||
ACLOCAL=aclocal-1.11
|
||||
else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.10
|
||||
ACLOCAL=aclocal-1.10
|
||||
GTKDOCIZE=`which gtkdocize`
|
||||
if test -z $GTKDOCIZE; then
|
||||
echo "*** No GTK-Doc found, please install it ***"
|
||||
exit 1
|
||||
else
|
||||
echo
|
||||
echo "You must have automake 1,10.x or 1.11.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/"
|
||||
DIE=1
|
||||
gtkdocize || exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# NOCONFIGURE is used by gnome-common; support both
|
||||
if ! test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
NOCONFIGURE=1
|
||||
fi
|
||||
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`$ACLOCAL --print-ac-dir`
|
||||
m4list="glib-2.0.m4 glib-gettext.m4"
|
||||
|
||||
for file in $m4list
|
||||
do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
rm -rf autom4te.cache
|
||||
|
||||
# README and INSTALL are required by automake, but may be deleted by clean
|
||||
# up rules. to get automake to work, simply touch these here, they will be
|
||||
# regenerated from their corresponding *.in files by ./configure anyway.
|
||||
touch README INSTALL
|
||||
|
||||
gtkdocize || exit $?
|
||||
|
||||
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
|
||||
autoheader || exit $?
|
||||
|
||||
$AUTOMAKE --add-missing || exit $?
|
||||
autoconf || exit $?
|
||||
cd $ORIGDIR || exit $?
|
||||
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
AUTORECONF=`which autoreconf`
|
||||
if test -z $AUTORECONF; then
|
||||
echo "*** No autoreconf found, please install it ***"
|
||||
exit 1
|
||||
else
|
||||
autoreconf --force --install --verbose || exit $?
|
||||
fi
|
||||
|
||||
cd "$olddir"
|
||||
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -52,7 +52,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines);INSIDE_GDK_WIN32"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -72,7 +72,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -93,7 +93,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines);INSIDE_GDK_WIN32"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -122,29 +122,24 @@
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkapplaunchcontext-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkcolor-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkcursor-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkdevice-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkdevice-wintab.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkdevicemanager-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkdisplay-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkdnd-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkdrawable-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkevents-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkfont-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkgc-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkgeometry-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkglobals-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkim-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkinput-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkinput.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkkeys-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkmain-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkpixmap-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkproperty-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkscreen-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkselection-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkspawn-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdktestutils-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkvisual-win32.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkwin32displaymanager.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkwin32id.c" />
|
||||
<File RelativePath="..\..\..\gdk\win32\gdkwindow-win32.c" />
|
||||
</Filter>
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -42,7 +42,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
AdditionalDependencies="imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@ -63,7 +63,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -72,7 +72,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
AdditionalDependencies="imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@ -96,7 +96,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -107,7 +107,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
AdditionalDependencies="imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@ -128,7 +128,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GdkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -137,7 +137,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
|
||||
AdditionalDependencies="imm32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||
@ -216,6 +216,7 @@
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
#include "libgdk.sourcefiles"
|
||||
<File RelativePath="..\..\..\gdk\gdkkeynames.c" />
|
||||
</Filter>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
||||
|
@ -8,13 +8,13 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="gdk_pixbuf-2.0.lib gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||
AdditionalDependencies="gdk_pixbuf-2.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||
AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
|
||||
/>
|
||||
<Tool
|
||||
@ -24,9 +24,7 @@ if exist ..\..\..\config.h goto DONE_CONFIG_H

|
||||
copy ..\..\..\config.h.win32 ..\..\..\config.h

|
||||
:DONE_CONFIG_H

|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h goto DONE_GDKCONFIG_H

|
||||
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
:DONE_GDKCONFIG_H

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
@ -87,10 +85,8 @@ copy ..\..\..\gdk\gdkdevicemanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&
|
||||
copy ..\..\..\gdk\gdkdisplay.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdisplaymanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdrawable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkenumtypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkinput.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
@ -102,7 +98,6 @@ copy ..\..\..\gdk\gdkrectangle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk
|
||||
copy ..\..\..\gdk\gdkrgba.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkscreen.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkspawn.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkthreads.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdktypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
@ -123,6 +118,10 @@ copy ..\..\..\gtk\gtkactiongroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x
|
||||
copy ..\..\..\gtk\gtkactivatable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkadjustment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkalignment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkappchooser.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkappchooserbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkappchooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkappchooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkapplication.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkarrow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaspectframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -131,10 +130,14 @@ copy ..\..\..\gtk\gtkbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
�
|
||||
copy ..\..\..\gtk\gtkbin.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkbindings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkborder.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkbuildable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkbuilder.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcalendar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcellarea.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcellareabox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcellareacontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcelleditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcelllayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcellrenderer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -156,6 +159,7 @@ copy ..\..\..\gtk\gtkcolorseldialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtkcombobox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcomboboxtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcontainer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcssprovider.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdebug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -176,12 +180,12 @@ copy ..\..\..\gtk\gtkfixed.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&#x
|
||||
copy ..\..\..\gtk\gtkfontbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgradient.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgrid.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhandlebox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhruler.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhseparator.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -212,6 +216,7 @@ copy ..\..\..\gtk\gtkmisc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
�
|
||||
copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtknotebook.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtknumerableicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoffscreenwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkorientable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpagesetup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -237,7 +242,6 @@ copy ..\..\..\gtk\gtkrecentchoosermenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\
|
||||
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkrecentfilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkrecentmanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkruler.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscalebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrollable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -258,6 +262,11 @@ copy ..\..\..\gtk\gtkstatusbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtkstatusicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstock.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstyle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstylecontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstyleproperties.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstyleprovider.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkswitch.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksymboliccolor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktearoffmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -271,6 +280,7 @@ copy ..\..\..\gtk\gtktextmark.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtktexttag.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktexttagtable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkthemingengine.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoggleaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktogglebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -291,7 +301,6 @@ copy ..\..\..\gtk\gtktreestore.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtktreeview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreeviewcolumn.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktypebuiltins.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktypeutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkuimanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@ -299,15 +308,15 @@ copy ..\..\..\gtk\gtkversion.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&
|
||||
copy ..\..\..\gtk\gtkviewport.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvolumebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvruler.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkvseparator.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkwidgetpath.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
|
||||
mkdir $(OutDir)\lib\gtk-$(GtkApiVersion)\include

|
||||
copy ..\..\..\gdk\gdkconfig.h $(OutDir)\lib\gtk-$(GtkApiVersion)\include

|
||||
copy ..\..\..\gdk\gdkconfig.h $(OutDir)\include\gdk

|
||||
|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||
"
|
||||
@ -318,7 +327,7 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\l
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGenerateGtkDef"
|
||||
Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
|
||||
Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkLibtoolCompatibleDllPrefix"
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gtk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -43,7 +43,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
@ -64,7 +64,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gtk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -76,7 +76,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
@ -97,7 +97,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gtk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="$(GtkPrefixDefine)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -107,7 +107,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
@ -130,7 +130,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gtk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="$(GtkPrefixDefine)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -140,7 +140,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
|
||||
AdditionalDependencies=""
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
|
@ -31,7 +31,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gtk"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -42,7 +42,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib atk-1.0.lib pango-1.0.lib pangocairo-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||
@ -63,7 +63,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GtkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -72,7 +72,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib atk-1.0.lib pango-1.0.lib pangocairo-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||
@ -96,7 +96,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
@ -107,7 +107,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib atk-1.0.lib pango-1.0.lib pangocairo-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||
@ -128,7 +128,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk-pixbuf;..\..\..\gdk;..\..\..\gdk\win32"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||
PreprocessorDefinitions="$(GtkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -137,7 +137,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="cairo.lib atk-1.0.lib pango-1.0.lib pangocairo-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||
|
484
configure.ac
484
configure.ac
@ -9,8 +9,8 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [91])
|
||||
m4_define([gtk_micro_version], [6])
|
||||
m4_define([gtk_minor_version], [99])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@ -19,7 +19,7 @@ m4_define([gtk_version],
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
m4_define([gtk_api_version], [3.0])
|
||||
|
||||
AC_PREREQ([2.64])
|
||||
AC_PREREQ([2.62])
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
@ -38,7 +38,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||
m4_define([gtk_binary_version], [3.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.27.3])
|
||||
m4_define([glib_required_version], [2.27.5])
|
||||
m4_define([pango_required_version], [1.20])
|
||||
m4_define([atk_required_version], [1.29.2])
|
||||
m4_define([cairo_required_version], [1.10.0])
|
||||
@ -236,42 +236,138 @@ AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
|
||||
[turn on debugging @<:@default=debug_default@:>@]),,
|
||||
enable_debug=debug_default)
|
||||
AC_ARG_ENABLE(xkb,
|
||||
[AC_HELP_STRING([--enable-xkb],
|
||||
[support XKB [default=maybe]])],,
|
||||
[enable_xkb="maybe"])
|
||||
AC_ARG_ENABLE(xinerama,
|
||||
[AC_HELP_STRING([--enable-xinerama],
|
||||
[support xinerama extension if available [default=yes]])],,
|
||||
[enable_xinerama="yes"])
|
||||
|
||||
AC_ARG_ENABLE(rebuilds,
|
||||
[AC_HELP_STRING([--disable-rebuilds],
|
||||
[disable all source autogeneration rules])],,
|
||||
[enable_rebuilds=yes])
|
||||
|
||||
AC_ARG_WITH(xinput,
|
||||
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
|
||||
AC_ARG_ENABLE(gtk2-dependency,
|
||||
AC_HELP_STRING([--enable-gtk2-dependency],
|
||||
[Do not build gtk-update-icon-cache and other shared tools]),,
|
||||
[enable_gtk2_dependency=no])
|
||||
|
||||
if test "$platform_win32" = yes; then
|
||||
gdktarget=win32
|
||||
else
|
||||
gdktarget=x11
|
||||
AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno])
|
||||
|
||||
AC_ARG_ENABLE(xkb,
|
||||
[AC_HELP_STRING([--enable-xkb],
|
||||
[support XKB extension [default=maybe]])],,
|
||||
[enable_xkb="maybe"])
|
||||
AC_ARG_ENABLE(xinerama,
|
||||
[AC_HELP_STRING([--enable-xinerama],
|
||||
[support Xinerama extension if available [default=maybe]])],,
|
||||
[enable_xinerama="maybe"])
|
||||
AC_ARG_ENABLE(xinput,
|
||||
[AC_HELP_STRING([--enable-xinput],
|
||||
[support XInput extension if available [default=yes]])],,
|
||||
[enable_xinput="maybe"])
|
||||
AC_ARG_ENABLE(xrandr,
|
||||
[AC_HELP_STRING([--enable-xrandr],
|
||||
[support XRandR extension if available [default=maybe]])],,
|
||||
[enable_xrandr="maybe"])
|
||||
AC_ARG_ENABLE(xfixes,
|
||||
[AC_HELP_STRING([--enable-xfixes],
|
||||
[support XFixes extension if available [default=maybe]])],,
|
||||
[enable_xfixes="maybe"])
|
||||
AC_ARG_ENABLE(xcomposite,
|
||||
[AC_HELP_STRING([--enable-xcomposite],
|
||||
[support X Composite extension if available [default=maybe]])],,
|
||||
[enable_xcomposite="maybe"])
|
||||
AC_ARG_ENABLE(xdamage,
|
||||
[AC_HELP_STRING([--enable-xdamage],
|
||||
[support X Damage extension if available [default=maybe]])],,
|
||||
[enable_xdamage="maybe"])
|
||||
|
||||
AC_ARG_ENABLE(x11-backend,
|
||||
[AC_HELP_STRING([--enable-x11-backend],
|
||||
[enable the X11 gdk backend])],
|
||||
[backend_set=yes])
|
||||
AC_ARG_ENABLE(win32-backend,
|
||||
[AC_HELP_STRING([--enable-win32-backend],
|
||||
[enable the Win32 gdk backend])],
|
||||
[backend_set=yes])
|
||||
AC_ARG_ENABLE(quartz-backend,
|
||||
[AC_HELP_STRING([--enable-quartz-backend],
|
||||
[enable the quartz gdk backend])],
|
||||
[backend_set=yes])
|
||||
AC_ARG_ENABLE(broadway-backend,
|
||||
[AC_HELP_STRING([--enable-broadway-backend],
|
||||
[enable the broadway (HTML5) gdk backend])],
|
||||
[backend_set=yes])
|
||||
|
||||
if test -z "$backend_set"; then
|
||||
if test "$platform_win32" = yes; then
|
||||
enable_win32_backend=yes
|
||||
else
|
||||
enable_x11_backend=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/broadway]] select non-default GDK target],
|
||||
gdktarget=$with_gdktarget)
|
||||
cairo_backends=
|
||||
backend_immodules=
|
||||
GDK_BACKENDS=
|
||||
GDK_EXTRA_LIBS=
|
||||
GDK_EXTRA_CFLAGS=
|
||||
GDK_WINDOWING=
|
||||
GIO_PACKAGE=gio-2.0
|
||||
PANGO_PACKAGES="pango pangocairo"
|
||||
|
||||
AC_SUBST(gdktarget)
|
||||
case $gdktarget in
|
||||
x11|win32|quartz|broadway) ;;
|
||||
*) AC_MSG_ERROR([Invalid target for GDK: use x11, broadway, quartz or win32.]);;
|
||||
esac
|
||||
if test "x$enable_x11_backend" == xyes; then
|
||||
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
|
||||
# backend names are identical.
|
||||
cairo_backends="$cairo_backends cairo-xlib"
|
||||
GDK_BACKENDS="$GDK_BACKENDS x11"
|
||||
# Pull in gio-unix for GDesktopAppInfo usage, see at least
|
||||
# gdkapplaunchcontext-x11.c
|
||||
GIO_PACKAGE=gio-unix-2.0
|
||||
backend_immodules="$backend_immodules,xim"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_X11"
|
||||
fi
|
||||
|
||||
gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
|
||||
gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
|
||||
if test "x$enable_win32_backend" == xyes; then
|
||||
cairo_backends="$cairo_backends cairo-win32"
|
||||
GDK_BACKENDS="$GDK_BACKENDS win32"
|
||||
backend_immodules="$backend_immodules,ime"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_NATIVE_WINDOW_POINTER
|
||||
#define GDK_WINDOWING_WIN32"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
|
||||
AM_CONDITIONAL(USE_WIN32, true)
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
else
|
||||
AM_CONDITIONAL(USE_WIN32, false)
|
||||
fi
|
||||
|
||||
AC_SUBST(gdktargetlib)
|
||||
AC_SUBST(gtktargetlib)
|
||||
if test "x$enable_quartz_backend" == xyes; then
|
||||
cairo_backends="$cairo_backends cairo-quartz"
|
||||
GDK_BACKENDS="$GDK_BACKENDS quartz"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_QUARTZ"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
|
||||
AM_CONDITIONAL(USE_QUARTZ, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_QUARTZ, false)
|
||||
fi
|
||||
|
||||
if test "x$enable_broadway_backend" == xyes; then
|
||||
GDK_BACKENDS="$GDK_BACKENDS broadway"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_BROADWAY"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lz"
|
||||
AM_CONDITIONAL(USE_BROADWAY, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_BROADWAY, false)
|
||||
fi
|
||||
|
||||
# strip leading space
|
||||
GDK_BACKENDS=${GDK_BACKENDS/# }
|
||||
|
||||
AC_SUBST(GDK_BACKENDS)
|
||||
|
||||
if test -z "$GDK_BACKENDS"; then
|
||||
AC_MSG_ERROR([No GDK backends selected.])
|
||||
fi
|
||||
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
||||
@ -364,21 +460,7 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
cairo-gobject >= cairo_required_version dnl
|
||||
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
|
||||
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
## check that the correct cairo backend is there. E.g. if the GDK
|
||||
## target is win32 we need the cairo-win32 backend and so on.
|
||||
cairo_backend=cairo-$gdktarget
|
||||
|
||||
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
|
||||
# backend names are identical.
|
||||
if test "x$cairo_backend" = "xcairo-x11"; then
|
||||
cairo_backend=cairo-xlib
|
||||
fi
|
||||
if test "x$cairo_backend" = "xcairo-broadway"; then
|
||||
cairo_backend=cairo
|
||||
fi
|
||||
PKG_CHECK_MODULES(CAIRO_BACKEND,
|
||||
[$cairo_backend >= cairo_required_version])
|
||||
PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
|
||||
|
||||
if test "$os_win32" != yes; then
|
||||
# libtool option to control which symbols are exported
|
||||
@ -669,53 +751,6 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# `widechar' tests for gdki18n.h
|
||||
AC_MSG_CHECKING(for wchar.h)
|
||||
AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
|
||||
if test $gdk_wchar_h = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wchar_h)
|
||||
|
||||
# Check for wctype.h (for iswalnum)
|
||||
AC_MSG_CHECKING(for wctype.h)
|
||||
AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
|
||||
if test $gdk_wctype_h = yes; then
|
||||
AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wctype_h)
|
||||
|
||||
# in Solaris 2.5, `iswalnum' is in -lw
|
||||
GDK_WLIBS=
|
||||
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
|
||||
|
||||
oLIBS="$LIBS"
|
||||
LIBS="$LIBS $GDK_WLIBS"
|
||||
# The following is necessary for Linux libc-5.4.38
|
||||
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
|
||||
AC_TRY_LINK([#include <stdlib.h>],[
|
||||
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
|
||||
# ifdef HAVE_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
# else
|
||||
# ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
|
||||
#endif
|
||||
iswalnum((wchar_t) 0);
|
||||
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
||||
LIBS="$oLIBS"
|
||||
|
||||
if test $gdk_working_wctype = no; then
|
||||
AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
|
||||
GDK_WLIBS=
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_working_wctype)
|
||||
AC_SUBST(GDK_WLIBS)
|
||||
|
||||
# Check for uxtheme.h (for MS-Windows Engine)
|
||||
AC_MSG_CHECKING(for uxtheme.h)
|
||||
AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
|
||||
@ -735,6 +770,7 @@ AC_ARG_ENABLE(modules,
|
||||
[disable dynamic module loading])])
|
||||
|
||||
dynworks=false
|
||||
build_dynamic_modules=no
|
||||
deps=
|
||||
if test x$enable_modules = xno; then
|
||||
AC_MSG_RESULT(no)
|
||||
@ -762,10 +798,12 @@ else
|
||||
fi
|
||||
|
||||
if $dynworks; then
|
||||
build_dynamic_modules=yes
|
||||
AC_DEFINE(USE_GMODULE, 1,
|
||||
[Define to 1 if gmodule works and should be used])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
build_dynamic_modules=no
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
@ -782,8 +820,8 @@ dnl AC_HELP_STRING cause problems.
|
||||
dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
|
||||
dnl [build the specified input method modules into gtk])
|
||||
AC_ARG_WITH(included_immodules,
|
||||
[ --with-included-immodules=MODULE1,MODULE2,...
|
||||
build the specified input methods into gtk])
|
||||
AC_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...],
|
||||
[build the specified input methods into gtk]))
|
||||
|
||||
if $dynworks; then
|
||||
:
|
||||
@ -794,14 +832,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
all_immodules="am-et,cedilla,cyrillic-translit"
|
||||
if test "$gdktarget" = "win32"; then
|
||||
all_immodules="${all_immodules},ime"
|
||||
fi
|
||||
all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
|
||||
if test "$gdktarget" = "x11"; then
|
||||
all_immodules="${all_immodules},xim"
|
||||
fi
|
||||
all_immodules="am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr$backend_immodules"
|
||||
|
||||
included_immodules=""
|
||||
# If the switch specified without listing any specific ones, include all
|
||||
@ -865,13 +896,15 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
|
||||
if test $cross_compiling = yes; then
|
||||
if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
|
||||
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
|
||||
if test x$GTK_UPDATE_ICON_CACHE = xno; then
|
||||
REBUILD_PNGS=#
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
|
||||
|
||||
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
|
||||
|
||||
if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
|
||||
@ -886,14 +919,12 @@ fi
|
||||
# Windowing system checks
|
||||
########################################
|
||||
|
||||
GDK_EXTRA_LIBS="$GDK_WLIBS"
|
||||
GDK_EXTRA_CFLAGS=
|
||||
|
||||
# GTK+ uses some X calls, so needs to link against X directly
|
||||
GTK_DEP_PACKAGES_FOR_X=
|
||||
GTK_DEP_LIBS_FOR_X=
|
||||
X_EXTENSIONS=
|
||||
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
if test "x$enable_x11_backend" == xyes; then
|
||||
X_PACKAGES=fontconfig
|
||||
|
||||
#
|
||||
@ -991,10 +1022,13 @@ if test "x$gdktarget" = "xx11"; then
|
||||
# Check for XKB support.
|
||||
|
||||
if test "x$enable_xkb" = "xyes"; then
|
||||
AC_MSG_WARN(XKB support explicitly enabled)
|
||||
AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
|
||||
AC_CHECK_FUNC(XkbQueryExtension,
|
||||
X_EXTENSIONS="$X_EXTENSIONS XKB"
|
||||
AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]),
|
||||
AC_MSG_ERROR([*** XKB extension not found. Check 'config.log' for more details.]))
|
||||
elif test "x$enable_xkb" = "xmaybe"; then
|
||||
AC_CHECK_FUNC(XkbQueryExtension,
|
||||
X_EXTENSIONS="$X_EXTENSIONS XKB"
|
||||
AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
|
||||
else
|
||||
AC_MSG_WARN(XKB support explicitly disabled)
|
||||
@ -1016,19 +1050,23 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
CFLAGS="$gtk_save_CFLAGS"
|
||||
|
||||
if test "x$enable_xinerama" = "xyes"; then
|
||||
if test "x$enable_xinerama" != "xno"; then
|
||||
# Check for Xinerama extension (Solaris impl or Xfree impl)
|
||||
have_xfree_xinerama=false
|
||||
have_solaris_xinerama=false
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $x_cflags"
|
||||
|
||||
# Check for XFree
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
AC_MSG_CHECKING(for Xinerama packages)
|
||||
|
||||
have_xfree_xinerama=false
|
||||
if $PKG_CONFIG --exists xinerama ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
have_xfree_xinerama=true
|
||||
X_PACKAGES="$X_PACKAGES xinerama"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||
@ -1037,14 +1075,12 @@ if test "x$gdktarget" = "xx11"; then
|
||||
fi
|
||||
|
||||
if $have_xfree_xinerama ; then
|
||||
X_EXTENSIONS="$X_EXTENSIONS Xinerama"
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
||||
[Define to 1 if XFree Xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 is Xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
@ -1057,6 +1093,7 @@ if test "x$gdktarget" = "xx11"; then
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
X_EXTENSIONS="$X_EXTENSIONS Xinerama"
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
[Define to 1 if solaris xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
@ -1071,9 +1108,14 @@ if test "x$gdktarget" = "xx11"; then
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test "x$enable_xinerama" = "xyes" ; then
|
||||
if test "x$have_xfree_xinerama" != "xtrue" -a "x$have_solaris_xinerama" != "xtrue" ; then
|
||||
AC_MSG_ERROR([*** Xinerama extension not found. Check 'config.log' for more details.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# set up things for XInput
|
||||
if test "x$with_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
|
||||
if test "x$enable_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
|
||||
have_xinput=yes
|
||||
|
||||
AC_DEFINE(XINPUT_XFREE, 1,
|
||||
@ -1082,7 +1124,11 @@ if test "x$gdktarget" = "xx11"; then
|
||||
X_PACKAGES="$X_PACKAGES xi"
|
||||
|
||||
AC_CHECK_HEADER(X11/extensions/XInput2.h,
|
||||
have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
|
||||
have_xinput2=yes
|
||||
X_EXTENSIONS="$X_EXTENSIONS XI2"
|
||||
AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]),
|
||||
X_EXTENSIONS="$X_EXTENSIONS XInput")
|
||||
|
||||
else
|
||||
AC_DEFINE(XINPUT_NONE, 1,
|
||||
[Define to 1 if no XInput should be used])
|
||||
@ -1091,11 +1137,22 @@ if test "x$gdktarget" = "xx11"; then
|
||||
AM_CONDITIONAL(XINPUT_XFREE, test "x$have_xinput" = "xyes")
|
||||
AM_CONDITIONAL(XINPUT_2, test "x$have_xinput2" = "xyes")
|
||||
|
||||
# Check for the RANDR extension
|
||||
if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
|
||||
AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
|
||||
if test "x$enable_xinput" = "xyes" ; then
|
||||
if test "x$have_xinput" != "xyes" -a "x$have_xinput2" != "xyes" ; then
|
||||
AC_MSG_ERROR([*** XInput extension not found. Check 'config.log' for more details.])
|
||||
fi
|
||||
fi
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xrandr"
|
||||
# Check for the RANDR extension
|
||||
if test x"$enable_xrandr" != xno; then
|
||||
if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
|
||||
AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xrandr"
|
||||
X_EXTENSIONS="$X_EXTENSIONS XRANDR"
|
||||
elif test x"$enable_xrandr" = xyes; then
|
||||
AC_MSG_ERROR([RANDR support requested but xrandr not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks for Xcursor library
|
||||
@ -1108,29 +1165,44 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
# Checks for XFixes extension
|
||||
|
||||
if $PKG_CONFIG --exists xfixes ; then
|
||||
AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
|
||||
if test x"$enable_xfixes" != xno; then
|
||||
if $PKG_CONFIG --exists xfixes ; then
|
||||
AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xfixes"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
|
||||
X_PACKAGES="$X_PACKAGES xfixes"
|
||||
X_EXTENSIONS="$X_EXTENSIONS XFIXES"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
|
||||
elif test x"$enable_xfixes" = xyes; then
|
||||
AC_MSG_ERROR([XFixes support requested but xfixes not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks for Xcomposite extension
|
||||
|
||||
if $PKG_CONFIG --exists xcomposite ; then
|
||||
AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
|
||||
if test x"$enable_xcomposite" != xno; then
|
||||
if $PKG_CONFIG --exists xcomposite ; then
|
||||
AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xcomposite"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
|
||||
X_PACKAGES="$X_PACKAGES xcomposite"
|
||||
X_EXTENSIONS="$X_EXTENSIONS Composite"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
|
||||
elif test x"$enable_xcomposite" = xyes; then
|
||||
AC_MSG_ERROR([Xcomposite support requested but xcomposite not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks for Xdamage extension
|
||||
|
||||
if $PKG_CONFIG --exists xdamage ; then
|
||||
AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
|
||||
if test x"$enable_xdamage" != xno; then
|
||||
if $PKG_CONFIG --exists xdamage ; then
|
||||
AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
|
||||
|
||||
X_PACKAGES="$X_PACKAGES xdamage"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
|
||||
X_PACKAGES="$X_PACKAGES xdamage"
|
||||
X_EXTENSIONS="$X_EXTENSIONS DAMAGE"
|
||||
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
|
||||
elif test x"$enable_xdamage" = xyes; then
|
||||
AC_MSG_ERROR([Xdamage support requested but xdamage not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
if $have_base_x_pc ; then
|
||||
@ -1143,6 +1215,10 @@ if test "x$gdktarget" = "xx11"; then
|
||||
LIBS="$gtk_save_libs"
|
||||
|
||||
AM_CONDITIONAL(USE_X11, true)
|
||||
|
||||
# strip leading space
|
||||
X_EXTENSIONS=${X_EXTENSIONS/# }
|
||||
|
||||
else
|
||||
XPACKAGES=
|
||||
|
||||
@ -1152,32 +1228,8 @@ else
|
||||
AM_CONDITIONAL(HAVE_X11R6, false)
|
||||
fi
|
||||
|
||||
if test "x$gdktarget" = "xwin32"; then
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
|
||||
AM_CONDITIONAL(USE_WIN32, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_WIN32, false)
|
||||
fi
|
||||
|
||||
if test "x$gdktarget" = "xquartz"; then
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
|
||||
AM_CONDITIONAL(USE_QUARTZ, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_QUARTZ, false)
|
||||
fi
|
||||
|
||||
if test "x$gdktarget" = "xbroadway" ; then
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lz"
|
||||
fi
|
||||
|
||||
# Check for Pango flags
|
||||
|
||||
if test "x$gdktarget" = "xwin32"; then
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
else
|
||||
PANGO_PACKAGES="pango pangocairo"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(Pango flags)
|
||||
if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
|
||||
PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
|
||||
@ -1207,12 +1259,7 @@ fi
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
|
||||
if test "x$gdktarget" = "xx11" || test "x$gdktarget" = "xbroadway" ; then
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 $cairo_backend cairo-gobject"
|
||||
else
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 $cairo_backend cairo-gobject"
|
||||
fi
|
||||
GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
|
||||
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
|
||||
@ -1221,7 +1268,7 @@ GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFL
|
||||
# into the pkg-config files
|
||||
#
|
||||
if test $enable_explicit_deps != yes ; then
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 cairo-gobject"
|
||||
GDK_EXTRA_LIBS=
|
||||
fi
|
||||
|
||||
@ -1262,7 +1309,7 @@ else
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
if test "x$enable_x11_backend" == xyes; then
|
||||
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
|
||||
fi
|
||||
GTK_EXTRA_LIBS=
|
||||
@ -1331,8 +1378,10 @@ LIBS="$old_LIBS"
|
||||
# Printing system checks
|
||||
################################################################
|
||||
|
||||
PRINT_BACKENDS="file lpr"
|
||||
|
||||
AC_ARG_ENABLE(cups,
|
||||
[AC_HELP_STRING([--disable-cups]
|
||||
[AC_HELP_STRING([--disable-cups],
|
||||
[disable cups print backend])],,
|
||||
[enable_cups=auto])
|
||||
|
||||
@ -1369,6 +1418,7 @@ else
|
||||
|
||||
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
|
||||
|
||||
PRINT_BACKENDS="$PRINT_BACKENDS cups"
|
||||
AM_CONDITIONAL(HAVE_CUPS, true)
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
@ -1392,7 +1442,7 @@ fi
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(papi,
|
||||
[AC_HELP_STRING([--disable-papi]
|
||||
[AC_HELP_STRING([--disable-papi],
|
||||
[disable papi print backend])],,
|
||||
[enable_papi=auto])
|
||||
|
||||
@ -1402,6 +1452,7 @@ else
|
||||
AC_MSG_CHECKING(libpapi)
|
||||
AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
|
||||
if test $have_papi = yes; then
|
||||
PRINT_BACKENDS="$PRINT_BACKENDS papi"
|
||||
AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
|
||||
@ -1427,7 +1478,7 @@ if test "$os_win32" != "yes"; then
|
||||
*** postscript backend enabled.]))
|
||||
|
||||
AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-svg.h. You must build Cairo with the
|
||||
*** Cannot find cairo-svg.h. You must build Cairo with the
|
||||
*** svg backend enabled.]))
|
||||
fi
|
||||
|
||||
@ -1438,6 +1489,9 @@ AC_ARG_ENABLE(test-print-backend,
|
||||
[AC_HELP_STRING([--enable-test-print-backend],
|
||||
[build test print backend])],,
|
||||
[enable_test_print_backend=no])
|
||||
if test "x$enable_test_print_backend" != "xno" ; then
|
||||
PRINT_BACKENDS="$PRINT_BACKENDS test"
|
||||
fi
|
||||
AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
|
||||
|
||||
|
||||
@ -1478,19 +1532,18 @@ GOBJECT_INTROSPECTION_CHECK([0.9.3])
|
||||
#################################################
|
||||
|
||||
AC_ARG_ENABLE(packagekit,
|
||||
AC_HELP_STRING([--disable-packagekit],
|
||||
[build packagekit open with module]))
|
||||
AC_HELP_STRING([--disable-packagekit],
|
||||
[build packagekit open-with module]))
|
||||
|
||||
ENABLE_PACKAGEKIT=
|
||||
build_packagekit=no
|
||||
if test "os_win32" != "yes"; then
|
||||
if test "x$enable_packagekit" != "xno"; then
|
||||
ENABLE_PACKAGEKIT=1
|
||||
AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable packagekit])
|
||||
fi
|
||||
if test "x$enable_packagekit" != "xno"; then
|
||||
build_packagekit=yes
|
||||
AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable packagekit])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_PACKAGEKIT)
|
||||
AM_CONDITIONAL(ENABLE_PACKAGEKIT, test "x$ENABLE_PACKAGEKIT" = "x1")
|
||||
AM_CONDITIONAL(ENABLE_PACKAGEKIT, test "x$build_packagekit" = "xyes")
|
||||
|
||||
##################################################
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
@ -1537,36 +1590,28 @@ AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
|
||||
* This is a generated file. Please modify `configure.ac'
|
||||
*/
|
||||
|
||||
#ifndef GDKCONFIG_H
|
||||
#define GDKCONFIG_H
|
||||
#ifndef __GDKCONFIG_H__
|
||||
#define __GDKCONFIG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef GSEAL
|
||||
/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
|
||||
# ifdef GSEAL_ENABLE
|
||||
# define GSEAL(ident) _g_sealed__ ## ident
|
||||
# else
|
||||
# define GSEAL(ident) ident
|
||||
# endif
|
||||
#endif /* !GSEAL */
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
$gdk_windowing
|
||||
$gdk_wc
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GDKCONFIG_H */
|
||||
#endif /* __GDKCONFIG_H__ */
|
||||
_______EOF
|
||||
|
||||
|
||||
@ -1577,34 +1622,7 @@ _______EOF
|
||||
mv $outfile gdk/gdkconfig.h
|
||||
fi
|
||||
],[
|
||||
if test "x$gdktarget" = "xx11" ; then
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_X11'
|
||||
elif test "x$gdktarget" = "xwin32" ; then
|
||||
gdk_windowing='
|
||||
#define GDK_NATIVE_WINDOW_POINTER
|
||||
|
||||
#define GDK_WINDOWING_WIN32'
|
||||
elif test "x$gdktarget" = "xquartz" ; then
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_QUARTZ'
|
||||
elif test "x$gdktarget" = "xbroadway" ; then
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_BROADWAY'
|
||||
fi
|
||||
|
||||
if test x$gdk_wchar_h = xyes; then
|
||||
gdk_wc='
|
||||
#define GDK_HAVE_WCHAR_H 1'
|
||||
fi
|
||||
if test x$gdk_wctype_h = xyes; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_WCTYPE_H 1"
|
||||
fi
|
||||
if test x$gdk_working_wctype = xno; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_BROKEN_WCTYPE 1"
|
||||
fi
|
||||
gdk_windowing='$GDK_WINDOWING'
|
||||
])
|
||||
|
||||
dnl
|
||||
@ -1624,7 +1642,7 @@ AC_ARG_ENABLE(Bsymbolic,
|
||||
enable_Bsymbolic=no)
|
||||
LDFLAGS="${SAVED_LDFLAGS}"])
|
||||
|
||||
if test "x${enable_Bsymbolic}" == "xyes"; then
|
||||
if test "x${enable_Bsymbolic}" = "xyes" ; then
|
||||
GTK_LINK_FLAGS=-Wl,-Bsymbolic-functions
|
||||
fi
|
||||
AC_SUBST(GTK_LINK_FLAGS)
|
||||
@ -1637,7 +1655,6 @@ gdk-3.0.pc
|
||||
gtk+-3.0.pc
|
||||
gtk+-unix-print-3.0.pc
|
||||
gail-3.0.pc
|
||||
gdk-3.0-uninstalled.pc
|
||||
gtk+-3.0-uninstalled.pc
|
||||
gail-3.0-uninstalled.pc
|
||||
m4macros/Makefile
|
||||
@ -1655,6 +1672,7 @@ docs/reference/gdk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
docs/reference/gtk/version.xml
|
||||
docs/reference/libgail-util/Makefile
|
||||
docs/reference/libgail-util/version.xml
|
||||
docs/tools/Makefile
|
||||
build/Makefile
|
||||
build/win32/Makefile
|
||||
@ -1695,5 +1713,19 @@ perf/Makefile
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo "configuration:
|
||||
target: $gdktarget"
|
||||
# beautify the immodule list a bit
|
||||
included_immodules=${included_immodules//,/ }
|
||||
included_immodules=${included_immodules:-none}
|
||||
|
||||
echo "configuration:"
|
||||
echo " GDK backends: $GDK_BACKENDS"
|
||||
if test "x$enable_x11_backend" = "xyes"; then
|
||||
echo " X11 extensions: $X_EXTENSIONS"
|
||||
fi
|
||||
echo " Print backends: $PRINT_BACKENDS"
|
||||
echo " Dynamic modules: $build_dynamic_modules"
|
||||
echo " Included immodules: $included_immodules"
|
||||
echo " PackageKit support: $build_packagekit"
|
||||
echo " Introspection: $found_introspection"
|
||||
echo " Debugging: $enable_debug"
|
||||
echo " Documentation: $enable_gtk_doc"
|
||||
|
@ -11,14 +11,13 @@ INCLUDES = \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
DEPS = \
|
||||
$(top_builddir)/gtk/libgtk-3.0.la
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
LDADDS = \
|
||||
$(top_builddir)/gtk/libgtk-3.0.la \
|
||||
$(top_builddir)/gdk/libgdk-3.0.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(MATH_LIB)
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
|
@ -55,13 +55,12 @@ INCLUDES = \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gtk/libgtk-3.0.la
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(top_builddir)/gtk/libgtk-3.0.la \
|
||||
$(top_builddir)/gdk/libgdk-3.0.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
bin_PROGRAMS = gtk3-demo
|
||||
|
@ -110,7 +110,7 @@ create_page1 (GtkWidget *assistant)
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
|
||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
|
||||
|
||||
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
@ -133,7 +133,7 @@ create_page2 (GtkWidget *assistant)
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");
|
||||
|
||||
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
@ -152,7 +152,7 @@ create_page3 (GtkWidget *assistant)
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), label, TRUE);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation");
|
||||
|
||||
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
@ -27,6 +27,9 @@
|
||||
* - Using GtkDialog
|
||||
*/
|
||||
#include <string.h>
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
@ -151,7 +154,7 @@ query_for_toplevel (GdkScreen *screen,
|
||||
toplevel = NULL;
|
||||
}
|
||||
|
||||
gdk_cursor_unref (cursor);
|
||||
g_object_unref (cursor);
|
||||
gtk_widget_destroy (popup);
|
||||
gdk_flush (); /* Really release the grab */
|
||||
|
||||
|
@ -77,8 +77,8 @@ get_image_pixbuf (GtkImage *image)
|
||||
return g_object_ref (gtk_image_get_pixbuf (image));
|
||||
case GTK_IMAGE_STOCK:
|
||||
gtk_image_get_stock (image, &stock_id, &size);
|
||||
return gtk_widget_render_icon (GTK_WIDGET (image),
|
||||
stock_id, size, NULL);
|
||||
return gtk_widget_render_icon_pixbuf (GTK_WIDGET (image),
|
||||
stock_id, size);
|
||||
default:
|
||||
g_warning ("Image storage type %d not handled",
|
||||
gtk_image_get_storage_type (image));
|
||||
@ -125,7 +125,7 @@ drag_data_received (GtkWidget *widget,
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
if (selection_data->length > 0)
|
||||
if (gtk_selection_data_get_length (selection_data) > 0)
|
||||
{
|
||||
pixbuf = gtk_selection_data_get_pixbuf (selection_data);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||
|
@ -65,8 +65,8 @@ create_stock_icon_store (void)
|
||||
{
|
||||
if (stock_id[i])
|
||||
{
|
||||
pixbuf = gtk_widget_render_icon (cellview, stock_id[i],
|
||||
GTK_ICON_SIZE_BUTTON, NULL);
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (cellview, stock_id[i],
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
gtk_stock_lookup (stock_id[i], &item);
|
||||
label = strip_underscore (item.label);
|
||||
gtk_list_store_append (store, &iter);
|
||||
|
@ -290,7 +290,6 @@ gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
gtk_widget_style_attach (widget);
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_style_context_set_background (context, window);
|
||||
gtk_style_context_set_background (context, bin->offscreen_window);
|
||||
|
@ -228,7 +228,6 @@ gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
gtk_widget_style_attach (widget);
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_style_context_set_background (context, window);
|
||||
gtk_style_context_set_background (context, bin->offscreen_window);
|
||||
|
@ -166,9 +166,9 @@ create_model (void)
|
||||
}
|
||||
g_free (sizes);
|
||||
|
||||
info.small_icon = gtk_widget_render_icon (window, info.id,
|
||||
size,
|
||||
NULL);
|
||||
info.small_icon = gtk_widget_render_icon_pixbuf (window,
|
||||
info.id,
|
||||
size);
|
||||
|
||||
if (size != GTK_ICON_SIZE_MENU)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ canvas_item_new (GtkWidget *widget,
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
stock_id = gtk_tool_button_get_stock_id (button);
|
||||
pixbuf = gtk_widget_render_icon (widget, stock_id, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
pixbuf = gtk_widget_render_icon_pixbuf (widget, stock_id, GTK_ICON_SIZE_DIALOG);
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
|
@ -24,9 +24,9 @@ set_interp_type (GtkWidget *widget, gpointer data)
|
||||
void
|
||||
overall_changed_cb (GtkAdjustment *adjustment, gpointer data)
|
||||
{
|
||||
if (adjustment->value != overall_alpha)
|
||||
if (gtk_adjustment_get_value (adjustment) != overall_alpha)
|
||||
{
|
||||
overall_alpha = adjustment->value;
|
||||
overall_alpha = gtk_adjustment_get_value (adjustment);
|
||||
gtk_widget_queue_draw (darea);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
@ -13,40 +12,39 @@ DOC_MAIN_SGML_FILE=gdk-docs.sgml
|
||||
SCAN_OPTIONS=--deprecated-guards="GDK_ENABLE_BROKEN|GDK_DISABLE_DEPRECATED"
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../../gdk
|
||||
DOC_SOURCE_DIR=../../../gdk ../../../gdk/x11
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB=$(top_srcdir)/gdk/*.h $(top_srcdir)/gdk/x11/gdkx.h
|
||||
CFILE_GLOB=$(top_srcdir)/gdk/*.c
|
||||
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
IGNORE_HFILES= \
|
||||
gdkintl.h \
|
||||
gdkmarshalers.h \
|
||||
gdkkeysyms.h \
|
||||
gdkinternals.h \
|
||||
gdkprivate.h \
|
||||
gdkpoly-generic.h \
|
||||
gdk*private.h \
|
||||
keyname-table.h \
|
||||
win32 \
|
||||
win32 \
|
||||
x11 \
|
||||
quartz
|
||||
|
||||
# Extra files to add when scanning (relative to $srcdir)
|
||||
EXTRA_HFILES= \
|
||||
../../../gdk/x11/gdkx.h
|
||||
../../../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 \
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/libgdk-3.0.la $(GDK_DEP_LIBS)
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=gdk
|
||||
@ -57,86 +55,85 @@ content_files = \
|
||||
multihead.sgml
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES = \
|
||||
HTML_IMAGES = \
|
||||
images/rotated-text.png \
|
||||
\
|
||||
images/X_cursor.png \
|
||||
images/arrow.png \
|
||||
images/based_arrow_down.png \
|
||||
images/based_arrow_up.png \
|
||||
images/boat.png \
|
||||
images/bogosity.png \
|
||||
images/bottom_left_corner.png \
|
||||
images/bottom_right_corner.png \
|
||||
images/bottom_side.png \
|
||||
images/bottom_tee.png \
|
||||
images/box_spiral.png \
|
||||
images/center_ptr.png \
|
||||
images/circle.png \
|
||||
images/clock.png \
|
||||
images/coffee_mug.png \
|
||||
images/cross.png \
|
||||
images/cross_reverse.png \
|
||||
images/crosshair.png \
|
||||
images/diamond_cross.png \
|
||||
images/dot.png \
|
||||
images/dotbox.png \
|
||||
images/double_arrow.png \
|
||||
images/draft_large.png \
|
||||
images/draft_small.png \
|
||||
images/draped_box.png \
|
||||
images/exchange.png \
|
||||
images/fleur.png \
|
||||
images/gobbler.png \
|
||||
images/gumby.png \
|
||||
images/hand1.png \
|
||||
images/hand2.png \
|
||||
images/heart.png \
|
||||
images/icon.png \
|
||||
images/iron_cross.png \
|
||||
images/left_ptr.png \
|
||||
images/left_side.png \
|
||||
images/left_tee.png \
|
||||
images/leftbutton.png \
|
||||
images/ll_angle.png \
|
||||
images/lr_angle.png \
|
||||
images/man.png \
|
||||
images/middlebutton.png \
|
||||
images/mouse.png \
|
||||
images/pencil.png \
|
||||
images/pirate.png \
|
||||
images/plus.png \
|
||||
images/question_arrow.png \
|
||||
images/right_ptr.png \
|
||||
images/right_side.png \
|
||||
images/right_tee.png \
|
||||
images/rightbutton.png \
|
||||
images/rtl_logo.png \
|
||||
images/sailboat.png \
|
||||
images/sb_down_arrow.png \
|
||||
images/sb_h_double_arrow.png \
|
||||
images/sb_left_arrow.png \
|
||||
images/sb_right_arrow.png \
|
||||
images/sb_up_arrow.png \
|
||||
images/sb_v_double_arrow.png \
|
||||
images/shuttle.png \
|
||||
images/sizing.png \
|
||||
images/spider.png \
|
||||
images/spraycan.png \
|
||||
images/star.png \
|
||||
images/target.png \
|
||||
images/tcross.png \
|
||||
images/top_left_arrow.png \
|
||||
images/top_left_corner.png \
|
||||
images/top_right_corner.png \
|
||||
images/top_side.png \
|
||||
images/top_tee.png \
|
||||
images/trek.png \
|
||||
images/ul_angle.png \
|
||||
images/umbrella.png \
|
||||
images/ur_angle.png \
|
||||
images/watch.png \
|
||||
images/xterm.png
|
||||
images/X_cursor.png \
|
||||
images/arrow.png \
|
||||
images/based_arrow_down.png \
|
||||
images/based_arrow_up.png \
|
||||
images/boat.png \
|
||||
images/bogosity.png \
|
||||
images/bottom_left_corner.png \
|
||||
images/bottom_right_corner.png \
|
||||
images/bottom_side.png \
|
||||
images/bottom_tee.png \
|
||||
images/box_spiral.png \
|
||||
images/center_ptr.png \
|
||||
images/circle.png \
|
||||
images/clock.png \
|
||||
images/coffee_mug.png \
|
||||
images/cross.png \
|
||||
images/cross_reverse.png \
|
||||
images/crosshair.png \
|
||||
images/diamond_cross.png \
|
||||
images/dot.png \
|
||||
images/dotbox.png \
|
||||
images/double_arrow.png \
|
||||
images/draft_large.png \
|
||||
images/draft_small.png \
|
||||
images/draped_box.png \
|
||||
images/exchange.png \
|
||||
images/fleur.png \
|
||||
images/gobbler.png \
|
||||
images/gumby.png \
|
||||
images/hand1.png \
|
||||
images/hand2.png \
|
||||
images/heart.png \
|
||||
images/icon.png \
|
||||
images/iron_cross.png \
|
||||
images/left_ptr.png \
|
||||
images/left_side.png \
|
||||
images/left_tee.png \
|
||||
images/leftbutton.png \
|
||||
images/ll_angle.png \
|
||||
images/lr_angle.png \
|
||||
images/man.png \
|
||||
images/middlebutton.png \
|
||||
images/mouse.png \
|
||||
images/pencil.png \
|
||||
images/pirate.png \
|
||||
images/plus.png \
|
||||
images/question_arrow.png \
|
||||
images/right_ptr.png \
|
||||
images/right_side.png \
|
||||
images/right_tee.png \
|
||||
images/rightbutton.png \
|
||||
images/rtl_logo.png \
|
||||
images/sailboat.png \
|
||||
images/sb_down_arrow.png \
|
||||
images/sb_h_double_arrow.png \
|
||||
images/sb_left_arrow.png \
|
||||
images/sb_right_arrow.png \
|
||||
images/sb_up_arrow.png \
|
||||
images/sb_v_double_arrow.png \
|
||||
images/shuttle.png \
|
||||
images/sizing.png \
|
||||
images/spider.png \
|
||||
images/spraycan.png \
|
||||
images/star.png \
|
||||
images/target.png \
|
||||
images/tcross.png \
|
||||
images/top_left_arrow.png \
|
||||
images/top_left_corner.png \
|
||||
images/top_right_corner.png \
|
||||
images/top_side.png \
|
||||
images/top_tee.png \
|
||||
images/trek.png \
|
||||
images/ul_angle.png \
|
||||
images/umbrella.png \
|
||||
images/ur_angle.png \
|
||||
images/watch.png \
|
||||
images/xterm.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS= \
|
||||
|
@ -20,8 +20,11 @@
|
||||
<xi:include href="multihead.sgml" />
|
||||
<xi:include href="xml/gdkdisplay.xml" />
|
||||
<xi:include href="xml/gdkdisplaymanager.xml" />
|
||||
<xi:include href="xml/gdkdevice.xml" />
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
<xi:include href="xml/gdkscreen.xml" />
|
||||
<xi:include href="xml/regions.xml" />
|
||||
<xi:include href="xml/pixbufs.xml" />
|
||||
<xi:include href="xml/colors.xml" />
|
||||
<xi:include href="xml/rgba_colors.xml" />
|
||||
<xi:include href="xml/visuals.xml" />
|
||||
@ -34,7 +37,6 @@
|
||||
<xi:include href="xml/dnd.xml" />
|
||||
<xi:include href="xml/properties.xml" />
|
||||
<xi:include href="xml/threads.xml" />
|
||||
<xi:include href="xml/gdkdevicemanager.xml" />
|
||||
<xi:include href="xml/pango_interaction.xml" />
|
||||
<xi:include href="xml/cairo_interaction.xml" />
|
||||
<xi:include href="xml/x_interaction.xml" />
|
||||
|
@ -8,8 +8,6 @@ gdk_init
|
||||
gdk_init_check
|
||||
gdk_parse_args
|
||||
gdk_get_display_arg_name
|
||||
gdk_set_locale
|
||||
gdk_set_sm_client_id
|
||||
gdk_notify_startup_complete
|
||||
gdk_notify_startup_complete_with_id
|
||||
|
||||
@ -63,7 +61,6 @@ GdkStatus
|
||||
GDKVAR
|
||||
gdk_axis_use_get_type
|
||||
gdk_byte_order_get_type
|
||||
gdk_cap_style_get_type
|
||||
gdk_crossing_mode_get_type
|
||||
gdk_cursor_type_get_type
|
||||
gdk_drag_action_get_type
|
||||
@ -79,17 +76,14 @@ gdk_input_mode_get_type
|
||||
gdk_input_source_get_type
|
||||
gdk_modifier_type_get_type
|
||||
gdk_notify_type_get_type
|
||||
gdk_overlap_type_get_type
|
||||
gdk_property_state_get_type
|
||||
gdk_prop_mode_get_type
|
||||
gdk_scroll_direction_get_type
|
||||
gdk_setting_action_get_type
|
||||
gdk_status_get_type
|
||||
gdk_subwindow_mode_get_type
|
||||
gdk_visibility_state_get_type
|
||||
gdk_visual_type_get_type
|
||||
gdk_window_attributes_type_get_type
|
||||
gdk_window_class_get_type
|
||||
gdk_window_edge_get_type
|
||||
gdk_window_hints_get_type
|
||||
gdk_window_state_get_type
|
||||
@ -122,23 +116,17 @@ gdk_display_sync
|
||||
gdk_display_flush
|
||||
gdk_display_close
|
||||
gdk_display_is_closed
|
||||
gdk_display_list_devices
|
||||
gdk_display_get_event
|
||||
gdk_display_peek_event
|
||||
gdk_display_put_event
|
||||
gdk_display_has_pending
|
||||
gdk_display_add_client_message_filter
|
||||
gdk_display_set_double_click_time
|
||||
gdk_display_set_double_click_distance
|
||||
gdk_display_get_pointer
|
||||
gdk_display_get_device_state
|
||||
gdk_display_list_devices
|
||||
gdk_display_get_window_at_pointer
|
||||
gdk_display_get_window_at_device_position
|
||||
GdkDisplayPointerHooks
|
||||
gdk_display_set_pointer_hooks
|
||||
GdkDisplayDeviceHooks
|
||||
gdk_display_set_device_hooks
|
||||
gdk_display_warp_pointer
|
||||
gdk_display_warp_device
|
||||
gdk_display_supports_cursor_color
|
||||
gdk_display_supports_cursor_alpha
|
||||
gdk_display_get_default_cursor_size
|
||||
@ -151,7 +139,11 @@ gdk_display_store_clipboard
|
||||
gdk_display_supports_shapes
|
||||
gdk_display_supports_input_shapes
|
||||
gdk_display_supports_composite
|
||||
gdk_display_get_app_launch_context
|
||||
gdk_display_notify_startup_complete
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY
|
||||
GDK_DISPLAY_OBJECT
|
||||
GDK_IS_DISPLAY
|
||||
GDK_TYPE_DISPLAY
|
||||
@ -173,7 +165,8 @@ 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
|
||||
gdk_display_manager_open_display
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY_MANAGER
|
||||
GDK_DISPLAY_MANAGER_CLASS
|
||||
@ -219,10 +212,6 @@ gdk_screen_get_resolution
|
||||
gdk_screen_set_resolution
|
||||
gdk_screen_get_active_window
|
||||
gdk_screen_get_window_stack
|
||||
<SUBSECTION Spawning>
|
||||
gdk_spawn_on_screen
|
||||
gdk_spawn_on_screen_with_pipes
|
||||
gdk_spawn_command_line_on_screen
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_SCREEN
|
||||
@ -317,7 +306,6 @@ GDK_VISUAL_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkVisualClass
|
||||
GdkVisualPrivate
|
||||
gdk_visual_get_type
|
||||
</SECTION>
|
||||
|
||||
@ -478,10 +466,8 @@ gdk_window_get_device_cursor
|
||||
gdk_window_set_device_cursor
|
||||
gdk_window_get_device_events
|
||||
gdk_window_set_device_events
|
||||
|
||||
<SUBSECTION>
|
||||
GdkPointerHooks
|
||||
gdk_set_pointer_hooks
|
||||
gdk_window_get_source_events
|
||||
gdk_window_set_source_events
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_offscreen_window_get_surface
|
||||
@ -504,7 +490,6 @@ GDK_TYPE_FILTER_RETURN
|
||||
GDK_TYPE_GRAVITY
|
||||
GDK_TYPE_MODIFIER_TYPE
|
||||
GDK_TYPE_WINDOW_ATTRIBUTES_TYPE
|
||||
GDK_TYPE_WINDOW_CLASS
|
||||
GDK_TYPE_WINDOW_EDGE
|
||||
GDK_TYPE_WINDOW_HINTS
|
||||
GDK_TYPE_WINDOW_TYPE
|
||||
@ -515,7 +500,6 @@ GDK_TYPE_WM_FUNCTION
|
||||
<SUBSECTION Private>
|
||||
gdk_window_get_type
|
||||
gdk_window_window_class_get_type
|
||||
GdkWindowObject
|
||||
GdkWindowClass
|
||||
GdkWindowImpl
|
||||
GdkWindowImplClass
|
||||
@ -561,17 +545,8 @@ GdkAtom
|
||||
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_intern_static_string
|
||||
gdk_atom_name
|
||||
@ -637,10 +612,6 @@ gdk_threads_add_timeout
|
||||
gdk_threads_add_timeout_full
|
||||
gdk_threads_add_timeout_seconds
|
||||
gdk_threads_add_timeout_seconds_full
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_threads_lock
|
||||
gdk_threads_unlock
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -690,25 +661,17 @@ gdk_keymap_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>GdkDeviceManager</TITLE>
|
||||
<FILE>gdkdevicemanager</FILE>
|
||||
GdkDeviceManager
|
||||
<TITLE>GdkDevice</TITLE>
|
||||
<FILE>gdkdevice</FILE>
|
||||
GdkDevice
|
||||
GdkDeviceType
|
||||
GdkInputSource
|
||||
GdkInputMode
|
||||
GdkDeviceKey
|
||||
GdkDeviceAxis
|
||||
GdkAxisUse
|
||||
GdkDeviceType
|
||||
GdkGrabOwnership
|
||||
gdk_enable_multidevice
|
||||
gdk_device_manager_get_display
|
||||
gdk_device_manager_list_devices
|
||||
gdk_device_manager_get_client_pointer
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_get_name
|
||||
gdk_device_set_source
|
||||
gdk_device_get_source
|
||||
gdk_device_set_mode
|
||||
gdk_device_get_mode
|
||||
@ -717,11 +680,13 @@ gdk_device_get_key
|
||||
gdk_device_set_axis_use
|
||||
gdk_device_get_axis_use
|
||||
gdk_device_get_associated_device
|
||||
gdk_device_list_slave_devices
|
||||
gdk_device_get_device_type
|
||||
gdk_device_get_display
|
||||
gdk_device_get_has_cursor
|
||||
gdk_device_get_n_axes
|
||||
gdk_device_get_n_keys
|
||||
gdk_device_warp
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_grab
|
||||
@ -729,6 +694,8 @@ gdk_device_ungrab
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_get_state
|
||||
gdk_device_get_position
|
||||
gdk_device_get_window_at_position
|
||||
gdk_device_get_history
|
||||
gdk_device_free_history
|
||||
GdkTimeCoord
|
||||
@ -736,14 +703,6 @@ gdk_device_get_axis
|
||||
gdk_device_list_axes
|
||||
gdk_device_get_axis_value
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_input_set_extension_events
|
||||
GdkExtensionMode
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_devices_list
|
||||
gdk_device_get_core_pointer
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_AXIS_USE
|
||||
GDK_TYPE_EXTENSION_MODE
|
||||
@ -751,12 +710,6 @@ GDK_TYPE_INPUT_MODE
|
||||
GDK_TYPE_INPUT_SOURCE
|
||||
GDK_TYPE_DEVICE_TYPE
|
||||
GDK_TYPE_GRAB_OWNERSHIP
|
||||
GDK_DEVICE_MANAGER
|
||||
GDK_DEVICE_MANAGER_CLASS
|
||||
GDK_DEVICE_MANAGER_GET_CLASS
|
||||
GDK_IS_DEVICE_MANAGER
|
||||
GDK_IS_DEVICE_MANAGER_CLASS
|
||||
GDK_TYPE_DEVICE_MANAGER
|
||||
GDK_DEVICE
|
||||
GDK_DEVICE_CLASS
|
||||
GDK_DEVICE_GET_CLASS
|
||||
@ -766,15 +719,33 @@ GDK_TYPE_DEVICE
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkDeviceClass
|
||||
GdkDevicePrivate
|
||||
GdkDeviceManagerClass
|
||||
GdkDeviceManagerPrivate
|
||||
gdk_device_get_type
|
||||
gdk_device_manager_get_type
|
||||
gdk_device_type_get_type
|
||||
GDK_MAX_TIMECOORD_AXES
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>GdkDeviceManager</TITLE>
|
||||
<FILE>gdkdevicemanager</FILE>
|
||||
GdkDeviceManager
|
||||
gdk_disable_multidevice
|
||||
gdk_device_manager_get_display
|
||||
gdk_device_manager_list_devices
|
||||
gdk_device_manager_get_client_pointer
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DEVICE_MANAGER
|
||||
GDK_DEVICE_MANAGER_CLASS
|
||||
GDK_DEVICE_MANAGER_GET_CLASS
|
||||
GDK_IS_DEVICE_MANAGER
|
||||
GDK_IS_DEVICE_MANAGER_CLASS
|
||||
GDK_TYPE_DEVICE_MANAGER
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkDeviceManagerClass
|
||||
gdk_device_manager_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Events</TITLE>
|
||||
<FILE>events</FILE>
|
||||
@ -784,7 +755,6 @@ GDK_CURRENT_TIME
|
||||
GDK_PRIORITY_EVENTS
|
||||
GDK_PRIORITY_REDRAW
|
||||
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_events_pending
|
||||
gdk_event_peek
|
||||
@ -820,6 +790,8 @@ gdk_event_set_screen
|
||||
gdk_event_get_screen
|
||||
gdk_event_get_device
|
||||
gdk_event_set_device
|
||||
gdk_event_get_source_device
|
||||
gdk_event_set_source_device
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_setting_get
|
||||
@ -909,30 +881,31 @@ gdk_cursor_get_type
|
||||
<SECTION>
|
||||
<TITLE>Drag and Drop</TITLE>
|
||||
<FILE>dnd</FILE>
|
||||
GdkDragContext
|
||||
gdk_drag_get_selection
|
||||
gdk_drag_abort
|
||||
gdk_drop_reply
|
||||
gdk_drag_context_new
|
||||
gdk_drag_drop
|
||||
gdk_drag_find_window
|
||||
gdk_drag_find_window_for_screen
|
||||
gdk_drag_context_get_source_window
|
||||
gdk_drag_begin
|
||||
gdk_drag_begin_for_device
|
||||
gdk_drag_motion
|
||||
gdk_drop_finish
|
||||
gdk_drag_get_protocol
|
||||
gdk_drag_get_protocol_for_display
|
||||
GdkDragProtocol
|
||||
GdkDragContext
|
||||
GdkDragAction
|
||||
gdk_drag_status
|
||||
gdk_drag_drop_succeeded
|
||||
|
||||
gdk_drag_context_get_actions
|
||||
gdk_drag_context_get_suggested_action
|
||||
gdk_drag_context_get_selected_action
|
||||
gdk_drag_context_list_targets
|
||||
gdk_drag_context_get_device
|
||||
gdk_drag_context_set_device
|
||||
gdk_drag_context_get_source_window
|
||||
gdk_drag_context_get_dest_window
|
||||
gdk_drag_context_get_protocol
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DRAG_CONTEXT
|
||||
@ -961,25 +934,9 @@ GDK_SCREEN_XNUMBER
|
||||
GDK_SCREEN_XSCREEN
|
||||
GDK_CURSOR_XCURSOR
|
||||
GDK_CURSOR_XDISPLAY
|
||||
gdkx_visual_get
|
||||
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_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_get_monitor_output
|
||||
gdk_x11_screen_lookup_visual
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_display_get_user_time
|
||||
gdk_x11_cursor_get_xcursor
|
||||
gdk_x11_cursor_get_xdisplay
|
||||
gdk_x11_display_broadcast_startup_message
|
||||
gdk_x11_display_get_startup_notification_id
|
||||
gdk_x11_display_set_startup_notification_id
|
||||
@ -991,14 +948,24 @@ gdk_x11_display_error_trap_pop
|
||||
gdk_x11_display_error_trap_pop_ignored
|
||||
gdk_x11_display_set_cursor_theme
|
||||
gdk_x11_register_standard_event_type
|
||||
gdk_x11_screen_get_screen_number
|
||||
gdk_x11_screen_get_xscreen
|
||||
gdk_x11_screen_get_window_manager_name
|
||||
gdk_x11_screen_get_monitor_output
|
||||
gdk_x11_screen_lookup_visual
|
||||
gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
gdk_x11_window_get_xid
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_get_default_root_xwindow
|
||||
gdk_x11_get_default_screen
|
||||
gdk_x11_get_default_xdisplay
|
||||
gdk_x11_grab_server
|
||||
gdk_x11_screen_get_screen_number
|
||||
gdk_x11_screen_get_xscreen
|
||||
gdk_x11_ungrab_server
|
||||
gdk_x11_cursor_get_xcursor
|
||||
gdk_x11_cursor_get_xdisplay
|
||||
gdk_x11_visual_get_xvisual
|
||||
gdk_x11_atom_to_xatom
|
||||
gdk_x11_atom_to_xatom_for_display
|
||||
@ -1008,10 +975,30 @@ gdk_x11_get_xatom_by_name
|
||||
gdk_x11_get_xatom_by_name_for_display
|
||||
gdk_x11_get_xatom_name
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
gdk_x11_set_sm_client_id
|
||||
gdk_x11_display_text_property_to_text_list
|
||||
gdk_x11_free_text_list
|
||||
gdk_x11_display_string_to_compound_text
|
||||
gdk_x11_display_utf8_to_compound_text
|
||||
gdk_x11_free_compound_text
|
||||
|
||||
<SUBSECTION Private>
|
||||
GDK_HAVE_WCHAR_H
|
||||
GDK_HAVE_WCTYPE_H
|
||||
gdk_x11_app_launch_context_get_type
|
||||
gdk_x11_cursor_get_type
|
||||
gdk_x11_device_core_get_type
|
||||
gdk_x11_device_manager_core_get_type
|
||||
gdk_x11_device_manager_xi2_get_type
|
||||
gdk_x11_device_manager_xi_get_type
|
||||
gdk_x11_device_xi2_get_type
|
||||
gdk_x11_device_xi_get_type
|
||||
gdk_x11_display_get_type
|
||||
gdk_x11_display_manager_get_type
|
||||
gdk_x11_drag_context_get_type
|
||||
gdk_x11_keymap_get_type
|
||||
gdk_x11_screen_get_type
|
||||
gdk_x11_visual_get_type
|
||||
gdk_x11_window_get_type
|
||||
gdk_window_impl_x11_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -1033,7 +1020,6 @@ GDK_IS_APP_LAUNCH_CONTEXT
|
||||
GDK_IS_APP_LAUNCH_CONTEXT_CLASS
|
||||
GDK_TYPE_APP_LAUNCH_CONTEXT
|
||||
GdkAppLaunchContextClass
|
||||
GdkAppLaunchContextPrivate
|
||||
<SUBSECTION Private>
|
||||
gdk_app_launch_context_get_type
|
||||
</SECTION>
|
||||
|
@ -1,9 +1,13 @@
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
gdk_display_get_type
|
||||
gdk_display_manager_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_window_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_app_launch_context_get_type
|
||||
gdk_cursor_get_type
|
||||
gdk_device_get_type
|
||||
gdk_device_manager_get_type
|
||||
gdk_display_get_type
|
||||
gdk_display_manager_get_type
|
||||
gdk_drag_context_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_screen_get_type
|
||||
gdk_visual_get_type
|
||||
gdk_window_get_type
|
||||
|
@ -1,5 +1,4 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
@ -107,8 +106,8 @@ CPPFLAGS += \
|
||||
-UGTK_DISABLE_SINGLE_INCLUDES
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
$(top_builddir)/gtk/libgtk-3.0.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
@ -135,8 +134,7 @@ content_files = \
|
||||
windows.sgml \
|
||||
x11.sgml \
|
||||
gtk-query-immodules-3.0.xml \
|
||||
gtk-update-icon-cache-3.0.xml \
|
||||
gtk-builder-convert-3.0.xml \
|
||||
gtk-update-icon-cache.xml \
|
||||
visual_index.xml \
|
||||
getting_started.xml \
|
||||
overview.xml
|
||||
@ -276,6 +274,8 @@ HTML_IMAGES = \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
|
||||
$(srcdir)/images/aboutdialog.png \
|
||||
$(srcdir)/images/accel-label.png \
|
||||
$(srcdir)/images/appchooserbutton.png \
|
||||
$(srcdir)/images/appchooserdialog.png \
|
||||
$(srcdir)/images/assistant.png \
|
||||
$(srcdir)/images/button.png \
|
||||
$(srcdir)/images/check-button.png \
|
||||
@ -328,7 +328,9 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/layout-tbrl.png \
|
||||
$(srcdir)/images/window-default.png \
|
||||
$(srcdir)/images/hello-world.png \
|
||||
$(srcdir)/images/switch.png
|
||||
$(srcdir)/images/grid-packing.png \
|
||||
$(srcdir)/images/drawing.png \
|
||||
$(srcdir)/images/switch.png \
|
||||
$(srcdir)/images/linear.png \
|
||||
$(srcdir)/images/ease.png \
|
||||
$(srcdir)/images/ease-in-out.png \
|
||||
@ -352,7 +354,9 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/sliders.png \
|
||||
$(srcdir)/images/focus.png \
|
||||
$(srcdir)/images/handles.png \
|
||||
$(srcdir)/images/extensions.png
|
||||
$(srcdir)/images/extensions.png \
|
||||
$(srcdir)/images/numerableicon.png \
|
||||
$(srcdir)/images/numerableicon2.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
|
||||
@ -371,8 +375,7 @@ EXTRA_DIST += version.xml.in
|
||||
|
||||
man_MANS = \
|
||||
gtk-query-immodules-3.0.1 \
|
||||
gtk-update-icon-cache-3.0.1 \
|
||||
gtk-builder-convert-3.0.1
|
||||
gtk-update-icon-cache.1
|
||||
|
||||
if ENABLE_MAN
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-building" revision="6 Sept 2001">
|
||||
<refentry id="gtk-building">
|
||||
<refmeta>
|
||||
<refentrytitle>Compiling the GTK+ libraries</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
@ -30,7 +30,7 @@ How to compile GTK+ itself
|
||||
your operating system will be available, either from your
|
||||
operating system vendor or from independent sources. If such a
|
||||
set of packages is available, installing it will get you
|
||||
programming wih GTK+ much faster than building it yourself. In
|
||||
programming with GTK+ much faster than building it yourself. In
|
||||
fact, you may well already have GTK+ installed on your system
|
||||
already.
|
||||
</para>
|
||||
@ -45,7 +45,7 @@ How to compile GTK+ itself
|
||||
</para>
|
||||
<para>
|
||||
If you are building GTK+ from the distributed source packages,
|
||||
then won't need these tools installed; the necessary pieces
|
||||
then you won't need these tools installed; the necessary pieces
|
||||
of the tools are already included in the source packages. But
|
||||
it's useful to know a bit about how packages that use these
|
||||
tools work. A source package is distributed as a
|
||||
@ -57,14 +57,15 @@ How to compile GTK+ itself
|
||||
tar xvfj gtk+-3.0.0.tar.bz2
|
||||
</programlisting>
|
||||
<para>
|
||||
In the toplevel of the directory that is created, there will be
|
||||
In the toplevel directory that is created, there will be
|
||||
a shell script called <filename>configure</filename> which
|
||||
you then run to take the template makefiles called
|
||||
<filename>Makefile.in</filename> in the package and create
|
||||
makefiles customized for your operating system. The <filename>configure</filename>
|
||||
script can be passed various command line arguments to determine how
|
||||
the package is built and installed. The most commonly useful
|
||||
argument is the <systemitem>--prefix</systemitem> argument which
|
||||
makefiles customized for your operating system.
|
||||
The <filename>configure</filename> script can be passed
|
||||
various command line arguments to determine how the package
|
||||
is built and installed. The most commonly useful argument is
|
||||
the <systemitem>--prefix</systemitem> argument which
|
||||
determines where the package is installed. To install a package
|
||||
in <filename>/opt/gtk</filename> you would run configure as:
|
||||
</para>
|
||||
@ -210,22 +211,6 @@ How to compile GTK+ itself
|
||||
message translation databases.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The <ulink url="http://en.wikipedia.org/wiki/Libjpeg">JPEG</ulink>,
|
||||
<ulink url="http://www.libpng.org">PNG</ulink>, and
|
||||
<ulink url="http://www.libtiff.org">TIFF</ulink> image
|
||||
loading libraries are needed to compile GTK+. You probably
|
||||
already have these libraries installed, but if not, the
|
||||
versions you need are available in the
|
||||
<filename>dependencies</filename> directory on the the
|
||||
<ulink url="ftp://ftp.gtk.org/pub/gtk/v2.10/dependencies/">GTK+
|
||||
FTP site.</ulink>. (Before installing these libraries
|
||||
from source, you should check if your operating system
|
||||
vendor has prebuilt packages of these libraries that you
|
||||
don't have installed.)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The libraries from the X window system are needed to build
|
||||
@ -246,10 +231,16 @@ How to compile GTK+ itself
|
||||
<para>
|
||||
<ulink url="http://www.cairographics.org">Cairo</ulink>
|
||||
is a graphics library that supports vector graphics and image
|
||||
compositing. Both Pango and GTK+ use cairo for much of their
|
||||
compositing. Both Pango and GTK+ use cairo for all of their
|
||||
drawing.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The GdkPixbuf library provides facilities for loading
|
||||
images in a variety of file formats.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<ulink url="http://live.gnome.org/GObjectIntrospection">gobject-introspection</ulink>
|
||||
@ -289,8 +280,8 @@ How to compile GTK+ itself
|
||||
<literal>make install</literal> mentioned above. If you're
|
||||
lucky, this will all go smoothly, and you'll be ready to
|
||||
<link linkend="gtk-compiling">start compiling your own GTK+
|
||||
applications</link>. You can test your GTK+ installation
|
||||
by running the <command>gtk-demo</command> program that
|
||||
applications</link>. You can test your GTK+ installation
|
||||
by running the <command>gtk3-demo</command> program that
|
||||
GTK+ installs.
|
||||
</para>
|
||||
<para>
|
||||
@ -327,7 +318,7 @@ How to compile GTK+ itself
|
||||
<arg>--with-included-immodules=MODULE1,MODULE2,...</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--enable-debug=[no|minimum|yes]</arg>
|
||||
<arg>--enable-debug=[no/minimum/yes]</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--disable-Bsymbolic</arg>
|
||||
@ -354,13 +345,27 @@ How to compile GTK+ itself
|
||||
<arg>--enable-papi</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--with-xinput=[no|yes]</arg>
|
||||
<arg>--enable-xinput</arg>
|
||||
<arg>--disable-xinput</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--with-gdktarget=[x11|win32|quartz]</arg>
|
||||
<arg>--enable-packagekit</arg>
|
||||
<arg>--disable-packagekit</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--disable-introspection</arg>
|
||||
<arg>--enable-x11-backend</arg>
|
||||
<arg>--disable-x11-backend</arg>
|
||||
<arg>--enable-win32-backend</arg>
|
||||
<arg>--disable-win32-backend</arg>
|
||||
<arg>--enable-quartz-backend</arg>
|
||||
<arg>--disable-quartz-backend</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--enable-introspection=[no/auto/yes]</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg>--enable-gtk2-dependency</arg>
|
||||
<arg>--disable-gtk2-dependency</arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
</para>
|
||||
@ -371,14 +376,14 @@ How to compile GTK+ itself
|
||||
|
||||
<para>
|
||||
Normally GTK+ will try to build the input method modules
|
||||
as little shared libraries that are loaded on
|
||||
demand. The <systemitem>--disable-modules</systemitem>
|
||||
argument indicates that they should all be built statically
|
||||
into the GTK+ library instead. This is useful for
|
||||
people who need to produce statically-linked binaries. If
|
||||
neither <systemitem>--disable-modules</systemitem> nor
|
||||
<systemitem>--enable-modules</systemitem> is specified, then
|
||||
the <command>configure</command> script will try to
|
||||
as little shared libraries that are loaded on demand.
|
||||
The <systemitem>--disable-modules</systemitem> argument
|
||||
indicates that they should all be built statically
|
||||
into the GTK+ library instead. This is useful for
|
||||
people who need to produce statically-linked binaries.
|
||||
If neither <systemitem>--disable-modules</systemitem> nor
|
||||
<systemitem>--enable-modules</systemitem> is specified,
|
||||
then the <command>configure</command> script will try to
|
||||
auto-detect whether shared modules work on your system.
|
||||
</para>
|
||||
</formalpara>
|
||||
@ -388,7 +393,8 @@ How to compile GTK+ itself
|
||||
|
||||
<para>
|
||||
This option allows you to specify which input method modules you
|
||||
want to include.
|
||||
want to include directly into the GTK+ shared library, as opposed
|
||||
to building them as loadable modules.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
@ -396,10 +402,9 @@ How to compile GTK+ itself
|
||||
<title><systemitem>--enable-debug</systemitem></title>
|
||||
|
||||
<para>
|
||||
Turns on various amounts of debugging support. Setting this to 'no'
|
||||
disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and
|
||||
all cast checks between different object types. Setting it to 'minimum'
|
||||
disables only cast checks. Setting it to 'yes' enables
|
||||
Turns on various amounts of debugging support. Setting this to
|
||||
'no' disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and all cast checks between different object types. Setting it
|
||||
to 'minimum' disables only cast checks. Setting it to 'yes' enables
|
||||
<link linkend="GTK-Debug-Options">runtime debugging</link>.
|
||||
The default is 'minimum'.
|
||||
Note that 'no' is fast, but dangerous as it tends to destabilize
|
||||
@ -416,6 +421,8 @@ How to compile GTK+ itself
|
||||
<para>
|
||||
The option <systemitem>--disable-Bsymbolic</systemitem>
|
||||
turns off the use of the -Bsymbolic-functions linker flag.
|
||||
This is only necessary if you want to override GTK+ functions
|
||||
by using <envar>LD_PRELOAD</envar>.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
@ -469,6 +476,21 @@ How to compile GTK+ itself
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-xinput</systemitem> and
|
||||
<systemitem>--enable-xinput</systemitem></title>
|
||||
<para>
|
||||
Controls whether GTK+ is built with support for the XInput
|
||||
or XInput2 extension. These extensions provide an extended
|
||||
interface to input devices such as graphics tablets.
|
||||
When this support is compiled in, specially written
|
||||
GTK+ programs can get access to subpixel positions,
|
||||
multiple simultaneous input devices, and extra "axes"
|
||||
provided by the device such as pressure and tilt
|
||||
information.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-gtk-doc</systemitem> and
|
||||
<systemitem>--enable-gtk-doc</systemitem></title>
|
||||
@ -513,33 +535,54 @@ How to compile GTK+ itself
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--with-xinput</systemitem></title>
|
||||
<title><systemitem>--disable-packagekit</systemitem> and
|
||||
<systemitem>--enable-packagekit</systemitem></title>
|
||||
<para>
|
||||
Controls whether GTK+ is built with support for the XInput
|
||||
or XInput2 extension. These extensions provide an extended
|
||||
interface to input devices such as graphics tablets.
|
||||
When this support is compiled in, specially written
|
||||
GTK+ programs can get access to subpixel positions,
|
||||
multiple simultaneous input devices, and extra "axes"
|
||||
provided by the device such as pressure and tilt
|
||||
information.
|
||||
By default the <command>configure</command> script will try
|
||||
to build the PackageKit support for the open-with dialog if
|
||||
the PackageKit libraries are found.
|
||||
These options can be used to explicitly control whether
|
||||
PackageKit support should be built.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--with-gdktarget</systemitem></title>
|
||||
<title><systemitem>--enable-x11-backend</systemitem>,
|
||||
<systemitem>--disable-x11-backend</systemitem>,
|
||||
<systemitem>--enable-win32-backend</systemitem>,
|
||||
<systemitem>--disable-win32-backend</systemitem>,
|
||||
<systemitem>--enable-quartz-backend</systemitem>,
|
||||
and <systemitem>--disable-quartz-backend</systemitem></title>
|
||||
|
||||
<para>
|
||||
Toggles between the supported backends for GDK.
|
||||
The default is x11, unless the platform is Windows, in which
|
||||
case the default is win32. Other supported backends are
|
||||
the quartz backend for OS X.
|
||||
Enables specific backends for GDK. If none of these options
|
||||
are given, the x11 backend will be enabled by default,
|
||||
unless the platform is Windows, in which case the default is
|
||||
win32. If any backend is explicitly enabled or disabled, no
|
||||
other platform will be enabled automatically. Other
|
||||
supported backends are the quartz backend for OS X.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--disable-introspection</systemitem></title>
|
||||
<title><systemitem>--enable-introspection</systemitem></title>
|
||||
|
||||
<para>
|
||||
Build without introspection support.
|
||||
Build with or without introspection support.
|
||||
The default is 'auto'.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--enable-gtk2-dependency</systemitem> or
|
||||
<systemitem>--disable-gtk2-dependency</systemitem></title>
|
||||
|
||||
<para>
|
||||
Whether to rely on an exiting gtk-update-icon-cache utility
|
||||
instead of building our own. Distributions which are shipping
|
||||
both GTK+ 2.x and GTK+ 3 may want to use this option to
|
||||
avoid file conflicts between these packages.
|
||||
The default is to build gtk-update-icon-cache.
|
||||
</para>
|
||||
</formalpara>
|
||||
</refsect1>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-compiling" revision="4 Feb 2001">
|
||||
<refentry id="gtk-compiling">
|
||||
<refmeta>
|
||||
<refentrytitle>Compiling GTK+ Applications</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
@ -32,7 +32,7 @@ your system may be different):
|
||||
$ pkg-config --cflags gtk+-3.0
|
||||
-pthread -I/usr/include/gtk-3.0 -I/usr/lib64/gtk-3.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
|
||||
$ pkg-config --libs gtk+-3.0
|
||||
-pthread -lgtk-x11-3.0 -lgdk-x11-3.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-3.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
|
||||
-pthread -lgtk-3.0 -lgdk-3.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-3.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
@ -69,24 +69,5 @@ define the preprocessor symbol GDK_MULTIDEVICE_SAFE by using the command
|
||||
line option <literal>-DGTK_MULTIDEVICE_SAFE=1</literal>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The recommended way of using GTK+ has always been to only include the
|
||||
toplevel headers <filename>gtk.h</filename>, <filename>gdk.h</filename>,
|
||||
<filename>gdk-pixbuf.h</filename>.
|
||||
If you want to make sure that your program follows this recommended
|
||||
practise, you can define the preprocessor symbols GTK_DISABLE_SINGLE_INCLUDES
|
||||
and GDK_PIXBUF_DISABLE_SINGLE_INCLUDES to make GTK+ generate an error
|
||||
when individual headers are directly included.
|
||||
There are some exceptions: <filename>gdkkeysyms.h</filename> is not included in
|
||||
<filename>gdk.h</filename> because the file is quite large; see
|
||||
<link linkend="gdk-Keyboard-Handling">Key Values documentation</link>.
|
||||
<filename>gdkx.h</filename> must be included independently because It's
|
||||
platform-specific; see
|
||||
<link linkend="gdk-X-Window-System-Interaction">X Window System Interaction</link>
|
||||
documentation.
|
||||
The same for <filename>gtkunixprint.h</filename> if you use the non-portable
|
||||
<link linkend="GtkPrintUnixDialog">GtkPrintUnixDialog</link> API.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
@ -12,97 +12,176 @@
|
||||
<link linkend="gtk-compiling">Compiling the GTK+ libraries</link>
|
||||
section in this reference.</para>
|
||||
|
||||
<para>To begin our introduction to GTK, we'll start with the simplest
|
||||
program possible. This program will create an empty 200x200 pixel
|
||||
window:</para>
|
||||
<section>
|
||||
<title>Basics</title>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="window-default.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
<para>To begin our introduction to GTK, we'll start with the simplest
|
||||
program possible. This program will create an empty 200x200 pixel
|
||||
window:</para>
|
||||
|
||||
<informalexample><programlisting>
|
||||
<xi:include href="../../../../examples/window-default.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
<inlinegraphic fileref="window-default.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<para>You can compile the program above with GCC using:</para>
|
||||
|
||||
<para><literallayout>
|
||||
<literal>gcc `pkg-config --cflags gtk+-3.0` -o window-default window-default.c `pkg-config --libs gtk+-3.0`</literal>
|
||||
</literallayout></para>
|
||||
|
||||
<note><para>For more information on how to compile a GTK+ application, please
|
||||
refer to the <link linkend="gtk-compiling">Compiling GTK+ Applications</link>
|
||||
section in this reference.</para></note>
|
||||
|
||||
<para>All GTK+ applications will, of course, include
|
||||
<filename>gtk/gtk.h</filename>, which declares functions, types and
|
||||
macros required by GTK+ applications.</para>
|
||||
|
||||
<warning><para>Even if GTK+ installs multiple header files, only the
|
||||
top-level <filename>gtk/gtk.h</filename> header can be directly included
|
||||
by third party code. The compiler will abort with an error if any other
|
||||
header will be included.</para></warning>
|
||||
|
||||
<para>We then proceed into the <function>main</function>() function of the
|
||||
application, and we declare a <varname>window</varname> variable as a pointer
|
||||
of type #GtkWidget.</para>
|
||||
|
||||
<para>The following line will call gtk_init(), which
|
||||
is the initialization function for GTK+; this function will set up GTK+,
|
||||
the type system, the connection to the windowing environment, etc. The
|
||||
gtk_init() takes as arguments the pointers to the command line arguments
|
||||
counter and string array; this allows GTK+ to parse specific command line
|
||||
arguments that control the behavior of GTK+ itself. The parsed arguments
|
||||
will be removed from the array, leaving the unrecognized ones for your
|
||||
application to parse.</para>
|
||||
|
||||
<note><para>For more information on which command line arguments GTK+
|
||||
recognizes, please refer to the <link linkend="gtk-running">Running GTK+
|
||||
Applications</link> section in this reference.</para></note>
|
||||
|
||||
<para>The call to gtk_window_new() will create a new #GtkWindow and store
|
||||
it inside the <varname>window</varname> variable. The type of the window
|
||||
is %GTK_WINDOW_TOPLEVEL, which means that the #GtkWindow will be managed
|
||||
by the windowing system: it will have a frame, a title bar and window
|
||||
controls, depending on the platform.</para>
|
||||
|
||||
<para>In order to terminate the application when the #GtkWindow is
|
||||
destroyed, we connect the #GtkWidget::destroy signal to the gtk_main_quit()
|
||||
function. This function will terminate the GTK+ main loop started by calling
|
||||
gtk_main() later. The #GtkWidget::destroy signal is emitted when a widget is
|
||||
destroyed, either by explicitly calling gtk_widget_destroy() or when the
|
||||
widget is unparented. Top-level #GtkWindow<!-- -->s are also destroyed when
|
||||
the Close window control button is clicked.</para>
|
||||
|
||||
<para>#GtkWidget<!-- -->s are hidden by default. By calling gtk_widget_show()
|
||||
on a #GtkWidget we are asking GTK+ to set the visibility attribute so that it
|
||||
can be displayed. All this work is done after the main loop has been
|
||||
started.</para>
|
||||
|
||||
<para>The last line of interest is the call to gtk_main(). This function will
|
||||
start the GTK+ main loop and will block the control flow of the
|
||||
<function>main</function>() until the gtk_main_quit() function is
|
||||
called.</para>
|
||||
|
||||
<para>The following example is slightly more complex, and tries to
|
||||
showcase some of the capabilities of GTK+.</para>
|
||||
|
||||
<para>In the long tradition of programming languages and libraries,
|
||||
it is called <emphasis>Hello, World</emphasis>.</para>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="hello-world.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<example id="gtk-getting-started-hello-world">
|
||||
<title>Hello World in GTK+</title>
|
||||
<programlisting>
|
||||
<xi:include href="../../../../examples/hello-world.c" parse="text">
|
||||
<informalexample><programlisting>
|
||||
<xi:include href="../../../../examples/window-default.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting>
|
||||
</example>
|
||||
</programlisting></informalexample>
|
||||
|
||||
<para>You can compile the program above with GCC using:</para>
|
||||
|
||||
<para><literallayout>
|
||||
<literal>gcc `pkg-config --cflags gtk+-3.0` -o window-default window-default.c `pkg-config --libs gtk+-3.0`</literal>
|
||||
</literallayout></para>
|
||||
|
||||
<note><para>For more information on how to compile a GTK+ application, please
|
||||
refer to the <link linkend="gtk-compiling">Compiling GTK+ Applications</link>
|
||||
section in this reference.</para></note>
|
||||
|
||||
<para>All GTK+ applications will, of course, include
|
||||
<filename>gtk/gtk.h</filename>, which declares functions, types and
|
||||
macros required by GTK+ applications.</para>
|
||||
|
||||
<warning><para>Even if GTK+ installs multiple header files, only the
|
||||
top-level <filename>gtk/gtk.h</filename> header can be directly included
|
||||
by third party code. The compiler will abort with an error if any other
|
||||
header is directly included.</para></warning>
|
||||
|
||||
<para>We then proceed into the <function>main</function>() function of the
|
||||
application, and we declare a <varname>window</varname> variable as a pointer
|
||||
of type #GtkWidget.</para>
|
||||
|
||||
<para>The following line will call gtk_init(), which
|
||||
is the initialization function for GTK+; this function will set up GTK+,
|
||||
the type system, the connection to the windowing environment, etc. The
|
||||
gtk_init() takes as arguments the pointers to the command line arguments
|
||||
counter and string array; this allows GTK+ to parse specific command line
|
||||
arguments that control the behavior of GTK+ itself. The parsed arguments
|
||||
will be removed from the array, leaving the unrecognized ones for your
|
||||
application to parse.</para>
|
||||
|
||||
<note><para>For more information on which command line arguments GTK+
|
||||
recognizes, please refer to the <link linkend="gtk-running">Running GTK+
|
||||
Applications</link> section in this reference.</para></note>
|
||||
|
||||
<para>The call to gtk_window_new() will create a new #GtkWindow and store
|
||||
it inside the <varname>window</varname> variable. The type of the window
|
||||
is %GTK_WINDOW_TOPLEVEL, which means that the #GtkWindow will be managed
|
||||
by the windowing system: it will have a frame, a title bar and window
|
||||
controls, depending on the platform.</para>
|
||||
|
||||
<para>In order to terminate the application when the #GtkWindow is
|
||||
destroyed, we connect the #GtkWidget::destroy signal to the gtk_main_quit()
|
||||
function. This function will terminate the GTK+ main loop started by calling
|
||||
gtk_main() later. The #GtkWidget::destroy signal is emitted when a widget is
|
||||
destroyed, either by explicitly calling gtk_widget_destroy() or when the
|
||||
widget is unparented. Top-level #GtkWindow<!-- -->s are also destroyed when
|
||||
the Close window control button is clicked.</para>
|
||||
|
||||
<para>#GtkWidget<!-- -->s are hidden by default. By calling gtk_widget_show()
|
||||
on a #GtkWidget we are asking GTK+ to set the visibility attribute so that it
|
||||
can be displayed. All this work is done after the main loop has been
|
||||
started.</para>
|
||||
|
||||
<para>The last line of interest is the call to gtk_main(). This function will
|
||||
start the GTK+ main loop and will block the control flow of the
|
||||
main() until the gtk_main_quit() function is called.</para>
|
||||
|
||||
<para>While the program is running, GTK+ is receiving
|
||||
<firstterm>events</firstterm>. These are typically input events caused by
|
||||
the user interacting with your program, but also things like messages from
|
||||
the window manager or other applications. GTK+ processes these and as a
|
||||
result, <firstterm>signals</firstterm> may be emitted on your widgets.
|
||||
Connecting handlers for these signals is how you normally make your
|
||||
program do something in response to user input.</para>
|
||||
|
||||
<para>The following example is slightly more complex, and tries to
|
||||
showcase some of the capabilities of GTK+.</para>
|
||||
|
||||
<para>In the long tradition of programming languages and libraries,
|
||||
it is called <emphasis>Hello, World</emphasis>.</para>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="hello-world.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<example id="gtk-getting-started-hello-world">
|
||||
<title>Hello World in GTK+</title>
|
||||
<programlisting>
|
||||
<xi:include href="../../../../examples/hello-world.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Packing</title>
|
||||
|
||||
<para>When creating an application, you'll want to put more than one widget
|
||||
inside a window. Our first helloworld example only used one widget so we
|
||||
could simply use a gtk_container_add() call to "pack" the widget into the
|
||||
window. But when you want to put more than one widget into a window, it
|
||||
it becomes important to control how each widget is positioned and sized.
|
||||
This is where packing comes in.</para>
|
||||
|
||||
<para>GTK+ comes with a large variety of <firstterm>layout containers</firstterm>
|
||||
whose purpose it is to control the layout of the child widgets that are
|
||||
added to them. See <xref linkend="LayoutContainers"/> for an overview.</para>
|
||||
|
||||
<para>The following example shows how the GtkGrid container lets you
|
||||
arrange several buttons:</para>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="grid-packing.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<example id="gtk-getting-started-grid-packing">
|
||||
<title>Packing buttons</title>
|
||||
<programlisting>
|
||||
<xi:include href="../../../../examples/grid-packing.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Drawing</title>
|
||||
|
||||
<para>Many widgets, like buttons, do all their drawing themselves. You
|
||||
just tell them the label you want to see, and they figure out what font
|
||||
to use, draw the button outline and focus rectangle, etc. Sometimes, it
|
||||
is necessary to do some custom drawing. In that case, a #GtkDrawingArea
|
||||
might be the right widget to use. It offers a canvas on which you can
|
||||
draw by connecting to the #GtkWidget::draw signal.
|
||||
</para>
|
||||
|
||||
<para>The contents of a widget often need to be partially or fully redrawn,
|
||||
e.g. when another window is moved and uncovers part of the widget, or
|
||||
when tie window containing it is resized. It is also possible to explicitly
|
||||
cause part or all of the widget to be redrawn, by calling
|
||||
gtk_widget_queue_draw() or its variants. GTK+ takes care of most of the
|
||||
details by providing a ready-to-use cairo context to the ::draw signal
|
||||
handler.</para>
|
||||
|
||||
<para>The following example shows a ::draw signal handler. It is a bit
|
||||
more complicated than the previous examples, since it also demonstrates
|
||||
input event handling by means of ::button-press and ::motion-notify
|
||||
handlers.</para>
|
||||
|
||||
<para>
|
||||
<inlinegraphic fileref="drawing.png" format="PNG"></inlinegraphic>
|
||||
</para>
|
||||
|
||||
<example id="gtk-getting-started-drawing">
|
||||
<title>Drawing in response to input</title>
|
||||
<programlisting>
|
||||
<xi:include href="../../../../examples/drawing.c" parse="text">
|
||||
<xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
|
||||
</xi:include>
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
</chapter>
|
||||
|
@ -1,61 +0,0 @@
|
||||
<refentry id="gtk-builder-convert">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gtk-builder-convert-3.0</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gtk-builder-convert-3.0</refname>
|
||||
<refpurpose>Glade file conversion utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gtk-builder-convert-3.0</command>
|
||||
<arg choice="opt">--skip-windows</arg>
|
||||
<arg choice="opt">--root <replaceable>name</replaceable></arg>
|
||||
<arg choice="req">input</arg>
|
||||
<arg choice="req">output</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para><command>gtk-builder-convert-3.0</command> converts glade files
|
||||
into XML files which can be loaded with GtkBuilder.
|
||||
</para>
|
||||
<para>
|
||||
It expects the name of a glade file as the first argument, and writes
|
||||
its output the file specified as the second argument.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>--skip-windows</term>
|
||||
<term>-w</term>
|
||||
<listitem><para>Convert everything but GtkWindow subclasses.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>--root</term>
|
||||
<term>-r</term>
|
||||
<listitem><para>Convert only the widget named <replaceable>name</replaceable>
|
||||
and its children.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Bugs</title>
|
||||
<para>
|
||||
Toolbars are not handled.
|
||||
</para>
|
||||
<para>
|
||||
Support for accessibility is not yet implemented.
|
||||
</para>
|
||||
<para>
|
||||
The script requires a python interpreter to run.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
@ -61,6 +61,7 @@
|
||||
<xi:include href="xml/gtkgradient.xml" />
|
||||
<xi:include href="xml/gtkicontheme.xml" />
|
||||
<xi:include href="xml/gtkiconfactory.xml" />
|
||||
<xi:include href="xml/gtknumerableicon.xml" />
|
||||
<xi:include href="xml/gtkrc.xml" />
|
||||
<xi:include href="xml/gtkstyle.xml" />
|
||||
</part>
|
||||
@ -151,6 +152,9 @@
|
||||
<xi:include href="xml/gtktreemodelsort.xml" />
|
||||
<xi:include href="xml/gtktreemodelfilter.xml" />
|
||||
<xi:include href="xml/gtkcelllayout.xml" />
|
||||
<xi:include href="xml/gtkcellarea.xml" />
|
||||
<xi:include href="xml/gtkcellareabox.xml" />
|
||||
<xi:include href="xml/gtkcellareacontext.xml" />
|
||||
<xi:include href="xml/gtkcellrenderer.xml" />
|
||||
<xi:include href="xml/gtkcelleditable.xml" />
|
||||
<xi:include href="xml/gtkcellrendereraccel.xml" />
|
||||
@ -353,8 +357,7 @@
|
||||
<part>
|
||||
<title>GTK+ Tools</title>
|
||||
<xi:include href="gtk-query-immodules-3.0.xml" />
|
||||
<xi:include href="gtk-update-icon-cache-3.0.xml" />
|
||||
<xi:include href="gtk-builder-convert-3.0.xml" />
|
||||
<xi:include href="gtk-update-icon-cache.xml" />
|
||||
</part>
|
||||
|
||||
<xi:include href="glossary.xml" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-query-immodules">
|
||||
<refentry id="gtk-query-immodules-3.0">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gtk-query-immodules-3.0</refentrytitle>
|
||||
|
@ -5,18 +5,18 @@
|
||||
<refentry id="gtk-update-icon-cache">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gtk-update-icon-cache-3.0</refentrytitle>
|
||||
<refentrytitle>gtk-update-icon-cache</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gtk-update-icon-cache-3.0</refname>
|
||||
<refname>gtk-update-icon-cache</refname>
|
||||
<refpurpose>Icon theme caching utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gtk-update-icon-cache-3.0</command>
|
||||
<command>gtk-update-icon-cache</command>
|
||||
<arg choice="opt">--force</arg>
|
||||
<arg choice="opt">--ignore-theme-index</arg>
|
||||
<arg choice="opt">--index-only</arg>
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para>
|
||||
<command>gtk-update-icon-cache-3.0</command> creates mmap()able cache
|
||||
<command>gtk-update-icon-cache</command> creates mmap()able cache
|
||||
files for icon themes.
|
||||
</para>
|
||||
<para>
|
||||
@ -39,7 +39,7 @@
|
||||
information about the icons in the directory tree below the given directory.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ can use the cache files created by <command>gtk-update-icon-cache-3.0</command>
|
||||
GTK+ can use the cache files created by <command>gtk-update-icon-cache</command>
|
||||
to avoid a lot of system call and disk seek overhead when the application
|
||||
starts. Since the format of the cache files allows them to be mmap()ed
|
||||
shared between multiple applications, the overall memory consumption is
|
||||
@ -60,7 +60,7 @@
|
||||
<term>--ignore-theme-index</term>
|
||||
<term>-t</term>
|
||||
<listitem><para>Don't check for the existence of 'index.theme' in the icon
|
||||
theme directory. Without this option, <command>gtk-update-icon-cache-3.0</command>
|
||||
theme directory. Without this option, <command>gtk-update-icon-cache</command>
|
||||
refuses to create an icon cache in a directory which does not appear to
|
||||
be the toplevel directory of an icon theme.
|
||||
</para></listitem>
|
||||
@ -104,5 +104,3 @@ None known yet.
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
@ -791,6 +791,8 @@ gtk_combo_box_new
|
||||
gtk_combo_box_new_with_entry
|
||||
gtk_combo_box_new_with_model
|
||||
gtk_combo_box_new_with_model_and_entry
|
||||
gtk_combo_box_new_with_area
|
||||
gtk_combo_box_new_with_area_and_entry
|
||||
gtk_combo_box_get_wrap_width
|
||||
gtk_combo_box_set_wrap_width
|
||||
gtk_combo_box_get_row_span_column
|
||||
@ -994,9 +996,6 @@ gtk_editable_get_editable
|
||||
GTK_EDITABLE
|
||||
GTK_IS_EDITABLE
|
||||
GTK_TYPE_EDITABLE
|
||||
GTK_EDITABLE_CLASS
|
||||
GTK_IS_EDITABLE_CLASS
|
||||
GTK_EDITABLE_GET_CLASS
|
||||
GTK_EDITABLE_GET_IFACE
|
||||
<SUBSECTION Private>
|
||||
gtk_editable_get_type
|
||||
@ -1119,6 +1118,7 @@ gtk_entry_buffer_get_type
|
||||
GtkEntryCompletion
|
||||
GtkEntryCompletionMatchFunc
|
||||
gtk_entry_completion_new
|
||||
gtk_entry_completion_new_with_area
|
||||
gtk_entry_completion_get_entry
|
||||
gtk_entry_completion_set_model
|
||||
gtk_entry_completion_get_model
|
||||
@ -1621,6 +1621,7 @@ gtk_hseparator_get_type
|
||||
GtkIconView
|
||||
GtkIconViewForeachFunc
|
||||
gtk_icon_view_new
|
||||
gtk_icon_view_new_with_area
|
||||
gtk_icon_view_new_with_model
|
||||
gtk_icon_view_set_model
|
||||
gtk_icon_view_get_model
|
||||
@ -1678,7 +1679,7 @@ gtk_icon_view_unset_model_drag_source
|
||||
gtk_icon_view_unset_model_drag_dest
|
||||
gtk_icon_view_set_reorderable
|
||||
gtk_icon_view_get_reorderable
|
||||
gtk_icon_view_set_drag_dest_item
|
||||
gtk_icon_view_set_drag_dest_item
|
||||
gtk_icon_view_get_drag_dest_item
|
||||
gtk_icon_view_get_dest_item_at_pos
|
||||
gtk_icon_view_create_drag_icon
|
||||
@ -1736,9 +1737,7 @@ GTK_IMAGE_GET_CLASS
|
||||
GtkImagePrivate
|
||||
gtk_image_get_type
|
||||
GtkImageIconSetData
|
||||
GtkImageImageData
|
||||
GtkImagePixbufData
|
||||
GtkImagePixmapData
|
||||
GtkImageStockData
|
||||
GtkImageAnimationData
|
||||
GtkImageIconNameData
|
||||
@ -2120,6 +2119,8 @@ gtk_menu_shell_activate_item
|
||||
gtk_menu_shell_cancel
|
||||
gtk_menu_shell_set_take_focus
|
||||
gtk_menu_shell_get_take_focus
|
||||
gtk_menu_shell_get_selected_item
|
||||
gtk_menu_shell_get_parent_shell
|
||||
GtkMenuDirectionType
|
||||
<SUBSECTION Standard>
|
||||
GTK_MENU_SHELL
|
||||
@ -2269,6 +2270,34 @@ GtkNotebookTab
|
||||
GtkNotebookPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtknumerableicon</FILE>
|
||||
<TITLE>GtkNumerableIcon</TITLE>
|
||||
GtkNumerableIcon
|
||||
gtk_numerable_icon_new
|
||||
gtk_numerable_icon_new_with_style_context
|
||||
gtk_numerable_icon_get_background_gicon
|
||||
gtk_numerable_icon_set_background_gicon
|
||||
gtk_numerable_icon_get_background_icon_name
|
||||
gtk_numerable_icon_set_background_icon_name
|
||||
gtk_numerable_icon_get_count
|
||||
gtk_numerable_icon_set_count
|
||||
gtk_numerable_icon_get_label
|
||||
gtk_numerable_icon_set_label
|
||||
gtk_numerable_icon_get_style_context
|
||||
gtk_numerable_icon_set_style_context
|
||||
<SUBSECTION Standard>
|
||||
GTK_NUMERABLE_ICON
|
||||
GTK_IS_NUMERABLE_ICON
|
||||
GTK_TYPE_NUMERABLE_ICON
|
||||
GTK_NUMERABLE_ICON_CLASS
|
||||
GTK_IS_NUMERABLE_ICON_CLASS
|
||||
GTK_NUMERABLE_ICON_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_numerable_icon_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkoffscreenwindow</FILE>
|
||||
<TITLE>GtkOffscreenWindow</TITLE>
|
||||
@ -2449,15 +2478,15 @@ gtk_range_set_fill_level
|
||||
gtk_range_set_restrict_to_fill_level
|
||||
gtk_range_set_show_fill_level
|
||||
gtk_range_get_adjustment
|
||||
gtk_range_set_update_policy
|
||||
gtk_range_set_adjustment
|
||||
gtk_range_get_inverted
|
||||
gtk_range_set_inverted
|
||||
gtk_range_get_update_policy
|
||||
gtk_range_get_value
|
||||
gtk_range_set_value
|
||||
gtk_range_set_increments
|
||||
gtk_range_set_range
|
||||
gtk_range_set_value
|
||||
gtk_range_get_round_digits
|
||||
gtk_range_set_round_digits
|
||||
GtkSensitivityType
|
||||
gtk_range_set_lower_stepper_sensitivity
|
||||
gtk_range_get_lower_stepper_sensitivity
|
||||
@ -2482,8 +2511,6 @@ GTK_RANGE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_range_get_type
|
||||
GtkRangePrivate
|
||||
GtkRangeLayout
|
||||
GtkRangeStepTimer
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -2772,13 +2799,11 @@ gtk_scrollable_set_vscroll_policy
|
||||
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkScrollableIface
|
||||
GTK_IS_SCROLLABLE
|
||||
GTK_IS_SCROLLABLE_CLASS
|
||||
GTK_SCROLLABLE
|
||||
GTK_SCROLLABLE_CLASS
|
||||
GTK_SCROLLABLE_GET_IFACE
|
||||
GtkScrollableInterface
|
||||
GTK_TYPE_SCROLLABLE
|
||||
GTK_SCROLLABLE
|
||||
GTK_IS_SCROLLABLE
|
||||
GTK_SCROLLABLE_GET_IFACE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_scrollable_get_type
|
||||
@ -3001,7 +3026,7 @@ GTK_SPINNER
|
||||
GTK_IS_SPINNER
|
||||
GTK_TYPE_SPINNER
|
||||
GTK_SPINNER_CLASS
|
||||
GTK_IS_SPINER_CLASS
|
||||
GTK_IS_SPINNER_CLASS
|
||||
GTK_SPINNER_GET_CLASS
|
||||
GTK_IS_SPINNER_CLASS
|
||||
|
||||
@ -3227,7 +3252,6 @@ GTK_TEXT_BUFFER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkTextBufferPrivate
|
||||
gtk_text_buffer_get_type
|
||||
GtkTextLogAttrCache
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -3496,8 +3520,6 @@ GtkTextViewPrivate
|
||||
gtk_text_view_get_type
|
||||
gtk_text_child_anchor_get_type
|
||||
GtkTextBTree
|
||||
GtkTextWindow
|
||||
GtkTextPendingScroll
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -3929,6 +3951,7 @@ gtk_tree_model_get_iter_first
|
||||
gtk_tree_model_get_path
|
||||
gtk_tree_model_get_value
|
||||
gtk_tree_model_iter_next
|
||||
gtk_tree_model_iter_previous
|
||||
gtk_tree_model_iter_children
|
||||
gtk_tree_model_iter_has_child
|
||||
gtk_tree_model_iter_n_children
|
||||
@ -4145,6 +4168,7 @@ GtkTreeViewColumnSizing
|
||||
GtkTreeCellDataFunc
|
||||
GtkTreeViewColumn
|
||||
gtk_tree_view_column_new
|
||||
gtk_tree_view_column_new_with_area
|
||||
gtk_tree_view_column_new_with_attributes
|
||||
gtk_tree_view_column_pack_start
|
||||
gtk_tree_view_column_pack_end
|
||||
@ -4333,6 +4357,7 @@ gtk_tree_view_get_type
|
||||
<TITLE>GtkCellView</TITLE>
|
||||
GtkCellView
|
||||
gtk_cell_view_new
|
||||
gtk_cell_view_new_with_context
|
||||
gtk_cell_view_new_with_text
|
||||
gtk_cell_view_new_with_markup
|
||||
gtk_cell_view_new_with_pixbuf
|
||||
@ -4343,6 +4368,10 @@ gtk_cell_view_get_displayed_row
|
||||
gtk_cell_view_get_size_of_row
|
||||
gtk_cell_view_set_background_color
|
||||
gtk_cell_view_set_background_rgba
|
||||
gtk_cell_view_set_draw_sensitive
|
||||
gtk_cell_view_get_draw_sensitive
|
||||
gtk_cell_view_set_fit_model
|
||||
gtk_cell_view_get_fit_model
|
||||
<SUBSECTION Standard>
|
||||
GtkCellViewClass
|
||||
GTK_TYPE_CELL_VIEW
|
||||
@ -4364,6 +4393,7 @@ GtkCellLayoutIface
|
||||
GtkCellLayoutDataFunc
|
||||
gtk_cell_layout_pack_start
|
||||
gtk_cell_layout_pack_end
|
||||
gtk_cell_layout_get_area
|
||||
gtk_cell_layout_get_cells
|
||||
gtk_cell_layout_reorder
|
||||
gtk_cell_layout_clear
|
||||
@ -4380,6 +4410,129 @@ GTK_CELL_LAYOUT_GET_IFACE
|
||||
gtk_cell_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcellarea</FILE>
|
||||
<TITLE>GtkCellArea</TITLE>
|
||||
GtkCellArea
|
||||
GtkCellAreaClass
|
||||
GtkCellCallback
|
||||
GtkCellAllocCallback
|
||||
GTK_CELL_AREA_WARN_INVALID_CELL_PROPERTY_ID
|
||||
gtk_cell_area_add
|
||||
gtk_cell_area_remove
|
||||
gtk_cell_area_has_renderer
|
||||
gtk_cell_area_foreach
|
||||
gtk_cell_area_foreach_alloc
|
||||
gtk_cell_area_event
|
||||
gtk_cell_area_render
|
||||
gtk_cell_area_set_style_detail
|
||||
gtk_cell_area_get_style_detail
|
||||
gtk_cell_area_get_cell_allocation
|
||||
gtk_cell_area_get_cell_at_position
|
||||
gtk_cell_area_create_context
|
||||
gtk_cell_area_copy_context
|
||||
gtk_cell_area_get_request_mode
|
||||
gtk_cell_area_get_preferred_width
|
||||
gtk_cell_area_get_preferred_height_for_width
|
||||
gtk_cell_area_get_preferred_height
|
||||
gtk_cell_area_get_preferred_width_for_height
|
||||
gtk_cell_area_get_current_path_string
|
||||
gtk_cell_area_apply_attributes
|
||||
gtk_cell_area_attribute_connect
|
||||
gtk_cell_area_attribute_disconnect
|
||||
gtk_cell_area_class_install_cell_property
|
||||
gtk_cell_area_class_find_cell_property
|
||||
gtk_cell_area_class_list_cell_properties
|
||||
gtk_cell_area_add_with_properties
|
||||
gtk_cell_area_cell_set
|
||||
gtk_cell_area_cell_get
|
||||
gtk_cell_area_cell_set_valist
|
||||
gtk_cell_area_cell_get_valist
|
||||
gtk_cell_area_cell_set_property
|
||||
gtk_cell_area_cell_get_property
|
||||
gtk_cell_area_is_activatable
|
||||
gtk_cell_area_activate
|
||||
gtk_cell_area_focus
|
||||
gtk_cell_area_set_focus_cell
|
||||
gtk_cell_area_get_focus_cell
|
||||
gtk_cell_area_add_focus_sibling
|
||||
gtk_cell_area_remove_focus_sibling
|
||||
gtk_cell_area_is_focus_sibling
|
||||
gtk_cell_area_get_focus_siblings
|
||||
gtk_cell_area_get_focus_from_sibling
|
||||
gtk_cell_area_get_edited_cell
|
||||
gtk_cell_area_get_edit_widget
|
||||
gtk_cell_area_activate_cell
|
||||
gtk_cell_area_stop_editing
|
||||
gtk_cell_area_inner_cell_area
|
||||
gtk_cell_area_request_renderer
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_AREA
|
||||
GTK_IS_CELL_AREA
|
||||
GTK_TYPE_CELL_AREA
|
||||
gtk_cell_area_get_type
|
||||
GTK_CELL_AREA_CLASS
|
||||
GTK_IS_CELL_AREA_CLASS
|
||||
GTK_CELL_AREA_GET_CLASS
|
||||
GtkCellAreaPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcellareacontext</FILE>
|
||||
<TITLE>GtkCellAreaContext</TITLE>
|
||||
GtkCellAreaContextClass
|
||||
GtkCellAreaContext
|
||||
gtk_cell_area_context_get_area
|
||||
gtk_cell_area_context_allocate
|
||||
gtk_cell_area_context_reset
|
||||
gtk_cell_area_context_get_preferred_width
|
||||
gtk_cell_area_context_get_preferred_height
|
||||
gtk_cell_area_context_get_preferred_height_for_width
|
||||
gtk_cell_area_context_get_preferred_width_for_height
|
||||
gtk_cell_area_context_get_allocation
|
||||
gtk_cell_area_context_push_preferred_width
|
||||
gtk_cell_area_context_push_preferred_height
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_AREA_CONTEXT
|
||||
GTK_IS_CELL_AREA_CONTEXT
|
||||
GTK_TYPE_CELL_AREA_CONTEXT
|
||||
gtk_cell_area_context_get_type
|
||||
GTK_CELL_AREA_CONTEXT_CLASS
|
||||
GTK_IS_CELL_AREA_CONTEXT_CLASS
|
||||
GTK_CELL_AREA_CONTEXT_GET_CLASS
|
||||
GtkCellAreaContextPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcellareabox</FILE>
|
||||
<TITLE>GtkCellAreaBox</TITLE>
|
||||
GtkCellAreaBox
|
||||
GtkCellAreaBoxClass
|
||||
gtk_cell_area_box_new
|
||||
gtk_cell_area_box_pack_start
|
||||
gtk_cell_area_box_pack_end
|
||||
gtk_cell_area_box_get_spacing
|
||||
gtk_cell_area_box_set_spacing
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_AREA_BOX
|
||||
GTK_IS_CELL_AREA_BOX
|
||||
GTK_TYPE_CELL_AREA_BOX
|
||||
GTK_CELL_AREA_BOX_CLASS
|
||||
GTK_IS_CELL_AREA_BOX_CLASS
|
||||
GTK_CELL_AREA_BOX_GET_CLASS
|
||||
GTK_CELL_AREA_BOX_CONTEXT
|
||||
GTK_CELL_AREA_BOX_CONTEXT_CLASS
|
||||
GTK_CELL_AREA_BOX_CONTEXT_GET_CLASS
|
||||
GTK_IS_CELL_AREA_BOX_CONTEXT
|
||||
GTK_IS_CELL_AREA_BOX_CONTEXT_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_area_box_get_type
|
||||
GtkCellAreaBoxPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcellrenderer</FILE>
|
||||
<TITLE>GtkCellRenderer</TITLE>
|
||||
@ -4387,6 +4540,7 @@ GtkCellRendererState
|
||||
GtkCellRendererMode
|
||||
GtkCellRenderer
|
||||
GtkCellRendererClass
|
||||
gtk_cell_renderer_get_aligned_area
|
||||
gtk_cell_renderer_get_size
|
||||
gtk_cell_renderer_render
|
||||
gtk_cell_renderer_activate
|
||||
@ -4402,6 +4556,7 @@ gtk_cell_renderer_get_alignment
|
||||
gtk_cell_renderer_set_alignment
|
||||
gtk_cell_renderer_get_padding
|
||||
gtk_cell_renderer_set_padding
|
||||
gtk_cell_renderer_is_activatable
|
||||
|
||||
<SUBSECTION Width-for-height>
|
||||
gtk_cell_renderer_get_preferred_height
|
||||
@ -4410,8 +4565,6 @@ gtk_cell_renderer_get_preferred_size
|
||||
gtk_cell_renderer_get_preferred_width
|
||||
gtk_cell_renderer_get_preferred_width_for_height
|
||||
gtk_cell_renderer_get_request_mode
|
||||
gtk_cell_view_get_desired_height_for_width_of_row
|
||||
gtk_cell_view_get_desired_width_of_row
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER
|
||||
@ -4423,6 +4576,8 @@ GTK_CELL_RENDERER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkCellRendererPrivate
|
||||
gtk_cell_renderer_get_type
|
||||
gtk_cell_renderer_mode_get_type
|
||||
gtk_cell_renderer_state_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -4586,6 +4741,7 @@ GTK_IS_CELL_RENDERER_ACCEL_CLASS
|
||||
GTK_CELL_RENDERER_ACCEL_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_renderer_accel_get_type
|
||||
gtk_cell_renderer_accel_mode_get_type
|
||||
GtkCellRendererAccelPrivate
|
||||
</SECTION>
|
||||
|
||||
@ -4818,11 +4974,11 @@ gtk_widget_get_parent_window
|
||||
gtk_widget_set_events
|
||||
gtk_widget_get_events
|
||||
gtk_widget_add_events
|
||||
gtk_widget_set_extension_events
|
||||
gtk_widget_get_extension_events
|
||||
gtk_widget_set_device_events
|
||||
gtk_widget_get_device_events
|
||||
gtk_widget_add_device_events
|
||||
gtk_widget_set_device_enabled
|
||||
gtk_widget_get_device_enabled
|
||||
gtk_widget_get_toplevel
|
||||
gtk_widget_get_ancestor
|
||||
gtk_widget_get_visual
|
||||
@ -4868,7 +5024,6 @@ gtk_widget_pop_composite_child
|
||||
gtk_widget_push_composite_child
|
||||
gtk_widget_queue_draw_area
|
||||
gtk_widget_queue_draw_region
|
||||
gtk_widget_reset_shapes
|
||||
gtk_widget_set_app_paintable
|
||||
gtk_widget_set_double_buffered
|
||||
gtk_widget_set_redraw_on_allocate
|
||||
@ -5073,8 +5228,6 @@ gtk_window_begin_resize_drag
|
||||
gtk_window_begin_move_drag
|
||||
gtk_window_set_decorated
|
||||
gtk_window_set_deletable
|
||||
gtk_window_set_frame_dimensions
|
||||
gtk_window_set_has_frame
|
||||
gtk_window_set_mnemonic_modifier
|
||||
gtk_window_set_type_hint
|
||||
gtk_window_set_skip_taskbar_hint
|
||||
@ -5090,8 +5243,6 @@ gtk_window_get_default_icon_list
|
||||
gtk_window_get_default_icon_name
|
||||
gtk_window_get_default_size
|
||||
gtk_window_get_destroy_with_parent
|
||||
gtk_window_get_frame_dimensions
|
||||
gtk_window_get_has_frame
|
||||
gtk_window_get_icon
|
||||
gtk_window_get_icon_list
|
||||
gtk_window_get_icon_name
|
||||
@ -5135,6 +5286,7 @@ gtk_window_resize_grip_is_visible
|
||||
gtk_window_get_resize_grip_area
|
||||
gtk_window_get_application
|
||||
gtk_window_set_application
|
||||
gtk_window_set_has_user_ref_count
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_WINDOW
|
||||
@ -5178,7 +5330,6 @@ gtk_window_group_get_type
|
||||
<SECTION>
|
||||
<FILE>gtkmain</FILE>
|
||||
<TITLE>General</TITLE>
|
||||
gtk_set_locale
|
||||
gtk_disable_setlocale
|
||||
gtk_get_default_language
|
||||
gtk_parse_args
|
||||
@ -5208,16 +5359,6 @@ gtk_grab_remove
|
||||
gtk_device_grab_add
|
||||
gtk_device_grab_remove
|
||||
|
||||
<SUBSECTION>
|
||||
GtkFunction
|
||||
gtk_quit_add_destroy
|
||||
gtk_quit_add
|
||||
GtkCallbackMarshal
|
||||
GtkArg
|
||||
gtk_quit_add_full
|
||||
gtk_quit_remove
|
||||
gtk_quit_remove_by_data
|
||||
|
||||
<SUBSECTION>
|
||||
GTK_PRIORITY_RESIZE
|
||||
|
||||
@ -5267,7 +5408,7 @@ GtkWidgetPath
|
||||
gtk_widget_path_append_type
|
||||
gtk_widget_path_copy
|
||||
gtk_widget_path_free
|
||||
gtk_widget_path_get_widget_type
|
||||
gtk_widget_path_get_object_type
|
||||
gtk_widget_path_has_parent
|
||||
gtk_widget_path_is_type
|
||||
gtk_widget_path_iter_add_class
|
||||
@ -5275,7 +5416,7 @@ gtk_widget_path_iter_add_region
|
||||
gtk_widget_path_iter_clear_classes
|
||||
gtk_widget_path_iter_clear_regions
|
||||
gtk_widget_path_iter_get_name
|
||||
gtk_widget_path_iter_get_widget_type
|
||||
gtk_widget_path_iter_get_object_type
|
||||
gtk_widget_path_iter_has_class
|
||||
gtk_widget_path_iter_has_name
|
||||
gtk_widget_path_iter_has_qclass
|
||||
@ -5287,10 +5428,16 @@ gtk_widget_path_iter_list_regions
|
||||
gtk_widget_path_iter_remove_class
|
||||
gtk_widget_path_iter_remove_region
|
||||
gtk_widget_path_iter_set_name
|
||||
gtk_widget_path_iter_set_widget_type
|
||||
gtk_widget_path_iter_set_object_type
|
||||
gtk_widget_path_length
|
||||
gtk_widget_path_new
|
||||
gtk_widget_path_prepend_type
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_WIDGET_PATH
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_widget_path_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@ -5383,6 +5530,22 @@ GTK_STYLE_CLASS_MENUITEM
|
||||
GTK_STYLE_CLASS_PROGRESSBAR
|
||||
GTK_STYLE_CLASS_SPINNER
|
||||
GTK_STYLE_CLASS_TOOLBAR
|
||||
GTK_STYLE_CLASS_PANE_SEPARATOR
|
||||
GTK_STYLE_CLASS_DND
|
||||
GTK_STYLE_CLASS_ERROR
|
||||
GTK_STYLE_CLASS_EXPANDER
|
||||
GTK_STYLE_CLASS_FRAME
|
||||
GTK_STYLE_CLASS_HIGHLIGHT
|
||||
GTK_STYLE_CLASS_INFO
|
||||
GTK_STYLE_CLASS_MARK
|
||||
GTK_STYLE_CLASS_NOTEBOOK
|
||||
GTK_STYLE_CLASS_QUESTION
|
||||
GTK_STYLE_CLASS_SCALE
|
||||
GTK_STYLE_CLASS_SPINBUTTON
|
||||
GTK_STYLE_CLASS_VIEW
|
||||
GTK_STYLE_CLASS_WARNING
|
||||
GTK_STYLE_CLASS_HORIZONTAL
|
||||
GTK_STYLE_CLASS_VERTICAL
|
||||
GTK_STYLE_REGION_COLUMN
|
||||
GTK_STYLE_REGION_COLUMN_HEADER
|
||||
GTK_STYLE_REGION_ROW
|
||||
@ -5409,6 +5572,7 @@ gtk_style_context_get_border_color
|
||||
gtk_style_context_get_border
|
||||
gtk_style_context_get_padding
|
||||
gtk_style_context_get_margin
|
||||
gtk_style_context_get_font
|
||||
gtk_style_context_invalidate
|
||||
gtk_style_context_state_is_running
|
||||
gtk_style_context_lookup_color
|
||||
@ -5416,6 +5580,8 @@ gtk_style_context_lookup_icon_set
|
||||
gtk_style_context_notify_state_change
|
||||
gtk_style_context_pop_animatable_region
|
||||
gtk_style_context_push_animatable_region
|
||||
gtk_style_context_cancel_animations
|
||||
gtk_style_context_scroll_animations
|
||||
gtk_style_context_remove_provider
|
||||
gtk_style_context_remove_provider_for_screen
|
||||
gtk_style_context_reset_widgets
|
||||
@ -5519,6 +5685,7 @@ gtk_theming_engine_get_border_color
|
||||
gtk_theming_engine_get_border
|
||||
gtk_theming_engine_get_padding
|
||||
gtk_theming_engine_get_margin
|
||||
gtk_theming_engine_get_font
|
||||
gtk_theming_engine_has_class
|
||||
gtk_theming_engine_has_region
|
||||
gtk_theming_engine_lookup_color
|
||||
@ -5715,6 +5882,7 @@ gtk_selection_data_targets_include_rich_text
|
||||
gtk_selection_data_get_selection
|
||||
gtk_selection_data_get_data
|
||||
gtk_selection_data_get_length
|
||||
gtk_selection_data_get_data_with_length
|
||||
gtk_selection_data_get_data_type
|
||||
gtk_selection_data_get_display
|
||||
gtk_selection_data_get_format
|
||||
@ -5877,7 +6045,6 @@ GtkShadowType
|
||||
GtkStateType
|
||||
GtkStateFlags
|
||||
GtkToolbarStyle
|
||||
GtkUpdateType
|
||||
GtkWindowPosition
|
||||
GtkWindowType
|
||||
GtkSortType
|
||||
@ -6556,6 +6723,26 @@ gtk_print_job_get_surface
|
||||
gtk_print_job_send
|
||||
gtk_print_job_set_track_print_status
|
||||
gtk_print_job_get_track_print_status
|
||||
gtk_print_job_get_pages
|
||||
gtk_print_job_set_pages
|
||||
gtk_print_job_get_page_ranges
|
||||
gtk_print_job_set_page_ranges
|
||||
gtk_print_job_get_page_set
|
||||
gtk_print_job_set_page_set
|
||||
gtk_print_job_get_num_copies
|
||||
gtk_print_job_set_num_copies
|
||||
gtk_print_job_get_scale
|
||||
gtk_print_job_set_scale
|
||||
gtk_print_job_get_n_up
|
||||
gtk_print_job_set_n_up
|
||||
gtk_print_job_get_n_up_layout
|
||||
gtk_print_job_set_n_up_layout
|
||||
gtk_print_job_get_rotate
|
||||
gtk_print_job_set_rotate
|
||||
gtk_print_job_get_collate
|
||||
gtk_print_job_set_collate
|
||||
gtk_print_job_get_reverse
|
||||
gtk_print_job_set_reverse
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_PRINT_JOB
|
||||
@ -6748,9 +6935,18 @@ gtk_app_chooser_refresh
|
||||
GTK_TYPE_APP_CHOOSER
|
||||
GTK_APP_CHOOSER
|
||||
GTK_IS_APP_CHOOSER
|
||||
GTK_APP_CHOOSER_GET_IFACE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_app_chooser_get_type
|
||||
GTK_APP_CHOOSER_ONLINE
|
||||
GTK_APP_CHOOSER_ONLINE_GET_IFACE
|
||||
GTK_APP_CHOOSER_ONLINE_PK
|
||||
GTK_APP_CHOOSER_ONLINE_PK_CLASS
|
||||
GTK_APP_CHOOSER_ONLINE_PK_GET_CLASS
|
||||
GTK_IS_APP_CHOOSER_ONLINE
|
||||
GTK_IS_APP_CHOOSER_ONLINE_PK
|
||||
GTK_IS_APP_CHOOSER_ONLINE_PK_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -26,6 +26,9 @@ gtk_buildable_get_type
|
||||
gtk_button_box_get_type
|
||||
gtk_button_get_type
|
||||
gtk_calendar_get_type
|
||||
gtk_cell_area_get_type
|
||||
gtk_cell_area_box_get_type
|
||||
gtk_cell_area_context_get_type
|
||||
gtk_cell_editable_get_type
|
||||
gtk_cell_layout_get_type
|
||||
gtk_cell_renderer_accel_get_type
|
||||
@ -98,6 +101,7 @@ gtk_message_dialog_get_type
|
||||
gtk_misc_get_type
|
||||
gtk_mount_operation_get_type
|
||||
gtk_notebook_get_type
|
||||
gtk_numerable_icon_get_type
|
||||
gtk_offscreen_window_get_type
|
||||
gtk_orientable_get_type
|
||||
gtk_page_setup_get_type
|
||||
|
BIN
docs/reference/gtk/images/appchooserbutton.png
Normal file
BIN
docs/reference/gtk/images/appchooserbutton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
BIN
docs/reference/gtk/images/appchooserdialog.png
Normal file
BIN
docs/reference/gtk/images/appchooserdialog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
BIN
docs/reference/gtk/images/drawing.png
Normal file
BIN
docs/reference/gtk/images/drawing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
BIN
docs/reference/gtk/images/grid-packing.png
Normal file
BIN
docs/reference/gtk/images/grid-packing.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
BIN
docs/reference/gtk/images/numerableicon.png
Normal file
BIN
docs/reference/gtk/images/numerableicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
docs/reference/gtk/images/numerableicon2.png
Normal file
BIN
docs/reference/gtk/images/numerableicon2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
]>
|
||||
<chapter id="gtk-migrating-2-to-3">
|
||||
<title>Migrating from GTK+ 2.x to GTK+ 3</title>
|
||||
@ -99,10 +100,11 @@
|
||||
</para>
|
||||
<para>
|
||||
To ensure that your application does not have problems with this, you
|
||||
define the preprocessor symbol <literal>GSEAL_ENABLE</literal>. This
|
||||
will make the compiler catch all uses of direct access to struct fields
|
||||
so that you can go through them one by one and replace them with a call
|
||||
to an accessor function instead.
|
||||
define the preprocessor symbol <literal>GSEAL_ENABLE</literal> while
|
||||
building your application against GTK+ 2.x. This will make the compiler
|
||||
catch all uses of direct access to struct fields so that you can go
|
||||
through them one by one and replace them with a call to an accessor
|
||||
function instead.
|
||||
<programlisting>
|
||||
make CFLAGS+="-DGSEAL_ENABLE"
|
||||
</programlisting>
|
||||
@ -122,6 +124,53 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Use GIO for launching applications</title>
|
||||
<para>
|
||||
The <literal>gdk_spawn</literal> family of functions has been
|
||||
deprecated in GDK 2.24 and removed from GDK 3. Various replacements
|
||||
exist; the best replacement depends on the circumstances:
|
||||
<itemizedlist>
|
||||
<listitem>If you are opening a document or URI by launching a command
|
||||
like <literal>firefox http://my-favourite-website.com</literal> or
|
||||
<literal>gnome-open ghelp:epiphany</literal>, it is best to just use
|
||||
gtk_show_uri(); as an added benefit, your application will henceforth
|
||||
respect the users preference for what application to use.</listitem>
|
||||
<listitem>If you are launching a regular, installed application that
|
||||
has a desktop file, it is best to use GIOs #GAppInfo with a suitable
|
||||
launch context.
|
||||
<informalexample><programlisting>
|
||||
GAppInfo *info;
|
||||
GAppLaunchContext *context;
|
||||
GError *error = NULL;
|
||||
|
||||
info = g_desktop_app_info_new ("epiphany.desktop");
|
||||
context = gdk_display_get_app_launch_context (display);
|
||||
g_app_info_launch (info, NULL, context, &error);
|
||||
|
||||
if (error)
|
||||
{
|
||||
g_warning ("Failed to launch epiphany: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
g_object_unref (info);
|
||||
g_object_unref (context);
|
||||
</programlisting></informalexample>
|
||||
</listitem>
|
||||
<listitem>If you are launching a custom commandline, you can
|
||||
still use g_app_info_launch() with a GAppInfo that is constructed
|
||||
with g_app_info_create_from_commandline(), or you can use the
|
||||
more lowlevel <literal>g_spawn</literal> family of functions
|
||||
(e.g. g_spawn_command_line_async()), and pass <envar>DISPLAY</envar>
|
||||
in the environment. gdk_screen_make_display_name() can be
|
||||
used to find the right value for the <envar>DISPLAY</envar>
|
||||
environment variable.
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Use cairo for drawing</title>
|
||||
<para>
|
||||
@ -655,7 +704,7 @@ g_object_unref (pixbuf);
|
||||
in 'native' surfaces. Therefore, #GdkColormap and related functions
|
||||
have been removed in GTK+ 3, and visuals are used instead. The
|
||||
colormap-handling functions of #GtkWidget (gtk_widget_set_colormap(),
|
||||
etc) have been removed and gtk_window_set_visual() has been added.
|
||||
etc) have been removed and gtk_widget_set_visual() has been added.
|
||||
</para>
|
||||
<example><title>Setting up a translucent window</title>
|
||||
<para>You might have a screen-changed handler like the following
|
||||
@ -691,12 +740,55 @@ on_alpha_screen_changed (GtkWindow *window,
|
||||
if (visual == NULL)
|
||||
visual = gdk_screen_get_system_visual (screen);
|
||||
|
||||
gtk_window_set_visual (window, visual);
|
||||
gtk_widget_set_visual (window, visual);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Backend-specific code</title>
|
||||
<para>
|
||||
In GTK+ 2.x, GDK could only be compiled for one backend at a time,
|
||||
and the %GDK_WINDOWING_X11 or %GDK_WINDOWING_WIN32 macros could
|
||||
be used to find out which one you are dealing with:
|
||||
<informalexample><programlisting>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (timestamp != GDK_CURRENT_TIME)
|
||||
gdk_x11_window_set_user_time (gdk_window, timestamp);
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
/* ... win32 specific code ... */
|
||||
#endif
|
||||
</programlisting></informalexample>
|
||||
In GTK+ 3, GDK can be built with multiple backends, and currently
|
||||
used backend has to be determined at runtime, typically using
|
||||
type-check macros on a #GdkDisplay or #GdkWindow. You still need
|
||||
to use the #GDK_WINDOWING macros to only compile code referring
|
||||
to supported backends:
|
||||
<informalexample><programlisting>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_DISPLAY (display))
|
||||
{
|
||||
if (timestamp != GDK_CURRENT_TIME)
|
||||
gdk_x11_window_set_user_time (gdk_window, timestamp);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (GDK_IS_WIN32_DISPLAY (display))
|
||||
{
|
||||
/* ... win32 specific code ... */
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
g_warning ("Unsupported GDK backend");
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>The GtkWidget::draw signal</title>
|
||||
<para>
|
||||
@ -954,6 +1046,8 @@ gtk_arrow_draw (GtkWidget *widget,
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<xi:include href="migrating-GtkStyleContext.xml" />
|
||||
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
@ -1,64 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-ClientSideWindows">
|
||||
|
||||
<title>Migrating to client-side windows</title>
|
||||
|
||||
<para>
|
||||
In version 2.18, GDK has been changed to use client-side windows. This
|
||||
means that there is no longer a 1-1 correspondence between #GdkWindows
|
||||
and windows in the underlying window system. In particular, it is no
|
||||
longer correct to assume that each window has an associated XID.
|
||||
Code that makes this assumption can sometimes be fixed by calling
|
||||
gdk_window_ensure_native() on the windows in question.
|
||||
Calling gdk_x11_window_get_xid() (or GDK_WINDOW_XID()) from the
|
||||
X11-specific API on a non-native window will explicitly call
|
||||
gdk_window_ensure_native(), so old code using this will continue to
|
||||
work. A small gotcha is that the GDK_WINDOW_XID() call is no longer a
|
||||
trivial accessor for the XID of the window, and thus must not be called
|
||||
from another thread without taking locking precautions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK looks for the <envar>GDK_NATIVE_WINDOWS</envar> environment variable
|
||||
and makes all windows native if it is set. It also tries to be more
|
||||
compatible with the way prior versions worked in some other ways.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some applications assume that they can just operate on the X windows
|
||||
corresponding to their GDK windows without ever telling GDK. One
|
||||
example that we've seen is changing the child window stacking order
|
||||
using XRestackWindows(). Fixing this properly requires to fix the code
|
||||
to use GDK functions to achieve whatever it is trying to achieve.
|
||||
To make this easier in the case of stacking order changes, we've added
|
||||
a gdk_window_restack() function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One change that can cause problems for some applications is that GDK
|
||||
is more aggressive about optimizing away expose events. Code that does
|
||||
more than just repainting exposed areas in response to expose events
|
||||
may be affected by this.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Problems can also occur when using cairo for drawing. One thing that can
|
||||
go wrong is clip handling. You may not use cairo_reset_clip() on a
|
||||
cairo_t on a cairo context created via gdk_cairo_create() or passed to
|
||||
the GtkWidget::draw signal.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Due to a weird API in XClearArea the gdk_window_clear_area() call handled
|
||||
a specified width or height of zero to mean "to end of window" for
|
||||
non-double-buffered drawing. This has been changed to be consistent with
|
||||
the docs and what happens in the double-buffered case. All code in GTK+
|
||||
that relied on this has been fixed, but it is possible (although unlikely)
|
||||
that third party applications rely on this. If you need to do this, just
|
||||
implement it yourself using gdk_drawable_get_size().
|
||||
</para>
|
||||
|
||||
</chapter>
|
@ -1,98 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkAboutDialog">
|
||||
|
||||
<title>Migrating from GnomeAbout to GtkAboutDialog</title>
|
||||
|
||||
<para>
|
||||
Since version 2.6, GTK+ provides the #GtkAboutDialog widget as a
|
||||
replacement for the <structname>GnomeAbout</structname> dialog in
|
||||
the libgnomeui library.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GtkAboutDialog supports all features found in <structname>GnomeAbout</structname>.
|
||||
The <structname>GtkAboutDialog</structname> API is bigger, since it follows
|
||||
the GTK+ policy to have getters and setters for all widget properties,
|
||||
but it isn't much more complex than <structname>GnomeAbout</structname>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To convert an application that uses <structname>GnomeAbout</structname> to
|
||||
<structname>GtkAboutDialog</structname>, as a first step, replace calls
|
||||
like
|
||||
<informalexample><programlisting>
|
||||
const gchar *documentors[] = {
|
||||
"Documenter 1",
|
||||
"Documenter 2",
|
||||
NULL
|
||||
};
|
||||
|
||||
const gchar *documentors[] = {
|
||||
"Author 1",
|
||||
"Author 2",
|
||||
NULL
|
||||
};
|
||||
|
||||
GtkWidget *about = gnome_about_new ("GNOME Test Program", VERSION,
|
||||
"(C) 1998-2001 The Free Software Foundation",
|
||||
"Program to display GNOME functions.",
|
||||
authors,
|
||||
documenters,
|
||||
_("translator-credits"),
|
||||
"logo.png");
|
||||
</programlisting></informalexample>
|
||||
by something like
|
||||
<informalexample><programlisting>
|
||||
GdkPixbuf *logo = gdk_pixbuf_new_from_file ("logo.png", NULL);
|
||||
GtkWidget *about = g_object_new (GTK_TYPE_ABOUT_DIALOG,
|
||||
"name", "GNOME Test Program",
|
||||
"version", VERSION,
|
||||
"copyright", "(C) 1998-2001 The Free Software Foundation",
|
||||
"comments", "Program to display GNOME functions.",
|
||||
"authors", authors,
|
||||
"documenters", documenters,
|
||||
"translator-credits", _("translator-credits"),
|
||||
"logo", logo,
|
||||
NULL);
|
||||
g_object_unref (pixbuf);
|
||||
</programlisting></informalexample>
|
||||
If the g_object_new() construction scares you, you can also use
|
||||
gtk_about_dialog_new() to construct the dialog and then use the
|
||||
setters for the individual properties.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once you are done with the initial conversion, you may want to look into
|
||||
using some of the features of <structname>GtkAboutDialog</structname>
|
||||
which are not present in <structname>GnomeAbout</structname>.
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
You can specify license information with the
|
||||
#GtkAboutDialog:license property
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
You can add separate credits for artists with the
|
||||
#GtkAboutDialog:artists property
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
You can add a pointer to the website of your application, using the
|
||||
#GtkAboutDialog:website and #GtkAboutDialog:website-label properties.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
If your credits contain email addresses or URLs, you can turn them
|
||||
into clickable links using gtk_about_dialog_set_email_hook() and
|
||||
gtk_about_dialog_set_url_hook().
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,445 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkAction">
|
||||
<chapterinfo>
|
||||
<author>
|
||||
<firstname>Federico</firstname>
|
||||
<surname>Mena-Quintero</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>federico@ximian.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</chapterinfo>
|
||||
|
||||
<title>Migrating from old menu and toolbar systems to GtkAction</title>
|
||||
|
||||
<para>
|
||||
Prior to GTK+ 2.4, there were several APIs in use to create menus
|
||||
and toolbars. GTK+ itself included #GtkItemFactory, which was
|
||||
historically used in the GIMP; libgnomeui provided the gnome-ui
|
||||
set of macros; libbonoboui provided a complex mechanism to do menu
|
||||
merging across embedded components. GTK+ 2.4 includes a system
|
||||
for creating menus and toolbars, with merging of items, based
|
||||
around the #GtkAction mechanism.
|
||||
</para>
|
||||
|
||||
<section id="actions-and-action-groups">
|
||||
<title>Actions and Action Groups</title>
|
||||
|
||||
<para>
|
||||
A #GtkAction represents an operation that the user can perform from
|
||||
the menus and toolbars of an application. It is similar to "verbs"
|
||||
in other menu systems. A #GtkAction has a name, which is its identifier,
|
||||
and it can have several widgets that represent it in the user interface.
|
||||
For example, an action for <symbol>EditCopy</symbol> can have a menu item
|
||||
as well as a toolbar button associated to it. If there is nothing selected
|
||||
in the document, the application can simply de-sensitize the
|
||||
<symbol>EditCopy</symbol> action; this will cause both the menu
|
||||
item and the toolbar button to be de-sensitized automatically.
|
||||
Similarly, whenever the user selects the menu item or the
|
||||
toolbar button associated to the <symbol>EditCopy</symbol>
|
||||
action, the corresponding #GtkAction object will emit an
|
||||
"activate" signal.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GtkActionGroup is simply a group of #GtkAction objects. An
|
||||
application may want to have several groups: one for global
|
||||
actions such as "new document", "about", and "exit"; then one
|
||||
group for each open document with actions specific to the
|
||||
document, such as "cut", "copy", "paste", and "print".
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normal actions are simply commands, such as
|
||||
<symbol>FileSave</symbol> or <symbol>EditCopy</symbol>.
|
||||
Toggle actions can be active or inactive, such as
|
||||
<symbol>FormatBold</symbol> or <symbol>ViewShowRulers</symbol>.
|
||||
Radio actions define a set of items for which one and only one
|
||||
can be active at a time, for example, {
|
||||
<symbol>ViewHighQuality</symbol>,
|
||||
<symbol>ViewNormalQuality</symbol>,
|
||||
<symbol>ViewLowQuality</symbol> }.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="ui-manager">
|
||||
<title>User Interface Manager Object</title>
|
||||
|
||||
<para>
|
||||
#GtkUIManager is an object that can construct menu and toolbar widgets
|
||||
from an XML description. These widgets are in turn associated to
|
||||
corresponding actions and action groups.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GtkUIManager supports merging of menus and toolbars for applications
|
||||
that have multiple components, each with separate sets of commands.
|
||||
For example, a word processor that can embed images may want to have
|
||||
toolbar buttons for Bold and Italic when the cursor is on a text
|
||||
block, but Crop and Brightness/Contrast buttons when the cursor
|
||||
is on an image. These actions, which change depending on the
|
||||
state of the application, can be merged and de-merged from a
|
||||
#GtkUIManager as appropriate.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="migrating-gnomeuiinfo">
|
||||
<title>Migrating from GnomeUIInfo</title>
|
||||
|
||||
<para>
|
||||
Prior to GTK+ 2.4, some applications used the GnomeUIInfo
|
||||
mechanism from
|
||||
<filename><libgnomeui/gnome-app-helper.h></filename> to
|
||||
define their menus and toolbars. With it, a program decleres an
|
||||
array of <structname>GnomeUIInfo</structname> structures, which
|
||||
contain information for menu or toolbar items such as their
|
||||
label, icon, and accelerator key. Then, one calls
|
||||
gnome_app_fill_menu() or gnome_app_fill_toolbar(), or one of the
|
||||
related functions, to create the appropriate widgets based on
|
||||
these structures.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A downside of this API is that the same structures are used to
|
||||
pass back pointers to the widgets that got created. This means
|
||||
that the structures cannot simply be kept around if the program
|
||||
requires multiple instances of the user interface (e.g. several
|
||||
windows); each new invocation of gnome_app_fill_menu() would
|
||||
overwrite the widget fields of the structures.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Another disadvantage is that there is no automatic way to
|
||||
synchronize the state of related controls. If there are toolbar
|
||||
toogle buttons for "Bold", "Italic", "Underline", and also
|
||||
corresponding menu items under "Format/Bold", etc., one has to
|
||||
synchronize their toggled states by hand whenever the user
|
||||
selects any one of them.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, there is no way to do menu and toolbar merging for
|
||||
applications that require embedded components.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To convert an application that uses GnomeUIInfo into the new
|
||||
GtkAction mechanism, you need to do several things:
|
||||
</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Separate your existing GnomeUIInfo entries into normal
|
||||
actions, toggle actions, and radio actions, and then create
|
||||
a separate array of #GtkActionEntry structures
|
||||
for each group. This will allow you to create the necessary
|
||||
#GtkActionGroup objects. Note that this does not describe
|
||||
the actual "shape" that your menus and toolbars will have;
|
||||
it simply defines the set of commands that will appear in them.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Create an XML description of your menus and toolbars for use
|
||||
with #GtkUIManager. This defines the actual shape of the menus
|
||||
and toolbars.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Port the code that uses gnome-app and gnome-app-helper to
|
||||
#GtkAction and #GtkUIManager.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If your GnomeUIInfo entries use GNOME_APP_PIXMAP_DATA or
|
||||
GNOME_APP_PIXMAP_FILENAME for pixmaps, you have to create a
|
||||
#GtkIconFactory, add it to the list of default factories, then
|
||||
create a #GtkIconSet for each of your own icons. Add the sets to
|
||||
the factory, and use the id in the #GtkActionEntry like a regular
|
||||
GTK+ stock id.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<example id="gnomeuiinfo-example">
|
||||
<title>GnomeUIInfo Example</title>
|
||||
|
||||
<para>
|
||||
The following code shows a declaration of a simple menu bar to
|
||||
be used with gnome_app_fill_menu() or similar. The menu hierarchy i
|
||||
looks like this:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><guimenu>File</guimenu></para>
|
||||
<simplelist>
|
||||
<member><guimenuitem>Open</guimenuitem></member>
|
||||
<member><guimenuitem>—</guimenuitem></member>
|
||||
<member><guimenuitem>Exit</guimenuitem></member>
|
||||
</simplelist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><guimenu>View</guimenu></para>
|
||||
<simplelist>
|
||||
<member><guimenuitem>Zoom In</guimenuitem></member>
|
||||
<member><guimenuitem>Zoom Out</guimenuitem></member>
|
||||
<member><guimenuitem>—</guimenuitem></member>
|
||||
<member><guimenuitem>[ ] Full Screen</guimenuitem></member>
|
||||
<member><guimenuitem>—</guimenuitem></member>
|
||||
<member><guimenuitem>( ) High Quality</guimenuitem></member>
|
||||
<member><guimenuitem>( ) Normal Quality</guimenuitem></member>
|
||||
<member><guimenuitem>( ) Low Quality</guimenuitem></member>
|
||||
</simplelist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<programlisting>
|
||||
static GnomeUIInfo file_menu_items[] = {
|
||||
{ GNOME_APP_UI_ITEM, "_Open", "Open a file",
|
||||
open_callback, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_OPEN,
|
||||
'o', GDK_CONTROL_MASK, NULL },
|
||||
{ GNOME_APP_UI_SEPARATOR },
|
||||
{ GNOME_APP_UI_ITEM, "E_xit", "Exit the program",
|
||||
exit_callback, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_QUIT,
|
||||
'q', GDK_CONTROL_MASK, NULL},
|
||||
{ GNOME_APP_UI_ENDOFINFO }
|
||||
};
|
||||
|
||||
static GnomeUIInfo view_radio_items[] = {
|
||||
{ GNOME_APP_UI_ITEM, "_High Quality", "Display images in high quality, slow mode",
|
||||
high_quality_callback, NULL, NULL, GNOME_APP_PIXMAP_FILENAME, "high-quality.png",
|
||||
0, 0, NULL },
|
||||
{ GNOME_APP_UI_ITEM, "_Normal Quality", "Display images in normal quality",
|
||||
normal_quality_callback, NULL, NULL, GNOME_APP_PIXMAP_FILENAME, "normal-quality.png",
|
||||
0, 0, NULL },
|
||||
{ GNOME_APP_UI_ITEM, "_Low Quality", "Display images in low quality, fast mode",
|
||||
low_quality_callback, NULL, NULL, GNOME_APP_PIXMAP_FILENAME, "low-quality.png",
|
||||
0, 0, NULL },
|
||||
{ GNOME_APP_UI_ENDOFINFO }
|
||||
};
|
||||
|
||||
static GnomeUIInfo view_menu_items[] = {
|
||||
{ GNOME_APP_UI_ITEM, "Zoom _In", "Zoom into the image",
|
||||
zoom_in_callback, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_ZOOM_IN,
|
||||
GDK_PLUS, 0, NULL },
|
||||
{ GNOME_APP_UI_ITEM, "Zoom _Out", "Zoom away from the image",
|
||||
zoom_out_callback, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_ZOOM_OUT,
|
||||
GDK_MINUS, 0, NULL },
|
||||
{ GNOME_APP_UI_SEPARATOR },
|
||||
{ GNOME_APP_UI_TOGGLEITEM, "_Full Screen", "Switch between full screen and windowed mode",
|
||||
full_screen_callback, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL,
|
||||
GDK_F11, 0, NULL },
|
||||
{ GNOME_APP_UI_SEPARATOR },
|
||||
{ GNOME_APP_UI_RADIOITEMS, NULL, NULL, view_radio_items },
|
||||
{ GNOME_APP_UI_ENDOFINFO }
|
||||
};
|
||||
|
||||
static GnomeUIInfo menubar[] = {
|
||||
{ GNOME_APP_UI_SUBTREE, "_File", NULL, file_menu_items },
|
||||
{ GNOME_APP_UI_SUBTREE, "_View", NULL, view_menu_items },
|
||||
{ GNOME_APP_UI_ENDOFINFO }
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example id="gnomeuiinfo-action-entries">
|
||||
<title><structname>GtkActionEntry</structname> Structures</title>
|
||||
|
||||
<para>
|
||||
The following code is the set of actions that are present in
|
||||
the <link linkend="gnomeuiinfo-example">previous
|
||||
example</link>. Note that the toggle and radio entries are
|
||||
separate from normal actions. Also, note that #GtkActionEntry
|
||||
structures take key names in the format of gtk_accelerator_parse()
|
||||
rather than key values plus modifiers; you will have to convert these
|
||||
values by hand. For example, %GDK_F11 with no modifiers is equivalent
|
||||
to a key name of <literal>"F11"</literal>. Likewise, <literal>"o"</literal>
|
||||
with %GDK_CONTROL_MASK is equivalent to <literal>"<ontrol>O"</literal>.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
/* Normal items */
|
||||
static const GtkActionEntry entries[] = {
|
||||
{ "FileMenu", NULL, "_File" },
|
||||
{ "ViewMenu", NULL, "_View" },
|
||||
{ "Open", GTK_STOCK_OPEN, "_Open", "<control>O", "Open a file", open_action_callback },
|
||||
{ "Exit", GTK_STOCK_QUIT, "E_xit", "<control>Q", "Exit the program", exit_action_callback },
|
||||
{ "ZoomIn", GTK_STOCK_ZOOM_IN, "Zoom _In", "plus", "Zoom into the image", zoom_in_action_callback },
|
||||
{ "ZoomOut", GTK_STOCK_ZOOM_OUT, "Zoom _Out", "minus", "Zoom away from the image", zoom_out_action_callback },
|
||||
};
|
||||
|
||||
/* Toggle items */
|
||||
static const GtkToggleActionEntry toggle_entries[] = {
|
||||
{ "FullScreen", NULL, "_Full Screen", "F11", "Switch between full screen and windowed mode", full_screen_action_callback, FALSE }
|
||||
};
|
||||
|
||||
/* Radio items */
|
||||
static const GtkRadioActionEntry radio_entries[] = {
|
||||
{ "HighQuality", "my-stock-high-quality", "_High Quality", NULL, "Display images in high quality, slow mode", 0 },
|
||||
{ "NormalQuality", "my-stock-normal-quality", "_Normal Quality", NULL, "Display images in normal quality", 1 },
|
||||
{ "LowQuality", "my-stock-low-quality", "_Low Quality", NULL, "Display images in low quality, fast mode", 2 }
|
||||
};
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example id="gnomeuiinfo-xml">
|
||||
<title>XML Description</title>
|
||||
|
||||
<para>
|
||||
After extracting the actions, you will need to create an XML
|
||||
description of the actual layout of your menus and toolbars
|
||||
for use with #GtkUIManager. The following code shows a simple
|
||||
menu bar that corresponds to the <link linkend="gnomeuiinfo-example">previous
|
||||
example</link>. Note that the <guimenu>File</guimenu> and
|
||||
<guimenu>View</guimenu> menus have their names specified in
|
||||
the <link linkend="gnomeuiinfo-action-entries">action
|
||||
entries</link>, not in the XML itself. This is because the
|
||||
XML description only contains <emphasis>identifiers</emphasis>
|
||||
for the items in the GUI, rather than human-readable names.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
static const char *ui_description =
|
||||
"<ui>"
|
||||
" <menubar name='MainMenu'>"
|
||||
" <menu action='FileMenu'>"
|
||||
" <menuitem action='Open'/>"
|
||||
" <menuitem action='Exit'/>"
|
||||
" </menu>"
|
||||
" <menu action='ViewMenu'>"
|
||||
" <menuitem action='ZoomIn'/>"
|
||||
" <menuitem action='ZoomOut'/>"
|
||||
" <separator/>"
|
||||
" <menuitem action='FullScreen'/>"
|
||||
" <separator/>"
|
||||
" <menuitem action='HighQuality'/>"
|
||||
" <menuitem action='NormalQuality'/>"
|
||||
" <menuitem action='LowQuality'/>"
|
||||
" </menu>"
|
||||
" </menubar>"
|
||||
"</ui>";
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example id="gnomeuiinfo-code">
|
||||
<title>Creating the Menu Bar</title>
|
||||
|
||||
<para>
|
||||
In this last example, we will create a #GtkActionGroup based on the
|
||||
<link linkend="gnomeuiinfo-action-entries">action entries</link>
|
||||
we created above. We will then create a #GtkUIManager with the <link
|
||||
linkend="gnomeuiinfo-xml">XML description</link> of the menu
|
||||
layout. We will also extract the accelerator group and the
|
||||
widgets from the #GtkUIManager put them into a window.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *menubar;
|
||||
GtkActionGroup *action_group;
|
||||
GtkUIManager *ui_manager;
|
||||
GtkAccelGroup *accel_group;
|
||||
GError *error;
|
||||
|
||||
register_my_stock_icons (<!-- -->);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
action_group = gtk_action_group_new ("MenuActions");
|
||||
gtk_action_group_add_actions (action_group, entries, G_N_ELEMENTS (entries), window);
|
||||
gtk_action_group_add_toggle_actions (action_group, toggle_entries, G_N_ELEMENTS (toggle_entries), window);
|
||||
gtk_action_group_add_radio_actions (action_group, radio_entries, G_N_ELEMENTS (radio_entries), 0, radio_action_callback, window);
|
||||
|
||||
ui_manager = gtk_ui_manager_new (<!-- -->);
|
||||
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
|
||||
|
||||
accel_group = gtk_ui_manager_get_accel_group (ui_manager);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
|
||||
error = NULL;
|
||||
if (!gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, &error))
|
||||
{
|
||||
g_message ("building menus failed: %s", error->message);
|
||||
g_error_free (error);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example id="gnomeuiinfo-icons">
|
||||
<title>Registering the icons</title>
|
||||
|
||||
<para>
|
||||
Here we show how the register_my_stock_icons() function
|
||||
used in the previous example could look like.
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
static struct {
|
||||
gchar *filename;
|
||||
gchar *stock_id;
|
||||
} stock_icons[] = {
|
||||
{ "high-quality.png", "my-stock-high-quality" },
|
||||
{ "normal-quality.png", "my-stock-normal-quality" },
|
||||
{ "low-quality.png", "my-stock-low-quality" },
|
||||
};
|
||||
|
||||
static gint n_stock_icons = G_N_ELEMENTS (stock_icons);
|
||||
|
||||
static void
|
||||
register_my_stock_icons (void)
|
||||
{
|
||||
GtkIconFactory *icon_factory;
|
||||
GtkIconSet *icon_set;
|
||||
GtkIconSource *icon_source;
|
||||
gint i;
|
||||
|
||||
icon_factory = gtk_icon_factory_new (<!-- -->);
|
||||
|
||||
for (i = 0; i < n_stock_icons; i++)
|
||||
{
|
||||
icon_set = gtk_icon_set_new (<!-- -->);
|
||||
icon_source = gtk_icon_source_new (<!-- -->);
|
||||
gtk_icon_source_set_filename (icon_source, stock_icons[i].filename);
|
||||
gtk_icon_set_add_source (icon_set, icon_source);
|
||||
gtk_icon_source_free (icon_source);
|
||||
gtk_icon_factory_add (icon_factory, stock_icons[i].stock_id, icon_set);
|
||||
gtk_icon_set_unref (icon_set);
|
||||
}
|
||||
|
||||
gtk_icon_factory_add_default (icon_factory);
|
||||
|
||||
g_object_unref (icon_factory);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,178 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkAssistant">
|
||||
<chapterinfo>
|
||||
<author>
|
||||
<firstname>Carlos</firstname>
|
||||
<surname>Garnacho</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>carlosg@gnome.org</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</chapterinfo>
|
||||
|
||||
<title>Migrating from GnomeDruid to GtkAssistant</title>
|
||||
|
||||
<para>
|
||||
Since version 2.10, GTK+ provides the GtkAssistant widget as a replacement
|
||||
for the <structname>GnomeDruid</structname> widget in the libgnomeui
|
||||
library.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Conceptually, both <structname>GtkAssistant</structname> and
|
||||
<structname>GnomeDruid</structname> do the same task, but there are
|
||||
several areas where the API has been completely redesigned, so this
|
||||
chapter covers the main changes between both widgets.
|
||||
</para>
|
||||
|
||||
<section id="inserting-pages">
|
||||
<title>Inserting pages</title>
|
||||
|
||||
<para>
|
||||
<structname>GnomeDruid</structname> was implemented as a container for
|
||||
<structname>GnomeDruidPage</structname> abstract objects, which are
|
||||
implemented by the <structname>GnomeDruidPageEdge</structname> and
|
||||
<structname>GnomeDruidPageStandard</structname> widgets. Instead,
|
||||
<structname>GtkAssistant</structname> allows any widget to be a page,
|
||||
and implements per-page settings (such as page type or title) as
|
||||
child properties. So instead of:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
/* Page 1 */
|
||||
page = gnome_druid_page_edge_new (GNOME_EDGE_START);
|
||||
gnome_druid_page_edge_set_test (GNOME_DRUID_PAGE_EDGE (page),
|
||||
"Welcome to the assistant, it will make your life easier");
|
||||
gtk_widget_show (page);
|
||||
gnome_druid_append_page (GNOME_DRUID (druid), GNOME_DRUID_PAGE (page));
|
||||
|
||||
/* Page 2 */
|
||||
page = gnome_druid_page_standard_new ();
|
||||
gtk_container_add (GTK_CONTAINER (GNOME_DRUID_PAGE_STANDARD (page)->vbox,
|
||||
create_page1 ());
|
||||
gtk_widget_show_all (page);
|
||||
gnome_druid_append_page (GNOME_DRUID (druid), GNOME_DRUID_PAGE (page));
|
||||
|
||||
/* Page 3 */
|
||||
page = gnome_druid_page_edge_new (GNOME_EDGE_FINISH);
|
||||
gnome_druid_page_edge_set_test (GNOME_DRUID_PAGE_EDGE (page),
|
||||
"Now you are done, your life is easier");
|
||||
gtk_widget_show (page);
|
||||
gnome_druid_append_page (GNOME_DRUID (druid), GNOME_DRUID_PAGE (page));
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
You have to write:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant),
|
||||
gtk_label_new ("Welcome to the assistant, it will make your life easier"));
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant),
|
||||
create_page1 ());
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant),
|
||||
gtk_label_new ("Now you are done, your life is easier");
|
||||
</programlisting>
|
||||
</section>
|
||||
|
||||
<section id="decorating-the-assistant-pages">
|
||||
<title>Decorating the assistant pages</title>
|
||||
|
||||
<para>
|
||||
To decorate your assistant pages, <structname>GtkAssistant</structname> provides similar functions
|
||||
to <structname>GnomeDruid</structname>, so you have to transform code like this:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gnome_druid_page_edge_set_title (GNOME_DRUID_PAGE_EDGE (page), "Welcome");
|
||||
gnome_druid_page_edge_set_logo (GNOME_DRUID_PAGE_EDGE (page), logo_pixbuf);
|
||||
gnome_druid_page_edge_set_watermark (GNOME_DRUID_PAGE_EDGE (page), watermark_pixbuf);
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Into this:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page_widget, "Welcome");
|
||||
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), page_widget, logo_pixbuf);
|
||||
gtk_assistant_set_page_side_image (GTK_ASSISTANT (assistant), page_widget, watermark_pixbuf);
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Where page_widget is the widget used as a page.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="setting-the-page-flow">
|
||||
<title>Setting the page flow</title>
|
||||
|
||||
<para>
|
||||
Here is the area where <structname>GtkAssistant</structname> and <structname>GnomeDruid</structname>
|
||||
differ the most. While <structname>GnomeDruid</structname> used the "next" and "back" signals from the
|
||||
<structname>GnomeDruidPage</structname>, <structname>GtkAssistant</structname> uses the following
|
||||
techniques:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>gtk_assistant_set_forward_page_func (): Allows to define a GtkAssistantPageFunc to let the
|
||||
assistant know which will be the following page given the current page.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>gtk_assistant_set_page_complete (): Lets the assistant know whether the specified page is complete
|
||||
or not, updating buttons state accordingly.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>gtk_assistant_set_page_type (): Lets the assistant know the page role and update the buttons
|
||||
state accordingly. Pages can have the following roles:</para>
|
||||
<simplelist>
|
||||
<member>Intro</member>
|
||||
<member>Content</member>
|
||||
<member>Progress</member>
|
||||
<member>Confirmation</member>
|
||||
<member>Summary</member>
|
||||
</simplelist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
A sample GtkAssistantPageFunc could look like this:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
static gint
|
||||
forward_page_function (gint current_page,
|
||||
gpointer data)
|
||||
{
|
||||
switch (current_page)
|
||||
{
|
||||
case 0:
|
||||
return 1;
|
||||
case 1:
|
||||
if (check_page1_data ())
|
||||
return 2;
|
||||
else
|
||||
return 3;
|
||||
case 2:
|
||||
return 3;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,102 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkBuilder">
|
||||
|
||||
<title>Migrating from libglade to GtkBuilder</title>
|
||||
|
||||
<para>
|
||||
Since version 2.12, GTK+ provides #GtkBuilder to construct
|
||||
user interfaces from XML descriptions, similar to the functionality
|
||||
provided by #GladeXML in the libglade library.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A good way to start a migration from libglade to GtkBuilder is using
|
||||
<application>glade3</application> to convert your .glade file.
|
||||
If your code uses the @root parameter of glade_xml_new(),
|
||||
you can use gtk_builder_add_objects_from_file() to construct only certain
|
||||
objects from a GtkBuilder file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Alternatively, GTK+ also offers the
|
||||
<link linkend="gtk-builder-convert">gtk-builder-convert</link> script you can use
|
||||
to do the conversion; in which case you should be careful to inspect the output
|
||||
and make sure you didn't lose any data.
|
||||
</para>
|
||||
|
||||
<table pgwide="1" frame="topbot">
|
||||
<title>Step-by-step instructions for porting code from libglade to GtkBuilder</title>
|
||||
<tgroup cols="2" colsep="0" rowsep="0">
|
||||
<thead>
|
||||
<row><entry>libglade</entry><entry>GtkBuilder</entry></row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><![CDATA[#include <glade/glade.h>]]></entry>
|
||||
<entry>not needed</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>GladeXML*</screen></entry>
|
||||
<entry><screen>GtkBuilder*</screen></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_xml_new (FILE, "first_widget", NULL)</screen></entry>
|
||||
<entry>
|
||||
<screen>
|
||||
GError* error = NULL;
|
||||
GtkBuilder* builder = gtk_builder_new (<!-- -->);
|
||||
if (!gtk_builder_add_from_file (builder, FILE, &error))
|
||||
{
|
||||
g_warning ("Couldn't load builder file: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
</screen>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_xml_get_widget (gxml, “widget_name”)</screen></entry>
|
||||
<entry><screen>GTK_WIDGET (gtk_builder_get_object (builder, “widget_name”))</screen></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_get_widget_name (widget)</screen></entry>
|
||||
<entry><screen>gtk_widget_get_name (widget)</screen></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_xml_get_widget_prefix (gxml, “prefix”)</screen></entry>
|
||||
<entry>can be emulated by <literal>gtk_builder_get_objects (builder)</literal> together with manual filtering. It returns a GSList* instead of a GList* though.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<para>
|
||||
While GtkBuilder strives to be a complete replacement for
|
||||
libglade, there are a number of areas where it is currently
|
||||
still behind libglade:
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>
|
||||
GtkBuilder supports context information in translatable
|
||||
properties in a slightly different way than libglade.
|
||||
Intltool does not yet support this; see
|
||||
<ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=454894">bug
|
||||
454894</ulink> for the current status of intltool support for
|
||||
GtkBuilder files. Thankfully, context in translations is a
|
||||
rarely used feature, and if you are not using it, intltools
|
||||
glade format support works just fine for GtkBuilder files.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
While libglade can often tolerate multiple widgets having the
|
||||
same id in a glade file, GtkBuilder will not accept duplicate
|
||||
object ids. Both <application>gtk-builder-convert</application>
|
||||
and the GtkBuilder parser emit warnings when they see
|
||||
duplicate ids.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</chapter>
|
@ -1,54 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkColorButton">
|
||||
|
||||
<title>Migrating from GnomeColorPicker to GtkColorButton</title>
|
||||
|
||||
<para>
|
||||
Since version 2.6, GTK+ provides the #GtkColorButton
|
||||
widget as a replacement for the <structname>GnomeColorPicker</structname>
|
||||
widget in the libgnomeui library.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Porting an application from <structname>GnomeColorPicker</structname> to
|
||||
<structname>GtkColorButton</structname> is very simple.
|
||||
<structname>GtkColorButton</structname> doesn't support dithering
|
||||
(since it is rarely needed on modern hardware), and it doesn't have
|
||||
setters and getters to set the color from floating point or integer
|
||||
components. So instead of
|
||||
<informalexample><programlisting>
|
||||
guint red, green, blue, alpha;
|
||||
/* ... */
|
||||
gnome_color_picker_set_i8 (color_picker, red, green, blue, alpha);
|
||||
</programlisting></informalexample>
|
||||
you have to write
|
||||
<informalexample><programlisting>
|
||||
GdkColor color;
|
||||
|
||||
color.red = red << 8;
|
||||
color.green = green << 8;
|
||||
color.blue = blue << 8;
|
||||
gtk_color_button_set_color (color_picker, &color);
|
||||
gtk_color_button_set_alpha (color_picker, alpha << 8);
|
||||
</programlisting></informalexample>
|
||||
and similarly for the setters taking other number formats. For
|
||||
<function>gnome_color_picker_set_i16()</function> no conversion is needed,
|
||||
for <function>gnome_color_picker_set_d()</function>, you need to convert
|
||||
the color components like this:
|
||||
<informalexample><programlisting>
|
||||
color.red = (guint16) (red * 65535.0 + 0.5);
|
||||
color.green = (guint16) (green * 65535.0 + 0.5);
|
||||
color.blue = (guint16) (blue * 65535.0 + 0.5);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,213 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkComboBox">
|
||||
|
||||
<title>Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
|
||||
GtkComboBoxEntry</title>
|
||||
|
||||
<para>
|
||||
Prior to 2.4, GTK+ offered two widgets for the task of selecting one
|
||||
item from a list of options. #GtkOptionMenu presents the list of
|
||||
options as a menu while #GtkCombo presents them in a Windows-style list
|
||||
popup. The only difference between the two is that a #GtkCombo allows to
|
||||
manually edit the selected value, while the #GtkOptionMenu does not.
|
||||
</para>
|
||||
<para>
|
||||
In GTK+ 2.4, a unified API for list selection was introduced, with
|
||||
#GtkComboBox for the non-editable case and #GtkComboBoxEntry for the
|
||||
editable case.
|
||||
The selection of the display style — menu or list —
|
||||
is no longer done at the API level, but has been made themeable via
|
||||
the style property #GtkComboBox:appears-as-list.
|
||||
</para>
|
||||
|
||||
<section id="migrating-GtkOptionMenu">
|
||||
<title>Migrating from GtkOptionMenu to GtkComboBox</title>
|
||||
|
||||
<para>
|
||||
Here is an example of a simple, but typical use of
|
||||
#GtkOptionMenu<!---->:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *option_menu, *menu, *menu_item;
|
||||
|
||||
option_menu = gtk_option_menu_new (<!-- -->);
|
||||
menu = gtk_menu_new (<!-- -->);
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("First Item");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
menu_item = gtk_menu_item_new_with_label ("Second Item");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
menu_item = gtk_menu_item_new_with_label ("Third Item");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the #GtkOptionMenu::changed
|
||||
signal on the option menu and use gtk_option_menu_get_history()
|
||||
to retrieve the index of the selected item.
|
||||
</para>
|
||||
<para>
|
||||
And here is how it would be done with a #GtkComboBox<!---->:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *combo_box;
|
||||
|
||||
combo_box = gtk_combo_box_new_text (<!-- -->);
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "First Item");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Second Item");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Third Item");
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the
|
||||
#GtkComboBox::changed signal and use gtk_combo_box_get_active()
|
||||
to retrieve the index of the selected item.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A slightly more complex example involving images:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *option_menu, *menu, *menu_item;
|
||||
|
||||
option_menu = gtk_option_menu_new (<!-- -->);
|
||||
menu = gtk_menu_new (<!-- -->);
|
||||
|
||||
menu_item = gtk_image_menu_item_new_with_label ("First Item");
|
||||
gtk_image_menu_item_set_image (gtk_image_new_from_pixbuf (pixbuf1));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
menu_item = gtk_image_menu_item_new_with_label ("Second Item");
|
||||
gtk_image_menu_item_set_image (gtk_image_new_from_pixbuf (pixbuf2));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
menu_item = gtk_image_menu_item_new_with_label ("Third Item");
|
||||
gtk_image_menu_item_set_image (gtk_image_new_from_pixbuf (pixbuf3));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
|
||||
gtk_widget_show (menu_item);
|
||||
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
<para>
|
||||
can be done using a #GtkComboBox as follows:
|
||||
<informalexample><programlisting>
|
||||
GtkListStore *store;
|
||||
GtkTreeIter iter;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkWidget *combo_box;
|
||||
|
||||
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter, 0, pixbuf1, 1, "First Item", -1);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter, 0, pixbuf2, 1, "Second Item", -1);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter, 0, pixbuf3, 1, "Third Item", -1);
|
||||
|
||||
combo_box = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
|
||||
|
||||
renderer = gtk_cell_renderer_pixbuf_new (<!-- -->);
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer,
|
||||
"pixbuf", 0,
|
||||
NULL);
|
||||
|
||||
renderer = gtk_cell_renderer_text_new (<!-- -->);
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer,
|
||||
"text", 1,
|
||||
NULL);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="migrating-GtkCombo">
|
||||
<title>Migrating from GtkCombo to GtkComboBoxEntry</title>
|
||||
|
||||
<para>
|
||||
Here is an example of a simple, but typical use of a #GtkCombo<!---->:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *combo;
|
||||
GList *items = NULL;
|
||||
|
||||
items = g_list_append (items, "First Item");
|
||||
items = g_list_append (items, "Second Item");
|
||||
items = g_list_append (items, "Third Item");
|
||||
|
||||
combo = gtk_combo_new (<!-- -->);
|
||||
gtk_combo_set_popdown_strings (GTK_COMBO (combo), items);
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the #GtkCombo::changed
|
||||
signal on the combo and use
|
||||
<literal>gtk_entry_get_text (GTK_ENTRY (combo->entry))</literal>
|
||||
to retrieve the selected text.
|
||||
</para>
|
||||
<para>
|
||||
And here is how it would be done using #GtkComboBoxEntry<!---->:
|
||||
<informalexample><programlisting>
|
||||
combo_box = gtk_combo_box_entry_new_text (<!-- -->);
|
||||
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "First Item");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Second Item");
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "Third Item");
|
||||
</programlisting></informalexample>
|
||||
In order to react to the user's selection, connect to the #GtkComboBox::changed
|
||||
signal on the combo and use
|
||||
<literal>gtk_entry_get_text (GTK_ENTRY (GTK_BIN (combo_box)->child))</literal>
|
||||
to retrieve the selected text.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="new-features-GtkComboBox">
|
||||
<title>New features</title>
|
||||
|
||||
<para>
|
||||
The new widgets have more to offer than a mere combination of the
|
||||
features of #GtkOptionMenu and #GtkCombo. Notable new features
|
||||
include:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Grid mode</term>
|
||||
<listitem><para>Sometimes it is preferable to display the available
|
||||
options not in a linear list, but in a grid. A typical example
|
||||
would be a "color combo" where the individual items are small
|
||||
square color swatches. The new widgets support gridded display
|
||||
with the functions
|
||||
gtk_combo_box_set_wrap_width(),
|
||||
gtk_combo_box_set_row_span_column() and
|
||||
gtk_combo_box_set_column_span_column().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Display of icons</term>
|
||||
<listitem><para>An often-heard complaint about #GtkOptionMenu is that
|
||||
the icons which appear in the image menu items in its menu are not
|
||||
displayed in the button showing the selected item. This limitation
|
||||
has been removed in #GtkComboBox; the selected item appears in the
|
||||
same way as the options in the popup.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Full tree model power</term>
|
||||
<listitem><para>
|
||||
Since the new widgets are built around the same models that are
|
||||
used for #GtkTreeView, all of the powerful machinery of tree models
|
||||
and cell renderers can be used.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,141 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-entry-icons">
|
||||
|
||||
<title>Migrating from SexyIconEntry to GtkEntry</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.16 supports showing icons inside a #GtkEntry, similar to
|
||||
SexyIconEntry. Porting from SexyIconEntry to GtkEntry is relatively
|
||||
straightforward. The main difference between the two APIs is that
|
||||
SexyIconEntry uses #GtkImage widgets in a somewhat awkward way as
|
||||
storage vehicles for icons, while GtkEntry allows to specify icons
|
||||
via pixbufs, stock ids, icon names or #GIcons. So, if your code uses
|
||||
e.g.:
|
||||
<informalexample><programlisting>
|
||||
image = gtk_image_new_from_stock (GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
|
||||
sexy_icon_entry_set_icon (entry, SEXY_ICON_ENTRY_PRIMARY, image);
|
||||
</programlisting></informalexample>
|
||||
you can get rid of the @image, and directly write:
|
||||
<informalexample><programlisting>
|
||||
gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_NEW);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The signals SexyIconEntry::icon-pressed and SexyIconEntry::icon-released
|
||||
have been renamed to #GtkEntry::icon-press and #GtkEntry::icon-release
|
||||
to avoid problems due to signal name clashes. Also, the signature of the
|
||||
signals has changed from
|
||||
<informalexample><programlisting>
|
||||
void (*icon_pressed) (SexyIconEntry *entry,
|
||||
SexyIconEntryPosition icon_pos,
|
||||
int button)
|
||||
</programlisting></informalexample>
|
||||
to
|
||||
<informalexample><programlisting>
|
||||
void (*icon_press) (GtkEntry *entry,
|
||||
GtkEntryIconPosition icon_pos,
|
||||
GdkEventButton *event)
|
||||
</programlisting></informalexample>
|
||||
The new signature has the advantage that the signal handler can use
|
||||
the timestamp of the event, e.g. for passing it to gtk_menu_popup().
|
||||
When adapting an existing signal handler to the new signature, you
|
||||
should note that the button number is easily available as @event->button,
|
||||
as shown in the following example:
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
icon_pressed_cb (SexyIconEntry *entry,
|
||||
SexyIconEntryPosition position,
|
||||
int button,
|
||||
gpointer data)
|
||||
{
|
||||
GtkMenu *menu = data;
|
||||
|
||||
if (position == SEXY_ICON_ENTRY_PRIMARY)
|
||||
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
|
||||
button, GDK_CURRENT_TIME);
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
can be ported as:
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
icon_press_cb (GtkEntry *entry,
|
||||
GtkEntryIconPosition position,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
{
|
||||
GtkMenu *menu = data;
|
||||
|
||||
if (position == GTK_ENTRY_ICON_PRIMARY)
|
||||
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
|
||||
event->button, event->time);
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Another difference is that SexyIconEntry offers manual control of
|
||||
the icon prelighting, via sexy_icon_entry_set_icon_highlight().
|
||||
#GtkEntry prelights automatically when appropriate, depending on
|
||||
whether the icon is activatable and sensitive. You should make
|
||||
sure that your icons are properly marked as activatable or nonactivatable
|
||||
and sensitive or insensitive:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Sensitive, but non-activatable icons are
|
||||
good for purely informational purposes.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Icons should be marked as insensitive if the
|
||||
function that they trigger is currently not available.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkEntry has no direct equivalent of the special-purpose function
|
||||
sexy_icon_entry_add_clear_button(). If you need this functionality,
|
||||
the following code works:
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
icon_pressed_cb (GtkEntry *entry,
|
||||
gint position,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
{
|
||||
if (position == GTK_ENTRY_ICON_SECONDARY)
|
||||
gtk_entry_set_text (entry, "");
|
||||
}
|
||||
|
||||
static void
|
||||
text_changed_cb (GtkEntry *entry,
|
||||
GParamSpec *pspec,
|
||||
GtkWidget *button)
|
||||
{
|
||||
gboolean has_text;
|
||||
|
||||
has_text = gtk_entry_get_text_length (entry) > 0;
|
||||
gtk_entry_set_icon_sensitive (entry,
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
has_text);
|
||||
}
|
||||
|
||||
|
||||
/* ... */
|
||||
|
||||
/* Set up the clear icon */
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
GTK_STOCK_CLEAR);
|
||||
g_signal_connect (entry, "icon-press",
|
||||
G_CALLBACK (icon_pressed_cb), NULL);
|
||||
g_signal_connect (entry, "notify::text",
|
||||
G_CALLBACK (text_changed_cb), find_button);
|
||||
|
||||
/* ... */
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
</chapter>
|
@ -1,163 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkFileChooser">
|
||||
<chapterinfo>
|
||||
<author>
|
||||
<firstname>Federico</firstname>
|
||||
<surname>Mena-Quintero</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>federico@ximian.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</chapterinfo>
|
||||
|
||||
<title>Migrating from GtkFileSelection to GtkFileChooser</title>
|
||||
|
||||
<para>
|
||||
#GtkFileChooser, starting with GTK+ 2.4, is the new set of APIs for file
|
||||
selection widgets and dialogs. Previous versions of GTK+ used #GtkFileSelection,
|
||||
which has numerous problems.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GtkFileChooser is an abstract interface that can be implemented by widgets
|
||||
that perform file selection tasks. Two widgets in GTK+ implement this
|
||||
interface: #GtkFileChooserDialog and #GtkFileChooserWidget. Most applications
|
||||
simply need to use #GtkFileChooserDialog, which is a dialog box that allows the
|
||||
user to select existing files for opening them, or to pick new filenames for
|
||||
saving documents. #GtkFileChooserWidget is for special applications that need to
|
||||
embed a file selection widget inside a larger window. In the context of GTK+,
|
||||
#GtkFileChooserDialog is simply a #GtkDialog box with a #GtkFileChooserWidget.
|
||||
inside.
|
||||
</para>
|
||||
|
||||
<section id="gtkfilechooser-creating">
|
||||
<title>Creating a GtkFileChooserDialog</title>
|
||||
|
||||
<para>
|
||||
To create a #GtkFileChooserDialog, you simply call gtk_file_chooser_dialog_new().
|
||||
This function is similar to gtk_dialog_new() in that it takes parameters for the
|
||||
title of the dialog box and its transient parent, as well as its
|
||||
buttons. In addition, it takes in an argument that determines
|
||||
whether the file chooser dialog will be used for opening
|
||||
existing files or for saving to a possibly new file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please see <xref linkend="gtkfilechooser-typical-usage"/> for
|
||||
how to create a simple file chooser dialog and extract the
|
||||
selected filename from it.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="gtkfilechooser-selection-modes">
|
||||
<title>Selection Modes</title>
|
||||
|
||||
<para>
|
||||
#GtkFileChooser can be used in two modes, to select a single file at a
|
||||
time or to select a set of more than one file. To set this, use
|
||||
gtk_file_chooser_set_select_multiple(). In single-selection
|
||||
mode, you can use gtk_file_chooser_get_filename() to get a file
|
||||
name from the local file system or gtk_file_chooser_get_uri() to
|
||||
get a full-formed URI. In multiple-selection mode, you can use
|
||||
gtk_file_chooser_get_filenames() to get a #GSList of filename strings, or
|
||||
gtk_file_chooser_get_uris() to get a list of URI strings.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also, you can configure #GtkFileChooser to select files
|
||||
or folders. Consider a backup program that needs to let the
|
||||
user select a folder that will be backed up along with its
|
||||
subfolders. To configure whether #GtkFileChooser is used to select
|
||||
files or folders, use gtk_file_chooser_set_action(). In
|
||||
addition, this lets you configure whether the file chooser will
|
||||
be used to select existing files or folders (e.g. for
|
||||
"File/Open"), or to type in new filenames (for
|
||||
"File/Save As...").
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="gtkfilechooser-installing-preview">
|
||||
<title>Installing a Preview widget</title>
|
||||
|
||||
<para>
|
||||
Many applications need to have a preview facility within their
|
||||
file chooser dialogs. Previous to GTK+ 2.4, one needed to
|
||||
access the #GtkFileSelection widget hierarchy directly to hook in
|
||||
a preview widget. With #GtkFileChooser, there is a
|
||||
dedicated API to do this.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please see the <link linkend="gtkfilechooser-preview">section on
|
||||
creating preview widgets</link> for more information.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="gtkfilechooser-installing-extra-widgets">
|
||||
<title>Installing Extra Widgets</title>
|
||||
|
||||
<para>
|
||||
Some applications need to install extra widgets in a file
|
||||
chooser. For example, an application may want to provide a
|
||||
toggle button to give the user the option of opening a file
|
||||
read-only.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Please see the <link linkend="gtkfilechooser-extra">section on
|
||||
creating extra widgets</link> for more information.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="gtkfilechooser-new-features">
|
||||
<title>New features</title>
|
||||
|
||||
<para>
|
||||
New features in #GtkFileChooser include the following:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Ability to select URIs rather than just local files. You
|
||||
must use a #GtkFileSystem implementation that supports this,
|
||||
for example the gnome-vfs backend.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Present a list of application-specific shortcut folders.
|
||||
For example, a paint program may want to add a shortcut for
|
||||
its <filename>/usr/share/paint_program/Clipart</filename>
|
||||
folder.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Define custom filters so that not all the files in a folder
|
||||
are listed. For example, you could filter out backup files,
|
||||
or show only image files.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
To see how to use these features, please consult the #GtkFileChooser
|
||||
reference documentation.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,153 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkIconView">
|
||||
|
||||
<title>Migrating from GnomeIconList to GtkIconView</title>
|
||||
|
||||
<para>
|
||||
Since version 2.6, GTK+ provides the #GtkIconView widget. It is similar in
|
||||
functionality to the <structname>GnomeIconList</structname> widget in the
|
||||
libgnomeui library, both widgets provide a way to lay out named icons in
|
||||
a grid. The distinctive feature of the GTK+ widget is that it follows the
|
||||
model-view pattern, allowing it to share the actual data (i.e. the names
|
||||
and images of the icons) with other views.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GtkIconView currently doesn't support some features found in
|
||||
<structname>GnomeIconList</structname>. Icons can not be positioned freely,
|
||||
the spacing is not customizable, and it is not possible to edit the names of
|
||||
icons.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To convert an application that uses <structname>GnomeIconList</structname>
|
||||
to #GtkIconView, the first step is to organize your data in a #GtkTreeModel.
|
||||
<structname>GnomeIconList</structname> lets you directly insert data with
|
||||
gnome_icon_list_insert() and gnome_icon_list_insert_pixbuf() and their
|
||||
append variants. So, if you previously had a function to fill your icon
|
||||
list similar to this one:
|
||||
<informalexample><programlisting>
|
||||
void
|
||||
fill_icon_list (GnomeIconList *icon_list)
|
||||
{
|
||||
gnome_icon_list_append (icon_list, "file1.png", "Icon 1");
|
||||
gnome_icon_list_append (icon_list, "file2.png", "Icon 2");
|
||||
|
||||
/* more icons ... */
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
you will have to create a tree model, attach your icon view to it, and
|
||||
fill the model:
|
||||
<informalexample><programlisting>
|
||||
enum {
|
||||
PIXBUF_COLUMN,
|
||||
TEXT_COLUMN,
|
||||
|
||||
/* you can have more columns here, e.g */
|
||||
|
||||
DATA_COLUMN
|
||||
};
|
||||
|
||||
void
|
||||
fill_model (GtkListStore *store)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
pixbuf = gdk_pixbuf_new_from_file ("file1.png", NULL);
|
||||
gtk_list_store_set (store, &iter, PIXBUF_COLUMN, pixbuf, TEXT_COLUMN, "Icon 1", -1);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
pixbuf = gdk_pixbuf_new_from_file ("file2.png", NULL);
|
||||
gtk_list_store_set (store, &iter, PIXBUF_COLUMN, pixbuf, TEXT_COLUMN, "Icon 2", -1);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
/* more icons ... */
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *icon_view;
|
||||
GtkListStore *store;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* do other initialization... */
|
||||
|
||||
/* construct the GtkIconView */
|
||||
icon_view = gtk_icon_view_new (<!-- -->);
|
||||
store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
|
||||
|
||||
gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (icon_view), PIXBUF_COLUMN);
|
||||
gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), TEXT_COLUMN);
|
||||
gtk_icon_view_set_model (GTK_ICON_VIEW (icon_view), GTK_TREE_MODEL (store));
|
||||
|
||||
fill_model (store);
|
||||
|
||||
/* ... */
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
This example uses a #GtkListStore as model, but part of the elegance of the
|
||||
model-view pattern is that you can easily use another tree model implementation,
|
||||
or even write your own custom tree model.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Your application may make use of extra data attached to the icons in the
|
||||
<structname>GnomeIconList</structname> via gnome_icon_list_set_icon_data() and
|
||||
gnome_icon_list_get_icon_data(). With #GtkIconView such data is most
|
||||
conveniently stored in an extra column in the tree model, so you would
|
||||
call a function like
|
||||
<informalexample><programlisting>
|
||||
void
|
||||
set_icon_data (GtkIconView *icon_view,
|
||||
gint idx,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
model = gtk_icon_view_get_model (icon_view);
|
||||
|
||||
if (gtk_tree_model_iter_nth_child (model, &iter, NULL, idx))
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
|
||||
DATA_COLUMN, data, -1);
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
assuming that your tree model has a <literal>DATA_COLUMN</literal> of type
|
||||
%G_TYPE_POINTER.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There is a number of minor API differences between
|
||||
<structname>GnomeIconList</structname> and
|
||||
<structname>GtkIconView</structname>:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<type>GnomeIconListMode</type> is replaced by the
|
||||
<link linkend="GtkIconView--orientation">orientation</link>
|
||||
property of <structname>GtkIconView</structname>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<structname>GtkIconView</structname> can not be frozen in the same
|
||||
way as <structname>GnomeIconList</structname> can with
|
||||
gnome_icon_list_freeze() and gnome_icon_list_thaw(). Instead you can
|
||||
replace the whole model of a <structname>GtkIconView</structname>,
|
||||
instead of doing many small changes to the existing model.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-label-links">
|
||||
|
||||
<title>Migrating from SexyUrlLabel to GtkLabel</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.18 supports showing links inside a #GtkLabel, similar to
|
||||
SexyUrlLabel. Porting from SexyUrlLabel to GtkLabel is relatively
|
||||
straightforward. GtkLabel accepts links in the markup using the
|
||||
same HTML <tag>a</tag> notation that SexyUrlLabel uses. In addition
|
||||
to the href attribute, GtkLabel accepts a title attribute that
|
||||
is displayed as a tooltip on the link. Instead of
|
||||
sexy_url_label_set_markup(), just call gtk_label_set_markup().
|
||||
</para>
|
||||
<para>
|
||||
One difference between the two APIs is that the ::url-activated signal
|
||||
from SexyUrlLabel has been replaced by the #GtkLabel::activate-link
|
||||
signal. The need for connecting to this signal is greatly reduced,
|
||||
since GtkLabel has a default handler that calls gtk_show_uri().
|
||||
</para>
|
||||
</chapter>
|
@ -1,81 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkLinkButton">
|
||||
|
||||
<title>Migrating from GnomeHRef to GtkLinkButton</title>
|
||||
|
||||
<para>
|
||||
Since version 2.10, GTK+ provides the #GtkLinkButton widget as a
|
||||
replacement for the <structname>GnomeHRef</structname> widget
|
||||
in the libgnomeui library.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Porting an application from <structname>GnomeHRef</structname> to
|
||||
#GtkLinkButton is very simple. #GtkLinkButton does not have a
|
||||
default action for #GtkButton::clicked signal. So instead of simply
|
||||
creating the widget
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *button;
|
||||
|
||||
button = gnome_href_new (url, "");
|
||||
</programlisting></informalexample>
|
||||
you will have to handle the activation of the #GtkLinkButton, using
|
||||
the ::clicked signal for instance
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
link_button_clicked_cb (GtkWidget *widget,
|
||||
gpointer data)
|
||||
{
|
||||
const gchar *link;
|
||||
|
||||
link = gtk_link_button_get_uri (GTK_LINK_BUTTON (widget));
|
||||
open_browser_at_url (link);
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
GtkWidget *button;
|
||||
|
||||
button = gtk_link_button_new (url);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (link_button_clicked_cb), NULL);
|
||||
</programlisting></informalexample>
|
||||
If you have more than one #GtkLinkButton instead of connecting
|
||||
a signal to each one, you can use a "hook function" which will be
|
||||
called whenever a user activates a link button
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
link_button_hook (GtkLinkButton *button,
|
||||
const gchar *link,
|
||||
gpointer user_data)
|
||||
|
||||
{
|
||||
open_browser_at_url (link);
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
GtkWidget *button1 = gtk_link_button_new (uri1);
|
||||
GtkWidget *button2 = gtk_link_button_new (uri2);
|
||||
|
||||
gtk_link_button_set_uri_hook (link_button_hook, NULL, NULL);
|
||||
</programlisting></informalexample>
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Starting with GTK+ 2.16, it is no longer necessary to set up a uri hook
|
||||
manually, since GTK+ now defaults to calling gtk_show_uri() if no uri
|
||||
hook has been set.
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,323 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkRecentChooser">
|
||||
<chapterinfo>
|
||||
<author>
|
||||
<firstname>Emmanuele</firstname>
|
||||
<lastname>Bassi</lastname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>ebassi@gmail.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</chapterinfo>
|
||||
|
||||
<title>Migrating from EggRecent to GtkRecentChooser</title>
|
||||
|
||||
<para>
|
||||
Since version 2.10, GTK+ provides a way of handling the recently used
|
||||
documents. It is similar to the code that has lived inside the libegg
|
||||
library and has been incorporated by many applications. The GTK+ version
|
||||
aims to completely replace that code, and offers many distinctive features
|
||||
that improve the registration and visualization of the recently used
|
||||
documents, such as:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Better performances while reading and writing the list of recently used
|
||||
files
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
More meta-data available for each recent document, like the
|
||||
applications that have registered a document inside the list, the last
|
||||
time and the number of times the same application did register a
|
||||
document inside the list, an optional user readable name and
|
||||
description of the document
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Improved the ability to sort and filter the documents, also using
|
||||
custom sorting and filtering functions
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
New widgets for displaying the list, and better integration with
|
||||
current #GtkFileChooser and #GtkUIManager widgets
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<section id="gtkrecent-manager">
|
||||
<title>Managing the Recently Used Documents</title>
|
||||
|
||||
<para>
|
||||
#GtkRecentManager is used to manage the Recently Used Documents. To
|
||||
create a new #GtkRecentManager, you simply call gtk_recent_manager_new().
|
||||
Like the <structname>EggRecentModel</structname> inside EggRecent, the
|
||||
#GtkRecentManager loads the list of the recent documents and notifies
|
||||
you of changes inside the list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Usually, instead of creating a new #GtkRecentManager each time you
|
||||
need it, you'll want to use the gtk_recent_manager_get_default()
|
||||
function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To add a document to the list, you can use gtk_recent_manager_add_item(),
|
||||
like:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentManager *manager;
|
||||
|
||||
manager = gtk_recent_manager_new (<!-- -->);
|
||||
|
||||
if (!gtk_recent_manager_add_item (manager, document_uri))
|
||||
{
|
||||
/* warn about the error */
|
||||
}
|
||||
|
||||
g_object_unref (manager);
|
||||
</programlisting></informalexample>
|
||||
The gtk_recent_manager_add_item() function will try and guess some of the
|
||||
meta-data associated to a URI. If you know some of meta-data about the
|
||||
document yourself, set the desired fields of a #GtkRecentData structure
|
||||
and pass it to the gtk_recent_manager_add_full() function instead:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentManager *manager;
|
||||
GtkRecentData *recent_data;
|
||||
|
||||
manager = gtk_recent_manager_new (<!-- -->);
|
||||
|
||||
recent_data = g_new0 (GtkRecentData, 1);
|
||||
/* the user visible name of the document (maybe its title); should
|
||||
* be preferred when displaying the item into the list
|
||||
*/
|
||||
recent_data->display_name = document_name;
|
||||
|
||||
/* the MIME type is mandatory */
|
||||
recent_data->mime_type = document_mime_type;
|
||||
|
||||
/* the name of the application that is registering the document
|
||||
* (also mandatory); usually, the same name you used with
|
||||
* the g_set_application_name (<!-- -->) function.
|
||||
*/
|
||||
recent_data-&app_name = APP_NAME;
|
||||
|
||||
/* the command to open a file; the %u string will be automagically
|
||||
* expanded to the document's URI when getting the application's
|
||||
* command line from the GtkRecentInfo object with
|
||||
* gtk_recent_info_get_application_info (<!-- -->)
|
||||
*/
|
||||
recent_data-&app_exec = g_strjoin (" ", g_get_prgname (<!-- -->), "--open-file", "%u", NULL);
|
||||
|
||||
if (!gtk_recent_manager_add_full (manager, document_uri, recent_data))
|
||||
{
|
||||
/* warn about the error */
|
||||
}
|
||||
|
||||
g_free (recent_data->app_exec);
|
||||
g_free (recent_data);
|
||||
g_object_unref (manager);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Getting the list of items is also similar to
|
||||
<structname>EggRecentModel</structname>; the GtkRecentInfo data is
|
||||
allocated at look up time in order not to waste memory keeping it
|
||||
around, so you must remember to free the data inside the list and then
|
||||
the list itself when you are done using it:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentManager *manager;
|
||||
GList *recent_items, *l;
|
||||
|
||||
manager = gtk_recent_manager_get_default(<!-- -->);
|
||||
|
||||
recent_items = gtk_recent_manager_get_items (manager);
|
||||
for (l = recent_items; l != NULL; l = l->next)
|
||||
{
|
||||
GtkRecentInfo *recent_info = l->data;
|
||||
|
||||
do_something_with_the_item (recent_info);
|
||||
}
|
||||
|
||||
/* free everything and the list */
|
||||
g_list_foreach (recent_items, (GFunc) gtk_recent_info_unref, NULL);
|
||||
g_list_free (recent_items);
|
||||
</programlisting></informalexample>
|
||||
You can also look up a single item:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentInfo *recent_info;
|
||||
GError *error = NULL;
|
||||
|
||||
recent_info = gtk_recent_manager_lookup_item (manager, document_uri, &error);
|
||||
if (error)
|
||||
{
|
||||
display_error (error);
|
||||
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
{
|
||||
do_something_with_the_item (recent_info);
|
||||
|
||||
gtk_recent_info_unref (recent_info);
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
The #GtkRecentInfo is a reference counted boxed type, and it holds all
|
||||
the meta-data of a recently used document, like its display name, its
|
||||
description, the list of each application that has registered the
|
||||
document or the list of groups to which the document belong.
|
||||
</para>
|
||||
|
||||
</section> <!-- gtkrecent-manager -->
|
||||
|
||||
<section id="gtkrecent-chooser">
|
||||
<title>Displaying the Recently Used Documents</title>
|
||||
|
||||
<para>
|
||||
Displaying the Recently Used Documents list is handled by any widget
|
||||
implementing the #GtkRecentChooser interface. These widgets also handle
|
||||
the sorting and filtering of the list; they will create their own
|
||||
#GtkRecentManager objects by default:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *chooser;
|
||||
gint response;
|
||||
|
||||
/* create a new dialog with the recently used documents list shown
|
||||
* using a GtkTreeView widget
|
||||
*/
|
||||
chooser = gtk_recent_chooser_dialog_new ("Recent Documents",
|
||||
parent_window,
|
||||
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
/* set the sorting order to "most recently used first" */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_MRU);
|
||||
response = gtk_dialog_run (GTK_DIALOG (chooser));
|
||||
if (response == GTK_RESPONSE_OK)
|
||||
{
|
||||
GtkRecentInfo *info;
|
||||
|
||||
info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (chooser));
|
||||
do_something_with_the_item (info);
|
||||
|
||||
gtk_recent_info_unref (info);
|
||||
}
|
||||
|
||||
gtk_widget_destroy (chooser);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
</section> <!-- gtkrecent-chooser -->
|
||||
|
||||
<section id="gtkrecent-advanced">
|
||||
<title>Advanced usage</title>
|
||||
|
||||
<para>
|
||||
The #GtkRecentChooser widgets might display items sorted and filtered,
|
||||
either with already supplied or custom sorting and filtering functions.
|
||||
The biggest difference from the <structname>EggRecentView</structname>
|
||||
widgets in EggRecent is that the #GtkRecentChooser widgets will use
|
||||
their own copy of the list and will apply the sorting and filtering
|
||||
functions only on the copy; this allows the creation of many viewers
|
||||
with a single controller, like using many #GtkTreeView with a single
|
||||
#GtkTreeModel instance.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Available sorting methods are:
|
||||
<informalexample><programlisting>
|
||||
/* no sorting */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_NONE);
|
||||
|
||||
/* most recently used first */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_MRU);
|
||||
|
||||
/* most recently used last */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser), GTK_RECENT_SORT_LRU);
|
||||
</programlisting></informalexample>
|
||||
You can create your own sorting function, and the use the
|
||||
GTK_RECENT_SORT_CUSTOM method:
|
||||
<informalexample><programlisting>
|
||||
/* custom sorting function, based on the registration count
|
||||
* (most used first)
|
||||
*/
|
||||
static void
|
||||
sort_by_usage_count (GtkRecentInfo *a,
|
||||
GtkRecentInfo *b,
|
||||
gpointer data)
|
||||
{
|
||||
gint count_a, count_b;
|
||||
|
||||
count_a = count_b = 0;
|
||||
|
||||
if (gtk_recent_info_has_application (a, APP_NAME))
|
||||
gtk_recent_info_get_application_info (a, APP_NAME, NULL, &count_a, NULL);
|
||||
|
||||
if (gtk_recent_info_has_application (b, APP_NAME))
|
||||
gtk_recent_info_get_application_info (b, APP_NAME, NULL, &count_b, NULL);
|
||||
|
||||
return count_a < count_b;
|
||||
}
|
||||
|
||||
...
|
||||
|
||||
/* set custom sorting and set the custom sorting function */
|
||||
gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (chooser),
|
||||
GTK_RECENT_SORT_CUSTOM);
|
||||
gtk_recent_chooser_set_sort_func (GTK_RECENT_CHOOSER,
|
||||
sort_by_usage_count,
|
||||
NULL, /* sort function data */
|
||||
NULL /* destroy notify for the data */);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Filtering is done using the #GtkRecentFilter object, similar to the
|
||||
#GtkFileFilter object used by the #GtkFileChooser widgets. The
|
||||
#GtkRecentFilter object has a set of pre-defined options based on the
|
||||
meta-data exposed by the #GtkRecentInfo object. It also allows custom
|
||||
filtering function:
|
||||
<informalexample><programlisting>
|
||||
GtkRecentFilter *filter;
|
||||
|
||||
filter = gtk_recent_filter_new (<!-- -->);
|
||||
|
||||
/* set the user visible name of the filter */
|
||||
gtk_recent_filter_set_name (filter, "Since Last Month");
|
||||
|
||||
/* set the maximum age of a recently used document */
|
||||
gtk_recent_filter_set_age (filter, 31);
|
||||
|
||||
/* the chooser takes the ownership of the object */
|
||||
gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (chooser), filter);
|
||||
|
||||
/* set the currently used filter */
|
||||
gtk_recent_chooser_set_filter (GTK_RECENT_CHOOSER (chooser), filter);
|
||||
|
||||
filter = gtk_recent_filter_new (<!-- -->);
|
||||
gtk_recent_filter_set_name (filter, "Every text file");
|
||||
gtk_recent_filter_set_mime_type (filter, "text/plain");
|
||||
|
||||
gtk_recent_chooser_add_filter (GTK_RECENT_CHOOSER (chooser), filter);
|
||||
</programlisting></informalexample>
|
||||
The #GtkRecentChooserWidget and #GtkRecentChooserDialog widgets allow
|
||||
multiple filters and the selection of an appropriate one; the
|
||||
#GtkRecentChooserMenu widget allows just a single filter object.
|
||||
</para>
|
||||
|
||||
</section> <!-- gtkrecent-advanced -->
|
||||
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "chapter")
|
||||
End:
|
||||
-->
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-GtkStyleContext">
|
||||
<title>Migrating from GtkStyle to GtkStyleContext</title>
|
||||
<section id="gtk-migrating-GtkStyleContext">
|
||||
<title>Theming changes</title>
|
||||
|
||||
<para>
|
||||
In GTK+ 3.0, #GtkStyleContext was added to replace #GtkStyle and
|
||||
@ -14,7 +14,7 @@
|
||||
porting applications, libraries and widgets.
|
||||
</para>
|
||||
|
||||
<refsect2 id="gtk-migrating-GtkStyleContext-themes">
|
||||
<section id="gtk-migrating-GtkStyleContext-themes">
|
||||
<title>Migrating themes</title>
|
||||
|
||||
<para>
|
||||
@ -27,9 +27,9 @@
|
||||
with possible variants such as the dark theme being named
|
||||
<filename>gtk-dark.css</filename> in the same directory.
|
||||
</para>
|
||||
</refsect2>
|
||||
</section>
|
||||
|
||||
<refsect2 id="gtk-migrating-theme-GtkStyleContext-engines">
|
||||
<section id="gtk-migrating-theme-GtkStyleContext-engines">
|
||||
<title>Migrating theme engines</title>
|
||||
|
||||
<para>
|
||||
@ -141,9 +141,9 @@
|
||||
attempt to handle.
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
</section>
|
||||
|
||||
<refsect2 id="gtk-migrating-GtkStyleContext-parser-extensions">
|
||||
<section id="gtk-migrating-GtkStyleContext-parser-extensions">
|
||||
<title>Extending the CSS parser</title>
|
||||
|
||||
<para>
|
||||
@ -175,9 +175,9 @@
|
||||
style property can be modified in CSS as
|
||||
<literal>-GtkWidget-focus-line-width</literal>.
|
||||
</para>
|
||||
</refsect2>
|
||||
</section>
|
||||
|
||||
<refsect2 id="gtk-migrating-GtkStyleContext-css">
|
||||
<section id="gtk-migrating-GtkStyleContext-css">
|
||||
<title>Using the CSS file format</title>
|
||||
|
||||
<para>
|
||||
@ -358,6 +358,15 @@
|
||||
independently.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In the same vein, the light, dark and mid color variants that
|
||||
were available in GtkStyle should be replaced by a combination of
|
||||
symbolic colors and custom CSS, where necessary. text_aa should
|
||||
really not be used anywhere, anyway, and the white and black colors
|
||||
that were available in GtkStyle can just be replaced by literal
|
||||
GdkRGBA structs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Access to colors has also changed a bit. With #GtkStyle, the common
|
||||
way to access colors is:
|
||||
@ -393,9 +402,9 @@
|
||||
It is worth mentioning that the new file format does not support
|
||||
custom keybindings nor stock icon mappings as the RC format did.
|
||||
</para>
|
||||
</refsect2>
|
||||
</section>
|
||||
|
||||
<refsect2 id="gtk-migrating-GtkStyleContext-checklist">
|
||||
<section id="gtk-migrating-GtkStyleContext-checklist">
|
||||
<title>A checklist for widgets</title>
|
||||
|
||||
<para>
|
||||
@ -486,15 +495,34 @@
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
Replace all <literal>gtk_paint_*()</literal> calls with corresponding
|
||||
<literal>gtk_render_*()</literal> calls. The most distinctive changes
|
||||
are the use of #GtkStateFlags to represent the widget state and the
|
||||
lack of #GtkShadowType. For gtk_render_check() and gtk_render_option(),
|
||||
the @shadow_type parameter is replaced by the #GTK_STATE_FLAG_ACTIVE
|
||||
and #GTK_STATE_FLAG_INCONSISTENT state flags. For things such as
|
||||
pressed/unpressed button states, #GTK_STATE_FLAG_ACTIVE is used, and
|
||||
the CSS may style normal/active states differently to render
|
||||
outset/inset borders, respectively.
|
||||
<para>
|
||||
Replace all <literal>gtk_paint_*()</literal> calls with corresponding
|
||||
<literal>gtk_render_*()</literal> calls.
|
||||
</para>
|
||||
<para>
|
||||
The most distinctive changes are the use of #GtkStateFlags to
|
||||
represent the widget state and the lack of #GtkShadowType. Note
|
||||
that widget state is now passed implicitly via the context, so
|
||||
to render in a certain state, you have to temporarily set the
|
||||
state on the context, as in the following example:
|
||||
</para>
|
||||
<example>
|
||||
<title>Rendering with a specific state</title>
|
||||
<programlisting>
|
||||
gtk_style_context_save (context);
|
||||
gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE);
|
||||
gtk_render_check (context, cr, x, y, width, height);
|
||||
gtk_style_context_restore (context);
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
For gtk_render_check() and gtk_render_option(), the @shadow_type
|
||||
parameter is replaced by the #GTK_STATE_FLAG_ACTIVE and
|
||||
#GTK_STATE_FLAG_INCONSISTENT state flags. For things such as
|
||||
pressed/unpressed button states, #GTK_STATE_FLAG_ACTIVE is used,
|
||||
and the CSS may style normal/active states differently to render
|
||||
outset/inset borders, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
@ -515,9 +543,9 @@
|
||||
of this is merely a guideline. Widgets may choose to follow it or not.
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</refsect2>
|
||||
</section>
|
||||
|
||||
<refsect2 id="gtk-migrating-GtkStyleContext-parsing">
|
||||
<section id="gtk-migrating-GtkStyleContext-parsing">
|
||||
<title>Parsing of custom resources</title>
|
||||
<para>
|
||||
As a consequence of the RC format going away, calling gtk_rc_parse() or
|
||||
@ -528,15 +556,32 @@
|
||||
Typically, the provider will be a #GtkCssProvider, which parse CSS
|
||||
information from a file or from a string.
|
||||
</para>
|
||||
<example>
|
||||
<title>Using a custom GtkStyleProvider</title>
|
||||
<programlisting>
|
||||
GtkStyleContext *context;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider),
|
||||
".frame1 {\n"
|
||||
" border-image: url('gradient1.png') 10 10 10 10 stretch;\n"
|
||||
"}\n", -1, NULL);
|
||||
gtk_style_context_add_provider (context,
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
g_object_unref (provider);
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Notice that you can also get style information from custom resources
|
||||
by implementing the #GtkStyleProvider interface yourself. This is
|
||||
an advanced feature that should be rarely used.
|
||||
</para>
|
||||
</refsect2>
|
||||
</section>
|
||||
|
||||
<refsect2 id="gtk-migrating-GtkStyleContext-bonus-points">
|
||||
<section id="gtk-migrating-GtkStyleContext-bonus-points">
|
||||
<title>Bonus points</title>
|
||||
|
||||
<para>
|
||||
@ -627,5 +672,5 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</refsect2>
|
||||
</chapter>
|
||||
</section>
|
||||
</section>
|
||||
|
@ -1,66 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-tooltips">
|
||||
|
||||
<title>Migrating from GtkTooltips to GtkTooltip</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.12 brings a completely new tooltip implementation which
|
||||
allows many things that were not possible with the old
|
||||
#GtkTooltips interface. The new possibilities are explained
|
||||
in more detail in the section about #GtkTooltip.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A number of complications of the old API have been removed:
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>
|
||||
Tooltips can not be grouped anymore. The old tooltips
|
||||
API allowed this by using multiple #GtkTooltips objects.
|
||||
We believe that the timeout behaviour of the new tooltips
|
||||
implementation is better and makes it unnecessary to use
|
||||
grouping as a way to overcome shortcomings of the
|
||||
fast-tooltips mode.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
Timeouts can not be set individually anymore. Instead
|
||||
there are settings #GtkSettings:gtk-tooltip-timeout,
|
||||
#GtkSettings:gtk-tooltip-browse-timeout and
|
||||
#GtkSettings:gtk-tooltip-browse-mode-timeout to influence
|
||||
the behaviour of tooltips globally.
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here is an example of setting a tooltip on a widget with the old API:
|
||||
<informalexample><programlisting>
|
||||
GtkTooltips *tooltips = gtk_tooltips_new ();
|
||||
gtk_tooltips_set_tip (tooltips, widget, "Some tips", NULL);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Using the new tooltips API, it is no longer necessary to create
|
||||
an object:
|
||||
<informalexample><programlisting>
|
||||
gtk_widget_set_tooltip_text (widget, "Some tips");
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Similarly, setting a tooltip on a #GtkToolItem gets
|
||||
simplified from
|
||||
<informalexample><programlisting>
|
||||
gtk_tool_item_set_tooltip (toolitem, toolbar->tooltips, "tool tip", NULL);
|
||||
</programlisting></informalexample>
|
||||
to
|
||||
<informalexample><programlisting>
|
||||
gtk_tool_item_set_tooltip_text (toolitem, text);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
</chapter>
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-other-software" revision="5 Sept 2001">
|
||||
<refentry id="gtk-other-software">
|
||||
<refmeta>
|
||||
<refentrytitle>Mixing GTK+ with other software</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
@ -35,8 +35,8 @@ How do I get started with GTK+?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers a
|
||||
<ulink url="http://www.gtk.org/tutorial">tutorial</ulink> and a
|
||||
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers a
|
||||
<ulink url="http://www.gtk.org/tutorial">tutorial</ulink> and a
|
||||
<ulink url="http://www.gtk.org/faq">FAQ</ulink>. More documentation ranging
|
||||
from whitepapers to online books can be found at the
|
||||
<ulink url="http://library.gnome.org/devel/">GNOME developer's site</ulink>.
|
||||
@ -47,7 +47,7 @@ this reference manual for details.
|
||||
|
||||
<qandaentry>
|
||||
<question><para>
|
||||
Where can I get help with GTK+, submit a bug report, or make a feature
|
||||
Where can I get help with GTK+, submit a bug report, or make a feature
|
||||
request?
|
||||
</para></question>
|
||||
|
||||
@ -102,11 +102,11 @@ state (explained in its documentation).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For strings returned from functions, they will be declared "const" (using
|
||||
#G_CONST_RETURN) if they should not be freed. Non-const strings should be
|
||||
freed with g_free(). Arrays follow the same rule. (If you find an exception
|
||||
to the rules, please report a bug to <ulink
|
||||
url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.)
|
||||
For strings returned from functions, they will be declared "const" (using
|
||||
#G_CONST_RETURN) if they should not be freed. Non-const strings should be
|
||||
freed with g_free(). Arrays follow the same rule. If you find an
|
||||
undocumented exception to the rules, please report a bug to <ulink
|
||||
url="http://bugzilla.gnome.org">http://bugzilla.gnome.org</ulink>.
|
||||
</para>
|
||||
|
||||
</answer>
|
||||
@ -164,8 +164,8 @@ How do I use GTK+ with threads?
|
||||
<answer>
|
||||
|
||||
<para>
|
||||
This is covered in the <link linkend="gdk-Threads">GDK threads
|
||||
documentation</link>. See also the <link linkend="glib-Threads">GThread</link>
|
||||
This is covered in the <link linkend="gdk-Threads">GDK threads
|
||||
documentation</link>. See also the <link linkend="glib-Threads">GThread</link>
|
||||
documentation for portable threading primitives.
|
||||
</para>
|
||||
|
||||
@ -182,33 +182,37 @@ How do I internationalize a GTK+ program?
|
||||
<para>
|
||||
Most people use <ulink url="http://www.gnu.org/software/gettext/">GNU
|
||||
gettext</ulink>, already required in order to install GLib. On a UNIX
|
||||
or Linux system with gettext installed, type <literal>info gettext</literal>
|
||||
or Linux system with gettext installed, type <literal>info gettext</literal>
|
||||
to read the documentation.
|
||||
</para>
|
||||
<para>
|
||||
The short checklist on how to use gettext is: call bindtextdomain() so gettext
|
||||
can find the files containing your translations, call textdomain() to set the
|
||||
default translation domain, call bind_textdomain_codeset() to request that
|
||||
all translated strings are returned in UTF-8, then call gettext() to look up
|
||||
each string to be translated in the default domain.
|
||||
The short checklist on how to use gettext is: call bindtextdomain() so
|
||||
gettext can find the files containing your translations, call textdomain()
|
||||
to set the default translation domain, call bind_textdomain_codeset() to
|
||||
request that all translated strings are returned in UTF-8, then call
|
||||
gettext() to look up each string to be translated in the default domain.
|
||||
</para>
|
||||
<para>
|
||||
<filename>gi18n.h</filename> provides the following shorthand macros for
|
||||
convenience.
|
||||
Conventionally, people define macros as follows for convenience:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
#define _(x) gettext (x)
|
||||
#define N_(x) x
|
||||
#define _(x) gettext (x)
|
||||
#define N_(x) x
|
||||
#define C_(ctx,x) pgettext (ctx, x)
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
You use N_() (N stands for no-op) to mark a string for translation in a
|
||||
context where a function call to gettext() is not allowed, such as in an
|
||||
array initializer.
|
||||
You eventually have to call gettext() on the string to actually fetch the
|
||||
translation. _() both marks the string for translation and actually
|
||||
You use N_() (N stands for no-op) to mark a string for translation in
|
||||
a location where a function call to gettext() is not allowed, such as
|
||||
in an array initializer.
|
||||
You eventually have to call gettext() on the string to actually fetch
|
||||
the translation. _() both marks the string for translation and actually
|
||||
translates it.
|
||||
</para>
|
||||
<para>
|
||||
Nowadays, GLib provides the common shorthand macros in the header file
|
||||
<filename>gi18n.h</filename>, so you don't have to define them yourself,
|
||||
just include that header.
|
||||
The C_() macro (C stands for context) adds an additional context to
|
||||
the string that is marked for translation, which can help to disambiguate
|
||||
short strings that might need different translations in different
|
||||
parts of your program.
|
||||
</para>
|
||||
<para>
|
||||
Code using these macros ends up looking like this:
|
||||
@ -231,21 +235,21 @@ Code using these macros ends up looking like this:
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Libraries using gettext should use dgettext() instead of gettext(), which
|
||||
allows them to specify the translation domain each time they ask for a
|
||||
translation. Libraries should also avoid calling textdomain(), since they
|
||||
will be specifying the domain instead of using the default. For dgettext()
|
||||
the _() macro can be defined as:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
#define _(x) dgettext ("MyDomain", x)
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
Libraries using gettext should use dgettext() instead of gettext(), which
|
||||
allows them to specify the translation domain each time they ask for a
|
||||
translation. Libraries should also avoid calling textdomain(), since
|
||||
they will be specifying the domain instead of using the default.
|
||||
</para>
|
||||
<para>
|
||||
Again, GLib comes with the <filename>gi18n-lib.h</filename>, saving you the
|
||||
trouble of defining the macros by hand. The macros in that header expect the
|
||||
translation domain to be specified by the %GETTEXT_PACKAGE macro.
|
||||
With the convention that the macro <literal>GETTEXT_PACKAGE</literal> is
|
||||
defined to hold your libraries translation domain,
|
||||
<filename>gi18n-lib.h</filename> can be included to provide
|
||||
the following convenience:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
#define _(x) dgettext (GETTEXT_PACKAGE, x)
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -259,9 +263,9 @@ How do I use non-ASCII characters in GTK+ programs ?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
GTK+ uses <ulink url="http://www.unicode.org">Unicode</ulink> (more exactly
|
||||
UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a sequence of
|
||||
one to six bytes and has a number of nice properties which make it a good
|
||||
GTK+ uses <ulink url="http://www.unicode.org">Unicode</ulink> (more exactly
|
||||
UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a sequence of
|
||||
one to six bytes and has a number of nice properties which make it a good
|
||||
choice for working with Unicode text in C programs:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
@ -271,30 +275,30 @@ ASCII characters are encoded by their familiar ASCII codepoints.
|
||||
ASCII characters never appear as part of any other character.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
The zero byte doesn't occur as part of a character, so that UTF-8 strings
|
||||
can be manipulated with the usual C library functions for handling
|
||||
The zero byte doesn't occur as part of a character, so that UTF-8 strings
|
||||
can be manipulated with the usual C library functions for handling
|
||||
zero-terminated strings.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
More information about Unicode and UTF-8 can be found in the
|
||||
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode i
|
||||
More information about Unicode and UTF-8 can be found in the
|
||||
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode
|
||||
FAQ for Unix/Linux</ulink>.
|
||||
GLib provides functions for converting strings between UTF-8 and other
|
||||
encodings, see g_locale_to_utf8() and g_convert().
|
||||
</para>
|
||||
<para>
|
||||
Text coming from external sources (e.g. files or user input), has to be
|
||||
converted to UTF-8 before being handed over to GTK+. The following example
|
||||
writes the content of a IS0-8859-1 encoded text file to
|
||||
converted to UTF-8 before being handed over to GTK+. The following example
|
||||
writes the content of a IS0-8859-1 encoded text file to
|
||||
<literal>stdout</literal>:
|
||||
<informalexample><programlisting>
|
||||
gchar *text, *utf8_text;
|
||||
gsize length;
|
||||
GError *error = NULL;
|
||||
|
||||
if (g_file_get_contents (filename, &text, &length, NULL))
|
||||
if (g_file_get_contents (filename, &text, &length, NULL))
|
||||
{
|
||||
utf8_text = g_convert (text, length, "UTF-8", "ISO-8859-1",
|
||||
utf8_text = g_convert (text, length, "UTF-8", "ISO-8859-1",
|
||||
NULL, NULL, &error);
|
||||
if (error != NULL)
|
||||
{
|
||||
@ -304,7 +308,7 @@ if (g_file_get_contents (filename, &text, &length, NULL))
|
||||
else
|
||||
g_print (utf8_text);
|
||||
}
|
||||
else
|
||||
else
|
||||
fprintf (stderr, "Unable to read file %s\n", filename);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
@ -315,36 +319,37 @@ handling non-ASCII content:
|
||||
<varlistentry><term>direct UTF-8</term>
|
||||
<listitem><para>
|
||||
If your editor and compiler are capable of handling UTF-8 encoded sources,
|
||||
it is very convenient to simply use UTF-8 for string literals, since it allows
|
||||
you to edit the strings in "wysiwyg". Note that choosing this option may
|
||||
reduce the portability of your code.
|
||||
it is very convenient to simply use UTF-8 for string literals, since it
|
||||
allows you to edit the strings in "wysiwyg". Note that choosing this option
|
||||
may reduce the portability of your code.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term>escaped UTF-8</term>
|
||||
<listitem><para>
|
||||
Even if your toolchain can't handle UTF-8 directly, you can still encode string
|
||||
literals in UTF-8 by using octal or hexadecimal escapes like
|
||||
<literal>\212</literal> or <literal>\xa8</literal> to
|
||||
encode each byte. This is portable, but modifying the escaped strings is not
|
||||
very convenient. Be careful when mixing hexadecimal escapes with ordinary text;
|
||||
Even if your toolchain can't handle UTF-8 directly, you can still encode
|
||||
string literals in UTF-8 by using octal or hexadecimal escapes like
|
||||
<literal>\212</literal> or <literal>\xa8</literal> to encode each byte.
|
||||
This is portable, but modifying the escaped strings is not very convenient.
|
||||
Be careful when mixing hexadecimal escapes with ordinary text;
|
||||
<literal>"\xa8abcd"</literal> is a string of length 1 !
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term>runtime conversion</term>
|
||||
<listitem><para>
|
||||
If the string literals can be represented in an encoding which your toolchain
|
||||
can handle (e.g. IS0-8859-1), you can write your source files in that encoding
|
||||
and use g_convert() to convert the strings to UTF-8 at runtime. Note that this
|
||||
has some runtime overhead, so you may want to move the conversion out of inner
|
||||
loops.
|
||||
If the string literals can be represented in an encoding which your
|
||||
toolchain can handle (e.g. IS0-8859-1), you can write your source files
|
||||
in that encoding and use g_convert() to convert the strings to UTF-8 at
|
||||
runtime. Note that this has some runtime overhead, so you may want to move
|
||||
the conversion out of inner loops.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
Here is an example showing the three approaches using the copyright sign
|
||||
© which has Unicode and ISO-8859-1 codepoint 169 and is represented in
|
||||
UTF-8 by the two bytes 194, 169:
|
||||
Here is an example showing the three approaches using the copyright sign
|
||||
© which has Unicode and ISO-8859-1 codepoint 169 and is represented
|
||||
in UTF-8 by the two bytes 194, 169, or <literal>"\302\251"</literal> as
|
||||
a string literal:
|
||||
<informalexample><programlisting>
|
||||
g_print ("direct UTF-8: ©");
|
||||
g_print ("escaped UTF-8: \302\251");
|
||||
@ -368,9 +373,9 @@ How do I use GTK+ with C++?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
There are two ways to approach this. The GTK+ header files use the subset
|
||||
of C that's also valid C++, so you can simply use the normal GTK+ API
|
||||
in a C++ program. Alternatively, you can use a "C++ binding"
|
||||
There are two ways to approach this. The GTK+ header files use the subset
|
||||
of C that's also valid C++, so you can simply use the normal GTK+ API
|
||||
in a C++ program. Alternatively, you can use a "C++ binding"
|
||||
such as <ulink url="http://gtkmm.sourceforge.net/">gtkmm</ulink>
|
||||
which provides a native C++ API.
|
||||
</para>
|
||||
@ -380,20 +385,20 @@ connected to signals, not methods. So you will need to use global
|
||||
functions or "static" class functions for signal connections.
|
||||
</para>
|
||||
<para>
|
||||
Another common issue when using GTK+ directly is that
|
||||
C++ will not implicitly convert an integer to an enumeration.
|
||||
Another common issue when using GTK+ directly is that
|
||||
C++ will not implicitly convert an integer to an enumeration.
|
||||
This comes up when using bitfields; in C you can write the following
|
||||
code:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_window_set_events (gdk_window,
|
||||
gdk_window_set_events (gdk_window,
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
while in C++ you must write:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_window_set_events (gdk_window,
|
||||
gdk_window_set_events (gdk_window,
|
||||
(GdkEventMask) GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
@ -427,19 +432,19 @@ How do I load an image or animation from a file?
|
||||
<answer>
|
||||
|
||||
<para>
|
||||
To load an image file straight into a display widget, use
|
||||
gtk_image_new_from_file() <footnote><para> If the file load fails,
|
||||
gtk_image_new_from_file() will display no image graphic — to detect
|
||||
a failed load yourself, use gdk_pixbuf_new_from_file() directly, then
|
||||
gtk_image_new_from_pixbuf().</para></footnote>.
|
||||
To load an image file straight into a display widget, use
|
||||
gtk_image_new_from_file() <footnote><para> If the file load fails,
|
||||
gtk_image_new_from_file() will display no image graphic — to detect
|
||||
a failed load yourself, use gdk_pixbuf_new_from_file() directly, then
|
||||
gtk_image_new_from_pixbuf().</para></footnote>.
|
||||
To load an image for another purpose, use gdk_pixbuf_new_from_file(). To i
|
||||
load an animation, use gdk_pixbuf_animation_new_from_file().
|
||||
gdk_pixbuf_animation_new_from_file() can also load non-animated images, so
|
||||
use it in combination with gdk_pixbuf_animation_is_static_image() to load a
|
||||
file of unknown type.
|
||||
gdk_pixbuf_animation_new_from_file() can also load non-animated images, so
|
||||
use it in combination with gdk_pixbuf_animation_is_static_image() to load a
|
||||
file of unknown type.
|
||||
</para>
|
||||
<para>
|
||||
To load an image or animation file asynchronously (without blocking), use
|
||||
To load an image or animation file asynchronously (without blocking), use
|
||||
#GdkPixbufLoader.
|
||||
</para>
|
||||
</answer>
|
||||
@ -453,19 +458,17 @@ How do I draw text ?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
To draw a piece of text, use a Pango layout and gdk_draw_layout(),
|
||||
using code like the following:
|
||||
To draw a piece of text, use a Pango layout and pango_cairo_show_layout().
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
layout = gtk_widget_create_pango_layout (widget, text);
|
||||
fontdesc = pango_font_description_from_string ("Luxi Mono 12");
|
||||
pango_layout_set_font_description (layout, fontdesc);
|
||||
gdk_draw_layout (..., layout);
|
||||
pango_layout_set_font_description (layout, fontdesc);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
pango_font_description_free (fontdesc);
|
||||
g_object_unref (layout);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
Do not use the deprecated #GdkFont and gdk_draw_text().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -486,19 +489,18 @@ How do I measure the size of a piece of text ?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
To obtain the size of a piece of text, use a Pango layout and
|
||||
To obtain the size of a piece of text, use a Pango layout and
|
||||
pango_layout_get_pixel_size(), using code like the following:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
layout = gtk_widget_create_pango_layout (widget, text);
|
||||
fontdesc = pango_font_description_from_string ("Luxi Mono 12");
|
||||
pango_layout_set_font_description (layout, fontdesc);
|
||||
pango_layout_set_font_description (layout, fontdesc);
|
||||
pango_layout_get_pixel_size (layout, &width, &height);
|
||||
pango_font_description_free (fontdesc);
|
||||
g_object_unref (layout);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
Do not use the deprecated function gdk_text_width().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -512,21 +514,21 @@ section of <ulink url="http://library.gnome.org/devel/pango/stable/">Pango manua
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Why are types not registered if I use their <literal>GTK_TYPE_BLAH</literal>
|
||||
Why are types not registered if I use their <literal>GTK_TYPE_BLAH</literal>
|
||||
macro ?
|
||||
</para>
|
||||
</question>
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
The <literal>GTK_TYPE_BLAH</literal> macros are defined as calls to
|
||||
The <literal>GTK_TYPE_BLAH</literal> macros are defined as calls to
|
||||
<literal>gtk_blah_get_type()</literal>, and the <literal>_get_type()</literal> i
|
||||
functions are declared as %G_GNUC_CONST which allows the compiler to optimize
|
||||
the call away if it appears that the value is not being used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A common workaround for this problem is to store the result in a volatile
|
||||
A common workaround for this problem is to store the result in a volatile
|
||||
variable, which keeps the compiler from optimizing the call away.
|
||||
<informalexample><programlisting>
|
||||
volatile GType dummy = GTK_TYPE_BLAH;
|
||||
@ -545,28 +547,29 @@ How do I create a transparent toplevel window ?
|
||||
<answer>
|
||||
<para>
|
||||
To make a window transparent, it needs to use a visual which supports that.
|
||||
This is done by getting the RGBA colormap of the screen with
|
||||
gdk_screen_get_rgba_colormap() and setting it on the window. Note that
|
||||
gdk_screen_get_rgba_colormap() will return %NULL if transparent windows
|
||||
are not supported on the screen; also note that this may change from
|
||||
screen to screen, so it needs to be repeated whenever the window is moved
|
||||
to a different screen.
|
||||
This is done by getting the RGBA visual of the screen with
|
||||
gdk_screen_get_rgba_visual() and setting it on the window. Note that
|
||||
gdk_screen_get_rgba_visual() will return %NULL if transparent windows
|
||||
are not supported on the screen, you should fall back to
|
||||
gdk_screen_get_system_visual() in that case. Additionally, note that this
|
||||
will change from screen to screen, so it needs to be repeated whenever the
|
||||
window is moved to a different screen.
|
||||
<informalexample><programlisting>
|
||||
GdkColormap *colormap;
|
||||
GdkVisual *visual;
|
||||
|
||||
colormap = gdk_screen_get_rgba_colormap (screen);
|
||||
if (!colormap)
|
||||
colormap = gdk_screen_get_rgb_colormap (screen);
|
||||
visual = gdk_screen_get_rgba_visual (screen);
|
||||
if (visual == NULL)
|
||||
visual = gdk_screen_get_system_visual (screen);
|
||||
|
||||
gtk_widget_set_colormap (widget, colormap);
|
||||
gtk_widget_set_visual (GTK_WIDGET (window), visual);
|
||||
</programlisting></informalexample>
|
||||
One possibility to fill the alpha channel on the window is to use
|
||||
gdk_draw_rgb_32_image().
|
||||
To fill the alpha channel on the window simply use cairos
|
||||
RGBA drawing capabilities.
|
||||
</para>
|
||||
<para>
|
||||
Note that the presence of an RGBA visual is no guarantee that the
|
||||
window will actually appear transparent on screen. On X11, this
|
||||
requires a compositing manager to be running. See
|
||||
window will actually appear transparent on screen. On X11, this
|
||||
requires a compositing manager to be running. See
|
||||
gtk_widget_is_composited() for a way to find out if the alpha
|
||||
channel will be respected.
|
||||
</para>
|
||||
@ -585,10 +588,8 @@ channel will be respected.
|
||||
<answer>
|
||||
<para>
|
||||
See <link linkend="TreeWidget">tree widget overview</link> — you
|
||||
should use the #GtkTreeView widget. (A list is just a tree with no branches,
|
||||
so the tree widget is used for lists as well.) Do not use the deprecated
|
||||
widgets #GtkTree or #GtkCList/#GtkCTree in newly-written code, they are
|
||||
less flexible and result in an inferior user interface.
|
||||
should use the #GtkTreeView widget. (A list is just a tree with no branches,
|
||||
so the tree widget is used for lists as well).
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -601,12 +602,11 @@ less flexible and result in an inferior user interface.
|
||||
<answer>
|
||||
<para>
|
||||
See <link linkend="TextWidget">text widget overview</link> — you
|
||||
should use the #GtkTextView widget. Do not use the deprecated widget #GtkText
|
||||
in newly-written code, it has a number of problems that are best avoided.
|
||||
should use the #GtkTextView widget.
|
||||
</para>
|
||||
<para>
|
||||
If you only have a small amount of text, #GtkLabel may also be appropriate
|
||||
of course. It can be made selectable with gtk_label_set_selectable(). For a
|
||||
If you only have a small amount of text, #GtkLabel may also be appropriate
|
||||
of course. It can be made selectable with gtk_label_set_selectable(). For a
|
||||
single-line text entry, see #GtkEntry.
|
||||
</para>
|
||||
</answer>
|
||||
@ -620,8 +620,8 @@ single-line text entry, see #GtkEntry.
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
#GtkImage can display images in just about any format GTK+ understands.
|
||||
You can also use #GtkDrawingArea if you need to do something more complex,
|
||||
#GtkImage can display images in just about any format GTK+ understands.
|
||||
You can also use #GtkDrawingArea if you need to do something more complex,
|
||||
such as draw text or graphics over the top of the image.
|
||||
</para>
|
||||
</answer>
|
||||
@ -637,7 +637,8 @@ would use a combo box?
|
||||
<para>
|
||||
With GTK+, a #GtkComboBox is the recommended widget to use for this use case.
|
||||
This widget looks like either a combo box or the current option menu, depending
|
||||
on the current theme. If you need an editable text entry, use #GtkComboBoxEntry.
|
||||
on the current theme. If you need an editable text entry, use the
|
||||
#GtkComboBox:has-entry property.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -652,17 +653,14 @@ How do I change the color of a widget?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
See gtk_widget_modify_fg(), gtk_widget_modify_bg(), gtk_widget_modify_base(),
|
||||
and gtk_widget_modify_text(). See <link linkend="gtk-Resource-Files">GTK+
|
||||
resource files</link> for more discussion. You can also change widget color
|
||||
by installing a resource file and parsing it with gtk_rc_add_default_file().
|
||||
The advantage of a resource file is that users can then override the
|
||||
color you've chosen.
|
||||
See gtk_widget_override_color() and gtk_widget_override_background_color().
|
||||
You can also change the appearance of a widget by installing a
|
||||
custom style provider, see gtk_style_context_add_provider().
|
||||
</para>
|
||||
|
||||
<para>To change the background color for widgets such as #GtkLabel that have
|
||||
no background, place them in a #GtkEventBox and set the background of the
|
||||
event box.
|
||||
<para>To change the background color for widgets such as #GtkLabel that
|
||||
have no background, place them in a #GtkEventBox and set the background
|
||||
of the event box.
|
||||
</para></answer>
|
||||
</qandaentry>
|
||||
|
||||
@ -672,35 +670,38 @@ How do I change the font of a widget?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
This has several possible answers, depending on what exactly you want to
|
||||
achieve. One option is gtk_widget_modify_font(). Note that this function
|
||||
can be used to change only the font size, as in the following example:
|
||||
<programlisting>
|
||||
This has several possible answers, depending on what exactly you want to
|
||||
achieve. One option is gtk_widget_override_font().
|
||||
<informalexample><programlisting>
|
||||
PangoFontDesc *font_desc = pango_font_description_new (<!-- -->);
|
||||
pango_font_description_set_size (font_desc, 40);
|
||||
gtk_widget_modify_font (widget, font);
|
||||
gtk_widget_override_font (widget, font);
|
||||
pango_font_description_free (font_desc);
|
||||
</programlisting>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
<para>
|
||||
If you want to make the text of a label larger, you can use
|
||||
If you want to make the text of a label larger, you can use
|
||||
gtk_label_set_markup():
|
||||
<programlisting>
|
||||
<informalexample><programlisting>
|
||||
gtk_label_set_markup (label, "<big>big text</big>");
|
||||
</programlisting>
|
||||
This is preferred for many apps because it's a relative size to the
|
||||
user's chosen font size. See g_markup_escape_text() if you are
|
||||
</programlisting></informalexample>
|
||||
This is preferred for many apps because it's a relative size to the
|
||||
user's chosen font size. See g_markup_escape_text() if you are
|
||||
constructing such strings on the fly.
|
||||
</para>
|
||||
<para>
|
||||
You can also change the font of a widget by putting
|
||||
<programlisting>
|
||||
gtk-font-name = "Sans 30"
|
||||
.my-widget-class {
|
||||
font: Sans 30;
|
||||
}
|
||||
</programlisting>
|
||||
in a resource file and parsing it with gtk_rc_add_default_file().
|
||||
The advantage of a resource file is that users can then override the font you
|
||||
have chosen. See <link linkend="gtk-Resource-Files">GTK+ resource files</link>
|
||||
for more discussion.
|
||||
in a CSS file, loading it with gtk_css_provider_load_from_file(), and
|
||||
adding the provider with gtk_style_context_add_provider_for_screen().
|
||||
To associate this style information with your widget, set a style class
|
||||
on its #GtkStyleContext using gtk_style_context_add_class().
|
||||
The advantage of this approach is that users can then override the font
|
||||
you have chosen. See the #GtkStyleContext documentation for more discussion.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -710,8 +711,9 @@ for more discussion.
|
||||
How do I disable/ghost/desensitize a widget?
|
||||
</para></question>
|
||||
|
||||
<answer><para> In GTK+ a disabled widget is termed "insensitive." See
|
||||
gtk_widget_set_sensitive().
|
||||
<answer><para>
|
||||
In GTK+ a disabled widget is termed "insensitive."
|
||||
See gtk_widget_set_sensitive().
|
||||
</para></answer>
|
||||
</qandaentry>
|
||||
|
||||
@ -750,14 +752,14 @@ How do I make a text widget display its complete contents in a specific font?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
If you use gtk_text_buffer_insert_with_tags() with appropriate tags to select
|
||||
the font, the inserted text will have the desired appearance, but text typed
|
||||
in by the user before or after the tagged block will appear in the default
|
||||
style.
|
||||
If you use gtk_text_buffer_insert_with_tags() with appropriate tags to
|
||||
select the font, the inserted text will have the desired appearance, but
|
||||
text typed in by the user before or after the tagged block will appear in
|
||||
the default style.
|
||||
</para>
|
||||
<para>
|
||||
To ensure that all text has the desired appearance, use gtk_widget_modify_font()
|
||||
to change the default font for the widget.
|
||||
To ensure that all text has the desired appearance, use
|
||||
gtk_widget_override_font() to change the default font for the widget.
|
||||
</para></answer>
|
||||
</qandaentry>
|
||||
|
||||
@ -774,17 +776,17 @@ A good way to keep a text buffer scrolled to the end is to place a
|
||||
<link linkend="GtkTextMark">mark</link> at the end of the buffer, and
|
||||
give it right gravity. The gravity has the effect that text inserted
|
||||
at the mark gets inserted <emphasis>before</emphasis>, keeping the mark
|
||||
at the end.
|
||||
at the end.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<para>
|
||||
To ensure that the end of the buffer remains visible, use
|
||||
gtk_text_view_scroll_to_mark() to scroll to the mark after
|
||||
inserting new text.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The gtk-demo application contains an example of this technique.
|
||||
The gtk-demo application contains an example of this technique.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -801,25 +803,10 @@ How do I associate some data with a row in the tree?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
Remember that the #GtkTreeModel columns don't necessarily have to be displayed.
|
||||
So you can put non-user-visible data in your model just like any other data,
|
||||
and retrieve it with gtk_tree_model_get(). See the
|
||||
<link linkend="TreeWidget">tree widget overview</link>.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question><para>
|
||||
What's the #GtkTreeView equivalent of gtk_clist_find_row_from_data()?
|
||||
</para></question>
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
As there is no separate data column in the #GtkTreeModel, there's no
|
||||
built in function to find the iter from data. You can write a custom
|
||||
searching function to walk the tree and find the data, or use
|
||||
gtk_tree_model_foreach().
|
||||
Remember that the #GtkTreeModel columns don't necessarily have to be
|
||||
displayed. So you can put non-user-visible data in your model just
|
||||
like any other data, and retrieve it with gtk_tree_model_get().
|
||||
See the <link linkend="TreeWidget">tree widget overview</link>.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -831,9 +818,9 @@ How do I put an image and some text in the same column?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
You can pack more than one #GtkCellRenderer into a single #GtkTreeViewColumn
|
||||
using gtk_tree_view_column_pack_start() or gtk_tree_view_column_pack_end().
|
||||
So pack both a #GtkCellRendererPixbuf and a #GtkCellRendererText into the
|
||||
You can pack more than one #GtkCellRenderer into a single #GtkTreeViewColumn
|
||||
using gtk_tree_view_column_pack_start() or gtk_tree_view_column_pack_end().
|
||||
So pack both a #GtkCellRendererPixbuf and a #GtkCellRendererText into the
|
||||
column.
|
||||
</para>
|
||||
</answer>
|
||||
@ -841,15 +828,15 @@ column.
|
||||
|
||||
<qandaentry>
|
||||
<question><para>
|
||||
I can set data easily on my #GtkTreeStore/#GtkListStore models using
|
||||
I can set data easily on my #GtkTreeStore/#GtkListStore models using
|
||||
gtk_list_store_set() and gtk_tree_store_set(), but can't read it back?
|
||||
</para></question>
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
Both the #GtkTreeStore and the #GtkListStore implement the #GtkTreeModel
|
||||
interface. Consequentially, the can use any function this interface
|
||||
implements. The easiest way to read a set of data back is to use
|
||||
interface. Consequentially, you can use any function this interface
|
||||
implements. The easiest way to read a set of data back is to use
|
||||
gtk_tree_model_get().
|
||||
</para>
|
||||
</answer>
|
||||
@ -861,14 +848,14 @@ How do I change the way that numbers are formatted by #GtkTreeView?
|
||||
</para></question>
|
||||
<answer><para>
|
||||
Use gtk_tree_view_insert_column_with_data_func()
|
||||
or gtk_tree_view_column_set_cell_data_func() and do the conversion from i
|
||||
number to string yourself (with, say, g_strdup_printf()).
|
||||
or gtk_tree_view_column_set_cell_data_func() and do the conversion
|
||||
from number to string yourself (with, say, g_strdup_printf()).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following example demonstrates this:
|
||||
<informalexample><programlisting>
|
||||
enum
|
||||
enum
|
||||
{
|
||||
DOUBLE_COLUMN,
|
||||
N_COLUMNS
|
||||
@ -877,11 +864,11 @@ enum
|
||||
GtkListStore *mycolumns;
|
||||
GtkTreeView *treeview;
|
||||
|
||||
void
|
||||
void
|
||||
my_cell_double_to_text (GtkTreeViewColumn *tree_column,
|
||||
GtkCellRenderer *cell,
|
||||
GtkCellRenderer *cell,
|
||||
GtkTreeModel *tree_model,
|
||||
GtkTreeIter *iter,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
GtkCellRendererText *cell_text = (GtkCellRendererText *)cell;
|
||||
@ -896,7 +883,7 @@ my_cell_double_to_text (GtkTreeViewColumn *tree_column,
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
set_up_new_columns (GtkTreeView *myview)
|
||||
{
|
||||
GtkCellRendererText *renderer;
|
||||
@ -912,7 +899,7 @@ set_up_new_columns (GtkTreeView *myview)
|
||||
|
||||
/* Create a new column that has a title ("Example column"),
|
||||
* uses the above created renderer that will render the double
|
||||
* value into text from the associated model's rows.
|
||||
* value into text from the associated model's rows.
|
||||
*/
|
||||
column = gtk_tree_view_column_new (<!-- -->);
|
||||
gtk_tree_view_column_set_title (column, "Example column");
|
||||
@ -926,10 +913,10 @@ set_up_new_columns (GtkTreeView *myview)
|
||||
*/
|
||||
/* Set up a custom function that will be called when the column content
|
||||
* is rendered. We use the func_data pointer as an index into our
|
||||
* model. This is convenient when using multi column lists.
|
||||
* model. This is convenient when using multi column lists.
|
||||
*/
|
||||
gtk_tree_view_column_set_cell_data_func (column, renderer,
|
||||
my_cell_double_to_text,
|
||||
my_cell_double_to_text,
|
||||
(gpointer)DOUBLE_COLUMN, NULL);
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
@ -957,42 +944,15 @@ How do I use cairo to draw in GTK+ applications ?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
Use gdk_cairo_create() to obtain a cairo context for drawing
|
||||
on a GDK window or pixmap. See <link linkend="gdk-Cairo-Interaction">Cairo
|
||||
Interaction</link> for some more useful functions.
|
||||
</para></answer>
|
||||
</qandaentry>
|
||||
|
||||
<qandaentry>
|
||||
<question><para>
|
||||
I have created a cairo context with gdk_cairo_create(), but when I
|
||||
later use it, my drawing does not show up. Why is that ?
|
||||
</para></question>
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
All drawing in GTK+ is normally done in an expose handler, and GTK+
|
||||
creates a temporary pixmap for double-buffering the drawing. If you
|
||||
create a cairo context outside the expose handler, it is backed
|
||||
by the GDK window itself, not the double-buffering pixmap. Consequently,
|
||||
any drawing you do with that cairo context gets overwritten at the
|
||||
end of the expose handler, when the double-buffering pixmap is copied
|
||||
back.
|
||||
The #GtkWidget::draw signal gets a ready-to-use cairo context
|
||||
as parameter that you should use.
|
||||
</para>
|
||||
<para>
|
||||
Possible solutions to this problem are:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Turn off double-buffering, with gtk_widget_set_double_buffered().
|
||||
This is not ideal, since it can cause some flickering.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Create the cairo context inside the expose handler. If you do this,
|
||||
gdk_create_cairo() arranges for it to be backed by the double-buffering
|
||||
pixmap. This is the preferred solution, and is used throughout GTK+
|
||||
itself.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
All drawing in GTK+ is normally done in a draw handler, and GTK+
|
||||
creates a temporary pixmap for double-buffering the drawing.
|
||||
It is possible to turn off double-buffering, with
|
||||
gtk_widget_set_double_buffered(), but this is not ideal,
|
||||
since it can cause some flickering.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@ -1000,7 +960,7 @@ itself.
|
||||
<qandaentry>
|
||||
<question><para>
|
||||
Can I improve the performance of my application by using the
|
||||
Glitz backend of cairo ?
|
||||
Glitz or GL backend of cairo ?
|
||||
</para></question>
|
||||
|
||||
<answer><para>
|
||||
@ -1020,7 +980,7 @@ Can I use cairo to draw on a #GdkPixbuf ?
|
||||
|
||||
<answer><para>
|
||||
No, at least not yet. The cairo image surface does not support the
|
||||
pixel format used by GdkPixbuf.
|
||||
pixel format used by GdkPixbuf.
|
||||
</para></answer>
|
||||
</qandaentry>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-resources" revision="5 Sept 2001">
|
||||
<refentry id="gtk-resources">
|
||||
<refmeta>
|
||||
<refentrytitle>Mailing lists and bug reports</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
@ -267,15 +267,6 @@ additional environment variables.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GTK2_RC_FILES</envar></title>
|
||||
|
||||
<para>
|
||||
Specifies a list of RC files to parse instead of the default ones;
|
||||
see <link linkend="gtk-Resource-Files">Resource Files</link>.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GTK_EXE_PREFIX</envar></title>
|
||||
|
||||
@ -377,6 +368,15 @@ nevertheless.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GDK_SYNCHRONIZE</envar></title>
|
||||
|
||||
<para>
|
||||
If set, GDK makes all X requests synchronously. This is a useful
|
||||
option for debugging, but it will slow down the performance considerably.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
|
||||
|
||||
@ -389,6 +389,19 @@ nevertheless.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>DESKTOP_STARTUP_ID</envar></title>
|
||||
|
||||
<para>
|
||||
GTK+ uses this environment variable to provide startup notification
|
||||
according to the <ulink url="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">Startup Notification Spec</ulink>.
|
||||
Following the specification, GTK+ unsets this variable after reading
|
||||
it (to keep it from leaking to child processes). So, if you need its
|
||||
value for your own purposes, you have to read it before calling
|
||||
gtk_init().
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
</refsect2>
|
||||
|
||||
</refsect1>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="TextWidget" revision="18 Oct 2000">
|
||||
<refentry id="TextWidget">
|
||||
<refmeta>
|
||||
<refentrytitle>Text Widget Overview</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
17
docs/reference/gtk/tmpl/.gitignore
vendored
17
docs/reference/gtk/tmpl/.gitignore
vendored
@ -8,6 +8,7 @@ gtkbuilder.sgml
|
||||
gtkbutton.sgml
|
||||
gtkcalendar.sgml
|
||||
gtkcelleditable.sgml
|
||||
gtkcelllayout.sgml
|
||||
gtkcellrenderer.sgml
|
||||
gtkcellrenderertext.sgml
|
||||
gtkcellview.sgml
|
||||
@ -16,9 +17,17 @@ gtkcolorsel.sgml
|
||||
gtkcombobox.sgml
|
||||
gtkcomboboxentry.sgml
|
||||
gtkcontainer.sgml
|
||||
gtkdialog.sgml
|
||||
gtkdrawingarea.sgml
|
||||
gtkeditable.sgml
|
||||
gtkentry.sgml
|
||||
gtkentrybuffer.sgml
|
||||
gtkenum.sgml
|
||||
gtkeventbox.sgml
|
||||
gtkexpander.sgml
|
||||
gtkfeatures.sgml
|
||||
gtkfixed.sgml
|
||||
gtkfilefilter.sgml
|
||||
gtkhbox.sgml
|
||||
gtkiconview.sgml
|
||||
gtkimcontextsimple.sgml
|
||||
@ -26,6 +35,10 @@ gtkimmulticontext.sgml
|
||||
gtkitemfactory.sgml
|
||||
gtklayout.sgml
|
||||
gtklinkbutton.sgml
|
||||
gtkmain.sgml
|
||||
gtkmenu.sgml
|
||||
gtkmenubar.sgml
|
||||
gtkmenushell.sgml
|
||||
gtkmessagedialog.sgml
|
||||
gtknotebook.sgml
|
||||
gtkobject.sgml
|
||||
@ -35,6 +48,7 @@ gtkpagesetupunixdialog.sgml
|
||||
gtkpaned.sgml
|
||||
gtkpapersize.sgml
|
||||
gtkprinter.sgml
|
||||
gtkprintjob.sgml
|
||||
gtkprogressbar.sgml
|
||||
gtkradioaction.sgml
|
||||
gtkradiobutton.sgml
|
||||
@ -49,6 +63,7 @@ gtkscale.sgml
|
||||
gtkscalebutton.sgml
|
||||
gtkscrollbar.sgml
|
||||
gtkscrolledwindow.sgml
|
||||
gtkselection.sgml
|
||||
gtkseparator.sgml
|
||||
gtkseparatormenuitem.sgml
|
||||
gtkseparatortoolitem.sgml
|
||||
@ -57,6 +72,7 @@ gtkstatusbar.sgml
|
||||
gtkstyle.sgml
|
||||
gtktesting.sgml
|
||||
gtktextiter.sgml
|
||||
gtktexttag.sgml
|
||||
gtktexttagtable.sgml
|
||||
gtktextview.sgml
|
||||
gtktoggleaction.sgml
|
||||
@ -64,6 +80,7 @@ gtktoolbar.sgml
|
||||
gtktoolitem.sgml
|
||||
gtktooltip.sgml
|
||||
gtktreednd.sgml
|
||||
gtktreemodel.sgml
|
||||
gtktreemodelfilter.sgml
|
||||
gtktreeselection.sgml
|
||||
gtktreesortable.sgml
|
||||
|
@ -1,186 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellLayout
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
An interface for packing cells
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkCellLayout is an interface to be implemented by all objects which
|
||||
want to provide a #GtkTreeViewColumn-like API for packing cells, setting
|
||||
attributes and data funcs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One of the notable features provided by implementations of GtkCellLayout
|
||||
are <emphasis>attributes</emphasis>. Attributes let you set the properties
|
||||
in flexible ways. They can just be set to constant values like regular
|
||||
properties. But they can also be mapped to a column of the underlying
|
||||
tree model with gtk_cell_layout_set_attributes(), which means that the value
|
||||
of the attribute can change from cell to cell as they are rendered by the
|
||||
cell renderer. Finally, it is possible to specify a function with
|
||||
gtk_cell_layout_set_cell_data_func() that is called to determine the value
|
||||
of the attribute for each cell that is rendered.
|
||||
</para>
|
||||
|
||||
<refsect2 id="GtkCellLayout-BUILDER-UI">
|
||||
<title>GtkCellLayouts as GtkBuildable</title>
|
||||
<para>
|
||||
Implementations of GtkCellLayout which also implement the GtkBuildable
|
||||
interface (#GtkCellView, #GtkIconView, #GtkComboBox, #GtkComboBoxEntry,
|
||||
#GtkEntryCompletion, #GtkTreeViewColumn) accept GtkCellRenderer objects
|
||||
as <child> elements in UI definitions. They support a custom
|
||||
<attributes> element for their children, which can contain
|
||||
multiple <attribute> elements. Each <attribute> element has
|
||||
a name attribute which specifies a property of the cell renderer; the
|
||||
content of the element is the attribute value.
|
||||
</para>
|
||||
<example>
|
||||
<title>A UI definition fragment specifying attributes</title>
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkCellView">
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>"
|
||||
</object>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellLayout ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellLayoutIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@g_iface:
|
||||
@pack_start:
|
||||
@pack_end:
|
||||
@clear:
|
||||
@add_attribute:
|
||||
@set_cell_data_func:
|
||||
@clear_attributes:
|
||||
@reorder:
|
||||
@get_cells:
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkCellLayoutDataFunc ##### -->
|
||||
<para>
|
||||
A function which should set the value of @cell_layout's cell renderer(s)
|
||||
as appropriate.
|
||||
</para>
|
||||
|
||||
@cell_layout: a #GtkCellLayout
|
||||
@cell: the cell renderer whose value is to be set
|
||||
@tree_model: the model
|
||||
@iter: a #GtkTreeIter indicating the row to set the value for
|
||||
@data: user data passed to gtk_cell_layout_set_cell_data_func()
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_pack_start ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
@expand:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_pack_end ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
@expand:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_get_cells ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_reorder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
@position:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_clear ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_set_attributes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
@Varargs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_add_attribute ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
@attribute:
|
||||
@column:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_set_cell_data_func ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
@func:
|
||||
@func_data:
|
||||
@destroy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_layout_clear_attributes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell_layout:
|
||||
@cell:
|
||||
|
||||
|
@ -1,406 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkDialog
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Create popup windows
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para>
|
||||
Dialog boxes are a convenient way to prompt the user for a small amount of
|
||||
input, e.g. to display a message, ask a question, or anything else that does
|
||||
not require extensive effort on the user's part.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK+ treats a dialog as a window split vertically. The top section is a
|
||||
#GtkVBox known as the <structfield>content_area</structfield>, and is
|
||||
where widgets such as a #GtkLabel or a #GtkEntry should be packed.
|
||||
The bottom area is known as the <structfield>action_area</structfield>.
|
||||
This is generally used for packing buttons into the dialog which may
|
||||
perform functions such as cancel, ok, or apply.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GtkDialog boxes are created with a call to gtk_dialog_new() or
|
||||
gtk_dialog_new_with_buttons(). gtk_dialog_new_with_buttons() is recommended;
|
||||
it allows you to set the dialog title, some convenient flags, and add simple
|
||||
buttons.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If 'dialog' is a newly created dialog, the two primary areas of the window
|
||||
can be accessed through gtk_dialog_get_content_area() and
|
||||
gtk_dialog_get_action_area(), as can be seen from the example, below.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A 'modal' dialog (that is, one which freezes the rest of the application from
|
||||
user input), can be created by calling gtk_window_set_modal() on the dialog. Use
|
||||
the GTK_WINDOW() macro to cast the widget returned from gtk_dialog_new() into a
|
||||
#GtkWindow. When using gtk_dialog_new_with_buttons() you can also pass the
|
||||
#GTK_DIALOG_MODAL flag to make a dialog modal.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you add buttons to #GtkDialog using gtk_dialog_new_with_buttons(),
|
||||
gtk_dialog_add_button(), gtk_dialog_add_buttons(), or
|
||||
gtk_dialog_add_action_widget(), clicking the button will emit a signal called
|
||||
"response" with a response ID that you specified. GTK+ will never assign a
|
||||
meaning to positive response IDs; these are entirely user-defined. But for
|
||||
convenience, you can use the response IDs in the #GtkResponseType enumeration
|
||||
(these all have values less than zero). If a dialog receives a delete event,
|
||||
the "response" signal will be emitted with a response ID of #GTK_RESPONSE_DELETE_EVENT.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
If you want to block waiting for a dialog to return before returning control
|
||||
flow to your code, you can call gtk_dialog_run(). This function enters a
|
||||
recursive main loop and waits for the user to respond to the dialog, returning the
|
||||
response ID corresponding to the button the user clicked.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For the simple dialog in the following example, in reality you'd probably use
|
||||
#GtkMessageDialog to save yourself some effort. But you'd need to create the
|
||||
dialog contents manually if you had more than a simple message in the dialog.
|
||||
<example>
|
||||
<title>Simple <structname>GtkDialog</structname> usage.</title>
|
||||
<programlisting>
|
||||
|
||||
/* Function to open a dialog box displaying the message provided. */
|
||||
|
||||
void quick_message (gchar *message) {
|
||||
|
||||
GtkWidget *dialog, *label, *content_area;
|
||||
|
||||
/* Create the widgets */
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons ("Message",
|
||||
main_application_window,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_STOCK_OK,
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
label = gtk_label_new (message);
|
||||
|
||||
/* Ensure that the dialog box is destroyed when the user responds. */
|
||||
|
||||
g_signal_connect_swapped (dialog,
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
dialog);
|
||||
|
||||
/* Add the label, and show everything we've added to the dialog. */
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (content_area), label);
|
||||
gtk_widget_show_all (dialog);
|
||||
}
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<refsect2 id="GtkDialog-BUILDER-UI"><title>GtkDialog as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkDialog implementation of the GtkBuildable interface exposes the
|
||||
@vbox and @action_area as internal children with the names "vbox" and
|
||||
"action_area".
|
||||
</para>
|
||||
<para>
|
||||
GtkDialog supports a custom <action-widgets> element, which
|
||||
can contain multiple <action-widget> elements. The "response"
|
||||
attribute specifies a numeric response, and the content of the element
|
||||
is the id of widget (which should be a child of the dialogs @action_area).
|
||||
</para>
|
||||
<example>
|
||||
<title>A <structname>GtkDialog</structname> UI definition fragment.</title>
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkDialog" id="dialog1">
|
||||
<child internal-child="vbox">"
|
||||
<object class="GtkVBox" id="vbox">
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox" id="button_box">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button_ok"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="3">button_ok</action-widget>
|
||||
<action-widget response="-5">button_cancel</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkVBox</term>
|
||||
<listitem><para>Pack widgets vertically.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkWindow</term>
|
||||
<listitem><para>Alter the properties of your dialog box.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkButton</term>
|
||||
<listitem><para>Add them to the <structfield>action_area</structfield> to get a
|
||||
response from the user.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkDialog ##### -->
|
||||
<para>
|
||||
<structfield>vbox</structfield> is a #GtkVBox - the main part of the
|
||||
dialog box.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<structfield>action_area</structfield> is a #GtkHButtonBox packed below the
|
||||
dividing #GtkHSeparator in the dialog. It is treated exactly the same
|
||||
as any other #GtkHButtonBox.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkDialog::close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkDialog::response ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@arg1:
|
||||
|
||||
<!-- ##### ARG GtkDialog:action-area-border ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkDialog:button-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkDialog:content-area-border ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkDialog:content-area-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GtkDialogFlags ##### -->
|
||||
<para>
|
||||
Flags used to influence dialog construction.
|
||||
</para>
|
||||
|
||||
@GTK_DIALOG_MODAL: Make the constructed dialog modal,
|
||||
see gtk_window_set_modal().
|
||||
@GTK_DIALOG_DESTROY_WITH_PARENT: Destroy the dialog when its
|
||||
parent is destroyed, see gtk_window_set_destroy_with_parent().
|
||||
|
||||
<!-- ##### ENUM GtkResponseType ##### -->
|
||||
<para>
|
||||
Predefined values for use as response ids in gtk_dialog_add_button().
|
||||
All predefined values are negative, GTK+ leaves positive values for
|
||||
application-defined response ids.
|
||||
</para>
|
||||
|
||||
@GTK_RESPONSE_NONE: Returned if an action widget has no response id, or if
|
||||
the dialog gets programmatically hidden or destroyed.
|
||||
@GTK_RESPONSE_REJECT: Generic response id, not used by GTK+ dialogs.
|
||||
@GTK_RESPONSE_ACCEPT: Generic response id, not used by GTK+ dialogs.
|
||||
@GTK_RESPONSE_DELETE_EVENT: Returned if the dialog is deleted.
|
||||
@GTK_RESPONSE_OK: Returned by OK buttons in GTK+ dialogs.
|
||||
@GTK_RESPONSE_CANCEL: Returned by Cancel buttons in GTK+ dialogs.
|
||||
@GTK_RESPONSE_CLOSE: Returned by Close buttons in GTK+ dialogs.
|
||||
@GTK_RESPONSE_YES: Returned by Yes buttons in GTK+ dialogs.
|
||||
@GTK_RESPONSE_NO: Returned by No buttons in GTK+ dialogs.
|
||||
@GTK_RESPONSE_APPLY: Returned by Apply buttons in GTK+ dialogs.
|
||||
@GTK_RESPONSE_HELP: Returned by Help buttons in GTK+ dialogs.
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_new ##### -->
|
||||
<para>
|
||||
Creates a new dialog box. Widgets should not be packed into this #GtkWindow
|
||||
directly, but into the @vbox and @action_area, as described above.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkDialog.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_new_with_buttons ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@parent:
|
||||
@flags:
|
||||
@first_button_text:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_run ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_response ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@response_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_add_button ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@button_text:
|
||||
@response_id:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_add_buttons ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@first_button_text:
|
||||
@Varargs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_add_action_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@child:
|
||||
@response_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_set_default_response ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@response_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_set_response_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@response_id:
|
||||
@setting:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_get_response_for_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_get_widget_for_response ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@response_id:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_get_action_area ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_get_content_area ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_alternative_dialog_button_order ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_set_alternative_button_order ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@first_response_id:
|
||||
@Varargs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_set_alternative_button_order_from_array ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@n_params:
|
||||
@new_order:
|
||||
|
||||
|
@ -1,131 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkDrawingArea
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget for custom user interface elements
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
The #GtkDrawingArea widget is used for creating custom user interface
|
||||
elements. It's essentially a blank widget; you can draw on
|
||||
<literal>widget->window</literal>. After creating a drawing area,
|
||||
the application may want to connect to:
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Mouse and button press signals to respond to input from
|
||||
the user. (Use gtk_widget_add_events() to enable events
|
||||
you wish to receive.)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The "realize" signal to take any necessary actions
|
||||
when the widget is instantiated on a particular display.
|
||||
(Create GDK resources in response to this signal.)
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The "configure_event" signal to take any necessary actions
|
||||
when the widget changes size.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The "expose_event" signal to handle redrawing the
|
||||
contents of the widget.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
The following code portion demonstrates using a drawing
|
||||
area to display a circle in the normal widget foreground
|
||||
color.
|
||||
Note that GDK automatically clears the exposed area
|
||||
to the background color before sending the expose event, and
|
||||
that drawing is implicitly clipped to the exposed area.
|
||||
</para>
|
||||
<example>
|
||||
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
|
||||
<programlisting>
|
||||
gboolean
|
||||
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (event->window);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
[...]
|
||||
GtkWidget *drawing_area = gtk_drawing_area_new (<!-- -->);
|
||||
gtk_widget_set_size_request (drawing_area, 100, 100);
|
||||
g_signal_connect (G_OBJECT (drawing_area), "expose_event",
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
Expose events are normally delivered when a drawing area first comes
|
||||
onscreen, or when it's covered by another window and then uncovered
|
||||
(exposed). You can also force an expose event by adding to the "damage
|
||||
region" of the drawing area's window; gtk_widget_queue_draw_area() and
|
||||
gdk_window_invalidate_rect() are equally good ways to do this. You'll
|
||||
then get an expose event for the invalid region.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The available routines for drawing are documented on the <link
|
||||
linkend="gdk-Drawing-Primitives">GDK Drawing Primitives</link> page.
|
||||
See also gdk_draw_pixbuf() for drawing a #GdkPixbuf.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To receive mouse events on a drawing area, you will need to enable
|
||||
them with gtk_widget_add_events(). To receive keyboard events, you
|
||||
will need to set the #GTK_CAN_FOCUS flag on the drawing area, and
|
||||
should probably draw some user-visible indication that the drawing
|
||||
area is focused. Use the GTK_HAS_FOCUS() macro in your expose event
|
||||
handler to decide whether to draw the focus indicator. See
|
||||
gtk_paint_focus() for one way to draw focus.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
Sometimes #GtkImage is a useful alternative to a drawing area.
|
||||
You can put a #GdkPixmap in the #GtkImage and draw to the #GdkPixmap,
|
||||
calling gtk_widget_queue_draw() on the #GtkImage when you want to
|
||||
refresh to the screen.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkDrawingArea ##### -->
|
||||
<para>
|
||||
The #GtkDrawingArea struct contains private data only, and
|
||||
should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_drawing_area_new ##### -->
|
||||
<para>
|
||||
Creates a new drawing area.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkDrawingArea
|
||||
|
||||
|
@ -1,377 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkEntryCompletion
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Completion functionality for GtkEntry
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkEntryCompletion is an auxiliary object to be used in conjunction with
|
||||
#GtkEntry to provide the completion functionality. It implements the
|
||||
#GtkCellLayout interface, to allow the user to add extra cells to the
|
||||
#GtkTreeView with completion matches.
|
||||
</para>
|
||||
<para>
|
||||
"Completion functionality" means that when the user modifies the text
|
||||
in the entry, #GtkEntryCompletion checks which rows in the model match
|
||||
the current content of the entry, and displays a list of matches.
|
||||
By default, the matching is done by comparing the entry text
|
||||
case-insensitively against the text column of the model (see
|
||||
gtk_entry_completion_set_text_column()), but this can be overridden with
|
||||
a custom match function (see gtk_entry_completion_set_match_func()).
|
||||
</para>
|
||||
<para>
|
||||
When the user selects a completion, the content of the entry is updated.
|
||||
By default, the content of the entry is replaced by the text column of the
|
||||
model, but this can be overridden by connecting to the ::match-selected signal
|
||||
and updating the entry in the signal handler. Note that you should return
|
||||
%TRUE from the signal handler to suppress the default behaviour.
|
||||
</para>
|
||||
<para>
|
||||
To add completion functionality to an entry, use gtk_entry_set_completion().
|
||||
</para>
|
||||
<para>
|
||||
In addition to regular completion matches, which will be inserted into the
|
||||
entry when they are selected, #GtkEntryCompletion also allows to display
|
||||
"actions" in the popup window. Their appearance is similar to menuitems,
|
||||
to differentiate them clearly from completion strings. When an action is
|
||||
selected, the ::action-activated signal is emitted.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkEntryCompletion ##### -->
|
||||
<para>
|
||||
The GtkEntryCompletion struct contains only private data.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryCompletion::action-activated ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrycompletion: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryCompletion::cursor-on-match ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrycompletion: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryCompletion::insert-prefix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrycompletion: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryCompletion::match-selected ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrycompletion: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:inline-completion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:inline-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:minimum-key-length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:popup-completion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:popup-set-width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:popup-single-match ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryCompletion:text-column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkEntryCompletionMatchFunc ##### -->
|
||||
<para>
|
||||
A function which decides whether the row indicated by @iter matches a given
|
||||
@key, and should be displayed as a possible completion for @key. Note that
|
||||
@key is normalized and case-folded (see g_utf8_normalize() and
|
||||
g_utf8_casefold()). If this is not appropriate, match functions have access
|
||||
to the unmodified key via <literal>gtk_entry_get_text (GTK_ENTRY (gtk_entry_completion_get_entry (<!-- -->)))</literal>.
|
||||
</para>
|
||||
|
||||
@completion: the #GtkEntryCompletion
|
||||
@key: the string to match, normalized and case-folded
|
||||
@iter: a #GtkTreeIter indicating the row to match
|
||||
@user_data: user data given to gtk_entry_completion_set_match_func()
|
||||
@Returns: %TRUE if @iter should be displayed as a possible completion for @key
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_entry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@model:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_match_func ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@func:
|
||||
@func_data:
|
||||
@func_notify:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_minimum_key_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@length:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_minimum_key_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_complete ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_completion_prefix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_insert_prefix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_insert_action_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@index_:
|
||||
@text:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_insert_action_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@index_:
|
||||
@markup:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_delete_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@index_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_text_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@column:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_text_column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_inline_completion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@inline_completion:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_inline_completion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_inline_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@inline_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_inline_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_popup_completion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@popup_completion:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_popup_completion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_popup_set_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@popup_set_width:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_popup_set_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_set_popup_single_match ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@popup_single_match:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_completion_get_popup_single_match ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@completion:
|
||||
@Returns:
|
||||
|
||||
|
@ -1,458 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Standard Enumerations
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Public enumerated types used throughout GTK+
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkAccelFlags ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_ACCEL_VISIBLE:
|
||||
@GTK_ACCEL_LOCKED:
|
||||
@GTK_ACCEL_MASK:
|
||||
|
||||
<!-- ##### ENUM GtkArrowPlacement ##### -->
|
||||
<para>
|
||||
Used to specify the placement of scroll arrows in scrolling menus.
|
||||
</para>
|
||||
|
||||
@GTK_ARROWS_BOTH: Place one arrow on each end of the menu.
|
||||
@GTK_ARROWS_START: Place both arrows at the top of the menu.
|
||||
@GTK_ARROWS_END: Place both arrows at the bottom of the menu.
|
||||
|
||||
<!-- ##### ENUM GtkArrowType ##### -->
|
||||
<para>
|
||||
Used to indicate the direction in which a #GtkArrow should point.
|
||||
</para>
|
||||
|
||||
@GTK_ARROW_UP: Represents an upward pointing arrow.
|
||||
@GTK_ARROW_DOWN: Represents a downward pointing arrow.
|
||||
@GTK_ARROW_LEFT: Represents a left pointing arrow.
|
||||
@GTK_ARROW_RIGHT: Represents a right pointing arrow.
|
||||
@GTK_ARROW_NONE: No arrow. Since 2.10.
|
||||
|
||||
<!-- ##### ENUM GtkAttachOptions ##### -->
|
||||
<para>
|
||||
Denotes the expansion properties that a widget will have when it (or its
|
||||
parent) is resized.
|
||||
</para>
|
||||
|
||||
@GTK_EXPAND: the widget should expand to take up any extra space in its
|
||||
container that has been allocated.
|
||||
@GTK_SHRINK: the widget should shrink as and when possible.
|
||||
@GTK_FILL: the widget should fill the space allocated to it.
|
||||
|
||||
<!-- ##### ENUM GtkButtonBoxStyle ##### -->
|
||||
<para>
|
||||
Used to dictate the style that a #GtkButtonBox uses to layout the buttons it
|
||||
contains. (See also: #GtkVButtonBox and #GtkHButtonBox).
|
||||
</para>
|
||||
|
||||
@GTK_BUTTONBOX_SPREAD: Buttons are evenly spread across the box.
|
||||
@GTK_BUTTONBOX_EDGE: Buttons are placed at the edges of the box.
|
||||
@GTK_BUTTONBOX_START: Buttons are grouped towards the start of the box,
|
||||
(on the left for a HBox, or the top for a VBox).
|
||||
@GTK_BUTTONBOX_END: Buttons are grouped towards the end of the box,
|
||||
(on the right for a HBox, or the bottom for a VBox).
|
||||
@GTK_BUTTONBOX_CENTER: Buttons are centered in the box. Since 2.12
|
||||
|
||||
<!-- ##### ENUM GtkCornerType ##### -->
|
||||
<para>
|
||||
Specifies which corner a child widget should be placed in when packed into
|
||||
a #GtkScrolledWindow. This is effectively the opposite of where the scroll
|
||||
bars are placed.
|
||||
</para>
|
||||
|
||||
@GTK_CORNER_TOP_LEFT: Place the scrollbars on the right and bottom of the
|
||||
widget (default behaviour).
|
||||
@GTK_CORNER_BOTTOM_LEFT: Place the scrollbars on the top and right of the
|
||||
widget.
|
||||
@GTK_CORNER_TOP_RIGHT: Place the scrollbars on the left and bottom of the
|
||||
widget.
|
||||
@GTK_CORNER_BOTTOM_RIGHT: Place the scrollbars on the top and left of the
|
||||
widget.
|
||||
|
||||
<!-- ##### ENUM GtkDeleteType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_DELETE_CHARS:
|
||||
@GTK_DELETE_WORD_ENDS:
|
||||
@GTK_DELETE_WORDS:
|
||||
@GTK_DELETE_DISPLAY_LINES:
|
||||
@GTK_DELETE_DISPLAY_LINE_ENDS:
|
||||
@GTK_DELETE_PARAGRAPH_ENDS:
|
||||
@GTK_DELETE_PARAGRAPHS:
|
||||
@GTK_DELETE_WHITESPACE:
|
||||
|
||||
<!-- ##### ENUM GtkDirectionType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_DIR_TAB_FORWARD:
|
||||
@GTK_DIR_TAB_BACKWARD:
|
||||
@GTK_DIR_UP:
|
||||
@GTK_DIR_DOWN:
|
||||
@GTK_DIR_LEFT:
|
||||
@GTK_DIR_RIGHT:
|
||||
|
||||
<!-- ##### ENUM GtkExpanderStyle ##### -->
|
||||
<para>
|
||||
Used to specify the style of the expanders drawn by a #GtkTreeView.
|
||||
</para>
|
||||
|
||||
@GTK_EXPANDER_COLLAPSED: The style used for a collapsed subtree.
|
||||
@GTK_EXPANDER_SEMI_COLLAPSED: Intermediate style used during animation.
|
||||
@GTK_EXPANDER_SEMI_EXPANDED: Intermediate style used during animation.
|
||||
@GTK_EXPANDER_EXPANDED: The style used for an expanded subtree.
|
||||
|
||||
<!-- ##### ENUM GtkIMPreeditStyle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_IM_PREEDIT_NOTHING:
|
||||
@GTK_IM_PREEDIT_CALLBACK:
|
||||
@GTK_IM_PREEDIT_NONE:
|
||||
|
||||
<!-- ##### ENUM GtkIMStatusStyle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_IM_STATUS_NOTHING:
|
||||
@GTK_IM_STATUS_CALLBACK:
|
||||
@GTK_IM_STATUS_NONE:
|
||||
|
||||
<!-- ##### ENUM GtkJustification ##### -->
|
||||
<para>
|
||||
Used for justifying the text inside a #GtkLabel widget. (See also
|
||||
#GtkAlignment).
|
||||
</para>
|
||||
|
||||
@GTK_JUSTIFY_LEFT: The text is placed at the left edge of the label.
|
||||
@GTK_JUSTIFY_RIGHT: The text is placed at the right edge of the label.
|
||||
@GTK_JUSTIFY_CENTER: The text is placed in the center of the label.
|
||||
@GTK_JUSTIFY_FILL: The text is placed is distributed across the label.
|
||||
|
||||
<!-- ##### ENUM GtkMovementStep ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_MOVEMENT_LOGICAL_POSITIONS:
|
||||
@GTK_MOVEMENT_VISUAL_POSITIONS:
|
||||
@GTK_MOVEMENT_WORDS:
|
||||
@GTK_MOVEMENT_DISPLAY_LINES:
|
||||
@GTK_MOVEMENT_DISPLAY_LINE_ENDS:
|
||||
@GTK_MOVEMENT_PARAGRAPHS:
|
||||
@GTK_MOVEMENT_PARAGRAPH_ENDS:
|
||||
@GTK_MOVEMENT_PAGES:
|
||||
@GTK_MOVEMENT_BUFFER_ENDS:
|
||||
@GTK_MOVEMENT_HORIZONTAL_PAGES:
|
||||
|
||||
<!-- ##### ENUM GtkOrientation ##### -->
|
||||
<para>
|
||||
Represents the orientation of widgets which can be switched between horizontal
|
||||
and vertical orientation on the fly, like #GtkToolbar.
|
||||
</para>
|
||||
|
||||
@GTK_ORIENTATION_HORIZONTAL: The widget is in horizontal orientation.
|
||||
@GTK_ORIENTATION_VERTICAL: The widget is in vertical orientation.
|
||||
|
||||
<!-- ##### ENUM GtkPackType ##### -->
|
||||
<para>
|
||||
Represents the packing location #GtkBox children. (See: #GtkVBox,
|
||||
#GtkHBox, and #GtkButtonBox).
|
||||
</para>
|
||||
|
||||
@GTK_PACK_START: The child is packed into the start of the box
|
||||
@GTK_PACK_END: The child is packed into the end of the box
|
||||
|
||||
<!-- ##### ENUM GtkPathPriorityType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_PATH_PRIO_LOWEST:
|
||||
@GTK_PATH_PRIO_GTK:
|
||||
@GTK_PATH_PRIO_APPLICATION:
|
||||
@GTK_PATH_PRIO_THEME:
|
||||
@GTK_PATH_PRIO_RC:
|
||||
@GTK_PATH_PRIO_HIGHEST:
|
||||
|
||||
<!-- ##### ENUM GtkPathType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_PATH_WIDGET:
|
||||
@GTK_PATH_WIDGET_CLASS:
|
||||
@GTK_PATH_CLASS:
|
||||
|
||||
<!-- ##### ENUM GtkPolicyType ##### -->
|
||||
<para>
|
||||
Determines when a scroll bar will be visible.
|
||||
</para>
|
||||
|
||||
@GTK_POLICY_ALWAYS: The scrollbar is always visible.
|
||||
@GTK_POLICY_AUTOMATIC: The scrollbar will appear and disappear as necessary. For example,
|
||||
when all of a #GtkCList can not be seen.
|
||||
@GTK_POLICY_NEVER: The scrollbar will never appear.
|
||||
|
||||
<!-- ##### ENUM GtkPositionType ##### -->
|
||||
<para>
|
||||
Describes which edge of a widget a certain feature is positioned at, e.g. the
|
||||
tabs of a #GtkNotebook, the handle of a #GtkHandleBox or the label of a
|
||||
#GtkScale.
|
||||
</para>
|
||||
|
||||
@GTK_POS_LEFT: The feature is at the left edge.
|
||||
@GTK_POS_RIGHT: The feature is at the right edge.
|
||||
@GTK_POS_TOP: The feature is at the top edge.
|
||||
@GTK_POS_BOTTOM: The feature is at the bottom edge.
|
||||
|
||||
<!-- ##### ENUM GtkReliefStyle ##### -->
|
||||
<para>
|
||||
Indicated the relief to be drawn around a #GtkButton.
|
||||
</para>
|
||||
|
||||
@GTK_RELIEF_NORMAL: Draw a normal relief.
|
||||
@GTK_RELIEF_HALF: A half relief.
|
||||
@GTK_RELIEF_NONE: No relief.
|
||||
|
||||
<!-- ##### ENUM GtkResizeMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_RESIZE_PARENT:
|
||||
@GTK_RESIZE_QUEUE:
|
||||
@GTK_RESIZE_IMMEDIATE: Deprecated.
|
||||
|
||||
<!-- ##### ENUM GtkScrollStep ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_SCROLL_STEPS:
|
||||
@GTK_SCROLL_PAGES:
|
||||
@GTK_SCROLL_ENDS:
|
||||
@GTK_SCROLL_HORIZONTAL_STEPS:
|
||||
@GTK_SCROLL_HORIZONTAL_PAGES:
|
||||
@GTK_SCROLL_HORIZONTAL_ENDS:
|
||||
|
||||
<!-- ##### ENUM GtkScrollType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_SCROLL_NONE:
|
||||
@GTK_SCROLL_JUMP:
|
||||
@GTK_SCROLL_STEP_BACKWARD:
|
||||
@GTK_SCROLL_STEP_FORWARD:
|
||||
@GTK_SCROLL_PAGE_BACKWARD:
|
||||
@GTK_SCROLL_PAGE_FORWARD:
|
||||
@GTK_SCROLL_STEP_UP:
|
||||
@GTK_SCROLL_STEP_DOWN:
|
||||
@GTK_SCROLL_PAGE_UP:
|
||||
@GTK_SCROLL_PAGE_DOWN:
|
||||
@GTK_SCROLL_STEP_LEFT:
|
||||
@GTK_SCROLL_STEP_RIGHT:
|
||||
@GTK_SCROLL_PAGE_LEFT:
|
||||
@GTK_SCROLL_PAGE_RIGHT:
|
||||
@GTK_SCROLL_START:
|
||||
@GTK_SCROLL_END:
|
||||
|
||||
<!-- ##### ENUM GtkSelectionMode ##### -->
|
||||
<para>
|
||||
Used to control what selections users are allowed to make.
|
||||
</para>
|
||||
|
||||
@GTK_SELECTION_NONE: No selection is possible.
|
||||
@GTK_SELECTION_SINGLE: Zero or one element may be selected.
|
||||
@GTK_SELECTION_BROWSE: Exactly one element is selected. In some circumstances,
|
||||
such as initially or during a search operation, it's possible for no element
|
||||
to be selected with %GTK_SELECTION_BROWSE. What is really enforced is that
|
||||
the user can't deselect a currently selected element except by selecting
|
||||
another element.
|
||||
@GTK_SELECTION_MULTIPLE: Any number of elements may be selected.
|
||||
Clicks toggle the state of an item. Any number of elements may be selected.
|
||||
The Ctrl key may be used to enlarge the selection, and Shift key to select
|
||||
between the focus and the child pointed to. Some widgets may also allow
|
||||
Click-drag to select a range of elements.
|
||||
|
||||
<!-- ##### ENUM GtkShadowType ##### -->
|
||||
<para>
|
||||
Used to change the appearance of an outline typically provided by a #GtkFrame.
|
||||
</para>
|
||||
|
||||
@GTK_SHADOW_NONE: No outline.
|
||||
@GTK_SHADOW_IN: The outline is bevelled inwards.
|
||||
@GTK_SHADOW_OUT: The outline is bevelled outwards like a button.
|
||||
@GTK_SHADOW_ETCHED_IN: The outline has a sunken 3d appearance.
|
||||
@GTK_SHADOW_ETCHED_OUT: The outline has a raised 3d appearance
|
||||
|
||||
<!-- ##### ENUM GtkStateType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_STATE_NORMAL:
|
||||
@GTK_STATE_ACTIVE:
|
||||
@GTK_STATE_PRELIGHT:
|
||||
@GTK_STATE_SELECTED:
|
||||
@GTK_STATE_INSENSITIVE:
|
||||
@GTK_STATE_INCONSISTENT:
|
||||
@GTK_STATE_FOCUSED:
|
||||
|
||||
<!-- ##### ENUM GtkStateFlags ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_STATE_FLAG_ACTIVE:
|
||||
@GTK_STATE_FLAG_PRELIGHT:
|
||||
@GTK_STATE_FLAG_SELECTED:
|
||||
@GTK_STATE_FLAG_INSENSITIVE:
|
||||
@GTK_STATE_FLAG_INCONSISTENT:
|
||||
@GTK_STATE_FLAG_FOCUSED:
|
||||
|
||||
<!-- ##### ENUM GtkToolbarStyle ##### -->
|
||||
<para>
|
||||
Used to customize the appearance of a #GtkToolbar. Note that
|
||||
setting the toolbar style overrides the user's preferences
|
||||
for the default toolbar style. Note that if the button has only
|
||||
a label set and GTK_TOOLBAR_ICONS is used, the label will be
|
||||
visible, and vice versa.
|
||||
</para>
|
||||
|
||||
@GTK_TOOLBAR_ICONS: Buttons display only icons in the toolbar.
|
||||
@GTK_TOOLBAR_TEXT: Buttons display only text labels in the toolbar.
|
||||
@GTK_TOOLBAR_BOTH: Buttons display text and icons in the toolbar.
|
||||
@GTK_TOOLBAR_BOTH_HORIZ: Buttons display icons and text alongside each
|
||||
other, rather than vertically stacked
|
||||
|
||||
<!-- ##### ENUM GtkUpdateType ##### -->
|
||||
<para>
|
||||
Used by #GtkRange to control the policy for notifying value changes.
|
||||
</para>
|
||||
|
||||
@GTK_UPDATE_CONTINUOUS: Notify updates whenever the value changed
|
||||
@GTK_UPDATE_DISCONTINUOUS: Notify updates when the mouse button has been released
|
||||
@GTK_UPDATE_DELAYED: Space out updates with a small timeout
|
||||
|
||||
<!-- ##### ENUM GtkWindowPosition ##### -->
|
||||
<para>
|
||||
Window placement can be influenced using this enumeration. Note that
|
||||
using #GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea.
|
||||
It won't necessarily work well with all window managers or on all windowing systems.
|
||||
</para>
|
||||
|
||||
@GTK_WIN_POS_NONE: No influence is made on placement.
|
||||
@GTK_WIN_POS_CENTER: Windows should be placed in the center of the screen.
|
||||
@GTK_WIN_POS_MOUSE: Windows should be placed at the current mouse position.
|
||||
@GTK_WIN_POS_CENTER_ALWAYS: Keep window centered as it changes size, etc.
|
||||
@GTK_WIN_POS_CENTER_ON_PARENT: Center the window on its transient
|
||||
parent (see gtk_window_set_transient_for()).
|
||||
|
||||
<!-- ##### ENUM GtkWindowType ##### -->
|
||||
<para>
|
||||
A #GtkWindow can be one of these types. Most things you'd consider a
|
||||
"window" should have type #GTK_WINDOW_TOPLEVEL; windows with this type
|
||||
are managed by the window manager and have a frame by default (call
|
||||
gtk_window_set_decorated() to toggle the frame). Windows with type
|
||||
#GTK_WINDOW_POPUP are ignored by the window manager; window manager
|
||||
keybindings won't work on them, the window manager won't decorate the
|
||||
window with a frame, many GTK+ features that rely on the window
|
||||
manager will not work (e.g. resize grips and
|
||||
maximization/minimization). #GTK_WINDOW_POPUP is used to implement
|
||||
widgets such as #GtkMenu or tooltips that you normally don't think of
|
||||
as windows per se. Nearly all windows should be #GTK_WINDOW_TOPLEVEL.
|
||||
In particular, do not use #GTK_WINDOW_POPUP just to turn off
|
||||
the window borders; use gtk_window_set_decorated() for that.
|
||||
</para>
|
||||
|
||||
@GTK_WINDOW_TOPLEVEL: A regular window, such as a dialog.
|
||||
@GTK_WINDOW_POPUP: A special window such as a tooltip.
|
||||
|
||||
<!-- ##### ENUM GtkSortType ##### -->
|
||||
<para>
|
||||
Determines the direction of a sort.
|
||||
</para>
|
||||
|
||||
@GTK_SORT_ASCENDING: Sorting is in ascending order.
|
||||
@GTK_SORT_DESCENDING: Sorting is in descending order.
|
||||
|
||||
<!-- ##### ENUM GtkDragResult ##### -->
|
||||
<para>
|
||||
Gives an indication why a drag operation failed.
|
||||
The value can by obtained by connecting to the
|
||||
#GtkWidget::drag-failed signal.
|
||||
</para>
|
||||
|
||||
@GTK_DRAG_RESULT_SUCCESS: The drag operation was successful
|
||||
@GTK_DRAG_RESULT_NO_TARGET: No suitable drag target
|
||||
@GTK_DRAG_RESULT_USER_CANCELLED: The user cancelled the drag operation
|
||||
@GTK_DRAG_RESULT_TIMEOUT_EXPIRED: The drag operation timed out
|
||||
@GTK_DRAG_RESULT_GRAB_BROKEN: The pointer or keyboard grab used
|
||||
for the drag operation was broken
|
||||
@GTK_DRAG_RESULT_ERROR: The drag operation failed due to some
|
||||
unspecified error
|
||||
|
||||
<!-- ##### ENUM GtkJunctionSides ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_JUNCTION_NONE:
|
||||
@GTK_JUNCTION_CORNER_TOPLEFT:
|
||||
@GTK_JUNCTION_CORNER_TOPRIGHT:
|
||||
@GTK_JUNCTION_CORNER_BOTTOMLEFT:
|
||||
@GTK_JUNCTION_CORNER_BOTTOMRIGHT:
|
||||
@GTK_JUNCTION_TOP:
|
||||
@GTK_JUNCTION_BOTTOM:
|
||||
@GTK_JUNCTION_LEFT:
|
||||
@GTK_JUNCTION_RIGHT:
|
||||
|
||||
<!-- ##### ENUM GtkBorderStyle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_BORDER_STYLE_NONE:
|
||||
@GTK_BORDER_STYLE_SOLID:
|
||||
@GTK_BORDER_STYLE_INSET:
|
||||
@GTK_BORDER_STYLE_OUTSET:
|
||||
|
||||
<!-- ##### ENUM GtkRegionFlags ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_REGION_EVEN:
|
||||
@GTK_REGION_ODD:
|
||||
@GTK_REGION_FIRST:
|
||||
@GTK_REGION_LAST:
|
||||
@GTK_REGION_SORTED:
|
||||
|
@ -1,86 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkEventBox
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget used to catch events for widgets which do not have their own window
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkEventBox widget is a subclass of #GtkBin which also has its own window.
|
||||
It is useful since it allows you to catch events for widgets which do not
|
||||
have their own window.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkEventBox ##### -->
|
||||
<para>
|
||||
The #GtkEventBox-struct struct contains private data only, and
|
||||
should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkEventBox:above-child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEventBox:visible-window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_event_box_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkEventBox.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkEventBox.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_event_box_set_above_child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event_box:
|
||||
@above_child:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_event_box_get_above_child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event_box:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_event_box_set_visible_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event_box:
|
||||
@visible_window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_event_box_get_visible_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event_box:
|
||||
@Returns:
|
||||
|
||||
|
@ -1,296 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkExpander
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A container which can hide its child
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkExpander allows the user to hide or show its child by clicking
|
||||
on an expander triangle similar to the triangles used in a #GtkTreeView.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normally you use an expander as you would use any other descendant
|
||||
of #GtkBin; you create the child widget and use gtk_container_add()
|
||||
to add it to the expander. When the expander is toggled, it will take
|
||||
care of showing and hiding the child automatically.
|
||||
</para>
|
||||
|
||||
<section id="expander-special-usage">
|
||||
<title>Special Usage</title>
|
||||
|
||||
<para>
|
||||
There are situations in which you may prefer to show and hide the
|
||||
expanded widget yourself, such as when you want to actually create
|
||||
the widget at expansion time. In this case, create a #GtkExpander
|
||||
but do not add a child to it. The expander widget has an
|
||||
<literal>expanded</literal> property which can be used to monitor
|
||||
its expansion state. You should watch this property with a signal
|
||||
connection as follows:
|
||||
</para>
|
||||
|
||||
<programlisting id="expander-callback-example">
|
||||
expander = gtk_expander_new_with_mnemonic ("_More Options");
|
||||
g_signal_connect (expander, "notify::expanded",
|
||||
G_CALLBACK (expander_callback), NULL);
|
||||
|
||||
...
|
||||
|
||||
static void
|
||||
expander_callback (GObject *object,
|
||||
GParamSpec *param_spec,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkExpander *expander;
|
||||
|
||||
expander = GTK_EXPANDER (object);
|
||||
|
||||
if (gtk_expander_get_expanded (expander))
|
||||
{
|
||||
/* Show or create widgets */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Hide or destroy widgets */
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
</section>
|
||||
<refsect2 id="GtkExpander-BUILDER-UI">
|
||||
<title>GtkExpander as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkExpander implementation of the GtkBuildable interface
|
||||
supports placing a child in the label position by specifying
|
||||
"label" as the "type" attribute of a <child> element.
|
||||
A normal content child can be specified without specifying
|
||||
a <child> type attribute.
|
||||
</para>
|
||||
<example>
|
||||
<title>A UI definition fragment with GtkExpander</title>
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkExpander">
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="expander-label"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="expander-content"/>
|
||||
</child>
|
||||
</object>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkExpander ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkExpander::activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkExpander:expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:label-fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:label-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:use-markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:use-underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:expander-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:expander-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_new_with_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@expanded:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@spacing:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@label:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_use_underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@use_underline:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_use_underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_use_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@use_markup:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_use_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_label_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@label_widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_label_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_label_fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@label_fill:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_label_fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
@ -1,135 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Version Information
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Variables and functions to check the GTK+ version
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GTK+ provides version information, primarily useful in configure checks
|
||||
for builds that have a configure script. Applications will not
|
||||
typically use the features described here.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_major_version ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_minor_version ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_micro_version ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_binary_age ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_interface_age ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_version ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@required_major:
|
||||
@required_minor:
|
||||
@required_micro:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_MAJOR_VERSION ##### -->
|
||||
<para>
|
||||
Like #gtk_major_version, but from the headers used at
|
||||
application compile time, rather than from the library linked against
|
||||
at application run time.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_MINOR_VERSION ##### -->
|
||||
<para>
|
||||
Like #gtk_minor_version, but from the headers used at
|
||||
application compile time, rather than from the library linked against
|
||||
at application run time.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_MICRO_VERSION ##### -->
|
||||
<para>
|
||||
Like #gtk_micro_version, but from the headers used at
|
||||
application compile time, rather than from the library linked against
|
||||
at application run time.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_BINARY_AGE ##### -->
|
||||
<para>
|
||||
Like #gtk_binary_age, but from the headers used at
|
||||
application compile time, rather than from the library linked against
|
||||
at application run time.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_INTERFACE_AGE ##### -->
|
||||
<para>
|
||||
Like #gtk_interface_age, but from the headers used at
|
||||
application compile time, rather than from the library linked against
|
||||
at application run time.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_CHECK_VERSION ##### -->
|
||||
<para>
|
||||
Returns %TRUE if the version of the GTK+ header files is the same
|
||||
as or newer than the passed-in version.
|
||||
</para>
|
||||
|
||||
@major: major version (e.g. 1 for version 1.2.5)
|
||||
@minor: minor version (e.g. 2 for version 1.2.5)
|
||||
@micro: micro version (e.g. 5 for version 1.2.5)
|
||||
|
||||
|
@ -1,170 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkFileFilter
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A filter for selecting a file subset
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A GtkFileFilter can be used to restrict the files being shown
|
||||
in a #GtkFileChooser. Files can be filtered based on their name
|
||||
(with gtk_file_filter_add_pattern()), on their mime type (with
|
||||
gtk_file_filter_add_mime_type()), or by a custom filter function
|
||||
(with gtk_file_filter_add_custom()).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Filtering by mime types handles aliasing and subclassing of mime
|
||||
types; e.g. a filter for text/plain also matches a file with mime
|
||||
type application/rtf, since application/rtf is a subclass of
|
||||
text/plain. Note that #GtkFileFilter allows wildcards for the
|
||||
subtype of a mime type, so you can e.g. filter for image/*.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normally, filters are used by adding them to a #GtkFileChooser,
|
||||
see gtk_file_chooser_add_filter(), but it is also possible
|
||||
to manually use a filter on a file with gtk_file_filter_filter().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkFileChooser
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkFileFilter ##### -->
|
||||
<para>
|
||||
The <structname>GtkFileFilter</structname> struct contains
|
||||
only private fields and should not be directly accessed.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkFileFilterInfo ##### -->
|
||||
<para>
|
||||
A <structname>GtkFileFilterInfo</structname> struct is used
|
||||
to pass information about the tested file to
|
||||
gtk_file_filter_filter().
|
||||
</para>
|
||||
|
||||
@contains: Flags indicating which of the following fields need
|
||||
are filled
|
||||
@filename: the filename of the file being tested
|
||||
@uri: the URI for the file being tested
|
||||
@display_name: the string that will be used to display the file
|
||||
in the file chooser
|
||||
@mime_type: the mime type of the file
|
||||
|
||||
<!-- ##### ENUM GtkFileFilterFlags ##### -->
|
||||
<para>
|
||||
These flags indicate what parts of a #GtkFileFilterInfo struct
|
||||
are filled or need to be filled.
|
||||
</para>
|
||||
|
||||
@GTK_FILE_FILTER_FILENAME: the filename of the file being tested
|
||||
@GTK_FILE_FILTER_URI: the URI for the file being tested
|
||||
@GTK_FILE_FILTER_DISPLAY_NAME: the string that will be used to
|
||||
display the file in the file chooser
|
||||
@GTK_FILE_FILTER_MIME_TYPE: the mime type of the file
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkFileFilterFunc ##### -->
|
||||
<para>
|
||||
The type of function that is used with custom filters,
|
||||
see gtk_file_filter_add_custom().
|
||||
</para>
|
||||
|
||||
@filter_info: a #GtkFileFilterInfo that is filled according
|
||||
to the @needed flags passed to gtk_file_filter_add_custom()
|
||||
@data: user data passed to gtk_file_filter_add_custom()
|
||||
@Returns: %TRUE if the file should be displayed
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_set_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_add_mime_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@mime_type:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_add_pattern ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@pattern:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_add_pixbuf_formats ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_add_custom ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@needed:
|
||||
@func:
|
||||
@data:
|
||||
@notify:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_get_needed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_filter_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filter:
|
||||
@filter_info:
|
||||
@Returns:
|
||||
|
||||
|
@ -1,133 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkFixed
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A container which allows you to position widgets at fixed coordinates
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkFixed widget is a container which can place child widgets at fixed
|
||||
positions and with fixed sizes, given in pixels. #GtkFixed performs no
|
||||
automatic layout management.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For most applications, you should not use this container! It keeps
|
||||
you from having to learn about the other GTK+ containers, but it
|
||||
results in broken applications.
|
||||
With #GtkFixed, the following things will result in truncated text,
|
||||
overlapping widgets, and other display bugs:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Themes, which may change widget sizes.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Fonts other than the one you used to write the app will of
|
||||
course change the size of widgets containing text; keep in mind that
|
||||
users may use a larger font because of difficulty reading the default,
|
||||
or they may be using Windows or the framebuffer port of GTK+, where
|
||||
different fonts are available.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Translation of text into other languages changes its size. Also,
|
||||
display of non-English text will use a different font in many cases.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition, the fixed widget can't properly be mirrored in
|
||||
right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+
|
||||
will flip the interface to put labels to the right of the thing they
|
||||
label, but it can't do that with #GtkFixed. So your application will
|
||||
not be usable in right-to-left languages.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Finally, fixed positioning makes it kind of annoying to add/remove GUI
|
||||
elements, since you have to reposition all the other elements. This is
|
||||
a long-term maintenance problem for your application.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you know none of these things are an issue for your application,
|
||||
and prefer the simplicity of #GtkFixed, by all means use the
|
||||
widget. But you should be aware of the tradeoffs.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkFixed ##### -->
|
||||
<para>
|
||||
The #GtkFixed-struct struct contains the following fields.
|
||||
(These fields should be considered read-only. They should never be set by
|
||||
an application.)
|
||||
|
||||
<informaltable pgwide="1" frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#GList *children;</entry>
|
||||
<entry>a list of #GtkFixedChild elements, containing the child widgets and
|
||||
their positions.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFixed:x ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFixed:y ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_fixed_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkFixed.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkFixed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_fixed_put ##### -->
|
||||
<para>
|
||||
Adds a widget to a #GtkFixed container at the given position.
|
||||
</para>
|
||||
|
||||
@fixed: a #GtkFixed.
|
||||
@widget: the widget to add.
|
||||
@x: the horizontal position to place the widget at.
|
||||
@y: the vertical position to place the widget at.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_fixed_move ##### -->
|
||||
<para>
|
||||
Moves a child of a #GtkFixed container to the given position.
|
||||
</para>
|
||||
|
||||
@fixed: a #GtkFixed.
|
||||
@widget: the child widget.
|
||||
@x: the horizontal position to move the widget to.
|
||||
@y: the vertical position to move the widget to.
|
||||
|
||||
|
@ -1,626 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Main loop and Events
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Library initialization, main event loop, and events
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para>
|
||||
Before using GTK+, you need to initialize it; initialization connects
|
||||
to the window system display, and parses some standard command line
|
||||
arguments. The gtk_init() function initializes GTK+. gtk_init() exits
|
||||
the application if errors occur; to avoid this, use gtk_init_check().
|
||||
gtk_init_check() allows you to recover from a failed GTK+
|
||||
initialization - you might start up your application in text mode instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Like all GUI toolkits, GTK+ uses an event-driven programming
|
||||
model. When the user is doing nothing, GTK+ sits in the
|
||||
<firstterm>main loop</firstterm> and waits for input. If the user
|
||||
performs some action - say, a mouse click - then the main loop "wakes
|
||||
up" and delivers an event to GTK+. GTK+ forwards the event to one or
|
||||
more widgets.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When widgets receive an event, they frequently emit one or more
|
||||
<firstterm>signals</firstterm>. Signals notify your program that
|
||||
"something interesting happened" by invoking functions you've
|
||||
connected to the signal with g_signal_connect(). Functions connected
|
||||
to a signal are often termed <firstterm>callbacks</firstterm>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When your callbacks are invoked, you would typically take some action
|
||||
- for example, when an Open button is clicked you might display a
|
||||
#GtkFileSelectionDialog. After a callback finishes, GTK+ will return
|
||||
to the main loop and await more user input.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Typical <function>main</function> function for a GTK+ application</title>
|
||||
<programlisting>
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
/* Initialize i18n support */
|
||||
gtk_set_locale (<!-- -->);
|
||||
|
||||
/* Initialize the widget set */
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* Create the main window */
|
||||
mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
/* Set up our GUI elements */
|
||||
...
|
||||
|
||||
/* Show the application window */
|
||||
gtk_widget_show_all (mainwin);
|
||||
|
||||
/* Enter the main event loop, and wait for user interaction */
|
||||
gtk_main (<!-- -->);
|
||||
|
||||
/* The user lost interest */
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
It's OK to use the GLib main loop directly instead of gtk_main(),
|
||||
though it involves slightly more typing. See #GMainLoop in the GLib
|
||||
documentation.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
See the GLib manual, especially #GMainLoop and signal-related
|
||||
functions such as g_signal_connect().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_set_locale ##### -->
|
||||
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_disable_setlocale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_default_language ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_parse_args ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_init ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_init_check ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_init_with_args ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
@parameter_string:
|
||||
@entries:
|
||||
@translation_domain:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_option_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@open_default_display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_events_pending ##### -->
|
||||
<para>
|
||||
Checks if any events are pending. This can be used to update the GUI
|
||||
and invoke timeouts etc. while doing some time intensive computation.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Updating the GUI during a long computation.</title>
|
||||
<programlisting>
|
||||
/* computation going on */
|
||||
...
|
||||
while (gtk_events_pending (<!-- -->))
|
||||
gtk_main_iteration (<!-- -->);
|
||||
...
|
||||
/* computation continued */
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@void:
|
||||
@Returns: %TRUE if any events are pending, %FALSE otherwise.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_main ##### -->
|
||||
<para>
|
||||
Runs the main loop until gtk_main_quit() is called. You can nest calls to
|
||||
gtk_main(). In that case gtk_main_quit() will make the innermost invocation
|
||||
of the main loop return.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_main_level ##### -->
|
||||
<para>
|
||||
Asks for the current nesting level of the main loop. This can be useful
|
||||
when calling gtk_quit_add().
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the nesting level of the current invocation of the main loop.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_main_quit ##### -->
|
||||
<para>
|
||||
Makes the innermost invocation of the main loop return when it regains
|
||||
control.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_main_iteration ##### -->
|
||||
<para>
|
||||
Runs a single iteration of the mainloop. If no events are waiting to be
|
||||
processed GTK+ will block until the next event is noticed. If you don't
|
||||
want to block look at gtk_main_iteration_do() or check if any events are
|
||||
pending with gtk_events_pending() first.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: %TRUE if gtk_main_quit() has been called for the innermost mainloop.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_main_iteration_do ##### -->
|
||||
<para>
|
||||
Runs a single iteration of the mainloop. If no events are available either
|
||||
return or block dependent on the value of @blocking.
|
||||
</para>
|
||||
|
||||
@blocking: %TRUE if you want GTK+ to block if no events are pending.
|
||||
@Returns: %TRUE if gtk_main_quit() has been called for the innermost mainloop.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_main_do_event ##### -->
|
||||
<para>
|
||||
Processes a single GDK event. This is public only to allow filtering of events
|
||||
between GDK and GTK+. You will not usually need to call this function directly.
|
||||
</para>
|
||||
<para>
|
||||
While you should not call this function directly, you might want to know
|
||||
how exactly events are handled. So here is what this function does with
|
||||
the event:
|
||||
</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem><para>
|
||||
Compress enter/leave notify events. If the event passed build an
|
||||
enter/leave pair together with the next event (peeked from GDK)
|
||||
both events are thrown away. This is to avoid a backlog of (de-)highlighting
|
||||
widgets crossed by the pointer.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Find the widget which got the event. If the widget can't be determined
|
||||
the event is thrown away unless it belongs to a INCR transaction. In that
|
||||
case it is passed to gtk_selection_incr_event().
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Then the event is passed on a stack so you can query the currently handled
|
||||
event with gtk_get_current_event().
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
The event is sent to a widget. If a grab is active all events for
|
||||
widgets that are not in the contained in the grab widget are sent to the
|
||||
latter with a few exceptions:
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Deletion and destruction events are still sent to the event widget for
|
||||
obvious reasons.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Events which directly relate to the visual representation of the event
|
||||
widget.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Leave events are delivered to the event widget if there was an enter
|
||||
event delivered to it before without the paired leave event.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Drag events are not redirected because it is unclear what the semantics
|
||||
of that would be.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
Another point of interest might be that all key events are first passed
|
||||
through the key snooper functions if there are any. Read the description
|
||||
of gtk_key_snooper_install() if you need this feature.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
After finishing the delivery the event is popped from the event stack.
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
|
||||
@event: An event to process (normally) passed by GDK.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkModuleInitFunc ##### -->
|
||||
<para>
|
||||
Each GTK+ module must have a function gtk_module_init() with this prototype.
|
||||
This function is called after loading the module with the @argc and @argv
|
||||
cleaned from any arguments that GTK+ handles itself.
|
||||
</para>
|
||||
|
||||
@argc: Pointer to the number of arguments remaining after gtk_init().
|
||||
@argv: Points to the argument vector.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkModuleDisplayInitFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_true ##### -->
|
||||
<para>
|
||||
All this function does it to return %TRUE. This can be useful for example
|
||||
if you want to inhibit the deletion of a window. Of course you should
|
||||
not do this as the user expects a reaction from clicking the close
|
||||
icon of the window...
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>A persistent window</title>
|
||||
<programlisting>
|
||||
##include <gtk/gtk.h>
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *win, *but;
|
||||
|
||||
gtk_init( &argc, &argv );
|
||||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (win, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
g_signal_connect (win, "destroy",
|
||||
G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
||||
but = gtk_button_new_with_label ("Close yourself. I mean it!");
|
||||
g_signal_connect_swapped (but, "clicked",
|
||||
G_CALLBACK (gtk_object_destroy), win);
|
||||
gtk_container_add (GTK_CONTAINER (win), but);
|
||||
|
||||
gtk_widget_show_all (win);
|
||||
gtk_main (<!-- -->);
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@void:
|
||||
@Returns: %TRUE
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_false ##### -->
|
||||
<para>
|
||||
Analogical to gtk_true() this function does nothing
|
||||
but always returns %FALSE.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: %FALSE
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_grab_add ##### -->
|
||||
<para>
|
||||
Makes @widget the current grabbed widget. This means that interaction with
|
||||
other widgets in the same application is blocked and mouse as well as
|
||||
keyboard events are delivered to this widget.
|
||||
</para>
|
||||
<para>
|
||||
If @widget is not sensitive, it is not set as the current grabbed
|
||||
widget and this function does nothing.
|
||||
</para>
|
||||
|
||||
@widget: The widget that grabs keyboard and pointer events.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_grab_get_current ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_grab_remove ##### -->
|
||||
<para>
|
||||
Removes the grab from the given widget. You have to pair calls to gtk_grab_add()
|
||||
and gtk_grab_remove().
|
||||
</para>
|
||||
<para>
|
||||
If @widget does not have the grab, this function does nothing.
|
||||
</para>
|
||||
|
||||
@widget: The widget which gives up the grab.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_device_grab_add ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@device:
|
||||
@block_others:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_device_grab_remove ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@device:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkFunction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_quit_add_destroy ##### -->
|
||||
<para>
|
||||
Trigger destruction of @object in case the mainloop at level @main_level
|
||||
is quit.
|
||||
</para>
|
||||
|
||||
@main_level: Level of the mainloop which shall trigger the destruction.
|
||||
@object: Object to be destroyed.
|
||||
@Deprecated: This function is going to be removed in GTK+ 3.0
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_quit_add ##### -->
|
||||
<para>
|
||||
Registers a function to be called when an instance of the mainloop is left.
|
||||
</para>
|
||||
|
||||
@main_level: Level at which termination the function shall be called. You
|
||||
can pass 0 here to have the function run at the termination of the current
|
||||
mainloop.
|
||||
@function: The function to call. This should return 0 to be removed from the
|
||||
list of quit handlers. Otherwise the function might be called again.
|
||||
@data: Pointer to pass when calling @function.
|
||||
@Returns: A handle for this quit handler (you need this for gtk_quit_remove())
|
||||
or 0 if you passed a %NULL pointer in @function.
|
||||
@Deprecated: This function is going to be removed in GTK+ 3.0
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkCallbackMarshal ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@object:
|
||||
@data:
|
||||
@n_args:
|
||||
@args:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkArg ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@name:
|
||||
|
||||
<!-- ##### FUNCTION gtk_quit_add_full ##### -->
|
||||
<para>
|
||||
Registers a function to be called when an instance of the mainloop is left.
|
||||
In comparison to gtk_quit_add() this function adds the possibility to
|
||||
pass a marshaller and a function to be called when the quit handler is freed.
|
||||
</para>
|
||||
<para>
|
||||
The former can be used to run interpreted code instead of a compiled function
|
||||
while the latter can be used to free the information stored in @data (while
|
||||
you can do this in @function as well)... So this function will mostly be
|
||||
used by GTK+ wrappers for languages other than C.
|
||||
</para>
|
||||
|
||||
@main_level: Level at which termination the function shall be called. You
|
||||
can pass 0 here to have the function run at the termination of the current
|
||||
mainloop.
|
||||
@function: The function to call. This should return 0 to be removed from the
|
||||
list of quit handlers. Otherwise the function might be called again.
|
||||
@marshal: The marshaller to be used. If this is non-%NULL, @function is
|
||||
ignored.
|
||||
@data: Pointer to pass when calling @function.
|
||||
@destroy: Function to call to destruct @data. Gets @data as argument.
|
||||
@Returns: A handle for this quit handler (you need this for gtk_quit_remove())
|
||||
or 0 if you passed a %NULL pointer in @function.
|
||||
@Deprecated: This function is going to be removed in GTK+ 3.0
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_quit_remove ##### -->
|
||||
<para>
|
||||
Removes a quit handler by its identifier.
|
||||
</para>
|
||||
|
||||
@quit_handler_id: Identifier for the handler returned when installing it.
|
||||
@Deprecated: This function is going to be removed in GTK+ 3.0
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_quit_remove_by_data ##### -->
|
||||
<para>
|
||||
Removes a quit handler identified by its @data field.
|
||||
</para>
|
||||
|
||||
@data: The pointer passed as @data to gtk_quit_add() or gtk_quit_add_full().
|
||||
@Deprecated: This function is going to be removed in GTK+ 3.0
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_PRIORITY_RESIZE ##### -->
|
||||
<para>
|
||||
Use this priority for resizing related stuff. It is used internally by
|
||||
GTK+ to compute the sizes of widgets. This priority is higher than
|
||||
%GDK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_key_snooper_install ##### -->
|
||||
<para>
|
||||
Installs a key snooper function, which will get called on all key events
|
||||
before delivering them normally.
|
||||
</para>
|
||||
|
||||
@snooper: a #GtkKeySnoopFunc.
|
||||
@func_data: data to pass to @snooper.
|
||||
@Returns: a unique id for this key snooper for use with gtk_key_snooper_remove().
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkKeySnoopFunc ##### -->
|
||||
<para>
|
||||
Key snooper functions are called before normal event delivery.
|
||||
They can be used to implement custom key event handling.
|
||||
</para>
|
||||
|
||||
@grab_widget: the widget to which the event will be delivered.
|
||||
@event: the key event.
|
||||
@func_data: the @func_data supplied to gtk_key_snooper_install().
|
||||
@Returns: %TRUE to stop further processing of @event, %FALSE to continue.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_key_snooper_remove ##### -->
|
||||
<para>
|
||||
Removes the key snooper function with the given id.
|
||||
</para>
|
||||
|
||||
@snooper_handler_id: Identifies the key snooper to remove.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_current_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_current_event_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_current_event_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@state:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_current_event_device ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_get_event_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_propagate_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@event:
|
||||
|
||||
|
@ -1,494 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkMenu
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A menu widget
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkMenu is a #GtkMenuShell that implements a drop down menu consisting of
|
||||
a list of #GtkMenuItem objects which can be navigated and activated by the
|
||||
user to perform application functions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A #GtkMenu is most commonly dropped down by activating a #GtkMenuItem in a
|
||||
#GtkMenuBar or popped up by activating a #GtkMenuItem in another #GtkMenu.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A #GtkMenu can also be popped up by activating a #GtkOptionMenu.
|
||||
Other composite widgets such as the #GtkNotebook can pop up a #GtkMenu
|
||||
as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Applications can display a #GtkMenu as a popup menu by calling the
|
||||
gtk_menu_popup() function. The example below shows how an application
|
||||
can pop up a menu when the 3rd mouse button is pressed.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Connecting the popup signal handler.</title>
|
||||
<programlisting>
|
||||
/* connect our handler which will popup the menu */
|
||||
g_signal_connect_swapped (window, "button_press_event",
|
||||
G_CALLBACK (my_popup_handler), menu);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Signal handler which displays a popup menu.</title>
|
||||
<programlisting>
|
||||
static gint
|
||||
my_popup_handler (GtkWidget *widget, GdkEvent *event)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GdkEventButton *event_button;
|
||||
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
/* The "widget" is the menu that was supplied when
|
||||
* g_signal_connect_swapped() was called.
|
||||
*/
|
||||
menu = GTK_MENU (widget);
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS)
|
||||
{
|
||||
event_button = (GdkEventButton *) event;
|
||||
if (event_button->button == 3)
|
||||
{
|
||||
gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
|
||||
event_button->button, event_button->time);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMenu ##### -->
|
||||
<para>
|
||||
The #GtkMenu struct contains private data only, and
|
||||
should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkMenu::move-scroll ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### ARG GtkMenu:accel-group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:accel-path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:attach-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:monitor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:reserve-toggle-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:tearoff-state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:tearoff-title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:bottom-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:left-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:right-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:top-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:arrow-placement ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:arrow-scaling ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:double-arrows ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:horizontal-offset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:horizontal-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:vertical-offset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:vertical-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkMenu.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkMenu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_reorder_child ##### -->
|
||||
<para>
|
||||
Moves a #GtkMenuItem to a new position within the #GtkMenu.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@child: the #GtkMenuItem to move.
|
||||
@position: the new position to place @child. Positions are numbered from
|
||||
0 to n-1.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@child:
|
||||
@left_attach:
|
||||
@right_attach:
|
||||
@top_attach:
|
||||
@bottom_attach:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_popup_for_device ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@device:
|
||||
@parent_menu_shell:
|
||||
@parent_menu_item:
|
||||
@func:
|
||||
@data:
|
||||
@destroy:
|
||||
@button:
|
||||
@activate_time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_popup ##### -->
|
||||
|
||||
|
||||
@menu:
|
||||
@parent_menu_shell:
|
||||
@parent_menu_item:
|
||||
@func:
|
||||
@data:
|
||||
@button:
|
||||
@activate_time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_accel_group ##### -->
|
||||
<para>
|
||||
Set the #GtkAccelGroup which holds global accelerators for the menu.
|
||||
This accelerator group needs to also be added to all windows that
|
||||
this menu is being used in with gtk_window_add_accel_group(), in order
|
||||
for those windows to support all the accelerators contained in this group.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@accel_group: the #GtkAccelGroup to be associated with the menu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_accel_group ##### -->
|
||||
<para>
|
||||
Gets the #GtkAccelGroup which holds global accelerators for the menu.
|
||||
See gtk_menu_set_accel_group().
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@Returns: the #GtkAccelGroup associated with the menu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_accel_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@accel_path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_accel_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_title ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_monitor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@monitor_num:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_monitor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_tearoff_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_reserve_toggle_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@reserve_toggle_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_reserve_toggle_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_popdown ##### -->
|
||||
<para>
|
||||
Removes the menu from the screen.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_reposition ##### -->
|
||||
<para>
|
||||
Repositions the menu according to its position function.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_active ##### -->
|
||||
<para>
|
||||
Returns the selected menu item from the menu. This is used by the
|
||||
#GtkOptionMenu.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@Returns: the #GtkMenuItem that was last selected in the menu. If a
|
||||
selection has not yet been made, the first menu item is selected.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_active ##### -->
|
||||
<para>
|
||||
Selects the specified menu item within the menu. This is used by the
|
||||
#GtkOptionMenu and should not be used by anyone else.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@index_: the index of the menu item to select. Index values are from
|
||||
0 to n-1.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_tearoff_state ##### -->
|
||||
<para>
|
||||
Changes the tearoff state of the menu. A menu is normally displayed
|
||||
as drop down menu which persists as long as the menu is active. It can
|
||||
also be displayed as a tearoff menu which persists until it is closed
|
||||
or reattached.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@torn_off: If %TRUE, menu is displayed as a tearoff menu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_attach_to_widget ##### -->
|
||||
<para>
|
||||
Attaches the menu to the widget and provides a callback function that will
|
||||
be invoked when the menu calls gtk_menu_detach() during its destruction.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@attach_widget: the #GtkWidget that the menu will be attached to.
|
||||
@detacher: the user supplied callback function that will be called when
|
||||
the menu calls gtk_menu_detach().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_detach ##### -->
|
||||
<para>
|
||||
Detaches the menu from the widget to which it had been attached.
|
||||
This function will call the callback function, @detacher, provided
|
||||
when the gtk_menu_attach_to_widget() function was called.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_attach_widget ##### -->
|
||||
<para>
|
||||
Returns the #GtkWidget that the menu is attached to.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@Returns: the #GtkWidget that the menu is attached to.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_for_attach_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkMenuPositionFunc ##### -->
|
||||
<para>
|
||||
A user function supplied when calling gtk_menu_popup() which controls the
|
||||
positioning of the menu when it is displayed. The function sets the @x
|
||||
and @y parameters to the coordinates where the menu is to be drawn.
|
||||
To make the menu appear on a different monitor than the mouse pointer,
|
||||
gtk_menu_set_monitor() must be called.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@x: address of the #gint representing the horizontal position where the
|
||||
menu shall be drawn. This is an output parameter.
|
||||
@y: address of the #gint representing the vertical position where the
|
||||
menu shall be drawn. This is an output parameter.
|
||||
@push_in: This parameter controls how menus placed outside the monitor are handled.
|
||||
If this is set to %TRUE and part of the menu is outside the monitor then
|
||||
GTK+ pushes the window into the visible area, effectively modifying the
|
||||
popup position.
|
||||
Note that moving and possibly resizing the menu around will alter the
|
||||
scroll position to keep the menu items "in place", i.e. at the same monitor
|
||||
position they would have been without resizing.
|
||||
In practice, this behavior is only useful for combobox popups or option
|
||||
menus and cannot be used to simply confine a menu to monitor boundaries.
|
||||
In that case, changing the scroll offset is not desirable.
|
||||
@user_data: the data supplied by the user in the gtk_menu_popup() @data
|
||||
parameter.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkMenuDetachFunc ##### -->
|
||||
<para>
|
||||
A user function supplied when calling gtk_menu_attach_to_widget() which
|
||||
will be called when the menu is later detached from the widget.
|
||||
</para>
|
||||
|
||||
@attach_widget: the #GtkWidget that the menu is being detached from.
|
||||
@menu: the #GtkMenu being detached.
|
||||
|
||||
|
@ -1,104 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkMenuBar
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A subclass widget for GtkMenuShell which holds GtkMenuItem widgets
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkMenuBar is a subclass of #GtkMenuShell which contains one to many #GtkMenuItem. The result is a standard menu bar which can hold many menu items. #GtkMenuBar allows for a shadow type to be set for aesthetic purposes. The shadow types are defined in the #gtk_menu_bar_set_shadow_type function.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkMenuShell, #GtkMenu, #GtkMenuItem
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMenuBar ##### -->
|
||||
<para>
|
||||
The #GtkMenuBar struct contains the following fields. (These fields should be considered read-only. They should never be set by an application.)
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkMenuBar:child-pack-direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenuBar:pack-direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenuBar:internal-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenuBar:shadow-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_new ##### -->
|
||||
<para>
|
||||
Creates the new #GtkMenuBar
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the #GtkMenuBar
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkPackDirection ##### -->
|
||||
<para>
|
||||
Determines how widgets should be packed insided menubars and
|
||||
menuitems contained in menubars.
|
||||
</para>
|
||||
|
||||
@GTK_PACK_DIRECTION_LTR: Widgets are packed left-to-right.
|
||||
@GTK_PACK_DIRECTION_RTL: Widgets are packed right-to-left.
|
||||
@GTK_PACK_DIRECTION_TTB: Widgets are packed top-to-bottom.
|
||||
@GTK_PACK_DIRECTION_BTT: Widgets are packed bottom-to-top.
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_set_pack_direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menubar:
|
||||
@pack_dir:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_get_pack_direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menubar:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_set_child_pack_direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menubar:
|
||||
@child_pack_dir:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_bar_get_child_pack_direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menubar:
|
||||
@Returns:
|
||||
|
||||
|
@ -1,224 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkMenuShell
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A base class for menu objects
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkMenuShell is the abstract base class used to derive the
|
||||
#GtkMenu and #GtkMenuBar subclasses.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A #GtkMenuShell is a container of #GtkMenuItem objects arranged in a
|
||||
list which can be navigated, selected, and activated by the user to perform
|
||||
application functions. A #GtkMenuItem can have a submenu associated with it,
|
||||
allowing for nested hierarchical menus.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMenuShell ##### -->
|
||||
<para>
|
||||
The #GtkMenuShell-struct struct contains the following fields.
|
||||
(These fields should be considered read-only. They should never be set by
|
||||
an application.)
|
||||
|
||||
<informaltable pgwide="1" frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#GList *children;</entry>
|
||||
<entry>The list of #GtkMenuItem objects contained by this #GtkMenuShell.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::activate-current ##### -->
|
||||
<para>
|
||||
An action signal that activates the current menu item within the menu
|
||||
shell.
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
@force_hide: if TRUE, hide the menu after activating the menu item.
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::cancel ##### -->
|
||||
<para>
|
||||
An action signal which cancels the selection within the menu shell.
|
||||
Causes the GtkMenuShell::selection-done signal to be emitted.
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::cycle-focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::deactivate ##### -->
|
||||
<para>
|
||||
This signal is emitted when a menu shell is deactivated.
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::move-current ##### -->
|
||||
<para>
|
||||
An action signal which moves the current menu item in the direction
|
||||
specified by @direction.
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
@direction: the direction to move.
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::move-selected ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkMenuShell::selection-done ##### -->
|
||||
<para>
|
||||
This signal is emitted when a selection has been completed within a menu
|
||||
shell.
|
||||
</para>
|
||||
|
||||
@menushell: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkMenuShell:take-focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_append ##### -->
|
||||
<para>
|
||||
Adds a new #GtkMenuItem to the end of the menu shell's item list.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
@child: The #GtkMenuItem to add.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_prepend ##### -->
|
||||
<para>
|
||||
Adds a new #GtkMenuItem to the beginning of the menu shell's item list.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
@child: The #GtkMenuItem to add.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_insert ##### -->
|
||||
<para>
|
||||
Adds a new #GtkMenuItem to the menu shell's item list at the position
|
||||
indicated by @position.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
@child: The #GtkMenuItem to add.
|
||||
@position: The position in the item list where @child is added.
|
||||
Positions are numbered from 0 to n-1.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_deactivate ##### -->
|
||||
<para>
|
||||
Deactivates the menu shell. Typically this results in the menu shell
|
||||
being erased from the screen.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_select_item ##### -->
|
||||
<para>
|
||||
Selects the menu item from the menu shell.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
@menu_item: The #GtkMenuItem to select.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_select_first ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_shell:
|
||||
@search_sensitive:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_deselect ##### -->
|
||||
<para>
|
||||
Deselects the currently selected item from the menu shell, if any.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_activate_item ##### -->
|
||||
<para>
|
||||
Activates the menu item within the menu shell.
|
||||
</para>
|
||||
|
||||
@menu_shell: a #GtkMenuShell.
|
||||
@menu_item: The #GtkMenuItem to activate.
|
||||
@force_deactivate: If TRUE, force the deactivation of the menu shell
|
||||
after the menu item is activated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_cancel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_shell:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_set_take_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_shell:
|
||||
@take_focus:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_shell_get_take_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkMenuDirectionType ##### -->
|
||||
<para>
|
||||
An enumeration representing directional movements within a menu.
|
||||
</para>
|
||||
|
||||
@GTK_MENU_DIR_PARENT: To the parent menu shell.
|
||||
@GTK_MENU_DIR_CHILD: To the submenu, if any, associated with the item.
|
||||
@GTK_MENU_DIR_NEXT: To the next menu item.
|
||||
@GTK_MENU_DIR_PREV: To the previous menu item.
|
||||
|
@ -16,6 +16,24 @@ A GtkToolItem containing a button with an additional dropdown menu
|
||||
#GtkMenuToolButton. Use gtk_menu_tool_button_new_from_stock() to
|
||||
create a new #GtkMenuToolButton containing a stock item.
|
||||
</para>
|
||||
<refsect2 id="GtkMenuToolButton-BUILDER-UI">
|
||||
<title>GtkMenuToolButton as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkMenuToolButton implementation of the GtkBuildable interface
|
||||
supports adding a menu by specifying "menu" as the "type"
|
||||
attribute of a <child> element.
|
||||
</para>
|
||||
<example>
|
||||
<title>A UI definition fragment with menus</title>
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkMenuToolButton">
|
||||
<child type="menu">
|
||||
<object class="GtkMenu"/>
|
||||
</child>
|
||||
</object>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
@ -1,186 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkPrintJob
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Represents a print job
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkPrintJob object represents a job that is sent to a
|
||||
printer. You only need to deal directly with print jobs if
|
||||
you use the non-portable #GtkPrintUnixDialog API.
|
||||
</para>
|
||||
<para>
|
||||
Use gtk_print_job_get_surface() to obtain the cairo surface
|
||||
onto which the pages must be drawn. Use gtk_print_job_send()
|
||||
to send the finished job to the printer. If you don't use cairo
|
||||
#GtkPrintJob also supports printing of manually generated postscript,
|
||||
via gtk_print_job_set_source_file().
|
||||
<!-- FIXME more details needed here -->
|
||||
</para>
|
||||
<!-- FIXME examples ? -->
|
||||
|
||||
<para>
|
||||
Printing support was added in GTK+ 2.10.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkPrintJob ##### -->
|
||||
<para>
|
||||
The GtkPrintJob struct contains only private members
|
||||
and should not be directly accessed.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintJob::status-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printjob: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkPrintJob:page-setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintJob:printer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintJob:settings ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintJob:title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintJob:track-print-status ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkPrintJobCompleteFunc ##### -->
|
||||
<para>
|
||||
The type of callback that is passed to gtk_print_job_send().
|
||||
It is called when the print job has been completely sent.
|
||||
</para>
|
||||
|
||||
@print_job: the #GtkPrintJob
|
||||
@user_data: user data that has been passed to gtk_print_job_send()
|
||||
@error: a #GError that contains error information if the sending
|
||||
of the print job failed, otherwise %NULL
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@printer:
|
||||
@settings:
|
||||
@page_setup:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_get_settings ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_get_printer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_get_status ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_set_source_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@filename:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_get_surface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_send ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@callback:
|
||||
@user_data:
|
||||
@dnotify:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_set_track_print_status ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@track_status:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_job_get_track_print_status ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@job:
|
||||
@Returns:
|
||||
|
||||
|
@ -630,14 +630,11 @@ The #GQuark used for #GtkPrintError errors.
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkPageSetupDoneFunc ##### -->
|
||||
<para>
|
||||
The type of function that is passed to gtk_print_run_page_setup_dialog_async().
|
||||
This function will be called when the page setup dialog is dismissed, and
|
||||
also serves as destroy notify for @data.
|
||||
|
||||
</para>
|
||||
|
||||
@page_setup: the #GtkPageSetup that has been
|
||||
@data: user data that has been passed to
|
||||
gtk_print_run_page_setup_dialog_async().
|
||||
@page_setup:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_run_page_setup_dialog_async ##### -->
|
||||
|
@ -1,542 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Selections
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling inter-process communication via selections
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para>
|
||||
The selection mechanism provides the basis for different types
|
||||
of communication between processes. In particular, drag and drop and
|
||||
#GtkClipboard work via selections. You will very seldom or
|
||||
never need to use most of the functions in this section directly;
|
||||
#GtkClipboard provides a nicer interface to the same functionality.
|
||||
</para>
|
||||
<para>
|
||||
Some of the datatypes defined this section are used in
|
||||
the #GtkClipboard and drag-and-drop API's as well. The
|
||||
#GtkTargetEntry structure and #GtkTargetList objects represent
|
||||
lists of data types that are supported when sending or
|
||||
receiving data. The #GtkSelectionData object is used to
|
||||
store a chunk of data along with the data type and other
|
||||
associated information.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkWidget</term>
|
||||
<listitem><para>Much of the operation of selections happens via
|
||||
signals for #GtkWidget. In particular, if you are
|
||||
using the functions in this section, you may need
|
||||
to pay attention to ::selection_get,
|
||||
::selection_received, and :selection_clear_event
|
||||
signals.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTargetEntry ##### -->
|
||||
<para>
|
||||
A #GtkTargetEntry structure represents a single type of
|
||||
data than can be supplied for by a widget for a selection
|
||||
or for supplied or received during drag-and-drop. It
|
||||
contains a string representing the drag type, a flags
|
||||
field (used only for drag and drop - see #GtkTargetFlags),
|
||||
and an application assigned integer ID. The integer
|
||||
ID will later be passed as a signal parameter for signals
|
||||
like "selection_get". It allows the application to identify
|
||||
the target type without extensive string compares.
|
||||
</para>
|
||||
|
||||
@target:
|
||||
@flags:
|
||||
@info:
|
||||
|
||||
<!-- ##### STRUCT GtkTargetList ##### -->
|
||||
<para>
|
||||
A #GtkTargetList structure is a reference counted list
|
||||
of #GtkTargetPair. It is used to represent the same
|
||||
information as a table of #GtkTargetEntry, but in
|
||||
an efficient form. This structure should be treated as
|
||||
opaque.
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@ref_count:
|
||||
|
||||
<!-- ##### STRUCT GtkTargetPair ##### -->
|
||||
<para>
|
||||
Internally used structure in the drag-and-drop and
|
||||
selection handling code.
|
||||
</para>
|
||||
|
||||
@target:
|
||||
@flags:
|
||||
@info:
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_entry_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@target:
|
||||
@flags:
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_entry_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_entry_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@targets:
|
||||
@ntargets:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_ref ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_unref ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@list:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@target:
|
||||
@flags:
|
||||
@info:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add_table ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@targets:
|
||||
@ntargets:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add_text_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@info:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add_image_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@info:
|
||||
@writable:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add_uri_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@info:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_add_rich_text_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@info:
|
||||
@deserializable:
|
||||
@buffer:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_remove ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@target:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_list_find ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@target:
|
||||
@info:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_table_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@targets:
|
||||
@n_targets:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_target_table_new_from_list ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@list:
|
||||
@n_targets:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_owner_set ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@selection:
|
||||
@time_:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_owner_set_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@widget:
|
||||
@selection:
|
||||
@time_:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_add_target ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@selection:
|
||||
@target:
|
||||
@info:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_add_targets ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@selection:
|
||||
@targets:
|
||||
@ntargets:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_clear_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_convert ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@selection:
|
||||
@target:
|
||||
@time_:
|
||||
@Returns: x
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_set ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@type:
|
||||
@format:
|
||||
@data:
|
||||
@length:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_set_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@str:
|
||||
@len:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_set_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_set_uris ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@uris:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_uris ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@targets:
|
||||
@n_atoms:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_targets_include_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@writable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_targets_include_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_targets_include_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_targets_include_rich_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_data_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_format ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_get_target ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_targets_include_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@targets:
|
||||
@n_targets:
|
||||
@writable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_targets_include_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@targets:
|
||||
@n_targets:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_targets_include_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@targets:
|
||||
@n_targets:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_targets_include_rich_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@targets:
|
||||
@n_targets:
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_remove_all ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_copy ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_selection_data_free ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@data:
|
||||
|
||||
|
@ -1,482 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkSpinButton
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Retrieve an integer or floating-point number from the user
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkSpinButton is an ideal way to allow the user to set the value of some
|
||||
attribute. Rather than having to directly type a number into a #GtkEntry,
|
||||
#GtkSpinButton allows the user to click on one of two arrows to increment or
|
||||
decrement the displayed value. A value can still be typed in, with the bonus
|
||||
that it can be checked to ensure it is in a given range.
|
||||
</para>
|
||||
<para>
|
||||
The main properties of a #GtkSpinButton are through a #GtkAdjustment. See the
|
||||
#GtkAdjustment section for more details about an adjustment's properties.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using a <structname>GtkSpinButton</structname> to get an integer.</title>
|
||||
<programlisting>
|
||||
|
||||
/* Provides a function to retrieve an integer value from a GtkSpinButton
|
||||
* and creates a spin button to model percentage values.
|
||||
*/
|
||||
|
||||
gint grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
|
||||
return gtk_spin_button_get_value_as_int (a_spinner);
|
||||
}
|
||||
|
||||
void create_integer_spin_button (void) {
|
||||
|
||||
GtkWidget *window, *spinner;
|
||||
GtkAdjustment *spinner_adj;
|
||||
|
||||
spinner_adj = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
|
||||
/* creates the spinner, with no decimal places */
|
||||
spinner = gtk_spin_button_new (spinner_adj, 1.0, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), spinner);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
return;
|
||||
}
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<example>
|
||||
<title>Using a <structname>GtkSpinButton</structname> to get a floating point value.</title>
|
||||
<programlisting>
|
||||
|
||||
/* Provides a function to retrieve a floating point value from a
|
||||
* GtkSpinButton, and creates a high precision spin button.
|
||||
*/
|
||||
|
||||
gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
|
||||
return gtk_spin_button_get_value (a_spinner);
|
||||
}
|
||||
|
||||
void create_floating_spin_button (void) {
|
||||
|
||||
GtkWidget *window, *spinner;
|
||||
GtkAdjustment *spinner_adj;
|
||||
|
||||
spinner_adj = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
|
||||
/* creates the spinner, with three decimal places */
|
||||
spinner = gtk_spin_button_new (spinner_adj, 0.001, 3);
|
||||
gtk_container_add (GTK_CONTAINER (window), spinner);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
return;
|
||||
}
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkEntry</term>
|
||||
<listitem><para>retrieve text rather than numbers.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkSpinButton ##### -->
|
||||
<para>
|
||||
<structfield>entry</structfield> is the #GtkEntry part of the #GtkSpinButton
|
||||
widget, and can be used accordingly. All other fields contain private data
|
||||
and should only be modified using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkSpinButton::change-value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spinbutton: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkSpinButton::input ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spinbutton: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkSpinButton::output ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spinbutton: the object which received the signal.
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkSpinButton::value-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spinbutton: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkSpinButton::wrapped ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spinbutton: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:adjustment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:climb-rate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:digits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:numeric ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:snap-to-ticks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:update-policy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:wrap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkSpinButton:shadow-type ##### -->
|
||||
<para>
|
||||
the type of border that surrounds the arrows of a spin button.
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GtkSpinButtonUpdatePolicy ##### -->
|
||||
<para>
|
||||
|
||||
<informaltable pgwide="1" frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>GTK_UPDATE_ALWAYS</entry>
|
||||
<entry>When refreshing your #GtkSpinButton, the value is always displayed.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>GTK_UPDATE_IF_VALID</entry>
|
||||
<entry>When refreshing your #GtkSpinButton, the value is only displayed if it is valid within the bounds of the spin button's #GtkAdjustment.</entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GTK_UPDATE_ALWAYS:
|
||||
@GTK_UPDATE_IF_VALID:
|
||||
|
||||
<!-- ##### ENUM GtkSpinType ##### -->
|
||||
<para>
|
||||
|
||||
<informaltable pgwide="1" frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>GTK_SPIN_STEP_FORWARD,
|
||||
GTK_SPIN_STEP_BACKWARD,
|
||||
GTK_SPIN_PAGE_FORWARD,
|
||||
GTK_SPIN_PAGE_BACKWARD</entry>
|
||||
<entry>These values spin a #GtkSpinButton by the relevant values of the spin button's #GtkAdjustment.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>GTK_SPIN_HOME,
|
||||
GTK_SPIN_END</entry>
|
||||
<entry>These set the spin button's value to the minimum or maxmimum possible values, (set by its #GtkAdjustment), respectively.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>GTK_SPIN_USER_DEFINED</entry>
|
||||
<entry>The programmer must specify the exact amount to spin the #GtkSpinButton.</entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GTK_SPIN_STEP_FORWARD:
|
||||
@GTK_SPIN_STEP_BACKWARD:
|
||||
@GTK_SPIN_PAGE_FORWARD:
|
||||
@GTK_SPIN_PAGE_BACKWARD:
|
||||
@GTK_SPIN_HOME:
|
||||
@GTK_SPIN_END:
|
||||
@GTK_SPIN_USER_DEFINED:
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_configure ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@adjustment:
|
||||
@climb_rate:
|
||||
@digits:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkSpinButton.
|
||||
</para>
|
||||
|
||||
@adjustment: the #GtkAdjustment object that this spin button should use.
|
||||
@climb_rate: specifies how much the spin button changes when an arrow is clicked on.
|
||||
@digits: the number of decimal places to display.
|
||||
@Returns: The new spin button as a #GtkWidget.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_new_with_range ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@min:
|
||||
@max:
|
||||
@step:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_adjustment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@adjustment:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_adjustment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_digits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@digits:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_increments ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@step:
|
||||
@page:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_range ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@min:
|
||||
@max:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_value_as_int ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_update_policy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@policy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_numeric ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@numeric:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_spin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@direction:
|
||||
@increment:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_wrap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@wrap:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_set_snap_to_ticks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@snap_to_ticks:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_update ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_digits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_increments ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@step:
|
||||
@page:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_numeric ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_range ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@min:
|
||||
@max:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_snap_to_ticks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_update_policy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_get_wrap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@spin_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_INPUT_ERROR ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
@ -931,7 +931,7 @@ It must return the serialized form of the content.
|
||||
</para>
|
||||
|
||||
@register_buffer: the #GtkTextBuffer for which the format is registered
|
||||
@content_buffer: the #GtkTextsBuffer to serialize
|
||||
@content_buffer: the #GtkTextBuffer to serialize
|
||||
@start: start of the block of text to serialize
|
||||
@end: end of the block of text to serialize
|
||||
@length: Return location for the length of the serialized data
|
||||
|
@ -1,498 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkTextTag
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A tag that can be applied to text in a GtkTextBuffer
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
You may wish to begin by reading the <link linkend="TextWidget">text widget
|
||||
conceptual overview</link> which gives an overview of all the objects and data
|
||||
types related to the text widget and how they work together.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Tags should be in the #GtkTextTagTable for a given #GtkTextBuffer
|
||||
before using them with that buffer.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
gtk_text_buffer_create_tag() is the best way to create tags.
|
||||
See <application>gtk-demo</application> for numerous examples.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The "invisible" property was not implemented for GTK+ 2.0.
|
||||
It is working (with minor issues) since 2.8.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTextTag ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkTextTag::event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@texttag: the object which received the signal.
|
||||
@arg1:
|
||||
@event:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### ARG GtkTextTag:accumulative-margin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:background-full-height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:background-full-height-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:background-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:background-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:direction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:editable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:editable-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:family ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:family-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:font-desc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:foreground ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:foreground-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:foreground-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:indent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:indent-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:invisible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:invisible-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:justification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:justification-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:language ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:language-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:left-margin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:left-margin-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:paragraph-background ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:paragraph-background-gdk ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:paragraph-background-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:pixels-above-lines ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:pixels-above-lines-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:pixels-below-lines ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:pixels-below-lines-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:pixels-inside-wrap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:pixels-inside-wrap-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:right-margin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:right-margin-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:rise ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:rise-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:scale-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:size-points ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:size-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:stretch ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:stretch-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:strikethrough ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:strikethrough-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:style-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:tabs ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:tabs-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:underline-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:variant ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:variant-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:weight ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:weight-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:wrap-mode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTextTag:wrap-mode-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GtkWrapMode ##### -->
|
||||
<para>
|
||||
Describes a type of line wrapping.
|
||||
</para>
|
||||
|
||||
@GTK_WRAP_NONE: do not wrap lines; just make the text area wider
|
||||
@GTK_WRAP_CHAR: wrap text, breaking lines anywhere the cursor can
|
||||
appear (between characters, usually - if you want to
|
||||
be technical, between graphemes, see
|
||||
pango_get_log_attrs())
|
||||
@GTK_WRAP_WORD: wrap text, breaking lines in between words
|
||||
@GTK_WRAP_WORD_CHAR: wrap text, breaking lines in between words, or if
|
||||
that is not enough, also between graphemes.
|
||||
|
||||
<!-- ##### STRUCT GtkTextAttributes ##### -->
|
||||
<para>
|
||||
Using #GtkTextAttributes directly should rarely be necessary. It's
|
||||
primarily useful with gtk_text_iter_get_attributes(). As with most
|
||||
GTK+ structs, the fields in this struct should only be read, never
|
||||
modified directly.
|
||||
</para>
|
||||
|
||||
@appearance: pointer to sub-struct containing certain attributes
|
||||
@justification:
|
||||
@direction:
|
||||
@font:
|
||||
@font_scale:
|
||||
@left_margin:
|
||||
@indent:
|
||||
@right_margin:
|
||||
@pixels_above_lines:
|
||||
@pixels_below_lines:
|
||||
@pixels_inside_wrap:
|
||||
@tabs:
|
||||
@wrap_mode:
|
||||
@language:
|
||||
@invisible:
|
||||
@bg_full_height:
|
||||
@editable:
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_tag_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_tag_get_priority ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tag:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_tag_set_priority ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tag:
|
||||
@priority:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_tag_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tag:
|
||||
@event_object:
|
||||
@event:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTextAppearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@bg_color:
|
||||
@fg_color:
|
||||
@rise:
|
||||
@underline:
|
||||
@strikethrough:
|
||||
@draw_bg:
|
||||
@inside_selection:
|
||||
@is_text:
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_attributes_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_attributes_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_attributes_copy_values ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@src:
|
||||
@dest:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_attributes_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@values:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_text_attributes_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@values:
|
||||
@Returns:
|
||||
|
||||
|
@ -1,864 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkTreeModel
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
The tree interface used by GtkTreeView
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkTreeModel interface defines a generic tree interface for use by
|
||||
the #GtkTreeView widget. It is an abstract interface, and is designed
|
||||
to be usable with any appropriate data structure. The programmer just
|
||||
has to implement this interface on their own data type for it to be
|
||||
viewable by a #GtkTreeView widget.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The model is represented as a hierarchical tree of strongly-typed,
|
||||
columned data. In other words, the model can be seen as a tree where
|
||||
every node has different values depending on which column is being
|
||||
queried. The type of data found in a column is determined by using the
|
||||
GType system (ie. #G_TYPE_INT, #GTK_TYPE_BUTTON, #G_TYPE_POINTER, etc.).
|
||||
The types are homogeneous per column across all nodes. It is important
|
||||
to note that this interface only provides a way of examining a model and
|
||||
observing changes. The implementation of each individual model decides
|
||||
how and if changes are made.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to make life simpler for programmers who do not need to write
|
||||
their own specialized model, two generic models are provided — the
|
||||
#GtkTreeStore and the #GtkListStore. To use these, the developer simply
|
||||
pushes data into these models as necessary. These models provide the
|
||||
data structure as well as all appropriate tree interfaces. As a result,
|
||||
implementing drag and drop, sorting, and storing data is trivial. For
|
||||
the vast majority of trees and lists, these two models are sufficient.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Models are accessed on a node/column level of granularity. One can
|
||||
query for the value of a model at a certain node and a certain column
|
||||
on that node. There are two structures used to reference a particular
|
||||
node in a model. They are the #GtkTreePath and the #GtkTreeIter
|
||||
<footnote>
|
||||
<para>
|
||||
Here, <abbrev>iter</abbrev> is short for <quote>iterator</quote>
|
||||
</para>
|
||||
</footnote>
|
||||
Most of the interface consists of operations on a #GtkTreeIter.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A path is essentially a potential node. It is a location on a model
|
||||
that may or may not actually correspond to a node on a specific model.
|
||||
The #GtkTreePath struct can be converted into either an array of
|
||||
unsigned integers or a string. The string form is a list of numbers
|
||||
separated by a colon. Each number refers to the offset at that level.
|
||||
Thus, the path <quote>0</quote> refers to the root node and the path
|
||||
<quote>2:4</quote> refers to the fifth child of the third node.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By contrast, a #GtkTreeIter is a reference to a specific node on a
|
||||
specific model. It is a generic struct with an integer and three
|
||||
generic pointers. These are filled in by the model in a model-specific
|
||||
way. One can convert a path to an iterator by calling
|
||||
gtk_tree_model_get_iter(). These iterators are the primary way of
|
||||
accessing a model and are similar to the iterators used by
|
||||
#GtkTextBuffer. They are generally statically allocated on the stack and
|
||||
only used for a short time. The model interface defines a set of
|
||||
operations using them for navigating the model.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is expected that models fill in the iterator with private data. For
|
||||
example, the #GtkListStore model, which is internally a simple linked
|
||||
list, stores a list node in one of the pointers. The #GtkTreeModelSort
|
||||
stores an array and an offset in two of the pointers. Additionally,
|
||||
there is an integer field. This field is generally filled with a unique
|
||||
stamp per model. This stamp is for catching errors resulting from using
|
||||
invalid iterators with a model.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The lifecycle of an iterator can be a little confusing at first.
|
||||
Iterators are expected to always be valid for as long as the model is
|
||||
unchanged (and doesn't emit a signal). The model is considered to own
|
||||
all outstanding iterators and nothing needs to be done to free them from
|
||||
the user's point of view. Additionally, some models guarantee that an
|
||||
iterator is valid for as long as the node it refers to is valid (most
|
||||
notably the #GtkTreeStore and #GtkListStore). Although generally
|
||||
uninteresting, as one always has to allow for the case where iterators
|
||||
do not persist beyond a signal, some very important performance
|
||||
enhancements were made in the sort model. As a result, the
|
||||
#GTK_TREE_MODEL_ITERS_PERSIST flag was added to indicate this behavior.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To help show some common operation of a model, some examples are
|
||||
provided. The first example shows three ways of getting the iter at the
|
||||
location <quote>3:2:5</quote>. While the first method shown is easier,
|
||||
the second is much more common, as you often get paths from callbacks.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Acquiring a <structname>GtkTreeIter</structname></title>
|
||||
<programlisting>
|
||||
/* Three ways of getting the iter pointing to the location
|
||||
*/
|
||||
{
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeIter parent_iter;
|
||||
|
||||
/* get the iterator from a string */
|
||||
gtk_tree_model_get_iter_from_string (model, &iter, "3:2:5");
|
||||
|
||||
/* get the iterator from a path */
|
||||
path = gtk_tree_path_new_from_string ("3:2:5");
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
|
||||
/* walk the tree to find the iterator */
|
||||
gtk_tree_model_iter_nth_child (model, &iter, NULL, 3);
|
||||
parent_iter = iter;
|
||||
gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 2);
|
||||
parent_iter = iter;
|
||||
gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 5);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This second example shows a quick way of iterating through a list and
|
||||
getting a string and an integer from each row. The
|
||||
<function>populate_model</function> function used below is not shown, as
|
||||
it is specific to the #GtkListStore. For information on how to write
|
||||
such a function, see the #GtkListStore documentation.
|
||||
<example>
|
||||
<title>Reading data from a <structname>GtkTreeModel</structname></title>
|
||||
<programlisting>
|
||||
enum
|
||||
{
|
||||
STRING_COLUMN,
|
||||
INT_COLUMN,
|
||||
N_COLUMNS
|
||||
};
|
||||
|
||||
{
|
||||
GtkTreeModel *list_store;
|
||||
GtkTreeIter iter;
|
||||
gboolean valid;
|
||||
gint row_count = 0;
|
||||
|
||||
/* make a new list_store */
|
||||
list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);
|
||||
|
||||
/* Fill the list store with data */
|
||||
populate_model (list_store);
|
||||
|
||||
/* Get the first iter in the list */
|
||||
valid = gtk_tree_model_get_iter_first (list_store, &iter);
|
||||
|
||||
while (valid)
|
||||
{
|
||||
/* Walk through the list, reading each row */
|
||||
gchar *str_data;
|
||||
gint int_data;
|
||||
|
||||
/* Make sure you terminate calls to gtk_tree_model_get(<!-- -->)
|
||||
* with a '-1' value
|
||||
*/
|
||||
gtk_tree_model_get (list_store, &iter,
|
||||
STRING_COLUMN, &str_data,
|
||||
INT_COLUMN, &int_data,
|
||||
-1);
|
||||
|
||||
/* Do something with the data */
|
||||
g_print ("Row %d: (%s,%d)\n", row_count, str_data, int_data);
|
||||
g_free (str_data);
|
||||
|
||||
row_count ++;
|
||||
valid = gtk_tree_model_iter_next (list_store, &iter);
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkTreeView, #GtkTreeStore, #GtkListStore, <link linkend="gtk-GtkTreeView-drag-and-drop">GtkTreeDnd</link>, #GtkTreeSortable
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTreeModel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkTreeModel::row-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@treemodel: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkTreeModel::row-deleted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@treemodel: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkTreeModel::row-has-child-toggled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@treemodel: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkTreeModel::row-inserted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@treemodel: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkTreeModel::rows-reordered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@treemodel: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
||||
<!-- ##### STRUCT GtkTreeIter ##### -->
|
||||
<para>
|
||||
The <structname>GtkTreeIter</structname> is the primary structure for
|
||||
accessing a structure. Models are expected to put a unique integer in
|
||||
the <structfield>stamp</structfield> member, and put model-specific
|
||||
data in the three <structfield>user_data</structfield> members.
|
||||
</para>
|
||||
|
||||
@stamp: A unique stamp to catch invalid iterators
|
||||
@user_data: Model specific data
|
||||
@user_data2: Model specific data
|
||||
@user_data3: Model specific data
|
||||
|
||||
<!-- ##### STRUCT GtkTreePath ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTreeRowReference ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTreeModelIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@g_iface:
|
||||
@row_changed:
|
||||
@row_inserted:
|
||||
@row_has_child_toggled:
|
||||
@row_deleted:
|
||||
@rows_reordered:
|
||||
@get_flags:
|
||||
@get_n_columns:
|
||||
@get_column_type:
|
||||
@get_iter:
|
||||
@get_path:
|
||||
@get_value:
|
||||
@iter_next:
|
||||
@iter_children:
|
||||
@iter_has_child:
|
||||
@iter_n_children:
|
||||
@iter_nth_child:
|
||||
@iter_parent:
|
||||
@ref_node:
|
||||
@unref_node:
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkTreeModelForeachFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@model: The #GtkTreeModel currently being iterated
|
||||
@path: The current #GtkTreePath
|
||||
@iter: The current #GtkTreeIter
|
||||
@data: The user data passed to gtk_tree_model_foreach()
|
||||
@Returns: %TRUE to stop iterating, %FALSE to continue.
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkTreeModelFlags ##### -->
|
||||
<para>
|
||||
These flags indicate various properties of a #GtkTreeModel. They are
|
||||
returned by gtk_tree_model_get_flags(), and must be static for the
|
||||
lifetime of the object. A more complete description of
|
||||
#GTK_TREE_MODEL_ITERS_PERSIST can be found in the overview of this
|
||||
section.
|
||||
</para>
|
||||
|
||||
@GTK_TREE_MODEL_ITERS_PERSIST: Iterators survive all signals emitted by the tree.
|
||||
@GTK_TREE_MODEL_LIST_ONLY: The model is a list only, and never has children
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_new_from_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_new_from_indices ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@first_index:
|
||||
@Varargs:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_to_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_new_first ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_append_index ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@index_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_prepend_index ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@index_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_get_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_get_indices ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_get_indices_with_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@depth:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_compare ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@a:
|
||||
@b:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_next ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_prev ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_up ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_down ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_is_ancestor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@descendant:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_path_is_descendant ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@path:
|
||||
@ancestor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@model:
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_new_proxy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@proxy:
|
||||
@model:
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_get_model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@reference:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_get_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@reference:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_valid ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@reference:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@reference:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@reference:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_inserted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@proxy:
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_deleted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@proxy:
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_row_reference_reordered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@proxy:
|
||||
@path:
|
||||
@iter:
|
||||
@new_order:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_iter_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_iter_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_flags ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_n_columns ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_column_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@index_:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_iter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@path:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_iter_from_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@path_string:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_iter_first ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@column:
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_iter_next ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_iter_children ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@parent:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_iter_has_child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_iter_n_children ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_iter_nth_child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@parent:
|
||||
@n:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_iter_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@child:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_string_from_iter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_ref_node ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_unref_node ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@Varargs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_get_valist ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@iter:
|
||||
@var_args:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_foreach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@model:
|
||||
@func:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_row_changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@path:
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_row_inserted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@path:
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_row_has_child_toggled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@path:
|
||||
@iter:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_row_deleted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@path:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tree_model_rows_reordered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tree_model:
|
||||
@path:
|
||||
@iter:
|
||||
@new_order:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="TreeWidget" revision="20 Mar 2002">
|
||||
<refentry id="TreeWidget">
|
||||
<refmeta>
|
||||
<refentrytitle>Tree and List Widget Overview</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
@ -30,6 +30,9 @@
|
||||
<link linkend="GtkFontButton">
|
||||
<inlinegraphic fileref="font-button.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkAppChooserButton">
|
||||
<inlinegraphic fileref="appchooserbutton.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkFrame">
|
||||
<inlinegraphic fileref="frame.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
@ -123,6 +126,9 @@
|
||||
<link linkend="GtkFileChooserDialog">
|
||||
<inlinegraphic fileref="filechooser.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkAppChooserDialog">
|
||||
<inlinegraphic fileref="appchooserdialog.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkSwitch">
|
||||
<inlinegraphic fileref="switch.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-windows" revision="4 Feb 2001">
|
||||
<refentry id="gtk-windows">
|
||||
<refmeta>
|
||||
<refentrytitle>Using GTK+ on Windows</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-x11" revision="17 Jan 2002">
|
||||
<refentry id="gtk-x11">
|
||||
<refmeta>
|
||||
<refentrytitle>Using GTK+ on the X Window System</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
@ -20,13 +20,13 @@ X11 aspects of using GTK+
|
||||
<title>GTK+ for the X Window System</title>
|
||||
|
||||
<para>
|
||||
On UNIX, the X backend is the default build for GTK+. So
|
||||
you don't need to do anything special when compiling it,
|
||||
On UNIX, the X backend is the default build for GTK+.
|
||||
So you don't need to do anything special when compiling it,
|
||||
and everything should "just work."
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To mix low-level Xlib routines into a GTK program,
|
||||
To mix low-level Xlib routines into a GTK program,
|
||||
see <link linkend="gdk-X-Window-System-Interaction">GDK X Window
|
||||
System interaction</link> in the GDK manual.
|
||||
</para>
|
||||
@ -35,8 +35,7 @@ System interaction</link> in the GDK manual.
|
||||
<title>X11-specific commandline options</title>
|
||||
|
||||
<para>
|
||||
The X backend understands some additional command line
|
||||
arguments.
|
||||
The X backend understands some additional command line arguments.
|
||||
</para>
|
||||
|
||||
<formalpara>
|
||||
@ -44,34 +43,7 @@ arguments.
|
||||
|
||||
<para>
|
||||
The name of the X display to open instead of the one specified
|
||||
in the <envar>DISPLAY</envar> environment variable.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--screen <replaceable>screen_number</replaceable></systemitem></title>
|
||||
|
||||
<para>
|
||||
The number of the screen within the default display. This overrides
|
||||
any screen number specified in the display name specified by
|
||||
by he <systemitem>--display</systemitem> command line option or
|
||||
the <envar>DISPLAY</envar> environment variable. If this screen
|
||||
cannot be opened, then GTK+ will fall back to the screen
|
||||
specified in the display name. This option is not useful
|
||||
interactively; the intended purposes is that when a program
|
||||
registers its command line with a <firstterm>session
|
||||
manager</firstterm> for later restarting, it can save the
|
||||
screen it is on, without having to worry if it might be
|
||||
restarted on a different display.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--sync</systemitem></title>
|
||||
|
||||
<para>
|
||||
Makes all X requests synchronously. This is a useful option for
|
||||
debugging, but it will slow down the performance considerably.
|
||||
in the <envar>DISPLAY</envar> environment variable.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
|
||||
@ -27,10 +26,14 @@ GTKDOC_LIBS = $(top_builddir)/modules/other/gail/libgail-util/libgailutil.la
|
||||
|
||||
# gtkdoc-mkdb related varaibles
|
||||
MKDB_OPTIONS =
|
||||
content_files =
|
||||
content_files = \
|
||||
version.xml
|
||||
|
||||
HTML_IMAGES =
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@ -2,6 +2,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
]>
|
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<bookinfo>
|
||||
|
1
docs/reference/libgail-util/version.xml.in
Normal file
1
docs/reference/libgail-util/version.xml.in
Normal file
@ -0,0 +1 @@
|
||||
@GTK_VERSION@
|
@ -1,22 +1,21 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_srcdir)/gdk/x11 \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_srcdir)/gdk/x11 \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
DEPS = \
|
||||
$(top_builddir)/gtk/libgtk-3.0.la
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(GDK_DEP_LIBS) \
|
||||
LDADDS = \
|
||||
$(top_builddir)/gtk/libgtk-3.0.la \
|
||||
$(top_builddir)/gdk/libgdk-3.0.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(GDK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
if USE_X11
|
||||
|
@ -138,7 +138,7 @@ take_window_shot (Window child,
|
||||
else
|
||||
xid = child;
|
||||
|
||||
window = gdk_window_foreign_new (xid);
|
||||
window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), xid);
|
||||
|
||||
width = gdk_window_get_width (window);
|
||||
height = gdk_window_get_height (window);
|
||||
|
@ -1070,6 +1070,39 @@ create_assistant (void)
|
||||
return info;
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_appchooserbutton (void)
|
||||
{
|
||||
GtkWidget *picker;
|
||||
GtkWidget *align, *vbox;
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
picker = gtk_app_chooser_button_new ("text/plain");
|
||||
gtk_container_add (GTK_CONTAINER (align), picker);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Application Button"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
return new_widget_info ("appchooserbutton", vbox, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_appchooserdialog (void)
|
||||
{
|
||||
WidgetInfo *info;
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_app_chooser_dialog_new_for_content_type (NULL, 0, "image/png");
|
||||
gtk_window_set_default_size (GTK_WINDOW (widget), 200, 300);
|
||||
|
||||
info = new_widget_info ("appchooserdialog", widget, ASIS);
|
||||
info->include_decorations = TRUE;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
GList *
|
||||
get_all_widgets (void)
|
||||
{
|
||||
@ -1117,6 +1150,8 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_print_dialog ());
|
||||
retval = g_list_prepend (retval, create_volume_button ());
|
||||
retval = g_list_prepend (retval, create_switch ());
|
||||
retval = g_list_prepend (retval, create_appchooserbutton ());
|
||||
retval = g_list_prepend (retval, create_appchooserdialog ());
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ In the following
|
||||
|
||||
widget->parent && GTK_WIDGET_MAPPED (widget->parent) &&
|
||||
GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_CHILD_VISIBLE
|
||||
=> GTK_WIDGET_MAPPED (widget)
|
||||
<=> GTK_WIDGET_MAPPED (widget)
|
||||
|
||||
Note:, the definition
|
||||
|
||||
|
@ -45,8 +45,15 @@ INCLUDES = \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(top_builddir)/gtk/libgtk-3.0.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
noinst_PROGRAMS = hello-world window-default
|
||||
drawing_LDADD = $(LDADD) \
|
||||
$(top_builddir)/gdk/libgdk-3.0.la
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
hello-world \
|
||||
window-default \
|
||||
bloatpad \
|
||||
grid-packing \
|
||||
drawing
|
||||
|
200
examples/drawing.c
Normal file
200
examples/drawing.c
Normal file
@ -0,0 +1,200 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Surface to store current scribbles */
|
||||
static cairo_surface_t *surface = NULL;
|
||||
|
||||
static void
|
||||
clear_surface (void)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = cairo_create (surface);
|
||||
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
/* Create a new surface of the appropriate size to store our scribbles */
|
||||
static gboolean
|
||||
configure_event_cb (GtkWidget *widget,
|
||||
GdkEventConfigure *event,
|
||||
gpointer data)
|
||||
{
|
||||
if (surface)
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
gtk_widget_get_allocated_width (widget),
|
||||
gtk_widget_get_allocated_height (widget));
|
||||
|
||||
/* Initialize the surface to white */
|
||||
clear_surface ();
|
||||
|
||||
/* We've handled the configure event, no need for further processing. */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Redraw the screen from the surface. Note that the ::draw
|
||||
* signal receives a ready-to-be-used cairo_t that is already
|
||||
* clipped to only draw the exposed areas of the widget
|
||||
*/
|
||||
static gboolean
|
||||
draw_cb (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gpointer data)
|
||||
{
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Draw a rectangle on the surface at the given position */
|
||||
static void
|
||||
draw_brush (GtkWidget *widget,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
/* Paint to the surface, where we store our state */
|
||||
cr = cairo_create (surface);
|
||||
|
||||
cairo_rectangle (cr, x - 3, y - 3, 6, 6);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
/* Now invalidate the affected region of the drawing area. */
|
||||
gtk_widget_queue_draw_area (widget, x - 3, y - 3, 6, 6);
|
||||
}
|
||||
|
||||
/* Handle button press events by either drawing a rectangle
|
||||
* or clearing the surface, depending on which button was pressed.
|
||||
* The ::button-press signal handler receives a GdkEventButton
|
||||
* struct which contains this information.
|
||||
*/
|
||||
static gboolean
|
||||
button_press_event_cb (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
{
|
||||
/* paranoia check, in case we haven't gotten a configure event */
|
||||
if (surface == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (event->button == 1)
|
||||
{
|
||||
draw_brush (widget, event->x, event->y);
|
||||
}
|
||||
else if (event->button == 3)
|
||||
{
|
||||
clear_surface ();
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
/* We've handled the event, stop processing */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Handle motion events by continuing to draw if button 1 is
|
||||
* still held down. The ::motion-notify signal handler receives
|
||||
* a GdkEventMotion struct which contains this information.
|
||||
*/
|
||||
static gboolean
|
||||
motion_notify_event_cb (GtkWidget *widget,
|
||||
GdkEventMotion *event,
|
||||
gpointer data)
|
||||
{
|
||||
int x, y;
|
||||
GdkModifierType state;
|
||||
|
||||
/* paranoia check, in case we haven't gotten a configure event */
|
||||
if (surface == NULL)
|
||||
return FALSE;
|
||||
|
||||
/* This call is very important; it requests the next motion event.
|
||||
* If you don't call gdk_window_get_pointer() you'll only get
|
||||
* a single motion event. The reason is that we specified
|
||||
* GDK_POINTER_MOTION_HINT_MASK to gtk_widget_set_events().
|
||||
* If we hadn't specified that, we could just use event->x, event->y
|
||||
* as the pointer location. But we'd also get deluged in events.
|
||||
* By requesting the next event as we handle the current one,
|
||||
* we avoid getting a huge number of events faster than we
|
||||
* can cope.
|
||||
*/
|
||||
gdk_window_get_pointer (event->window, &x, &y, &state);
|
||||
|
||||
if (state & GDK_BUTTON1_MASK)
|
||||
draw_brush (widget, x, y);
|
||||
|
||||
/* We've handled it, stop processing */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
close_window (void)
|
||||
{
|
||||
if (surface)
|
||||
cairo_surface_destroy (surface);
|
||||
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *da;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 100, 100);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
/* Signals used to handle the backing surface */
|
||||
g_signal_connect (da, "draw",
|
||||
G_CALLBACK (draw_cb), NULL);
|
||||
g_signal_connect (da,"configure-event",
|
||||
G_CALLBACK (configure_event_cb), NULL);
|
||||
|
||||
/* Event signals */
|
||||
g_signal_connect (da, "motion-notify-event",
|
||||
G_CALLBACK (motion_notify_event_cb), NULL);
|
||||
g_signal_connect (da, "button-press-event",
|
||||
G_CALLBACK (button_press_event_cb), NULL);
|
||||
|
||||
/* Ask to receive events the drawing area doesn't normally
|
||||
* subscribe to. In particular, we need to ask for the
|
||||
* button press and motion notify events that want to handle.
|
||||
*/
|
||||
gtk_widget_set_events (da, gtk_widget_get_events (da)
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_POINTER_MOTION_MASK
|
||||
| GDK_POINTER_MOTION_HINT_MASK);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user