Compare commits

..

16 Commits

Author SHA1 Message Date
Havoc Pennington
733991c84d Rename GtkWidget padding to margin 2010-09-11 19:41:24 -04:00
Havoc Pennington
83008588e1 Use gint16 for GtkBorder
32K of border ought to be enough for any pixel dimensions. At least
until screens are so huge we start using doubles.

This saves a nice 64 bits of space when we have a GtkBorder
stored somewhere.

Signed integers are used to avoid surprising unsigned math
issues. Just search GTK's whole git log from inception
for "unsigned" if you want to find any number of commits
fixing signed/unsigned bugs.
2010-09-11 19:25:57 -04:00
Havoc Pennington
cbfbe68eca Adapt to widget->allocation becoming private 2010-09-11 17:10:54 -04:00
Havoc Pennington
dd3f8cefeb Just use GtkBorder for padding in GtkAuxInfo 2010-09-11 17:10:37 -04:00
Havoc Pennington
c818f8714f Merge remote branch 'origin/master' into widget-padding 2010-09-11 12:59:47 -04:00
Havoc Pennington
1812b001f7 Add padding and alignment tests to testadjustsize.c 2010-09-07 22:05:05 -04:00
Havoc Pennington
c440a6760e Add padding and alignment properties to GtkWidget
h-align = START,END,CENTER,FILL
v-align = START,END,CENTER,FILL
padding-left,right,top,bottom,all-sides

These should obsolete all such similar properties on
layout containers, GtkMisc, GtkAlignment, GtkContainer::border-width

Padding is outside the size request.
If padding were not outside the set_size_request() it would not work the
same way as container-supplied (child property) padding.

Conceptually set_size_request() forces the value from the subclass
(the original unadjusted request) and then we go on to adjust
the request further by adding the padding.

To reflect this, we'll probably rename padding to margin
(and squash that back with this patch).
2010-09-07 22:04:59 -04:00
Havoc Pennington
86e475b843 GtkButton: let GtkContainer handle border width 2010-09-07 21:49:19 -04:00
Havoc Pennington
aa53f37d45 add gtk_container_class_handle_border_width() so subclasses can ignore border_width
A subclass calls gtk_container_class_handle_border_width()
in its class_init

This marks the subclass as expecting GtkContainer to deal with
border width automatically, which GtkContainer then does.
2010-09-07 21:49:19 -04:00
Havoc Pennington
5c09e9e727 Add testadjustsize test, to test new adjust size methods and related features
This will test size adjust, and interactions with other padding and border
2010-09-07 21:49:19 -04:00
Havoc Pennington
034a436d38 GtkWidget: add adjust_size_request adjust_size_allocation virtual funcs
Use these new methods to handle set_size_request (aka aux_info)
inside gtkwidget.c, instead of having external code mess with it.

The virtual functions can be used for other purposes in the
future. For example, GtkContainer::border_width could be
automatically implemented for all container subclasses.
2010-09-07 21:49:19 -04:00
Havoc Pennington
8c914ce4cc Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c
Did not update uses in other files because the plan is to
get rid of those other uses anyhow. So don't want to make
this function available in the header.
2010-09-07 21:49:19 -04:00
Havoc Pennington
b487f4d181 add _gtk_widget_get_aux_info_or_defaults()
This is better than peeking aux info then testing != NULL
in several ways:
- it returns const aux info so if we don't create we can't write
- it ensures that the default we assume if aux_info is NULL is
  the same as the default we set if we've created the aux info
- it avoids typing in != NULL checks
2010-09-07 21:49:09 -04:00
Havoc Pennington
6a5b0fa2b7 Fix more SizeRequest implementations to avoid recursive calls to wrapper API
GtkFrame, GtkComboBox, GtkExpander, GtkMenu, GtkWrapBox

These are all the examples I could find so far.

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-07 21:28:36 -04:00
Havoc Pennington
dcdf3da06b Warn about recursively calling size req wrappers on the same object and orientation
We are not re-entrant and there is no reason for widgets to
do this, most likely they'll just get unexpected bugs because
the wrappers may modify the request.

Computing the request should logically rely only on the
widget itself, not on any adjustments caused by set_size_request,
size groups, and so forth.

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-07 21:28:36 -04:00
Havoc Pennington
e2b03a9b96 default impls of width_for_height,hfw should chain directly not use wrapper API
In GtkBin and GtkWidget we tried to provide handy defaults that
call get_width if there's no get_width_for_height and
get_height for get_height_for_width.

However, they used the wrapper API on GtkSizeRequest instead of
chaining directly to the other method implementation.

This could result in all kinds of surprising behavior, for example,
get_width_for_height() would now already include the effects of set_size_request().

If nothing else it's inefficient. But it's just conceptually wrong,
because to chain to another implementation, we should call the other
implementation, not call a wrapper around the other implementation
(when we're already inside a previous invocation of the wrapper,
i.e. compute_size_for_orientation() ends up reinvoking itself
in the same orientation on the same object which it pretty
likely isn't intending to do)

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-07 21:28:36 -04:00
1390 changed files with 579680 additions and 458740 deletions

View File

@@ -13,7 +13,7 @@ fine GNU mirrors. Beta software can be found at alpha.gnu.org.
Up-to-date instructions about developing GNOME applications and libraries
can be found here:
http://library.gnome.org/devel/
http://developer.gnome.org
Information about using git with GNOME can be found here:

View File

@@ -5,11 +5,9 @@ GTK+ requires the following packages:
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
the same location as GTK+. GTK+ @GTK_VERSION@ requires at least
GLib @GLIB_REQUIRED_VERSION@, Pango @PANGO_REQUIRED_VERSION@,
GdkPixbuf @GDK_PIXBUF_REQUIRED_VERSION@, ATK @ATK_REQUIRED_VERSION@
and cairo @CAIRO_REQUIRED_VERSION@.
GLib 2.23.6, Pango 1.20, GdkPixbuf 2.21.0 ATK 1.29.2 and cairo 1.6.0.
- gobject-introspection 0.9.3 or newer.
- gobject-introspection 0.6.7 or newer.
Simple install procedure
========================
@@ -31,4 +29,5 @@ in the file:
Or online at:
http://library.gnome.org/devel/gtk/stable/gtk-building.html
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html

View File

@@ -1,13 +1,12 @@
## Makefile.am for GTK+
include $(top_srcdir)/Makefile.decl
SRC_SUBDIRS = gdk gtk modules demos tests perf examples
SRC_SUBDIRS = gdk gtk modules demos tests perf
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
EXTRA_DIST += \
autogen.sh \
HACKING \
makecopyright \
NEWS.pre-1-0 \
@@ -31,8 +30,82 @@ EXTRA_DIST += \
gtk-zip.sh.in \
sanitize-la.sh \
po/README.translators \
po/po2tbl.sed.in
po/po2tbl.sed.in \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
examples/Makefile \
examples/README.1ST \
examples/extract.awk \
examples/extract.sh \
examples/arrow/Makefile \
examples/arrow/arrow.c \
examples/base/Makefile \
examples/base/base.c \
examples/buttonbox/Makefile \
examples/buttonbox/buttonbox.c \
examples/buttons/Makefile \
examples/buttons/buttons.c \
examples/buttons/info.xpm \
examples/calendar/Makefile \
examples/calendar/calendar.c \
examples/entry/Makefile \
examples/entry/entry.c \
examples/eventbox/Makefile \
examples/eventbox/eventbox.c \
examples/gtkdial/Makefile \
examples/gtkdial/dial_test.c \
examples/gtkdial/gtkdial.c \
examples/gtkdial/gtkdial.h \
examples/helloworld/Makefile \
examples/helloworld/helloworld.c \
examples/helloworld2/Makefile \
examples/helloworld2/helloworld2.c \
examples/label/Makefile \
examples/label/label.c \
examples/menu/Makefile \
examples/menu/menu.c \
examples/notebook/Makefile \
examples/notebook/notebook.c \
examples/packbox/Makefile \
examples/packbox/packbox.c \
examples/paned/Makefile \
examples/paned/paned.c \
examples/pixmap/Makefile \
examples/pixmap/pixmap.c \
examples/progressbar/Makefile \
examples/progressbar/progressbar.c \
examples/radiobuttons/Makefile \
examples/radiobuttons/radiobuttons.c \
examples/rangewidgets/Makefile \
examples/rangewidgets/rangewidgets.c \
examples/rulers/Makefile \
examples/rulers/rulers.c \
examples/scribble-simple/Makefile \
examples/scribble-simple/scribble-simple.c \
examples/scribble-xinput/Makefile \
examples/scribble-xinput/scribble-xinput.c \
examples/scrolledwin/Makefile \
examples/scrolledwin/scrolledwin.c \
examples/selection/Makefile \
examples/selection/gettargets.c \
examples/selection/setselection.c \
examples/statusbar/Makefile \
examples/statusbar/statusbar.c \
examples/table/Makefile \
examples/table/table.c \
examples/tictactoe/Makefile \
examples/tictactoe/tictactoe.c \
examples/tictactoe/tictactoe.h \
examples/tictactoe/ttt_test.c \
examples/wheelbarrow/Makefile \
examples/wheelbarrow/wheelbarrow.c \
examples/fixed/fixed.c \
examples/fixed/Makefile \
examples/frame/frame.c \
examples/frame/Makefile \
examples/spinbutton/spinbutton.c \
examples/spinbutton/Makefile \
examples/find-examples.sh
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/README \
@@ -54,39 +127,40 @@ MAINTAINERCLEANFILES = \
$(srcdir)/ChangeLog \
`find "$(srcdir)" -type f -name Makefile.in -print`
GDKTARGET=@gdktarget@
## Copy .pc files to target-specific names
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 $@
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
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 $@
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
gtk+-*-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
rm -f $@ && \
cp gtk+-3.0-uninstalled.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
pkgconfigdir = $(libdir)/pkgconfig
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}
pkgconfig_DATA = gdk-$(GDKTARGET)-3.0.pc gtk+-$(GDKTARGET)-3.0.pc gail-3.0.pc
if OS_UNIX
pkgconfig_DATA += gtk+-unix-print-3.0.pc
endif
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 \
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 \
config.lt
distclean-local:
@@ -95,7 +169,8 @@ distclean-local:
fi
ChangeLog:
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
@echo Creating $@
@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; \
@@ -107,7 +182,20 @@ 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:

View File

@@ -17,15 +17,9 @@ 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 = \
false
else
SKIP_GDKTARGET = \
echo "Gtk+Tests:INFO: Skipping GUI tests for non-X11 target."
endif
test "$(gdktarget)" != "x11" \
&& echo "Gtk+Tests:INFO: Skipping GUI tests for non-X11 target."
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` \

549
NEWS
View File

@@ -1,552 +1,3 @@
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
==============================================
* GtkSwitch: a new widget that provides switch-like on/off functionality
* Deprecations and cleanups:
- GtkCallbackMarshal and GtkFunction have been deprecated
- gtk_init_add has been removed
- The ::size-request signal has been removed
- GtkRuler has been removed
* The default value for the GtkBox::fill property has been changed
back to TRUE
* Bugs fixed:
613942 Deprecate GtkRuler, GtkVruler and GtkHRuler
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
633324 Stop invoking size-request completely
633896 Printing: Use XDG_DOCUMENTS_DIR as the default location...
634474 infinite loop in gtk_icon_view_accessible_set_adjustment
634558 Selecting "Search" should focus text box for keyboard entry
634592 GtkNotebook doesn't expand (in a typical GtkDialog)
634697 gdk: Add XSetting for "gtk-cursor-blink-timeout"
634821 Fix a BadMatch when create an icon pixmap for an ARGB visual
634987 add a switch widget
635175 Leak in gtk_plug_realize
635253 GtkRadioButton constructors don't mark group as "allow-none"
635307 iconcache: Ensure we don't lose data on power loss
635380 gdk_event_apply_filters is unsafe against changes in filter list
635588 clicking URL to be opened freezes the application for 3-5 seconds
635693 Bad pointer grab bug with GtkMenu/GtkComboBox
635879 Change the gdk_rgba_parse() function to be usable from bindings
* Updated translations:
Arabic
British English
Catalan
Czech
German
Hungarian
Indonesian
Norwegian bokmål
Romanian
Thai
Uyghur
Overview of Changes from GTK+ 2.91.3 to 2.91.4
==============================================
* Bugs fixed:
609622 disappearing statusicon
631331 window icons don't work anymore
632894 Only show Desktop in file chooser button if there is one
633670 Child minimum/natural size is not respected by GtkScrolledWindow
633762 Correctly convert colors to CSS and deal with librsvg limitations
633915 gtk_button_box_child_requisition() mishandles size allocations
634060 Support for GIcon pixbufs
634338 Move GtkPaned documentation to inline comments
634339 Move GtkProgressBar documentation to inline comments
634340 Move GtkPageSetup documentation to inline comments
* Translation updates
Japanese
Estonian
Overview of Changes from GTK+ 2.91.2 to 2.91.3
==============================================
* The scrollable interface has gained some extra properties
to influence scrolling behaviour: [hv]scroll-policy
* The size_request vfunc and signal have been deprecated and
are no longer used inside GTK+ itself
* GtkAssistant has added a custom page type that gives full
control of button visibility
* The homogeneous parameter has been removed from gtk_box_new
* Bugs fixed:
61852 GtkTextBuffer needs a case insensitive search
576498 GtkAssistant seals members without adding accessors
612611 auto-mnemonics breaks menu scrolling
633050 need gtk_combo_box_new_with_model_and_entry
633216 Make gdk_rgba_to_string() take a const GdkRGBA
633274 Add error trap around call to XFixesChangeSaveSet()
633374 Port tests to GtkScrollable API...
633500 statusbar labels behind resize grip on startup
* Updated translations:
Catalan (Valencian)
Estonian
Galician
Hebrew
Overview of Changes from GTK+ 2.91.1 to 2.91.2
==============================================
* GtkApplication has been rewritten. It mostly relies on GApplication
API now. Remaining functions include gtk_application_new() and
gtk_window_set_application()
* A GtkScrollable interface has been added and implemented by all
scrollable widgets. GtkScrolledWindow has ::min-display-width/height
properties to control the minimal size of the content area.
* GtkComboBox changes:
- Popups can be wider than the combo box itself
- The deprecated GtkComboBoxEntry subclass has been removed
- The deprecated combo box text convenience API has been removed
* GtkRecentManager changes:
- Store xbel file in XDG_USER_DATA
- Add gtk_recent_info_create_app_info()
- Add gtk_recent_info_get_gicon()
- Coalesce multiple changes
* GtkIconView allows tree models (ignoring anything below the root level)
* GtkProgressBar, GtkSpinButton, GtkEntry and GtkCalendar no longer have
their own input-output window
* gtk_widget_hide_all() has been removed
* GtkGrid: A legacy-free, height-for-width grid container
* GDK gained a GdkRGBA color struct containing 4 doubles, and various
GdkColor APIs have GdkRGBA counterparts now.
* Bugs fixed:
324899 GtkComboBoxText needs API to remove all items
438318 Deprecate and remove hide_all()
524304 Use XDG_USER_DATA to store the recent files
617174 gtkrecentinfo & GIcon
632381 gtk_combo_box_text_new_with_entry() adds two text cell renderers
632538 Move setting property registration in gtksettings.c
632539 Do not install gtkprivate.h
632677 restore copyright header
632736 change the window class of entry from INPUT_OUTPUT to INPUT_ONLY
632936 gtkcellrenderer gdkrgba changes not correct
* Translation updates:
Arabic
Galician
Hebrew
Japanese
Norwegian bokmål
Spanish
Telugu
Overview of Changes from GTK+ 2.91.0 to 2.91.1
==============================================
* GTK+ can now add a resize grip to any window. The resize
grip functionality in GtkStatusbar has been removed.
* A very old bug in the handling of geometry widgets has
been fixed, and a way to set geometry in terms of the
geometry widget has been added: gtk_window_resize_to_geometry()
* The GtkFileChooser now uses GSettings to store its settings
instead of the keyfile ~/.config/gtk-2.0/gtkfilechooser.ini
* GtkWrapBox has been dropped from GTK+ again. The widget
will be available in libegg until clear use cases have
been established.
* GtkWidget now has horizontal and vertical expand flags, in
the form of ::hexpand and ::vexpand properties. These flags
are intended to obsolete most custom container-specific
expand child properties, over time.
Expandability is inherited up the widget hierarchy.
* GtkComboBoxEntry has been deprecated in favor of a
::has-entry property on GtkComboBox.
* The GtkComboBox text convenience API (gtk_combo_box_new_text(), etc)
has been deprecated in favor of a new GtkComboBoxText class.
* GtkLinkButton has gained a ::activate-link signal that
can be used to suppress the default behavior.
* The very outdated tutorial has been dropped from the GTK+ distribution,
and a new 'Getting started' section has been added to the API
documentation that will accumulate tutorial material over time.
* Bugs fixed:
68668 Fix handling of geometry widget
313350 Return type of gtk_accelerator_get_default_mod_mask...
351247 GtkScrolledWindow is mis documented
423201 gtk_combo_box_entry_active_changed does not transform...
563002 Doesn't call 'update-preview' on set_filename
612396 Implement GtkComboBoxText subclass to supersede "text"...
613728 Rationalize GtkTreeView focus
628902 use expand flags to determine window resizability
629722 save_entry_get_info_cb() doesn't behave correctly
629778 Scrolled window does not behave properly with height-for...
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
630850 Use GSettings for the filechooser settings
630900 GtkCellRendererClass: unify const of GdkRectangle args
631203 Scrolling in GtkTextView can use 100% cpu
631311 Obvious fix for nasty crash in menu code
631473 Fix GTK+3 documentation
631475 Two old GDK_foo key macros left in gdk/quartz/gdkkeys-quartz.c
631599 Allow to use arbitrary surfaces for offscreen windows
631719 Action-based menu accelerators don't synch with GtkMenuItem
631794 Warn when calling gtk_window_parse_geometry() on an empty...
631976 Remove GtkWidgetAuxInfo from GtkScrolledWindow
632059 Move the introduction of the tutorial in the reference
632095 GtkTargetEntry: Add boxed type and constructor
632140 optionally take hotspot coordinates from the pixbuf...
632218 BadMatch when starting gnome-shell
* New or updated translations:
Catalan
Estonian
Galician
Greek
Kazakh
Kikongo
Lithuanian
Punjabi
Slovenian
Spanish
Overview of Changes from GTK+ 2.90.7 to 2.91.0
==============================================
* The rendering cleanup work has landed. This is a large change that
affects many APIs.
- All gtkstyle functions have been changed to take a cairo_t argument
instead of a window + area.
- GdkPixmap is gone. APIs that took pixmaps are being replaced by ones
that take pixbufs or cairo surfaces, or regions (where pixmaps were
used as masks). In background handling, pixmaps have been replaced
by cairo patterns, see gdk_window_set_background_pattern().
- GdkColormap is gone. It is replaced by visuals, see
gtk_widget_set_visual().
- The ::expose-event signal on GtkWidget has been replaced by a
::draw signal.
- gtk_widget_get_snapshot() has been removed. Instead, gtk_widget_draw()
can render a widget onto an cairo_t.
* The GtkSizeRequest interface has been merged into GtkWidget, and
GtkCellSizeRequest has been merged into GtkCellRenderer. The wrapper
functions have been renamed to include 'preferred', e.g
gtk_size_request_get_width() is now gtk_widget_get_preferred_width()
and gtk_cell_size_request_get_width_for_height() is now
gtk_cell_renderer_get_preferred_width_for_height().
* GtkObject has been removed. The ::destroy signal has been moved
to GtkWidget. At the same time, GtkWidgetFlags have been removed,
they already had getters and setters anyway.
* GtkWidget has gained generic alignment and padding properties:
halign, valign, margin-left, margin-right, margin-top, margin-bottom
These can be used instead of container-specific child properties or
GtkMisc and GtkAlignment widgets.
* Container widgets can now let GTK+ handle border-width for them, using
gtk_container_class_handle_border_width()
* The GtkEditableClass struct has been renamed to GtkEditableInterface
* Mouse wheel scrolling has been removed from GtkNotebook
* The default policy for scrolled windows has been changed to 'automatic'
* Global url hooks have been removed from GtkAboutDialog and GtkLinkButton
* The global window creation hook has been removed from GtkNotebook
* The error handling in GDK has been modernized and avoids synchronizing
X requests as much as possible
* Fixed Bugs:
323904 GtkEditable header is slightly incorrect
339745 Return value of gtk_link_button_set_uri_hook not usable
468672 GTK_POLICY_AUTOMATIC should be the default policy...
486839 Filechooser 'Places' items should not move up and down...
601731 Drag and Drop from Workspace to Activities Overview
617316 Move documentation to inline comments: GtkEditable
621590 Add length to gtk_tree_path_get_indices
623664 Missing accessors for gtk_menu_get_position_func{,_data}
628829 Chain get_width_for_height default impl to vfunc...
629177 Do not use deprecated gtk_widget_get_child_requisition()
629277 Hanging because do_syntheszie_crossing_event is called...
629387 Use gint16 for GtkBorder
629598 Do not use deprecated gtk_widget_size_request()
629608 Revamp and modernize X error traps
629733 There is a misprint in the description of the gtk_check_...
629748 Fails to build without XComposite
629785 Do not use deprecated gtk_cell_renderer_get_size()
630033 Improve tests for X error traps, fix two bugs
630226 Removing tab scrolling from GtkNotebook
630520 Don't try to unref event->dnd.context unconditionally...
630521 Remove some remaining API warts from tab dnd api
630532 invalid drop point in drag-data-received callback
Updated translations:
Catalan
Czech
Danish
Dutch
German
Gujarati
Japanese
Simplified Chinese
Overview of Changes from GTK+ 2.90.6 to 2.90.7
==============================================

View File

@@ -254,7 +254,7 @@ Release notes for 2.10
GTK_OBJECT_IS_FLOATING() will still work, but direct checking
of the GTK_FLOATING flag will no longer detect the floating
reference. Details about floating references can be found in the docs:
http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#floating-ref
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
* Accelerators like (_F) are now stripped from labels when they are
displayed in toolbars. If this is not wanted, the feature can be

View File

@@ -85,7 +85,7 @@ LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
LIBS=-lintl \
CFLAGS=-O2 \
./configure \
--enable-win32-backend \
--with-gdktarget=win32 \
--disable-gdiplus \
--with-included-immodules \
--without-libjasper \

View File

@@ -1,32 +1,129 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
olddir=`pwd`
cd "$srcdir"
ORIGDIR=`pwd`
cd $srcdir
PROJECT=Gtk+
TEST_TYPE=-d
FILE=gdk
GTKDOCIZE=`which gtkdocize`
if test -z $GTKDOCIZE; then
echo "*** No GTK-Doc found, please install it ***"
exit 1
else
gtkdocize || exit $?
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.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
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
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
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please install it ***"
exit 1
else
autoreconf --force --install --verbose || exit $?
fi
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
cd "$olddir"
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
libtoolize --force || exit $?
gtkdocize || 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."
fi

View File

@@ -4,6 +4,9 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk+.vsprops \
gdk-pixbuf.vcproj \
gdk-pixbuf-csource.vcproj \
gdk-pixbuf-query-loaders.vcproj \
gdk-win32.vcproj \
gdk.vcproj \
gdk.vcprojin \

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="gdk-pixbuf-csource"
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}"
RootNamespace="gdkpixbufcsource"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-csource.c" />
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gdk-pixbuf-query-loaders"
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}"
RootNamespace="gdkpixbufqueryloaders"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;$(GtkPrefixDefine);$(GdkPixbufLibdirDefine)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gdk-pixbuf\queryloaders.c" />
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gdk_pixbuf"
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}"
RootNamespace="gdk_pixbuf"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;$(GdkPixbufDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libpng.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="$(GdkPixbufDefines)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libpng.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;$(GdkPixbufDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libpng.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="$(GdkPixbufDefines)"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libpng.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf.symbols"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating gdk-pixbuf.def"
CommandLine="$(GtkGenerateGdkPixbufDef)"
Outputs="$(IntDir)\gdk-pixbuf.def"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating gdk-pixbuf.def"
CommandLine="$(GtkGenerateGdkPixbufDef)"
Outputs="$(IntDir)\gdk-pixbuf.def"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating gdk-pixbuf.def"
CommandLine="$(GtkGenerateGdkPixbufDef)"
Outputs="$(IntDir)\gdk-pixbuf.def"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating gdk-pixbuf.def"
CommandLine="$(GtkGenerateGdkPixbufDef)"
Outputs="$(IntDir)\gdk-pixbuf.def"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-aliasdef.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-animation.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-data.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-enum-types.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-io.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-loader.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-scale.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-scaled-anim.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-simple-anim.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-util.c" />
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixdata.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-ani.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-ani-animation.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-utils.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-animation.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-bmp.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-emf.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-gif.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-ico.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-jpeg.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-tiff.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-wmf.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-gif-animation.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-icns.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-pcx.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-png.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-pnm.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-ras.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-tga.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-wbmp.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-xbm.c" />
<File RelativePath="..\..\..\gdk-pixbuf\io-xpm.c" />
<File RelativePath="..\..\..\gdk-pixbuf\pixops\pixops.c" />
</Filter>
</Files>
</VisualStudioProject>

View File

@@ -72,7 +72,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
AdditionalDependencies="cairo.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -107,7 +107,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
AdditionalDependencies="cairo.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -137,7 +137,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib imm32.lib"
AdditionalDependencies="cairo.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
LinkIncremental="2"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -208,7 +208,6 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gdk\win32\rc\gdk.rc" />
</Filter>
<Filter
Name="Source Files"

View File

@@ -1,25 +1,43 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf", "gdk-pixbuf.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-csource", "gdk-pixbuf-csource.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-query-loaders", "gdk-pixbuf-query-loaders.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-win32", "gdk-win32.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-demo", "gtk-demo.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}
@@ -33,6 +51,30 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|x64.ActiveCfg = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|x64.Build.0 = Debug|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|Win32.ActiveCfg = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|x64.ActiveCfg = Debug|x64

View File

@@ -14,7 +14,7 @@
/>
<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="gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
/>
<Tool
@@ -45,6 +45,18 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
Name="GtkPrefixDefine"
Value="GTK_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;"
/>
<UserMacro
Name="GdkPixbufIncludedLoaderDefines"
Value="INCLUDE_ani;INCLUDE_icns;INCLUDE_pcx;INCLUDE_ras;INCLUDE_tga;INCLUDE_png;INCLUDE_pnm;INCLUDE_wbmp;INCLUDE_xbm;INCLUDE_xpm;INCLUDE_gdiplus"
/>
<UserMacro
Name="GdkPixbufDefines"
Value="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;$(GtkPrefixDefine);$(GdkPixbufIncludedLoaderDefines)"
/>
<UserMacro
Name="GdkPixbufLibdirDefine"
Value="PIXBUF_LIBDIR=\&quot;$(GtkDummyPrefix)/lib/gtk-$(GtkApiVersion)/$(GtkBinaryVersion)/loaders\&quot;"
/>
<UserMacro
Name="GdkDefines"
Value="GDK_COMPILATION;G_LOG_DOMAIN=\&quot;Gdk\&quot;"
@@ -63,48 +75,53 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
echo on&#x0D;&#x0A;
mkdir $(OutDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(OutDir)\bin&#x0D;&#x0A;
mkdir $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk3-demo&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin&#x0D;&#x0A;
mkdir $(OutDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib&#x0D;&#x0A;
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-animation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-core.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-enum-types.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-features.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-io.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-loader.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-marshal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-simple-anim.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf-transform.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
copy ..\..\..\gdk-pixbuf\gdk-pixdata.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk-pixbuf&#x0D;&#x0A;
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkapplaunchcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcairo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcolor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcursor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevice.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevicemanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdisplay.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdisplaymanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdrawable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkenumtypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkfont.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdki18n.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkinput.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpango.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkproperty.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrectangle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrgba.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkregion.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrgb.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkscreen.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkspawn.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkthreads.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdktypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkvisual.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
@@ -114,7 +131,6 @@ mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaboutdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelgroupprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccellabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccessible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -123,7 +139,6 @@ copy ..\..\..\gtk\gtkactiongroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x
copy ..\..\..\gtk\gtkactivatable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkadjustment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkalignment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplication.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkarrow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaspectframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkassistant.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -143,19 +158,22 @@ copy ..\..\..\gtk\gtkcellrenderercombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererprogress.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspin.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcheckbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcheckmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkclipboard.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkclist.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorseldialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcombobox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcomboboxtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcomboboxentry.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcontainer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkctree.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcurve.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdebug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -172,11 +190,13 @@ copy ..\..\..\gtk\gtkfilechooserbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\
copy ..\..\..\gtk\gtkfilechooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilefilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilesel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfixed.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgrid.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgamma.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkhandlebox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkhbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkhbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -196,12 +216,18 @@ copy ..\..\..\gtk\gtkimcontextsimple.h $(OutDir)\include\gtk-$(GtkApiVersion)\gt
copy ..\..\..\gtk\gtkimmodule.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimmulticontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinfobar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinputdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinvisible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkitemfactory.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklinkbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklist.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklistitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkliststore.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmarshal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenubar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -212,17 +238,22 @@ copy ..\..\..\gtk\gtkmisc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0
copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknotebook.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoffscreenwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkobject.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoldeditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoptionmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkorientable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpagesetup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpapersize.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkplug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintoperationpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintsettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprogress.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprogressbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradioaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiobutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -240,7 +271,6 @@ copy ..\..\..\gtk\gtkrecentmanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&
copy ..\..\..\gtk\gtkruler.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscalebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrollable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrolledwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -249,11 +279,10 @@ copy ..\..\..\gtk\gtkseparatormenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\
copy ..\..\..\gtk\gtkseparatortoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkshow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksignal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizegroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizerequest.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksocket.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstock.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -261,6 +290,7 @@ copy ..\..\..\gtk\gtkstyle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x
copy ..\..\..\gtk\gtktable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktearoffmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextbuffer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextbufferrichtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextchild.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -271,17 +301,19 @@ copy ..\..\..\gtk\gtktextmark.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;
copy ..\..\..\gtk\gtktexttag.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktexttagtable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktipsquery.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoggleaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktogglebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitemgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolpalette.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolshell.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktooltip.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktooltips.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktree.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreednd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodelfilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodelsort.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
@@ -312,6 +344,10 @@ copy ..\..\..\gdk\gdkconfig.h $(OutDir)\lib\gtk-$(GtkApiVersion)\include&#x0D;&#
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib&#x0D;&#x0A;
"
/>
<UserMacro
Name="GtkGenerateGdkPixbufDef"
Value="echo EXPORTS &gt;&quot;$(IntDir)\gdk-pixbuf.def&quot; &amp;&amp; cl /EP -DG_OS_WIN32 -DINCLUDE_VARIABLES -DALL_FILES -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= ..\..\..\gdk-pixbuf\gdk-pixbuf.symbols &gt;&gt;&quot;$(IntDir)\gdk-pixbuf.def&quot;"
/>
<UserMacro
Name="GtkGenerateGdkDef"
Value="echo EXPORTS &gt;&quot;$(IntDir)\gdk.def&quot; &amp;&amp; cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols &gt;&gt;&quot;$(IntDir)\gdk.def&quot;"
@@ -334,17 +370,17 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\l
/>
<UserMacro
Name="GtkSeparateVS9DllSuffix"
Value="-3-vs9"
Value="-2-vs9"
/>
<!-- Change these two to GtkLibtoolCompatibleDllPrefix and
GtkLibtoolCompatibleDllSuffix if that is what you want -->
<UserMacro
Name="GtkDllPrefix"
Value="$(GtkSeparateVS9DllPrefix)"
Value="$(GtkLibtoolCompatibleDllPrefix)"
/>
<UserMacro
Name="GtkDllSuffix"
Value="$(GtkSeparateVS9DllSuffix)"
Value="$(GtkLibtoolCompatibleDllSuffix)"
/>
<UserMacro
Name="GlibEtcInstallRoot"

View File

@@ -76,10 +76,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
@@ -107,10 +106,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
@@ -140,10 +138,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="cairo.lib pango-1.0.lib pangocairo-1.0.lib"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"

View File

@@ -208,7 +208,6 @@
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
</Filter>
<Filter
Name="Source Files"

View File

@@ -276,6 +276,12 @@
/* Whether to load modules via .la files rather than directly */
/* #undef USE_LA_MODULES */
/* Define to 1 if medialib is available and should be used */
/* #undef USE_MEDIALIB */
/* Define to 1 if medialib 2.5 is available */
/* #undef USE_MEDIALIB25 */
/* Define to 1 if XXM is available and should be used */
#ifndef _MSC_VER
# define USE_MMX 1

View File

@@ -1,4 +1,6 @@
# Process this file with autoconf to produce a configure script.
# require autoconf 2.54
AC_PREREQ([2.62])
# Making releases:
# GTK_MICRO_VERSION += 1;
@@ -9,8 +11,8 @@
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [99])
m4_define([gtk_micro_version], [0])
m4_define([gtk_minor_version], [90])
m4_define([gtk_micro_version], [8])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -19,15 +21,6 @@ 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.62])
AC_INIT([gtk+], [gtk_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
# Define a string for the earliest version that this release has
# backwards binary compatibility with for all interfaces a module
# might. Unless we add module-only API with lower stability
@@ -38,33 +31,31 @@ 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.5])
m4_define([glib_required_version], [2.25.15])
m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.29.2])
m4_define([cairo_required_version], [1.10.0])
m4_define([cairo_required_version], [1.9.10])
m4_define([gdk_pixbuf_required_version], [2.21.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
CAIRO_REQUIRED_VERSION=cairo_required_version
GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
AC_SUBST(GLIB_REQUIRED_VERSION)
AC_SUBST(PANGO_REQUIRED_VERSION)
AC_SUBST(ATK_REQUIRED_VERSION)
AC_SUBST(CAIRO_REQUIRED_VERSION)
AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
AC_INIT([gtk+], [gtk_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
AM_INIT_AUTOMAKE([1.10 no-define -Wno-portability dist-bzip2])
AM_MAINTAINER_MODE([enable])
# Support silent build rules, requires at least automake-1.11. Disable
# by either passing --disable-silent-rules to configure or passing V=1
# Support silent build rules, requires at least automake-1.11. Enable
# by either passing --enable-silent-rules to configure or passing V=0
# to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
#
# For each of the libraries we build, we define the following
@@ -236,101 +227,46 @@ 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(shm,
[AC_HELP_STRING([--enable-shm],
[support shared memory if available [default=yes]])],,
[enable_shm="yes"])
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_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_WITH(xinput,
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
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])
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
enable_win32_backend=yes
else
enable_x11_backend=yes
fi
fi
cairo_backends=
backend_immodules=
GDK_BACKENDS=
GDK_EXTRA_LIBS=
GDK_EXTRA_CFLAGS=
GDK_WINDOWING=
GIO_PACKAGE=gio-2.0
PANGO_PACKAGES="pango pangocairo"
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
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"
if test "$platform_win32" = yes; then
gdktarget=win32
else
AM_CONDITIONAL(USE_WIN32, false)
gdktarget=x11
fi
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
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz]] select non-default GDK target],
gdktarget=$with_gdktarget)
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS/# }
AC_SUBST(gdktarget)
case $gdktarget in
x11|win32|quartz) ;;
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz or win32.]);;
esac
AC_SUBST(GDK_BACKENDS)
gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
if test -z "$GDK_BACKENDS"; then
AC_MSG_ERROR([No GDK backends selected.])
fi
AC_SUBST(gdktargetlib)
AC_SUBST(gtktargetlib)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
@@ -420,10 +356,20 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
atk >= atk_required_version dnl
pango >= pango_required_version dnl
cairo >= cairo_required_version dnl
cairo-gobject >= cairo_required_version dnl
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
## 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=$gdktarget
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
# backend names are identical.
if test "x$cairo_backend" = "xx11"; then
cairo_backend=xlib
fi
PKG_CHECK_MODULES(CAIRO_BACKEND,
[cairo-$cairo_backend >= cairo_required_version])
if test "$os_win32" != yes; then
# libtool option to control which symbols are exported
@@ -531,6 +477,18 @@ if test "$gtk_ok" = "yes"; then
[Define if _NL_PAPER_WIDTH is available])
fi
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
AC_TRY_LINK([#include <setjmp.h>], [
sigjmp_buf env;
sigsetjmp(env, 0);
], gtk_ok=yes, gtk_ok=no)
AC_MSG_RESULT($gtk_ok)
if test "$gtk_ok" = "yes"; then
AC_DEFINE(HAVE_SIGSETJMP, 1,
[Define to 1 if sigsetjmp is available])
fi
# i18n stuff
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AM_GLIB_GNU_GETTEXT
@@ -714,6 +672,53 @@ 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)
@@ -733,7 +738,6 @@ 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)
@@ -761,12 +765,10 @@ 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
@@ -783,8 +785,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,
AC_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...],
[build the specified input methods into gtk]))
[ --with-included-immodules=MODULE1,MODULE2,...
build the specified input methods into gtk])
if $dynworks; then
:
@@ -795,7 +797,14 @@ else
fi
fi
all_immodules="am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr$backend_immodules"
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
included_immodules=""
# If the switch specified without listing any specific ones, include all
@@ -855,6 +864,28 @@ AC_CHECK_HEADER(sys/sysinfo.h,
AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
[Define to 1 if sys/sysinfo.h is available]))
AC_MSG_CHECKING(for mediaLib 2.3)
use_mlib25=no
# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
# patch requires.
AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
if test $use_mlib = yes; then
AC_DEFINE(USE_MEDIALIB, 1,
[Define to 1 if medialib is available and should be used])
MEDIA_LIB=-lmlib
AC_MSG_CHECKING(for mediaLib 2.5)
# Check for a mediaLib 2.5 function since that is what is needed for
# gdk_rgb_convert integration.
AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
if test $use_mlib25 = yes; then
AC_DEFINE(USE_MEDIALIB25, 1,
[Define to 1 if medialib 2.5 is available])
fi
fi
AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
@@ -880,12 +911,14 @@ 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$enable_x11_backend" == xyes; then
if test "x$gdktarget" = "xx11"; then
X_PACKAGES=fontconfig
#
@@ -983,13 +1016,10 @@ if test "x$enable_x11_backend" == xyes; then
# Check for XKB support.
if test "x$enable_xkb" = "xyes"; then
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.]))
AC_MSG_WARN(XKB support explicitly enabled)
AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
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)
@@ -1011,23 +1041,67 @@ if test "x$enable_x11_backend" == xyes; then
CFLAGS="$gtk_save_CFLAGS"
if test "x$enable_xinerama" != "xno"; then
# Check for Xinerama extension (Solaris impl or Xfree impl)
have_xfree_xinerama=false
have_solaris_xinerama=false
# Xshm checks
if test "x$enable_shm" = "xyes"; then
# Check for the XShm extension, normally in Xext
AC_CHECK_FUNC(XShmAttach,
:,
# On AIX, it is in XextSam instead
[AC_CHECK_LIB(XextSam, XShmAttach,
[GTK_ADD_LIB(x_extra_libs,XextSam)])])
fi
if test "x$enable_shm" = "xyes"; then
# Check for shared memory
AC_CHECK_HEADER(sys/ipc.h,
AC_DEFINE(HAVE_IPC_H, 1,
[Define to 1 if ipc.h is available]),
no_sys_ipc=yes)
AC_CHECK_HEADER(sys/shm.h,
AC_DEFINE(HAVE_SHM_H, 1,
[Define to 1 if shm.h is available]),
no_sys_shm=yes)
# Check for the X shared memory extension header file
have_xshm=no
AC_MSG_CHECKING(X11/extensions/XShm.h)
if test "x$no_xext_lib" = "xyes"; then
:
else
gtk_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $x_cflags"
AC_TRY_COMPILE([
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/XShm.h>
], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
CFLAGS="$gtk_save_CFLAGS"
fi
AC_MSG_RESULT($have_xshm)
if test $have_xshm = yes ; then
AC_DEFINE(HAVE_XSHM_H, 1,
[Define to 1 if xshm.h is available])
fi
fi
if test "x$enable_xinerama" = "xyes"; then
# Check for Xinerama extension (Solaris impl or Xfree impl)
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
# Check for XFree
AC_MSG_CHECKING(for Xinerama packages)
AC_MSG_CHECKING(for Xinerama support on XFree86)
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)
@@ -1036,12 +1110,14 @@ if test "x$enable_x11_backend" == xyes; 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
@@ -1054,7 +1130,6 @@ if test "x$enable_x11_backend" == xyes; 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,
@@ -1069,14 +1144,9 @@ if test "x$enable_x11_backend" == xyes; 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$enable_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
if test "x$with_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
have_xinput=yes
AC_DEFINE(XINPUT_XFREE, 1,
@@ -1085,11 +1155,7 @@ if test "x$enable_x11_backend" == xyes; then
X_PACKAGES="$X_PACKAGES xi"
AC_CHECK_HEADER(X11/extensions/XInput2.h,
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")
have_xinput2=yes; AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]))
else
AC_DEFINE(XINPUT_NONE, 1,
[Define to 1 if no XInput should be used])
@@ -1098,18 +1164,11 @@ if test "x$enable_x11_backend" == xyes; then
AM_CONDITIONAL(XINPUT_XFREE, test "x$have_xinput" = "xyes")
AM_CONDITIONAL(XINPUT_2, test "x$have_xinput2" = "xyes")
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
# Check for the RANDR extension
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"
fi
# Checks for Xcursor library
@@ -1126,7 +1185,6 @@ if test "x$enable_x11_backend" == xyes; then
AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
X_PACKAGES="$X_PACKAGES xfixes"
X_EXTENSIONS="$X_EXTENSIONS XFIXES"
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
fi
@@ -1136,7 +1194,6 @@ if test "x$enable_x11_backend" == xyes; then
AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
X_PACKAGES="$X_PACKAGES xcomposite"
X_EXTENSIONS="$X_EXTENSIONS Composite"
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
fi
@@ -1146,7 +1203,6 @@ if test "x$enable_x11_backend" == xyes; then
AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
X_PACKAGES="$X_PACKAGES xdamage"
X_EXTENSIONS="$X_EXTENSIONS DAMAGE"
GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
fi
@@ -1160,10 +1216,6 @@ if test "x$enable_x11_backend" == xyes; then
LIBS="$gtk_save_libs"
AM_CONDITIONAL(USE_X11, true)
# strip leading space
X_EXTENSIONS=${X_EXTENSIONS/# }
else
XPACKAGES=
@@ -1173,8 +1225,28 @@ 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
# 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`
@@ -1204,7 +1276,12 @@ fi
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
if test "x$gdktarget" = "xx11"; then
GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
else
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
fi
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"
@@ -1213,7 +1290,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 cairo-gobject"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0"
GDK_EXTRA_LIBS=
fi
@@ -1253,8 +1330,8 @@ else
LIBS="$gtk_save_LIBS"
fi
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
if test "x$enable_x11_backend" == xyes; then
GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
if test "x$gdktarget" = "xx11"; then
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
fi
GTK_EXTRA_LIBS=
@@ -1323,10 +1400,8 @@ 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])
@@ -1363,7 +1438,6 @@ 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"
@@ -1387,7 +1461,7 @@ fi
#
AC_ARG_ENABLE(papi,
[AC_HELP_STRING([--disable-papi],
[AC_HELP_STRING([--disable-papi]
[disable papi print backend])],,
[enable_papi=auto])
@@ -1397,7 +1471,6 @@ 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)
@@ -1423,7 +1496,7 @@ if test "$os_win32" != "yes"; then
*** postscript backend enabled.]))
AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
*** Cannot find cairo-svg.h. You must build Cairo with the
*** Can't find cairo-svg.h. You must build Cairo with the
*** svg backend enabled.]))
fi
@@ -1434,9 +1507,6 @@ 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")
@@ -1460,35 +1530,11 @@ if test -n "$export_dynamic"; then
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
fi
#############
# GSettings #
#############
GLIB_GSETTINGS
##################################################
# GObject introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.9.3])
##################################################
# Packagekit module
#################################################
AC_ARG_ENABLE(packagekit,
AC_HELP_STRING([--disable-packagekit],
[build packagekit open-with module]))
build_packagekit=no
if test "os_win32" != "yes"; then
if test "x$enable_packagekit" != "xno"; then
build_packagekit=yes
AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable packagekit])
fi
fi
AM_CONDITIONAL(ENABLE_PACKAGEKIT, test "x$build_packagekit" = "xyes")
GOBJECT_INTROSPECTION_CHECK([0.9.5])
##################################################
# Checks for gtk-doc and docbook-tools
@@ -1535,28 +1581,36 @@ 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
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <glib.h>
G_BEGIN_DECLS
#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 */
_______EOF
cat >>$outfile <<_______EOF
$gdk_windowing
$gdk_wc
_______EOF
cat >>$outfile <<_______EOF
G_END_DECLS
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GDKCONFIG_H__ */
#endif /* GDKCONFIG_H */
_______EOF
@@ -1567,7 +1621,31 @@ _______EOF
mv $outfile gdk/gdkconfig.h
fi
],[
gdk_windowing='$GDK_WINDOWING'
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'
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
])
dnl
@@ -1587,7 +1665,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)
@@ -1600,6 +1678,7 @@ 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
@@ -1608,7 +1687,6 @@ po-properties/Makefile.in
demos/Makefile
demos/gtk-demo/Makefile
demos/gtk-demo/geninclude.pl
examples/Makefile
tests/Makefile
docs/Makefile
docs/reference/Makefile
@@ -1617,8 +1695,9 @@ 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/faq/Makefile
docs/tools/Makefile
docs/tutorial/Makefile
build/Makefile
build/win32/Makefile
build/win32/vs9/Makefile
@@ -1657,19 +1736,5 @@ perf/Makefile
AC_OUTPUT
# 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"
echo "configuration:
target: $gdktarget"

View File

@@ -11,13 +11,14 @@ INCLUDES = \
$(GTK_DEBUG_FLAGS) \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gtk/libgtk-3.0.la
DEPS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
LDADDS = \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
LDADDS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS) \
$(MATH_LIB)
noinst_PROGRAMS = \

View File

@@ -55,12 +55,13 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gtk/libgtk-3.0.la
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
LDADDS = \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS) \
-lm
bin_PROGRAMS = gtk3-demo

View File

@@ -67,6 +67,25 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
}
}
static void
activate_email (GtkAboutDialog *about,
const gchar *link,
gpointer data)
{
gchar *text;
text = g_strdup_printf ("send mail to %s", link);
g_print ("%s\n", text);
g_free (text);
}
static void
activate_url (GtkAboutDialog *about,
const gchar *link,
gpointer data)
{
g_print ("show url %s\n", link);
}
static void
about_cb (GtkAction *action,
GtkWidget *window)
@@ -101,6 +120,8 @@ about_cb (GtkAction *action,
g_object_unref (pixbuf);
}
gtk_about_dialog_set_email_hook (activate_email, NULL, NULL);
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
@@ -384,6 +405,23 @@ mark_set_callback (GtkTextBuffer *buffer,
update_statusbar (buffer, GTK_STATUSBAR (data));
}
static void
update_resize_grip (GtkWidget *widget,
GdkEventWindowState *event,
GtkStatusbar *statusbar)
{
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
GDK_WINDOW_STATE_FULLSCREEN))
{
gboolean maximized;
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
GDK_WINDOW_STATE_FULLSCREEN);
gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
}
}
GtkWidget *
do_appwindow (GtkWidget *do_widget)
{
@@ -552,6 +590,12 @@ do_appwindow (GtkWidget *do_widget)
statusbar,
0);
g_signal_connect_object (window,
"window_state_event",
G_CALLBACK (update_resize_grip),
statusbar,
0);
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
}

View File

@@ -94,7 +94,7 @@ create_page1 (GtkWidget *assistant)
GtkWidget *box, *label, *entry;
GdkPixbuf *pixbuf;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
box = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
label = gtk_label_new ("You must fill out this entry to continue:");
@@ -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_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
g_object_unref (pixbuf);
}
@@ -121,7 +121,7 @@ create_page2 (GtkWidget *assistant)
GtkWidget *box, *checkbutton;
GdkPixbuf *pixbuf;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
box = gtk_vbox_new (12, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
@@ -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_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
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_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, pixbuf);
g_object_unref (pixbuf);
}

View File

@@ -18,9 +18,9 @@ create_bbox (gint horizontal,
frame = gtk_frame_new (title);
if (horizontal)
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
bbox = gtk_hbutton_box_new ();
else
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
bbox = gtk_vbutton_box_new ();
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
gtk_container_add (GTK_CONTAINER (frame), bbox);
@@ -63,13 +63,13 @@ do_button_box (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
main_vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), main_vbox);
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
@@ -92,7 +92,7 @@ do_button_box (GtkWidget *do_widget)
frame_vert = gtk_frame_new ("Vertical Button Boxes");
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);

View File

@@ -27,9 +27,6 @@
* - Using GtkDialog
*/
#include <string.h>
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "demo-common.h"
@@ -154,7 +151,7 @@ query_for_toplevel (GdkScreen *screen,
toplevel = NULL;
}
g_object_unref (cursor);
gdk_cursor_unref (cursor);
gtk_widget_destroy (popup);
gdk_flush (); /* Really release the grab */
@@ -360,7 +357,7 @@ create_frame (ChangeDisplayInfo *info,
*frame = gtk_frame_new (title);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_container_add (GTK_CONTAINER (*frame), hbox);
@@ -378,7 +375,7 @@ create_frame (ChangeDisplayInfo *info,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
*button_vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
if (!info->size_group)
@@ -588,7 +585,7 @@ destroy_info (ChangeDisplayInfo *info)
}
static void
destroy_cb (GObject *object,
destroy_cb (GtkObject *object,
ChangeDisplayInfo **info)
{
destroy_info (*info);
@@ -627,7 +624,7 @@ do_changedisplay (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);

View File

@@ -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_pixbuf (GTK_WIDGET (image),
stock_id, size);
return gtk_widget_render_icon (GTK_WIDGET (image),
stock_id, size, NULL);
default:
g_warning ("Image storage type %d not handled",
gtk_image_get_storage_type (image));
@@ -125,7 +125,7 @@ drag_data_received (GtkWidget *widget,
{
GdkPixbuf *pixbuf;
if (gtk_selection_data_get_length (selection_data) > 0)
if (selection_data->length > 0)
{
pixbuf = gtk_selection_data_get_pixbuf (selection_data);
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
@@ -210,7 +210,7 @@ do_clipboard (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -219,7 +219,7 @@ do_clipboard (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
@@ -236,7 +236,7 @@ do_clipboard (GtkWidget *do_widget)
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
@@ -253,7 +253,7 @@ do_clipboard (GtkWidget *do_widget)
label = gtk_label_new ("Images can be transferred via the clipboard, too");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);

View File

@@ -9,37 +9,47 @@
static GtkWidget *window = NULL;
static GtkWidget *da;
static GdkRGBA color;
static GdkColor color;
static GtkWidget *frame;
/* draw callback for the drawing area
/* Expose callback for the drawing area
*/
static gboolean
draw_callback (GtkWidget *widget,
cairo_t *cr,
gpointer data)
expose_event_callback (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
GtkStyleContext *context;
GdkRGBA *bg;
GdkWindow *window;
context = gtk_widget_get_style_context (widget);
gtk_style_context_get (context, 0, "background-color", &bg, NULL);
gdk_cairo_set_source_rgba (cr, bg);
cairo_paint (cr);
gdk_rgba_free (bg);
window = gtk_widget_get_window (widget);
if (window)
{
GtkStyle *style;
cairo_t *cr;
style = gtk_widget_get_style (widget);
cr = gdk_cairo_create (window);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
}
return TRUE;
}
static void
change_color_callback (GtkWidget *button,
gpointer data)
gpointer data)
{
GtkWidget *dialog;
GtkColorSelection *colorsel;
GtkColorSelectionDialog *selection_dialog;
gint response;
dialog = gtk_color_selection_dialog_new ("Changing color");
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
@@ -47,19 +57,20 @@ change_color_callback (GtkWidget *button,
selection_dialog = GTK_COLOR_SELECTION_DIALOG (dialog);
colorsel = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (selection_dialog));
gtk_color_selection_set_previous_rgba (colorsel, &color);
gtk_color_selection_set_current_rgba (colorsel, &color);
gtk_color_selection_set_previous_color (colorsel, &color);
gtk_color_selection_set_current_color (colorsel, &color);
gtk_color_selection_set_has_palette (colorsel, TRUE);
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (response == GTK_RESPONSE_OK)
{
gtk_color_selection_get_current_rgba (colorsel, &color);
gtk_widget_override_background_color (da, 0, &color);
gtk_color_selection_get_current_color (colorsel,
&color);
gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
}
gtk_widget_destroy (dialog);
}
@@ -69,57 +80,57 @@ do_colorsel (GtkWidget *do_widget)
GtkWidget *vbox;
GtkWidget *button;
GtkWidget *alignment;
if (!window)
{
color.red = 0;
color.blue = 1;
color.blue = 65535;
color.green = 0;
color.alpha = 1;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Color Selection");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
/*
* Create the color swatch area
*/
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
da = gtk_drawing_area_new ();
g_signal_connect (da, "draw", G_CALLBACK (draw_callback), NULL);
g_signal_connect (da, "expose_event",
G_CALLBACK (expose_event_callback), NULL);
/* set a minimum size */
gtk_widget_set_size_request (da, 200, 200);
/* set the color */
gtk_widget_override_background_color (da, 0, &color);
gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
gtk_container_add (GTK_CONTAINER (frame), da);
alignment = gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
button = gtk_button_new_with_mnemonic ("_Change the above color");
gtk_container_add (GTK_CONTAINER (alignment), button);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
g_signal_connect (button, "clicked",
G_CALLBACK (change_color_callback), NULL);
G_CALLBACK (change_color_callback), NULL);
}
if (!gtk_widget_get_visible (window))

View File

@@ -65,8 +65,8 @@ create_stock_icon_store (void)
{
if (stock_id[i])
{
pixbuf = gtk_widget_render_icon_pixbuf (cellview, stock_id[i],
GTK_ICON_SIZE_BUTTON);
pixbuf = gtk_widget_render_icon (cellview, stock_id[i],
GTK_ICON_SIZE_BUTTON, NULL);
gtk_stock_lookup (stock_id[i], &item);
label = strip_underscore (item.label);
gtk_list_store_append (store, &iter);
@@ -238,12 +238,12 @@ is_capital_sensitive (GtkCellLayout *cell_layout,
}
static void
fill_combo_entry (GtkWidget *combo)
fill_combo_entry (GtkWidget *entry)
{
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "One");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Two");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "2\302\275");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Three");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "One");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Two");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "2\302\275");
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), "Three");
}
@@ -271,7 +271,7 @@ struct _MaskEntryClass
};
static void mask_entry_editable_init (GtkEditableInterface *iface);
static void mask_entry_editable_init (GtkEditableClass *iface);
G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
@@ -281,18 +281,18 @@ G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
static void
mask_entry_set_background (MaskEntry *entry)
{
static const GdkRGBA error_color = { 1.0, 0.9, 0.9, 1.0 };
static const GdkColor error_color = { 0, 65535, 60000, 60000 };
if (entry->mask)
{
if (!g_regex_match_simple (entry->mask, gtk_entry_get_text (GTK_ENTRY (entry)), 0, 0))
{
gtk_widget_override_color (GTK_WIDGET (entry), 0, &error_color);
gtk_widget_modify_base (GTK_WIDGET (entry), GTK_STATE_NORMAL, &error_color);
return;
}
}
gtk_widget_override_color (GTK_WIDGET (entry), 0, NULL);
gtk_widget_modify_base (GTK_WIDGET (entry), GTK_STATE_NORMAL, NULL);
}
@@ -316,7 +316,7 @@ mask_entry_class_init (MaskEntryClass *klass)
static void
mask_entry_editable_init (GtkEditableInterface *iface)
mask_entry_editable_init (GtkEditableClass *iface)
{
iface->changed = mask_entry_changed;
}
@@ -345,7 +345,7 @@ do_combobox (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
vbox = gtk_vbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (window), vbox);
/* A combobox demonstrating cell renderers, separators and
@@ -354,7 +354,7 @@ do_combobox (GtkWidget *do_widget)
frame = gtk_frame_new ("Some stock icons");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
@@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
frame = gtk_frame_new ("Where are we ?");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
@@ -424,11 +424,11 @@ do_combobox (GtkWidget *do_widget)
frame = gtk_frame_new ("Editable");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
combo = gtk_combo_box_text_new_with_entry ();
combo = gtk_combo_box_entry_new_text ();
fill_combo_entry (combo);
gtk_container_add (GTK_CONTAINER (box), combo);
@@ -437,26 +437,7 @@ do_combobox (GtkWidget *do_widget)
gtk_container_remove (GTK_CONTAINER (combo), gtk_bin_get_child (GTK_BIN (combo)));
gtk_container_add (GTK_CONTAINER (combo), entry);
/* A combobox with string IDs */
frame = gtk_frame_new ("String IDs");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
gtk_container_add (GTK_CONTAINER (frame), box);
combo = gtk_combo_box_text_new ();
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "never", "Not visible");
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "when-active", "Visible when active");
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "always", "Always visible");
gtk_container_add (GTK_CONTAINER (box), combo);
entry = gtk_entry_new ();
g_object_bind_property (combo, "active-id",
entry, "text",
G_BINDING_BIDIRECTIONAL);
gtk_container_add (GTK_CONTAINER (box), entry);
}
if (!gtk_widget_get_visible (window))

View File

@@ -54,7 +54,7 @@ interactive_dialog_clicked (GtkButton *button,
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
@@ -120,25 +120,24 @@ do_dialog (GtkWidget *do_widget)
frame = gtk_frame_new ("Dialogs");
gtk_container_add (GTK_CONTAINER (window), frame);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (frame), vbox);
/* Standard message dialog */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
button = gtk_button_new_with_mnemonic ("_Message Dialog");
g_signal_connect (button, "clicked",
G_CALLBACK (message_dialog_clicked), NULL);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
/* Interactive dialog*/
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox2 = gtk_vbox_new (FALSE, 0);
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
g_signal_connect (button, "clicked",

View File

@@ -51,12 +51,19 @@ scribble_configure_event (GtkWidget *widget,
/* Redraw the screen from the surface */
static gboolean
scribble_draw (GtkWidget *widget,
cairo_t *cr,
gpointer data)
scribble_expose_event (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
cairo_t *cr;
cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
return FALSE;
}
@@ -137,38 +144,45 @@ scribble_motion_notify_event (GtkWidget *widget,
static gboolean
checkerboard_draw (GtkWidget *da,
cairo_t *cr,
gpointer data)
checkerboard_expose (GtkWidget *da,
GdkEventExpose *event,
gpointer data)
{
gint i, j, xcount, ycount, width, height;
GtkAllocation allocation;
gint i, j, xcount, ycount;
cairo_t *cr;
#define CHECK_SIZE 10
#define SPACING 2
/* At the start of a draw handler, a clip region has been set on
* the Cairo context, and the contents have been cleared to the
/* At the start of an expose handler, a clip region of event->area
* is set on the window, and event->area has been cleared to the
* widget's background color. The docs for
* gdk_window_begin_paint_region() give more details on how this
* works.
*/
cr = gdk_cairo_create (gtk_widget_get_window (da));
gdk_cairo_rectangle (cr, &event->area);
cairo_clip (cr);
gtk_widget_get_allocation (da, &allocation);
xcount = 0;
width = gtk_widget_get_allocated_width (da);
height = gtk_widget_get_allocated_height (da);
i = SPACING;
while (i < width)
while (i < allocation.width)
{
j = SPACING;
ycount = xcount % 2; /* start with even/odd depending on row */
while (j < height)
while (j < allocation.height)
{
if (ycount % 2)
cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
else
cairo_set_source_rgb (cr, 1, 1, 1);
/* If we're outside the clip, this will do nothing.
/* If we're outside event->area, this will do nothing.
* It might be mildly more efficient if we handled
* the clipping ourselves, but again we're feeling lazy.
*/
cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE);
cairo_fill (cr);
@@ -181,6 +195,8 @@ checkerboard_draw (GtkWidget *da,
++xcount;
}
cairo_destroy (cr);
/* return TRUE because we've handled this event, so no
* further processing is required.
*/
@@ -193,7 +209,7 @@ close_window (void)
window = NULL;
if (surface)
cairo_surface_destroy (surface);
g_object_unref (surface);
surface = NULL;
}
@@ -216,7 +232,7 @@ do_drawingarea (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -239,8 +255,8 @@ do_drawingarea (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (frame), da);
g_signal_connect (da, "draw",
G_CALLBACK (checkerboard_draw), NULL);
g_signal_connect (da, "expose-event",
G_CALLBACK (checkerboard_expose), NULL);
/*
* Create the scribble area
@@ -263,8 +279,8 @@ do_drawingarea (GtkWidget *do_widget)
/* Signals used to handle backing surface */
g_signal_connect (da, "draw",
G_CALLBACK (scribble_draw), NULL);
g_signal_connect (da, "expose-event",
G_CALLBACK (scribble_expose_event), NULL);
g_signal_connect (da,"configure-event",
G_CALLBACK (scribble_configure_event), NULL);

View File

@@ -332,7 +332,7 @@ do_editable_cells (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox),
@@ -365,8 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (sw), treeview);
/* some buttons */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
hbox = gtk_hbox_new (TRUE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
button = gtk_button_new_with_label ("Add item");

View File

@@ -34,7 +34,7 @@ do_entry_buffer (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -61,7 +61,7 @@ do_entry_completion (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -35,7 +35,7 @@ do_expander (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -300,7 +300,7 @@ do_iconview (GtkWidget *do_widget)
GtkWidget *tool_bar;
GtkToolItem *home_button;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
tool_bar = gtk_toolbar_new ();

View File

@@ -261,7 +261,7 @@ start_progressive_loading (GtkWidget *image)
}
static void
cleanup_callback (GObject *object,
cleanup_callback (GtkObject *object,
gpointer data)
{
if (load_timeout)
@@ -335,7 +335,7 @@ do_images (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -44,7 +44,7 @@ do_infobar (GtkWidget *do_widget)
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
bar = gtk_info_bar_new ();
@@ -81,7 +81,7 @@ do_infobar (GtkWidget *do_widget)
frame = gtk_frame_new ("Info bars");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox2 = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
gtk_container_add (GTK_CONTAINER (frame), vbox2);

View File

@@ -266,7 +266,7 @@ do_list_store (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");

View File

@@ -223,6 +223,7 @@ static gchar *types[] =
"FALSE",
"TRUE",
"FILE ",
"GtkObject ",
"GtkColorSelection ",
"GtkWidget ",
"GtkButton ",
@@ -278,7 +279,7 @@ static gchar *types[] =
"GtkTreeStore ",
"GtkEntry ",
"GtkEditable ",
"GtkEditableInterface ",
"GtkEditableClass ",
"GdkPixmap ",
"GdkEventConfigure ",
"GdkEventMotion ",
@@ -751,7 +752,7 @@ create_text (GtkTextBuffer **buffer,
if (is_source)
{
font_desc = pango_font_description_from_string ("monospace");
gtk_widget_override_font (text_view, font_desc);
gtk_widget_modify_font (text_view, font_desc);
pango_font_description_free (font_desc);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
@@ -954,7 +955,7 @@ main (int argc, char **argv)
g_signal_connect_after (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();

View File

@@ -14,15 +14,15 @@ PERL = perl
################################################################
# Possibly override versions from build/win32/module.defs
GTK_VER = 2.0
GDK_PIXBUF_VER = 2.0
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
GDK_LIBS = ../../gdk/gdk-win32-$(GTK_VER).lib
GTK_LIBS = ../../gtk/gtk-win32-$(GTK_VER).lib
GDK_PIXBUF_LIBS = ../../gdk-pixbuf/gdk_pixbuf-$(GDK_PIXBUF_VER).lib
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ../.. -I ../../gdk -I ../../gdk-pixbuf -I ../../gtk
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS) $(CAIRO_CFLAGS)
DEPCFLAGS = $(PANGO_CFLAGS) $(GLIB_CFLAGS) $(LIBICONV_CFLAGS) $(INTL_CFLAGS) $(ATK_CFLAGS)
LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
DEFINES = -DG_LOG_DOMAIN=\"GtkDemo\" -DGTK_VERSION=\"$(GTK_VER)\" \
-DDEMOCODEDIR=\".\"
@@ -90,6 +90,5 @@ OBJECTS = \
main.obj \
gtk-demo.exe : demos.h $(OBJECTS)
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) \
$(CAIRO_LIBS) $(PANGOCAIRO_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)
$(CC) $(CFLAGS) -Fegtk-demo.exe $(OBJECTS) $(GTK_LIBS) $(GDK_LIBS) $(GDK_PIXBUF_LIBS) $(PANGO_LIBS) $(GLIB_LIBS) $(LDFLAGS)

View File

@@ -146,11 +146,11 @@ do_menus (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
box = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_show (box);
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (box), box1);
gtk_widget_show (box1);
@@ -176,7 +176,7 @@ do_menus (GtkWidget *do_widget)
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_widget_show (menuitem);
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
gtk_widget_show (box2);

View File

@@ -39,18 +39,14 @@ void gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
static void gtk_rotated_bin_realize (GtkWidget *widget);
static void gtk_rotated_bin_unrealize (GtkWidget *widget);
static void gtk_rotated_bin_get_preferred_width (GtkWidget *widget,
gint *minimum,
gint *natural);
static void gtk_rotated_bin_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural);
static void gtk_rotated_bin_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
GdkEventExpose *event);
static gboolean gtk_rotated_bin_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean gtk_rotated_bin_expose (GtkWidget *widget,
GdkEventExpose *offscreen);
static void gtk_rotated_bin_add (GtkContainer *container,
GtkWidget *child);
@@ -152,10 +148,9 @@ gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
widget_class->realize = gtk_rotated_bin_realize;
widget_class->unrealize = gtk_rotated_bin_unrealize;
widget_class->get_preferred_width = gtk_rotated_bin_get_preferred_width;
widget_class->get_preferred_height = gtk_rotated_bin_get_preferred_height;
widget_class->size_request = gtk_rotated_bin_size_request;
widget_class->size_allocate = gtk_rotated_bin_size_allocate;
widget_class->draw = gtk_rotated_bin_draw;
widget_class->expose_event = gtk_rotated_bin_expose;
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
GTK_TYPE_ROTATED_BIN,
@@ -230,7 +225,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GtkAllocation allocation;
GtkStyleContext *context;
GtkStyle *style;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
@@ -257,9 +252,10 @@ gtk_rotated_bin_realize (GtkWidget *widget)
| GDK_LEAVE_NOTIFY_MASK;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
@@ -291,9 +287,9 @@ gtk_rotated_bin_realize (GtkWidget *widget)
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);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
gdk_window_show (bin->offscreen_window);
}
@@ -396,8 +392,7 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_get_preferred_size ( (bin->child),
&child_requisition, NULL);
gtk_widget_size_request (bin->child, &child_requisition);
s = sin (bin->angle);
c = cos (bin->angle);
@@ -409,30 +404,6 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
requisition->height = border_width * 2 + h;
}
static void
gtk_rotated_bin_get_preferred_width (GtkWidget *widget,
gint *minimum,
gint *natural)
{
GtkRequisition requisition;
gtk_rotated_bin_size_request (widget, &requisition);
*minimum = *natural = requisition.width;
}
static void
gtk_rotated_bin_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural)
{
GtkRequisition requisition;
gtk_rotated_bin_size_request (widget, &requisition);
*minimum = *natural = requisition.height;
}
static void
gtk_rotated_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
@@ -463,8 +434,7 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
s = sin (bin->angle);
c = cos (bin->angle);
gtk_widget_get_preferred_size (bin->child,
&child_requisition, NULL);
gtk_widget_get_child_requisition (bin->child, &child_requisition);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
@@ -499,59 +469,65 @@ gtk_rotated_bin_damage (GtkWidget *widget,
}
static gboolean
gtk_rotated_bin_draw (GtkWidget *widget,
cairo_t *cr)
gtk_rotated_bin_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GdkWindow *window;
gint width, height;
gdouble s, c;
gdouble w, h;
window = gtk_widget_get_window (widget);
if (gtk_cairo_should_draw_window (cr, window))
if (gtk_widget_is_drawable (widget))
{
cairo_surface_t *surface;
GtkAllocation child_area;
if (bin->child && gtk_widget_get_visible (bin->child))
window = gtk_widget_get_window (widget);
if (event->window == window)
{
surface = gdk_offscreen_window_get_surface (bin->offscreen_window);
gtk_widget_get_allocation (bin->child, &child_area);
GdkPixmap *pixmap;
GtkAllocation child_area;
cairo_t *cr;
/* transform */
s = sin (bin->angle);
c = cos (bin->angle);
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
if (bin->child && gtk_widget_get_visible (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
gtk_widget_get_allocation (bin->child, &child_area);
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
cairo_rotate (cr, bin->angle);
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
cr = gdk_cairo_create (window);
/* clip */
cairo_rectangle (cr,
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
cairo_clip (cr);
/* paint */
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);
/* transform */
s = sin (bin->angle);
c = cos (bin->angle);
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
cairo_rotate (cr, bin->angle);
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
/* clip */
gdk_drawable_get_size (pixmap, &width, &height);
cairo_rectangle (cr, 0, 0, width, height);
cairo_clip (cr);
/* paint */
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
cairo_paint (cr);
cairo_destroy (cr);
}
}
}
if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
{
gtk_render_background (gtk_widget_get_style_context (widget),
cr,
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
else if (event->window == bin->offscreen_window)
{
gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "blah",
0, 0, -1, -1);
if (bin->child)
gtk_container_propagate_draw (GTK_CONTAINER (widget),
bin->child,
cr);
if (bin->child)
gtk_container_propagate_expose (GTK_CONTAINER (widget),
bin->child,
event);
}
}
return FALSE;
@@ -574,7 +550,7 @@ do_offscreen_window (GtkWidget *do_widget)
if (!window)
{
GtkWidget *bin, *vbox, *scale, *button;
GdkRGBA black;
GdkColor black;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
@@ -584,13 +560,12 @@ do_offscreen_window (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gdk_rgba_parse (&black, "black");
gtk_widget_override_background_color (window, 0, &black);
gdk_color_parse ("black", &black);
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
0, G_PI/2, 0.01);
vbox = gtk_vbox_new (0, FALSE);
scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
button = gtk_button_new_with_label ("A Button");

View File

@@ -35,18 +35,14 @@ GtkWidget* gtk_mirror_bin_new (void);
static void gtk_mirror_bin_realize (GtkWidget *widget);
static void gtk_mirror_bin_unrealize (GtkWidget *widget);
static void gtk_mirror_bin_get_preferred_width (GtkWidget *widget,
gint *minimum,
gint *natural);
static void gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural);
static void gtk_mirror_bin_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
GdkEventExpose *event);
static gboolean gtk_mirror_bin_draw (GtkWidget *widget,
cairo_t *cr);
static gboolean gtk_mirror_bin_expose (GtkWidget *widget,
GdkEventExpose *offscreen);
static void gtk_mirror_bin_add (GtkContainer *container,
GtkWidget *child);
@@ -90,10 +86,9 @@ gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
widget_class->realize = gtk_mirror_bin_realize;
widget_class->unrealize = gtk_mirror_bin_unrealize;
widget_class->get_preferred_width = gtk_mirror_bin_get_preferred_width;
widget_class->get_preferred_height = gtk_mirror_bin_get_preferred_height;
widget_class->size_request = gtk_mirror_bin_size_request;
widget_class->size_allocate = gtk_mirror_bin_size_allocate;
widget_class->draw = gtk_mirror_bin_draw;
widget_class->expose_event = gtk_mirror_bin_expose;
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
GTK_TYPE_MIRROR_BIN,
@@ -168,7 +163,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GtkAllocation allocation;
GtkStyleContext *context;
GtkStyle *style;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
@@ -195,9 +190,10 @@ gtk_mirror_bin_realize (GtkWidget *widget)
| GDK_LEAVE_NOTIFY_MASK;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
@@ -229,9 +225,9 @@ gtk_mirror_bin_realize (GtkWidget *widget)
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);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
gdk_window_show (bin->offscreen_window);
}
@@ -320,38 +316,13 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_get_preferred_size ( (bin->child),
&child_requisition, NULL);
gtk_widget_size_request (bin->child, &child_requisition);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
requisition->width = border_width * 2 + child_requisition.width + 10;
requisition->height = border_width * 2 + child_requisition.height * 2 + 10;
}
static void
gtk_mirror_bin_get_preferred_width (GtkWidget *widget,
gint *minimum,
gint *natural)
{
GtkRequisition requisition;
gtk_mirror_bin_size_request (widget, &requisition);
*minimum = *natural = requisition.width;
}
static void
gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural)
{
GtkRequisition requisition;
gtk_mirror_bin_size_request (widget, &requisition);
*minimum = *natural = requisition.width;
}
static void
gtk_mirror_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
@@ -378,8 +349,7 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkAllocation child_allocation;
gtk_widget_get_preferred_size (bin->child,
&child_requisition, NULL);
gtk_widget_get_child_requisition (bin->child, &child_requisition);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
@@ -405,62 +375,78 @@ gtk_mirror_bin_damage (GtkWidget *widget,
}
static gboolean
gtk_mirror_bin_draw (GtkWidget *widget,
cairo_t *cr)
gtk_mirror_bin_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GdkWindow *window;
gint width, height;
window = gtk_widget_get_window (widget);
if (gtk_cairo_should_draw_window (cr, window))
if (gtk_widget_is_drawable (widget))
{
cairo_surface_t *surface;
cairo_matrix_t matrix;
cairo_pattern_t *mask;
int height;
if (bin->child && gtk_widget_get_visible (bin->child))
window = gtk_widget_get_window (widget);
if (event->window == window)
{
surface = gdk_offscreen_window_get_surface (bin->offscreen_window);
height = gdk_window_get_height (bin->offscreen_window);
GdkPixmap *pixmap;
cairo_t *cr;
cairo_matrix_t matrix;
cairo_pattern_t *mask;
/* paint the offscreen child */
cairo_set_source_surface (cr, surface, 0, 0);
cairo_paint (cr);
if (bin->child && gtk_widget_get_visible (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
gdk_drawable_get_size (pixmap, &width, &height);
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
cairo_matrix_scale (&matrix, 1.0, -1.0);
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
cairo_transform (cr, &matrix);
cr = gdk_cairo_create (window);
cairo_set_source_surface (cr, surface, 0, height);
cairo_save (cr);
/* create linear gradient as mask-pattern to fade out the source */
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
cairo_rectangle (cr, 0, 0, width, height);
cairo_clip (cr);
/* paint the reflection */
cairo_mask (cr, mask);
/* paint the offscreen child */
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
cairo_paint (cr);
cairo_pattern_destroy (mask);
cairo_restore (cr);
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
cairo_matrix_scale (&matrix, 1.0, -1.0);
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
cairo_transform (cr, &matrix);
cairo_rectangle (cr, 0, height, width, height);
cairo_clip (cr);
gdk_cairo_set_source_pixmap (cr, pixmap, 0, height);
/* create linear gradient as mask-pattern to fade out the source */
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
/* paint the reflection */
cairo_mask (cr, mask);
cairo_pattern_destroy (mask);
cairo_destroy (cr);
}
}
}
else if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
{
gtk_render_background (gtk_widget_get_style_context (widget),
cr,
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
else if (event->window == bin->offscreen_window)
{
gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "blah",
0, 0, -1, -1);
if (bin->child)
gtk_container_propagate_draw (GTK_CONTAINER (widget),
bin->child,
cr);
if (bin->child)
gtk_container_propagate_expose (GTK_CONTAINER (widget),
bin->child,
event);
}
}
return FALSE;
@@ -489,13 +475,13 @@ do_offscreen_window2 (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (0, FALSE);
bin = gtk_mirror_bin_new ();
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
hbox = gtk_hbox_new (FALSE, 6);
backbutton = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (backbutton),
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));

View File

@@ -153,14 +153,14 @@ do_panes (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "Panes");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
vpaned = gtk_vpaned_new ();
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
hpaned = gtk_hpaned_new ();
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
frame = gtk_frame_new (NULL);

View File

@@ -96,12 +96,19 @@ load_pixbufs (GError **error)
/* Expose callback for the drawing area */
static gint
draw_cb (GtkWidget *widget,
cairo_t *cr,
gpointer data)
expose_cb (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
cairo_t *cr;
cr = gdk_cairo_create (event->window);
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
cairo_paint (cr);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
return TRUE;
}
@@ -186,7 +193,7 @@ timeout (gpointer data)
static guint timeout_id;
static void
cleanup_callback (GObject *object,
cleanup_callback (GtkObject *object,
gpointer data)
{
g_source_remove (timeout_id);
@@ -239,8 +246,8 @@ do_pixbufs (GtkWidget *do_widget)
da = gtk_drawing_area_new ();
g_signal_connect (da, "draw",
G_CALLBACK (draw_cb), NULL);
g_signal_connect (da, "expose-event",
G_CALLBACK (expose_cb), NULL);
gtk_container_add (GTK_CONTAINER (window), da);

View File

@@ -18,17 +18,17 @@ const char text[] = "I ♥ GTK+";
static void
fancy_shape_renderer (cairo_t *cr,
PangoAttrShape *attr,
gboolean do_path,
gpointer data)
PangoAttrShape *attr,
gboolean do_path,
gpointer data)
{
double x, y;
cairo_get_current_point (cr, &x, &y);
cairo_translate (cr, x, y);
cairo_scale (cr,
(double) attr->ink_rect.width / PANGO_SCALE,
(double) attr->ink_rect.height / PANGO_SCALE);
(double) attr->ink_rect.width / PANGO_SCALE,
(double) attr->ink_rect.height / PANGO_SCALE);
switch (GPOINTER_TO_UINT (attr->data))
{
@@ -36,9 +36,9 @@ fancy_shape_renderer (cairo_t *cr,
{
cairo_move_to (cr, .5, .0);
cairo_line_to (cr, .9, -.4);
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
cairo_close_path (cr);
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
cairo_close_path (cr);
}
break;
}
@@ -60,8 +60,8 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
/* Get font metrics and prepare fancy shape size */
metrics = pango_context_get_metrics (pango_layout_get_context (layout),
pango_layout_get_font_description (layout),
NULL);
pango_layout_get_font_description (layout),
NULL);
ascent = pango_font_metrics_get_ascent (metrics);
logical_rect.x = 0;
logical_rect.width = ascent;
@@ -77,9 +77,9 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
PangoAttribute *attr;
attr = pango_attr_shape_new_with_data (&ink_rect,
&logical_rect,
GUINT_TO_POINTER (g_utf8_get_char (p)),
NULL, NULL);
&logical_rect,
GUINT_TO_POINTER (g_utf8_get_char (p)),
NULL, NULL);
attr->start_index = p - text;
attr->end_index = attr->start_index + strlen (HEART);
@@ -91,36 +91,43 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
}
static gboolean
rotated_text_draw (GtkWidget *widget,
cairo_t *cr,
gpointer data)
rotated_text_expose_event (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
#define RADIUS 150
#define N_WORDS 5
#define FONT "Serif 18"
GtkAllocation allocation;
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *desc;
cairo_t *cr;
cairo_pattern_t *pattern;
PangoAttrList *attrs;
int width;
int height;
double device_radius;
int width, height;
int i;
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
height = allocation.height;
/* Create a cairo context and set up a transformation matrix so that the user
* space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
* [-RADIUS, RADIUS].
* We first center, then change the scale. */
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
device_radius = MIN (width, height) / 2.;
cairo_translate (cr,
device_radius + (width - 2 * device_radius) / 2,
device_radius + (height - 2 * device_radius) / 2);
device_radius + (width - 2 * device_radius) / 2,
device_radius + (height - 2 * device_radius) / 2);
cairo_scale (cr, device_radius / RADIUS, device_radius / RADIUS);
/* Create and a subtle gradient source and use it. */
@@ -132,8 +139,8 @@ rotated_text_draw (GtkWidget *widget,
/* Create a PangoContext and set up our shape renderer */
context = gtk_widget_create_pango_context (widget);
pango_cairo_context_set_shape_renderer (context,
fancy_shape_renderer,
NULL, NULL);
fancy_shape_renderer,
NULL, NULL);
/* Create a PangoLayout, set the text, font, and attributes */
layout = pango_layout_new (context);
@@ -166,6 +173,7 @@ rotated_text_draw (GtkWidget *widget,
g_object_unref (layout);
g_object_unref (context);
cairo_pattern_destroy (pattern);
cairo_destroy (cr);
return FALSE;
}
@@ -181,17 +189,16 @@ do_rotated_text (GtkWidget *do_widget)
PangoLayout *layout;
PangoAttrList *attrs;
const GdkRGBA white = { 1.0, 1.0, 1.0, 1.0 };
const GdkColor white = { 0, 0xffff, 0xffff, 0xffff };
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Rotated Text");
gtk_window_set_default_size (GTK_WINDOW (window), 4 * RADIUS, 2 * RADIUS);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
box = gtk_hbox_new (TRUE, 0);
gtk_container_add (GTK_CONTAINER (window), box);
/* Add a drawing area */
@@ -200,10 +207,10 @@ do_rotated_text (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (box), drawing_area);
/* This overrides the background color from the theme */
gtk_widget_override_background_color (drawing_area, 0, &white);
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
g_signal_connect (drawing_area, "draw",
G_CALLBACK (rotated_text_draw), NULL);
g_signal_connect (drawing_area, "expose-event",
G_CALLBACK (rotated_text_expose_event), NULL);
/* And a label */
@@ -215,8 +222,8 @@ do_rotated_text (GtkWidget *do_widget)
/* Set up fancy stuff on the label */
layout = gtk_label_get_layout (GTK_LABEL (label));
pango_cairo_context_set_shape_renderer (pango_layout_get_context (layout),
fancy_shape_renderer,
NULL, NULL);
fancy_shape_renderer,
NULL, NULL);
attrs = create_fancy_attr_list_for_layout (layout);
gtk_label_set_attributes (GTK_LABEL (label), attrs);
pango_attr_list_unref (attrs);

View File

@@ -266,7 +266,7 @@ do_search_entry (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
@@ -274,7 +274,7 @@ do_search_entry (GtkWidget *do_widget)
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);

View File

@@ -25,10 +25,10 @@ create_combo_box (const char **strings)
GtkWidget *combo_box;
const char **str;
combo_box = gtk_combo_box_text_new ();
combo_box = gtk_combo_box_new_text ();
for (str = strings; *str; str++)
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), *str);
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), *str);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
@@ -118,7 +118,7 @@ do_sizegroup (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

View File

@@ -50,12 +50,12 @@ do_spinner (GtkWidget *do_widget)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
/* Sensitive */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
hbox = gtk_hbox_new (FALSE, 5);
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (hbox), spinner);
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
@@ -63,7 +63,7 @@ do_spinner (GtkWidget *do_widget)
spinner_sensitive = spinner;
/* Disabled */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
hbox = gtk_hbox_new (FALSE, 5);
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (hbox), spinner);
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());

View File

@@ -166,9 +166,9 @@ create_model (void)
}
g_free (sizes);
info.small_icon = gtk_widget_render_icon_pixbuf (window,
info.id,
size);
info.small_icon = gtk_widget_render_icon (window, info.id,
size,
NULL);
if (size != GTK_ICON_SIZE_MENU)
{
@@ -417,7 +417,7 @@ do_stock_browser (GtkWidget *do_widget)
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_add (GTK_CONTAINER (window), hbox);
sw = gtk_scrolled_window_new (NULL, NULL);
@@ -486,7 +486,7 @@ do_stock_browser (GtkWidget *do_widget)
frame = gtk_frame_new ("Selected Item");
gtk_container_add (GTK_CONTAINER (align), frame);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
gtk_container_add (GTK_CONTAINER (frame), vbox);

View File

@@ -184,8 +184,7 @@ do_textscroll (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
hbox = gtk_hbox_new (TRUE, 6);
gtk_container_add (GTK_CONTAINER (window), hbox);
create_text_view (hbox, TRUE);

View File

@@ -30,99 +30,99 @@ create_tags (GtkTextBuffer *buffer)
* new copies of the same tags for every buffer.
*
* Tags are assigned default priorities in order of addition to the
* tag table. That is, tags created later that affect the same text
* tag table. That is, tags created later that affect the same text
* property affected by an earlier tag will override the earlier
* tag. You can modify tag priorities with
* gtk_text_tag_set_priority().
*/
gtk_text_buffer_create_tag (buffer, "heading",
"weight", PANGO_WEIGHT_BOLD,
"size", 15 * PANGO_SCALE,
NULL);
"weight", PANGO_WEIGHT_BOLD,
"size", 15 * PANGO_SCALE,
NULL);
gtk_text_buffer_create_tag (buffer, "italic",
"style", PANGO_STYLE_ITALIC, NULL);
"style", PANGO_STYLE_ITALIC, NULL);
gtk_text_buffer_create_tag (buffer, "bold",
"weight", PANGO_WEIGHT_BOLD, NULL);
"weight", PANGO_WEIGHT_BOLD, NULL);
gtk_text_buffer_create_tag (buffer, "big",
/* points times the PANGO_SCALE factor */
"size", 20 * PANGO_SCALE, NULL);
/* points times the PANGO_SCALE factor */
"size", 20 * PANGO_SCALE, NULL);
gtk_text_buffer_create_tag (buffer, "xx-small",
"scale", PANGO_SCALE_XX_SMALL, NULL);
"scale", PANGO_SCALE_XX_SMALL, NULL);
gtk_text_buffer_create_tag (buffer, "x-large",
"scale", PANGO_SCALE_X_LARGE, NULL);
"scale", PANGO_SCALE_X_LARGE, NULL);
gtk_text_buffer_create_tag (buffer, "monospace",
"family", "monospace", NULL);
"family", "monospace", NULL);
gtk_text_buffer_create_tag (buffer, "blue_foreground",
"foreground", "blue", NULL);
"foreground", "blue", NULL);
gtk_text_buffer_create_tag (buffer, "red_background",
"background", "red", NULL);
"background", "red", NULL);
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
"pixels_above_lines", 30, NULL);
"pixels_above_lines", 30, NULL);
gtk_text_buffer_create_tag (buffer, "big_gap_after_line",
"pixels_below_lines", 30, NULL);
"pixels_below_lines", 30, NULL);
gtk_text_buffer_create_tag (buffer, "double_spaced_line",
"pixels_inside_wrap", 10, NULL);
"pixels_inside_wrap", 10, NULL);
gtk_text_buffer_create_tag (buffer, "not_editable",
"editable", FALSE, NULL);
"editable", FALSE, NULL);
gtk_text_buffer_create_tag (buffer, "word_wrap",
"wrap_mode", GTK_WRAP_WORD, NULL);
"wrap_mode", GTK_WRAP_WORD, NULL);
gtk_text_buffer_create_tag (buffer, "char_wrap",
"wrap_mode", GTK_WRAP_CHAR, NULL);
"wrap_mode", GTK_WRAP_CHAR, NULL);
gtk_text_buffer_create_tag (buffer, "no_wrap",
"wrap_mode", GTK_WRAP_NONE, NULL);
"wrap_mode", GTK_WRAP_NONE, NULL);
gtk_text_buffer_create_tag (buffer, "center",
"justification", GTK_JUSTIFY_CENTER, NULL);
"justification", GTK_JUSTIFY_CENTER, NULL);
gtk_text_buffer_create_tag (buffer, "right_justify",
"justification", GTK_JUSTIFY_RIGHT, NULL);
"justification", GTK_JUSTIFY_RIGHT, NULL);
gtk_text_buffer_create_tag (buffer, "wide_margins",
"left_margin", 50, "right_margin", 50,
NULL);
"left_margin", 50, "right_margin", 50,
NULL);
gtk_text_buffer_create_tag (buffer, "strikethrough",
"strikethrough", TRUE, NULL);
"strikethrough", TRUE, NULL);
gtk_text_buffer_create_tag (buffer, "underline",
"underline", PANGO_UNDERLINE_SINGLE, NULL);
"underline", PANGO_UNDERLINE_SINGLE, NULL);
gtk_text_buffer_create_tag (buffer, "double_underline",
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
gtk_text_buffer_create_tag (buffer, "superscript",
"rise", 10 * PANGO_SCALE, /* 10 pixels */
"size", 8 * PANGO_SCALE, /* 8 points */
NULL);
"rise", 10 * PANGO_SCALE, /* 10 pixels */
"size", 8 * PANGO_SCALE, /* 8 points */
NULL);
gtk_text_buffer_create_tag (buffer, "subscript",
"rise", -10 * PANGO_SCALE, /* 10 pixels */
"size", 8 * PANGO_SCALE, /* 8 points */
NULL);
"rise", -10 * PANGO_SCALE, /* 10 pixels */
"size", 8 * PANGO_SCALE, /* 8 points */
NULL);
gtk_text_buffer_create_tag (buffer, "rtl_quote",
"wrap_mode", GTK_WRAP_WORD,
"direction", GTK_TEXT_DIR_RTL,
"indent", 30,
"left_margin", 20,
"right_margin", 20,
NULL);
"wrap_mode", GTK_WRAP_WORD,
"direction", GTK_TEXT_DIR_RTL,
"indent", 30,
"left_margin", 20,
"right_margin", 20,
NULL);
}
static void
@@ -156,99 +156,90 @@ insert_text (GtkTextBuffer *buffer)
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
pixbuf = scaled;
/* get start of buffer; each insertion will revalidate the
* iterator to point to just after the inserted text.
*/
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
gtk_text_buffer_insert (buffer, &iter,
"The text widget can display text with all kinds of nifty attributes. "
"It also supports multiple views of the same buffer; this demo is "
"showing the same buffer in two places.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Font styles. ", -1,
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Font styles. ", -1,
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter, "For example, you can have ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"italic", -1,
"italic", NULL);
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
"italic", -1,
"italic", NULL);
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"bold", -1,
"bold", NULL);
"bold", -1,
"bold", NULL);
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"monospace (typewriter)", -1,
"monospace", NULL);
"monospace (typewriter)", -1,
"monospace", NULL);
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"big", -1,
"big", NULL);
"big", -1,
"big", NULL);
gtk_text_buffer_insert (buffer, &iter, " text. ", -1);
gtk_text_buffer_insert (buffer, &iter,
"It's best not to hardcode specific text sizes; you can use relative "
"sizes as with CSS, such as ", -1);
gtk_text_buffer_insert (buffer, &iter, "It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"xx-small", -1,
"xx-small", NULL);
"xx-small", -1,
"xx-small", NULL);
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"x-large", -1,
"x-large", NULL);
gtk_text_buffer_insert (buffer, &iter,
" to ensure that your program properly adapts if the user changes the "
"default font size.\n\n", -1);
"x-large", -1,
"x-large", NULL);
gtk_text_buffer_insert (buffer, &iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Colors. ", -1,
"heading", NULL);
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a blue foreground", -1,
"blue_foreground", NULL);
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a red background", -1,
"red_background", NULL);
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a blue foreground on red background", -1,
"blue_foreground",
"red_background",
NULL);
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Underline, strikethrough, and rise. ", -1,
"heading", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a blue foreground", -1,
"blue_foreground", NULL);
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a red background", -1,
"red_background", NULL);
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a blue foreground on red background", -1,
"blue_foreground",
"red_background",
NULL);
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Underline, strikethrough, and rise. ", -1,
"heading", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Strikethrough", -1,
"strikethrough", NULL);
"Strikethrough", -1,
"strikethrough", NULL);
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"underline", -1,
"underline", NULL);
"underline", -1,
"underline", NULL);
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"double underline", -1,
"double_underline", NULL);
"double underline", -1,
"double_underline", NULL);
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"superscript", -1,
"superscript", NULL);
"superscript", -1,
"superscript", NULL);
gtk_text_buffer_insert (buffer, &iter, ", and ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"subscript", -1,
"subscript", NULL);
"subscript", -1,
"subscript", NULL);
gtk_text_buffer_insert (buffer, &iter, " are all supported.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Images. ", -1,
"heading", NULL);
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter, "The buffer can have images in it: ", -1);
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
@@ -256,126 +247,70 @@ insert_text (GtkTextBuffer *buffer)
gtk_text_buffer_insert (buffer, &iter, " for example.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Spacing. ", -1,
"heading", NULL);
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter, "You can adjust the amount of space before each line.\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has a whole lot of space before it.\n", -1,
"big_gap_before_line", "wide_margins", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n", -1,
"big_gap_after_line", "wide_margins", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n", -1,
"double_spaced_line", "wide_margins", NULL);
gtk_text_buffer_insert (buffer, &iter, "Also note that those lines have extra-wide margins.\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Editability. ", -1,
"heading", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n", -1,
"not_editable", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Wrapping. ", -1,
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter,
"You can adjust the amount of space before each line.\n", -1);
"This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1,
"char_wrap", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", -1,
"no_wrap", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Justification. ", -1,
"heading", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"\nThis line has center justification.\n", -1,
"center", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has a whole lot of space before it.\n", -1,
"big_gap_before_line", "wide_margins", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"You can also adjust the amount of space after each line; "
"this line has a whole lot of space after it.\n", -1,
"big_gap_after_line", "wide_margins", NULL);
"This line has right justification.\n", -1,
"right_justify", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"You can also adjust the amount of space between wrapped lines; "
"this line has extra space between each wrapped line in the same "
"paragraph. To show off wrapping, some filler text: the quick "
"brown fox jumped over the lazy dog. Blah blah blah blah blah "
"blah blah blah blah.\n", -1,
"double_spaced_line", "wide_margins", NULL);
"\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", -1,
"wide_margins", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Internationalization. ", -1,
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter,
"Also note that those lines have extra-wide margins.\n\n", -1);
"You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Editability. ", -1,
"heading", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line is 'locked down' and can't be edited by the user - just "
"try it! You can't delete this line.\n\n", -1,
"not_editable", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Wrapping. ", -1,
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter,
"This line (and most of the others in this buffer) is word-wrapped, "
"using the proper Unicode algorithm. Word wrap should work in all "
"scripts and languages that GTK+ supports. Let's make this a long "
"paragraph to demonstrate: blah blah blah blah blah blah blah blah "
"blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has character-based wrapping, and can wrap between any two "
"character glyphs. Let's make this a long paragraph to demonstrate: "
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah "
"blah blah blah blah blah\n\n", -1, "char_wrap", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has all wrapping turned off, so it makes the horizontal "
"scrollbar appear.\n\n\n", -1, "no_wrap", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Justification. ", -1,
"heading", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"\nThis line has center justification.\n", -1,
"center", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"This line has right justification.\n", -1,
"right_justify", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"\nThis line has big wide margins. Text text text text text text text "
"text text text text text text text text text text text text text text "
"text text text text text text text text text text text text text text "
"text.\n", -1, "wide_margins", NULL);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"Internationalization. ", -1,
"heading", NULL);
gtk_text_buffer_insert (buffer, &iter,
"You can put all sorts of Unicode text in the buffer.\n\nGerman "
"(Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek "
"(\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) "
"\316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew "
"\327\251\327\234\327\225\327\235\nJapanese "
"(\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles "
"bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, "
"grapheme boundaries, and so on using the Pango internationalization "
"framework.\n", -1);
gtk_text_buffer_insert (buffer, &iter,
"Here's a word-wrapped quote in a right-to-left language:\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"\331\210\331\202\330\257 \330\250\330\257\330\243 "
"\330\253\331\204\330\247\330\253 \331\205\331\206 "
"\330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
"\330\252\331\202\330\257\331\205\330\247 \331\201\331\212 "
"\330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 "
"\330\250\330\261\330\247\331\205\330\254\331\207\330\247 "
"\331\203\331\205\331\206\330\270\331\205\330\247\330\252 "
"\331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 "
"\330\253\331\205 \330\252\330\255\331\210\331\204\330\252 "
"\331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 "
"\330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 "
"\330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 "
"\331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 "
"\331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 "
"\331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 "
"\330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 "
"\330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 "
"\331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 "
"\331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 "
"\330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 "
"\330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 "
"\330\243\331\203\330\253\330\261 \331\207\330\260\331\207 "
"\330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
"\331\206\330\254\330\247\330\255\330\247 \331\207\331\210 "
"\302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 "
"\331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
"rtl_quote", NULL);
gtk_text_buffer_insert (buffer, &iter,
"You can put widgets in the buffer: Here's a button: ", -1);
gtk_text_buffer_insert (buffer, &iter, "Here's a word-wrapped quote in a right-to-left language:\n", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
"rtl_quote", NULL);
gtk_text_buffer_insert (buffer, &iter, "You can put widgets in the buffer: Here's a button: ", -1);
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
gtk_text_buffer_insert (buffer, &iter, " and a menu: ", -1);
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
@@ -386,12 +321,8 @@ insert_text (GtkTextBuffer *buffer)
gtk_text_buffer_insert (buffer, &iter, " finally a text entry: ", -1);
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
gtk_text_buffer_insert (buffer, &iter, ".\n", -1);
gtk_text_buffer_insert (buffer, &iter,
"\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; "
"it leaves out, for example: invisible/hidden text, tab stops, "
"application-drawn areas on the sides of the widget for displaying "
"breakpoints and such...", -1);
gtk_text_buffer_insert (buffer, &iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text, tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...", -1);
/* Apply word_wrap tag to whole buffer */
gtk_text_buffer_get_bounds (buffer, &start, &end);
@@ -417,7 +348,7 @@ attach_widgets (GtkTextView *text_view)
GtkTextIter iter;
GtkTextBuffer *buffer;
int i;
buffer = gtk_text_view_get_buffer (text_view);
gtk_text_buffer_get_start_iter (buffer, &iter);
@@ -427,7 +358,7 @@ attach_widgets (GtkTextView *text_view)
{
GtkTextChildAnchor *anchor;
GtkWidget *widget;
anchor = gtk_text_iter_get_child_anchor (&iter);
if (i == 0)
@@ -440,23 +371,23 @@ attach_widgets (GtkTextView *text_view)
}
else if (i == 1)
{
widget = gtk_combo_box_text_new ();
widget = gtk_combo_box_new_text ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 1");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 2");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Option 3");
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 1");
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 2");
gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "Option 3");
}
else if (i == 2)
{
widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, NULL);
widget = gtk_hscale_new (NULL);
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
gtk_widget_set_size_request (widget, 70, -1);
}
else if (i == 3)
{
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
widget = gtk_image_new_from_file (filename);
g_free (filename);
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
widget = gtk_image_new_from_file (filename);
g_free (filename);
}
else if (i == 4)
{
@@ -490,20 +421,20 @@ do_textview (GtkWidget *do_widget)
GtkWidget *view2;
GtkWidget *sw;
GtkTextBuffer *buffer;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_widget_get_screen (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window),
450, 450);
450, 450);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_window_set_title (GTK_WINDOW (window), "TextView");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
vpaned = gtk_vpaned_new ();
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
gtk_container_add (GTK_CONTAINER (window), vpaned);
@@ -515,19 +446,19 @@ do_textview (GtkWidget *do_widget)
view1 = gtk_text_view_new ();
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view1));
view2 = gtk_text_view_new_with_buffer (buffer);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_paned_add1 (GTK_PANED (vpaned), sw);
gtk_container_add (GTK_CONTAINER (sw), view1);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_paned_add2 (GTK_PANED (vpaned), sw);
gtk_container_add (GTK_CONTAINER (sw), view2);
@@ -537,7 +468,7 @@ do_textview (GtkWidget *do_widget)
attach_widgets (GTK_TEXT_VIEW (view1));
attach_widgets (GTK_TEXT_VIEW (view2));
gtk_widget_show_all (vpaned);
}
@@ -561,25 +492,25 @@ recursive_attach_view (int depth,
{
GtkWidget *child_view;
GtkWidget *event_box;
GdkRGBA color;
GdkColor color;
GtkWidget *align;
if (depth > 4)
return;
child_view = gtk_text_view_new_with_buffer (gtk_text_view_get_buffer (view));
/* Event box is to add a black border around each child view */
event_box = gtk_event_box_new ();
gdk_rgba_parse (&color, "black");
gtk_widget_override_background_color (event_box, 0, &color);
gdk_color_parse ("black", &color);
gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color);
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
gtk_container_add (GTK_CONTAINER (event_box), align);
gtk_container_add (GTK_CONTAINER (align), child_view);
gtk_text_view_add_child_at_anchor (view, event_box, anchor);
recursive_attach_view (depth + 1, GTK_TEXT_VIEW (child_view), anchor);
@@ -602,21 +533,21 @@ easter_egg_callback (GtkWidget *button,
gtk_window_present (GTK_WINDOW (window));
return;
}
buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_get_start_iter (buffer, &iter);
gtk_text_buffer_insert (buffer, &iter,
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
gtk_text_buffer_insert (buffer, &iter,
"\nDon't do this in real applications, please.\n", -1);
view = gtk_text_view_new_with_buffer (buffer);
recursive_attach_view (0, GTK_TEXT_VIEW (view), anchor);
g_object_unref (buffer);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -632,7 +563,7 @@ easter_egg_callback (GtkWidget *button,
g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
gtk_widget_show_all (window);
}

View File

@@ -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_pixbuf (widget, stock_id, GTK_ICON_SIZE_DIALOG);
pixbuf = gtk_widget_render_icon (widget, stock_id, GTK_ICON_SIZE_DIALOG, NULL);
if (pixbuf)
{
@@ -81,13 +81,22 @@ canvas_item_draw (const CanvasItem *item,
}
static gboolean
canvas_draw (GtkWidget *widget,
cairo_t *cr)
canvas_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
GtkAllocation allocation;
cairo_t *cr;
GList *iter;
cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdk_cairo_region (cr, event->region);
cairo_clip (cr);
gtk_widget_get_allocation (widget, &allocation);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_paint (cr);
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_fill (cr);
for (iter = canvas_items; iter; iter = iter->next)
canvas_item_draw (iter->data, cr, FALSE);
@@ -95,6 +104,8 @@ canvas_draw (GtkWidget *widget,
if (drop_item)
canvas_item_draw (drop_item, cr, TRUE);
cairo_destroy (cr);
return TRUE;
}
@@ -438,7 +449,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
/* Add widgets to control the ToolPalette appearance: */
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
box = gtk_vbox_new (FALSE, 6);
gtk_container_add (GTK_CONTAINER (window), box);
/* Orientation combo box: */
@@ -507,7 +518,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
/* Add hbox */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
hbox = gtk_hbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
/* Add and fill the ToolPalette: */
@@ -561,7 +572,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_widget_set_app_paintable (contents, TRUE);
g_object_connect (contents,
"signal::draw", canvas_draw, NULL,
"signal::expose-event", canvas_expose_event, NULL,
"signal::drag-data-received", passive_canvas_drag_data_received, NULL,
NULL);
@@ -589,7 +600,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_widget_set_app_paintable (contents, TRUE);
g_object_connect (contents,
"signal::draw", canvas_draw, NULL,
"signal::expose-event", canvas_expose_event, NULL,
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
"signal::drag-leave", interactive_canvas_drag_leave, NULL,

View File

@@ -402,7 +402,7 @@ do_tree_store (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -196,7 +196,7 @@ do_ui_manager (GtkWidget *do_widget)
g_error_free (error);
}
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_box_pack_start (GTK_BOX (box1),
@@ -209,11 +209,11 @@ do_ui_manager (GtkWidget *do_widget)
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);

View File

@@ -86,11 +86,17 @@ load_pixbufs (void)
}
/* Expose callback for the drawing area */
static gboolean
draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
static gint
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
cairo_t *cr;
cr = gdk_cairo_create (event->window);
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
cairo_paint (cr);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
return TRUE;
}
@@ -173,7 +179,7 @@ static guint timeout_id;
/* Destroy handler for the window */
static void
destroy_cb (GObject *object, gpointer data)
destroy_cb (GtkObject *object, gpointer data)
{
g_source_remove (timeout_id);
timeout_id = 0;
@@ -208,8 +214,8 @@ main (int argc, char **argv)
da = gtk_drawing_area_new ();
g_signal_connect (da, "draw",
G_CALLBACK (draw_cb), NULL);
g_signal_connect (da, "expose_event",
G_CALLBACK (expose_cb), NULL);
gtk_container_add (GTK_CONTAINER (window), da);

View File

@@ -323,7 +323,7 @@ do_image (const char *filename)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -384,7 +384,7 @@ do_nonprogressive (const gchar *filename)
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
vbox = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
gtk_container_add (GTK_CONTAINER (window), vbox);

View File

@@ -350,7 +350,7 @@ main (int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE, 0);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();

View File

@@ -112,8 +112,8 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_window (root,
0, 0, 150, 160);
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, 150, 160);
/* PASS */
g_debug ("try to save PNG with a profile");

View File

@@ -307,16 +307,21 @@ close_app (GtkWidget *widget, gpointer data)
return TRUE;
}
static gboolean
draw_cb (GtkWidget *drawing_area, cairo_t *cr, gpointer data)
static int
expose_cb (GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data)
{
GdkPixbuf *pixbuf;
cairo_t *cr;
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area),
"pixbuf");
cr = gdk_cairo_create (evt->window);
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
cairo_paint (cr);
gdk_cairo_rectangle (cr, &evt->area);
cairo_fill (cr);
cairo_destroy (cr);
return FALSE;
}
@@ -335,8 +340,8 @@ configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
GdkPixbuf *new_pixbuf;
root = gdk_get_default_root_window ();
new_pixbuf = gdk_pixbuf_get_from_window (root,
0, 0, evt->width, evt->height);
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height);
g_object_set_data_full (G_OBJECT (drawing_area), "pixbuf", new_pixbuf,
(GDestroyNotify) g_object_unref);
}
@@ -356,8 +361,8 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_window (root,
0, 0, 150, 160);
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, 150, 160);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "delete_event",
@@ -365,15 +370,15 @@ main (int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (close_app), NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
drawing_area = gtk_drawing_area_new ();
gtk_widget_set_size_request (GTK_WIDGET (drawing_area),
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf));
g_signal_connect (drawing_area, "draw",
G_CALLBACK (draw_cb), NULL);
g_signal_connect (drawing_area, "expose_event",
G_CALLBACK (expose_cb), NULL);
g_signal_connect (drawing_area, "configure_event",
G_CALLBACK (configure_cb), NULL);

View File

@@ -24,35 +24,41 @@ set_interp_type (GtkWidget *widget, gpointer data)
void
overall_changed_cb (GtkAdjustment *adjustment, gpointer data)
{
if (gtk_adjustment_get_value (adjustment) != overall_alpha)
if (adjustment->value != overall_alpha)
{
overall_alpha = gtk_adjustment_get_value (adjustment);
overall_alpha = adjustment->value;
gtk_widget_queue_draw (darea);
}
}
gboolean
draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
GtkAllocation allocation;
GdkPixbuf *dest;
int width, height;
cairo_t *cr;
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
gdk_window_set_back_pixmap (gtk_widget_get_window (widget),
NULL, FALSE);
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
gtk_widget_get_allocation (widget, &allocation);
gdk_pixbuf_composite_color (pixbuf, dest,
0, 0, width, height,
0, 0,
(double) width / gdk_pixbuf_get_width (pixbuf),
(double) height / gdk_pixbuf_get_height (pixbuf),
0, 0, event->area.width, event->area.height,
-event->area.x, -event->area.y,
(double) allocation.width / gdk_pixbuf_get_width (pixbuf),
(double) allocation.height / gdk_pixbuf_get_height (pixbuf),
interp_type, overall_alpha,
0, 0, 16, 0xaaaaaa, 0x555555);
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
cr = gdk_cairo_create (event->window);
gdk_cairo_set_source_pixbuf (cr, dest, 0, 0);
cairo_paint (cr);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
g_object_unref (dest);
return TRUE;
@@ -98,15 +104,15 @@ main(int argc, char **argv)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_main_quit), NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
combo_box = gtk_combo_box_text_new ();
combo_box = gtk_combo_box_new_text ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "NEAREST");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "BILINEAR");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "TILES");
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_box), "HYPER");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "NEAREST");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "BILINEAR");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "TILES");
gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), "HYPER");
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 1);
@@ -117,17 +123,17 @@ main(int argc, char **argv)
alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new ("Overall Alpha:");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
adjustment = gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0);
adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (overall_alpha, 0, 255, 1, 10, 0));
g_signal_connect (adjustment, "value_changed",
G_CALLBACK (overall_changed_cb), NULL);
hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adjustment);
hscale = gtk_hscale_new (adjustment);
gtk_scale_set_digits (GTK_SCALE (hscale), 0);
gtk_box_pack_start (GTK_BOX (hbox), hscale, TRUE, TRUE, 0);
@@ -135,14 +141,13 @@ main(int argc, char **argv)
gtk_widget_show_all (vbox);
/* Compute the size without the drawing area, so we know how big to make the default size */
gtk_widget_get_preferred_size ( (vbox),
&scratch_requisition, NULL);
gtk_widget_size_request (vbox, &scratch_requisition);
darea = gtk_drawing_area_new ();
gtk_box_pack_start (GTK_BOX (vbox), darea, TRUE, TRUE, 0);
g_signal_connect (darea, "draw",
G_CALLBACK (draw_cb), NULL);
g_signal_connect (darea, "expose_event",
G_CALLBACK (expose_cb), NULL);
gtk_window_set_default_size (GTK_WINDOW (window),
gdk_pixbuf_get_width (pixbuf),

View File

@@ -1,635 +0,0 @@
GTK+ Coding Style
-------------------------------------------------------------------------------
This document is intended to be a short description of the preferred
coding style to be used for the GTK+ source code. It was strongly
inspired by Clutter's CODING_STYLE.
Coding style is a matter of consistency, readability and maintainance;
coding style is also completely arbitrary and a matter of taste. This
document will use examples at the very least to provide authoritative
and consistent answers to common questions regarding the coding style,
and will also try to identify the allowed exceptions.
The examples will show the preferred coding style; the negative examples
will be clearly identified. Please, don't submit code to GTK+ that
looks like any of these.
Part of the rationales for these coding style rules are available either
in the kernel CodingStyle document or in Cairo's CODING_STYLE one.
When in doubt, check the surrounding code and try to imitate it.
+ Line width
The maximum line width for source files is 80 characters, whenever possible.
Longer lines are usually an indication that you either need a function
or a pre-processor macro.
+ Indentation
Each new level is indented 2 or more spaces than the previous level:
if (condition)
single_statement ();
This can only be achieved using space characters. It may not be achieved
using tab characters alone, or using a combination of spaces and tabs.
Do not change the editor's configuration to change the meaning of a
tab character (see below); code using tabs to indent will not be accepted
into GTK+.
Even if two spaces for each indentation level allows deeper nesting than
8 spaces, GTK+ favours self-documenting function names that can take
quite some space. For this reason you should avoid deeply nested code.
+ Tab characters
The tab character must always be expanded to spaces. If a literal
tab must be used inside the source, the tab must always be interpreted
according to its traditional meaning:
Advance to the next column which is a multiple of 8.
[ these two lines should be aligned ]
+ Braces
Curly braces should not be used for single statement blocks:
if (condition)
single_statement ();
else
another_single_statement (arg1);
In case of multiple statements, curly braces should be put on another
indentation level:
if (condition)
{
statement_1 ();
statement_2 ();
statement_3 ();
}
The "no block for single statements" rule has only four exceptions:
① if the single statement covers multiple lines, e.g. for functions with
many arguments, and it is followed by else or else if:
/* valid */
if (condition)
{
a_single_statement_with_many_arguments (some_lengthy_argument,
another_lengthy_argument,
and_another_one,
plus_one);
}
else
another_single_statement (arg1, arg2);
② if the condition is composed of many lines:
/* valid */
if (condition1 ||
(condition2 && condition3) ||
condition4 ||
(condition5 && (condition6 || condition7)))
{
a_single_statement ();
}
③ Nested if's, in which case the block should be placed on the
outermost if:
/* valid */
if (condition)
{
if (another_condition)
single_statement ();
else
another_single_statement ();
}
/* invalid */
if (condition)
if (another_condition)
single_statement ();
else if (yet_another_condition)
another_single_statement ();
④ If either side of an if-else statement has braces, both sides
should, to match up indentation:
/* valid */
if (condition)
{
foo ();
bar ();
}
else
{
baz ();
}
/* invalid */
if (condition)
{
foo ();
bar ();
}
else
baz ();
In general, new blocks should be placed on a new indentation level,
like:
int retval = 0;
statement_1 ();
statement_2 ();
{
int var1 = 42;
gboolean res = FALSE;
res = statement_3 (var1);
retval = res ? -1 : 1;
}
While curly braces for function definitions should rest on a new line
they should not add an indentation level:
/* valid */
static void
my_function (int argument)
{
do_my_things ();
}
/* invalid */
static void
my_function (int argument) {
do_my_things ();
}
/* invalid */
static void
my_function (int argument)
{
do_my_things ();
}
Curly braces must not be placed on the same line as a condition:
/* invalid */
if (condition) {
statement_1 ();
statement_2 ();
}
+ Conditions
Do not check boolean values for equality:
/* invalid */
if (condition == TRUE)
do_foo ();
/* valid */
if (another_condition)
do_bar ();
Even if C handles NULL equality like a boolean, be explicit:
/* valid */
if (some_pointer == NULL)
do_blah ();
/* invalid */
if (some_other_pointer)
do_blurp ();
In case of conditions split over multiple lines, the logical operators should
always go at the end of the line:
/* invalid */
if (condition1
|| condition2
|| condition3)
{
do_foo ();
}
/* valid */
if (condition1 &&
condition2 &&
(condition3 || (condition4 && condition5)))
{
do_blah ();
}
+ Functions
Functions should be declared by placing the returned value on a separate
line from the function name:
void
my_function (void)
{
}
The arguments list must be broken into a new line for each argument,
with the argument names right aligned, taking into account pointers:
void
my_function (some_type_t type,
another_type_t *a_pointer,
final_type_t another_type)
{
}
The alignment also holds when invoking a function without breaking the
80 characters limit:
align_function_arguments (first_argument,
second_argument,
third_argument);
To respect the 80 characters limit do not break the function name from
the arguments:
/* invalid */
a_very_long_function_name_with_long_parameters
(argument_the_first, argument_the_second);
/* valid */
first_a = argument_the_first;
second_a = argument_the_second;
a_very_long_function_name_with_long_parameters (first_a, second_a);
+ Whitespace
Always put a space before a parenthesis but never after:
/* valid */
if (condition)
do_my_things ();
/* valid */
switch (condition)
{
}
/* invalid */
if(condition)
do_my_things();
/* invalid */
if ( condition )
do_my_things ( );
A switch() should open a block on a new indentation level, and each case
should start on the same indentation level as the curly braces, with the
case block on a new indentation level:
/* valid */
switch (condition)
{
case FOO:
do_foo ();
break;
case BAR:
do_bar ();
break;
}
/* invalid */
switch (condition) {
case FOO: do_foo (); break;
case BAR: do_bar (); break;
}
/* invalid */
switch (condition)
{
case FOO: do_foo ();
break;
case BAR: do_bar ();
break;
}
/* invalid */
switch (condition)
{
case FOO:
do_foo ();
break;
case BAR:
do_bar ();
break;
}
It is preferable, though not mandatory, to separate the various cases with
a newline:
switch (condition)
{
case FOO:
do_foo ();
break;
case BAR:
do_bar ();
break;
default:
do_default ();
}
The 'break' statement for the default: case is not mandatory.
If a case block needs to declare new variables, the same rules as the
inner blocks (see above) apply; the break statement should be placed
outside of the inner block:
switch (condition)
{
case FOO:
{
int foo;
foo = do_foo ();
}
break;
...
}
When declaring a structure type use newlines to separate logical sections
of the structure:
struct _GtkWrapBoxPrivate
{
GtkOrientation orientation;
GtkWrapAllocationMode mode;
GtkWrapBoxSpreading horizontal_spreading;
GtkWrapBoxSpreading vertical_spreading;
guint16 vertical_spacing;
guint16 horizontal_spacing;
guint16 minimum_line_children;
guint16 natural_line_children;
GList *children;
};
Do not eliminate whitespace and newlines just because something would
fit on 80 characters:
/* invalid */
if (condition) foo (); else bar ();
Do eliminate trailing whitespace on any line, preferably as a separate
patch or commit. Never use empty lines at the beginning or at the end of
a file.
Do enable the default git pre-commit hook that detect trailing
whitespace for you and help you to avoid corrupting GTK+'s tree with
it. Do that as follows:
chmod a+x .git/hooks/pre-commit
You might also find the git-stripspace utility helpful which acts as a
filter to remove trailing whitespace as well as initial, final, and
duplicate blank lines.
+ Headers
Headers are special, for GTK+, in that they don't have to obey the
80 characters limit. The only major rule for headers is that the function
definitions should be vertically aligned in three columns:
return value function_name (type argument,
type argument,
type argument);
The maximum width of each column is given by the longest element in the
column:
void gtk_type_set_property (GtkType *type,
const gchar *value,
GError **error);
G_CONST_RETURN gchar *gtk_type_get_property (GtkType *type);
It is also possible to align the columns to the next tab:
void gtk_type_set_prop (GtkType *type,
gfloat value);
gfloat gtk_type_get_prop (GtkType *type);
gint gtk_type_update_foobar (GtkType *type);
Public headers should never be included directly:
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
All headers should have inclusion guards (for internal usage)
and C++ guards:
#ifndef __GTK_FOO_H__
#define __GTK_FOO_H__
#include <gtk/gtk-bar.h>
G_BEGIN_DECLS
...
G_END_DECLS
#endif /* __GTK_FOO_H__ */
+ Includes
GTK+ source files should never include the global gtk.h header, but
instead include the individual headers that are needed. Every file must
include config.h first, then its own header, then other GTK+ headers
that it needs, then system and third-party headers that it needs.
/* valid */
#include "config.h"
#include "gtkfoo.h"
#include "gtkwidget.h"
#include "gtkbutton.h"
...
#include <string.h>
+ GObject
GObject classes definition and implementation require some additional
coding style notices.
Typedef declarations should be placed at the beginning of the file:
typedef struct _GtkFoo GtkFoo;
typedef struct _GtkFooClass GtkFooClass;
typedef struct _GtkFooPrivate GtkFooPrivate;
This includes enumeration types:
typedef enum
{
GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT,
GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
} GtkSizeRequestMode;
And callback types:
typedef void (* GtkCallback) (GtkWidget *widget,
gpointer user_data);
Instance structures should only contain the parent type and a pointer to a
private data structure, and they should be annotated as "private":
struct _GtkFoo
{
/*< private >*/
GtkWidget parent_instance;
GtkFooPrivate *priv;
};
All the properties should be stored inside the private data structure, which
is defined inside the source file - or, if needed, inside a private header
file; the private header filename must end with "private.h" and must not be
installed.
The private data structure should only be accessed internally using the
pointer inside the instance structure, and never using the
G_TYPE_INSTANCE_GET_PRIVATE() macro or the g_type_instance_get_private()
function.
Always use the G_DEFINE_TYPE(), G_DEFINE_TYPE_WITH_CODE() macros, or
their abstract variants G_DEFINE_ABSTRACT_TYPE() and
G_DEFINE_ABSTRACT_TYPE_WITH_CODE(), and the similar macros for defining
interfaces.
Interface types should always have the dummy typedef for cast purposes:
typedef struct _GtkFoo GtkFoo;
The interface structure should have "Interface" postfixed to the dummy typedef:
typedef struct _GtkFooInterface GtkFooInterface;
Interfaces must have the following macros:
- Macro: - Expands to:
• GTK_TYPE_<iface_name> <iface_name>_get_type
• GTK_<iface_name> G_TYPE_CHECK_INSTANCE_CAST
• GTK_IS_<iface_name> G_TYPE_CHECK_INSTANCE_TYPE
• GTK_<iface_name>_GET_IFACE G_TYPE_INSTANCE_GET_INTERFACE
+ Memory allocation
When dynamically allocating data on the heap either use g_new() or,
if allocating multiple small data structures, g_slice_new().
Public structure types should always be returned after being zero-ed,
either explicitly for each member, or by using g_new0() or g_slice_new0().
+ Macros
Try to avoid private macros unless strictly necessary. Remember to #undef
them at the end of a block or a series of functions needing them.
Inline functions are usually preferable to private macros.
Public macros should not be used unless they evaluate to a constant.
+ Public API
Avoid exporting variables as public API, since this is cumbersome on some
platforms. It is always preferable to add getters and setters instead.
All public functions must be listed in the gtk.symbols file.
+ Private API
Non-exported functions that are needed in more than one source file
should be named "_gtk_...", and declared in a private header file.
Underscore-prefixed functions are never exported.
Non-exported functions that are only needed in one source file
should be declared static.
+ Documentation
All public APIs must have gtk-doc comments. For functions, these should
be placed in the source file, directly above the function.
/* valid */
/**
* gtk_get_flow:
* @widget: a #GtkWidget
*
* Gets the flow of a widget.
*
* Note that flows may be laminar or turbulent...
*
* Returns: (transfer none): the flow of @widget
*/
GtkFlow *
gtk_get_flow (GtkWidget *widget)
{
...
}
Doc comments for macros, function types, class structs, etc should be
placed next to the definitions, typically in headers.
Section introductions should be placed in the source file they describe,
after the license header:
/* valid */
/**
* SECTION:gtksizerequest
* @Short_Description: Height-for-width geometry management
* @Title: GtkSizeRequest
*
* The GtkSizeRequest interface is GTK+'s height-for-width (and
* width-for-height) geometry management system.
* ...
*/
To properly document a new function, macro, function type or struct,
it needs to be listed in the gtk3-sections.txt file.
To properly document a new class, it needs to be given its own section
in gtk3-sections.txt, needs to be included in gtk-docs.sgml, and the
get_type function needs to listed in gtk3.types.
+ Old code
New code that is being added to GTK+ should adhere to the style
explained above. Existing GTK+ code does largely follow these
conventions, but there are some differences, e.g. occurrences
of tabs, etc.
It is ok to update the style of a code block or function when you
are touching it anyway, but sweeping whitespace changes obscure the
git history and should be avoided.

View File

@@ -1,25 +1,23 @@
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
SUBDIRS = reference tools
SUBDIRS = tutorial faq reference tools
EXTRA_DIST += \
CODING-STYLE \
defsformat.txt \
developers.txt \
dnd_internals.txt \
focus_tracking.txt \
generation.txt \
gtkdocs_fix \
make-todo \
refcounting.txt \
RELEASE-HOWTO \
sizing-test.txt \
styles.txt \
text_widget_internals.txt \
text_widget.txt \
tree-column-sizing.png \
text_widget_internals.txt \
tree-column-sizing.txt \
widget_geometry.txt \
widget_system.txt
widget_system.txt \
generation.txt \
gtkdocs_fix \
RELEASE-HOWTO
-include $(top_srcdir)/git.mk

338
docs/defsformat.txt Normal file
View File

@@ -0,0 +1,338 @@
The overall syntax is:
(type-of-thing-being-defined name-used-to-refer-to-this-thing
(attribute-name attribute-value-depending-on-the-attribute)
(attribute-name attribute-value-depending-on-the-attribute)
(attribute-name attribute-value-depending-on-the-attribute))
Some definitions can have a c-declaration field that gives the C code
we parsed to arrive at the definition. The c-declaration is a quoted
string because it can contain parentheses and such.
Defined types and their attributes:
===
(module module-name
(submodule-of module-name)) ;; submodule is optional
Ex: (module Gtk)
Ex: (module Rgb
(submodule-of Gdk))
modules are later referred to with a list of module names, like
(Gdk Rgb) or (Gtk)
Object and boxed type definitions automatically create a submodule.
For example, GtkCList creates the module (module CList (submodule-of
(Gtk))) which is referred to as module (Gtk CList).
===
(type
(alias some-unique-identifier)
(in-module module-name) ;; optional, gchar* is not in a module
(gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
;; in the type system
(is-parametric boolean) ;; optional default to #f
(in-c-name name-of-symbol-in-C)
(out-c-name name-of-symbol-in-C)
(inout-c-name name-of-symbol-in-C))
Ex: (type
(alias string)
(gtk-type-id GTK_TYPE_STRING)
(in-c-name "const gchar*")
(out-c-name "gchar**") ;; actually I'm not sure how strings work out/inout
(inout-c-name "gchar*"))
(type
(alias list)
(gtk-type-id GTK_TYPE_POINTER)
(is-parametric #t)
(in-c-name "GList*")
(out-c-name "GList**")
(inout-c-name "GList**"))
;; This one would be implied by the (object) def for GtkWidget I
;; think - (type) is only required for types that are not implied
;; by other definitions, such as int/boolean/etc.
(type
(alias GtkWidget)
(in-module (Gtk))
(gtk-type-id GTK_TYPE_WIDGET)
(in-c-name "GtkWidget*")
(inout-c-name "GtkWidget*")
(out-c-name "GtkWidget**"))
"Type" bindings are automatically assumed for objects, boxed types,
etc. as defined below.
The alias field is used to refer to the type later on.
Whenever a type alias can be used, it is also possible to use the
keyword "native", which implies that the type in question is too
C-specific to represent. Then a c-declaration will typically be
available for use.
C types containing [] or () are function pointers or arrays. For
arrays that don't specify a size, we just treat them as pointers. For
function pointers, we need special (type) syntax/attributes of some
kind, but since there basically aren't any of these right now in the
libs we care about we can just ignore them. For arrays that specify a
size ditto, you would handle them by adding an (array-size) attribute
or something or using the "native" keyword and skipping the (type)
stuff.
===
(object object-name
(in-module module-name-list)
(parent object-name optional-module-name-if-different)
(abstract boolean-is-abstract-class) ;; omit for default of #f
(c-name name-of-the-object-in-C)
(field (type-and-name type-alias-of-struct-field name-of-struct-field)
(access read-or-write-or-readwrite)))
Ex: (object Widget
(in-module (Gtk))
(parent Object) ;; could say (parent Object (Gtk))
(abstract #t)
(c-name GtkWidget)
(field (type-and-name GdkWindow* window) (access read)))
An "object" declaration automatically implies the type definition:
(type
(alias concat-module-elements-and-object-name)
(in-c-name pointer-to-c-name)
(out-c-name pointer-to-pointer-to-c-name)
(inout-c-name pointer-to-c-name))
Ex:
(type (alias GtkWidget)
(in-c-name GtkWidget*)
(out-c-name GtkWidget**)
(inout-c-name GtkWidget*))
It also implies a module that is the name broken into parts:
(module CTree
(submodule-of Gtk))
===
(function function-name
(in-module module-name-list) ;; "static methods" go in their
;; object's module
(is-constructor-of object-type-alias) ;; optional, marks a constructor
(c-name function-name)
(return-type return-value-type) ;; defaults to void
(caller-owns-return boolean-value) ;; defaults to #f
(can-return-null boolean-value) ;; defaults to #t
(parameter in-or-out-or-inout
(type-and-name parameter-type-alias parameter-name)
(type-parameter name-of-contained-type) ;; optional, requires parametric type
(c-declaration "c-type-and-name")) ;; c-declaration only required
;; if the type alias is "native"
(varargs #t) ;; has varargs at the end
)
Ex:
(function init
(in-module (Gdk Rgb)
(c-name gdk_rgb_init)))
Ex:
(function new
(in-module (Gdk Rgb Cmap))
(is-constructor-of GdkRgbCmap)
(c-name gdk_rgb_cmap_new)
(return-type GdkRgbCmap)
(caller-owns-return #t) ;; perhaps this could be implied by is-constructor-of
(parameter in (type-and-name array-of-guint32 colors))
(parameter in (type-and-name gint n_colors)))
Ex:
(function config_set_set_handler
(in-module (Gnome))
(c-name gnome_config_set_set_handler)
(parameter in (type-and-name native func)
(c-declaration "void (*func)(void*)"))
(parameter in (type-and-name gpointer data)))
===
(method method-name
(of-object object-name module-name)
;; retval/arg attributes as for (function), but with first parameter
;; omitted for non-constructors
)
Ex:
(method set_text
(of-object Label (Gtk))
(parameter (type-and-name const-gchar* str)))
===
(object-argument arg-name
(of-object object-we-are-an-argument-of optional-objects-module)
(type-id argument-type) ;; GTK_TYPE_OBJECT etc.
;; flags all default to #f
(readable bool-value)
(writeable bool-value)
(construct-only bool-value))
Ex:
(object-argument label
(of-object Label (Gtk))
(type GTK_TYPE_STRING)
(readable #t)
(writeable #t))
===
(signal signal-name
(run-action bool-value)
(run-first bool-value)
(run-last bool-value)
(of-object object-we-are-a-signal-of optional-objects-module)
;; return value and parameters as for a function, omitting the object
;; and user data parameters
;; what other properties matter for a signal?
)
Ex:
(signal select_row
(of-object CList (Gtk))
(run-first #t)
;; return type defaults to void
(parameter in (type-and-name gint row))
(parameter in (type-and-name gint column))
(parameter in (type-and-name GdkEvent* event)))
===
(enum enum-name
(in-module modname)
(c-name name-in-c)
(value (nick value-name-noprefixes-hyphen-lowercase) (c-name value-c-name)))
Ex:
(enum DirectionType
(in-module Gtk)
(c-name GtkDirectionType)
(value (nick tab-forward) (c-name GTK_DIR_TAB_FORWARD))
(value (nick tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
(value (nick up) (c-name GTK_DIR_UP))
(value (nick down) (c-name GTK_DIR_DOWN))
(value (nick left) (c-name GTK_DIR_LEFT))
(value (nick right) (c-name GTK_DIR_RIGHT)))
(enum Pos
(in-module (Gtk CTree))
(c-name GtkCTreePos)
(value (nick before) (c-name GTK_CTREE_POS_BEFORE))
(value (nick as-child) (c-name GTK_CTREE_POS_AS_CHILD))
(value (nick after) (c-name GTK_CTREE_POS_AFTER)))
===
(flags) is just like enum, but some bindings may wrap enums and flags differently.
===
(boxed boxed-name
(in-module modname)
(c-name c-name)
(ref-func func-to-increase-refcount)
(copy-func func-to-copy)
(release-func func-to-destroy-or-decrement-refcount)
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
It is never OK to use memcpy() to copy a boxed type, or use
malloc()/free() to alloc/free one.
Ex:
(boxed Pixmap
(in-module (Gdk))
(c-name GdkPixmap)
(ref-func pixmap_ref)
(release-func pixmap_unref))
An "object" declaration automatically implies the type definition:
(type
(alias concat-module-elements-and-boxed-name)
(in-c-name pointer-to-c-name)
(out-c-name pointer-to-pointer-to-c-name)
(inout-c-name pointer-to-c-name))
Ex:
(type (alias GdkPixmap)
(in-c-name GdkPixmap*)
(out-c-name GdkPixmap**)
(inout-c-name GdkPixmap*))
===
(struct struct-name
(in-module modname)
(c-name c-name)
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
Unlike a boxed type, a struct type can be copied with memcpy() and
allocated on the stack or with g_malloc().
Ex:
(struct Rectangle
(in-module (Gdk))
(c-name GdkRectangle)
(field (type-and-name gint16 x) (access readwrite))
(field (type-and-name gint16 y) (access readwrite))
(field (type-and-name guint16 width) (access readwrite))
(field (type-and-name guint16 height) (access readwrite)))
Implies GdkRectangle type alias:
(type (alias GdkRectangle)
(in-c-name GdkRectangle*)
(out-c-name GdkRectangle*) ;; note - not the same as boxed types
(inout-c-name GdkRectangle*))
===
(user-function name
(in-module module)
(c-name c-typedef-name)
;; return-type and parameters as for (function)
)
Ex:
(user-function PrintFunc
(in-module (Gtk))
(parameter in (type-and-name gpointer func_data))
(parameter in (type-and-name gchar* str)))
===
(typedef new-name
(in-module module)
(c-name c-full-name)
(orig-type alias-of-orig-type))
Ex:
(typedef Type
(in-module (Gtk))
(c-name GtkType)
(orig-type guint))

44
docs/faq/Makefile.am Normal file
View File

@@ -0,0 +1,44 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
gtk-faq.sgml
if HAVE_DOCBOOK
html:
if test -w $(srcdir); then \
(cd $(srcdir); \
db2html gtk-faq.sgml; \
test -d html && rm -r html; \
mv gtk-faq html); \
fi
pdf:
if test -w $(srcdir); then \
(cd $(srcdir); db2pdf gtk-faq.sgml); \
fi
all-local: html
dist-hook: html
cp -Rp $(srcdir)/html $(distdir)
else
html:
echo "***"
echo "*** Warning: FAQ not built"
echo "***"
pdf:
echo "***"
echo "*** Warning: FAQ not built"
echo "***"
dist-hook:
echo "***"
echo "*** Warning: FAQ not built"
echo "*** DISTRIBUTION IS INCOMPLETE"
echo "***"
endif
.PHONY: html
-include $(top_srcdir)/git.mk

3637
docs/faq/gtk-faq.sgml Normal file

File diff suppressed because it is too large Load Diff

236
docs/gtk-config.txt Normal file
View File

@@ -0,0 +1,236 @@
CONFIGURING PACKAGES TO WORK WITH GTK
-------------------------------------
Compiling a program successfully against the GTK, GDK, and GLIB
libraries can require a large number of command line options
to your compiler and linker that are hard to guess correctly.
The additional libraries required may, for example, depend on the
manner which GTK was configured
Several tools are included in this package to make process
easier.
First, there is the shell script 'gtk-config' (installed in
$exec_prefix/bin):
Invoking gtk-config
-------------------
gtk-config takes the following flags:
--version
Prints out the version of GTK installed
--cflags
Prints '-I' flags pointing to the installed header files.
--libs
Prints out the linker flags necessary to link a program against GTK
--prefix[=PREFIX]
If PREFIX is specified, overrides the configured value of $prefix.
(And of exec-prefix, unless --exec-prefix is also specified)
Otherwise, prints out the configured value of $prefix
--exec-prefix[=PREFIX]
If PREFIX is specified, overrides the configured value of $exec_prefix.
Otherwise, prints out the configured value of $exec_prefix
You may also add to the command line a list of additional
libraries that gtk-config should supply the CFLAGS and LIBS
for. The only currently supported library is 'gthread'.
As an example of this latter usage, you can get the
appropriate cflags for a threaded program with:
gtk-config --cflags gthread
Example of using gtk-config
---------------------------
Typically, gtk-config will be used within a configure script,
as described below. It, however, can also be used directly
from the command line to compile a simple program. For example:
cc -o simple `gtk-config --cflags` simple.c `gtk-config --libs`
This command line might expand to (for example):
cc -o simple -I/usr/local/lib/glib/include -I/usr/local/include \
-I/usr/X11R6/include simple.c -L/usr/local/lib -L/usr/X11R6/lib \
-lgtk -lgdk -lglib -lXi -lXext -lX11 -lm
Not only is the form using gtk-config easier to type, it will
work on any system, no matter how GTK was configured.
AM_PATH_GTK
-----------
For packages configured using GNU automake, GTK also provides
a macro to automate the process of running GTK.
AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
This macro:
* Determines the location of GTK using gtk-config, which is either
found in the user's path, or from the environment variable
GTK_CONFIG
* Tests the installed libraries to make sure that there version
is later than MINIMUM-VERSION. (A default version will be used
if not specified)
* If the required version was found, sets the GTK_CFLAGS variable to
the output of `gtk-config --cflags` and the GTK_LIBS variable to
the output of `gtk-config --libs`, and calls AC_SUBST() for these
variables so they can be used in generated makefiles, and then
executes ACTION-IF-FOUND.
* If the required version was not found, sets GTK_CFLAGS and GTK_LIBS
to empty strings, and executes ACTION-IF-NOT-FOUND.
This macro is in file 'gtk.m4' which is installed in $datadir/aclocal.
Note that if automake was installed with a different --prefix than
GTK, you will either have to manually move gtk.m4 to automake's
$datadir/aclocal, or give aclocal the -I option when running it.
Configuring a package that uses AM_PATH_GTK
-------------------------------------------
Simply make sure that gtk-config is in your path, and run
the configure script.
Notes:
* The directory where the GTK libraries are installed needs
to be found by your system's dynamic linker.
This is generally done by
editing /etc/ld.so.conf and running ldconfig
Or by:
setting the environment variable LD_LIBRARY_PATH,
or, as a last resort,
Giving a -R or -rpath flag (depending on your linker) when
running configure, for instance:
LDFLAGS=-R/usr/home/owen/lib ./configure
* You can also specify a gtk-config not in your path by
setting the GTK_CONFIG environment variable to the
name of the executable
* If you move the GTK package from its installed location,
you will need either need to modify gtk-config script
manually to point to the new location or rebuild GTK.
Advanced note:
* configure flags
--with-gtk-prefix=PREFIX
--with-gtk-exec-prefix=PREFIX
are provided to override the prefix and exec-prefix that were stored
in the gtk-config shell script by GTK's configure. You are generally
better off configuring GTK with the right path to begin with.
Example of a package using AM_PATH_GTK
--------------------------------------
The following shows how to build a simple package using automake
and the AM_PATH_GTK macro. The program used here is the testinput.c
You should first read the introductory portions of the automake
Manual, if you are not already familiar with it.
Two files are needed, 'configure.ac', which is used to build the
configure script:
==configure.ac===
dnl Process this file with autoconf to produce a configure script.
AC_INIT(testinput.c)
AM_INIT_AUTOMAKE(testinput.c, 1.0.0)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
AM_PATH_GTK(0.99.5,
[LIBS="$LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"],
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
AC_OUTPUT(Makefile)
=================
The only command in this which is not standard for automake
is the AM_PATH_GTK() macro.
That command does the following:
If a GTK version greater than 0.99.5 is found, adds $GTK_LIBS to
$LIBS and $GTK_CFLAGS to $CFLAGS. Otherwise, dies with the error
message "Cannot find GTK: Is gtk-config in path?"
And the 'Makefile.am', which will be used to build the Makefile.
== Makefile.am ==
bin_PROGRAMS = testinput
testinput_SOURCES = testinput.c
=================
This Makefile.am, says that we are building a single executable,
from a single sourcefile 'testinput.c'. Since every program
we are building uses GTK we simply added the GTK options
to $LIBS and $CFLAGS, but in other circumstances, we might
want to specify them on a per-program basis: for instance by
adding the lines:
testinput_LDADD = $(GTK_LIBS)
INCLUDES = $(GTK_CFLAGS)
to the Makefile.am.
To try this example out, create a new directory, add the two
files above two it, and copy the testinput.c file from
the gtk/ subdirectory to the new directory. Edit the line:
#include "gtk.h"
in testgtk.c, to read:
#include <gtk/gtk.h>
Now execute the following commands:
automake --add-missing
aclocal
autoconf
You now have a package that can be built in the normal fashion
./configure
make
make install
Notes:
* If you are converting a package that used a pre-1.0 version of
GTK, you should remove the autoconf tests for X. The results
of these tests are included in gtk-config and will be added
to GTK_LIBS and GTK_CFLAGS by the AM_PATH_GTK macro.
Owen Taylor
14 Mar 1997

View File

@@ -1,4 +1,5 @@
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
AUTOMAKE_OPTIONS = 1.6
@@ -12,39 +13,40 @@ 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 ../../../gdk/x11
DOC_SOURCE_DIR=../../../gdk
# 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 \
gdk*private.h \
gdkpoly-generic.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/libgdk-3.0.la $(GDK_DEP_LIBS)
GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib)
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=gdk
@@ -55,85 +57,86 @@ 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= \

View File

@@ -17,30 +17,47 @@
<reference id="reference">
<title>API Reference</title>
<xi:include href="xml/general.xml" />
<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/drawing.xml" />
<xi:include href="xml/pixmaps.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" />
<xi:include href="xml/fonts.xml" />
<xi:include href="xml/cursors.xml" />
<xi:include href="xml/windows.xml" />
<xi:include href="xml/events.xml" />
<xi:include href="xml/event_structs.xml" />
<xi:include href="xml/keys.xml" />
<xi:include href="xml/selections.xml" />
<xi:include href="xml/dnd.xml" />
<xi:include href="xml/properties.xml" />
<xi:include href="xml/threads.xml" />
<xi:include href="xml/input.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" />
<xi:include href="xml/gdkapplaunchcontext.xml" />
<xi:include href="xml/gdktesting.xml" />
</reference>

View File

@@ -1,4 +1,27 @@
# GdkPixmap, GdkBitmap and GdkDrawable are the same as GdkWindow.
<STRUCT>
<NAME>GdkWindow</NAME>
struct GdkPixmap
{
gpointer user_data;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixmap</NAME>
struct GdkPixmap
{
gpointer user_data;
};
</STRUCT>
<STRUCT>
<NAME>GdkDrawable</NAME>
struct GdkDrawable
{
gpointer user_data;
};
</STRUCT>
# GdkAtom is an opaque typedef
<STRUCT>
<NAME>GdkAtom</NAME>

View File

@@ -8,6 +8,8 @@ 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
@@ -45,7 +47,6 @@ gdk_beep
<SUBSECTION>
gdk_error_trap_push
gdk_error_trap_pop
gdk_error_trap_pop_ignored
<SUBSECTION>
GDK_WINDOWING_X11
@@ -61,6 +62,7 @@ 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
@@ -76,14 +78,17 @@ 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
@@ -116,17 +121,23 @@ 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_list_devices
gdk_display_get_device_state
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
@@ -139,11 +150,7 @@ 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
@@ -165,8 +172,7 @@ gdk_display_manager_get
gdk_display_manager_get_default_display
gdk_display_manager_set_default_display
gdk_display_manager_list_displays
gdk_display_manager_open_display
gdk_display_get_core_pointer
<SUBSECTION Standard>
GDK_DISPLAY_MANAGER
GDK_DISPLAY_MANAGER_CLASS
@@ -183,7 +189,11 @@ gdk_display_manager_get_type
<TITLE>GdkScreen</TITLE>
GdkScreen
gdk_screen_get_default
gdk_screen_get_default_colormap
gdk_screen_set_default_colormap
gdk_screen_get_system_colormap
gdk_screen_get_system_visual
gdk_screen_get_rgba_colormap
gdk_screen_get_rgba_visual
gdk_screen_is_composited
gdk_screen_get_root_window
@@ -212,6 +222,10 @@ 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
@@ -225,17 +239,50 @@ GdkScreenClass
gdk_screen_get_type
</SECTION>
<SECTION>
<TITLE>Bitmaps and Pixmaps</TITLE>
<FILE>pixmaps</FILE>
GdkPixmap
gdk_pixmap_new
GdkBitmap
<SUBSECTION Standard>
GDK_PIXMAP
GDK_PIXMAP_GET_CLASS
GDK_PIXMAP_OBJECT
GDK_TYPE_PIXMAP
GDK_IS_PIXMAP
GDK_PIXMAP_CLASS
GDK_IS_PIXMAP_CLASS
<SUBSECTION Private>
gdk_pixmap_get_type
GdkPixmapObject
GdkPixmapObjectClass
</SECTION>
<SECTION>
<TITLE>Pixbufs</TITLE>
<FILE>pixbufs</FILE>
gdk_pixbuf_get_from_window
gdk_pixbuf_render_threshold_alpha
gdk_pixbuf_render_pixmap_and_mask
gdk_pixbuf_render_pixmap_and_mask_for_colormap
gdk_pixbuf_get_from_drawable
gdk_pixbuf_get_from_surface
</SECTION>
<SECTION>
<TITLE>Colors</TITLE>
<TITLE>Colormaps and Colors</TITLE>
<FILE>colors</FILE>
GdkColor
GdkColormap
gdk_colormap_new
gdk_colormap_get_system
gdk_colormap_alloc_colors
gdk_colormap_alloc_color
gdk_colormap_free_colors
gdk_colormap_get_visual
gdk_colormap_get_screen
gdk_color_copy
gdk_color_free
gdk_color_parse
@@ -244,28 +291,44 @@ gdk_color_hash
gdk_color_to_string
<SUBSECTION Standard>
GDK_COLORMAP
GDK_COLORMAP_GET_CLASS
GDK_TYPE_COLORMAP
GDK_IS_COLORMAP
GDK_COLORMAP_CLASS
GDK_IS_COLORMAP_CLASS
GDK_TYPE_COLOR
<SUBSECTION Private>
GdkColormapClass
gdk_colormap_get_type
gdk_color_get_type
</SECTION>
<SECTION>
<TITLE>RGBA Colors</TITLE>
<FILE>rgba_colors</FILE>
GdkRGBA
gdk_rgba_copy
gdk_rgba_free
gdk_rgba_parse
gdk_rgba_equal
gdk_rgba_hash
gdk_rgba_to_string
<TITLE>Drawing Primitives</TITLE>
<FILE>drawing</FILE>
GdkDrawable
gdk_drawable_get_display
gdk_drawable_get_screen
gdk_drawable_get_visual
gdk_drawable_set_colormap
gdk_drawable_get_colormap
gdk_drawable_get_depth
gdk_drawable_get_size
gdk_drawable_get_clip_region
gdk_drawable_get_visible_region
<SUBSECTION Standard>
GDK_TYPE_RGBA
GDK_DRAWABLE
GDK_DRAWABLE_GET_CLASS
GDK_TYPE_DRAWABLE
GDK_IS_DRAWABLE
GDK_DRAWABLE_CLASS
GDK_IS_DRAWABLE_CLASS
<SUBSECTION Private>
gdk_rgba_get_type
GdkDrawableClass
</SECTION>
<SECTION>
@@ -314,7 +377,7 @@ gdk_visual_get_type
<FILE>windows</FILE>
GdkWindow
GdkWindowType
GdkWindowWindowClass
GdkWindowClass
GdkWindowHints
GdkGeometry
GdkGravity
@@ -325,9 +388,6 @@ GdkWindowAttributesType
gdk_window_new
gdk_window_destroy
gdk_window_get_window_type
gdk_window_get_display
gdk_window_get_screen
gdk_window_get_visual
gdk_window_at_pointer
gdk_window_show
gdk_window_show_unraised
@@ -361,6 +421,9 @@ gdk_window_flush
gdk_window_has_native
gdk_window_ensure_native
gdk_window_reparent
gdk_window_clear
gdk_window_clear_area
gdk_window_clear_area_e
gdk_window_raise
gdk_window_lower
gdk_window_restack
@@ -372,16 +435,13 @@ gdk_window_constrain_size
gdk_window_beep
<SUBSECTION>
gdk_window_get_clip_region
gdk_window_begin_paint_rect
gdk_window_begin_paint_region
gdk_window_end_paint
gdk_window_get_visible_region
<SUBSECTION>
gdk_window_invalidate_rect
gdk_window_invalidate_region
GdkWindowChildFunc
gdk_window_invalidate_maybe_recurse
gdk_window_get_update_area
gdk_window_freeze_updates
@@ -389,6 +449,7 @@ gdk_window_thaw_updates
gdk_window_process_all_updates
gdk_window_process_updates
gdk_window_set_debug_updates
gdk_window_get_internal_paint_info
gdk_window_enable_synchronized_configure
gdk_window_configure_finished
@@ -404,17 +465,18 @@ gdk_window_remove_filter
GdkFilterFunc
GdkFilterReturn
GdkXEvent
gdk_window_shape_combine_mask
gdk_window_shape_combine_region
gdk_window_set_child_shapes
gdk_window_merge_child_shapes
gdk_window_input_shape_combine_mask
gdk_window_input_shape_combine_region
gdk_window_set_child_input_shapes
gdk_window_merge_child_input_shapes
gdk_window_set_static_gravities
gdk_window_set_title
gdk_window_set_background
gdk_window_set_background_rgba
gdk_window_set_background_pattern
gdk_window_set_back_pixmap
gdk_window_get_background_pattern
GDK_PARENT_RELATIVE
gdk_window_set_cursor
@@ -422,8 +484,6 @@ gdk_window_get_cursor
gdk_window_get_user_data
gdk_window_get_geometry
gdk_window_set_geometry_hints
gdk_window_get_width
gdk_window_get_height
gdk_window_set_icon_list
gdk_window_set_modal_hint
gdk_window_get_modal_hint
@@ -436,6 +496,7 @@ gdk_window_get_position
gdk_window_get_root_origin
gdk_window_get_frame_extents
gdk_window_get_origin
gdk_window_get_deskrelative_origin
gdk_window_get_root_coords
gdk_window_get_pointer
gdk_window_get_device_position
@@ -446,6 +507,7 @@ gdk_window_get_children
gdk_window_peek_children
gdk_window_get_events
gdk_window_set_events
gdk_window_set_icon
gdk_window_set_icon_name
gdk_window_set_transient_for
gdk_window_set_role
@@ -466,14 +528,18 @@ gdk_window_get_device_cursor
gdk_window_set_device_cursor
gdk_window_get_device_events
gdk_window_set_device_events
gdk_window_get_source_events
gdk_window_set_source_events
<SUBSECTION>
gdk_offscreen_window_get_surface
GdkPointerHooks
gdk_set_pointer_hooks
<SUBSECTION>
gdk_offscreen_window_get_pixmap
gdk_offscreen_window_set_embedder
gdk_offscreen_window_get_embedder
gdk_window_geometry_changed
gdk_window_redirect_to_drawable
gdk_window_remove_redirection
gdk_window_coords_from_parent
gdk_window_coords_to_parent
gdk_window_get_effective_parent
@@ -490,6 +556,7 @@ 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
@@ -498,11 +565,12 @@ GDK_TYPE_WM_DECORATION
GDK_TYPE_WM_FUNCTION
<SUBSECTION Private>
gdk_window_get_type
gdk_window_window_class_get_type
GdkWindowClass
gdk_window_object_get_type
gdk_drawable_get_type
GdkWindowObject
GdkWindowObjectClass
GdkWindowImpl
GdkWindowImplClass
GdkWindowImplIface
GdkWindowRedirect
gdk_window_impl_get_type
gdk_window_freeze_toplevel_updates_libgtk_only
@@ -545,8 +613,17 @@ 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
@@ -573,14 +650,12 @@ gdk_pango_context_get_for_screen
<FILE>cairo_interaction</FILE>
gdk_window_create_similar_surface
gdk_cairo_create
gdk_cairo_get_clip_rectangle
gdk_cairo_set_source_color
gdk_cairo_set_source_rgba
gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_window
gdk_cairo_set_source_pixmap
gdk_cairo_rectangle
gdk_cairo_region
gdk_cairo_region_create_from_surface
gdk_cairo_reset_clip
</SECTION>
<SECTION>
@@ -605,6 +680,7 @@ GDK_THREADS_LEAVE
gdk_threads_init
gdk_threads_enter
gdk_threads_leave
gdk_threads_mutex
gdk_threads_set_lock_functions
gdk_threads_add_idle
gdk_threads_add_idle_full
@@ -612,6 +688,10 @@ 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>
@@ -661,17 +741,25 @@ gdk_keymap_get_type
</SECTION>
<SECTION>
<TITLE>GdkDevice</TITLE>
<FILE>gdkdevice</FILE>
<TITLE>GdkDeviceManager</TITLE>
<FILE>gdkdevicemanager</FILE>
GdkDeviceManager
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
@@ -680,13 +768,10 @@ 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
@@ -694,8 +779,6 @@ 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
@@ -703,6 +786,14 @@ 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
@@ -710,6 +801,12 @@ 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
@@ -719,33 +816,15 @@ 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>
@@ -755,6 +834,7 @@ GDK_CURRENT_TIME
GDK_PRIORITY_EVENTS
GDK_PRIORITY_REDRAW
<SUBSECTION>
gdk_events_pending
gdk_event_peek
@@ -790,8 +870,6 @@ 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
@@ -823,6 +901,7 @@ GdkNativeWindow
GdkEventDND
GdkEventProximity
GdkEventClient
GdkEventNoExpose
GdkEventWindowState
GdkEventSetting
GdkEventOwnerChange
@@ -860,6 +939,7 @@ gdk_owner_change_get_type
GdkCursor
GdkCursorType
gdk_cursor_new
gdk_cursor_new_from_pixmap
gdk_cursor_new_from_pixbuf
gdk_cursor_new_from_name
gdk_cursor_new_for_display
@@ -881,31 +961,30 @@ 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
@@ -927,45 +1006,65 @@ gdk_drag_context_get_type
<TITLE>X Window System Interaction</TITLE>
<FILE>x_interaction</FILE>
GDK_ROOT_WINDOW
GDK_WINDOW_XDISPLAY
GDK_WINDOW_XID
GDK_PIXMAP_XDISPLAY
GDK_PIXMAP_XID
GDK_DISPLAY_XDISPLAY
GDK_DRAWABLE_XDISPLAY
GDK_DRAWABLE_XID
GDK_COLORMAP_XDISPLAY
GDK_COLORMAP_XCOLORMAP
GDK_SCREEN_XDISPLAY
GDK_SCREEN_XNUMBER
GDK_SCREEN_XSCREEN
GDK_VISUAL_XVISUAL
GDK_CURSOR_XCURSOR
GDK_CURSOR_XDISPLAY
GDK_WINDOW_XWINDOW
gdkx_visual_get
gdk_pixmap_foreign_new
gdk_pixmap_foreign_new_for_display
gdk_pixmap_foreign_new_for_screen
gdk_window_foreign_new
gdk_window_foreign_new_for_display
gdk_xid_table_lookup
gdk_xid_table_lookup_for_display
gdk_window_lookup
gdk_window_lookup_for_display
gdk_pixmap_lookup
gdk_pixmap_lookup_for_display
gdk_x11_lookup_xdisplay
gdk_x11_get_server_time
gdk_x11_display_get_user_time
gdk_x11_display_broadcast_startup_message
gdk_x11_display_get_startup_notification_id
gdk_x11_display_set_startup_notification_id
gdk_x11_display_get_xdisplay
gdk_x11_display_grab
gdk_x11_display_ungrab
gdk_x11_display_error_trap_push
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_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_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_display_get_user_time
gdk_x11_colormap_foreign_new
gdk_x11_colormap_get_xcolormap
gdk_x11_colormap_get_xdisplay
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
gdk_x11_display_broadcast_startup_message
gdk_x11_display_get_startup_notification_id
gdk_x11_display_get_xdisplay
gdk_x11_display_grab
gdk_x11_display_ungrab
gdk_x11_display_set_cursor_theme
gdk_x11_register_standard_event_type
gdk_x11_drawable_get_xdisplay
gdk_x11_drawable_get_xid
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
@@ -975,30 +1074,12 @@ 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_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
GDK_HAVE_WCHAR_H
GDK_HAVE_WCTYPE_H
gdk_x11_pixmap_get_drawable_impl
gdk_x11_window_get_drawable_impl
</SECTION>
<SECTION>
@@ -1020,6 +1101,7 @@ 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>

View File

@@ -1,13 +1,11 @@
#include <gdk/gdk.h>
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
gdk_drawable_get_type
gdk_window_object_get_type
gdk_pixmap_get_type
gdk_keymap_get_type
gdk_device_get_type
gdk_device_manager_get_type

View File

@@ -106,12 +106,12 @@ gtk_window_set_screen (window, second_screen);<!--
<para>
<variablelist>
<varlistentry>
<term><link linkend="GdkDisplay">GdkDisplay</link></term>
<term><link linkend="gdk-GdkDisplay">GdkDisplay</link></term>
<listitem><para>the GDK Object used to represent and manipulate display
related data</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GdkScreen">GdkScreen</link></term>
<term><link linkend="gdk-GdkScreen">GdkScreen</link></term>
<listitem><para>the GDK Object used to represent and query screen related
data</para></listitem>
</varlistentry>

View File

@@ -1,23 +1,2 @@
cairo_interaction.sgml
colors.sgml
cursors.sgml
dnd.sgml
drawing.sgml
events.sgml
event_structs.sgml
gdkapplaunchcontext.sgml
gdkdisplay.sgml
gdkdisplaymanager.sgml
gdkscreen.sgml
gdktesting.sgml
general.sgml
keys.sgml
pango_interaction.sgml
properties.sgml
pixbufs.sgml
regions.sgml
selections.sgml
threads.sgml
visuals.sgml
windows.sgml
x_interaction.sgml

View File

@@ -0,0 +1,99 @@
<!-- ##### SECTION Title ##### -->
Cairo Interaction
<!-- ##### SECTION Short_Description ##### -->
Functions to support using Cairo
<!-- ##### SECTION Long_Description ##### -->
<para>
<link href="http://cairographics.org">Cairo</link> is a graphics
library that supports vector graphics and image compositing that
can be used with GDK. Since 2.8, GTK+ does most of its drawing
using Cairo.
</para>
<para>
GDK does not wrap the Cairo API, instead it allows to create Cairo
contexts which can be used to draw on GDK drawables. Additional
functions allow to convert GDK's rectangles and regions into
Cairo paths and to use pixbufs as sources for drawing operations.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gdk_cairo_create ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_cairo_set_source_color ##### -->
<para>
</para>
@cr:
@color:
<!-- ##### FUNCTION gdk_cairo_set_source_pixbuf ##### -->
<para>
</para>
@cr:
@pixbuf:
@pixbuf_x:
@pixbuf_y:
<!-- ##### FUNCTION gdk_cairo_set_source_pixmap ##### -->
<para>
</para>
@cr:
@pixmap:
@pixmap_x:
@pixmap_y:
<!-- ##### FUNCTION gdk_cairo_rectangle ##### -->
<para>
</para>
@cr:
@rectangle:
<!-- ##### FUNCTION gdk_cairo_region ##### -->
<para>
</para>
@cr:
@region:
<!-- ##### FUNCTION gdk_cairo_reset_clip ##### -->
<para>
</para>
@cr:
@drawable:

View File

@@ -0,0 +1,185 @@
<!-- ##### SECTION Title ##### -->
Colormaps and Colors
<!-- ##### SECTION Short_Description ##### -->
Manipulation of colors and colormaps
<!-- ##### SECTION Long_Description ##### -->
<para>
These functions are used to modify colormaps.
A colormap is an object that contains the mapping
between the color values stored in memory and
the RGB values that are used to display color
values. In general, colormaps only contain
significant information for pseudo-color visuals,
but even for other visual types, a colormap object
is required in some circumstances.
</para>
<para>
There are a couple of special colormaps that can
be retrieved. The system colormap (retrieved
with gdk_colormap_get_system()) is the default
colormap of the system. If you are using GdkRGB,
there is another colormap that is important - the
colormap in which GdkRGB works, retrieved with
gdk_rgb_get_colormap(). However, when using GdkRGB,
it is not generally necessary to allocate colors
directly.
</para>
<para>
In previous revisions of this interface, a number
of functions that take a #GdkColormap parameter
were replaced with functions whose names began
with "gdk_colormap_".
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkColor ##### -->
<para>
The #GdkColor structure is used to describe an
allocated or unallocated color.
</para>
@pixel: For allocated colors, the value used to
draw this color on the screen.
@red: The red component of the color. This is
a value between 0 and 65535, with 65535 indicating
full intensitiy.
@green: The green component of the color.
@blue: The blue component of the color.
<!-- ##### STRUCT GdkColormap ##### -->
<para>
The colormap structure contains the following public fields.
</para>
<!-- ##### FUNCTION gdk_colormap_new ##### -->
<para>
</para>
@visual:
@allocate:
@Returns:
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
<para>
</para>
@colormap:
@colors:
@n_colors:
@writeable:
@best_match:
@success:
@Returns:
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
<para>
</para>
@colormap:
@color:
@writeable:
@best_match:
@Returns:
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
<para>
</para>
@colormap:
@colors:
@n_colors:
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
<para>
</para>
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
<para>
</para>
@cmap:
@Returns:
<!-- ##### FUNCTION gdk_color_copy ##### -->
<para>
</para>
@color:
@Returns:
<!-- ##### FUNCTION gdk_color_free ##### -->
<para>
</para>
@color:
<!-- ##### FUNCTION gdk_color_parse ##### -->
<para>
</para>
@spec:
@color:
@Returns:
<!-- ##### FUNCTION gdk_color_equal ##### -->
<para>
</para>
@colora:
@colorb:
@Returns:
<!-- ##### FUNCTION gdk_color_hash ##### -->
<para>
</para>
@colora:
@Returns:
<!-- ##### FUNCTION gdk_color_to_string ##### -->
<para>
</para>
@color:
@Returns:

View File

@@ -0,0 +1,227 @@
<!-- ##### SECTION Title ##### -->
Cursors
<!-- ##### SECTION Short_Description ##### -->
Standard and pixmap cursors
<!-- ##### SECTION Long_Description ##### -->
<para>
These functions are used to create and destroy cursors.
There is a number of standard cursors, but it is also
possible to construct new cursors from pixmaps and
pixbufs. There may be limitations as to what kinds of
cursors can be constructed on a given display, see
gdk_display_supports_cursor_alpha(),
gdk_display_supports_cursor_color(),
gdk_display_get_default_cursor_size() and
gdk_display_get_maximal_cursor_size().
</para>
<para>
Cursors by themselves are not very interesting, they must be be
bound to a window for users to see them. This is done with
gdk_window_set_cursor() or by setting the cursor member of the
#GdkWindowAttr struct passed to gdk_window_new().
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkCursor ##### -->
<para>
A <type>GdkCursor</type> structure represents a cursor.
</para>
<!-- ##### ENUM GdkCursorType ##### -->
<para>
The standard cursors available.
</para>
@GDK_X_CURSOR: <inlinegraphic format="PNG" fileref="X_cursor.png"></inlinegraphic>
@GDK_ARROW: <inlinegraphic format="PNG" fileref="arrow.png"></inlinegraphic>
@GDK_BASED_ARROW_DOWN: <inlinegraphic format="PNG" fileref="based_arrow_down.png"></inlinegraphic>
@GDK_BASED_ARROW_UP: <inlinegraphic format="PNG" fileref="based_arrow_up.png"></inlinegraphic>
@GDK_BOAT: <inlinegraphic format="PNG" fileref="boat.png"></inlinegraphic>
@GDK_BOGOSITY: <inlinegraphic format="PNG" fileref="bogosity.png"></inlinegraphic>
@GDK_BOTTOM_LEFT_CORNER: <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic>
@GDK_BOTTOM_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic>
@GDK_BOTTOM_SIDE: <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic>
@GDK_BOTTOM_TEE: <inlinegraphic format="PNG" fileref="bottom_tee.png"></inlinegraphic>
@GDK_BOX_SPIRAL: <inlinegraphic format="PNG" fileref="box_spiral.png"></inlinegraphic>
@GDK_CENTER_PTR: <inlinegraphic format="PNG" fileref="center_ptr.png"></inlinegraphic>
@GDK_CIRCLE: <inlinegraphic format="PNG" fileref="circle.png"></inlinegraphic>
@GDK_CLOCK: <inlinegraphic format="PNG" fileref="clock.png"></inlinegraphic>
@GDK_COFFEE_MUG: <inlinegraphic format="PNG" fileref="coffee_mug.png"></inlinegraphic>
@GDK_CROSS: <inlinegraphic format="PNG" fileref="cross.png"></inlinegraphic>
@GDK_CROSS_REVERSE: <inlinegraphic format="PNG" fileref="cross_reverse.png"></inlinegraphic>
@GDK_CROSSHAIR: <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic>
@GDK_DIAMOND_CROSS: <inlinegraphic format="PNG" fileref="diamond_cross.png"></inlinegraphic>
@GDK_DOT: <inlinegraphic format="PNG" fileref="dot.png"></inlinegraphic>
@GDK_DOTBOX: <inlinegraphic format="PNG" fileref="dotbox.png"></inlinegraphic>
@GDK_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="double_arrow.png"></inlinegraphic>
@GDK_DRAFT_LARGE: <inlinegraphic format="PNG" fileref="draft_large.png"></inlinegraphic>
@GDK_DRAFT_SMALL: <inlinegraphic format="PNG" fileref="draft_small.png"></inlinegraphic>
@GDK_DRAPED_BOX: <inlinegraphic format="PNG" fileref="draped_box.png"></inlinegraphic>
@GDK_EXCHANGE: <inlinegraphic format="PNG" fileref="exchange.png"></inlinegraphic>
@GDK_FLEUR: <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic>
@GDK_GOBBLER: <inlinegraphic format="PNG" fileref="gobbler.png"></inlinegraphic>
@GDK_GUMBY: <inlinegraphic format="PNG" fileref="gumby.png"></inlinegraphic>
@GDK_HAND1: <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic>
@GDK_HAND2: <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic>
@GDK_HEART: <inlinegraphic format="PNG" fileref="heart.png"></inlinegraphic>
@GDK_ICON: <inlinegraphic format="PNG" fileref="icon.png"></inlinegraphic>
@GDK_IRON_CROSS: <inlinegraphic format="PNG" fileref="iron_cross.png"></inlinegraphic>
@GDK_LEFT_PTR: <inlinegraphic format="PNG" fileref="left_ptr.png"></inlinegraphic>
@GDK_LEFT_SIDE: <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic>
@GDK_LEFT_TEE: <inlinegraphic format="PNG" fileref="left_tee.png"></inlinegraphic>
@GDK_LEFTBUTTON: <inlinegraphic format="PNG" fileref="leftbutton.png"></inlinegraphic>
@GDK_LL_ANGLE: <inlinegraphic format="PNG" fileref="ll_angle.png"></inlinegraphic>
@GDK_LR_ANGLE: <inlinegraphic format="PNG" fileref="lr_angle.png"></inlinegraphic>
@GDK_MAN: <inlinegraphic format="PNG" fileref="man.png"></inlinegraphic>
@GDK_MIDDLEBUTTON: <inlinegraphic format="PNG" fileref="middlebutton.png"></inlinegraphic>
@GDK_MOUSE: <inlinegraphic format="PNG" fileref="mouse.png"></inlinegraphic>
@GDK_PENCIL: <inlinegraphic format="PNG" fileref="pencil.png"></inlinegraphic>
@GDK_PIRATE: <inlinegraphic format="PNG" fileref="pirate.png"></inlinegraphic>
@GDK_PLUS: <inlinegraphic format="PNG" fileref="plus.png"></inlinegraphic>
@GDK_QUESTION_ARROW: <inlinegraphic format="PNG" fileref="question_arrow.png"></inlinegraphic>
@GDK_RIGHT_PTR: <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic>
@GDK_RIGHT_SIDE: <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic>
@GDK_RIGHT_TEE: <inlinegraphic format="PNG" fileref="right_tee.png"></inlinegraphic>
@GDK_RIGHTBUTTON: <inlinegraphic format="PNG" fileref="rightbutton.png"></inlinegraphic>
@GDK_RTL_LOGO: <inlinegraphic format="PNG" fileref="rtl_logo.png"></inlinegraphic>
@GDK_SAILBOAT: <inlinegraphic format="PNG" fileref="sailboat.png"></inlinegraphic>
@GDK_SB_DOWN_ARROW: <inlinegraphic format="PNG" fileref="sb_down_arrow.png"></inlinegraphic>
@GDK_SB_H_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic>
@GDK_SB_LEFT_ARROW: <inlinegraphic format="PNG" fileref="sb_left_arrow.png"></inlinegraphic>
@GDK_SB_RIGHT_ARROW: <inlinegraphic format="PNG" fileref="sb_right_arrow.png"></inlinegraphic>
@GDK_SB_UP_ARROW: <inlinegraphic format="PNG" fileref="sb_up_arrow.png"></inlinegraphic>
@GDK_SB_V_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic>
@GDK_SHUTTLE: <inlinegraphic format="PNG" fileref="shuttle.png"></inlinegraphic>
@GDK_SIZING: <inlinegraphic format="PNG" fileref="sizing.png"></inlinegraphic>
@GDK_SPIDER: <inlinegraphic format="PNG" fileref="spider.png"></inlinegraphic>
@GDK_SPRAYCAN: <inlinegraphic format="PNG" fileref="spraycan.png"></inlinegraphic>
@GDK_STAR: <inlinegraphic format="PNG" fileref="star.png"></inlinegraphic>
@GDK_TARGET: <inlinegraphic format="PNG" fileref="target.png"></inlinegraphic>
@GDK_TCROSS: <inlinegraphic format="PNG" fileref="tcross.png"></inlinegraphic>
@GDK_TOP_LEFT_ARROW: <inlinegraphic format="PNG" fileref="top_left_arrow.png"></inlinegraphic>
@GDK_TOP_LEFT_CORNER: <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic>
@GDK_TOP_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic>
@GDK_TOP_SIDE: <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic>
@GDK_TOP_TEE: <inlinegraphic format="PNG" fileref="top_tee.png"></inlinegraphic>
@GDK_TREK: <inlinegraphic format="PNG" fileref="trek.png"></inlinegraphic>
@GDK_UL_ANGLE: <inlinegraphic format="PNG" fileref="ul_angle.png"></inlinegraphic>
@GDK_UMBRELLA: <inlinegraphic format="PNG" fileref="umbrella.png"></inlinegraphic>
@GDK_UR_ANGLE: <inlinegraphic format="PNG" fileref="ur_angle.png"></inlinegraphic>
@GDK_WATCH: <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic>
@GDK_XTERM: <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic>
@GDK_LAST_CURSOR: last cursor type
@GDK_BLANK_CURSOR: Blank cursor. Since 2.16
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
<!-- ##### FUNCTION gdk_cursor_new ##### -->
<para>
</para>
@cursor_type:
@Returns:
<!-- ##### FUNCTION gdk_cursor_new_from_pixmap ##### -->
<para>
</para>
@source:
@mask:
@fg:
@bg:
@x:
@y:
@Returns:
<!-- ##### FUNCTION gdk_cursor_new_from_pixbuf ##### -->
<para>
</para>
@display:
@pixbuf:
@x:
@y:
@Returns:
<!-- ##### FUNCTION gdk_cursor_new_from_name ##### -->
<para>
</para>
@display:
@name:
@Returns:
<!-- ##### FUNCTION gdk_cursor_new_for_display ##### -->
<para>
</para>
@display:
@cursor_type:
@Returns:
<!-- ##### FUNCTION gdk_cursor_get_display ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_cursor_get_image ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_cursor_get_cursor_type ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_cursor_ref ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_cursor_unref ##### -->
<para>
</para>
@cursor:

View File

@@ -0,0 +1,129 @@
<!-- ##### SECTION Title ##### -->
Drawing Primitives
<!-- ##### SECTION Short_Description ##### -->
Functions for drawing points, lines, arcs, and text
<!-- ##### SECTION Long_Description ##### -->
<para>
These functions provide support for drawing points, lines, arcs and text
onto what are called 'drawables'. Drawables, as the name suggests, are things
which support drawing onto them, and are either #GdkWindow or #GdkPixmap
objects.
</para>
<para>
Many of the drawing operations take a #GdkGC argument, which represents a
graphics context. This #GdkGC contains a number of drawing attributes such
as foreground color, background color and line width, and is used to reduce
the number of arguments needed for each drawing operation. See the
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
more information.
</para>
<para id="pango-data-structures">
Some of the drawing operations take Pango data structures like #PangoContext,
#PangoLayout or #PangoLayoutLine as arguments. If you're using GTK+, the ususal
way to obtain these structures is via gtk_widget_create_pango_context() or
gtk_widget_create_pango_layout().
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkDrawable ##### -->
<para>
An opaque structure representing an object that can be
drawn onto. This can be a #GdkPixmap, a #GdkBitmap,
or a #GdkWindow.
</para>
<!-- ##### FUNCTION gdk_drawable_get_display ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_screen ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_visual ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_set_colormap ##### -->
<para>
</para>
@drawable:
@colormap:
<!-- ##### FUNCTION gdk_drawable_get_colormap ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_depth ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_size ##### -->
<para>
</para>
@drawable:
@width:
@height:
<!-- ##### FUNCTION gdk_drawable_get_clip_region ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_drawable_get_visible_region ##### -->
<para>
</para>
@drawable:
@Returns:

View File

@@ -0,0 +1,548 @@
<!-- ##### SECTION Title ##### -->
Event Structures
<!-- ##### SECTION Short_Description ##### -->
Data structures specific to each type of event
<!-- ##### SECTION Long_Description ##### -->
<para>
The event structs contain data specific to each type of event in GDK.
</para>
<note>
<para>
A common mistake is to forget to set the event mask of a widget so that the
required events are received. See gtk_widget_set_events().
</para>
</note>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### UNION GdkEvent ##### -->
<para>
The #GdkEvent struct contains a union of all of the event structs,
and allows access to the data fields in a number of ways.
</para>
<para>
The event type is always the first field in all of the event structs, and
can always be accessed with the following code, no matter what type of event
it is:
<informalexample>
<programlisting>
GdkEvent *event;
GdkEventType type;
type = event->type;
</programlisting>
</informalexample>
</para>
<para>
To access other fields of the event structs, the pointer to the event can be
cast to the appropriate event struct pointer, or the union member name can be
used. For example if the event type is %GDK_BUTTON_PRESS then the x coordinate
of the button press can be accessed with:
<informalexample>
<programlisting>
GdkEvent *event;
gdouble x;
x = ((GdkEventButton*)event)->x;
</programlisting>
</informalexample>
or:
<informalexample>
<programlisting>
GdkEvent *event;
gdouble x;
x = event->button.x;
</programlisting>
</informalexample>
</para>
<!-- ##### STRUCT GdkEventAny ##### -->
<para>
Contains the fields which are common to all event structs.
Any event pointer can safely be cast to a pointer to a #GdkEventAny to access
these fields.
</para>
@type: the type of the event.
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
<!-- ##### STRUCT GdkEventKey ##### -->
<para>
Describes a key press or key release event.
</para>
@type: the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@time: the time of the event in milliseconds.
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
Shift and Alt) and the pointer buttons. See #GdkModifierType.
@keyval: the key that was pressed or released. See the
<filename>&lt;gdk/gdkkeysyms.h&gt;</filename>
header file for a complete list of GDK key codes.
@length: the length of @string.
@string: a string containing the an approximation of the text that
would result from this keypress. The only correct way to handle text
input of text is using input methods (see #GtkIMContext), so this
field is deprecated and should never be used.
(gdk_unicode_to_keyval() provides a non-deprecated way of getting
an approximate translation for a key.) The string is encoded in the encoding
of the current locale (Note: this for backwards compatibility:
strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
In some cases, the translation of the key code will be a single
NUL byte, in which case looking at @length is necessary to distinguish
it from the an empty translation.
@hardware_keycode: the raw code of the key that was pressed or released.
@group: the keyboard group.
@is_modifier: a flag that indicates if @hardware_keycode is mapped to a
modifier. Since 2.10
<!-- ##### STRUCT GdkEventButton ##### -->
<para>
Used for button press and button release events. The
<structfield>type</structfield> field will be one of %GDK_BUTTON_PRESS,
%GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE.
</para>
<para>
Double and triple-clicks result in a sequence of events being received.
For double-clicks the order of events will be:
<orderedlist>
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
</orderedlist>
Note that the first click is received just like a normal
button press, while the second click results in a %GDK_2BUTTON_PRESS being
received just after the %GDK_BUTTON_PRESS.
</para>
<para>
Triple-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS
is inserted after the third click. The order of the events is:
<orderedlist>
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_3BUTTON_PRESS</para></listitem>
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
</orderedlist>
</para>
<para>
For a double click to occur, the second button press must occur within 1/4 of
a second of the first. For a triple click to occur, the third button press
must also occur within 1/2 second of the first button press.
</para>
@type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
%GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@time: the time of the event in milliseconds.
@x: the x coordinate of the pointer relative to the window.
@y: the y coordinate of the pointer relative to the window.
@axes: @x, @y translated to the axes of @device, or %NULL if @device is
the mouse.
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
Shift and Alt) and the pointer buttons. See #GdkModifierType.
@button: the button which was pressed or released, numbered from 1 to 5.
Normally button 1 is the left mouse button, 2 is the middle button,
and 3 is the right button. On 2-button mice, the middle button can often
be simulated by pressing both mouse buttons together.
@device: the device where the event originated.
@x_root: the x coordinate of the pointer relative to the root of the screen.
@y_root: the y coordinate of the pointer relative to the root of the screen.
<!-- ##### STRUCT GdkEventScroll ##### -->
<para>
Generated from button presses for the buttons 4 to 7. Wheel mice are
usually configured to generate button press events for buttons 4 and 5
when the wheel is turned.
</para>
@type: the type of the event (%GDK_SCROLL).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@time: the time of the event in milliseconds.
@x: the x coordinate of the pointer relative to the window.
@y: the y coordinate of the pointer relative to the window.
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
Shift and Alt) and the pointer buttons. See #GdkModifierType.
@direction: the direction to scroll to (one of %GDK_SCROLL_UP,
%GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT and %GDK_SCROLL_RIGHT).
@device: the device where the event originated.
@x_root: the x coordinate of the pointer relative to the root of the screen.
@y_root: the y coordinate of the pointer relative to the root of the screen.
<!-- ##### STRUCT GdkEventMotion ##### -->
<para>
Generated when the pointer moves.
</para>
@type: the type of the event.
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@time: the time of the event in milliseconds.
@x: the x coordinate of the pointer relative to the window.
@y: the y coordinate of the pointer relative to the window.
@axes: @x, @y translated to the axes of @device, or %NULL if @device is
the mouse.
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
Shift and Alt) and the pointer buttons. See #GdkModifierType.
@is_hint: set to 1 if this event is just a hint, see the %GDK_POINTER_MOTION_HINT_MASK
value of #GdkEventMask.
@device: the device where the event originated.
@x_root: the x coordinate of the pointer relative to the root of the screen.
@y_root: the y coordinate of the pointer relative to the root of the screen.
<!-- ##### STRUCT GdkEventExpose ##### -->
<para>
Generated when all or part of a window becomes visible and needs to be
redrawn.
</para>
@type: the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@area: bounding box of @region.
@region: the region that needs to be redrawn.
@count: the number of contiguous %GDK_EXPOSE events following this one.
The only use for this is "exposure compression", i.e. handling all contiguous
%GDK_EXPOSE events in one go, though GDK performs some exposure compression
so this is not normally needed.
<!-- ##### STRUCT GdkEventVisibility ##### -->
<para>
Generated when the window visibility status has changed.
</para>
@type: the type of the event (%GDK_VISIBILITY_NOTIFY).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
%GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
<!-- ##### STRUCT GdkEventCrossing ##### -->
<para>
Generated when the pointer enters or leaves a window.
</para>
@type: the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).
@subwindow: the window that was entered or left.
@time: the time of the event in milliseconds.
@x: the x coordinate of the pointer relative to the window.
@y: the y coordinate of the pointer relative to the window.
@x_root: the x coordinate of the pointer relative to the root of the screen.
@y_root: the y coordinate of the pointer relative to the root of the screen.
@mode: the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
%GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
%GDK_CROSSING_STATE_CHANGED). %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized,
never native.
@detail: the kind of crossing that happened (%GDK_NOTIFY_INFERIOR,
%GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or
%GDK_NOTIFY_NONLINEAR_VIRTUAL).
@focus: %TRUE if @window is the focus window or an inferior.
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
Shift and Alt) and the pointer buttons. See #GdkModifierType.
<!-- ##### STRUCT GdkEventFocus ##### -->
<para>
Describes a change of keyboard focus.
</para>
@type: the type of the event (%GDK_FOCUS_CHANGE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@in: %TRUE if the window has gained the keyboard focus, %FALSE if it has lost
the focus.
<!-- ##### STRUCT GdkEventConfigure ##### -->
<para>
Generated when a window size or position has changed.
</para>
@type: the type of the event (%GDK_CONFIGURE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@x: the new x coordinate of the window, relative to its parent.
@y: the new y coordinate of the window, relative to its parent.
@width: the new width of the window.
@height: the new height of the window.
<!-- ##### STRUCT GdkEventProperty ##### -->
<para>
Describes a property change on a window.
</para>
@type: the type of the event (%GDK_PROPERTY_NOTIFY).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@atom: the property that was changed.
@time: the time of the event in milliseconds.
@state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or
deleted (%GDK_PROPERTY_DELETE).
<!-- ##### STRUCT GdkEventSelection ##### -->
<para>
Generated when a selection is requested or ownership of a selection
is taken over by another client application.
</para>
@type: the type of the event (%GDK_SELECTION_CLEAR, %GDK_SELECTION_NOTIFY or
%GDK_SELECTION_REQUEST).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@selection: the selection.
@target: the target to which the selection should be converted.
@property: the property in which to place the result of the conversion.
@time: the time of the event in milliseconds.
@requestor: the native window on which to place @property.
<!-- ##### TYPEDEF GdkNativeWindow ##### -->
<para>
Used to represent native windows (<type>Window</type>s for the X11 backend,
<type>HWND</type>s for Win32).
</para>
<!-- ##### STRUCT GdkEventDND ##### -->
<para>
Generated during DND operations.
</para>
@type: the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
%GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or %GDK_DROP_FINISHED).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@context: the #GdkDragContext for the current DND operation.
@time: the time of the event in milliseconds.
@x_root: the x coordinate of the pointer relative to the root of the screen,
only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
@y_root: the y coordinate of the pointer relative to the root of the screen,
only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
<!-- ##### STRUCT GdkEventProximity ##### -->
<para>
Proximity events are generated when using GDK's wrapper for the
XInput extension. The XInput extension is an add-on for standard X
that allows you to use nonstandard devices such as graphics tablets.
A proximity event indicates that the stylus has moved in or out of
contact with the tablet, or perhaps that the user's finger has moved
in or out of contact with a touch screen.
</para>
@type: the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@time: the time of the event in milliseconds.
@device: the device where the event originated.
<!-- ##### STRUCT GdkEventClient ##### -->
<para>
An event sent by another client application.
</para>
@type: the type of the event (%GDK_CLIENT_EVENT).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@message_type: the type of the message, which can be defined by the
application.
@data_format: the format of the data, given as the number of bits in each
data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the data
union, 16-bit data uses the s array, and 32-bit data uses the l array.
<!-- ##### STRUCT GdkEventNoExpose ##### -->
<para>
Generated when the area of a #GdkDrawable being copied was completely available.
</para>
<para>
FIXME: add more here.
</para>
@type: the type of the event (%GDK_NO_EXPOSE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
<!-- ##### STRUCT GdkEventWindowState ##### -->
<para>
Generated when the state of a toplevel window changes.
</para>
@type: the type of the event (%GDK_WINDOW_STATE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@changed_mask: mask specifying what flags have changed.
@new_window_state: the new window state, a combination of #GdkWindowState bits.
<!-- ##### STRUCT GdkEventSetting ##### -->
<para>
Generated when a setting is modified.
</para>
@type: the type of the event (%GDK_SETTING).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
%GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
@name: the name of the setting.
<!-- ##### STRUCT GdkEventOwnerChange ##### -->
<para>
Generated when the owner of a selection changes. On X11, this information is
only available if the X server supports the XFIXES extension.
</para>
@type: the type of the event (%GDK_OWNER_CHANGE).
@window: the window which received the event
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@owner: the new owner of the selection
@reason: the reason for the ownership change as a #GdkOwnerChange value
@selection: the atom identifying the selection
@time: the timestamp of the event
@selection_time: the time at which the selection ownership was taken over
@Since: 2.6
<!-- ##### STRUCT GdkEventGrabBroken ##### -->
<para>
Generated when a pointer or keyboard grab is broken. On X11, this happens
when the grab window becomes unviewable (i.e. it or one of its ancestors
is unmapped), or if the same application grabs the pointer or keyboard
again. Note that implicit grabs (which are initiated by button presses)
can also cause #GdkEventGrabBroken events.
</para>
@type: the type of the event (%GDK_GRAB_BROKEN)
@window: the window which received the event, i.e. the window
that previously owned the grab
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
@keyboard: %TRUE if a keyboard grab was broken, %FALSE if a pointer
grab was broken
@implicit: %TRUE if the broken grab was implicit
@grab_window: If this event is caused by another grab in the same
application, @grab_window contains the new grab window. Otherwise
@grab_window is %NULL.
@Since: 2.8
<!-- ##### ENUM GdkScrollDirection ##### -->
<para>
Specifies the direction for #GdkEventScroll.
</para>
@GDK_SCROLL_UP: the window is scrolled up.
@GDK_SCROLL_DOWN: the window is scrolled down.
@GDK_SCROLL_LEFT: the window is scrolled to the left.
@GDK_SCROLL_RIGHT: the window is scrolled to the right.
<!-- ##### ENUM GdkVisibilityState ##### -->
<para>
Specifies the visiblity status of a window for a #GdkEventVisibility.
</para>
@GDK_VISIBILITY_UNOBSCURED: the window is completely visible.
@GDK_VISIBILITY_PARTIAL: the window is partially visible.
@GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all.
<!-- ##### ENUM GdkCrossingMode ##### -->
<para>
Specifies the crossing mode for #GdkEventCrossing.
</para>
@GDK_CROSSING_NORMAL: crossing because of pointer motion.
@GDK_CROSSING_GRAB: crossing because a grab is activated.
@GDK_CROSSING_UNGRAB: crossing because a grab is deactivated.
@GDK_CROSSING_GTK_GRAB: crossing because a GTK+ grab is activated.
@GDK_CROSSING_GTK_UNGRAB: crossing because a GTK+ grab is deactivated.
@GDK_CROSSING_STATE_CHANGED: crossing because a GTK+ widget changed state (e.g.
sensitivity).
<!-- ##### ENUM GdkNotifyType ##### -->
<para>
Specifies the kind of crossing for #GdkEventCrossing.
</para>
<para>
See the X11 protocol specification of <type>LeaveNotify</type> for
full details of crossing event generation.
</para>
@GDK_NOTIFY_ANCESTOR: the window is entered from an ancestor or
left towards an ancestor.
@GDK_NOTIFY_VIRTUAL: the pointer moves between an ancestor and an
inferior of the window.
@GDK_NOTIFY_INFERIOR: the window is entered from an inferior or
left towards an inferior.
@GDK_NOTIFY_NONLINEAR: the window is entered from or left towards
a window which is neither an ancestor nor an inferior.
@GDK_NOTIFY_NONLINEAR_VIRTUAL: the pointer moves between two windows
which are not ancestors of each other and the window is part of
the ancestor chain between one of these windows and their least
common ancestor.
@GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred.
<!-- ##### ENUM GdkPropertyState ##### -->
<para>
Specifies the type of a property change for a #GdkEventProperty.
</para>
@GDK_PROPERTY_NEW_VALUE: the property value was changed.
@GDK_PROPERTY_DELETE: the property was deleted.
<!-- ##### ENUM GdkWindowState ##### -->
<para>
Specifies the state of a toplevel window.
</para>
@GDK_WINDOW_STATE_WITHDRAWN: the window is not shown.
@GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
@GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
@GDK_WINDOW_STATE_STICKY: the window is sticky.
@GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without decorations.
@GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
@GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
<!-- ##### ENUM GdkSettingAction ##### -->
<para>
Specifies the kind of modification applied to a setting in a #GdkEventSetting.
</para>
@GDK_SETTING_ACTION_NEW: a setting was added.
@GDK_SETTING_ACTION_CHANGED: a setting was changed.
@GDK_SETTING_ACTION_DELETED: a setting was deleted.
<!-- ##### ENUM GdkOwnerChange ##### -->
<para>
Specifies why a selection ownership was changed.
</para>
@GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
@GDK_OWNER_CHANGE_DESTROY: the window was destroyed
@GDK_OWNER_CHANGE_CLOSE: the client was closed

View File

@@ -0,0 +1,430 @@
<!-- ##### SECTION Title ##### -->
Events
<!-- ##### SECTION Short_Description ##### -->
Functions for handling events from the window system
<!-- ##### SECTION Long_Description ##### -->
<para>
This section describes functions dealing with events from the window system.
</para>
<para>
In GTK+ applications the events are handled automatically in
gtk_main_do_event() and passed on to the appropriate widgets, so these
functions are rarely needed. Though some of the fields in the
<link linkend="gdk-Event-Structures">Event Structures</link> are useful.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term><link linkend="gdk-Event-Structures">Event Structures</link></term>
<listitem><para>
The structs used for each type of event.
</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### ENUM GdkEventType ##### -->
<para>
Specifies the type of the event.
</para>
<para>
Do not confuse these events with the signals that GTK+ widgets emit.
Although many of these events result in corresponding signals being emitted,
the events are often transformed or filtered along the way.
</para>
@GDK_NOTHING: a special code to indicate a null event.
@GDK_DELETE: the window manager has requested that the toplevel window be
hidden or destroyed, usually when the user clicks on a special icon in the
title bar.
@GDK_DESTROY: the window has been destroyed.
@GDK_EXPOSE: all or part of the window has become visible and needs to be
redrawn.
@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
@GDK_BUTTON_PRESS: a mouse button has been pressed.
@GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
within a short period of time). Note that each click also generates a
%GDK_BUTTON_PRESS event.
@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
@GDK_BUTTON_RELEASE: a mouse button has been released.
@GDK_KEY_PRESS: a key has been pressed.
@GDK_KEY_RELEASE: a key has been released.
@GDK_ENTER_NOTIFY: the pointer has entered the window.
@GDK_LEAVE_NOTIFY: the pointer has left the window.
@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
@GDK_CONFIGURE: the size, position or stacking order of the window has changed.
Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
@GDK_MAP: the window has been mapped.
@GDK_UNMAP: the window has been unmapped.
@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
@GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
@GDK_SELECTION_REQUEST: another application has requested a selection.
@GDK_SELECTION_NOTIFY: a selection has been received.
@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
surface (e.g. a touchscreen or graphics tablet).
@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
surface.
@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
progress.
@GDK_DRAG_STATUS: the status of the drag operation initiated by the window
has changed.
@GDK_DROP_START: a drop operation onto the window has started.
@GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
@GDK_CLIENT_EVENT: a message has been received from another application.
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
@GDK_NO_EXPOSE: indicates that the source region was completely available
when parts of a drawable were copied. This is not very useful.
@GDK_SCROLL: the scroll wheel was turned
@GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
for the possible window states
@GDK_SETTING: a setting has been modified.
@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
was added in 2.6
@GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
was added in 2.8.
@GDK_DAMAGE: the content of the window has been changed. This event type
was added in 2.14.
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
<!-- ##### ENUM GdkEventMask ##### -->
<para>
A set of bit-flags to indicate which events a window is to receive.
Most of these masks map onto one or more of the #GdkEventType event types
above.
</para>
<para>
%GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
event is received each time the mouse moves. However, if the application
spends a lot of time processing the event (updating the display, for example),
it can lag behind the position of the mouse. When using
%GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will be sent,
some of which are marked as a hint (the is_hint member is %TRUE).
To receive more motion events after a motion hint event, the application
needs to asks for more, by calling gdk_event_request_motions().
</para>
@GDK_EXPOSURE_MASK: receive expose events
@GDK_POINTER_MOTION_MASK: receive all pointer motion events
@GDK_POINTER_MOTION_HINT_MASK: see the explanation above
@GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
@GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
@GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
@GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
@GDK_BUTTON_PRESS_MASK: receive button press events
@GDK_BUTTON_RELEASE_MASK: receive button release events
@GDK_KEY_PRESS_MASK: receive key press events
@GDK_KEY_RELEASE_MASK: receive key release events
@GDK_ENTER_NOTIFY_MASK: receive window enter events
@GDK_LEAVE_NOTIFY_MASK: receive window leave events
@GDK_FOCUS_CHANGE_MASK: receive focus change events
@GDK_STRUCTURE_MASK: receive events about window configuration change
@GDK_PROPERTY_CHANGE_MASK: receive property change events
@GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
@GDK_PROXIMITY_IN_MASK: receive proximity in events
@GDK_PROXIMITY_OUT_MASK: receive proximity out events
@GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
child windows
@GDK_SCROLL_MASK: receive scroll events
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
<para>
Represents the current time, and can be used anywhere a time is expected.
</para>
<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
<para>
This is the priority that events from the X server are given in the
<link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
</para>
<!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
<para>
This is the priority that the idle handler processing window updates
is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
</para>
<!-- ##### FUNCTION gdk_events_pending ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_event_peek ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_event_get ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_event_put ##### -->
<para>
</para>
@event:
<!-- ##### FUNCTION gdk_event_new ##### -->
<para>
</para>
@type:
@Returns:
<!-- ##### FUNCTION gdk_event_copy ##### -->
<para>
</para>
@event:
@Returns:
<!-- ##### FUNCTION gdk_event_free ##### -->
<para>
</para>
@event: a #GdkEvent.
<!-- ##### FUNCTION gdk_event_get_time ##### -->
<para>
</para>
@event:
@Returns:
<!-- ##### FUNCTION gdk_event_get_state ##### -->
<para>
</para>
@event:
@state:
@Returns:
<!-- ##### FUNCTION gdk_event_get_axis ##### -->
<para>
</para>
@event:
@axis_use:
@value:
@Returns:
<!-- ##### FUNCTION gdk_event_get_coords ##### -->
<para>
</para>
@event:
@x_win:
@y_win:
@Returns:
<!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
<para>
</para>
@event:
@x_root:
@y_root:
@Returns:
<!-- ##### FUNCTION gdk_event_request_motions ##### -->
<para>
</para>
@event:
<!-- ##### FUNCTION gdk_events_get_angle ##### -->
<para>
</para>
@event1:
@event2:
@angle:
@Returns:
<!-- ##### FUNCTION gdk_events_get_center ##### -->
<para>
</para>
@event1:
@event2:
@x:
@y:
@Returns:
<!-- ##### FUNCTION gdk_events_get_distance ##### -->
<para>
</para>
@event1:
@event2:
@distance:
@Returns:
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
<para>
</para>
@func:
@data:
@notify:
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
<para>
Specifies the type of function passed to gdk_event_handler_set() to handle
all GDK events.
</para>
@event: the #GdkEvent to process.
@data: user data set when the event handler was installed with
gdk_event_handler_set().
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
<para>
</para>
@event:
@winid:
@Returns:
<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
<para>
</para>
@display:
@event:
@winid:
@Returns:
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
<para>
</para>
@event:
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
<para>
</para>
@message_type:
@func:
@data:
<!-- ##### FUNCTION gdk_get_show_events ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_set_show_events ##### -->
<para>
</para>
@show_events:
<!-- ##### FUNCTION gdk_event_set_screen ##### -->
<para>
</para>
@event:
@screen:
<!-- ##### FUNCTION gdk_event_get_screen ##### -->
<para>
</para>
@event:
@Returns:
<!-- ##### FUNCTION gdk_event_get_device ##### -->
<para>
</para>
@event:
@Returns:
<!-- ##### FUNCTION gdk_event_set_device ##### -->
<para>
</para>
@event:
@device:
<!-- ##### FUNCTION gdk_setting_get ##### -->
<para>
</para>
@name:
@value:
@Returns:

View File

@@ -0,0 +1,986 @@
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Long_Description ##### -->
<para>
The #GdkColorContext type is used for allocating groups of colors.
</para>
<para>
It is now deprecated in favor of the gdk_colormap_*() functions described in
the <link linkend="gdk-Colormaps-and-Colors">Colormaps and Colors</link>
section.
</para>
<!-- ##### SECTION ./tmpl/color_contexts.sgml:See_Also ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Short_Description ##### -->
routines for allocating colors (deprecated).
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Title ##### -->
Color Contexts
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Long_Description ##### -->
<para>
A #GdkIC input context is used for each user interface element which supports
internationalized text input. See the
<link linkend="gdk-Input-Methods">Input Methods</link> section for an overview
of how internationalized text input works in GTK+.
</para>
<!-- ##### SECTION ./tmpl/input_contexts.sgml:See_Also ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Short_Description ##### -->
internationalized text input properties.
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Title ##### -->
Input Contexts
<!-- ##### SECTION ./tmpl/input_methods.sgml:Long_Description ##### -->
<para>
Input Methods provide a way for complex character sets to be used in GTK+.
Languages such as Chinese, Japanese, and Korean (often abbreviated to CJK)
use a large number of ideographs, making it impossible to support all
characters with a simple keyboard. Instead, text is usually
<emphasis>pre-edited</emphasis> using a phonetic alphabet and then
<emphasis>composed</emphasis> to form the ideographs.
</para>
<para>
GTK+ makes use of the input method mechanism provided by the X Windows
platform. When a GTK+ application is started, it opens a connection to the
input method appropriate for the current locale (if any).
</para>
<para>
Widgets which handle textual input, such as #GtkEntry, need to do a number of
things to support internationalized text input:
<variablelist>
<varlistentry>
<term>When the widget is realized:</term>
<listitem><para>Check if an input method is being used with gdk_im_ready().
If it is, create a new <link linkend="gdk-Input-Contexts">Input Context</link>
using gdk_ic_new(). Find out which events the
<link linkend="gdk-Input-Contexts">Input Context</link> needs to receive
with gdk_ic_get_events(), and make sure that the widget's window receives
these events using gdk_window_set_events().
</para></listitem>
</varlistentry>
<varlistentry>
<term>When the widget's size, state or cursor position changes:</term>
<listitem><para>
Update the appropriate
<link linkend="gdk-Input-Contexts">Input Context</link> attributes
using gdk_ic_set_attr().
</para></listitem>
</varlistentry>
<varlistentry>
<term>When the keyboard focus enters or leaves the widget:</term>
<listitem><para>
Call gdk_im_begin() or gdk_im_end() to start or finish editing the text.
</para></listitem>
</varlistentry>
<varlistentry>
<term>When the widget receives a key_press event:</term>
<listitem><para>
The <structfield>string</structfield> and <structfield>length</structfield>
fields of the #GdkEventKey struct should be used to insert the composed text
into the widget.
</para></listitem>
</varlistentry>
<varlistentry>
<term>When the widget is unrealized:</term>
<listitem><para>
Destroy the <link linkend="gdk-Input-Contexts">Input Context</link>.
</para></listitem>
</varlistentry>
</variablelist>
</para>
<para>
See the XLib reference manual for more detailed information on input methods,
and the #GtkEntry and #GtkText widgets for some example code.
</para>
<!-- ##### SECTION ./tmpl/input_methods.sgml:See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term><link linkend="gdk-Input-Contexts">Input Contexts</link></term>
<listitem><para>
Used for each widget that handles internationalized text input using the
global input method.
</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION ./tmpl/input_methods.sgml:Short_Description ##### -->
support for internationalized text input.
<!-- ##### SECTION ./tmpl/input_methods.sgml:Title ##### -->
Input Methods
<!-- ##### MACRO GDK_CORE_POINTER ##### -->
<para>
This macro contains an integer value representing
the device ID for the core pointer device.
</para>
<!-- ##### MACRO GDK_GC_X11 ##### -->
<para>
</para>
@object:
<!-- ##### MACRO GDK_GC_X11_GET_CLASS ##### -->
<para>
</para>
@obj:
<!-- ##### MACRO GDK_WINDOWING_FB ##### -->
<para>
This macro is defined if GDK is configured to use the Linux framebuffer backend.
</para>
<!-- ##### MACRO GDK_WINDOWING_NANOX ##### -->
<para>
</para>
<!-- ##### STRUCT GdkColorContext ##### -->
<para>
</para>
@visual:
@colormap:
@num_colors:
@max_colors:
@num_allocated:
@mode:
@need_to_free_colormap:
@std_cmap_atom:
@clut:
@cmap:
@color_hash:
@palette:
@num_palette:
@fast_dither:
<!-- ##### STRUCT GdkColorContextDither ##### -->
<para>
</para>
@fast_rgb:
@fast_err:
@fast_erg:
@fast_erb:
<!-- ##### ENUM GdkColorContextMode ##### -->
<para>
</para>
@GDK_CC_MODE_UNDEFINED:
@GDK_CC_MODE_BW:
@GDK_CC_MODE_STD_CMAP:
@GDK_CC_MODE_TRUE:
@GDK_CC_MODE_MY_GRAY:
@GDK_CC_MODE_PALETTE:
<!-- ##### STRUCT GdkDeviceClass ##### -->
<para>
</para>
<!-- ##### STRUCT GdkDeviceInfo ##### -->
<para>
The #GdkDeviceInfo structure contains information about a
device. It has the following fields:
</para>
@deviceid: a unique integer ID for this device.
@name: the human-readable name for the device.
@source: the type of device.
@mode: a value indicating whether the device is enabled and
how the device coordinates map to the screen.
@has_cursor: if %TRUE, a cursor will be displayed indicating
the current on-screen location to the user. Otherwise,
the application is responsible for drawing a cursor
itself.
@num_axes: the number of axes for this device.
@axes: a pointer to an array of GdkAxisUse values which
give the mapping of axes onto the possible valuators
for a GDK device.
@num_keys: the number of macro buttons.
@keys: a pointer to an array of #GdkDeviceKey structures
which describe what key press events are generated
for each macro button.
<!-- ##### STRUCT GdkDrawableClass ##### -->
<para>
</para>
<!-- ##### STRUCT GdkGCClass ##### -->
<para>
</para>
<!-- ##### STRUCT GdkIC ##### -->
<para>
The #GdkIC struct is an opaque structure representing an input context
for use with the global <link linkend="gdk-Input-Methods">Input Method</link>.
</para>
<!-- ##### STRUCT GdkICAttr ##### -->
<para>
The #GdkICAttr struct is used when getting and setting attributes of the
input context. It is used together with a #GdkICAttributesType mask which
specifies which of the fields are being set or returned.
</para>
@style: the pre-edit and status style. This attribute is required when
creating the #GdkIC, and cannot be changed.
@client_window: the #GdkWindow in which the input method will display its
pre-edit and status areas or create subwindows.
The preedit_area and status_area attributes are specified relative to this
window. This attribute is required when creating the #GdkIC, and cannot be
changed.
@focus_window: the #GdkWindow which is to be used when editing text.
gdk_im_begin() sets this attribute before starting the text input process,
so it is normally not necessary to set it elsewhere.
@filter_events: the mask of events that the input method requires.
See the gdk_ic_get_events() function. This attribute is read-only and is
never changed.
@spot_location: the position of the insertion cursor, for use with the
%GDK_IM_PREEDIT_POSITION style. The y coordinate specifies the baseline of
the text.
@line_spacing: the line spacing to be used in the pre-edit and status areas
when displaying multi-line text.
@cursor: the cursor to use in the input method's windows.
If this attribute isn't set it is determined by the input method.
@preedit_fontset: the font to use for the pre-edit area.
If this attribute isn't set it is determined by the input method.
@preedit_area: the area in which the input method will display pre-editing
data, used for the %GDK_IM_PREEDIT_POSITION and %GDK_IM_PREEDIT_AREA styles.
@preedit_area_needed: the area that the input method requests for displaying
pre-editing data, used for the %GDK_IM_PREEDIT_POSITION and
%GDK_IM_PREEDIT_AREA styles.
@preedit_foreground: the foreground color to use for the pre-edit area.
This color must already be allocated in the preedit_colormap.
If this attribute isn't set it is determined by the input method.
@preedit_background: the background color to use for the pre-edit area.
This color must already be allocated in the preedit_colormap.
If this attribute isn't set it is determined by the input method.
@preedit_pixmap: the background pixmap to use for the pre-edit area.
If this attribute isn't set it is determined by the input method.
@preedit_colormap: the colormap the input method should use to allocate colors.
The default value is the colormap of client_window.
@status_fontset: the font to use for the status area.
If this attribute isn't set it is determined by the input method.
@status_area: the are that the input method will display status information in.
This is used for the %GDK_IM_STATUS_AREA style.
@status_area_needed: the size that the input method requests for displaying
status information, for the %GDK_IM_STATUS_AREA style.
@status_foreground: the foreground color to use for the status area.
This color must already be allocated in the status_colormap.
If this attribute isn't set it is determined by the input method.
@status_background: the background color to use for the status area.
This color must already be allocated in the status_colormap.
If this attribute isn't set it is determined by the input method.
@status_pixmap: the background pixmap to use for the status area.
If this attribute isn't set it is determined by the input method.
@status_colormap: the colormap the input method should use to allocate colors.
The default value is the colormap of client_window.
<!-- ##### ENUM GdkICAttributesType ##### -->
<para>
The #GdkICAttributesType contains a set of bit-flags which are used to
specify which of the attributes in a #GdkICAttr are being set or returned.
</para>
<para>
It also contains several combinations of the flags which specify required
attributes for the various styles:
<variablelist>
<varlistentry>
<term>%GDK_IC_ALL_REQ:</term>
<listitem><para>
the set of attributes required for all styles.
</para></listitem>
</varlistentry>
<varlistentry>
<term>%GDK_IC_PREEDIT_AREA_REQ:</term>
<listitem><para>
the set of additional attributes required for the
%GDK_IM_PREEDIT_AREA pre-edit style.
</para></listitem>
</varlistentry>
<varlistentry>
<term>%GDK_IC_PREEDIT_POSITION_REQ:</term>
<listitem><para>
the set of additional attributes required for the
%GDK_IM_PREEDIT_POSITION pre-edit style.
</para></listitem>
</varlistentry>
<varlistentry>
<term>%GDK_IC_STATUS_AREA_REQ:</term>
<listitem><para>
the set of additional attributes required for the
%GDK_IM_STATUS_AREA status style.
</para></listitem>
</varlistentry>
</variablelist>
</para>
@GDK_IC_STYLE:
@GDK_IC_CLIENT_WINDOW:
@GDK_IC_FOCUS_WINDOW:
@GDK_IC_FILTER_EVENTS:
@GDK_IC_SPOT_LOCATION:
@GDK_IC_LINE_SPACING:
@GDK_IC_CURSOR:
@GDK_IC_PREEDIT_FONTSET:
@GDK_IC_PREEDIT_AREA:
@GDK_IC_PREEDIT_AREA_NEEDED:
@GDK_IC_PREEDIT_FOREGROUND:
@GDK_IC_PREEDIT_BACKGROUND:
@GDK_IC_PREEDIT_PIXMAP:
@GDK_IC_PREEDIT_COLORMAP:
@GDK_IC_STATUS_FONTSET:
@GDK_IC_STATUS_AREA:
@GDK_IC_STATUS_AREA_NEEDED:
@GDK_IC_STATUS_FOREGROUND:
@GDK_IC_STATUS_BACKGROUND:
@GDK_IC_STATUS_PIXMAP:
@GDK_IC_STATUS_COLORMAP:
@GDK_IC_ALL_REQ:
@GDK_IC_PREEDIT_AREA_REQ:
@GDK_IC_PREEDIT_POSITION_REQ:
@GDK_IC_STATUS_AREA_REQ:
<!-- ##### ENUM GdkIMStyle ##### -->
<para>
A set of bit-flags used to specify the input method styles which are supported
or which are currently in use. The flags can be divided into 2 groups, the
pre-edit flags and the status flags.
</para>
<para>
The pre-edit flags specify how pre-editing data is displayed.
For example, this could display the text being typed in the phonetic
alphabet before it is composed and inserted as an ideograph.
</para>
<para>
The status flags specify how status information is displayed.
The status information can be thought of as an extension of the
standard keyboard mode indicators, such as the Caps Lock indicator.
</para>
<note>
<para>
The %GDK_IM_PREEDIT_CALLBACKS and %GDK_IM_STATUS_CALLBACKS styles are not
currently supported in GTK+.
</para>
</note>
@GDK_IM_PREEDIT_AREA: The application provides the input method with an area
in which to perform <emphasis>off-the-spot</emphasis> pre-editing.
@GDK_IM_PREEDIT_CALLBACKS: The application registers a number of callback
functions which are used to display pre-editing data.
@GDK_IM_PREEDIT_POSITION: The application provides the input method with the
position of the insertion cursor, for <emphasis>over-the-spot</emphasis>
pre-editing. The input method creates its own window over the widget to
display the pre-editing data.
@GDK_IM_PREEDIT_NOTHING: The input method uses the root X window to perform
pre-editing, so the application does not need to do anything.
@GDK_IM_PREEDIT_NONE: No pre-editing is done by the input method, or no
pre-editing data needs to be displayed.
@GDK_IM_PREEDIT_MASK: A bit-mask containing all the pre-edit flags.
@GDK_IM_STATUS_AREA: The application provides the input method with an area
in which to display status information.
@GDK_IM_STATUS_CALLBACKS: The applications registers a number of callback
functions which are used to display status information.
@GDK_IM_STATUS_NOTHING: The input method uses the root X window to display
status information, so the application does not need to do anything.
@GDK_IM_STATUS_NONE: The input method does not display status information.
@GDK_IM_STATUS_MASK: A bit-mask containing all the status flags.
<!-- ##### STRUCT GdkKeyInfo ##### -->
<para>
</para>
@keycode:
@group:
@level:
<!-- ##### STRUCT GdkKeymapClass ##### -->
<para>
</para>
<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
<para>
</para>
@GDK_PIXBUF_ALPHA_BILEVEL:
@GDK_PIXBUF_ALPHA_FULL:
<!-- ##### STRUCT GdkWindowRedirect ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_color_context_add_palette ##### -->
<para>
</para>
@cc:
@palette:
@num_palette:
@Returns:
<!-- ##### FUNCTION gdk_color_context_free ##### -->
<para>
</para>
@cc:
<!-- ##### FUNCTION gdk_color_context_free_dither ##### -->
<para>
</para>
@cc:
<!-- ##### FUNCTION gdk_color_context_get_index_from_palette ##### -->
<para>
</para>
@cc:
@red:
@green:
@blue:
@failed:
@Returns:
<!-- ##### FUNCTION gdk_color_context_get_pixel ##### -->
<para>
</para>
@cc:
@red:
@green:
@blue:
@failed:
@Returns:
<!-- ##### FUNCTION gdk_color_context_get_pixel_from_palette ##### -->
<para>
</para>
@cc:
@red:
@green:
@blue:
@failed:
@Returns:
<!-- ##### FUNCTION gdk_color_context_get_pixels ##### -->
<para>
</para>
@cc:
@reds:
@greens:
@blues:
@ncolors:
@colors:
@nallocated:
<!-- ##### FUNCTION gdk_color_context_get_pixels_incremental ##### -->
<para>
</para>
@cc:
@reds:
@greens:
@blues:
@ncolors:
@used:
@colors:
@nallocated:
<!-- ##### FUNCTION gdk_color_context_init_dither ##### -->
<para>
</para>
@cc:
<!-- ##### FUNCTION gdk_color_context_new ##### -->
<para>
</para>
@visual:
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_color_context_new_mono ##### -->
<para>
</para>
@visual:
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_color_context_query_color ##### -->
<para>
</para>
@cc:
@color:
@Returns:
<!-- ##### FUNCTION gdk_color_context_query_colors ##### -->
<para>
</para>
@cc:
@colors:
@num_colors:
@Returns:
<!-- ##### VARIABLE gdk_core_pointer ##### -->
<para>
</para>
<!-- ##### VARIABLE gdk_display_name ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_display_set_sm_client_id ##### -->
<para>
</para>
@display:
@sm_client_id:
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
<para>
Frees a full font name obtained from gdk_font_full_name_get().
</para>
@name: a full font name.
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
<para>
Returns a comma-separated list of XLFDs for the
fonts making up a given #GdkFont.
</para>
@font: a #GdkFont
@Returns: a newly-allocated string containing a list of XLFDs,
should be freed with gdk_font_full_name_free() when no longer needed.
<!-- ##### FUNCTION gdk_get_client_window ##### -->
<para>
</para>
@dpy:
@win:
@Returns:
<!-- ##### FUNCTION gdk_get_default_display ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gdk_get_default_screen ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
<para>
Destroys the given #GdkICAttr struct, freeing the allocated memory.
</para>
@attr: a #GdkICAttr struct.
<!-- ##### FUNCTION gdk_ic_attr_new ##### -->
<para>
Creates a new #GdkICAttr struct, with all fields set to 0.
The #GdkICAttr struct should be freed with gdk_ic_attr_destroy() when no
longer needed.
</para>
@Returns: a new #GdkICAttr struct.
<!-- ##### FUNCTION gdk_ic_destroy ##### -->
<para>
Destroys the input context.
</para>
@ic: a #GdkIC.
<!-- ##### FUNCTION gdk_ic_get_attr ##### -->
<para>
Gets attributes of a #GdkIC.
</para>
@ic: a #GdkIC.
@attr: a #GdkICAttr struct to contain the returned attributes.
@mask: a #GdkICAttributesType mask specifying which attributes to get.
@Returns: a #GdkICAttributesType mask specifying which of the attributes
were not retrieved succesfully.
<!-- ##### FUNCTION gdk_ic_get_events ##### -->
<para>
Returns the mask of events that the input method needs to function properly.
This is typically called in a widget's realize method after creating the
#GdkIC. The returned event mask is then combined with the widget's
own event mask and applied using gdk_window_set_events().
</para>
@ic: a #GdkIC.
@Returns: the mask of events that the input method needs to function
properly.
<!-- ##### FUNCTION gdk_ic_get_style ##### -->
<para>
Returns the pre-edit and status style of the #GdkIC.
</para>
@ic: a #GdkIC.
@Returns: the pre-edit and status style of the #GdkIC.
<!-- ##### FUNCTION gdk_ic_new ##### -->
<para>
Creates a new #GdkIC using the given attributes.
</para>
@attr: a #GdkICAttr struct containing attributes to use for the input context.
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
are set.
@Returns: a new #GdkIC.
<!-- ##### FUNCTION gdk_ic_set_attr ##### -->
<para>
Sets attributes of the #GdkIC.
</para>
<para>
Note that the GDK_IC_STYLE and GDK_IC_CLIENT_WINDOW attributes can only be set
when creating the #GdkIC, and the GDK_IC_FILTER_EVENTS attribute is read-only.
</para>
@ic: a #GdkIC.
@attr: a #GdkICAttr struct containing attributes to use for the input context.
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
are set.
@Returns: a #GdkICAttributesType mask indicating which of the attributes
were not set successfully.
<!-- ##### FUNCTION gdk_im_begin ##### -->
<para>
Starts editing, using the given input context and #GdkWindow.
This should be called when the widget receives the input focus, typically in
the widget's focus_in_event method.
</para>
@ic: a #GdkIC.
@window: the #GdkWindow which will be receiving the key press events.
<!-- ##### FUNCTION gdk_im_decide_style ##### -->
<para>
Decides which input method style should be used, by comparing the styles given
in @supported_style with those of the available input method.
</para>
@supported_style: styles which are supported by the widget.
@Returns: the best style in @supported_style that is also supported by the
available input method.
<!-- ##### FUNCTION gdk_im_end ##### -->
<para>
Stops editing using the input method.
This should be called when the widget loses the input focus, typically in
the widget's focus_out_event method.
</para>
<!-- ##### FUNCTION gdk_im_ready ##### -->
<para>
Checks if an input method is to be used for the current locale.
If GTK+ has been compiled without support for input methods, or the current
locale doesn't need an input method, then this will return FALSE.
</para>
@Returns: TRUE if an input method is available and should be used.
<!-- ##### FUNCTION gdk_im_set_best_style ##### -->
<para>
Sets the best pre-edit and/or status style which should be used.
This will affect the style chosen in gdk_im_decide_style().
</para>
<para>
The order of the pre-edit styles is (from worst to best):
%GDK_IM_PREEDIT_NONE, %GDK_IM_PREEDIT_NOTHING, %GDK_IM_PREEDIT_AREA,
%GDK_IM_PREEDIT_POSITION, %GDK_IM_PREEDIT_CALLBACKS.
The order of the status styles is:
%GDK_IM_STATUS_NONE, %GDK_IM_STATUS_NOTHING, %GDK_IM_STATUS_AREA,
%GDK_IM_STATUS_CALLBACKS.
</para>
<para>
So, for example, to set the best allowed pre-edit style to %GDK_IM_PREEDIT_AREA
you would do this:
<informalexample>
<programlisting>
gdk_im_set_best_style (GDK_IM_PREEDIT_AREA);
</programlisting>
</informalexample>
Or to set the best allowed pre-edit style to %GDK_IM_PREEDIT_POSITION and the
best allowed status style to %GDK_IM_STATUS_NOTHING you can do this:
<informalexample>
<programlisting>
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NOTHING);
</programlisting>
</informalexample>
</para>
@best_allowed_style: a bit-mask with the best pre-edit style and/or the best
status style to use. If 0 is used, then the current bit-mask of all allowed
styles is returned.
@Returns: a bit-mask of all the styles allowed.
<!-- ##### FUNCTION gdk_input_list_devices ##### -->
<para>
Lists all available input devices, along with their
configuration information.
</para>
@Returns: A #GList of #GdkDeviceInfo structures. This list
is internal data of GTK+ and should not be modified
or freed.
<!-- ##### FUNCTION gdk_input_motion_events ##### -->
<para>
Retrieves the motion history for a given device/window pair.
</para>
@window: a #GdkWindow.
@deviceid: the device for which to retrieve motion history.
@start: the start time.
@stop: the stop time.
@nevents_return: location to store the number of events returned.
@Returns: a newly allocated array containing all the events
from @start to @stop. This array should be freed
with g_free() when you are finished using it.
<!-- ##### FUNCTION gdk_input_set_axes ##### -->
<para>
Sets the mapping of the axes (valuators) of a device
onto the predefined valuator types that GTK+ understands.
</para>
@deviceid: the device to configure.
@axes: an array of GdkAxisUse. This length of this array
must match the number of axes for the device.
<!-- ##### FUNCTION gdk_input_set_key ##### -->
<para>
Sets the key event generated when a macro button is pressed.
</para>
@deviceid: the device to configure.
@index_: the index of the macro button.
@keyval: the key value for the #GdkKeypressEvent to generate.
(a value of 0 means no event will be generated.)
@modifiers: the modifier field for the generated
#GdkKeyPressEvent.
<!-- ##### FUNCTION gdk_input_set_mode ##### -->
<para>
Enables or disables a device, and determines how the
device maps onto the screen.
</para>
@deviceid: the device to configure.
@mode: the new mode.
@Returns: %TRUE if the device supports the given mode, otherwise
%FALSE and the device's mode is unchanged.
<!-- ##### FUNCTION gdk_input_set_source ##### -->
<para>
Sets the source type for a device.
</para>
@deviceid: the device to configure
@source: the new source type.
<!-- ##### FUNCTION gdk_input_window_get_pointer ##### -->
<para>
Returns information about the current position of the pointer
within a window, including extended device information.
Any of the return parameters may be %NULL, in which case,
they will be ignored.
</para>
@window: a #GdkWindow.
@deviceid: a device ID.
@x: location to store current x postion.
@y: location to store current y postion.
@pressure: location to store current pressure.
@xtilt: location to store current tilt in the x direction.
@ytilt: location to store current tilt in the y direction.
@mask: location to store the current modifier state.
<!-- ##### VARIABLE gdk_leader_window ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_open_display ##### -->
<para>
</para>
@display_name:
@Returns:
<!-- ##### FUNCTION gdk_pixbuf_set_as_cairo_source ##### -->
<para>
</para>
@pixbuf:
@cr:
@pixbuf_x:
@pixbuf_y:
<!-- ##### VARIABLE gdk_progclass ##### -->
<para>
</para>
<!-- ##### MACRO gdk_rgb_get_cmap ##### -->
<para>
Gets the colormap set by GdkRGB. This colormap and the corresponding
visual should be used when creating windows that will be drawn in by GdkRGB.
</para>
@Returns: The #GdkColormap set by GdkRGB.
<!-- ##### VARIABLE gdk_screen ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_screen_close ##### -->
<para>
</para>
@screen:
<!-- ##### FUNCTION gdk_screen_get_window_at_pointer ##### -->
<para>
</para>
@screen:
@win_x:
@win_y:
@Returns:
<!-- ##### FUNCTION gdk_screen_use_virtual_screen ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### VARIABLE gdk_selection_property ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_set_default_display ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdkx_visual_get_for_screen ##### -->
<para>
</para>
@screen:
@xvisualid:
@Returns:

View File

@@ -0,0 +1,110 @@
<!-- ##### SECTION Title ##### -->
Application launching
<!-- ##### SECTION Short_Description ##### -->
Startup notification for applications
<!-- ##### SECTION Long_Description ##### -->
<para>
GdkAppLaunchContext is an implementation of #GAppLaunchContext that
handles launching an application in a graphical context. It provides
startup notification and allows to launch applications on a specific
screen or workspace.
</para>
<example>
<title>Launching an application</title>
<programlisting>
GdkAppLaunchContext *context;
context = gdk_app_launch_context_new (<!-- -->);
gdk_app_launch_context_set_screen (my_screen);
gdk_app_launch_context_set_timestamp (event-&gt;time);
if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &amp;error))
g_warning ("Launching failed: %s\n", error-&gt;message);
g_object_unref (context);
</programlisting>
</example>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### TYPEDEF GdkAppLaunchContext ##### -->
<para>
An opaque structure representing an application launch context.
</para>
<!-- ##### FUNCTION gdk_app_launch_context_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_app_launch_context_set_display ##### -->
<para>
</para>
@context:
@display:
<!-- ##### FUNCTION gdk_app_launch_context_set_screen ##### -->
<para>
</para>
@context:
@screen:
<!-- ##### FUNCTION gdk_app_launch_context_set_desktop ##### -->
<para>
</para>
@context:
@desktop:
<!-- ##### FUNCTION gdk_app_launch_context_set_timestamp ##### -->
<para>
</para>
@context:
@timestamp:
<!-- ##### FUNCTION gdk_app_launch_context_set_icon ##### -->
<para>
</para>
@context:
@icon:
<!-- ##### FUNCTION gdk_app_launch_context_set_icon_name ##### -->
<para>
</para>
@context:
@icon_name:

View File

@@ -0,0 +1,502 @@
<!-- ##### SECTION Title ##### -->
GdkDisplay
<!-- ##### SECTION Short_Description ##### -->
Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
<!-- ##### SECTION Long_Description ##### -->
<para>
#GdkDisplay objects purpose are two fold:
<itemizedlist>
<listitem><para>To grab/ungrab keyboard focus and mouse pointer</para></listitem>
<listitem><para>To manage and provide information about the #GdkScreen(s)
available for this #GdkDisplay
</para></listitem>
</itemizedlist>
</para>
<para>
#GdkDisplay objects are the GDK representation of the X Display which can be
described as <emphasis>a workstation consisting of a keyboard a pointing
device (such as a mouse) and one or more screens</emphasis>.
It is used to open and keep track of various #GdkScreen objects currently
instanciated by the application. It is also used to grab and release the keyboard
and the mouse pointer.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkDisplay ##### -->
<para>
The <structname>GdkDisplay</structname> struct is the GDK representation
of an X display. All its fields are private and should not be accessed directly.
</para>
@Since: 2.2
<!-- ##### SIGNAL GdkDisplay::closed ##### -->
<para>
</para>
@gdkdisplay: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GdkDisplay::opened ##### -->
<para>
</para>
@gdkdisplay: the object which received the signal.
<!-- ##### FUNCTION gdk_display_open ##### -->
<para>
</para>
@display_name:
@Returns:
<!-- ##### FUNCTION gdk_display_get_default ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_display_get_name ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_get_n_screens ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_get_screen ##### -->
<para>
</para>
@display:
@screen_num:
@Returns:
<!-- ##### FUNCTION gdk_display_get_default_screen ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_get_device_manager ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_pointer_ungrab ##### -->
<para>
</para>
@display:
@time_:
<!-- ##### FUNCTION gdk_display_keyboard_ungrab ##### -->
<para>
</para>
@display:
@time_:
<!-- ##### FUNCTION gdk_display_pointer_is_grabbed ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_device_is_grabbed ##### -->
<para>
</para>
@display:
@device:
@Returns:
<!-- ##### FUNCTION gdk_display_beep ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_display_sync ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_display_flush ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_display_close ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_display_is_closed ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_list_devices ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_get_event ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_peek_event ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_put_event ##### -->
<para>
</para>
@display:
@event:
<!-- ##### FUNCTION gdk_display_add_client_message_filter ##### -->
<para>
</para>
@display:
@message_type:
@func:
@data:
<!-- ##### FUNCTION gdk_display_set_double_click_time ##### -->
<para>
</para>
@display:
@msec:
<!-- ##### FUNCTION gdk_display_set_double_click_distance ##### -->
<para>
</para>
@display:
@distance:
<!-- ##### FUNCTION gdk_display_get_pointer ##### -->
<para>
</para>
@display:
@screen:
@x:
@y:
@mask:
<!-- ##### FUNCTION gdk_display_get_device_state ##### -->
<para>
</para>
@display:
@device:
@screen:
@x:
@y:
@mask:
<!-- ##### FUNCTION gdk_display_get_window_at_pointer ##### -->
<para>
</para>
@display:
@win_x:
@win_y:
@Returns:
<!-- ##### FUNCTION gdk_display_get_window_at_device_position ##### -->
<para>
</para>
@display:
@device:
@win_x:
@win_y:
@Returns:
<!-- ##### STRUCT GdkDisplayPointerHooks ##### -->
<para>
A table of pointers to functions for getting quantities related to
the current pointer position. Each #GdkDisplay has a table of this type,
which can be set using gdk_display_set_pointer_hooks().
</para>
<para>
This is only useful for such low-level tools as an event recorder.
Applications should never have any reason to use this facility
</para>
@get_pointer: Obtains the current pointer position and modifier state.
The position is given in coordinates relative to the window containing
the pointer, which is returned in @window.
@window_get_pointer: Obtains the window underneath the mouse pointer.
Current pointer position and modifier state are returned in @x, @y and
@mask. The position is given in coordinates relative to @window.
@window_at_pointer: Obtains the window underneath the mouse pointer,
returning the location of that window in @win_x, @win_y. Returns %NULL
if the window under the mouse pointer is not known to GDK (for example,
belongs to another application).
@Since: 2.2
<!-- ##### FUNCTION gdk_display_set_pointer_hooks ##### -->
<para>
</para>
@display:
@new_hooks:
@Returns:
<!-- ##### STRUCT GdkDisplayDeviceHooks ##### -->
<para>
</para>
@get_device_state:
@window_get_device_position:
@window_at_device_position:
<!-- ##### FUNCTION gdk_display_set_device_hooks ##### -->
<para>
</para>
@display:
@new_hooks:
@Returns:
<!-- ##### FUNCTION gdk_display_warp_pointer ##### -->
<para>
</para>
@display:
@screen:
@x:
@y:
<!-- ##### FUNCTION gdk_display_warp_device ##### -->
<para>
</para>
@display:
@device:
@screen:
@x:
@y:
<!-- ##### FUNCTION gdk_display_supports_cursor_color ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_supports_cursor_alpha ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_get_default_cursor_size ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_get_maximal_cursor_size ##### -->
<para>
</para>
@display:
@width:
@height:
<!-- ##### FUNCTION gdk_display_get_default_group ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_supports_selection_notification ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_request_selection_notification ##### -->
<para>
</para>
@display:
@selection:
@Returns:
<!-- ##### FUNCTION gdk_display_supports_clipboard_persistence ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_store_clipboard ##### -->
<para>
</para>
@display:
@clipboard_window:
@time_:
@targets:
@n_targets:
<!-- ##### FUNCTION gdk_display_supports_shapes ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_supports_input_shapes ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_supports_composite ##### -->
<para>
</para>
@display:
@Returns:

View File

@@ -0,0 +1,90 @@
<!-- ##### SECTION Title ##### -->
GdkDisplayManager
<!-- ##### SECTION Short_Description ##### -->
Maintains a list of all open <type>GdkDisplay</type>s
<!-- ##### SECTION Long_Description ##### -->
<para>
The purpose of the #GdkDisplayManager singleton object is to offer
notification when displays appear or disappear or the default display
changes.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkDisplayManager ##### -->
<para>
The <structname>GdkDisplayManager</structname> struct has no interesting
fields.
</para>
@Since: 2.2
<!-- ##### SIGNAL GdkDisplayManager::display-opened ##### -->
<para>
</para>
@gdkdisplaymanager: the object which received the signal.
@arg1:
<!-- ##### ARG GdkDisplayManager:default-display ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_display_manager_get ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_display_manager_get_default_display ##### -->
<para>
</para>
@display_manager:
@Returns:
<!-- ##### FUNCTION gdk_display_manager_set_default_display ##### -->
<para>
</para>
@display_manager:
@display:
<!-- ##### FUNCTION gdk_display_manager_list_displays ##### -->
<para>
</para>
@display_manager:
@Returns:
<!-- ##### FUNCTION gdk_display_get_core_pointer ##### -->
<para>
</para>
@display:
@Returns:

View File

@@ -0,0 +1,433 @@
<!-- ##### SECTION Title ##### -->
GdkScreen
<!-- ##### SECTION Short_Description ##### -->
Object representing a physical screen
<!-- ##### SECTION Long_Description ##### -->
<para>
#GdkScreen objects are the GDK representation of a physical screen. It is used
throughout GDK and GTK+ to specify which screen the top level windows
are to be displayed on.
It is also used to query the screen specification and default settings such as
the default colormap (gdk_screen_get_default_colormap()),
the screen width (gdk_screen_get_width()), etc.
</para>
<para>Note that a screen may consist of multiple monitors which are merged to
form a large screen area.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkScreen ##### -->
<para>
This is a currently just a placeholder typedef for the first argument of
the @window_at_pointer function in #GdkPointerHooks. It will be used
when GDK gets multihead support.
</para>
@Since: 2.2
<!-- ##### SIGNAL GdkScreen::composited-changed ##### -->
<para>
</para>
@gdkscreen: the object which received the signal.
<!-- ##### SIGNAL GdkScreen::monitors-changed ##### -->
<para>
</para>
@gdkscreen: the object which received the signal.
<!-- ##### SIGNAL GdkScreen::size-changed ##### -->
<para>
</para>
@gdkscreen: the object which received the signal.
<!-- ##### ARG GdkScreen:font-options ##### -->
<para>
</para>
<!-- ##### ARG GdkScreen:resolution ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_screen_get_default ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_default_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_set_default_colormap ##### -->
<para>
</para>
@screen:
@colormap:
<!-- ##### FUNCTION gdk_screen_get_system_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_system_visual ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgba_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgba_visual ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_is_composited ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_root_window ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_display ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_number ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_width ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_height ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_width_mm ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_height_mm ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_list_visuals ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_toplevel_windows ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_make_display_name ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_n_monitors ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_primary_monitor ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_monitor_geometry ##### -->
<para>
</para>
@screen:
@monitor_num:
@dest:
<!-- ##### FUNCTION gdk_screen_get_monitor_at_point ##### -->
<para>
</para>
@screen:
@x:
@y:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_monitor_at_window ##### -->
<para>
</para>
@screen:
@window:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_monitor_height_mm ##### -->
<para>
</para>
@screen:
@monitor_num:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_monitor_width_mm ##### -->
<para>
</para>
@screen:
@monitor_num:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_monitor_plug_name ##### -->
<para>
</para>
@screen:
@monitor_num:
@Returns:
<!-- ##### FUNCTION gdk_screen_broadcast_client_message ##### -->
<para>
</para>
@screen:
@event:
<!-- ##### FUNCTION gdk_screen_get_setting ##### -->
<para>
</para>
@screen:
@name:
@value:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_font_options ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_set_font_options ##### -->
<para>
</para>
@screen:
@options:
<!-- ##### FUNCTION gdk_screen_get_resolution ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_set_resolution ##### -->
<para>
</para>
@screen:
@dpi:
<!-- ##### FUNCTION gdk_screen_get_active_window ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_window_stack ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_spawn_on_screen ##### -->
<para>
</para>
@screen:
@working_directory:
@argv:
@envp:
@flags:
@child_setup:
@user_data:
@child_pid:
@error:
@Returns:
<!-- ##### FUNCTION gdk_spawn_on_screen_with_pipes ##### -->
<para>
</para>
@screen:
@working_directory:
@argv:
@envp:
@flags:
@child_setup:
@user_data:
@child_pid:
@standard_input:
@standard_output:
@standard_error:
@error:
@Returns:
<!-- ##### FUNCTION gdk_spawn_command_line_on_screen ##### -->
<para>
</para>
@screen:
@command_line:
@error:
@Returns:

View File

@@ -0,0 +1,59 @@
<!-- ##### SECTION Title ##### -->
Testing
<!-- ##### SECTION Short_Description ##### -->
Test utilities
<!-- ##### SECTION Long_Description ##### -->
<para>
The functions in this section are intended to be used in test programs.
They allow to simulate some user input.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gdk_test_render_sync ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gdk_test_simulate_button ##### -->
<para>
</para>
@window:
@x:
@y:
@button:
@modifiers:
@button_pressrelease:
@Returns:
<!-- ##### FUNCTION gdk_test_simulate_key ##### -->
<para>
</para>
@window:
@x:
@y:
@keyval:
@modifiers:
@key_pressrelease:
@Returns:

View File

@@ -0,0 +1,378 @@
<!-- ##### SECTION Title ##### -->
General
<!-- ##### SECTION Short_Description ##### -->
Library initialization and miscellaneous functions
<!-- ##### SECTION Long_Description ##### -->
<para>
This section describes the GDK initialization functions and miscellaneous
utility functions.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gdk_init ##### -->
<para>
Initializes the GDK library and connects to the X server.
If initialization fails, a warning message is output and the application
terminates with a call to <literal>exit(1)</literal>.
</para>
<para>
Any arguments used by GDK are removed from the array and @argc and @argv are
updated accordingly.
</para>
<para>
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
by GTK+ applications.
</para>
@argc: the number of command line arguments.
@argv: the array of command line arguments.
<!-- ##### FUNCTION gdk_init_check ##### -->
<para>
Initializes the GDK library and connects to the X server, returning %TRUE on
success.
</para>
<para>
Any arguments used by GDK are removed from the array and @argc and @argv are
updated accordingly.
</para>
<para>
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
by GTK+ applications.
</para>
@argc: the number of command line arguments.
@argv: the array of command line arguments.
@Returns: %TRUE if initialization succeeded.
<!-- ##### FUNCTION gdk_parse_args ##### -->
<para>
</para>
@argc:
@argv:
<!-- ##### FUNCTION gdk_get_display_arg_name ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_set_locale ##### -->
<para>
Initializes the support for internationalization by calling the <function>setlocale()</function>
system call. This function is called by gtk_set_locale() and so GTK+
applications should use that instead.
</para>
<para>
The locale to use is determined by the <envar>LANG</envar> environment variable,
so to run an application in a certain locale you can do something like this:
<informalexample>
<programlisting>
export LANG="fr"
... run application ...
</programlisting>
</informalexample>
</para>
<para>
If the locale is not supported by X then it is reset to the standard "C"
locale.
</para>
@void:
@Returns: the resulting locale.
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
<para>
</para>
@sm_client_id:
<!-- ##### FUNCTION gdk_notify_startup_complete ##### -->
<para>
</para>
@void:
<!-- ##### FUNCTION gdk_notify_startup_complete_with_id ##### -->
<para>
</para>
@startup_id:
<!-- ##### FUNCTION gdk_get_program_class ##### -->
<para>
Gets the program class. Unless the program class has explicitly
been set with gdk_set_program_class() or with the <option>--class</option>
commandline option, the default value is the program name (determined
with g_get_prgname()) with the first character converted to uppercase.
</para>
@void:
@Returns: the program class.
<!-- ##### FUNCTION gdk_set_program_class ##### -->
<para>
Sets the program class. The X11 backend uses the program class to set
the class name part of the <literal>WM_CLASS</literal> property on
toplevel windows; see the ICCCM.
</para>
@program_class: a string.
<!-- ##### FUNCTION gdk_get_display ##### -->
<para>
Gets the name of the display, which usually comes from the <envar>DISPLAY</envar>
environment variable or the <option>--display</option> command line option.
</para>
@void:
@Returns: the name of the display.
<!-- ##### FUNCTION gdk_flush ##### -->
<para>
Flushes the X output buffer and waits until all requests have been processed
by the server. This is rarely needed by applications. It's main use is for
trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
</para>
@void:
<!-- ##### FUNCTION gdk_screen_width ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_screen_height ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
<para>
Grabs the pointer (usually a mouse) so that all events are passed to this
application until the pointer is ungrabbed with gdk_pointer_ungrab(), or
the grab window becomes unviewable.
This overrides any previous pointer grab by this client.
</para>
<para>
Pointer grabs are used for operations which need complete control over mouse
events, even if the mouse leaves the application.
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
widgets.
</para>
<para>
Note that if the event mask of an X window has selected both button press and
button release events, then a button press event will cause an automatic
pointer grab until the button is released.
X does this automatically since most applications expect to receive button
press and release events in pairs.
It is equivalent to a pointer grab on the window with @owner_events set to
%TRUE.
</para>
<para>
If you set up anything at the time you take the grab that needs to be cleaned
up when the grab ends, you should handle the #GdkEventGrabBroken events that
are emitted when the grab ends unvoluntarily.
</para>
@window: the #GdkWindow which will own the grab (the grab window).
@owner_events: if %FALSE then all pointer events are reported with respect to
@window and are only reported if selected by @event_mask. If %TRUE then pointer
events for this application are reported as normal, but pointer events outside
this application are reported with respect to @window and only if selected by
@event_mask. In either mode, unreported events are discarded.
@event_mask: specifies the event mask, which is used in accordance with
@owner_events. Note that only pointer events (i.e. button and motion events)
may be selected.
@confine_to: If non-%NULL, the pointer will be confined to this
window during the grab. If the pointer is outside @confine_to, it will
automatically be moved to the closest edge of @confine_to and enter
and leave events will be generated as necessary.
@cursor: the cursor to display while the grab is active. If this is %NULL then
the normal cursors are used for @window and its descendants, and the cursor
for @window is used for all other windows.
@time_: the timestamp of the event which led to this pointer grab. This usually
comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if
the time isn't known.
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
<!-- ##### ENUM GdkGrabStatus ##### -->
<para>
Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate
success or the reason for the failure of the grab attempt.
</para>
@GDK_GRAB_SUCCESS: the resource was successfully grabbed.
@GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
@GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the
specified time.
@GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
viewable.
@GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
<para>
</para>
@time_:
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
<para>
</para>
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_set_double_click_time ##### -->
<para>
</para>
@msec:
<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
<para>
Grabs the keyboard so that all events are passed to this
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
This overrides any previous keyboard grab by this client.
</para>
<para>
If you set up anything at the time you take the grab that needs to be cleaned
up when the grab ends, you should handle the #GdkEventGrabBroken events that
are emitted when the grab ends unvoluntarily.
</para>
@window: the #GdkWindow which will own the grab (the grab window).
@owner_events: if %FALSE then all keyboard events are reported with respect to
@window. If %TRUE then keyboard events for this application are reported as
normal, but keyboard events outside this application are reported with respect
to @window. Both key press and key release events are always reported,
independant of the event mask set by the application.
@time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
available.
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
<para>
</para>
@time_:
<!-- ##### FUNCTION gdk_beep ##### -->
<para>
</para>
@void:
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
<para>
This function allows X errors to be trapped instead of the normal behavior
of exiting the application. It should only be used if it is not possible to
avoid the X error in any other way.
</para>
<example>
<title>Trapping an X error</title>
<programlisting>
gdk_error_trap_push (<!-- -->);
/* ... Call the X function which may cause an error here ... */
/* Flush the X queue to catch errors now. */
gdk_flush (<!-- -->);
if (gdk_error_trap_pop (<!-- -->))
{
/* ... Handle the error here ... */
}
</programlisting>
</example>
@void:
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
<para>
Removes the X error trap installed with gdk_error_trap_push().
</para>
@void:
@Returns: the X error code, or 0 if no error occurred.
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
<para>
This macro is defined if GDK is configured to use the X11 backend.
</para>
<!-- ##### MACRO GDK_WINDOWING_WIN32 ##### -->
<para>
This macro is defined if GDK is configured to use the win32 backend.
</para>

View File

@@ -0,0 +1,357 @@
<!-- ##### SECTION Title ##### -->
Key Values
<!-- ##### SECTION Short_Description ##### -->
Functions for manipulating keyboard codes
<!-- ##### SECTION Long_Description ##### -->
<para>
Key values are the codes which are sent whenever a key is pressed or released.
They appear in the <structfield>keyval</structfield> field of the
#GdkEventKey structure, which is passed to signal handlers for the
"key-press-event" and "key-release-event" signals.
The complete list of key values can be found in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename>
header file.
</para>
<para>
Key values are regularly updated from the upstream X.org X11 implementation,
so new values are added regularly. They will be prefixed with GDK_KEY_ rather
than XF86XK_ or XK_ (for older symbols).
</para>
<para>
Key values can be converted into a string representation using
gdk_keyval_name(). The reverse function, converting a string to a key value,
is provided by gdk_keyval_from_name().
</para>
<para>
The case of key values can be determined using gdk_keyval_is_upper() and
gdk_keyval_is_lower(). Key values can be converted to upper or lower case
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
</para>
<para>
When it makes sense, key values can be converted to and from
Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
</para>
<para id="key-group-explanation">
One #GdkKeymap object exists for each user display. gdk_keymap_get_default()
returns the #GdkKeymap for the default display; to obtain keymaps for other
displays, use gdk_keymap_get_for_display(). A keymap
is a mapping from #GdkKeymapKey to key values. You can think of a #GdkKeymapKey
as a representation of a symbol printed on a physical keyboard key. That is, it
contains three pieces of information. First, it contains the hardware keycode;
this is an identifying number for a physical key. Second, it contains the
<firstterm>level</firstterm> of the key. The level indicates which symbol on the
key will be used, in a vertical direction. So on a standard US keyboard, the key
with the number "1" on it also has the exclamation point ("!") character on
it. The level indicates whether to use the "1" or the "!" symbol. The letter
keys are considered to have a lowercase letter at level 0, and an uppercase
letter at level 1, though only the uppercase letter is printed. Third, the
#GdkKeymapKey contains a group; groups are not used on standard US keyboards,
but are used in many other countries. On a keyboard with groups, there can be 3
or 4 symbols printed on a single key. The group indicates movement in a
horizontal direction. Usually groups are used for two different languages. In
group 0, a key might have two English characters, and in group 1 it might have
two Hebrew characters. The Hebrew characters will be printed on the key next to
the English characters.
</para>
<para>
In order to use a keymap to interpret a key event, it's necessary to first
convert the keyboard state into an effective group and level. This is done via a
set of rules that varies widely according to type of keyboard and user
configuration. The function gdk_keymap_translate_keyboard_state() accepts a
keyboard state -- consisting of hardware keycode pressed, active modifiers, and
active group -- applies the appropriate rules, and returns the group/level to be
used to index the keymap, along with the modifiers which did not affect the
group and level. i.e. it returns "unconsumed modifiers." The keyboard group may
differ from the effective group used for keymap lookups because some keys don't
have multiple groups - e.g. the Enter key is always in group 0 regardless of
keyboard state.
</para>
<para>
Note that gdk_keymap_translate_keyboard_state() also returns the keyval, i.e. it
goes ahead and performs the keymap lookup in addition to telling you which
effective group/level values were used for the lookup. #GdkEventKey already
contains this keyval, however, so you don't normally need to call
gdk_keymap_translate_keyboard_state() just to get the keyval.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkKeymap ##### -->
<para>
A <structname>GdkKeymap</structname> defines the translation from keyboard state
(including a hardware key, a modifier mask, and active keyboard group)
to a keyval. This translation has two phases. The first phase is
to determine the effective keyboard group and level for the keyboard
state; the second phase is to look up the keycode/group/level triplet
in the keymap and see what keyval it corresponds to.
</para>
<!-- ##### SIGNAL GdkKeymap::direction-changed ##### -->
<para>
</para>
@keymap: the object which received the signal.
<!-- ##### SIGNAL GdkKeymap::keys-changed ##### -->
<para>
</para>
@keymap: the object which received the signal.
<!-- ##### SIGNAL GdkKeymap::state-changed ##### -->
<para>
</para>
@gdkkeymap: the object which received the signal.
<!-- ##### STRUCT GdkKeymapKey ##### -->
<para>
A <structname>GdkKeymapKey</structname> is a hardware key that can
be mapped to a keyval.
</para>
@keycode: the hardware keycode. This is an identifying number for a
physical key.
@group: indicates movement in a horizontal direction. Usually groups are used
for two different languages. In group 0, a key might have two English
characters, and in group 1 it might have two Hebrew characters. The Hebrew
characters will be printed on the key next to the English characters.
@level: indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number "1" on it also has the
exclamation point ("!") character on it. The level indicates whether to use
the "1" or the "!" symbol. The letter keys are considered to have a lowercase
letter at level 0, and an uppercase letter at level 1, though only the
uppercase letter is printed.
<!-- ##### FUNCTION gdk_keymap_get_default ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_for_display ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_keymap_lookup_key ##### -->
<para>
</para>
@keymap:
@key:
@Returns:
<!-- ##### FUNCTION gdk_keymap_translate_keyboard_state ##### -->
<para>
</para>
@keymap:
@hardware_keycode:
@state:
@group:
@keyval:
@effective_group:
@level:
@consumed_modifiers:
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_entries_for_keyval ##### -->
<para>
</para>
@keymap:
@keyval:
@keys:
@n_keys:
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_entries_for_keycode ##### -->
<para>
</para>
@keymap:
@hardware_keycode:
@keys:
@keyvals:
@n_entries:
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_direction ##### -->
<para>
Returns the direction of the keymap.
</para>
@keymap: a #GdkKeymap or %NULL to use the default keymap.
Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
@Returns: the direction of the keymap.
<!-- ##### FUNCTION gdk_keymap_have_bidi_layouts ##### -->
<para>
</para>
@keymap:
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_caps_lock_state ##### -->
<para>
</para>
@keymap:
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_num_lock_state ##### -->
<para>
</para>
@keymap:
@Returns:
<!-- ##### FUNCTION gdk_keymap_add_virtual_modifiers ##### -->
<para>
</para>
@keymap:
@state:
<!-- ##### FUNCTION gdk_keymap_map_virtual_modifiers ##### -->
<para>
</para>
@keymap:
@state:
@Returns:
<!-- ##### FUNCTION gdk_keyval_name ##### -->
<para>
Converts a key value into a symbolic name.
The names are the same as those in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
but without the leading "GDK_KEY_".
</para>
@keyval: a key value.
@Returns: a string containing the name of the key, or %NULL if @keyval is not
a valid key. The string should not be modified.
<!-- ##### FUNCTION gdk_keyval_from_name ##### -->
<para>
Converts a key name to a key value.
</para>
@keyval_name: a key name.
@Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is
not a valid key.
<!-- ##### FUNCTION gdk_keyval_convert_case ##### -->
<para>
</para>
@symbol:
@lower:
@upper:
<!-- ##### FUNCTION gdk_keyval_to_upper ##### -->
<para>
Converts a key value to upper case, if applicable.
</para>
@keyval: a key value.
@Returns: the upper case form of @keyval, or @keyval itself if it is already
in upper case or it is not subject to case conversion.
<!-- ##### FUNCTION gdk_keyval_to_lower ##### -->
<para>
Converts a key value to lower case, if applicable.
</para>
@keyval: a key value.
@Returns: the lower case form of @keyval, or @keyval itself if it is already
in lower case or it is not subject to case conversion.
<!-- ##### FUNCTION gdk_keyval_is_upper ##### -->
<para>
Returns %TRUE if the given key value is in upper case.
</para>
@keyval: a key value.
@Returns: %TRUE if @keyval is in upper case, or if @keyval is not subject to
case conversion.
<!-- ##### FUNCTION gdk_keyval_is_lower ##### -->
<para>
Returns %TRUE if the given key value is in lower case.
</para>
@keyval: a key value.
@Returns: %TRUE if @keyval is in lower case, or if @keyval is not subject to
case conversion.
<!-- ##### FUNCTION gdk_keyval_to_unicode ##### -->
<para>
</para>
@keyval:
@Returns:
<!-- ##### FUNCTION gdk_unicode_to_keyval ##### -->
<para>
</para>
@wc:
@Returns:

View File

@@ -0,0 +1,162 @@
<!-- ##### SECTION Title ##### -->
Pango Interaction
<!-- ##### SECTION Short_Description ##### -->
Using Pango in GDK
<!-- ##### SECTION Long_Description ##### -->
<para>
Pango is the text layout system used by GDK and GTK+. The functions
and types in this section are used to render Pango objects to GDK.
drawables, and also extend the set of Pango attributes to include
stippling and embossing.
</para>
<para>
Creating a #PangoLayout object is the first step in rendering text,
and requires getting a handle to a #PangoContext. For GTK+ programs,
you'll usually want to use gtk_widget_get_pango_context(), or
gtk_widget_create_pango_layout(), rather than using the lowlevel
gdk_pango_context_get_for_screen(). Once you have a #PangoLayout, you
can set the text and attributes of it with Pango functions like
pango_layout_set_text() and get its size with pango_layout_get_size().
(Note that Pango uses a fixed point system internally, so converting
between Pango units and pixels using <link
linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
</para>
<para>
Rendering a Pango layout is done most simply with gdk_draw_layout();
you can also draw pieces of the layout with gdk_draw_layout().
#GdkPangoRenderer is a subclass of #PangoRenderer that is used internally
to implement these functions. Using it directly or subclassing it can be
useful in some cases. See the #GdkPangoRenderer documentation for details.
</para>
<example id="rotated-example">
<title>Using #GdkPangoRenderer to draw transformed text</title>
<!-- Note that this example is basically the same as
demos/gtk-demo/rotated_text.c -->
<programlisting>
#define RADIUS 100
#define N_WORDS 10
#define FONT "Sans Bold 18"
GdkScreen *screen = gdk_drawable_get_screen (drawable);
PangoRenderer *renderer;
GdkGC *gc;
PangoMatrix matrix = PANGO_MATRIX_INIT;
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *desc;
double device_radius;
int width, height;
int i;
/* Get the default renderer for the screen, and set it up for drawing */
renderer = gdk_pango_renderer_get_default (screen);
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), drawable);
gc = gdk_gc_new (drawable);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), gc);
/* Set up a transformation matrix so that the user space coordinates for
* where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
* We first center, then change the scale */
gdk_drawable_get_size (drawable, &amp;width, &amp;height);
device_radius = MIN (width, height) / 2.;
pango_matrix_translate (&amp;matrix,
device_radius + (width - 2 * device_radius) / 2,
device_radius + (height - 2 * device_radius) / 2);
pango_matrix_scale (&amp;matrix, device_radius / RADIUS, device_radius / RADIUS);
/* Create a PangoLayout, set the font and text */
context = gdk_pango_context_get_for_screen (screen);
layout = pango_layout_new (context);
pango_layout_set_text (layout, "Text", -1);
desc = pango_font_description_from_string (FONT);
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
/* Draw the layout N_WORDS times in a circle */
for (i = 0; i &lt; N_WORDS; i++)
{
GdkColor color;
PangoMatrix rotated_matrix = matrix;
int width, height;
double angle = (360. * i) / N_WORDS;
/* Gradient from red at angle == 60 to blue at angle == 300 */
color.red = 65535 * (1 + cos ((angle - 60) * M_PI / 180.)) / 2;
color.green = 0;
color.blue = 65535 - color.red;
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
PANGO_RENDER_PART_FOREGROUND, &amp;color);
pango_matrix_rotate (&amp;rotated_matrix, angle);
pango_context_set_matrix (context, &amp;rotated_matrix);
/* Inform Pango to re-layout the text with the new transformation matrix */
pango_layout_context_changed (layout);
pango_layout_get_size (layout, &amp;width, &amp;height);
pango_renderer_draw_layout (renderer, layout,
- width / 2, - RADIUS * PANGO_SCALE);
}
/* Clean up default renderer, since it is shared */
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
PANGO_RENDER_PART_FOREGROUND, NULL);
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
/* free the objects we created */
g_object_unref (layout);
g_object_unref (context);
g_object_unref (gc);
</programlisting>
</example>
<figure>
<title>Output of <xref linkend="rotated-example"/></title>
<graphic fileref="rotated-text.png" format="PNG"/>
</figure>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gdk_pango_layout_get_clip_region ##### -->
<para>
</para>
@layout:
@x_origin:
@y_origin:
@index_ranges:
@n_ranges:
@Returns:
<!-- ##### FUNCTION gdk_pango_layout_line_get_clip_region ##### -->
<para>
</para>
@line:
@x_origin:
@y_origin:
@index_ranges:
@n_ranges:
@Returns:

View File

@@ -0,0 +1,101 @@
<!-- ##### SECTION Title ##### -->
Pixbufs
<!-- ##### SECTION Short_Description ##### -->
Functions for rendering pixbufs on drawables
<!-- ##### SECTION Long_Description ##### -->
<para>
These functions allow to render pixbufs on drawables. Pixbufs are
client-side images. For details on how to create and manipulate
pixbufs, see the #GdkPixbuf API documentation.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gdk_pixbuf_render_threshold_alpha ##### -->
<para>
</para>
@pixbuf:
@bitmap:
@src_x:
@src_y:
@dest_x:
@dest_y:
@width:
@height:
@alpha_threshold:
<para>
</para>
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
<para>
</para>
@pixbuf:
@pixmap_return:
@mask_return:
@alpha_threshold:
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask_for_colormap ##### -->
<para>
</para>
@pixbuf:
@colormap:
@pixmap_return:
@mask_return:
@alpha_threshold:
<!-- ##### FUNCTION gdk_pixbuf_get_from_drawable ##### -->
<para>
</para>
@dest:
@src:
@cmap:
@src_x:
@src_y:
@dest_x:
@dest_y:
@width:
@height:
@Returns:
<!-- ##### FUNCTION gdk_pixbuf_get_from_surface ##### -->
<para>
</para>
@dest:
@surface:
@src_x:
@src_y:
@dest_x:
@dest_y:
@width:
@height:
@Returns:

View File

@@ -0,0 +1,60 @@
<!-- ##### SECTION Title ##### -->
Bitmaps and Pixmaps
<!-- ##### SECTION Short_Description ##### -->
Offscreen drawables
<!-- ##### SECTION Long_Description ##### -->
<para>
Pixmaps are offscreen drawables. They can be drawn upon with the
standard drawing primitives, then copied to another drawable (such as
a #GdkWindow). The depth of a pixmap
is the number of bits per pixels. Bitmaps are simply pixmaps
with a depth of 1. (That is, they are monochrome bitmaps - each
pixel can be either on or off).
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkPixmap ##### -->
<para>
An opaque structure representing an offscreen drawable.
Pointers to structures of type #GdkPixmap, #GdkBitmap,
and #GdkWindow, can often be used interchangeably.
The type #GdkDrawable refers generically to any of
these types.
</para>
<!-- ##### FUNCTION gdk_pixmap_new ##### -->
<para>
Create a new pixmap with a given size and depth.
</para>
@drawable: A #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL if @depth is specified,
@width: The width of the new pixmap in pixels.
@height: The height of the new pixmap in pixels.
@depth: The depth (number of bits per pixel) of the new pixmap.
If -1, and @drawable is not %NULL, the depth of the new
pixmap will be equal to that of @drawable.
@Returns: the #GdkPixmap
<!-- ##### TYPEDEF GdkBitmap ##### -->
<para>
An opaque structure representing an offscreen drawable of depth
1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
#GdkWindow, can often be used interchangeably. The type #GdkDrawable
refers generically to any of these types.
</para>

View File

@@ -0,0 +1,357 @@
<!-- ##### SECTION Title ##### -->
Properties and Atoms
<!-- ##### SECTION Short_Description ##### -->
Functions to manipulate properties on windows
<!-- ##### SECTION Long_Description ##### -->
<para>
Each window under X can have any number of associated
<firstterm>properties</firstterm> attached to it.
Properties are arbitrary chunks of data identified by
<firstterm>atom</firstterm>s. (An <firstterm>atom</firstterm>
is a numeric index into a string table on the X server. They are used
to transfer strings efficiently between clients without
having to transfer the entire string.) A property
has an associated type, which is also identified
using an atom.
</para>
<para>
A property has an associated <firstterm>format</firstterm>,
an integer describing how many bits are in each unit
of data inside the property. It must be 8, 16, or 32.
When data is transferred between the server and client,
if they are of different endianesses it will be byteswapped
as necessary according to the format of the property.
Note that on the client side, properties of format 32
will be stored with one unit per <emphasis>long</emphasis>,
even if a long integer has more than 32 bits on the platform.
(This decision was apparently made for Xlib to maintain
compatibility with programs that assumed longs were 32
bits, at the expense of programs that knew better.)
</para>
<para>
The functions in this section are used to add, remove
and change properties on windows, to convert atoms
to and from strings and to manipulate some types of
data commonly stored in X window properties.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkAtom ##### -->
<para>
An opaque type representing a string as an index into a table
of strings on the X server.
</para>
<!-- ##### MACRO GDK_ATOM_TO_POINTER ##### -->
<para>
Converts a #GdkAtom into a pointer type.
</para>
@atom: a #GdkAtom.
<!-- ##### MACRO GDK_POINTER_TO_ATOM ##### -->
<para>
Extracts a #GdkAtom from a pointer. The #GdkAtom must have been
stored in the pointer with GDK_ATOM_TO_POINTER().
</para>
@ptr: a pointer containing a #GdkAtom.
<!-- ##### MACRO GDK_NONE ##### -->
<para>
A null value for #GdkAtom, used in a similar way as <literal>None</literal>
in the Xlib API.
</para>
<!-- ##### FUNCTION gdk_text_property_to_text_list ##### -->
<para>
Converts a text string from the encoding as it is stored in
a property into an array of strings in the encoding of
the current local. (The elements of the array represent
the nul-separated elements of the original text string.)
</para>
@encoding: an atom representing the encoding. The most common
values for this are <literal>STRING</literal>,
or <literal>COMPOUND_TEXT</literal>. This is
value used as the type for the property.
@format: the format of the property.
@text: the text data.
@length: the length of the property, in items.
@list: location to store a terminated array of strings
in the encoding of the current locale. This
array should be freed using gdk_free_text_list().
@Returns: the number of strings stored in @list, or 0,
if the conversion failed.
<!-- ##### FUNCTION gdk_text_property_to_text_list_for_display ##### -->
<para>
</para>
@display:
@encoding:
@format:
@text:
@length:
@list:
@Returns:
<!-- ##### FUNCTION gdk_free_text_list ##### -->
<para>
Frees the array of strings created by
gdk_text_property_to_text_list().
</para>
@list: the value stored in the @list parameter by
a call to gdk_text_property_to_text_list().
<!-- ##### FUNCTION gdk_text_property_to_utf8_list ##### -->
<para>
</para>
@encoding:
@format:
@text:
@length:
@list:
@Returns:
<!-- ##### FUNCTION gdk_text_property_to_utf8_list_for_display ##### -->
<para>
</para>
@display:
@encoding:
@format:
@text:
@length:
@list:
@Returns:
<!-- ##### FUNCTION gdk_string_to_compound_text ##### -->
<para>
Converts a string from the encoding of the current locale
into a form suitable for storing in a window property.
</para>
@str: a nul-terminated string.
@encoding: location to store the encoding atom (to be used as the type for the property).
@format: location to store the format for the property.
@ctext: location to store newly allocated data for the property.
@length: location to store the length of @ctext in items.
@Returns: 0 upon sucess, non-zero upon failure.
<!-- ##### FUNCTION gdk_string_to_compound_text_for_display ##### -->
<para>
</para>
@display:
@str:
@encoding:
@format:
@ctext:
@length:
@Returns:
<!-- ##### FUNCTION gdk_free_compound_text ##### -->
<para>
Frees the data returned from gdk_string_to_compound_text().
</para>
@ctext: The pointer stored in @ctext from a call to gdk_string_to_compound_text().
<!-- ##### FUNCTION gdk_utf8_to_string_target ##### -->
<para>
</para>
@str:
@Returns:
<!-- ##### FUNCTION gdk_utf8_to_compound_text ##### -->
<para>
</para>
@str:
@encoding:
@format:
@ctext:
@length:
@Returns:
<!-- ##### FUNCTION gdk_utf8_to_compound_text_for_display ##### -->
<para>
</para>
@display:
@str:
@encoding:
@format:
@ctext:
@length:
@Returns:
<!-- ##### FUNCTION gdk_atom_intern ##### -->
<para>
Finds or creates an atom corresponding to a given string.
</para>
@atom_name: a string.
@only_if_exists: if %TRUE, GDK is allowed to not create a new atom, but
just return %GDK_NONE if the requested atom doesn't already
exists. Currently, the flag is ignored, since checking the
existance of an atom is as expensive as creating it.
@Returns: the atom corresponding to @atom_name.
<!-- ##### FUNCTION gdk_atom_intern_static_string ##### -->
<para>
</para>
@atom_name:
@Returns:
<!-- ##### FUNCTION gdk_atom_name ##### -->
<para>
Determines the string corresponding to an atom.
</para>
@atom: a #GdkAtom.
@Returns: a newly-allocated string containing the string
corresponding to @atom. When you are done
with the return value, you should free it
using g_free().
<!-- ##### FUNCTION gdk_property_get ##### -->
<para>
Retrieves a portion of the contents of a property. If the
property does not exist, then the function returns %FALSE,
and %GDK_NONE will be stored in @actual_property_type.
</para>
<note>
<para>
The XGetWindowProperty() function that gdk_property_get()
uses has a very confusing and complicated set of semantics.
Unfortunately, gdk_property_get() makes the situation
worse instead of better (the semantics should be considered
undefined), and also prints warnings to stderr in cases where it
should return a useful error to the program. You are advised to use
XGetWindowProperty() directly until a replacement function for
gdk_property_get()
is provided.
</para>
</note>
@window: a #GdkWindow.
@property: the property to retrieve.
@type: the desired property type, or %GDK_NONE, if any type of data
is acceptable. If this does not match the actual
type, then @actual_format and @actual_length will
be filled in, a warning will be printed to stderr
and no data will be returned.
@offset: the offset into the property at which to begin
retrieving data, in 4 byte units.
@length: the length of the data to retrieve in bytes. Data is
considered to be retrieved in 4 byte chunks, so @length
will be rounded up to the next highest 4 byte boundary
(so be careful not to pass a value that might overflow
when rounded up).
@pdelete: if %TRUE, delete the property after retrieving the
data.
@actual_property_type: location to store the actual type of
the property.
@actual_format: location to store the actual return format of the
data; either 8, 16 or 32 bits.
@actual_length: location to store the length of the retrieved data, in
bytes. Data returned in the 32 bit format is stored
in a long variable, so the actual number of 32 bit
elements should be be calculated via
@actual_length/sizeof(glong) to ensure portability to
64 bit systems.
@data: location to store a pointer to the data. The retrieved
data should be freed with g_free() when you are finished
using it.
@Returns: %TRUE if data was successfully received and stored
in @data, otherwise %FALSE.
<!-- ##### FUNCTION gdk_property_change ##### -->
<para>
Changes the contents of a property on a window.
</para>
@window: a #GdkWindow.
@property: the property to change.
@type: the new type for the property. If @mode is
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
must match the existing type or an error will occur.
@format: the new format for the property. If @mode is
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
must match the existing format or an error will occur.
@mode: a value describing how the new data is to be combined
with the current data.
@data: the data
(a <literal>guchar *</literal>
<literal>gushort *</literal>, or
<literal>gulong *</literal>, depending on @format), cast to a
<literal>guchar *</literal>.
@nelements: the number of elements of size determined by the format,
contained in @data.
<!-- ##### ENUM GdkPropMode ##### -->
<para>
Describes how existing data is combined with new data when
using gdk_property_change().
</para>
@GDK_PROP_MODE_REPLACE: the new data replaces the existing data.
@GDK_PROP_MODE_PREPEND: the new data is prepended to the existing data.
@GDK_PROP_MODE_APPEND: the new data is appended to the existing data.
<!-- ##### FUNCTION gdk_property_delete ##### -->
<para>
Deletes a property from a window.
</para>
@window: a #GdkWindow.
@property: the property to delete.

View File

@@ -0,0 +1,72 @@
<!-- ##### SECTION Title ##### -->
Points and Rectangles
<!-- ##### SECTION Short_Description ##### -->
Simple graphical data types
<!-- ##### SECTION Long_Description ##### -->
<para>
GDK provides the #GdkPoint and #GdkRectangle data types for representing pixels
and sets of pixels on the screen. Together with Cairo's #cairo_region_t data
type, they make up the central types for representing graphical data.
</para>
<para>
#GdkPoint is a simple structure containing an x and y coordinate of a point.
</para>
<para>
#GdkRectangle is a structure holding the position and size of a rectangle.
The intersection of two rectangles can be computed with
gdk_rectangle_intersect(). To find the union of two rectangles use
gdk_rectangle_union().
</para>
<para>
#cairo_region_t is usually used for managing clipping of graphical operations.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkPoint ##### -->
<para>
Defines the x and y coordinates of a point.
</para>
@x: the x coordinate of the point.
@y: the y coordinate of the point.
<!-- ##### TYPEDEF GdkRectangle ##### -->
<para>
Defines the position and size of a rectangle. It is identical to
#cairo_rectangle_int_t.
</para>
<!-- ##### FUNCTION gdk_rectangle_intersect ##### -->
<para>
</para>
@src1:
@src2:
@dest:
@Returns:
<!-- ##### FUNCTION gdk_rectangle_union ##### -->
<para>
</para>
@src1:
@src2:
@dest:

View File

@@ -0,0 +1,279 @@
<!-- ##### SECTION Title ##### -->
Selections
<!-- ##### SECTION Short_Description ##### -->
Functions for transfering data via the X selection mechanism
<!-- ##### SECTION Long_Description ##### -->
<para>
The X selection mechanism provides a way to transfer
arbitrary chunks of data between programs.
A <firstterm>selection</firstterm> is a essentially
a named clipboard, identified by a string interned
as a #GdkAtom. By claiming ownership of a selection,
an application indicates that it will be responsible
for supplying its contents. The most common
selections are <literal>PRIMARY</literal> and
<literal>CLIPBOARD</literal>.
</para>
<para>
The contents of a selection can be represented in
a number of formats, called <firstterm>targets</firstterm>.
Each target is identified by an atom. A list of
all possible targets supported by the selection owner
can be retrieved by requesting the special target
<literal>TARGETS</literal>. When a selection is
retrieved, the data is accompanied by a type
(an atom), and a format (an integer, representing
the number of bits per item).
See <link linkend="gdk-Properties-and-Atoms">Properties and Atoms</link>
for more information.
</para>
<para>
The functions in this section only contain the lowlevel
parts of the selection protocol. A considerably more
complicated implementation is needed on top of this.
GTK+ contains such an implementation in the functions
in <literal>gtkselection.h</literal> and programmers
should use those functions instead of the ones presented
here. If you plan to implement selection handling
directly on top of the functions here, you should refer
to the X Inter-client Communication Conventions Manual
(ICCCM).
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### MACRO GDK_SELECTION_PRIMARY ##### -->
<para>
A #GdkAtom representing the <literal>PRIMARY</literal> selection.
</para>
<!-- ##### MACRO GDK_SELECTION_SECONDARY ##### -->
<para>
A #GdkAtom representing the <literal>SECONDARY</literal> selection.
</para>
<!-- ##### MACRO GDK_SELECTION_CLIPBOARD ##### -->
<para>
A #GdkAtom representing the <literal>CLIPBOARD</literal> selection.
</para>
<!-- ##### MACRO GDK_TARGET_BITMAP ##### -->
<para>
A #GdkAtom representing the <literal>BITMAP</literal> selection target.
</para>
<!-- ##### MACRO GDK_TARGET_COLORMAP ##### -->
<para>
A #GdkAtom representing the <literal>COLORMAP</literal> selection target.
</para>
<!-- ##### MACRO GDK_TARGET_DRAWABLE ##### -->
<para>
A #GdkAtom representing the <literal>DRAWABLE</literal> selection target.
</para>
<!-- ##### MACRO GDK_TARGET_PIXMAP ##### -->
<para>
A #GdkAtom representing the <literal>PIXMAP</literal> selection target.
</para>
<!-- ##### MACRO GDK_TARGET_STRING ##### -->
<para>
A #GdkAtom representing the <literal>STRING</literal> selection target.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_ATOM ##### -->
<para>
A #GdkAtom representing the <literal>ATOM</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_BITMAP ##### -->
<para>
A #GdkAtom representing the <literal>BITMAP</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_COLORMAP ##### -->
<para>
A #GdkAtom representing the <literal>COLORMAP</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_DRAWABLE ##### -->
<para>
A #GdkAtom representing the <literal>DRAWABLE</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_INTEGER ##### -->
<para>
A #GdkAtom representing the <literal>INTEGER</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_PIXMAP ##### -->
<para>
A #GdkAtom representing the <literal>PIXMAP</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_WINDOW ##### -->
<para>
A #GdkAtom representing the <literal>WINDOW</literal> selection type.
</para>
<!-- ##### MACRO GDK_SELECTION_TYPE_STRING ##### -->
<para>
A #GdkAtom representing the <literal>STRING</literal> selection type.
</para>
<!-- ##### FUNCTION gdk_selection_owner_set ##### -->
<para>
Sets the owner of the given selection.
</para>
@owner: a #GdkWindow or %NULL to indicate that the
the owner for the given should be unset.
@selection: an atom identifying a selection.
@time_: timestamp to use when setting the selection.
If this is older than the timestamp given last
time the owner was set for the given selection, the
request will be ignored.
@send_event: if %TRUE, and the new owner is different
from the current owner, the current owner
will be sent a SelectionClear event.
@Returns: %TRUE if the selection owner was successfully
changed to @owner, otherwise %FALSE.
<!-- ##### FUNCTION gdk_selection_owner_set_for_display ##### -->
<para>
</para>
@display:
@owner:
@selection:
@time_:
@send_event:
@Returns:
<!-- ##### FUNCTION gdk_selection_owner_get ##### -->
<para>
Determines the owner of the given selection.
</para>
@selection: an atom indentifying a selection.
@Returns: if there is a selection owner for this window,
and it is a window known to the current process,
the #GdkWindow that owns the selection, otherwise
%NULL. Note that the return value may be owned
by a different process if a foreign window
was previously created for that window, but
a new foreign window will never be created by
this call.
<!-- ##### FUNCTION gdk_selection_owner_get_for_display ##### -->
<para>
</para>
@display:
@selection:
@Returns:
<!-- ##### FUNCTION gdk_selection_convert ##### -->
<para>
Retrieves the contents of a selection in a given
form.
</para>
@requestor: a #GdkWindow.
@selection: an atom identifying the selection to get the
contents of.
@target: the form in which to retrieve the selection.
@time_: the timestamp to use when retrieving the
selection. The selection owner may refuse the
request if it did not own the selection at
the time indicated by the timestamp.
<!-- ##### FUNCTION gdk_selection_property_get ##### -->
<para>
</para>
@requestor:
@data:
@prop_type:
@prop_format:
@Returns:
<!-- ##### FUNCTION gdk_selection_send_notify ##### -->
<para>
Sends a response to SelectionRequest event.
</para>
@requestor: window to which to deliver response.
@selection: selection that was requested.
@target: target that was selected.
@property: property in which the selection owner stored the
data, or %GDK_NONE to indicate that the request
was rejected.
@time_: timestamp.
<!-- ##### FUNCTION gdk_selection_send_notify_for_display ##### -->
<para>
</para>
@display:
@requestor:
@selection:
@target:
@property:
@time_:

View File

@@ -0,0 +1,381 @@
<!-- ##### SECTION Title ##### -->
Threads
<!-- ##### SECTION Short_Description ##### -->
Functions for using GDK in multi-threaded programs
<!-- ##### SECTION Long_Description ##### -->
<para>
For thread safety, GDK relies on the thread primitives in GLib,
and on the thread-safe GLib main loop.
</para>
<para>
GLib is completely thread safe (all global data is automatically
locked), but individual data structure instances are not automatically
locked for performance reasons. So e.g. you must coordinate
accesses to the same #GHashTable from multiple threads.
</para>
<para>
GTK+ is "thread aware" but not thread safe &mdash; it provides a
global lock controlled by gdk_threads_enter()/gdk_threads_leave()
which protects all use of GTK+. That is, only one thread can use GTK+
at any given time.
</para>
<para>
Unfortunately the above holds with the X11 backend only. With the
Win32 backend, GDK calls should not be attempted from multiple threads
at all.
</para>
<para>
You must call g_thread_init() and gdk_threads_init() before executing
any other GTK+ or GDK functions in a threaded GTK+ program.
</para>
<para>
Idles, timeouts, and input functions from GLib, such as g_idle_add(), are
executed outside of the main GTK+ lock.
So, if you need to call GTK+ inside of such a callback, you must surround
the callback with a gdk_threads_enter()/gdk_threads_leave() pair or use
gdk_threads_add_idle_full() which does this for you.
However, event dispatching from the mainloop is still executed within
the main GTK+ lock, so callback functions connected to event signals
like GtkWidget::button-press-event, do not need thread protection.
</para>
<para>
In particular, this means, if you are writing widgets that might
be used in threaded programs, you <emphasis>must</emphasis> surround
timeouts and idle functions in this matter.
</para>
<para>
As always, you must also surround any calls to GTK+ not made within
a signal handler with a gdk_threads_enter()/gdk_threads_leave() pair.
</para>
<para>
Before calling gdk_threads_leave() from a thread other
than your main thread, you probably want to call gdk_flush()
to send all pending commands to the windowing system.
(The reason you don't need to do this from the main thread
is that GDK always automatically flushes pending commands
when it runs out of incoming events to process and has
to sleep while waiting for more events.)
</para>
<para>A minimal main program for a threaded GTK+ application
looks like:</para>
<informalexample>
<programlisting role="C">
int
main (int argc, char *argv[])
{
GtkWidget *window;
g_thread_init (NULL);
gdk_threads_init (<!-- -->);
gdk_threads_enter (<!-- -->);
gtk_init (&amp;argc, &amp;argv);
window = create_window (<!-- -->);
gtk_widget_show (window);
gtk_main (<!-- -->);
gdk_threads_leave (<!-- -->);
return 0;
}
</programlisting>
</informalexample>
<para>
Callbacks require a bit of attention. Callbacks from GTK+ signals
are made within the GTK+ lock. However callbacks from GLib (timeouts,
IO callbacks, and idle functions) are made outside of the GTK+
lock. So, within a signal handler you do not need to call
gdk_threads_enter(), but within the other types of callbacks, you
do.
</para>
<para>Erik Mouw contributed the following code example to
illustrate how to use threads within GTK+ programs.
</para>
<informalexample>
<programlisting role="C">
/*-------------------------------------------------------------------------
* Filename: gtk-thread.c
* Version: 0.99.1
* Copyright: Copyright (C) 1999, Erik Mouw
* Author: Erik Mouw &lt;J.A.K.Mouw@its.tudelft.nl&gt;
* Description: GTK threads example.
* Created at: Sun Oct 17 21:27:09 1999
* Modified by: Erik Mouw &lt;J.A.K.Mouw@its.tudelft.nl&gt;
* Modified at: Sun Oct 24 17:21:41 1999
*-----------------------------------------------------------------------*/
/*
* Compile with:
*
* cc -o gtk-thread gtk-thread.c `gtk-config --cflags --libs gthread`
*
* Thanks to Sebastian Wilhelmi and Owen Taylor for pointing out some
* bugs.
*
*/
&num;include &lt;stdio.h&gt;
&num;include &lt;stdlib.h&gt;
&num;include &lt;unistd.h&gt;
&num;include &lt;time.h&gt;
&num;include &lt;gtk/gtk.h&gt;
&num;include &lt;glib.h&gt;
&num;include &lt;pthread.h&gt;
&num;define YES_IT_IS (1)
&num;define NO_IT_IS_NOT (0)
typedef struct
{
GtkWidget *label;
int what;
} yes_or_no_args;
G_LOCK_DEFINE_STATIC (yes_or_no);
static volatile int yes_or_no = YES_IT_IS;
void destroy (GtkWidget *widget, gpointer data)
{
gtk_main_quit (<!-- -->);
}
void *argument_thread (void *args)
{
yes_or_no_args *data = (yes_or_no_args *)args;
gboolean say_something;
for (;;)
{
/* sleep a while */
sleep(rand(<!-- -->) / (RAND_MAX / 3) + 1);
/* lock the yes_or_no_variable */
G_LOCK(yes_or_no);
/* do we have to say something? */
say_something = (yes_or_no != data->what);
if(say_something)
{
/* set the variable */
yes_or_no = data->what;
}
/* Unlock the yes_or_no variable */
G_UNLOCK (yes_or_no);
if (say_something)
{
/* get GTK thread lock */
gdk_threads_enter (<!-- -->);
/* set label text */
if(data->what == YES_IT_IS)
gtk_label_set_text (GTK_LABEL (data->label), "O yes, it is!");
else
gtk_label_set_text (GTK_LABEL (data->label), "O no, it isn't!");
/* release GTK thread lock */
gdk_threads_leave (<!-- -->);
}
}
return NULL;
}
int main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *label;
yes_or_no_args yes_args, no_args;
pthread_t no_tid, yes_tid;
/* init threads */
g_thread_init (NULL);
gdk_threads_init (<!-- -->);
gdk_threads_enter (<!-- -->);
/* init gtk */
gtk_init(&amp;argc, &amp;argv);
/* init random number generator */
srand ((unsigned int) time (NULL));
/* create a window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
/* create a label */
label = gtk_label_new ("And now for something completely different ...");
gtk_container_add (GTK_CONTAINER (window), label);
/* show everything */
gtk_widget_show (label);
gtk_widget_show (window);
/* create the threads */
yes_args.label = label;
yes_args.what = YES_IT_IS;
pthread_create (&amp;yes_tid, NULL, argument_thread, &amp;yes_args);
no_args.label = label;
no_args.what = NO_IT_IS_NOT;
pthread_create (&amp;no_tid, NULL, argument_thread, &amp;no_args);
/* enter the GTK main loop */
gtk_main (<!-- -->);
gdk_threads_leave (<!-- -->);
return 0;
}
</programlisting>
</informalexample>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### MACRO GDK_THREADS_ENTER ##### -->
<para>
This macro marks the beginning of a critical section in which GDK and
GTK+ functions can be called safely and without causing race
conditions. Only one thread at a time can be in such a critial
section. The macro expands to a no-op if #G_THREADS_ENABLED has not
been defined. Typically gdk_threads_enter() should be used instead of
this macro.
</para>
<!-- ##### MACRO GDK_THREADS_LEAVE ##### -->
<para>
This macro marks the end of a critical section
begun with #GDK_THREADS_ENTER.
</para>
<!-- ##### FUNCTION gdk_threads_init ##### -->
<para>
</para>
@void:
<!-- ##### FUNCTION gdk_threads_enter ##### -->
<para>
This macro marks the beginning of a critical section in which GDK and
GTK+ functions can be called safely and without causing race
conditions. Only one thread at a time can be in such a critial
section.
</para>
@void:
<!-- ##### FUNCTION gdk_threads_leave ##### -->
<para>
Leaves a critical region begun with gdk_threads_enter().
</para>
@void:
<!-- ##### FUNCTION gdk_threads_set_lock_functions ##### -->
<para>
</para>
@enter_fn:
@leave_fn:
<!-- ##### FUNCTION gdk_threads_add_idle ##### -->
<para>
</para>
@function:
@data:
@Returns:
<!-- ##### FUNCTION gdk_threads_add_idle_full ##### -->
<para>
</para>
@priority:
@function:
@data:
@notify:
@Returns:
<!-- ##### FUNCTION gdk_threads_add_timeout ##### -->
<para>
</para>
@interval:
@function:
@data:
@Returns:
<!-- ##### FUNCTION gdk_threads_add_timeout_full ##### -->
<para>
</para>
@priority:
@interval:
@function:
@data:
@notify:
@Returns:
<!-- ##### FUNCTION gdk_threads_add_timeout_seconds ##### -->
<para>
</para>
@interval:
@function:
@data:
@Returns:
<!-- ##### FUNCTION gdk_threads_add_timeout_seconds_full ##### -->
<para>
</para>
@priority:
@interval:
@function:
@data:
@notify:
@Returns:

View File

@@ -0,0 +1,287 @@
<!-- ##### SECTION Title ##### -->
Visuals
<!-- ##### SECTION Short_Description ##### -->
Low-level display hardware information
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GdkVisual describes a particular video hardware display format. It includes
information about the number of bits used for each color, the way the bits are
translated into an RGB value for display, and the way the bits are stored in
memory. For example, a piece of display hardware might support 24-bit color,
16-bit color, or 8-bit color; meaning 24/16/8-bit pixel sizes. For a given
pixel size, pixels can be in different formats; for example the "red" element
of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower
4 bits.
</para>
<para>
There are several standard visuals. The visual returned
by gdk_visual_get_system() is the system's default
visual. gdk_rgb_get_visual() return the visual most
suited to displaying full-color image data. If you
use the calls in #GdkRGB, you should create your windows
using this visual (and the colormap returned by
gdk_rgb_get_colormap()).
</para>
<para>
A number of functions are provided for determining
the "best" available visual. For the purposes of
making this determination, higher bit depths are
considered better, and for visuals of the same
bit depth, %GDK_VISUAL_PSEUDO_COLOR is preferred at
8bpp, otherwise, the visual types are ranked in the
order of (highest to lowest) %GDK_VISUAL_DIRECT_COLOR,
%GDK_VISUAL_TRUE_COLOR, %GDK_VISUAL_PSEUDO_COLOR,
%GDK_VISUAL_STATIC_COLOR, %GDK_VISUAL_GRAYSCALE,
then %GDK_VISUAL_STATIC_GRAY.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GdkColormap
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkVisual ##### -->
<para>
The <type>GdkVisual</type> structure contains information about
a particular visual.
</para>
<example id="rgbmask">
<title>Constructing a pixel value from components</title>
<programlisting>
guint
pixel_from_rgb (GdkVisual *visual,
guchar r, guchar b, guchar g)
{
return ((r &gt;&gt; (16 - visual-&gt;red_prec)) &lt;&lt; visual-&gt;red_shift) |
((g &gt;&gt; (16 - visual-&gt;green_prec)) &lt;&lt; visual-&gt;green_shift) |
((r &gt;&gt; (16 - visual-&gt;blue_prec)) &lt;&lt; visual-&gt;blue_shift);
}
</programlisting>
</example>
@parent_instance: inherited portion from #GObject
<!-- ##### ENUM GdkVisualType ##### -->
<para>
A set of values that describe the manner in which the
pixel values for a visual are converted into RGB
values for display.
</para>
@GDK_VISUAL_STATIC_GRAY: Each pixel value indexes a grayscale value directly.
@GDK_VISUAL_GRAYSCALE: Each pixel is an index into a color map that maps pixel
values into grayscale values. The color map can be changed by an application.
@GDK_VISUAL_STATIC_COLOR: Each pixel value is an index into a predefined,
unmodifiable color map that maps pixel values into RGB values.
@GDK_VISUAL_PSEUDO_COLOR: Each pixel is an index into a color map that maps
pixel values into rgb values. The color map can be changed by an application.
@GDK_VISUAL_TRUE_COLOR: Each pixel value directly contains red, green,
and blue components. The <structfield>red_mask</structfield>,
<structfield>green_mask</structfield>, and
<structfield>blue_mask</structfield> fields of the #GdkVisual
structure describe how the components are assembled into a pixel value.
@GDK_VISUAL_DIRECT_COLOR: Each pixel value contains red, green, and blue
components as for %GDK_VISUAL_TRUE_COLOR, but the components are mapped via a
color table into the final output table instead of being converted directly.
<!-- ##### ENUM GdkByteOrder ##### -->
<para>
A set of values describing the possible byte-orders
for storing pixel values in memory.
</para>
@GDK_LSB_FIRST: The values are stored with the least-significant byte
first. For instance, the 32-bit value 0xffeecc would be stored
in memory as 0xcc, 0xee, 0xff, 0x00.
@GDK_MSB_FIRST: The values are stored with the most-significant byte
first. For instance, the 32-bit value 0xffeecc would be stored
in memory as 0x00, 0xcc, 0xee, 0xff.
<!-- ##### FUNCTION gdk_query_depths ##### -->
<para>
</para>
@depths:
@count:
<!-- ##### FUNCTION gdk_query_visual_types ##### -->
<para>
</para>
@visual_types:
@count:
<!-- ##### FUNCTION gdk_list_visuals ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_bits_per_rgb ##### -->
<para>
</para>
@visual:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_blue_pixel_details ##### -->
<para>
</para>
@visual:
@mask:
@shift:
@precision:
<!-- ##### FUNCTION gdk_visual_get_byte_order ##### -->
<para>
</para>
@visual:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_colormap_size ##### -->
<para>
</para>
@visual:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_depth ##### -->
<para>
</para>
@visual:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_green_pixel_details ##### -->
<para>
</para>
@visual:
@mask:
@shift:
@precision:
<!-- ##### FUNCTION gdk_visual_get_red_pixel_details ##### -->
<para>
</para>
@visual:
@mask:
@shift:
@precision:
<!-- ##### FUNCTION gdk_visual_get_visual_type ##### -->
<para>
</para>
@visual:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_depth ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_type ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_system ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_best ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_with_depth ##### -->
<para>
</para>
@depth:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_with_type ##### -->
<para>
</para>
@visual_type:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_with_both ##### -->
<para>
</para>
@depth:
@visual_type:
@Returns:
<!-- ##### FUNCTION gdk_visual_get_screen ##### -->
<para>
</para>
@visual:
@Returns:

View File

@@ -0,0 +1,660 @@
<!-- ##### SECTION Title ##### -->
X Window System Interaction
<!-- ##### SECTION Short_Description ##### -->
X backend-specific functions
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### MACRO GDK_ROOT_WINDOW ##### -->
<para>
Obtains the Xlib window id of the root window of the current screen.
</para>
<!-- ##### MACRO GDK_DISPLAY ##### -->
<para>
The current display.
</para>
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_WINDOW_XDISPLAY ##### -->
<para>
Returns the display of a #GdkWindow.
</para>
@win: a #GdkWindow.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_WINDOW_XID ##### -->
<para>
Returns the X window belonging to a #GdkWindow.
</para>
@win: a #GdkWindow.
@Returns: the Xlib <type>Window</type> of @win.
<!-- ##### MACRO GDK_PIXMAP_XDISPLAY ##### -->
<para>
Returns the display of a #GdkPixmap.
</para>
@pix: a #GdkPixmap.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_PIXMAP_XID ##### -->
<para>
Returns the X pixmap belonging to a #GdkPixmap.
</para>
@pix: a #GdkPixmap.
@Returns: the Xlib <type>XPixmap</type> of @win.
<!-- ##### MACRO GDK_DISPLAY_XDISPLAY ##### -->
<para>
Returns the display of a #GdkDisplay.
</para>
@display: a #GdkDisplay.
<!-- ##### MACRO GDK_DRAWABLE_XDISPLAY ##### -->
<para>
Returns the display of a #GdkDrawable.
</para>
@win: a #GdkDrawable.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_DRAWABLE_XID ##### -->
<para>
Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
</para>
@win: a #GdkDrawable.
@Returns: the ID of @win's X resource.
<!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
<para>
Returns the display of a #GdkColormap.
</para>
@cmap: a #GdkColormap.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_COLORMAP_XCOLORMAP ##### -->
<para>
Returns the X colormap belonging to a #GdkColormap.
</para>
@cmap: a #GdkColormap.
@Returns: an Xlib <type>Colormap</type>.
<!-- ##### MACRO GDK_SCREEN_XDISPLAY ##### -->
<para>
Returns the display of a #GdkScreen.
</para>
@screen: a #GdkScreen.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_SCREEN_XNUMBER ##### -->
<para>
Returns the index of a #GdkScreen.
</para>
@screen: a #GdkScreen
@Returns: the position of @screen among the screens of
its display.
<!-- ##### MACRO GDK_SCREEN_XSCREEN ##### -->
<para>
Returns the screen of a #GdkScreen.
</para>
@screen: a #GdkScreen
@Returns: an Xlib <type>Screen*</type>.
<!-- ##### MACRO GDK_VISUAL_XVISUAL ##### -->
<para>
Returns the X visual belonging to a #GdkVisual.
</para>
@vis: a #GdkVisual.
@Returns: an Xlib <type>Visual*</type>.
<!-- ##### MACRO GDK_CURSOR_XCURSOR ##### -->
<para>
Returns the X cursor belonging to a #GdkCursor.
</para>
@cursor: a #GdkCursor.
@Returns: an Xlib <type>Cursor</type>.
<!-- ##### MACRO GDK_CURSOR_XDISPLAY ##### -->
<para>
Returns the display of a #GdkCursor.
</para>
@cursor: a #GdkCursor.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_WINDOW_XWINDOW ##### -->
<para>
Another name for GDK_DRAWABLE_XID().
</para>
<!-- ##### FUNCTION gdkx_visual_get ##### -->
<para>
</para>
@xvisualid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_foreign_new ##### -->
<para>
</para>
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_foreign_new_for_display ##### -->
<para>
</para>
@display:
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_foreign_new_for_screen ##### -->
<para>
</para>
@screen:
@anid:
@width:
@height:
@depth:
@Returns:
<!-- ##### FUNCTION gdk_window_foreign_new ##### -->
<para>
</para>
@anid:
@Returns:
<!-- ##### FUNCTION gdk_window_foreign_new_for_display ##### -->
<para>
</para>
@display:
@anid:
@Returns:
<!-- ##### FUNCTION gdk_xid_table_lookup ##### -->
<para>
</para>
@xid:
@Returns:
<!-- ##### FUNCTION gdk_xid_table_lookup_for_display ##### -->
<para>
</para>
@display:
@xid:
@Returns:
<!-- ##### FUNCTION gdk_window_lookup ##### -->
<para>
</para>
@anid:
@Returns:
<!-- ##### FUNCTION gdk_window_lookup_for_display ##### -->
<para>
</para>
@display:
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_lookup ##### -->
<para>
</para>
@anid:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_lookup_for_display ##### -->
<para>
</para>
@display:
@anid:
@Returns:
<!-- ##### FUNCTION gdk_x11_lookup_xdisplay ##### -->
<para>
</para>
@xdisplay:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_server_time ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gdk_net_wm_supports ##### -->
<para>
</para>
@property:
@Returns:
<!-- ##### FUNCTION gdk_x11_screen_supports_net_wm_hint ##### -->
<para>
</para>
@screen:
@property:
@Returns:
<!-- ##### FUNCTION gdk_x11_screen_get_window_manager_name ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_x11_screen_get_monitor_output ##### -->
<para>
</para>
@screen:
@monitor_num:
@Returns:
<!-- ##### FUNCTION gdk_x11_screen_lookup_visual ##### -->
<para>
</para>
@screen:
@xvisualid:
@Returns:
<!-- ##### FUNCTION gdk_x11_window_set_user_time ##### -->
<para>
</para>
@window:
@timestamp:
<!-- ##### FUNCTION gdk_x11_window_move_to_current_desktop ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gdk_x11_display_get_user_time ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_x11_colormap_foreign_new ##### -->
<para>
</para>
@visual:
@xcolormap:
@Returns:
<!-- ##### FUNCTION gdk_x11_colormap_get_xcolormap ##### -->
<para>
</para>
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_x11_colormap_get_xdisplay ##### -->
<para>
</para>
@colormap:
@Returns:
<!-- ##### FUNCTION gdk_x11_cursor_get_xcursor ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_x11_cursor_get_xdisplay ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_x11_display_broadcast_startup_message ##### -->
<para>
</para>
@display:
@message_type:
@Varargs:
<!-- ##### FUNCTION gdk_x11_display_get_startup_notification_id ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_x11_display_get_xdisplay ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_x11_display_grab ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_x11_display_ungrab ##### -->
<para>
</para>
@display:
<!-- ##### FUNCTION gdk_x11_display_set_cursor_theme ##### -->
<para>
</para>
@display:
@theme:
@size:
<!-- ##### FUNCTION gdk_x11_register_standard_event_type ##### -->
<para>
</para>
@display:
@event_base:
@n_events:
<!-- ##### FUNCTION gdk_x11_drawable_get_xdisplay ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_x11_drawable_get_xid ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_default_root_xwindow ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_default_screen ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_default_xdisplay ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_x11_grab_server ##### -->
<para>
</para>
@void:
<!-- ##### FUNCTION gdk_x11_screen_get_screen_number ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_x11_screen_get_xscreen ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_x11_ungrab_server ##### -->
<para>
</para>
@void:
<!-- ##### FUNCTION gdk_x11_visual_get_xvisual ##### -->
<para>
</para>
@visual:
@Returns:
<!-- ##### FUNCTION gdk_x11_atom_to_xatom ##### -->
<para>
</para>
@atom:
@Returns:
<!-- ##### FUNCTION gdk_x11_atom_to_xatom_for_display ##### -->
<para>
</para>
@display:
@atom:
@Returns:
<!-- ##### FUNCTION gdk_x11_xatom_to_atom ##### -->
<para>
</para>
@xatom:
@Returns:
<!-- ##### FUNCTION gdk_x11_xatom_to_atom_for_display ##### -->
<para>
</para>
@display:
@xatom:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_xatom_by_name ##### -->
<para>
</para>
@atom_name:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_xatom_by_name_for_display ##### -->
<para>
</para>
@display:
@atom_name:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_xatom_name ##### -->
<para>
</para>
@xatom:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_xatom_name_for_display ##### -->
<para>
</para>
@display:
@xatom:
@Returns:

View File

@@ -1,4 +1,5 @@
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
AUTOMAKE_OPTIONS = 1.6
@@ -21,8 +22,6 @@ CFILE_GLOB=$(top_srcdir)/gtk/*.c
# Header files to ignore when scanning
IGNORE_HFILES= \
fnmatch.h \
gtk9slice.h \
gtkanimationdescription.h \
gtkdebug.h \
gtkbuilderprivate.h \
gtkdndcursors.h \
@@ -78,7 +77,6 @@ IGNORE_HFILES= \
gtktexttagprivate.h \
gtktexttypes.h \
gtktextutil.h \
gtktimeline.h \
gtkthemes.h \
gtktrayicon.h \
gtktreedatalist.h \
@@ -106,8 +104,8 @@ CPPFLAGS += \
-UGTK_DISABLE_SINGLE_INCLUDES
GTKDOC_LIBS = \
$(top_builddir)/gtk/libgtk-3.0.la \
$(GTK_DEP_LIBS)
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
# Extra options to supply to gtkdoc-mkdb
@@ -123,8 +121,6 @@ content_files = \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkApplication.xml \
migrating-GtkStyleContext.xml \
objects_grouped.sgml \
osx.sgml \
question_index.sgml \
@@ -134,23 +130,18 @@ content_files = \
windows.sgml \
x11.sgml \
gtk-query-immodules-3.0.xml \
gtk-update-icon-cache.xml \
gtk-builder-convert.xml \
visual_index.xml \
getting_started.xml \
overview.xml
gtk-update-icon-cache-3.0.xml \
gtk-builder-convert-3.0.xml \
visual_index.xml
expand_content_files = \
drawing-model.xml \
getting_started.xml \
glossary.xml \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkApplication.xml \
migrating-GtkStyleContext.xml \
question_index.sgml \
tree_widget.sgml \
text_widget.sgml \
tree_widget.sgml
question_index.sgml
# Images to copy into HTML directory
HTML_IMAGES = \
@@ -275,8 +266,6 @@ 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 \
@@ -326,36 +315,7 @@ HTML_IMAGES = \
$(srcdir)/images/layout-rlbt.png \
$(srcdir)/images/layout-rltb.png \
$(srcdir)/images/layout-tblr.png \
$(srcdir)/images/layout-tbrl.png \
$(srcdir)/images/window-default.png \
$(srcdir)/images/hello-world.png \
$(srcdir)/images/switch.png \
$(srcdir)/images/linear.png \
$(srcdir)/images/ease.png \
$(srcdir)/images/ease-in-out.png \
$(srcdir)/images/ease-in.png \
$(srcdir)/images/ease-out.png \
$(srcdir)/images/gradient1.png \
$(srcdir)/images/gradient2.png \
$(srcdir)/images/gradient3.png \
$(srcdir)/images/gradient4.png \
$(srcdir)/images/border1.png \
$(srcdir)/images/border2.png \
$(srcdir)/images/border3.png \
$(srcdir)/images/slices.png \
$(srcdir)/images/checks.png \
$(srcdir)/images/options.png \
$(srcdir)/images/arrows.png \
$(srcdir)/images/expanders.png \
$(srcdir)/images/background.png \
$(srcdir)/images/frames.png \
$(srcdir)/images/frame-gap.png \
$(srcdir)/images/sliders.png \
$(srcdir)/images/focus.png \
$(srcdir)/images/handles.png \
$(srcdir)/images/extensions.png \
$(srcdir)/images/numerableicon.png \
$(srcdir)/images/numerableicon2.png
$(srcdir)/images/layout-tbrl.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
@@ -374,8 +334,8 @@ EXTRA_DIST += version.xml.in
man_MANS = \
gtk-query-immodules-3.0.1 \
gtk-update-icon-cache.1 \
gtk-builder-convert.1
gtk-update-icon-cache-3.0.1 \
gtk-builder-convert-3.0.1
if ENABLE_MAN

View File

@@ -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 with GTK+ much faster than building it yourself. In
programming wih 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 you won't need these tools installed; the necessary pieces
then 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,15 +57,14 @@ How to compile GTK+ itself
tar xvfj gtk+-3.0.0.tar.bz2
</programlisting>
<para>
In the toplevel directory that is created, there will be
In the toplevel of the 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>
@@ -211,6 +210,22 @@ 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
@@ -231,16 +246,10 @@ 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 all of their
compositing. Both Pango and GTK+ use cairo for much 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>
@@ -280,8 +289,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>gtk3-demo</command> program that
applications</link>. You can test your GTK+ installation
by running the <command>gtk-demo</command> program that
GTK+ installs.
</para>
<para>
@@ -318,12 +327,16 @@ 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>
<arg>--enable-Bsymbolic</arg>
</group>
<group>
<arg>--disable-shm</arg>
<arg>--enable-shm</arg>
</group>
<group>
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
@@ -345,23 +358,13 @@ How to compile GTK+ itself
<arg>--enable-papi</arg>
</group>
<group>
<arg>--enable-xinput</arg>
<arg>--disable-xinput</arg>
<arg>--with-xinput=[no|yes]</arg>
</group>
<group>
<arg>--enable-packagekit</arg>
<arg>--disable-packagekit</arg>
<arg>--with-gdktarget=[x11|win32|quartz]</arg>
</group>
<group>
<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>
<arg>--disable-introspection</arg>
</group>
</cmdsynopsis>
</para>
@@ -372,14 +375,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>
@@ -389,8 +392,7 @@ How to compile GTK+ itself
<para>
This option allows you to specify which input method modules you
want to include directly into the GTK+ shared library, as opposed
to building them as loadable modules.
want to include.
</para>
</formalpara>
@@ -398,9 +400,10 @@ 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
@@ -417,8 +420,6 @@ 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>
@@ -447,6 +448,17 @@ How to compile GTK+ itself
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-shm</systemitem> and
<systemitem>--enable-shm</systemitem></title>
<para>
These options can be used to control whether GTK+ will use shared
memory to communicate with the X server when possible.
The default is 'yes'.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-xkb</systemitem> and
<systemitem>--enable-xkb</systemitem></title>
@@ -472,21 +484,6 @@ 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>
@@ -531,40 +528,33 @@ How to compile GTK+ itself
</formalpara>
<formalpara>
<title><systemitem>--disable-packagekit</systemitem> and
<systemitem>--enable-packagekit</systemitem></title>
<title><systemitem>--with-xinput</systemitem></title>
<para>
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>--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>
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.
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>--enable-introspection</systemitem></title>
<title><systemitem>--with-gdktarget</systemitem></title>
<para>
Build with or without introspection support.
The default is 'auto'.
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.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-introspection</systemitem></title>
<para>
Build without introspection support.
</para>
</formalpara>
</refsect1>

View File

@@ -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-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
-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
</programlisting>
</para>
<para>
@@ -69,5 +69,24 @@ 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>

Some files were not shown because too many files have changed in this diff Show More