Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 586ac41c68 | |||
| 988e4f1134 | |||
| f03c304a25 | |||
| 87bb81887a | |||
| 5a80b1fb2d | |||
| f38a3c0d74 | |||
| 1a8c032dde | |||
| c6cb5eebdc | |||
| b2cc6279b2 | |||
| 525bd57c67 | |||
| e462f7957d | |||
| b525a47ad0 | |||
| ff2660ed80 | |||
| 2216cbd9a3 | |||
| 25509380c4 | |||
| fdafb0ec30 | |||
| 49268a750f | |||
| 616ad664f4 | |||
| eb70ceb551 | |||
| 64319ec227 | |||
| f9939a13f8 | |||
| 8e3cea214e | |||
| ba79bbcc65 | |||
| c79c73161c | |||
| 66d7626930 | |||
| 79101f3588 | |||
| ec4ce57e87 | |||
| c68c0e5a1c | |||
| 8a013f6c3e | |||
| 299a997aea | |||
| 2c9989c5d1 | |||
| 28ae6fd0be | |||
| 85346c0d99 | |||
| 3fc06dd8bb | |||
| 1e865a99c1 | |||
| 8792f8092e | |||
| 3352e4b955 | |||
| e5f16d59fc | |||
| 627ce4c77d | |||
| 7d9460fc57 | |||
| 7eedd893f0 | |||
| cae66dbe90 | |||
| 99ae34dbb4 | |||
| 6bd907a60a | |||
| bfe2935455 | |||
| 5f16b8c044 | |||
| 34c0a31975 | |||
| fdeaab7124 | |||
| 0703eeab08 | |||
| f73596a9b2 | |||
| 0b6393d572 | |||
| 6e715f77ef | |||
| 08f5202516 | |||
| 04b7b41b75 | |||
| e6dcb53237 | |||
| 0725e54524 | |||
| 6c20020be6 | |||
| 56f5382343 | |||
| 585772c32e | |||
| 05c629ffe9 | |||
| 69ff1d8a93 | |||
| 27ab4f7937 | |||
| 278d1063c7 |
+1
-2
@@ -6,7 +6,6 @@ SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST += \
|
||||
HACKING \
|
||||
@@ -243,7 +242,7 @@ sanity:
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds --enable-introspection
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds
|
||||
|
||||
GITIGNOREFILES = \
|
||||
po-properties/Makefile.in.in \
|
||||
|
||||
@@ -1,240 +1,3 @@
|
||||
Overview of Changes from GTK+ 2.19.1 to 2.19.2
|
||||
==============================================
|
||||
|
||||
* Introspection:
|
||||
- Introspection data for gdk-pixbuf, gdk and gtk is now
|
||||
included in GTK+ itself. As a consequence, the atk dependency
|
||||
has been bumped to 2.29.2, and a gobject-introspection dependency
|
||||
has been added. configure with --disable-introspection in order
|
||||
to not build introspection data.
|
||||
|
||||
* Client-side windows:
|
||||
- Fix some issues with handling of button and motion events
|
||||
- Fix damage reporting for drawing on offscreen windows
|
||||
- Fix problems with handling of input extension events
|
||||
|
||||
* Printing:
|
||||
- Add api to handle printer hard margins
|
||||
|
||||
* Simple IM Context:
|
||||
- Sync with Xorg compose file
|
||||
- Make Compose-vowel-minus combinations consistent
|
||||
|
||||
* GDK:
|
||||
- gdk_screen_get_primary_monitor: New function to get the
|
||||
'primary' monitor in a multi-monitor setup
|
||||
|
||||
* gdk-pixbuf has gained the ability to store and retrieve embedded
|
||||
ICC color profiles in png and tiff images
|
||||
|
||||
* Bugs fixed:
|
||||
603652 Sporadic crashes with GtkSocket
|
||||
605008 the region of damage event doesn't be copied in gdk_event_copy
|
||||
588554 only show the accelerator when pressing alt
|
||||
601473 GDK_BUTTON?_MOTION_MASK appears to be broken
|
||||
601712 Add API for determining primary monitor
|
||||
50942 selection/arrow key improvement
|
||||
427409 editing shortcut always fails with super key
|
||||
468989 need a way to get the printer's hard margins
|
||||
502266 gtk_tree_selection_get_selected_rows free example produces...
|
||||
592279 Introspection support
|
||||
597386 Cannot click buttons more than once without moving the mouse...
|
||||
599213 Use GtkCellEditable:editing_canceled property instead...
|
||||
599397 Button stuck at pressed look after screen rotation
|
||||
601383 gtk_icon_view_get_selected_items: example code gives...
|
||||
602099 Actions can be activatable too
|
||||
603619 the colormap of offscreen's pixmap doesn't inherit...
|
||||
603904 gdk_draw_line doesn't have expose area.
|
||||
604117 Add info about single includes when compiling GTK+ apps
|
||||
604289 Please permit progress pages to be final in a dialog
|
||||
604462 gtktoolitem.c: return-value is different type
|
||||
604747 Using gdk_draw_line, the expose area of damage event is wrong
|
||||
604787 property-notify-event is not delivered to a non-toplevel...
|
||||
604881 GtkCellEditable::editing-cancelled should be writable
|
||||
591085 GtkBuilder object ID bounded to GtkWidget "name" property
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
Estonian
|
||||
Hebrew
|
||||
Low German
|
||||
Norwegian bokmål
|
||||
Slovenian
|
||||
Spanish
|
||||
Telugu
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.19.0 to 2.19.1
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Avoid some unnecessary exposes
|
||||
- Avoid unnecessary redraws related to clearing windows
|
||||
|
||||
* GtkNotebook gained an 'action area'
|
||||
|
||||
* GtkStatusbar gained a 'message area'
|
||||
|
||||
* GtkToolPalette is a new container to show tool items
|
||||
in collapsible groups in a grid
|
||||
|
||||
* gdk-pixbuf can now handle compressed TIFF images
|
||||
|
||||
* GSEAL work:
|
||||
- New accessor: gtk_window_get_window_type()
|
||||
|
||||
* Bugs fixed:
|
||||
590017 Does not compile under MinGW32 + Wine
|
||||
569430 Gail should include a reciprocal relationship for NODE_CHILD_OF
|
||||
598758 Need context for a propper translation
|
||||
594535 No accesor for GtkStatusbar->label and ->frame
|
||||
602725 fix setting icon-size on GICON images
|
||||
599402 Landscape and Reverse Landscape icons need to be swapped
|
||||
588740 JPEG images open with blur effect?
|
||||
601337 Only use gdk_input_select_events() if XINPUT_NONE is defined
|
||||
598050 Flickering in a gtk_socket
|
||||
600158 Do not use static GTypeInfo and GInterfaceInfo
|
||||
561973 Problem dragging images from Firefox to GTK+ app on Windows
|
||||
601512 Remove unnecessary check in GtkTreeModelFilter
|
||||
600222 Check for existence of cairo-svg.h in configure.in
|
||||
595498 No accesor for GTK_WINDOW ()->type
|
||||
116650 "action area" for GtkNotebook (e.g. for tab close button)
|
||||
600150 GtkColorSelection tooltip issues
|
||||
480065 wrong tree collapsed (or expanded) after having scrolled
|
||||
596473 Second double-click of GtkTreeView row doesn't emit...
|
||||
601869 GtkUIManager assumes too much about popup menus
|
||||
581145 Wrong positioning for fullscreen gedit toolbar animation
|
||||
602724 gailimage doesn't handle GTK_IMAGE_{GICON,ICON_NAME}...
|
||||
561130 get_monitor_geometry segfaults if called with non-existant...
|
||||
597026 Missing include for memset()
|
||||
585383 Segfault in gdk_pixbuf__ico_image_save
|
||||
597865 Move documentation from templates to inline comments
|
||||
123569 Catch contents being reparented out of socket
|
||||
561334 Incorrect named constant in documentation of two GtkButton...
|
||||
601611 gtk_selection_data_get_targets() reads X Atom data as GdkAtoms
|
||||
601409 action area presence modifies notebook behaviour
|
||||
603268 wrong Since: markers in toolpalette merge
|
||||
603271 wrong toolbar style
|
||||
601959 must release compose key before continuing compose sequence
|
||||
603302 Incorrectly warn about links on text with color and underline
|
||||
603201 gtk_about_dialog_set_url_hook has no effect anymore
|
||||
591438 dfb_events_dispatch is not thread safe
|
||||
589842 GtkAction API to have its menu item proxies have always-show...
|
||||
584700 TIFF pixbuf loader should support compression
|
||||
603128 Adding new UI that was recently removed may cause wrong order
|
||||
601682 Print preview should use gtk_show_uri by default
|
||||
596083 Deprecate notebook label packing functionality
|
||||
|
||||
* Updated translations:
|
||||
Estonian
|
||||
Galician
|
||||
Japanese
|
||||
Low German
|
||||
Norwegian bokmål
|
||||
Punjabi
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.18.x to 2.19.0
|
||||
==============================================
|
||||
|
||||
* A throbber widget and cell renderer have been added: GtkSpinner and
|
||||
GtkCellRendererSpinner
|
||||
|
||||
* GtkFileSystemModel has been reimplemented, for major speedups and
|
||||
other improvements
|
||||
|
||||
* Synchronize compose sequences with the current X.org Compose file
|
||||
|
||||
* Win32:
|
||||
- The GDI+ image loader works again
|
||||
- XP themes have been disabled since they don't work currently
|
||||
|
||||
* OS X:
|
||||
- Fix crashes due to unimplemented GdkWindowImplIface methods
|
||||
- Use standard Mac keyboard shortcuts (Cmx-X, Cmd-C instead of
|
||||
Ctrl-X, Ctrl-C, etc)
|
||||
- Add a pixbuf loader for the QTIF format
|
||||
- Improve multi-monitor handling
|
||||
|
||||
* GSEAL work:
|
||||
- New accessor for GtkDialog buttons: gtk_dialog_get_widget_for_response
|
||||
- New accessor for GtkViewport bin_window: gtk_viewport_get_bin_window
|
||||
- Add a GtkCellEditable::editing-canceled property
|
||||
|
||||
* Deprecations:
|
||||
- GtkInputDialog has been deprecated
|
||||
- GtkCurve and GtkGammaCurve have been deprecated
|
||||
- The tab-packing feature in GtkNotebook has been deprecated
|
||||
|
||||
* Bugs fixed:
|
||||
594644 Cannot compile GTK+ with MinGW 4.4.0
|
||||
581150 GtkIconView tries to paint items with invalid sizes
|
||||
598881 Unimplemented GdkWindowImplIface methods crash gimp on OSX
|
||||
598218 Substitute deprecated gtk_*_ref/unref calls
|
||||
381371 Print margins not correct in WIN32 - not allowing for...
|
||||
597596 Toolbar button accessible objects don't have label name
|
||||
599118 Translators comment for "Finishing" labels
|
||||
598261 Add support to GtkTooltip to handle GIcons
|
||||
530351 Use standard mac shortcuts
|
||||
597865 Move documentation from templates to inline comments
|
||||
596083 Deprecate notebook label packing functionality
|
||||
594903 Deprecate GtkInputDialog
|
||||
599403 Avoid using accel group internals in GtkSocket
|
||||
590800 The window content is not updated correctly when scrolling
|
||||
598515 Do not assign the GtkSpinner parent class twice
|
||||
552678 gdi+ pixbuf loaders fail on "large" images
|
||||
598217 Substitute deprecated gdk_*_ref/unref calls
|
||||
596238 Make Quartz backend properly implement the GdkScreen...
|
||||
599446 atk_object_set_name () assertion in gtk_tool_button_set_label
|
||||
592582 Print preview doesn't reflect the printout
|
||||
563010 GtkFileChooserButton cannot have none file selected again
|
||||
596019 No accesors for GtkDialog buttons
|
||||
366217 Add QTIF image support
|
||||
594962 No accessor for GTK_ENTRY (entry)->editing_canceled
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
Brazilian Portuguese
|
||||
Bulgarian
|
||||
Catalan
|
||||
Finnish
|
||||
Greek
|
||||
Norwegian bokmål
|
||||
Oriya
|
||||
Punjabi
|
||||
Romanian
|
||||
Russian
|
||||
Serbian
|
||||
Shavian
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
Slovenian
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.18.1 to 2.18.2
|
||||
==============================================
|
||||
|
||||
* GTK+ now ignores SIGPIPE in gtk_init(). Previously
|
||||
this was done deep in the lpr printbackend.
|
||||
|
||||
* Fix compilation of the DirectFB backend.
|
||||
|
||||
* Bugs fixed:
|
||||
597386 Cannot click buttons more than once...
|
||||
588059 sometimes notification icons are not visible with csw
|
||||
|
||||
* Updated translations:
|
||||
Italian
|
||||
Japanese
|
||||
Serbian
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.18.0 to 2.18.1
|
||||
==============================================
|
||||
|
||||
|
||||
@@ -27,24 +27,6 @@ Installation
|
||||
See the file 'INSTALL'
|
||||
|
||||
|
||||
Release notes for 2.20
|
||||
======================
|
||||
|
||||
* GtkStatusbar now has a message area (see gtk_status_bar_get_message_area)
|
||||
which makes it easy to place additional widgets inside the statusbar
|
||||
frame or to replace the label widgets. Previously, this was only possible
|
||||
by accessing the innards of the statusbar widget directly. Applications
|
||||
which are doing so may need some adjustments, since the addition of the
|
||||
message area changed the internal widget hierarchy.
|
||||
|
||||
* GDK will now set all matching virtual modifiers in the state field of
|
||||
key events. Depending on your X modifier map, this can lead to more bits
|
||||
in the state field being set than before. If you are manually matching
|
||||
key events against key/modifier combinations you should make sure that
|
||||
you properly mask away irrelevant parts of the state field. The
|
||||
gdk_keymap_map_virtual_modifiers() function can help with matching
|
||||
against virtual modifiers.
|
||||
|
||||
Release notes for 2.18
|
||||
======================
|
||||
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ rm -rf autom4te.cache
|
||||
# regenerated from their corresponding *.in files by ./configure anyway.
|
||||
touch README INSTALL
|
||||
|
||||
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit $?
|
||||
|
||||
libtoolize --force || exit $?
|
||||
gtkdocize || exit $?
|
||||
|
||||
+6
-25
@@ -1,6 +1,6 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
# require autoconf 2.54
|
||||
AC_PREREQ(2.62)
|
||||
AC_PREREQ(2.54)
|
||||
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
@@ -11,9 +11,9 @@ AC_PREREQ(2.62)
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [19])
|
||||
m4_define([gtk_minor_version], [18])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_interface_age], [2])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -33,7 +33,7 @@ m4_define([gtk_binary_version], [2.10.0])
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.21.3])
|
||||
m4_define([pango_required_version], [1.20])
|
||||
m4_define([atk_required_version], [1.29.2])
|
||||
m4_define([atk_required_version], [1.13.0])
|
||||
m4_define([cairo_required_version], [1.6])
|
||||
|
||||
|
||||
@@ -43,12 +43,10 @@ AC_INIT([gtk+], [gtk_version],
|
||||
|
||||
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([no-define -Wno-portability])
|
||||
AM_INIT_AUTOMAKE(no-define)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# Support silent build rules, requires at least automake-1.11. Enable
|
||||
@@ -582,7 +580,6 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(MATH_LIB)
|
||||
#
|
||||
# see bug 162979
|
||||
#
|
||||
@@ -993,7 +990,7 @@ fi
|
||||
# because some important apps like GIMP need to read and write
|
||||
# arbitrary tEXt chunks which doesn't seem to be possible through GDI+
|
||||
|
||||
all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
|
||||
all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm"
|
||||
if test x$with_libjasper != xno; then
|
||||
all_loaders="$all_loaders,jasper"
|
||||
fi
|
||||
@@ -1064,7 +1061,6 @@ AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
|
||||
# As all GDI+ loaders are either built-in or not, arbitrarily just
|
||||
# check one of the variables here
|
||||
AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
|
||||
@@ -1935,10 +1931,6 @@ if test "$os_win32" != "yes"; then
|
||||
AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-ps.h. You must build Cairo with the
|
||||
*** postscript backend enabled.]))
|
||||
|
||||
AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-svg.h. You must build Cairo with the
|
||||
*** svg backend enabled.]))
|
||||
fi
|
||||
|
||||
CPPFLAGS="$gtk_save_cppflags"
|
||||
@@ -1973,17 +1965,6 @@ if test -n "$export_dynamic"; then
|
||||
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
|
||||
fi
|
||||
|
||||
##################################################
|
||||
# GObject introspection
|
||||
##################################################
|
||||
|
||||
GOBJECT_INTROSPECTION_CHECK([0.6.7])
|
||||
|
||||
# Hack around introspection installing into an absolute path breaking distcheck
|
||||
tmp=`pkg-config --variable=datadir gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=${INTROSPECTION_GIRDIR/$tmp/\$(datadir)}
|
||||
tmp=`pkg-config --variable=libdir gobject-introspection-1.0`
|
||||
INTROSPECTION_TYPELIBDIR=${INTROSPECTION_TYPELIBDIR/$tmp/\$(libdir)}
|
||||
|
||||
##################################################
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
|
||||
@@ -154,7 +154,7 @@ rgb1 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
|
||||
int bpl;
|
||||
register guint8 data;
|
||||
guint8 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
d (printf ("1 bits/pixel\n"));
|
||||
|
||||
@@ -191,7 +191,7 @@ rgb1a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
|
||||
int bpl;
|
||||
register guint8 data;
|
||||
guint8 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
guint32 remap[2];
|
||||
|
||||
d (printf ("1 bits/pixel\n"));
|
||||
@@ -241,7 +241,7 @@ rgb8 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
|
||||
int bpl;
|
||||
guint32 mask;
|
||||
register guint32 data;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
register guint8 *s;
|
||||
register guint8 *o;
|
||||
|
||||
@@ -282,7 +282,7 @@ rgb8a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
|
||||
guint32 remap[256];
|
||||
register guint8 *s; /* read 2 pixels at once */
|
||||
register guint32 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -336,7 +336,7 @@ rgb565lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
register guint8 *s; /* read 2 pixels at once */
|
||||
#endif
|
||||
register guint16 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -407,7 +407,7 @@ rgb565msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
register guint32 *s; /* read 2 pixels at once */
|
||||
#endif
|
||||
register guint16 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -479,7 +479,7 @@ rgb565alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
#endif
|
||||
register guint32 *o;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -536,7 +536,7 @@ rgb565amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
#endif
|
||||
register guint32 *o;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -592,7 +592,7 @@ rgb555lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
register guint8 *s; /* read 2 pixels at once */
|
||||
#endif
|
||||
register guint16 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -663,7 +663,7 @@ rgb555msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
register guint32 *s; /* read 2 pixels at once */
|
||||
#endif
|
||||
register guint16 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -735,7 +735,7 @@ rgb555alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
#endif
|
||||
register guint32 *o;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -792,7 +792,7 @@ rgb555amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
#endif
|
||||
register guint32 *o;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -840,7 +840,7 @@ rgb888alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
|
||||
guint8 *s; /* for byte order swapping */
|
||||
guint8 *o;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
|
||||
width = image->width;
|
||||
height = image->height;
|
||||
@@ -871,7 +871,7 @@ rgb888lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
int width, height;
|
||||
int bpl;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
guint8 *o, *s;
|
||||
|
||||
width = image->width;
|
||||
@@ -901,7 +901,7 @@ rgb888amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
|
||||
int width, height;
|
||||
int bpl;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
#ifdef LITTLE
|
||||
guint32 *o;
|
||||
guint32 *s;
|
||||
@@ -949,7 +949,7 @@ rgb888msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
|
||||
int width, height;
|
||||
int bpl;
|
||||
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
guint8 *s;
|
||||
guint8 *o;
|
||||
|
||||
@@ -983,7 +983,7 @@ convert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *
|
||||
int xx, yy;
|
||||
int width, height;
|
||||
int bpl;
|
||||
guint8 *srow = (guint8 *)image->data, *orow = pixels;
|
||||
guint8 *srow = image->data, *orow = pixels;
|
||||
guint8 *o;
|
||||
guint32 pixel;
|
||||
Visual *v;
|
||||
@@ -1134,7 +1134,7 @@ xlib_window_is_viewable (Window w)
|
||||
|
||||
while (w != 0) {
|
||||
Window parent, root, *children;
|
||||
guint nchildren;
|
||||
int nchildren;
|
||||
|
||||
XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);
|
||||
if (wa.map_state != IsViewable)
|
||||
@@ -1223,7 +1223,7 @@ gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height)
|
||||
{
|
||||
guint src_width, src_height;
|
||||
int src_width, src_height;
|
||||
XImage *image;
|
||||
int rowstride, bpp, alpha;
|
||||
XWindowAttributes wa;
|
||||
@@ -1260,8 +1260,7 @@ gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
|
||||
src_height = wa.height;
|
||||
} else {
|
||||
Window root;
|
||||
int tx, ty;
|
||||
guint bwidth, depth;
|
||||
int tx, ty, bwidth, depth;
|
||||
XGetGeometry (gdk_pixbuf_dpy, src, &root, &tx, &ty,
|
||||
&src_width, &src_height, &bwidth, &depth);
|
||||
}
|
||||
|
||||
+1
-7
@@ -19,14 +19,11 @@ DEPS = \
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(MATH_LIB)
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
testpixbuf-drawable \
|
||||
testanimation \
|
||||
testpixbuf-color \
|
||||
testpixbuf-save \
|
||||
testpixbuf-scale \
|
||||
pixbuf-demo
|
||||
@@ -55,7 +52,6 @@ test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
|
||||
testpixbuf_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_save_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_color_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_scale_DEPENDENCIES = $(DEPS)
|
||||
testanimation_DEPENDENCIES = $(DEPS)
|
||||
pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||
@@ -63,7 +59,6 @@ pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_LDADD = $(LDADDS)
|
||||
testpixbuf_drawable_LDADD = $(LDADDS)
|
||||
testpixbuf_save_LDADD = $(LDADDS)
|
||||
testpixbuf_color_LDADD = $(LDADDS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS)
|
||||
testanimation_LDADD = $(LDADDS)
|
||||
pixbuf_demo_LDADD = $(LDADDS)
|
||||
@@ -71,7 +66,6 @@ pixbuf_demo_LDADD = $(LDADDS)
|
||||
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
|
||||
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
|
||||
testpixbuf_save_SOURCES = testpixbuf-save.c
|
||||
testpixbuf_color_SOURCES = testpixbuf-color.c
|
||||
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
|
||||
testanimation_SOURCES = testanimation.c pixbuf-init.c
|
||||
pixbuf_demo_SOURCES = pixbuf-demo.c pixbuf-init.c
|
||||
|
||||
@@ -37,11 +37,9 @@ demos = \
|
||||
rotated_text.c \
|
||||
search_entry.c \
|
||||
sizegroup.c \
|
||||
spinner.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
textscroll.c \
|
||||
toolpalette.c \
|
||||
tree_store.c \
|
||||
ui_manager.c
|
||||
|
||||
@@ -62,8 +60,7 @@ DEPS = \
|
||||
LDADDS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS)
|
||||
$(top_builddir)/gtk/$(gtktargetlib)
|
||||
|
||||
bin_PROGRAMS = gtk-demo
|
||||
|
||||
|
||||
+36
-110
@@ -10,8 +10,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkTreeModel *model = NULL;
|
||||
static guint timeout = 0;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -28,8 +26,6 @@ enum
|
||||
COLUMN_NUMBER,
|
||||
COLUMN_SEVERITY,
|
||||
COLUMN_DESCRIPTION,
|
||||
COLUMN_PULSE,
|
||||
COLUMN_ACTIVE,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
@@ -51,33 +47,6 @@ static Bug data[] =
|
||||
{ FALSE, 1, "Normal", "First bug :=)" },
|
||||
};
|
||||
|
||||
static gboolean
|
||||
spinner_timeout (gpointer data)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
guint pulse;
|
||||
|
||||
if (model == NULL)
|
||||
return FALSE;
|
||||
|
||||
gtk_tree_model_get_iter_first (model, &iter);
|
||||
gtk_tree_model_get (model, &iter,
|
||||
COLUMN_PULSE, &pulse,
|
||||
-1);
|
||||
if (pulse == G_MAXUINT)
|
||||
pulse = 0;
|
||||
else
|
||||
pulse++;
|
||||
|
||||
gtk_list_store_set (GTK_LIST_STORE (model),
|
||||
&iter,
|
||||
COLUMN_PULSE, pulse,
|
||||
COLUMN_ACTIVE, TRUE,
|
||||
-1);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GtkTreeModel *
|
||||
create_model (void)
|
||||
{
|
||||
@@ -87,25 +56,21 @@ create_model (void)
|
||||
|
||||
/* create list store */
|
||||
store = gtk_list_store_new (NUM_COLUMNS,
|
||||
G_TYPE_BOOLEAN,
|
||||
G_TYPE_UINT,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_UINT,
|
||||
G_TYPE_BOOLEAN);
|
||||
G_TYPE_BOOLEAN,
|
||||
G_TYPE_UINT,
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_STRING);
|
||||
|
||||
/* add data to the list store */
|
||||
for (i = 0; i < G_N_ELEMENTS (data); i++)
|
||||
{
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COLUMN_FIXED, data[i].fixed,
|
||||
COLUMN_NUMBER, data[i].number,
|
||||
COLUMN_SEVERITY, data[i].severity,
|
||||
COLUMN_DESCRIPTION, data[i].description,
|
||||
COLUMN_PULSE, 0,
|
||||
COLUMN_ACTIVE, FALSE,
|
||||
-1);
|
||||
COLUMN_FIXED, data[i].fixed,
|
||||
COLUMN_NUMBER, data[i].number,
|
||||
COLUMN_SEVERITY, data[i].severity,
|
||||
COLUMN_DESCRIPTION, data[i].description,
|
||||
-1);
|
||||
}
|
||||
|
||||
return GTK_TREE_MODEL (store);
|
||||
@@ -113,8 +78,8 @@ create_model (void)
|
||||
|
||||
static void
|
||||
fixed_toggled (GtkCellRendererToggle *cell,
|
||||
gchar *path_str,
|
||||
gpointer data)
|
||||
gchar *path_str,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
GtkTreeIter iter;
|
||||
@@ -145,75 +110,48 @@ add_columns (GtkTreeView *treeview)
|
||||
/* column for fixed toggles */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_signal_connect (renderer, "toggled",
|
||||
G_CALLBACK (fixed_toggled), model);
|
||||
G_CALLBACK (fixed_toggled), model);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Fixed?",
|
||||
renderer,
|
||||
"active", COLUMN_FIXED,
|
||||
NULL);
|
||||
renderer,
|
||||
"active", COLUMN_FIXED,
|
||||
NULL);
|
||||
|
||||
/* set this column to a fixed sizing (of 50 pixels) */
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
|
||||
/* column for bug numbers */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes ("Bug number",
|
||||
renderer,
|
||||
"text",
|
||||
COLUMN_NUMBER,
|
||||
NULL);
|
||||
renderer,
|
||||
"text",
|
||||
COLUMN_NUMBER,
|
||||
NULL);
|
||||
gtk_tree_view_column_set_sort_column_id (column, COLUMN_NUMBER);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
|
||||
/* column for severities */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes ("Severity",
|
||||
renderer,
|
||||
"text",
|
||||
COLUMN_SEVERITY,
|
||||
NULL);
|
||||
renderer,
|
||||
"text",
|
||||
COLUMN_SEVERITY,
|
||||
NULL);
|
||||
gtk_tree_view_column_set_sort_column_id (column, COLUMN_SEVERITY);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
|
||||
/* column for description */
|
||||
renderer = gtk_cell_renderer_text_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes ("Description",
|
||||
renderer,
|
||||
"text",
|
||||
COLUMN_DESCRIPTION,
|
||||
NULL);
|
||||
renderer,
|
||||
"text",
|
||||
COLUMN_DESCRIPTION,
|
||||
NULL);
|
||||
gtk_tree_view_column_set_sort_column_id (column, COLUMN_DESCRIPTION);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
|
||||
/* column for spinner */
|
||||
renderer = gtk_cell_renderer_spinner_new ();
|
||||
column = gtk_tree_view_column_new_with_attributes ("Spinning",
|
||||
renderer,
|
||||
"pulse",
|
||||
COLUMN_PULSE,
|
||||
"active",
|
||||
COLUMN_ACTIVE,
|
||||
NULL);
|
||||
gtk_tree_view_column_set_sort_column_id (column, COLUMN_PULSE);
|
||||
gtk_tree_view_append_column (treeview, column);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
window_closed (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
model = NULL;
|
||||
window = NULL;
|
||||
if (timeout != 0)
|
||||
{
|
||||
g_source_remove (timeout);
|
||||
timeout = 0;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -224,16 +162,17 @@ do_list_store (GtkWidget *do_widget)
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *sw;
|
||||
GtkTreeModel *model;
|
||||
GtkWidget *treeview;
|
||||
|
||||
/* create window, etc */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GtkListStore demo");
|
||||
|
||||
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_vbox_new (FALSE, 8);
|
||||
@@ -244,10 +183,10 @@ do_list_store (GtkWidget *do_widget)
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
|
||||
/* create tree model */
|
||||
@@ -257,7 +196,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
treeview = gtk_tree_view_new_with_model (model);
|
||||
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
|
||||
gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview),
|
||||
COLUMN_DESCRIPTION);
|
||||
COLUMN_DESCRIPTION);
|
||||
|
||||
g_object_unref (model);
|
||||
|
||||
@@ -268,27 +207,14 @@ do_list_store (GtkWidget *do_widget)
|
||||
|
||||
/* finish & show */
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (window_closed), NULL);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
if (timeout == 0) {
|
||||
/* FIXME this should use the animation-duration instead */
|
||||
timeout = g_timeout_add (80, spinner_timeout, NULL);
|
||||
}
|
||||
}
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
if (timeout != 0)
|
||||
{
|
||||
g_source_remove (timeout);
|
||||
timeout = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return window;
|
||||
|
||||
@@ -149,8 +149,7 @@ do_printing (GtkWidget *do_widget)
|
||||
GtkPrintOperation *operation;
|
||||
GtkPrintSettings *settings;
|
||||
PrintData *data;
|
||||
gchar *uri, *ext;
|
||||
const gchar *dir;
|
||||
gchar *uri, *dir, *ext;
|
||||
GError *error = NULL;
|
||||
|
||||
operation = gtk_print_operation_new ();
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* Spinner
|
||||
*
|
||||
* GtkSpinner allows to show that background activity is on-going.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *spinner_sensitive = NULL;
|
||||
static GtkWidget *spinner_unsensitive = NULL;
|
||||
|
||||
static void
|
||||
on_play_clicked (GtkButton *button, gpointer user_data)
|
||||
{
|
||||
gtk_spinner_start (GTK_SPINNER (spinner_sensitive));
|
||||
gtk_spinner_start (GTK_SPINNER (spinner_unsensitive));
|
||||
}
|
||||
|
||||
static void
|
||||
on_stop_clicked (GtkButton *button, gpointer user_data)
|
||||
{
|
||||
gtk_spinner_stop (GTK_SPINNER (spinner_sensitive));
|
||||
gtk_spinner_stop (GTK_SPINNER (spinner_unsensitive));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_spinner (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *button;
|
||||
GtkWidget *spinner;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("GtkSpinner",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
GTK_STOCK_CLOSE,
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
g_signal_connect (window, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
/* Sensitive */
|
||||
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 ());
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
spinner_sensitive = spinner;
|
||||
|
||||
/* Disabled */
|
||||
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 ());
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
spinner_unsensitive = spinner;
|
||||
gtk_widget_set_sensitive (hbox, FALSE);
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (on_play_clicked), spinner);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (on_stop_clicked), spinner);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||
|
||||
/* Start by default to test for:
|
||||
* https://bugzilla.gnome.org/show_bug.cgi?id=598496 */
|
||||
on_play_clicked (NULL, NULL);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,792 +0,0 @@
|
||||
/* Tool Palette
|
||||
*
|
||||
* A tool palette widget shows groups of toolbar items as a grid of icons
|
||||
* or a list of names.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void load_stock_items (GtkToolPalette *palette);
|
||||
static void load_toggle_items (GtkToolPalette *palette);
|
||||
static void load_special_items (GtkToolPalette *palette);
|
||||
|
||||
typedef struct _CanvasItem CanvasItem;
|
||||
|
||||
struct _CanvasItem
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
gdouble x, y;
|
||||
};
|
||||
|
||||
static CanvasItem *drop_item = NULL;
|
||||
static GList *canvas_items = NULL;
|
||||
|
||||
/********************************/
|
||||
/* ====== Canvas drawing ====== */
|
||||
/********************************/
|
||||
|
||||
static CanvasItem*
|
||||
canvas_item_new (GtkWidget *widget,
|
||||
GtkToolButton *button,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
CanvasItem *item = NULL;
|
||||
const gchar *stock_id;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
stock_id = gtk_tool_button_get_stock_id (button);
|
||||
pixbuf = gtk_widget_render_icon (widget, stock_id, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
item = g_slice_new0 (CanvasItem);
|
||||
item->pixbuf = pixbuf;
|
||||
item->x = x;
|
||||
item->y = y;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
static void
|
||||
canvas_item_free (CanvasItem *item)
|
||||
{
|
||||
g_object_unref (item->pixbuf);
|
||||
g_slice_free (CanvasItem, item);
|
||||
}
|
||||
|
||||
static void
|
||||
canvas_item_draw (const CanvasItem *item,
|
||||
cairo_t *cr,
|
||||
gboolean preview)
|
||||
{
|
||||
gdouble cx = gdk_pixbuf_get_width (item->pixbuf);
|
||||
gdouble cy = gdk_pixbuf_get_height (item->pixbuf);
|
||||
|
||||
gdk_cairo_set_source_pixbuf (cr,
|
||||
item->pixbuf,
|
||||
item->x - cx * 0.5,
|
||||
item->y - cy * 0.5);
|
||||
|
||||
if (preview)
|
||||
cairo_paint_with_alpha (cr, 0.6);
|
||||
else
|
||||
cairo_paint (cr);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
canvas_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
cairo_t *cr;
|
||||
GList *iter;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
gdk_cairo_region (cr, event->region);
|
||||
cairo_clip (cr);
|
||||
|
||||
cairo_set_source_rgb (cr, 1, 1, 1);
|
||||
cairo_rectangle (cr, 0, 0, widget->allocation.width, widget->allocation.height);
|
||||
cairo_fill (cr);
|
||||
|
||||
for (iter = canvas_items; iter; iter = iter->next)
|
||||
canvas_item_draw (iter->data, cr, FALSE);
|
||||
|
||||
if (drop_item)
|
||||
canvas_item_draw (drop_item, cr, TRUE);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*****************************/
|
||||
/* ====== Palette DnD ====== */
|
||||
/*****************************/
|
||||
|
||||
static void
|
||||
palette_drop_item (GtkToolItem *drag_item,
|
||||
GtkToolItemGroup *drop_group,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GtkWidget *drag_group = gtk_widget_get_parent (GTK_WIDGET (drag_item));
|
||||
GtkToolItem *drop_item = gtk_tool_item_group_get_drop_item (drop_group, x, y);
|
||||
gint drop_position = -1;
|
||||
|
||||
if (drop_item)
|
||||
drop_position = gtk_tool_item_group_get_item_position (GTK_TOOL_ITEM_GROUP (drop_group), drop_item);
|
||||
|
||||
if (GTK_TOOL_ITEM_GROUP (drag_group) != drop_group)
|
||||
{
|
||||
gboolean homogeneous, expand, fill, new_row;
|
||||
|
||||
g_object_ref (drag_item);
|
||||
gtk_container_child_get (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item),
|
||||
"homogeneous", &homogeneous,
|
||||
"expand", &expand,
|
||||
"fill", &fill,
|
||||
"new-row", &new_row,
|
||||
NULL);
|
||||
gtk_container_remove (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item));
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (drop_group),
|
||||
drag_item, drop_position);
|
||||
gtk_container_child_set (GTK_CONTAINER (drop_group), GTK_WIDGET (drag_item),
|
||||
"homogeneous", homogeneous,
|
||||
"expand", expand,
|
||||
"fill", fill,
|
||||
"new-row", new_row,
|
||||
NULL);
|
||||
g_object_unref (drag_item);
|
||||
}
|
||||
else
|
||||
gtk_tool_item_group_set_item_position (GTK_TOOL_ITEM_GROUP (drop_group),
|
||||
drag_item, drop_position);
|
||||
}
|
||||
|
||||
static void
|
||||
palette_drop_group (GtkToolPalette *palette,
|
||||
GtkWidget *drag_group,
|
||||
GtkWidget *drop_group)
|
||||
{
|
||||
gint drop_position = -1;
|
||||
|
||||
if (drop_group)
|
||||
drop_position = gtk_tool_palette_get_group_position (palette, drop_group);
|
||||
|
||||
gtk_tool_palette_set_group_position (palette, drag_group, drop_position);
|
||||
}
|
||||
|
||||
static void
|
||||
palette_drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *drag_palette = gtk_drag_get_source_widget (context);
|
||||
GtkWidget *drag_item = NULL, *drop_group = NULL;
|
||||
|
||||
while (drag_palette && !GTK_IS_TOOL_PALETTE (drag_palette))
|
||||
drag_palette = gtk_widget_get_parent (drag_palette);
|
||||
|
||||
if (drag_palette)
|
||||
{
|
||||
drag_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (drag_palette),
|
||||
selection);
|
||||
drop_group = gtk_tool_palette_get_drop_group (GTK_TOOL_PALETTE (widget),
|
||||
x, y);
|
||||
}
|
||||
|
||||
if (GTK_IS_TOOL_ITEM_GROUP (drag_item))
|
||||
palette_drop_group (GTK_TOOL_PALETTE (drag_palette), drag_item, drop_group);
|
||||
else if (GTK_IS_TOOL_ITEM (drag_item) && drop_group)
|
||||
palette_drop_item (GTK_TOOL_ITEM (drag_item),
|
||||
GTK_TOOL_ITEM_GROUP (drop_group),
|
||||
x - GTK_WIDGET (drop_group)->allocation.x,
|
||||
y - GTK_WIDGET (drop_group)->allocation.y);
|
||||
}
|
||||
|
||||
/********************************/
|
||||
/* ====== Passive Canvas ====== */
|
||||
/********************************/
|
||||
|
||||
static void
|
||||
passive_canvas_drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
/* find the tool button, which is the source of this DnD operation */
|
||||
|
||||
GtkWidget *palette = gtk_drag_get_source_widget (context);
|
||||
CanvasItem *canvas_item = NULL;
|
||||
GtkWidget *tool_item = NULL;
|
||||
|
||||
while (palette && !GTK_IS_TOOL_PALETTE (palette))
|
||||
palette = gtk_widget_get_parent (palette);
|
||||
|
||||
if (palette)
|
||||
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
|
||||
selection);
|
||||
|
||||
g_assert (NULL == drop_item);
|
||||
|
||||
/* append a new canvas item when a tool button was found */
|
||||
|
||||
if (GTK_IS_TOOL_ITEM (tool_item))
|
||||
canvas_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
|
||||
|
||||
if (canvas_item)
|
||||
{
|
||||
canvas_items = g_list_append (canvas_items, canvas_item);
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************/
|
||||
/* ====== Interactive Canvas ====== */
|
||||
/************************************/
|
||||
|
||||
static gboolean
|
||||
interactive_canvas_drag_motion (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
if (drop_item)
|
||||
{
|
||||
/* already have a drop indicator - just update position */
|
||||
|
||||
drop_item->x = x;
|
||||
drop_item->y = y;
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
gdk_drag_status (context, GDK_ACTION_COPY, time);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* request DnD data for creating a drop indicator */
|
||||
|
||||
GdkAtom target = gtk_drag_dest_find_target (widget, context, NULL);
|
||||
|
||||
if (!target)
|
||||
return FALSE;
|
||||
|
||||
gtk_drag_get_data (widget, context, target, time);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
interactive_canvas_drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
|
||||
{
|
||||
/* find the tool button which is the source of this DnD operation */
|
||||
|
||||
GtkWidget *palette = gtk_drag_get_source_widget (context);
|
||||
GtkWidget *tool_item = NULL;
|
||||
|
||||
while (palette && !GTK_IS_TOOL_PALETTE (palette))
|
||||
palette = gtk_widget_get_parent (palette);
|
||||
|
||||
if (palette)
|
||||
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
|
||||
selection);
|
||||
|
||||
/* create a drop indicator when a tool button was found */
|
||||
|
||||
g_assert (NULL == drop_item);
|
||||
|
||||
if (GTK_IS_TOOL_ITEM (tool_item))
|
||||
{
|
||||
drop_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
|
||||
gdk_drag_status (context, GDK_ACTION_COPY, time);
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
interactive_canvas_drag_drop (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
if (drop_item)
|
||||
{
|
||||
/* turn the drop indicator into a real canvas item */
|
||||
|
||||
drop_item->x = x;
|
||||
drop_item->y = y;
|
||||
|
||||
canvas_items = g_list_append (canvas_items, drop_item);
|
||||
drop_item = NULL;
|
||||
|
||||
/* signal the item was accepted and redraw */
|
||||
|
||||
gtk_drag_finish (context, TRUE, FALSE, time);
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
interactive_canvas_real_drag_leave (gpointer data)
|
||||
{
|
||||
if (drop_item)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (data);
|
||||
|
||||
canvas_item_free (drop_item);
|
||||
drop_item = NULL;
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
interactive_canvas_drag_leave (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
/* defer cleanup until a potential "drag-drop" signal was received */
|
||||
g_idle_add (interactive_canvas_real_drag_leave, widget);
|
||||
}
|
||||
|
||||
static void
|
||||
on_combo_orientation_changed (GtkComboBox *combo_box,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
|
||||
GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (GTK_WIDGET (palette)->parent);
|
||||
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
|
||||
GtkTreeIter iter;
|
||||
gint val = 0;
|
||||
|
||||
if (!gtk_combo_box_get_active_iter (combo_box, &iter))
|
||||
return;
|
||||
|
||||
gtk_tree_model_get (model, &iter, 1, &val, -1);
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (palette), val);
|
||||
|
||||
if (val == GTK_ORIENTATION_HORIZONTAL)
|
||||
gtk_scrolled_window_set_policy (sw, GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
|
||||
else
|
||||
gtk_scrolled_window_set_policy (sw, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
}
|
||||
|
||||
static void
|
||||
on_combo_style_changed (GtkComboBox *combo_box,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
|
||||
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
|
||||
GtkTreeIter iter;
|
||||
gint val = 0;
|
||||
|
||||
if (!gtk_combo_box_get_active_iter (combo_box, &iter))
|
||||
return;
|
||||
|
||||
gtk_tree_model_get (model, &iter, 1, &val, -1);
|
||||
|
||||
if (val == -1)
|
||||
gtk_tool_palette_unset_style (palette);
|
||||
else
|
||||
gtk_tool_palette_set_style (palette, val);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_toolpalette (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *box = NULL;
|
||||
GtkWidget *hbox = NULL;
|
||||
GtkWidget *combo_orientation = NULL;
|
||||
GtkListStore *orientation_model = NULL;
|
||||
GtkWidget *combo_style = NULL;
|
||||
GtkListStore *style_model = NULL;
|
||||
GtkCellRenderer *cell_renderer = NULL;
|
||||
GtkTreeIter iter;
|
||||
GtkWidget *palette = NULL;
|
||||
GtkWidget *palette_scroller = NULL;
|
||||
GtkWidget *notebook = NULL;
|
||||
GtkWidget *contents = NULL;
|
||||
GtkWidget *contents_scroller = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Tool Palette");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 200, 600);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
/* Add widgets to control the ToolPalette appearance: */
|
||||
box = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Orientation combo box: */
|
||||
orientation_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
|
||||
gtk_list_store_append (orientation_model, &iter);
|
||||
gtk_list_store_set (orientation_model, &iter,
|
||||
0, "Horizontal",
|
||||
1, GTK_ORIENTATION_HORIZONTAL,
|
||||
-1);
|
||||
gtk_list_store_append (orientation_model, &iter);
|
||||
gtk_list_store_set (orientation_model, &iter,
|
||||
0, "Vertical",
|
||||
1, GTK_ORIENTATION_VERTICAL,
|
||||
-1);
|
||||
|
||||
combo_orientation =
|
||||
gtk_combo_box_new_with_model (GTK_TREE_MODEL (orientation_model));
|
||||
cell_renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_orientation),
|
||||
cell_renderer,
|
||||
TRUE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_orientation),
|
||||
cell_renderer,
|
||||
"text", 0,
|
||||
NULL);
|
||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_orientation), &iter);
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_orientation, FALSE, FALSE, 0);
|
||||
|
||||
/* Style combo box: */
|
||||
style_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
|
||||
gtk_list_store_append (style_model, &iter);
|
||||
gtk_list_store_set (style_model, &iter,
|
||||
0, "Text",
|
||||
1, GTK_TOOLBAR_TEXT,
|
||||
-1);
|
||||
gtk_list_store_append (style_model, &iter);
|
||||
gtk_list_store_set (style_model, &iter,
|
||||
0, "Both",
|
||||
1, GTK_TOOLBAR_BOTH,
|
||||
-1);
|
||||
gtk_list_store_append (style_model, &iter);
|
||||
gtk_list_store_set (style_model, &iter,
|
||||
0, "Both: Horizontal",
|
||||
1, GTK_TOOLBAR_BOTH_HORIZ,
|
||||
-1);
|
||||
gtk_list_store_append (style_model, &iter);
|
||||
gtk_list_store_set (style_model, &iter,
|
||||
0, "Icons",
|
||||
1, GTK_TOOLBAR_ICONS,
|
||||
-1);
|
||||
gtk_list_store_append (style_model, &iter);
|
||||
gtk_list_store_set (style_model, &iter,
|
||||
0, "Default",
|
||||
1, -1, /* A custom meaning for this demo. */
|
||||
-1);
|
||||
combo_style = gtk_combo_box_new_with_model (GTK_TREE_MODEL (style_model));
|
||||
cell_renderer = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_style),
|
||||
cell_renderer,
|
||||
TRUE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_style),
|
||||
cell_renderer,
|
||||
"text", 0,
|
||||
NULL);
|
||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_style), &iter);
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
|
||||
|
||||
/* Add hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
|
||||
|
||||
/* Add and fill the ToolPalette: */
|
||||
palette = gtk_tool_palette_new ();
|
||||
|
||||
load_stock_items (GTK_TOOL_PALETTE (palette));
|
||||
load_toggle_items (GTK_TOOL_PALETTE (palette));
|
||||
load_special_items (GTK_TOOL_PALETTE (palette));
|
||||
|
||||
palette_scroller = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (palette_scroller),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (palette_scroller), 6);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), palette_scroller);
|
||||
|
||||
gtk_widget_show_all (box);
|
||||
|
||||
/* Connect signals: */
|
||||
g_signal_connect (combo_orientation, "changed",
|
||||
G_CALLBACK (on_combo_orientation_changed), palette);
|
||||
g_signal_connect (combo_style, "changed",
|
||||
G_CALLBACK (on_combo_style_changed), palette);
|
||||
|
||||
/* Keep the widgets in sync: */
|
||||
on_combo_orientation_changed (GTK_COMBO_BOX (combo_orientation), palette);
|
||||
|
||||
/* ===== notebook ===== */
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (notebook), 6);
|
||||
gtk_box_pack_end (GTK_BOX(hbox), notebook, FALSE, FALSE, 0);
|
||||
|
||||
/* ===== DnD for tool items ===== */
|
||||
|
||||
g_signal_connect (palette, "drag-data-received",
|
||||
G_CALLBACK (palette_drag_data_received), NULL);
|
||||
|
||||
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
|
||||
palette,
|
||||
GTK_DEST_DEFAULT_ALL,
|
||||
GTK_TOOL_PALETTE_DRAG_ITEMS |
|
||||
GTK_TOOL_PALETTE_DRAG_GROUPS,
|
||||
GDK_ACTION_MOVE);
|
||||
|
||||
/* ===== passive DnD dest ===== */
|
||||
|
||||
contents = gtk_drawing_area_new ();
|
||||
gtk_widget_set_app_paintable (contents, TRUE);
|
||||
|
||||
g_object_connect (contents,
|
||||
"signal::expose-event", canvas_expose_event, NULL,
|
||||
"signal::drag-data-received", passive_canvas_drag_data_received, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
|
||||
contents,
|
||||
GTK_DEST_DEFAULT_ALL,
|
||||
GTK_TOOL_PALETTE_DRAG_ITEMS,
|
||||
GDK_ACTION_COPY);
|
||||
|
||||
contents_scroller = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (contents_scroller),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (contents_scroller),
|
||||
contents);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
contents_scroller,
|
||||
gtk_label_new ("Passive DnD Mode"));
|
||||
|
||||
/* ===== interactive DnD dest ===== */
|
||||
|
||||
contents = gtk_drawing_area_new ();
|
||||
gtk_widget_set_app_paintable (contents, TRUE);
|
||||
|
||||
g_object_connect (contents,
|
||||
"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,
|
||||
"signal::drag-drop", interactive_canvas_drag_drop, NULL,
|
||||
NULL);
|
||||
|
||||
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
|
||||
contents,
|
||||
GTK_DEST_DEFAULT_HIGHLIGHT,
|
||||
GTK_TOOL_PALETTE_DRAG_ITEMS,
|
||||
GDK_ACTION_COPY);
|
||||
|
||||
contents_scroller = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (contents_scroller),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_ALWAYS);
|
||||
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (contents_scroller),
|
||||
contents);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), contents_scroller,
|
||||
gtk_label_new ("Interactive DnD Mode"));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
load_stock_items (GtkToolPalette *palette)
|
||||
{
|
||||
GtkWidget *group_af = gtk_tool_item_group_new ("Stock Icons (A-F)");
|
||||
GtkWidget *group_gn = gtk_tool_item_group_new ("Stock Icons (G-N)");
|
||||
GtkWidget *group_or = gtk_tool_item_group_new ("Stock Icons (O-R)");
|
||||
GtkWidget *group_sz = gtk_tool_item_group_new ("Stock Icons (S-Z)");
|
||||
GtkWidget *group = NULL;
|
||||
|
||||
GtkToolItem *item;
|
||||
GSList *stock_ids;
|
||||
GSList *iter;
|
||||
|
||||
stock_ids = gtk_stock_list_ids ();
|
||||
stock_ids = g_slist_sort (stock_ids, (GCompareFunc) strcmp);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (palette), group_af);
|
||||
gtk_container_add (GTK_CONTAINER (palette), group_gn);
|
||||
gtk_container_add (GTK_CONTAINER (palette), group_or);
|
||||
gtk_container_add (GTK_CONTAINER (palette), group_sz);
|
||||
|
||||
for (iter = stock_ids; iter; iter = g_slist_next (iter))
|
||||
{
|
||||
GtkStockItem stock_item;
|
||||
gchar *id = iter->data;
|
||||
|
||||
switch (id[4])
|
||||
{
|
||||
case 'a':
|
||||
group = group_af;
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
group = group_gn;
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
group = group_or;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
group = group_sz;
|
||||
break;
|
||||
}
|
||||
|
||||
item = gtk_tool_button_new_from_stock (id);
|
||||
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item), id);
|
||||
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
|
||||
if (!gtk_stock_lookup (id, &stock_item) || !stock_item.label)
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), id);
|
||||
|
||||
g_free (id);
|
||||
}
|
||||
|
||||
g_slist_free (stock_ids);
|
||||
}
|
||||
|
||||
static void
|
||||
load_toggle_items (GtkToolPalette *palette)
|
||||
{
|
||||
GSList *toggle_group = NULL;
|
||||
GtkToolItem *item;
|
||||
GtkWidget *group;
|
||||
char *label;
|
||||
int i;
|
||||
|
||||
group = gtk_tool_item_group_new ("Radio Item");
|
||||
gtk_container_add (GTK_CONTAINER (palette), group);
|
||||
|
||||
for (i = 1; i <= 10; ++i)
|
||||
{
|
||||
label = g_strdup_printf ("#%d", i);
|
||||
item = gtk_radio_tool_button_new (toggle_group);
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), label);
|
||||
g_free (label);
|
||||
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
toggle_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item));
|
||||
}
|
||||
}
|
||||
|
||||
static GtkToolItem *
|
||||
create_entry_item (const char *text)
|
||||
{
|
||||
GtkToolItem *item;
|
||||
GtkWidget *entry;
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
gtk_entry_set_width_chars (GTK_ENTRY (entry), 5);
|
||||
|
||||
item = gtk_tool_item_new ();
|
||||
gtk_container_add (GTK_CONTAINER (item), entry);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
static void
|
||||
load_special_items (GtkToolPalette *palette)
|
||||
{
|
||||
GtkToolItem *item;
|
||||
GtkWidget *group;
|
||||
GtkWidget *label_button;
|
||||
|
||||
group = gtk_tool_item_group_new (NULL);
|
||||
label_button = gtk_button_new_with_label ("Advanced Features");
|
||||
gtk_widget_show (label_button);
|
||||
gtk_tool_item_group_set_label_widget (GTK_TOOL_ITEM_GROUP (group),
|
||||
label_button);
|
||||
gtk_container_add (GTK_CONTAINER (palette), group);
|
||||
|
||||
item = create_entry_item ("homogeneous=FALSE");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
|
||||
"homogeneous", FALSE, NULL);
|
||||
|
||||
item = create_entry_item ("homogeneous=FALSE, expand=TRUE");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
|
||||
"homogeneous", FALSE, "expand", TRUE,
|
||||
NULL);
|
||||
|
||||
item = create_entry_item ("homogeneous=FALSE, expand=TRUE, fill=FALSE");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
|
||||
"homogeneous", FALSE, "expand", TRUE,
|
||||
"fill", FALSE, NULL);
|
||||
|
||||
item = create_entry_item ("homogeneous=FALSE, expand=TRUE, new-row=TRUE");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
|
||||
"homogeneous", FALSE, "expand", TRUE,
|
||||
"new-row", TRUE, NULL);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_UP);
|
||||
gtk_tool_item_set_tooltip_text (item, "Show on vertical palettes only");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_tool_item_set_visible_horizontal (item, FALSE);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
|
||||
gtk_tool_item_set_tooltip_text (item, "Show on horizontal palettes only");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_tool_item_set_visible_vertical (item, FALSE);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_DELETE);
|
||||
gtk_tool_item_set_tooltip_text (item, "Do not show at all");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_widget_set_no_show_all (GTK_WIDGET (item), TRUE);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);
|
||||
gtk_tool_item_set_tooltip_text (item, "Expanded this item");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
|
||||
"homogeneous", FALSE,
|
||||
"expand", TRUE,
|
||||
NULL);
|
||||
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_HELP);
|
||||
gtk_tool_item_set_tooltip_text (item, "A regular item");
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define ICC_PROFILE "/usr/share/color/icc/bluish.icc"
|
||||
#define ICC_PROFILE_SIZE 3966
|
||||
|
||||
static gboolean
|
||||
save_image_png (const gchar *filename, GdkPixbuf *pixbuf, GError **error)
|
||||
{
|
||||
gchar *contents = NULL;
|
||||
gchar *contents_encode = NULL;
|
||||
gsize length;
|
||||
gboolean ret;
|
||||
gint len;
|
||||
|
||||
/* get icc file */
|
||||
ret = g_file_get_contents (ICC_PROFILE, &contents, &length, error);
|
||||
if (!ret)
|
||||
goto out;
|
||||
contents_encode = g_base64_encode ((const guchar *) contents, length);
|
||||
ret = gdk_pixbuf_save (pixbuf, filename, "png", error,
|
||||
"tEXt::Software", "Hello my name is dave",
|
||||
"icc-profile", contents_encode,
|
||||
NULL);
|
||||
len = strlen (contents_encode);
|
||||
g_debug ("ICC profile was %i bytes", len);
|
||||
out:
|
||||
g_free (contents);
|
||||
g_free (contents_encode);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
save_image_tiff (const gchar *filename, GdkPixbuf *pixbuf, GError **error)
|
||||
{
|
||||
gchar *contents = NULL;
|
||||
gchar *contents_encode = NULL;
|
||||
gsize length;
|
||||
gboolean ret;
|
||||
gint len;
|
||||
|
||||
/* get icc file */
|
||||
ret = g_file_get_contents (ICC_PROFILE, &contents, &length, error);
|
||||
if (!ret)
|
||||
goto out;
|
||||
contents_encode = g_base64_encode ((const guchar *) contents, length);
|
||||
ret = gdk_pixbuf_save (pixbuf, filename, "tiff", error,
|
||||
"icc-profile", contents_encode,
|
||||
NULL);
|
||||
len = strlen (contents_encode);
|
||||
g_debug ("ICC profile was %i bytes", len);
|
||||
out:
|
||||
g_free (contents);
|
||||
g_free (contents_encode);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
save_image_verify (const gchar *filename, GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
const gchar *option;
|
||||
gchar *icc_profile = NULL;
|
||||
gsize len = 0;
|
||||
|
||||
/* load */
|
||||
pixbuf = gdk_pixbuf_new_from_file (filename, error);
|
||||
if (pixbuf == NULL)
|
||||
goto out;
|
||||
|
||||
/* check values */
|
||||
option = gdk_pixbuf_get_option (pixbuf, "icc-profile");
|
||||
if (option == NULL) {
|
||||
*error = g_error_new (1, 0, "no profile set");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* decode base64 */
|
||||
icc_profile = (gchar *) g_base64_decode (option, &len);
|
||||
if (len != ICC_PROFILE_SIZE) {
|
||||
*error = g_error_new (1, 0, "profile length invalid, got %i", len);
|
||||
g_file_set_contents ("error.icc", icc_profile, len, NULL);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* success */
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (pixbuf != NULL)
|
||||
g_object_unref (pixbuf);
|
||||
g_free (icc_profile);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GdkWindow *root;
|
||||
GdkPixbuf *pixbuf;
|
||||
gboolean ret;
|
||||
gint retval = 1;
|
||||
GError *error = NULL;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
|
||||
|
||||
root = gdk_get_default_root_window ();
|
||||
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");
|
||||
ret = save_image_png ("icc-profile.png", pixbuf, &error);
|
||||
if (!ret) {
|
||||
g_warning ("FAILED: did not save image: %s", error->message);
|
||||
g_error_free (error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* PASS */
|
||||
g_debug ("try to save TIFF with a profile");
|
||||
ret = save_image_tiff ("icc-profile.tiff", pixbuf, &error);
|
||||
if (!ret) {
|
||||
g_warning ("FAILED: did not save image: %s", error->message);
|
||||
g_error_free (error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* PASS */
|
||||
g_debug ("try to load PNG and get color attributes");
|
||||
ret = save_image_verify ("icc-profile.png", &error);
|
||||
if (!ret) {
|
||||
g_warning ("FAILED: did not load image: %s", error->message);
|
||||
g_error_free (error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* PASS */
|
||||
g_debug ("try to load TIFF and get color attributes");
|
||||
ret = save_image_verify ("icc-profile.tiff", &error);
|
||||
if (!ret) {
|
||||
g_warning ("FAILED: did not load image: %s", error->message);
|
||||
g_error_free (error);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* success */
|
||||
retval = 0;
|
||||
g_debug ("ALL OKAY!");
|
||||
out:
|
||||
return retval;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ save_to_loader (const gchar *buf, gsize count, GError **err, gpointer data)
|
||||
{
|
||||
GdkPixbufLoader *loader = data;
|
||||
|
||||
return gdk_pixbuf_loader_write (loader, (const guchar *)buf, count, err);
|
||||
return gdk_pixbuf_loader_write (loader, buf, count, err);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
@@ -82,7 +82,7 @@ buffer_to_pixbuf (const gchar *buf, gsize count, GError **err)
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
loader = gdk_pixbuf_loader_new ();
|
||||
if (gdk_pixbuf_loader_write (loader, (const guchar *)buf, count, err) &&
|
||||
if (gdk_pixbuf_loader_write (loader, buf, count, err) &&
|
||||
gdk_pixbuf_loader_close (loader, err)) {
|
||||
pixbuf = g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader));
|
||||
g_object_unref (loader);
|
||||
|
||||
@@ -48,6 +48,15 @@ Events that are assured to have a valid GdkEvent.any.window field are
|
||||
GDK_EXPOSE GtkWidget::expose_event
|
||||
|
||||
|
||||
gtk_widget_ref() vs. gtk_object_ref()
|
||||
-------------------------------------
|
||||
|
||||
The widget referencing functions gtk_widget_ref() and gtk_widget_unref()
|
||||
are currently just wrappers about the corresponding referencing functions
|
||||
for objects. Still you should use the widget referencing functions if you
|
||||
are sure the referenced object is of type GTK_WIDGET_TYPE.
|
||||
|
||||
|
||||
Writing Gdk functions
|
||||
---------------------
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ used by anything other than the DND code in GTK+.
|
||||
/* Drag and Drop */
|
||||
|
||||
GdkDragContext * gdk_drag_context_new (void);
|
||||
void gdk_drag_context_ref (GdkDragContext *context);
|
||||
void gdk_drag_context_unref (GdkDragContext *context);
|
||||
|
||||
These create and refcount GdkDragContexts in a
|
||||
straightforward manner.
|
||||
|
||||
@@ -2108,10 +2108,10 @@ not.</para>
|
||||
snippet:</para>
|
||||
|
||||
<programlisting role="C">
|
||||
g_object_ref(widget);
|
||||
gtk_widget_ref(widget);
|
||||
gtk_container_remove(GTK_CONTAINER(old_parent), widget);
|
||||
gtk_container_add(GTK_CONTAINER(new_parent), widget);
|
||||
g_object_unref(widget);
|
||||
gtk_widget_unref(widget);
|
||||
</programlisting>
|
||||
|
||||
</sect1>
|
||||
@@ -2307,8 +2307,8 @@ used, as in:</para>
|
||||
NULL, gtk_widget_get_colormap(top),
|
||||
&pixmap_mask, NULL, pixfile);
|
||||
pixw = gtk_pixmap_new (pixmap, pixmap_mask);
|
||||
g_object_unref (pixmap);
|
||||
g_object_unref (pixmap_mask);
|
||||
gdk_pixmap_unref (pixmap);
|
||||
gdk_pixmap_unref (pixmap_mask);
|
||||
</programlisting>
|
||||
|
||||
</sect1>
|
||||
|
||||
@@ -250,12 +250,12 @@ Example code sequences that require reference wraps:
|
||||
/* gtk_container_remove() will unparent the child and therefore
|
||||
* cause its reference count to be decremented by one.
|
||||
*/
|
||||
g_object_ref (widget);
|
||||
gtk_widget_ref (widget);
|
||||
gtk_container_remove (container, widget);
|
||||
/* without the reference count, the widget would have been destroyed here.
|
||||
*/
|
||||
gtk_container_add (container, widget);
|
||||
g_object_unref (widget);
|
||||
gtk_widget_unref (widget);
|
||||
|
||||
|
||||
/* all items in item_list need to be referenced
|
||||
@@ -267,7 +267,7 @@ Example code sequences that require reference wraps:
|
||||
slist = NULL;
|
||||
for (list = item_list; list; list = list->next)
|
||||
{
|
||||
g_object_ref (GTK_WIDGET (list->data));
|
||||
gtk_widget_ref (GTK_WIDGET (list->data));
|
||||
slist = g_slist_prepend (slist, list->data);
|
||||
}
|
||||
gtk_list_remove_items (list, item_list);
|
||||
@@ -280,7 +280,7 @@ Example code sequences that require reference wraps:
|
||||
|
||||
tmp = slist;
|
||||
slist = slist->next;
|
||||
g_object_unref (GTK_WIDGET (tmp->data));
|
||||
gtk_widget_unref (GTK_WIDGET (tmp->data));
|
||||
g_slist_free_1 (tmp);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,5 +4,3 @@ gdk_pixbuf_get_type
|
||||
gdk_pixbuf_loader_get_type
|
||||
gdk_pixbuf_animation_get_type
|
||||
gdk_pixbuf_animation_iter_get_type
|
||||
gdk_pixbuf_simple_anim_get_type
|
||||
|
||||
|
||||
@@ -1005,7 +1005,6 @@ gdk_keymap_get_entries_for_keycode
|
||||
gdk_keymap_get_direction
|
||||
gdk_keymap_have_bidi_layouts
|
||||
gdk_keymap_get_caps_lock_state
|
||||
gdk_keymap_map_virtual_modifiers
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_name
|
||||
|
||||
@@ -221,7 +221,7 @@ 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).
|
||||
@type: the type of the event (%GDK_EXPOSE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
|
||||
@@ -57,7 +57,12 @@ devices without having to keep track of complicated per-device
|
||||
settings.
|
||||
</para>
|
||||
<para>
|
||||
Various aspects of each device may be configured.
|
||||
Various aspects of each device may be configured. The easiest way of
|
||||
creating a GUI to allow the user to configure such a device
|
||||
is to use the #GtkInputDialog widget in GTK+.
|
||||
However, even when using this widget, application writers
|
||||
will need to directly query and set the configuration parameters
|
||||
in order to save the state between invocations of the application.
|
||||
The configuration of devices is queried using gdk_devices_list().
|
||||
Each device must be activated using gdk_device_set_mode(), which
|
||||
also controls whether the device's range is mapped to the
|
||||
@@ -228,11 +233,15 @@ Specifies how an axis of a device is used.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_get_state ##### -->
|
||||
<para>
|
||||
Gets the current state of a device.
|
||||
</para>
|
||||
|
||||
@device:
|
||||
@window:
|
||||
@axes:
|
||||
@mask:
|
||||
@device: a #GdkDevice.
|
||||
@window: a #GdkWindow.
|
||||
@axes: an array of doubles to store the values of the axes of @device in,
|
||||
or %NULL.
|
||||
@mask: location to store the modifiers, or %NULL.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_device_get_history ##### -->
|
||||
|
||||
@@ -77,15 +77,76 @@ for the new pixmap. Can be %NULL, if the depth is given.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
|
||||
<para>
|
||||
Create a pixmap from a XPM file.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable, used to determine default values
|
||||
for the new pixmap.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@filename: the filename of a file containing XPM data.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
|
||||
<para>
|
||||
Create a pixmap from a XPM file using a particular colormap.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable, used to determine default values
|
||||
for the new pixmap. Can be %NULL if @colormap is given.
|
||||
@colormap: the #GdkColormap that the new pixmap will be use.
|
||||
If omitted, the colormap for @window will be used.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@filename: the filename of a file containing XPM data.
|
||||
@Returns: the #GdkPixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
|
||||
<para>
|
||||
Create a pixmap from data in XPM format.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable, used to determine default values
|
||||
for the new pixmap.
|
||||
@mask: Pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: This color will be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL
|
||||
in which case a default color will be used.
|
||||
@data: Pointer to a string containing the XPM data.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
|
||||
<para>
|
||||
Create a pixmap from data in XPM format using a particular
|
||||
colormap.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable, used to determine default values
|
||||
for the new pixmap. Can be %NULL if @colormap is given.
|
||||
@colormap: the #GdkColormap that the new pixmap will be use.
|
||||
If omitted, the colormap for @window will be used.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@data: Pointer to a string containing the XPM data.
|
||||
@Returns: the #GdkPixmap.
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_pixmap_ref ##### -->
|
||||
|
||||
@@ -87,7 +87,6 @@ IGNORE_HFILES= \
|
||||
gtktrayicon.h \
|
||||
gtktreedatalist.h \
|
||||
gtktreeprivate.h \
|
||||
gtktoolpaletteprivate.h \
|
||||
gtktypebuiltins.h \
|
||||
gtkxembed.h \
|
||||
gtkwin32embed.h \
|
||||
@@ -336,11 +335,9 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/scrolledwindow.png \
|
||||
$(srcdir)/images/separator.png \
|
||||
$(srcdir)/images/spinbutton.png \
|
||||
$(srcdir)/images/spinner.png \
|
||||
$(srcdir)/images/statusbar.png \
|
||||
$(srcdir)/images/toggle-button.png \
|
||||
$(srcdir)/images/toolbar.png \
|
||||
$(srcdir)/images/toolpalette.png \
|
||||
$(srcdir)/images/tree-view-coordinates.png \
|
||||
$(srcdir)/images/volumebutton.png \
|
||||
$(srcdir)/images/window.png \
|
||||
|
||||
@@ -69,17 +69,12 @@ toplevel headers <filename>gtk.h</filename>, <filename>gdk.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.
|
||||
when individual headers are directly included.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -161,7 +161,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtkstatusbar.xml" />
|
||||
<xi:include href="xml/gtkinfobar.xml" />
|
||||
<xi:include href="xml/gtkstatusicon.xml" />
|
||||
<xi:include href="xml/gtkspinner.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="ButtonWidgets">
|
||||
@@ -220,7 +219,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtkcellrendererspin.xml" />
|
||||
<xi:include href="xml/gtkcellrenderertext.xml" />
|
||||
<xi:include href="xml/gtkcellrenderertoggle.xml" />
|
||||
<xi:include href="xml/gtkcellrendererspinner.xml" />
|
||||
<xi:include href="xml/gtkliststore.xml" />
|
||||
<xi:include href="xml/gtktreestore.xml" />
|
||||
</chapter>
|
||||
@@ -240,8 +238,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtktoolshell.xml" />
|
||||
<xi:include href="xml/gtktoolbar.xml" />
|
||||
<xi:include href="xml/gtktoolitem.xml" />
|
||||
<xi:include href="xml/gtktoolpalette.xml" />
|
||||
<xi:include href="xml/gtktoolitemgroup.xml" />
|
||||
<xi:include href="xml/gtkseparatortoolitem.xml" />
|
||||
<xi:include href="xml/gtktoolbutton.xml" />
|
||||
<xi:include href="xml/gtkmenutoolbutton.xml" />
|
||||
@@ -495,8 +491,4 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-20" role="2.20">
|
||||
<title>Index of new symbols in 2.20</title>
|
||||
<xi:include href="xml/api-index-2.20.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
</book>
|
||||
|
||||
@@ -192,8 +192,6 @@ gtk_action_block_activate
|
||||
gtk_action_unblock_activate
|
||||
gtk_action_block_activate_from
|
||||
gtk_action_unblock_activate_from
|
||||
gtk_action_get_always_show_image
|
||||
gtk_action_set_always_show_image
|
||||
gtk_action_get_accel_path
|
||||
gtk_action_set_accel_path
|
||||
gtk_action_get_accel_closure
|
||||
@@ -1184,7 +1182,6 @@ gtk_dialog_set_default_response
|
||||
gtk_dialog_set_has_separator
|
||||
gtk_dialog_set_response_sensitive
|
||||
gtk_dialog_get_response_for_widget
|
||||
gtk_dialog_get_widget_for_response
|
||||
gtk_dialog_get_action_area
|
||||
gtk_dialog_get_content_area
|
||||
<SUBSECTION>
|
||||
@@ -2636,6 +2633,7 @@ gtk_message_dialog_get_type
|
||||
GtkInfoBar
|
||||
gtk_info_bar_new
|
||||
gtk_info_bar_new_with_buttons
|
||||
gtk_info_bar_set_contents
|
||||
gtk_info_bar_add_action_widget
|
||||
gtk_info_bar_add_button
|
||||
gtk_info_bar_add_buttons
|
||||
@@ -2734,8 +2732,6 @@ gtk_notebook_set_group_id
|
||||
gtk_notebook_get_group_id
|
||||
gtk_notebook_set_group
|
||||
gtk_notebook_get_group
|
||||
gtk_notebook_set_action_widget
|
||||
gtk_notebook_get_action_widget
|
||||
GtkNotebookWindowCreationFunc
|
||||
gtk_notebook_set_window_creation_hook
|
||||
<SUBSECTION Standard>
|
||||
@@ -2824,6 +2820,7 @@ gtk_option_menu_get_type
|
||||
<FILE>gtkpaned</FILE>
|
||||
<TITLE>GtkPaned</TITLE>
|
||||
GtkPaned
|
||||
gtk_paned_new
|
||||
gtk_paned_add1
|
||||
gtk_paned_add2
|
||||
gtk_paned_gutter_size
|
||||
@@ -3318,6 +3315,7 @@ gtk_recent_action_get_type
|
||||
<TITLE>GtkRuler</TITLE>
|
||||
GtkRuler
|
||||
GtkRulerMetric
|
||||
gtk_ruler_new
|
||||
gtk_ruler_set_metric
|
||||
gtk_ruler_set_range
|
||||
gtk_ruler_get_metric
|
||||
@@ -3339,6 +3337,8 @@ gtk_ruler_draw_pos
|
||||
<FILE>gtkscale</FILE>
|
||||
<TITLE>GtkScale</TITLE>
|
||||
GtkScale
|
||||
gtk_scale_new
|
||||
gtk_scale_new_with_range
|
||||
gtk_scale_set_digits
|
||||
gtk_scale_set_draw_value
|
||||
gtk_scale_set_value_pos
|
||||
@@ -3391,6 +3391,7 @@ gtk_scale_button_get_type
|
||||
<FILE>gtkscrollbar</FILE>
|
||||
<TITLE>GtkScrollbar</TITLE>
|
||||
GtkScrollbar
|
||||
gtk_scrollbar_new
|
||||
<SUBSECTION Standard>
|
||||
GTK_SCROLLBAR
|
||||
GTK_IS_SCROLLBAR
|
||||
@@ -3436,6 +3437,7 @@ gtk_scrolled_window_get_type
|
||||
<FILE>gtkseparator</FILE>
|
||||
<TITLE>GtkSeparator</TITLE>
|
||||
GtkSeparator
|
||||
gtk_separator_new
|
||||
<SUBSECTION Standard>
|
||||
GTK_SEPARATOR
|
||||
GTK_IS_SEPARATOR
|
||||
@@ -3582,24 +3584,6 @@ GTK_SPIN_BUTTON_GET_CLASS
|
||||
gtk_spin_button_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkspinner</FILE>
|
||||
<TITLE>GtkSpinner</TITLE>
|
||||
GtkSpinner
|
||||
gtk_spinner_new
|
||||
gtk_spinner_start
|
||||
gtk_spinner_stop
|
||||
<SUBSECTION Standard>
|
||||
GTK_SPINNER
|
||||
GTK_IS_SPINNER
|
||||
GTK_TYPE_SPINNER
|
||||
GTK_SPINNER_CLASS
|
||||
GTK_IS_SPINER_CLASS
|
||||
GTK_SPINNER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_spinner_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkstatusbar</FILE>
|
||||
<TITLE>GtkStatusbar</TITLE>
|
||||
@@ -3611,7 +3595,6 @@ gtk_statusbar_pop
|
||||
gtk_statusbar_remove
|
||||
gtk_statusbar_set_has_resize_grip
|
||||
gtk_statusbar_get_has_resize_grip
|
||||
gtk_statusbar_get_message_area
|
||||
<SUBSECTION Standard>
|
||||
GTK_STATUSBAR
|
||||
GTK_IS_STATUSBAR
|
||||
@@ -4189,15 +4172,11 @@ gtk_toggle_button_get_type
|
||||
<TITLE>GtkToolShell</TITLE>
|
||||
GtkToolShell
|
||||
GtkToolShellIface
|
||||
gtk_tool_shell_get_ellipsize_mode
|
||||
gtk_tool_shell_get_icon_size
|
||||
gtk_tool_shell_get_orientation
|
||||
gtk_tool_shell_get_relief_style
|
||||
gtk_tool_shell_get_style
|
||||
gtk_tool_shell_get_text_alignment
|
||||
gtk_tool_shell_get_text_orientation
|
||||
gtk_tool_shell_rebuild_menu
|
||||
gtk_tool_shell_get_text_size_group
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_IS_TOOL_SHELL
|
||||
@@ -4284,19 +4263,15 @@ gtk_tool_item_set_visible_vertical
|
||||
gtk_tool_item_get_visible_vertical
|
||||
gtk_tool_item_set_is_important
|
||||
gtk_tool_item_get_is_important
|
||||
gtk_tool_item_get_ellipsize_mode
|
||||
gtk_tool_item_get_icon_size
|
||||
gtk_tool_item_get_orientation
|
||||
gtk_tool_item_get_toolbar_style
|
||||
gtk_tool_item_get_relief_style
|
||||
gtk_tool_item_get_text_alignment
|
||||
gtk_tool_item_get_text_orientation
|
||||
gtk_tool_item_retrieve_proxy_menu_item
|
||||
gtk_tool_item_get_proxy_menu_item
|
||||
gtk_tool_item_set_proxy_menu_item
|
||||
gtk_tool_item_rebuild_menu
|
||||
gtk_tool_item_toolbar_reconfigured
|
||||
gtk_tool_item_get_text_size_group
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_TOOL_ITEM
|
||||
@@ -4461,79 +4436,6 @@ GTK_TOOLTIPS_GET_CLASS
|
||||
gtk_tooltips_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtktoolitemgroup</FILE>
|
||||
<TITLE>GtkToolItemGroup</TITLE>
|
||||
GtkToolItemGroup
|
||||
gtk_tool_item_group_get_collapsed
|
||||
gtk_tool_item_group_get_drop_item
|
||||
gtk_tool_item_group_get_ellipsize
|
||||
gtk_tool_item_group_get_item_position
|
||||
gtk_tool_item_group_get_n_items
|
||||
gtk_tool_item_group_get_label
|
||||
gtk_tool_item_group_get_label_widget
|
||||
gtk_tool_item_group_get_nth_item
|
||||
gtk_tool_item_group_get_header_relief
|
||||
gtk_tool_item_group_insert
|
||||
gtk_tool_item_group_new
|
||||
gtk_tool_item_group_set_collapsed
|
||||
gtk_tool_item_group_set_ellipsize
|
||||
gtk_tool_item_group_set_item_position
|
||||
gtk_tool_item_group_set_label
|
||||
gtk_tool_item_group_set_label_widget
|
||||
gtk_tool_item_group_set_header_relief
|
||||
<SUBSECTION Standard>
|
||||
GtkToolItemGroupClass
|
||||
GTK_TOOL_ITEM_GROUP
|
||||
GTK_IS_TOOL_ITEM_GROUP
|
||||
GTK_TYPE_TOOL_ITEM_GROUP
|
||||
GTK_TOOL_ITEM_GROUP_CLASS
|
||||
GTK_IS_TOOL_ITEM_GROUP_CLASS
|
||||
GTK_TOOL_ITEM_GROUP_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_tool_item_group_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtktoolpalette</FILE>
|
||||
<TITLE>GtkToolPalette</TITLE>
|
||||
GtkToolPalette
|
||||
gtk_tool_palette_new
|
||||
gtk_tool_palette_get_exclusive
|
||||
gtk_tool_palette_set_exclusive
|
||||
gtk_tool_palette_get_expand
|
||||
gtk_tool_palette_set_expand
|
||||
gtk_tool_palette_get_group_position
|
||||
gtk_tool_palette_set_group_position
|
||||
gtk_tool_palette_get_icon_size
|
||||
gtk_tool_palette_set_icon_size
|
||||
gtk_tool_palette_unset_icon_size
|
||||
gtk_tool_palette_get_style
|
||||
gtk_tool_palette_set_style
|
||||
gtk_tool_palette_unset_style
|
||||
gtk_tool_palette_add_drag_dest
|
||||
gtk_tool_palette_get_drag_item
|
||||
gtk_tool_palette_get_drag_target_group
|
||||
gtk_tool_palette_get_drag_target_item
|
||||
gtk_tool_palette_get_drop_group
|
||||
gtk_tool_palette_get_drop_item
|
||||
GtkToolPaletteDragTargets
|
||||
gtk_tool_palette_set_drag_source
|
||||
gtk_tool_palette_get_hadjustment
|
||||
gtk_tool_palette_get_vadjustment
|
||||
<SUBSECTION Standard>
|
||||
GtkToolPaletteClass
|
||||
GTK_TOOL_PALETTE
|
||||
GTK_IS_TOOL_PALETTE
|
||||
GTK_TYPE_TOOL_PALETTE
|
||||
GTK_TOOL_PALETTE_CLASS
|
||||
GTK_IS_TOOL_PALETTE_CLASS
|
||||
GTK_TOOL_PALETTE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_tool_palette_get_type
|
||||
GtkToolPalettePrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtktooltip</FILE>
|
||||
<TITLE>GtkTooltip</TITLE>
|
||||
@@ -4543,7 +4445,6 @@ gtk_tooltip_set_text
|
||||
gtk_tooltip_set_icon
|
||||
gtk_tooltip_set_icon_from_stock
|
||||
gtk_tooltip_set_icon_from_icon_name
|
||||
gtk_tooltip_set_icon_from_gicon
|
||||
gtk_tooltip_set_custom
|
||||
gtk_tooltip_trigger_tooltip_query
|
||||
gtk_tooltip_set_tip_area
|
||||
@@ -5204,23 +5105,6 @@ GtkCellRendererSpinPrivate
|
||||
gtk_cell_renderer_spin_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcellrendererspinner</FILE>
|
||||
<TITLE>GtkCellRendererSpinner</TITLE>
|
||||
GtkCellRendererSpinner
|
||||
gtk_cell_renderer_spinner_new
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_CELL_RENDERER_SPINNER
|
||||
GTK_CELL_RENDERER_SPINNER
|
||||
GTK_CELL_RENDERER_SPINNER_CLASS
|
||||
GTK_IS_CELL_RENDERER_SPINNER
|
||||
GTK_IS_CELL_RENDERER_SPINNER_CLASS
|
||||
GTK_CELL_RENDERER_SPINNER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkCellRendererSpinnerPrivate
|
||||
gtk_cell_renderer_spinner_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkcellrendererpixbuf</FILE>
|
||||
<TITLE>GtkCellRendererPixbuf</TITLE>
|
||||
@@ -5395,7 +5279,6 @@ gtk_viewport_set_hadjustment
|
||||
gtk_viewport_set_vadjustment
|
||||
gtk_viewport_set_shadow_type
|
||||
gtk_viewport_get_shadow_type
|
||||
gtk_viewport_get_bin_window
|
||||
<SUBSECTION Standard>
|
||||
GTK_VIEWPORT
|
||||
GTK_IS_VIEWPORT
|
||||
@@ -5826,7 +5709,6 @@ gtk_window_get_urgency_hint
|
||||
gtk_window_get_accept_focus
|
||||
gtk_window_get_focus_on_map
|
||||
gtk_window_get_group
|
||||
gtk_window_get_window_type
|
||||
gtk_window_move
|
||||
gtk_window_parse_geometry
|
||||
gtk_window_reshow_with_initial_size
|
||||
@@ -6046,7 +5928,6 @@ gtk_paint_polygon
|
||||
gtk_paint_shadow
|
||||
gtk_paint_shadow_gap
|
||||
gtk_paint_slider
|
||||
gtk_paint_spinner
|
||||
gtk_paint_string
|
||||
gtk_paint_tab
|
||||
gtk_paint_vline
|
||||
@@ -6864,7 +6745,6 @@ gtk_printer_has_details
|
||||
gtk_printer_request_details
|
||||
gtk_printer_get_capabilities
|
||||
gtk_printer_get_default_page_size
|
||||
gtk_printer_get_hard_margins
|
||||
GtkPrinterFunc
|
||||
gtk_enumerate_printers
|
||||
|
||||
@@ -7049,10 +6929,8 @@ gtk_paper_size_to_key_file
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_PAPER_SIZE
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_paper_size_get_type
|
||||
gtk_custom_paper_unix_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ gtk_cell_renderer_get_type
|
||||
gtk_cell_renderer_pixbuf_get_type
|
||||
gtk_cell_renderer_progress_get_type
|
||||
gtk_cell_renderer_spin_get_type
|
||||
gtk_cell_renderer_spinner_get_type
|
||||
gtk_cell_renderer_text_get_type
|
||||
gtk_cell_renderer_toggle_get_type
|
||||
gtk_cell_view_get_type
|
||||
@@ -147,7 +146,6 @@ gtk_settings_get_type
|
||||
gtk_size_group_get_type
|
||||
gtk_socket_get_type
|
||||
gtk_spin_button_get_type
|
||||
gtk_spinner_get_type
|
||||
gtk_statusbar_get_type
|
||||
gtk_status_icon_get_type
|
||||
gtk_style_get_type
|
||||
@@ -168,8 +166,6 @@ gtk_toggle_tool_button_get_type
|
||||
gtk_toolbar_get_type
|
||||
gtk_tool_button_get_type
|
||||
gtk_tool_item_get_type
|
||||
gtk_tool_item_group_get_type
|
||||
gtk_tool_palette_get_type
|
||||
gtk_tooltips_get_type
|
||||
gtk_tree_drag_dest_get_type
|
||||
gtk_tree_drag_source_get_type
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.8 KiB |
@@ -184,10 +184,6 @@ additional environment variables.
|
||||
<term>printing</term>
|
||||
<listitem><para>Printing support</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>builder</term>
|
||||
<listitem><para>GtkBuilder support</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
The special value <literal>all</literal> can be used to turn on all
|
||||
@@ -339,33 +335,8 @@ nevertheless.
|
||||
<term>xim</term>
|
||||
<listitem><para>Information about XIM support</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>nograbs</term>
|
||||
<listitem><para>Turn off all pointer and keyboard grabs</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>multihead</term>
|
||||
<listitem><para>Information related to multiple screens</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>xinerama</term>
|
||||
<listitem><para>Simulate a multi-monitor setup</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>cursor</term>
|
||||
<listitem><para>Information about cursor objects (only win32)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>draw</term>
|
||||
<listitem><para>Information about drawing operations (only win32)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>eventloop</term>
|
||||
<listitem><para>Information about event loop operation (mostly Quartz)</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
The special value <literal>all</literal> can be used to turn on all
|
||||
The special value <literal>all</literal> can be used to turn on all
|
||||
debug options.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Filesystem utilities
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMountOperation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:is-showing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_is_showing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_set_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@parent:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_get_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_show_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@uri:
|
||||
@timestamp:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,475 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkAboutDialog
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Display information about an application
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkAboutDialog offers a simple way to display information about
|
||||
a program like its logo, name, copyright, website and license. It is
|
||||
also possible to give credits to the authors, documenters, translators
|
||||
and artists who have worked on the program. An about dialog is typically
|
||||
opened when the user selects the <literal>About</literal> option from
|
||||
the <literal>Help</literal> menu. All parts of the dialog are optional.
|
||||
</para>
|
||||
<para>
|
||||
About dialog often contain links and email addresses. #GtkAboutDialog
|
||||
supports this by offering global hooks, which are called when the user
|
||||
clicks on a link or email address, see gtk_about_dialog_set_email_hook()
|
||||
and gtk_about_dialog_set_url_hook(). Email addresses in the
|
||||
authors, documenters and artists properties are recognized by looking for
|
||||
<literal><user@<!-- -->host></literal>, URLs are
|
||||
recognized by looking for <literal>http://url</literal>, with
|
||||
<literal>url</literal> extending to the next space, tab or line break.
|
||||
</para>
|
||||
<para id="gtk-about-dialog-hook-setup">
|
||||
Since 2.18 #GtkAboutDialog provides default website and email hooks that use
|
||||
gtk_show_uri().
|
||||
</para>
|
||||
<para>
|
||||
If you want provide your own hooks overriding the default ones, it is important
|
||||
to do so before setting the website and email URL properties, like this:
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL);
|
||||
gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url);
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
To disable the default hooks, you can pass %NULL as the hook func. Then,
|
||||
the #GtkAboutDialog widget will not display the website or the
|
||||
email addresses as clickable.
|
||||
</para>
|
||||
<para>
|
||||
To make constructing a #GtkAboutDialog as convenient as possible, you can
|
||||
use the function gtk_show_about_dialog() which constructs and shows a dialog
|
||||
and keeps it around so that it can be shown again.
|
||||
</para>
|
||||
<para>
|
||||
Note that GTK+ sets a default title of <literal>_("About %s")</literal>
|
||||
on the dialog window (where %s is replaced by the name of the
|
||||
application, but in order to ensure proper translation of the title,
|
||||
applications should set the title property explicitly when constructing
|
||||
a #GtkAboutDialog, as shown in the following example:
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
gtk_show_about_dialog (NULL,
|
||||
"program-name", "ExampleCode",
|
||||
"logo", example_logo,
|
||||
"title" _("About ExampleCode"),
|
||||
NULL);
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
Note that prior to GTK+ 2.12, the #GtkAboutDialog:program-name property
|
||||
was called "name". This was changed to avoid the conflict with the
|
||||
#GtkWidget:name property.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GTK_STOCK_ABOUT
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkAboutDialog ##### -->
|
||||
<para>
|
||||
The <structname>GtkAboutDialog</structname> struct contains
|
||||
only private fields and should not be directly accessed.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:artists ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:authors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:comments ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:copyright ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:documenters ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:logo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:logo-icon-name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:program-name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:translator-credits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:version ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:website ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:website-label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAboutDialog:wrap-license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_program_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_program_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_version ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_version ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@version:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_copyright ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_copyright ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@copyright:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_comments ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_comments ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@comments:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@license:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_wrap_license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_wrap_license ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@wrap_license:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_website ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_website ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@website:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_website_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_website_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@website_label:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_authors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_authors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@authors:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_artists ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_artists ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@artists:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_documenters ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_documenters ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@documenters:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_translator_credits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_translator_credits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@translator_credits:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_logo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_logo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@logo:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_get_logo_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_logo_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@about:
|
||||
@icon_name:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkAboutDialogActivateLinkFunc ##### -->
|
||||
<para>
|
||||
The type of a function which is called when a URL or email
|
||||
link is activated.
|
||||
</para>
|
||||
|
||||
@about: the #GtkAboutDialog in which the link was activated
|
||||
@link_: the URL or email address to which the activated link points
|
||||
@data: user data that was passed when the function was registered
|
||||
with gtk_about_dialog_set_email_hook() or
|
||||
gtk_about_dialog_set_url_hook()
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_email_hook ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@data:
|
||||
@destroy:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_about_dialog_set_url_hook ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@data:
|
||||
@destroy:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_show_about_dialog ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent:
|
||||
@first_property_name:
|
||||
@Varargs:
|
||||
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Accelerator Groups
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Groups of global keyboard accelerators for an entire GtkWindow
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkAccelGroup represents a group of keyboard accelerators,
|
||||
typically attached to a toplevel #GtkWindow (with
|
||||
gtk_window_add_accel_group()). Usually you won't need to create a
|
||||
#GtkAccelGroup directly; instead, when using #GtkItemFactory, GTK+
|
||||
automatically sets up the accelerators for your menus in the item
|
||||
factory's #GtkAccelGroup.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that <firstterm>accelerators</firstterm> are different from
|
||||
<firstterm>mnemonics</firstterm>. Accelerators are shortcuts for
|
||||
activating a menu item; they appear alongside the menu item they're a
|
||||
shortcut for. For example "Ctrl+Q" might appear alongside the "Quit"
|
||||
menu item. Mnemonics are shortcuts for GUI elements such as text
|
||||
entries or buttons; they appear as underlined characters. See
|
||||
gtk_label_new_with_mnemonic(). Menu items can have both accelerators
|
||||
and mnemonics, of course.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
gtk_window_add_accel_group(), gtk_accel_map_change_entry(),
|
||||
gtk_item_factory_new(), gtk_label_new_with_mnemonic()
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkAccelGroup ##### -->
|
||||
<para>
|
||||
An object representing and maintaining a group of accelerators.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkAccelGroup::accel-activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accelgroup: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkAccelGroup::accel-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accelgroup: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
||||
<!-- ##### ARG GtkAccelGroup:is-locked ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkAccelGroup:modifier-mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO gtk_accel_group_ref ##### -->
|
||||
<para>
|
||||
Deprecated equivalent of g_object_ref().
|
||||
</para>
|
||||
|
||||
@Returns: the accel group that was passed in
|
||||
|
||||
|
||||
<!-- ##### MACRO gtk_accel_group_unref ##### -->
|
||||
<para>
|
||||
Deprecated equivalent of g_object_unref().
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_connect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@accel_flags:
|
||||
@closure:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_connect_by_path ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@accel_path:
|
||||
@closure:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkAccelGroupActivate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@acceleratable:
|
||||
@keyval:
|
||||
@modifier:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkAccelGroupFindFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@key:
|
||||
@closure:
|
||||
@data:
|
||||
@Returns:
|
||||
@Since: 2.2
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_disconnect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@closure:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_disconnect_key ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_query ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@n_entries:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@accel_quark:
|
||||
@acceleratable:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_lock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_unlock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_get_is_locked ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_from_accel_closure ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@closure:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_get_modifier_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_groups_activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@object:
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_groups_from_object ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@object:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accel_group_find ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_group:
|
||||
@find_func:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkAccelKey ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accel_key:
|
||||
@accel_mods:
|
||||
@accel_flags:
|
||||
|
||||
<!-- ##### FUNCTION gtk_accelerator_valid ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keyval:
|
||||
@modifiers:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accelerator_parse ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accelerator:
|
||||
@accelerator_key:
|
||||
@accelerator_mods:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accelerator_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accelerator_key:
|
||||
@accelerator_mods:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accelerator_get_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accelerator_key:
|
||||
@accelerator_mods:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accelerator_set_default_mod_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@default_mod_mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accelerator_get_default_mod_mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkAccessible
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Accessibility support for widgets
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkAccessible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_accessible_connect_widget_destroyed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@accessible:
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkActivatable
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkActivatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkActivatable:related-action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkActivatable:use-action-appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GtkActivatableIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@g_iface:
|
||||
@update:
|
||||
@sync_action_properties:
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_do_set_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_get_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_get_use_action_appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_sync_action_properties ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_set_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_set_use_action_appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@use_appearance:
|
||||
|
||||
|
||||
@@ -41,8 +41,10 @@ a GtkBuilder UI definition.
|
||||
|
||||
@g_iface: the parent class
|
||||
@set_name: Stores the name attribute given in the GtkBuilder UI definition.
|
||||
#GtkWidget stores the name as object data. Implement this method if your
|
||||
object has some notion of "name" and it makes sense to map the XML name
|
||||
#GtkWidget maps this to the #GtkWidget:name property, and
|
||||
gtk_buildable_set_name() has a fallback implementation that stores
|
||||
the name as object data. Implement this method if your object
|
||||
has some notion of "name" and it makes sense to map the XML name
|
||||
attribute to it.
|
||||
@get_name: The getter corresponding to @set_name. Implement this
|
||||
if you implement @set_name.
|
||||
|
||||
@@ -195,7 +195,6 @@ Emits a #GtkButton::pressed signal to the given #GtkButton.
|
||||
</para>
|
||||
|
||||
@button: The #GtkButton you want to send the signal to.
|
||||
@Deprecated: 2.20: Use the #GtkWidget::button-press-event signal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_button_released ##### -->
|
||||
@@ -204,7 +203,6 @@ Emits a #GtkButton::released signal to the given #GtkButton.
|
||||
</para>
|
||||
|
||||
@button: The #GtkButton you want to send the signal to.
|
||||
@Deprecated: 2.20: Use the #GtkWidget::button-release-event signal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_button_clicked ##### -->
|
||||
@@ -221,7 +219,6 @@ Emits a #GtkButton::enter signal to the given #GtkButton.
|
||||
</para>
|
||||
|
||||
@button: The #GtkButton you want to send the signal to.
|
||||
@Deprecated: 2.20: Use the #GtkWidget::enter-notify-event signal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_button_leave ##### -->
|
||||
@@ -230,7 +227,6 @@ Emits a #GtkButton::leave signal to the given #GtkButton.
|
||||
</para>
|
||||
|
||||
@button: The #GtkButton you want to send the signal to.
|
||||
@Deprecated: 2.20: Use the #GtkWidget::leave-notify-event signal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_button_set_relief ##### -->
|
||||
|
||||
@@ -38,11 +38,6 @@ to be usable when editing the contents of a #GtkTreeView cell.
|
||||
|
||||
@celleditable: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkCellEditable:editing-canceled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GtkCellEditableIface ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -5,6 +5,17 @@ GtkCurve
|
||||
Allows direct editing of a curve
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<note>
|
||||
<para>
|
||||
This widget is considered too specialized/little-used for
|
||||
GTK+, and will in the future be moved to some other package. If
|
||||
your application needs this widget, feel free to use it, as the
|
||||
widget does work and is useful in some applications; it's just not
|
||||
of general interest. However, we are not accepting new features for
|
||||
the widget, and it will eventually move out of the GTK+
|
||||
distribution.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
The #GtkCurve widget allows the user to edit a curve covering a range of
|
||||
values. It is typically used to fine-tune color balances in graphics
|
||||
@@ -17,9 +28,6 @@ connected together into a smooth curve. In linear mode the user places points
|
||||
on the curve which are connected by straight lines. In free mode the user can
|
||||
draw the points of the curve freely, and they are not connected at all.
|
||||
</para>
|
||||
<para>
|
||||
As of GTK+ 2.20, #GtkCurve has been deprecated since it is too specialized.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@@ -84,7 +92,6 @@ Creates a new #GtkCurve.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GtkCurve.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_curve_reset ##### -->
|
||||
@@ -95,7 +102,6 @@ The curve type is not changed.
|
||||
</para>
|
||||
|
||||
@curve: a #GtkCurve.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_curve_set_gamma ##### -->
|
||||
@@ -109,7 +115,6 @@ FIXME: Needs a more precise definition of gamma.
|
||||
|
||||
@curve: a #GtkCurve.
|
||||
@gamma_: the gamma value.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_curve_set_range ##### -->
|
||||
@@ -123,7 +128,6 @@ The curve is also reset with a call to gtk_curve_reset().
|
||||
@max_x: the maximum x value.
|
||||
@min_y: the minimum y value.
|
||||
@max_y: the maximum y value.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_curve_get_vector ##### -->
|
||||
@@ -134,7 +138,6 @@ Returns a vector of points representing the curve.
|
||||
@curve: a #GtkCurve.
|
||||
@veclen: the number of points to calculate.
|
||||
@vector: returns the points.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_curve_set_vector ##### -->
|
||||
@@ -146,7 +149,6 @@ The curve type is set to %GTK_CURVE_TYPE_FREE.
|
||||
@curve: a #GtkCurve.
|
||||
@veclen: the number of points.
|
||||
@vector: the points on the curve.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_curve_set_curve_type ##### -->
|
||||
@@ -158,6 +160,5 @@ curve will be changed as little as possible.
|
||||
|
||||
@curve: a #GtkCurve.
|
||||
@type: the type of the curve.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
|
||||
@@ -368,16 +368,6 @@ directly, but into the @vbox and @action_area, as described above.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_get_widget_for_response ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@response_id:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_dialog_get_action_area ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,17 @@ GtkGammaCurve
|
||||
A subclass of GtkCurve for editing gamma curves
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<note>
|
||||
<para>
|
||||
This widget is considered too specialized/little-used for
|
||||
GTK+, and will in the future be moved to some other package. If
|
||||
your application needs this widget, feel free to use it, as the
|
||||
widget does work and is useful in some applications; it's just not
|
||||
of general interest. However, we are not accepting new features for
|
||||
the widget, and it will eventually move out of the GTK+
|
||||
distribution.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
The #GtkGammaCurve widget is a variant of #GtkCurve specifically for
|
||||
editing gamma curves, which are used in graphics applications such as the
|
||||
@@ -17,9 +28,6 @@ mouse just like a #GtkCurve widget. On the right of the curve it also displays
|
||||
free), and the other 2 set the curve to a particular gamma value, or reset it
|
||||
to a straight line.
|
||||
</para>
|
||||
<para>
|
||||
As of GTK+ 2.20, #GtkGammaCurve has been deprecated since it is too specialized.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@@ -42,6 +50,5 @@ Creates a new #GtkGammaCurve.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GtkGammaCurve.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Looking up icons by name
|
||||
#GtkIconTheme provides a facility for looking up icons by name
|
||||
and size. The main reason for using a name rather than simply
|
||||
providing a filename is to allow different icons to be used
|
||||
depending on what <firstterm>icon theme</firstterm> is selected
|
||||
depending on what <firstterm>icon theme</firstterm> is selecetd
|
||||
by the user. The operation of icon themes on Linux and Unix
|
||||
follows the <ulink
|
||||
url="http://www.freedesktop.org/Standards/icon-theme-spec">Icon
|
||||
|
||||
@@ -0,0 +1,518 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkImage
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget displaying an image
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkImage widget displays an image. Various kinds of object
|
||||
can be displayed as an image; most typically, you would load a
|
||||
#GdkPixbuf ("pixel buffer") from a file, and then display that.
|
||||
There's a convenience function to do this, gtk_image_new_from_file(),
|
||||
used as follows:
|
||||
<informalexample><programlisting>
|
||||
GtkWidget *image;
|
||||
image = gtk_image_new_from_file ("myfile.png");
|
||||
</programlisting></informalexample>
|
||||
If the file isn't loaded successfully, the image will contain a
|
||||
"broken image" icon similar to that used in many web browsers.
|
||||
If you want to handle errors in loading the file yourself,
|
||||
for example by displaying an error message, then load the image with
|
||||
gdk_pixbuf_new_from_file(), then create the #GtkImage with
|
||||
gtk_image_new_from_pixbuf().
|
||||
</para>
|
||||
<para>
|
||||
The image file may contain an animation, if so the #GtkImage will
|
||||
display an animation (#GdkPixbufAnimation) instead of a static image.
|
||||
</para>
|
||||
<para>
|
||||
#GtkImage is a subclass of #GtkMisc, which implies that you can
|
||||
align it (center, left, right) and add padding to it, using
|
||||
#GtkMisc methods.
|
||||
</para>
|
||||
<para>
|
||||
#GtkImage is a "no window" widget (has no #GdkWindow of its own),
|
||||
so by default does not receive events. If you want to receive events
|
||||
on the image, such as button clicks, place the image inside a
|
||||
#GtkEventBox, then connect to the event signals on the event box.
|
||||
<example>
|
||||
<title>Handling button press events on a
|
||||
<structname>GtkImage</structname>.</title>
|
||||
<programlisting>
|
||||
static gboolean
|
||||
button_press_callback (GtkWidget *event_box,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("Event box clicked at coordinates %f,%f\n",
|
||||
event->x, event->y);
|
||||
|
||||
/* Returning TRUE means we handled the event, so the signal
|
||||
* emission should be stopped (don't call any further
|
||||
* callbacks that may be connected). Return FALSE
|
||||
* to continue invoking callbacks.
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
create_image (void)
|
||||
{
|
||||
GtkWidget *image;
|
||||
GtkWidget *event_box;
|
||||
|
||||
image = gtk_image_new_from_file ("myfile.png");
|
||||
|
||||
event_box = gtk_event_box_new (<!-- -->);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), image);
|
||||
|
||||
g_signal_connect (G_OBJECT (event_box),
|
||||
"button_press_event",
|
||||
G_CALLBACK (button_press_callback),
|
||||
image);
|
||||
|
||||
return image;
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
When handling events on the event box, keep in mind that coordinates
|
||||
in the image may be different from event box coordinates due to
|
||||
the alignment and padding settings on the image (see #GtkMisc).
|
||||
The simplest way to solve this is to set the alignment to 0.0
|
||||
(left/top), and set the padding to zero. Then the origin of
|
||||
the image will be the same as the origin of the event box.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Sometimes an application will want to avoid depending on external data
|
||||
files, such as image files. GTK+ comes with a program to avoid this,
|
||||
called <application>gdk-pixbuf-csource</application>. This program
|
||||
allows you to convert an image into a C variable declaration, which
|
||||
can then be loaded into a #GdkPixbuf using
|
||||
gdk_pixbuf_new_from_inline().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GdkPixbuf
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkImage ##### -->
|
||||
<para>
|
||||
This struct contain private data only and should be accessed by the functions
|
||||
below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkImage:file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:icon-name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:icon-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:icon-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:mask ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:pixbuf-animation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:pixel-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImage:storage-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GtkImageType ##### -->
|
||||
<para>
|
||||
Describes the image data representation used by a #GtkImage. If you
|
||||
want to get the image from the widget, you can only get the
|
||||
currently-stored representation. e.g. if the
|
||||
gtk_image_get_storage_type() returns #GTK_IMAGE_PIXBUF, then you can
|
||||
call gtk_image_get_pixbuf() but not gtk_image_get_stock(). For empty
|
||||
images, you can request any storage type (call any of the "get"
|
||||
functions), but they will all return %NULL values.
|
||||
</para>
|
||||
|
||||
@GTK_IMAGE_EMPTY: there is no image displayed by the widget
|
||||
@GTK_IMAGE_PIXMAP: the widget contains a #GdkPixmap
|
||||
@GTK_IMAGE_IMAGE: the widget contains a #GdkImage
|
||||
@GTK_IMAGE_PIXBUF: the widget contains a #GdkPixbuf
|
||||
@GTK_IMAGE_STOCK: the widget contains a stock icon name (see <xref linkend="gtk-Stock-Items"/>)
|
||||
@GTK_IMAGE_ICON_SET: the widget contains a #GtkIconSet
|
||||
@GTK_IMAGE_ANIMATION: the widget contains a #GdkPixbufAnimation
|
||||
@GTK_IMAGE_ICON_NAME: the widget contains a named icon.
|
||||
This image type was added in GTK+ 2.6
|
||||
@GTK_IMAGE_GICON: the widget contains a #GIcon.
|
||||
This image type was added in GTK+ 2.14
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_icon_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@icon_set:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@gdk_image:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@pixmap:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@stock_id:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_animation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@icon_name:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@gicon:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_storage_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_icon_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_set:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixmap:
|
||||
@mask:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@stock_id:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_animation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_name:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new_from_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@filename:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_icon_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@icon_set:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@gdk_image:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@pixmap:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@stock_id:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_animation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@animation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@icon_name:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_from_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@icon:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_clear ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns: the #GtkImage
|
||||
<!-- # Unused Parameters # -->
|
||||
@mask: a #GdkBitmap that indicates which parts of the image should be transparent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set ##### -->
|
||||
<para>
|
||||
Sets the #GtkImage.
|
||||
</para>
|
||||
|
||||
@image: a #GtkImage
|
||||
@val: a #GdkImage
|
||||
@mask: a #GdkBitmap that indicates which parts of the image should be transparent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get ##### -->
|
||||
<para>
|
||||
Gets the #GtkImage.
|
||||
</para>
|
||||
|
||||
@image: a #GtkImage
|
||||
@val: return location for a #GdkImage
|
||||
@mask: a #GdkBitmap that indicates which parts of the image should be transparent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_set_pixel_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@pixel_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_pixel_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -5,6 +5,15 @@ GtkInputDialog
|
||||
Configure devices for the XInput extension
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
NOTE this widget is considered too specialized/little-used for
|
||||
GTK+, and will in the future be moved to some other package. If
|
||||
your application needs this widget, feel free to use it, as the
|
||||
widget does work and is useful in some applications; it's just not
|
||||
of general interest. However, we are not accepting new features for
|
||||
the widget, and it will eventually move out of the GTK+
|
||||
distribution.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
#GtkInputDialog displays a dialog which allows the user
|
||||
@@ -23,9 +32,6 @@ No actions are bound to these by default.
|
||||
The changes that the user makes take effect
|
||||
immediately.
|
||||
</para>
|
||||
<para>
|
||||
As of GTK+ 2.20, #GtkInputDialog has been deprecated since it is too specialized.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@@ -49,8 +55,6 @@ to #GDK_MODE_ENABLED.
|
||||
|
||||
@inputdialog: the object which received the signal.
|
||||
@deviceid: The ID of the newly disabled device.
|
||||
<!-- # Unused Parameters # -->
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
<!-- ##### SIGNAL GtkInputDialog::enable-device ##### -->
|
||||
<para>
|
||||
@@ -61,8 +65,6 @@ mode of a device from #GDK_MODE_DISABLED to a
|
||||
|
||||
@inputdialog: the object which received the signal.
|
||||
@deviceid: The ID of the newly enabled device.
|
||||
<!-- # Unused Parameters # -->
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
<!-- ##### FUNCTION gtk_input_dialog_new ##### -->
|
||||
<para>
|
||||
@@ -70,6 +72,5 @@ Creates a new #GtkInputDialog.
|
||||
</para>
|
||||
|
||||
@Returns: the new #GtkInputDialog.
|
||||
@Deprecated: 2.20: Don't use this widget anymore.
|
||||
|
||||
|
||||
|
||||
@@ -26,14 +26,9 @@ The GtkNoteboopk implementation of the GtkBuildable interface
|
||||
supports placing children into tabs by specifying "tab" as the
|
||||
"type" attribute of a <child> element. Note that the content
|
||||
of the tab must be created before the tab can be filled.
|
||||
A tab child can be specified without specifying a <child>
|
||||
A tab child can be specified without specifying a <child>
|
||||
type attribute.
|
||||
</para>
|
||||
<para>
|
||||
To add a child widget in the notebooks action area, specify
|
||||
"action-start" or "action-end" as the "type" attribute of the <child>
|
||||
element.
|
||||
</para>
|
||||
<example>
|
||||
<title>A UI definition fragment with GtkNotebook</title>
|
||||
<programlisting><![CDATA[
|
||||
@@ -261,8 +256,7 @@ Emitted when the user or a function changes the current page.
|
||||
|
||||
<!-- ##### ARG GtkNotebook:tab-pack ##### -->
|
||||
<para>
|
||||
Deprecated: 2.20: The tab packing functionality of children should not
|
||||
be used anymore and support will be removed in the future.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkNotebook:arrow-spacing ##### -->
|
||||
|
||||
@@ -264,6 +264,12 @@ directions for the visible progress bar.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_progress_bar_new_with_adjustment ##### -->
|
||||
<para>
|
||||
Creates a new #GtkProgressBar with an associated #GtkAdjustment.
|
||||
</para>
|
||||
|
||||
@adjustment: a #GtkAdjustment.
|
||||
@Returns: a #GtkProgressBar.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_progress_bar_set_bar_style ##### -->
|
||||
|
||||
@@ -197,6 +197,13 @@ gtk_radio_button_get_group().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_radio_button_get_group ##### -->
|
||||
|
||||
<para>
|
||||
Retrieves the group assigned to a radio button.
|
||||
</para>
|
||||
|
||||
@radio_button: a #GtkRadioButton.
|
||||
@Returns: a linked list containing all the radio buttons in the same group
|
||||
as @radio_button. The returned list is owned by the radio button
|
||||
and must not be modified or freed.
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,14 @@ Creates a new #GtkRadioMenuItem.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_label ##### -->
|
||||
<para>
|
||||
Creates a new #GtkRadioMenuItem whose child is a simple #GtkLabel.
|
||||
</para>
|
||||
|
||||
@group: the group to which the radio menu item is to be attached
|
||||
@label: the text for the label
|
||||
@Returns: a new #GtkRadioMenuItem
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_radio_menu_item_new_with_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
@@ -246,12 +246,13 @@ GTK_SPIN_END</entry>
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_configure ##### -->
|
||||
<para>
|
||||
|
||||
Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call.
|
||||
</para>
|
||||
|
||||
|
||||
@adjustment:
|
||||
|
||||
@spin_button: a #GtkSpinButton.
|
||||
@adjustment: a #GtkAdjustment.
|
||||
@climb_rate: the new climb rate.
|
||||
@digits: the number of decimal places to display in the spin button.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_spin_button_new ##### -->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -136,6 +136,15 @@ Returns whether the style is attached to a window.
|
||||
|
||||
</para>
|
||||
|
||||
@style:
|
||||
@window:
|
||||
@set_bg:
|
||||
@state_type:
|
||||
@area:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### MACRO gtk_style_apply_default_pixmap ##### -->
|
||||
@@ -832,21 +841,6 @@ Does the same as gtk_style_apply_default_background().
|
||||
@orientation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_paint_spinner ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@style:
|
||||
@window:
|
||||
@state_type:
|
||||
@step:
|
||||
@x:
|
||||
@y:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_paint_string ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ See <application>gtk-demo</application> for numerous examples.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The "invisible" property was not implemented for GTK+ 2.0.
|
||||
It is working (with minor issues) since 2.8.
|
||||
The "invisible" property was not implemented for GTK+ 2.0; it's
|
||||
planned to be implemented in future releases.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkToolShell
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkToolShell ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkToolShellIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@get_icon_size:
|
||||
@get_orientation:
|
||||
@get_style:
|
||||
@get_relief_style:
|
||||
@rebuild_menu:
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_icon_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_orientation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_relief_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_rebuild_menu ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
|
||||
|
||||
@@ -132,16 +132,6 @@ return %TRUE to show the window, %FALSE to not show it.
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tooltip_set_icon_from_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@tooltip:
|
||||
@gicon:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tooltip_set_custom ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -146,6 +146,16 @@ Sets the time between the user moving the mouse over a widget and the widget's t
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tooltips_set_tip ##### -->
|
||||
<para>
|
||||
Adds a tooltip containing the message @tip_text to the specified #GtkWidget.
|
||||
</para>
|
||||
|
||||
@tooltips: a #GtkTooltips.
|
||||
@widget: the #GtkWidget you wish to associate the tip with.
|
||||
@tip_text: a string containing the tip itself.
|
||||
@tip_private: a string of any further information that may be useful if the user gets stuck.
|
||||
@Deprecated: 2.12:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tooltips_data_get ##### -->
|
||||
<para>
|
||||
|
||||
@@ -49,8 +49,7 @@ Definitions</link>.
|
||||
position (top|bot) #IMPLIED >
|
||||
<!ATTLIST menuitem name #IMPLIED
|
||||
action #REQUIRED
|
||||
position (top|bot) #IMPLIED
|
||||
always-show-image (true|false) #IMPLIED >
|
||||
position (top|bot) #IMPLIED >
|
||||
<!ATTLIST toolitem name #IMPLIED
|
||||
action #REQUIRED
|
||||
position (top|bot) #IMPLIED >
|
||||
|
||||
@@ -123,12 +123,3 @@ exactly this, so you can ignore the presence of the viewport.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_viewport_get_bin_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@viewport:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,9 +39,6 @@
|
||||
<link linkend="GtkImage">
|
||||
<inlinegraphic fileref="image.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkSpinner">
|
||||
<inlinegraphic fileref="spinner.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkLabel">
|
||||
<inlinegraphic fileref="label.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
@@ -98,9 +95,6 @@
|
||||
</link>
|
||||
<link linkend="GtkToolbar">
|
||||
<inlinegraphic fileref="toolbar.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkToolPalette">
|
||||
<inlinegraphic fileref="toolpalette.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkTreeView">
|
||||
<inlinegraphic fileref="list-and-tree.png" format="PNG"></inlinegraphic>
|
||||
|
||||
@@ -17,8 +17,7 @@ LDADDS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/$(gdktargetlib) \
|
||||
$(top_builddir)/gtk/$(gtktargetlib) \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(GDK_DEP_LIBS)
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
if USE_X11
|
||||
noinst_PROGRAMS = \
|
||||
|
||||
@@ -729,34 +729,6 @@ create_toolbar (void)
|
||||
return new_widget_info ("toolbar", widget, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_toolpalette (void)
|
||||
{
|
||||
GtkWidget *widget, *group;
|
||||
GtkToolItem *item;
|
||||
|
||||
widget = gtk_tool_palette_new ();
|
||||
group = gtk_tool_item_group_new ("Tools");
|
||||
gtk_container_add (GTK_CONTAINER (widget), group);
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_ABOUT);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_FILE);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_CONNECT);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
|
||||
group = gtk_tool_item_group_new ("More tools");
|
||||
gtk_container_add (GTK_CONTAINER (widget), group);
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_CUT);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_EXECUTE);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
item = gtk_tool_button_new_from_stock (GTK_STOCK_CANCEL);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
|
||||
return new_widget_info ("toolpalette", widget, MEDIUM);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_menubar (void)
|
||||
{
|
||||
@@ -967,26 +939,6 @@ create_image (void)
|
||||
return new_widget_info ("image", vbox, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_spinner (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align, *vbox;
|
||||
|
||||
widget = gtk_spinner_new ();
|
||||
gtk_widget_set_size_request (widget, 24, 24);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 3);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Spinner"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
return new_widget_info ("spinner", vbox, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_volume_button (void)
|
||||
{
|
||||
@@ -1033,8 +985,6 @@ get_all_widgets (void)
|
||||
{
|
||||
GList *retval = NULL;
|
||||
|
||||
retval = g_list_prepend (retval, create_toolpalette ());
|
||||
retval = g_list_prepend (retval, create_spinner ());
|
||||
retval = g_list_prepend (retval, create_about_dialog ());
|
||||
retval = g_list_prepend (retval, create_accel_label ());
|
||||
retval = g_list_prepend (retval, create_button ());
|
||||
|
||||
@@ -11154,7 +11154,7 @@ tictactoe_get_type (void)
|
||||
|
||||
if (!ttt_type)
|
||||
{
|
||||
const GTypeInfo ttt_info =
|
||||
static const GTypeInfo ttt_info =
|
||||
{
|
||||
sizeof (TictactoeClass),
|
||||
NULL, /* base_init */
|
||||
@@ -14606,7 +14606,7 @@ tictactoe_get_type (void)
|
||||
|
||||
if (!ttt_type)
|
||||
{
|
||||
const GTypeInfo ttt_info =
|
||||
static const GTypeInfo ttt_info =
|
||||
{
|
||||
sizeof (TictactoeClass),
|
||||
NULL, /* base_init */
|
||||
@@ -14963,7 +14963,7 @@ gtk_dial_get_type ()
|
||||
|
||||
if (!dial_type)
|
||||
{
|
||||
const GTypeInfo dial_info =
|
||||
static const GTypeInfo dial_info =
|
||||
{
|
||||
sizeof (GtkDialClass),
|
||||
NULL,
|
||||
|
||||
@@ -4114,7 +4114,7 @@ static const char * xpm_data[] = {
|
||||
|
||||
When we're done using a pixmap and not likely to reuse it again soon,
|
||||
it is a good idea to release the resource using
|
||||
g_object_unref(). Pixmaps should be considered a precious resource,
|
||||
gdk_pixmap_unref(). Pixmaps should be considered a precious resource,
|
||||
because they take up memory in the end-user's X server process. Even
|
||||
though the X client you write may run on a powerful "server" computer,
|
||||
the user may be running the X server on a small personal computer.
|
||||
@@ -9564,7 +9564,7 @@ which owns it will be collapsed. So, if you want it to stick around,
|
||||
do something like the following:
|
||||
|
||||
<tscreen><verb>
|
||||
g_object_ref (tree);
|
||||
gtk_widget_ref (tree);
|
||||
owner = GTK_TREE(tree)->tree_owner;
|
||||
gtk_container_remove (GTK_CONTAINER(tree), item);
|
||||
if (tree->parent == NULL){
|
||||
@@ -9572,7 +9572,7 @@ if (tree->parent == NULL){
|
||||
gtk_tree_item_set_subtree (GTK_TREE_ITEM(owner), tree);
|
||||
}
|
||||
else
|
||||
g_object_unref (tree);
|
||||
gtk_widget_unref (tree);
|
||||
</verb></tscreen>
|
||||
|
||||
Finally, drag-n-drop <em>does</em> work with TreeItems. You just
|
||||
@@ -14476,7 +14476,7 @@ static gint
|
||||
configure_event (GtkWidget *widget, GdkEventConfigure *event)
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref(pixmap);
|
||||
gdk_pixmap_unref(pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
@@ -16978,7 +16978,7 @@ gtk_dial_expose (GtkWidget *widget,
|
||||
points, 5,
|
||||
FALSE);
|
||||
|
||||
g_object_unref(blankstyle);
|
||||
gtk_style_unref(blankstyle);
|
||||
|
||||
|
||||
/* Draw ticks */
|
||||
@@ -17406,7 +17406,7 @@ static gint configure_event( GtkWidget *widget,
|
||||
GdkEventConfigure *event )
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref(pixmap);
|
||||
gdk_pixmap_unref(pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
@@ -17592,7 +17592,7 @@ static gint
|
||||
configure_event (GtkWidget *widget, GdkEventConfigure *event)
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref(pixmap);
|
||||
gdk_pixmap_unref(pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
|
||||
@@ -4061,7 +4061,7 @@ static const char * xpm_data[] = {
|
||||
|
||||
Cuando hayamos acabado de usar un <em/pixmap/ y no lo vayamos a usar
|
||||
durante un tiempo suele ser conveniente liberar el recurso mediante
|
||||
g_object_unref(). (Los <em/pixmaps/ deben ser considerados recursos
|
||||
gdk_pixmap_unref(). (Los <em/pixmaps/ deben ser considerados recursos
|
||||
preciosos).
|
||||
|
||||
Una vez que hemos creado el <em/pixmap/ lo podemos mostrar como un
|
||||
@@ -8986,7 +8986,7 @@ se colapsar
|
||||
tendrá que hacer algo así:
|
||||
|
||||
<tscreen><verb>
|
||||
g_object_ref (arbol);
|
||||
gtk_widget_ref (arbol);
|
||||
propietario = GTK_TREE(arbol)->tree_owner;
|
||||
gtk_container_remove (GTK_CONTAINER(arbol), item);
|
||||
if (arbol->parent == NULL){
|
||||
@@ -8994,7 +8994,7 @@ if (arbol->parent == NULL){
|
||||
gtk_tree_item_set_subtree (GTK_TREE_ITEM(propietario), arbol);
|
||||
}
|
||||
else
|
||||
g_object_unref (arbol);
|
||||
gtk_widget_unref (arbol);
|
||||
</verb></tscreen>
|
||||
|
||||
Finalmente, hay que mencionar que la opción de drag-n-drop (arrastar y
|
||||
@@ -13967,7 +13967,7 @@ static gint
|
||||
configure_event (GtkWidget *widget, GdkEventConfigure *event)
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref(pixmap);
|
||||
gdk_pixmap_unref(pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
@@ -16855,7 +16855,7 @@ static gint
|
||||
configure_event (GtkWidget *widget, GdkEventConfigure *event)
|
||||
{
|
||||
if (pixmap)
|
||||
g_object_unref(pixmap);
|
||||
gdk_pixmap_unref(pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
|
||||
@@ -365,7 +365,7 @@ When a widget receives the "realize" signal it should:
|
||||
1) set the realized flag
|
||||
2) set widget->window
|
||||
widget->window = gtk_widget_get_parent_window (widget);
|
||||
g_object_ref (widget->window);
|
||||
gdk_window_ref (widget->window);
|
||||
3) attach the widget's style
|
||||
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
@@ -65,7 +65,7 @@ gtk_dial_get_type ()
|
||||
|
||||
if (!dial_type)
|
||||
{
|
||||
const GTypeInfo dial_info =
|
||||
static const GTypeInfo dial_info =
|
||||
{
|
||||
sizeof (GtkDialClass),
|
||||
NULL,
|
||||
|
||||
@@ -40,7 +40,7 @@ tictactoe_get_type (void)
|
||||
|
||||
if (!ttt_type)
|
||||
{
|
||||
const GTypeInfo ttt_info =
|
||||
static const GTypeInfo ttt_info =
|
||||
{
|
||||
sizeof (TictactoeClass),
|
||||
NULL, /* base_init */
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
include $(INTROSPECTION_MAKEFILE)
|
||||
|
||||
INTROSPECTION_GIRS =
|
||||
|
||||
SUBDIRS = pixops
|
||||
|
||||
@@ -196,14 +193,6 @@ libpixbufloader_jasper_la_SOURCES = io-jasper.c
|
||||
libpixbufloader_jasper_la_LDFLAGS = -avoid-version -module $(no_undefined)
|
||||
libpixbufloader_jasper_la_LIBADD = $(LIBJASPER) $(module_libs)
|
||||
|
||||
#
|
||||
# The QTIF loader
|
||||
#
|
||||
libstatic_pixbufloader_qtif_la_SOURCES = io-qtif.c
|
||||
libpixbufloader_qtif_la_SOURCES = io-qtif.c
|
||||
libpixbufloader_qtif_la_LDFLAGS = -avoid-version -module $(no_undefined)
|
||||
libpixbufloader_qtif_la_LIBADD = $(module_libs)
|
||||
|
||||
if BUILD_GDIPLUS_LOADERS
|
||||
|
||||
if INCLUDE_GDIPLUS
|
||||
@@ -462,12 +451,6 @@ JASPER_LIB = libpixbufloader-jasper.la
|
||||
endif
|
||||
endif
|
||||
|
||||
if INCLUDE_QTIF
|
||||
STATIC_QTIF_LIB = libstatic-pixbufloader-qtif.la
|
||||
else
|
||||
QTIF_LIB = libpixbufloader-qtif.la
|
||||
endif
|
||||
|
||||
if BUILD_DYNAMIC_MODULES
|
||||
|
||||
loader_LTLIBRARIES = \
|
||||
@@ -487,7 +470,6 @@ loader_LTLIBRARIES = \
|
||||
$(ICNS_LIB) \
|
||||
$(PCX_LIB) \
|
||||
$(JASPER_LIB) \
|
||||
$(QTIF_LIB) \
|
||||
$(GDIPLUS_LIBS)
|
||||
|
||||
|
||||
@@ -510,7 +492,6 @@ noinst_LTLIBRARIES = \
|
||||
$(STATIC_ICNS_LIB) \
|
||||
$(STATIC_PCX_LIB) \
|
||||
$(STATIC_JASPER_LIB) \
|
||||
$(STATIC_QTIF_LIB) \
|
||||
$(STATIC_GDIPLUS_LIBS)
|
||||
|
||||
builtin_objs = @INCLUDED_LOADER_OBJ@
|
||||
@@ -689,26 +670,6 @@ EXTRA_DIST += \
|
||||
gdk-pixbuf-enum-types.h.template \
|
||||
gen-color-table.pl
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
GdkPixbuf_2_0_gir_SCANNERFLAGS = --strip-prefix=Gdk
|
||||
GdkPixbuf_2_0_gir_INCLUDES = GModule-2.0 Gio-2.0
|
||||
GdkPixbuf_2_0_gir_LIBS = libgdk_pixbuf-2.0.la
|
||||
GdkPixbuf_2_0_gir_CFLAGS = $(INCLUDES)
|
||||
GdkPixbuf_2_0_gir_FILES = \
|
||||
$(addprefix $(srcdir)/,$(libgdk_pixbufinclude_HEADERS)) \
|
||||
$(addprefix $(srcdir)/,$(libgdk_pixbuf_2_0_la_SOURCES))
|
||||
INTROSPECTION_GIRS += GdkPixbuf-2.0.gir
|
||||
|
||||
girdir = $(INTROSPECTION_GIRDIR)
|
||||
dist_gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
|
||||
typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
||||
|
||||
CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
|
||||
endif
|
||||
|
||||
if CROSS_COMPILING
|
||||
RUN_QUERY_LOADER_TEST=false
|
||||
else
|
||||
|
||||
@@ -396,9 +396,6 @@ gdk_pixbuf_io_init (void)
|
||||
#ifdef INCLUDE_jasper
|
||||
load_one_builtin_module (jasper);
|
||||
#endif
|
||||
#ifdef INCLUDE_qtif
|
||||
load_one_builtin_module (qtif);
|
||||
#endif
|
||||
#ifdef INCLUDE_gdiplus
|
||||
/* We don't bother having the GDI+ loaders individually selectable
|
||||
* for building in or not.
|
||||
@@ -592,7 +589,6 @@ module (tga);
|
||||
module (pcx);
|
||||
module (icns);
|
||||
module (jasper);
|
||||
module (qtif);
|
||||
module (gdip_ico);
|
||||
module (gdip_wmf);
|
||||
module (gdip_emf);
|
||||
@@ -671,9 +667,6 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
|
||||
#ifdef INCLUDE_jasper
|
||||
try_module (jasper,jasper);
|
||||
#endif
|
||||
#ifdef INCLUDE_qtif
|
||||
try_module (qtif,qtif);
|
||||
#endif
|
||||
#ifdef INCLUDE_gdiplus
|
||||
try_module (ico,gdip_ico);
|
||||
try_module (wmf,gdip_wmf);
|
||||
@@ -1902,25 +1895,6 @@ gdk_pixbuf_real_save_to_callback (GdkPixbuf *pixbuf,
|
||||
* be specified using the "compression" parameter; it's value is in an
|
||||
* integer in the range of [0,9].
|
||||
*
|
||||
* ICC color profiles can also be embedded into PNG and TIFF images.
|
||||
* The "icc-profile" value should be the complete ICC profile encoded
|
||||
* into base64.
|
||||
*
|
||||
* <informalexample><programlisting>
|
||||
* gchar *contents;
|
||||
* gchar *contents_encode;
|
||||
* gsize length;
|
||||
* g_file_get_contents ("/home/hughsie/.color/icc/L225W.icm", &contents, &length, NULL);
|
||||
* contents_encode = g_base64_encode ((const guchar *) contents, length);
|
||||
* gdk_pixbuf_save (pixbuf, handle, "png", &error,
|
||||
* "icc-profile", contents_encode,
|
||||
* NULL);
|
||||
* </programlisting></informalexample>
|
||||
*
|
||||
* TIFF images recognize a "compression" option which acceps an integer value.
|
||||
* Among the codecs are 1 None, 2 Huffman, 5 LZW, 7 JPEG and 8 Deflate, see
|
||||
* the libtiff documentation and tiff.h for all supported codec values.
|
||||
*
|
||||
* ICO images can be saved in depth 16, 24, or 32, by using the "depth"
|
||||
* parameter. When the ICO saver is given "x_hot" and "y_hot" parameters,
|
||||
* it produces a CUR instead of an ICO.
|
||||
|
||||
@@ -267,7 +267,7 @@ gdk_pixbuf_saturate_and_pixelate(const GdkPixbuf *src,
|
||||
* Return value: A newly-created pixbuf, or a reference to the
|
||||
* input pixbuf (with an increased reference count).
|
||||
*
|
||||
* Since: 2.12
|
||||
* Since 2.12
|
||||
**/
|
||||
GdkPixbuf *
|
||||
gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src)
|
||||
|
||||
@@ -49,7 +49,7 @@ gdk_pixbuf_ani_anim_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info = {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GdkPixbufAniAnimClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
@@ -191,7 +191,7 @@ gdk_pixbuf_ani_anim_iter_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info = {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GdkPixbufAniAnimIterClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
|
||||
+1
-1
@@ -329,7 +329,7 @@ ani_load_chunk (AniLoaderContext *context, GError **error)
|
||||
(context->Flags & 0x2) != 0,
|
||||
(context->Flags & 0x1) != 0);
|
||||
#endif
|
||||
if (!(context->Flags & 0x2))
|
||||
if (!context->Flags & 0x2)
|
||||
{
|
||||
g_set_error_literal (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
|
||||
+2
-2
@@ -1318,7 +1318,7 @@ gdk_pixbuf__bmp_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
put32 (dst, 0); /* biClrUsed */
|
||||
put32 (dst, 0); /* biClrImportant */
|
||||
|
||||
if (!save_func ((gchar *)BFH_BIH, 14 + 40, error, user_data))
|
||||
if (!save_func (BFH_BIH, 14 + 40, error, user_data))
|
||||
return FALSE;
|
||||
|
||||
dst_line = buf = g_try_malloc (size);
|
||||
@@ -1341,7 +1341,7 @@ gdk_pixbuf__bmp_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
dst[2] = src[0];
|
||||
}
|
||||
}
|
||||
ret = save_func ((gchar *)buf, size, error, user_data);
|
||||
ret = save_func (buf, size, error, user_data);
|
||||
g_free (buf);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -46,7 +46,7 @@ gdk_pixbuf_gdip_anim_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info = {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GdkPixbufGdipAnimClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
@@ -197,7 +197,7 @@ gdk_pixbuf_gdip_anim_iter_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info = {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GdkPixbufGdipAnimIterClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
|
||||
+30
-38
@@ -31,18 +31,6 @@
|
||||
|
||||
#define LOAD_BUFFER_SIZE 65536
|
||||
|
||||
struct _GdipContext {
|
||||
GdkPixbufModuleUpdatedFunc updated_func;
|
||||
GdkPixbufModulePreparedFunc prepared_func;
|
||||
GdkPixbufModuleSizeFunc size_func;
|
||||
|
||||
gpointer user_data;
|
||||
GByteArray *buffer;
|
||||
IStream *stream;
|
||||
HGLOBAL hg;
|
||||
};
|
||||
typedef struct _GdipContext GdipContext;
|
||||
|
||||
static GdiplusStartupFunc GdiplusStartup;
|
||||
static GdipCreateBitmapFromStreamFunc GdipCreateBitmapFromStream;
|
||||
static GdipBitmapGetPixelFunc GdipBitmapGetPixel;
|
||||
@@ -351,16 +339,16 @@ gdip_pixbuf_to_bitmap (GdkPixbuf *pixbuf)
|
||||
}
|
||||
|
||||
static GpBitmap *
|
||||
gdip_buffer_to_bitmap (GdipContext *context, GError **error)
|
||||
gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
{
|
||||
HRESULT hr;
|
||||
HGLOBAL hg = NULL;
|
||||
GpBitmap *bitmap = NULL;
|
||||
IStream *stream = NULL;
|
||||
GpStatus status;
|
||||
guint64 size64 = context->buffer->len;
|
||||
guint64 size64 = size;
|
||||
|
||||
hg = gdip_buffer_to_hglobal (context->buffer->data, context->buffer->len, error);
|
||||
hg = gdip_buffer_to_hglobal (buffer, size, error);
|
||||
|
||||
if (!hg)
|
||||
return NULL;
|
||||
@@ -377,30 +365,26 @@ gdip_buffer_to_bitmap (GdipContext *context, GError **error)
|
||||
|
||||
status = GdipCreateBitmapFromStream (stream, &bitmap);
|
||||
|
||||
if (Ok != status) {
|
||||
if (Ok != status)
|
||||
gdip_set_error_from_gpstatus (error, GDK_PIXBUF_ERROR_FAILED, status);
|
||||
IStream_Release (stream);
|
||||
GlobalFree (hg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
context->stream = stream;
|
||||
context->hg = hg;
|
||||
IStream_Release (stream);
|
||||
GlobalFree (hg);
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
static GpImage *
|
||||
gdip_buffer_to_image (GdipContext *context, GError **error)
|
||||
gdip_buffer_to_image (const gchar *buffer, size_t size, GError **error)
|
||||
{
|
||||
HRESULT hr;
|
||||
HGLOBAL hg = NULL;
|
||||
GpImage *image = NULL;
|
||||
IStream *stream = NULL;
|
||||
GpStatus status;
|
||||
guint64 size64 = context->buffer->len;
|
||||
guint64 size64 = size;
|
||||
|
||||
hg = gdip_buffer_to_hglobal (context->buffer->data, context->buffer->len, error);
|
||||
hg = gdip_buffer_to_hglobal (buffer, size, error);
|
||||
|
||||
if (!hg)
|
||||
return NULL;
|
||||
@@ -416,15 +400,11 @@ gdip_buffer_to_image (GdipContext *context, GError **error)
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
status = GdipLoadImageFromStream (stream, &image);
|
||||
|
||||
if (Ok != status) {
|
||||
if (Ok != status)
|
||||
gdip_set_error_from_gpstatus (error, GDK_PIXBUF_ERROR_FAILED, status);
|
||||
IStream_Release (stream);
|
||||
GlobalFree (hg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
context->stream = stream;
|
||||
context->hg = hg;
|
||||
IStream_Release (stream);
|
||||
GlobalFree (hg);
|
||||
|
||||
return image;
|
||||
}
|
||||
@@ -611,14 +591,24 @@ gdip_bitmap_get_n_loops (GpBitmap *bitmap, guint *loops)
|
||||
return success;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
struct _GdipContext {
|
||||
GdkPixbufModuleUpdatedFunc updated_func;
|
||||
GdkPixbufModulePreparedFunc prepared_func;
|
||||
GdkPixbufModuleSizeFunc size_func;
|
||||
|
||||
gpointer user_data;
|
||||
|
||||
GByteArray *buffer;
|
||||
};
|
||||
typedef struct _GdipContext GdipContext;
|
||||
|
||||
static void
|
||||
destroy_gdipcontext (GdipContext *context)
|
||||
{
|
||||
if (context != NULL) {
|
||||
if (context->stream != NULL) {
|
||||
IStream_Release(context->stream);
|
||||
GlobalFree (context->hg);
|
||||
}
|
||||
g_byte_array_free (context->buffer, TRUE);
|
||||
g_free (context);
|
||||
}
|
||||
@@ -817,8 +807,9 @@ gdk_pixbuf__gdip_image_stop_load (gpointer data, GError **error)
|
||||
{
|
||||
GdipContext *context = (GdipContext *)data;
|
||||
GpBitmap *bitmap = NULL;
|
||||
GByteArray *image_buffer = context->buffer;
|
||||
|
||||
bitmap = gdip_buffer_to_bitmap (context, error);
|
||||
bitmap = gdip_buffer_to_bitmap ((gchar *)image_buffer->data, image_buffer->len, error);
|
||||
|
||||
if (!bitmap) {
|
||||
destroy_gdipcontext (context);
|
||||
@@ -833,6 +824,7 @@ static gboolean
|
||||
gdk_pixbuf__gdip_image_stop_vector_load (gpointer data, GError **error)
|
||||
{
|
||||
GdipContext *context = (GdipContext *)data;
|
||||
GByteArray *image_buffer = context->buffer;
|
||||
|
||||
GpImage *metafile;
|
||||
GpGraphics *graphics;
|
||||
@@ -841,7 +833,7 @@ gdk_pixbuf__gdip_image_stop_vector_load (gpointer data, GError **error)
|
||||
float metafile_xres, metafile_yres;
|
||||
guint width, height;
|
||||
|
||||
metafile = gdip_buffer_to_image (context, error);
|
||||
metafile = gdip_buffer_to_image ((gchar *)image_buffer->data, image_buffer->len, error);
|
||||
if (!metafile) {
|
||||
destroy_gdipcontext (context);
|
||||
g_set_error_literal (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Couldn't load metafile"));
|
||||
|
||||
@@ -50,7 +50,7 @@ gdk_pixbuf_gif_anim_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info = {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GdkPixbufGifAnimClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
@@ -206,7 +206,7 @@ gdk_pixbuf_gif_anim_iter_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info = {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GdkPixbufGifAnimIterClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
|
||||
+3
-3
@@ -411,8 +411,8 @@ gif_get_extension (GifContext *context)
|
||||
retval = get_data_block (context, (unsigned char *) context->block_buf, NULL);
|
||||
if (retval != 0)
|
||||
return retval;
|
||||
if (!strncmp ((gchar *)context->block_buf, "NETSCAPE2.0", 11) ||
|
||||
!strncmp ((gchar *)context->block_buf, "ANIMEXTS1.0", 11)) {
|
||||
if (!strncmp (context->block_buf, "NETSCAPE2.0", 11) ||
|
||||
!strncmp (context->block_buf, "ANIMEXTS1.0", 11)) {
|
||||
context->in_loop_extension = TRUE;
|
||||
}
|
||||
context->block_count = 0;
|
||||
@@ -1344,7 +1344,7 @@ gif_get_next_step (GifContext *context)
|
||||
}
|
||||
|
||||
|
||||
#define LOG(x) /* g_print ("%s: %s\n", G_STRLOC, x); */
|
||||
#define LOG(x) /* g_print ("%d: %s\n", __LINE__, x); */
|
||||
|
||||
static gint
|
||||
gif_main_loop (GifContext *context)
|
||||
|
||||
+3
-3
@@ -1011,12 +1011,12 @@ fill_entry (IconEntry *icon,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((icon->xor_rowstride % 4) != 0)
|
||||
if ((icon->xor_rowstride % 4) != 0)
|
||||
icon->xor_rowstride = 4 * ((icon->xor_rowstride / 4) + 1);
|
||||
icon->xor = g_new0 (guchar, icon->xor_rowstride * icon->height);
|
||||
|
||||
icon->and_rowstride = (icon->width + 7) / 8;
|
||||
if ((icon->and_rowstride % 4) != 0)
|
||||
icon->and_rowstride = icon->width / 8;
|
||||
if ((icon->and_rowstride % 4) != 0)
|
||||
icon->and_rowstride = 4 * ((icon->and_rowstride / 4) + 1);
|
||||
icon->and = g_new0 (guchar, icon->and_rowstride * icon->height);
|
||||
|
||||
|
||||
@@ -921,7 +921,6 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
|
||||
}
|
||||
}
|
||||
|
||||
cinfo->scale_num = 1;
|
||||
for (cinfo->scale_denom = 2; cinfo->scale_denom <= 8; cinfo->scale_denom *= 2) {
|
||||
jpeg_calc_output_dimensions (cinfo);
|
||||
if (cinfo->output_width < width || cinfo->output_height < height) {
|
||||
@@ -1047,7 +1046,7 @@ to_callback_do_write (j_compress_ptr cinfo, gsize length)
|
||||
ToFunctionDestinationManager *destmgr;
|
||||
|
||||
destmgr = (ToFunctionDestinationManager*) cinfo->dest;
|
||||
if (!destmgr->save_func ((gchar *)destmgr->buffer,
|
||||
if (!destmgr->save_func (destmgr->buffer,
|
||||
length,
|
||||
destmgr->error,
|
||||
destmgr->user_data)) {
|
||||
|
||||
+13
-80
@@ -258,12 +258,6 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
|
||||
gint num_texts;
|
||||
gchar *key;
|
||||
gchar *value;
|
||||
gchar *icc_profile_base64;
|
||||
const gchar *icc_profile_title;
|
||||
const gchar *icc_profile;
|
||||
guint icc_profile_size;
|
||||
guint32 retval;
|
||||
gint compression_type;
|
||||
|
||||
#ifdef PNG_USER_MEM_SUPPORTED
|
||||
png_ptr = png_create_read_struct_2 (PNG_LIBPNG_VER_STRING,
|
||||
@@ -338,18 +332,6 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PNG_cHRM_SUPPORTED)
|
||||
/* Extract embedded ICC profile */
|
||||
retval = png_get_iCCP (png_ptr, info_ptr,
|
||||
(png_charpp) &icc_profile_title, &compression_type,
|
||||
(png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size);
|
||||
if (retval != 0) {
|
||||
icc_profile_base64 = g_base64_encode ((const guchar *) icc_profile, icc_profile_size);
|
||||
gdk_pixbuf_set_option (pixbuf, "icc-profile", icc_profile_base64);
|
||||
g_free (icc_profile_base64);
|
||||
}
|
||||
#endif
|
||||
|
||||
g_free (rows);
|
||||
png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
|
||||
|
||||
@@ -604,13 +586,7 @@ png_info_callback (png_structp png_read_ptr,
|
||||
int i, num_texts;
|
||||
int color_type;
|
||||
gboolean have_alpha = FALSE;
|
||||
gchar *icc_profile_base64;
|
||||
const gchar *icc_profile_title;
|
||||
const gchar *icc_profile;
|
||||
guint icc_profile_size;
|
||||
guint32 retval;
|
||||
gint compression_type;
|
||||
|
||||
|
||||
lc = png_get_progressive_ptr(png_read_ptr);
|
||||
|
||||
if (lc->fatal_error_occurred)
|
||||
@@ -675,23 +651,11 @@ png_info_callback (png_structp png_read_ptr,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PNG_cHRM_SUPPORTED)
|
||||
/* Extract embedded ICC profile */
|
||||
retval = png_get_iCCP (png_read_ptr, png_info_ptr,
|
||||
(png_charpp) &icc_profile_title, &compression_type,
|
||||
(png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size);
|
||||
if (retval != 0) {
|
||||
icc_profile_base64 = g_base64_encode ((const guchar *) icc_profile, icc_profile_size);
|
||||
gdk_pixbuf_set_option (lc->pixbuf, "icc-profile", icc_profile_base64);
|
||||
g_free (icc_profile_base64);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Notify the client that we are ready to go */
|
||||
|
||||
if (lc->prepare_func)
|
||||
(* lc->prepare_func) (lc->pixbuf, NULL, lc->notify_user_data);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -827,7 +791,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
GdkPixbufSaveFunc save_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
png_structp png_ptr = NULL;
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr;
|
||||
png_textp text_ptr = NULL;
|
||||
guchar *ptr;
|
||||
@@ -842,8 +806,6 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
int num_keys;
|
||||
int compression = -1;
|
||||
gboolean success = TRUE;
|
||||
guchar *icc_profile = NULL;
|
||||
gsize icc_profile_size = 0;
|
||||
SaveToFunctionIoPtr to_callback_ioptr;
|
||||
|
||||
num_keys = 0;
|
||||
@@ -861,8 +823,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("Keys for PNG text chunks must have at least 1 and at most 79 characters."));
|
||||
success = FALSE;
|
||||
goto cleanup;
|
||||
return FALSE;
|
||||
}
|
||||
for (i = 0; i < len; i++) {
|
||||
if ((guchar) key[i] > 127) {
|
||||
@@ -870,24 +831,10 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("Keys for PNG text chunks must be ASCII characters."));
|
||||
success = FALSE;
|
||||
goto cleanup;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
num_keys++;
|
||||
} else if (strcmp (*kiter, "icc-profile") == 0) {
|
||||
/* decode from base64 */
|
||||
icc_profile = g_base64_decode (*viter, &icc_profile_size);
|
||||
if (icc_profile_size < 127) {
|
||||
/* This is a user-visible error */
|
||||
g_set_error (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("Color profile has invalid length '%" G_GSIZE_FORMAT "'."),
|
||||
icc_profile_size);
|
||||
success = FALSE;
|
||||
goto cleanup;
|
||||
}
|
||||
} else if (strcmp (*kiter, "compression") == 0) {
|
||||
char *endptr = NULL;
|
||||
compression = strtol (*viter, &endptr, 10);
|
||||
@@ -898,8 +845,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("PNG compression level must be a value between 0 and 9; value '%s' could not be parsed."),
|
||||
*viter);
|
||||
success = FALSE;
|
||||
goto cleanup;
|
||||
return FALSE;
|
||||
}
|
||||
if (compression < 0 || compression > 9) {
|
||||
/* This is a user-visible error;
|
||||
@@ -911,8 +857,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("PNG compression level must be a value between 0 and 9; value '%d' is not allowed."),
|
||||
compression);
|
||||
success = FALSE;
|
||||
goto cleanup;
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
g_warning ("Unrecognized parameter (%s) passed to PNG saver.", *kiter);
|
||||
@@ -1002,15 +947,6 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
if (compression >= 0)
|
||||
png_set_compression_level (png_ptr, compression);
|
||||
|
||||
#if defined(PNG_iCCP_SUPPORTED)
|
||||
/* the proper ICC profile title is encoded in the profile */
|
||||
if (icc_profile != NULL) {
|
||||
png_set_iCCP (png_ptr, info_ptr,
|
||||
"ICC profile", PNG_COMPRESSION_TYPE_BASE,
|
||||
(gchar*) icc_profile, icc_profile_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (has_alpha) {
|
||||
png_set_IHDR (png_ptr, info_ptr, w, h, bpc,
|
||||
PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
|
||||
@@ -1039,16 +975,13 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
|
||||
png_write_end (png_ptr, info_ptr);
|
||||
|
||||
cleanup:
|
||||
if (png_ptr != NULL)
|
||||
png_destroy_write_struct (&png_ptr, &info_ptr);
|
||||
png_destroy_write_struct (&png_ptr, &info_ptr);
|
||||
|
||||
g_free (icc_profile);
|
||||
|
||||
if (text_ptr != NULL) {
|
||||
for (i = 0; i < num_keys; i++)
|
||||
g_free (text_ptr[i].text);
|
||||
g_free (text_ptr);
|
||||
}
|
||||
if (num_keys > 0) {
|
||||
for (i = 0; i < num_keys; i++)
|
||||
g_free (text_ptr[i].text);
|
||||
g_free (text_ptr);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ pnm_read_next_value (PnmIOBuffer *inbuf, gint max_length, guint *value, GError *
|
||||
return PNM_SUSPEND;
|
||||
|
||||
/* get the value */
|
||||
result = strtol ((gchar *)buf, &endptr, 10);
|
||||
result = strtol (buf, &endptr, 10);
|
||||
if (*endptr != '\0' || result < 0 || result > G_MAXUINT) {
|
||||
g_set_error_literal (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
|
||||
@@ -1,608 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "linux" -*- */
|
||||
/* GdkPixbuf library - QTIF image loader
|
||||
*
|
||||
* This module extracts image data from QTIF format and uses
|
||||
* other GDK pixbuf modules to decode the image data.
|
||||
*
|
||||
* Copyright (C) 2008 Kevin Peng
|
||||
*
|
||||
* Authors: Kevin Peng <kevin@zycomtech.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "config.h"
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <setjmp.h>
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixbuf-io.h"
|
||||
|
||||
/***
|
||||
* Definitions
|
||||
*/
|
||||
/* Read buffer size */
|
||||
#define READ_BUFFER_SIZE 8192
|
||||
|
||||
/* Only allow atom of size up to 10MB. */
|
||||
#define ATOM_SIZE_MAX 100000000
|
||||
|
||||
/* Aborts after going to through this many atoms. */
|
||||
#define QTIF_ATOM_COUNT_MAX 10u
|
||||
|
||||
/* QTIF static image data tag "idat". */
|
||||
#define QTIF_TAG_IDATA 0x69646174u
|
||||
|
||||
|
||||
/***
|
||||
* Types
|
||||
*/
|
||||
/* QTIF State */
|
||||
typedef enum {
|
||||
STATE_READY,
|
||||
STATE_DATA,
|
||||
STATE_OTHER
|
||||
} QTIFState;
|
||||
|
||||
/* QTIF Atom Header */
|
||||
typedef struct {
|
||||
guint32 length;
|
||||
guint32 tag;
|
||||
} QtHeader;
|
||||
|
||||
/* QTIF loader context */
|
||||
typedef struct {
|
||||
GdkPixbufLoader *loader;
|
||||
gpointer user_data;
|
||||
QTIFState state;
|
||||
guint32 run_length;
|
||||
gint atom_count;
|
||||
|
||||
guchar header_buffer[sizeof(QtHeader)];
|
||||
|
||||
GdkPixbufModuleSizeFunc size_func;
|
||||
GdkPixbufModulePreparedFunc prepare_func;
|
||||
GdkPixbufModuleUpdatedFunc update_func;
|
||||
gint cb_prepare_count;
|
||||
gint cb_update_count;
|
||||
} QTIFContext;
|
||||
|
||||
/***
|
||||
* Local function prototypes
|
||||
*/
|
||||
static GdkPixbuf *gdk_pixbuf__qtif_image_load (FILE *f, GError **error);
|
||||
static gpointer gdk_pixbuf__qtif_image_begin_load (GdkPixbufModuleSizeFunc size_func,
|
||||
GdkPixbufModulePreparedFunc prepare_func,
|
||||
GdkPixbufModuleUpdatedFunc update_func,
|
||||
gpointer user_data,
|
||||
GError **error);
|
||||
static gboolean gdk_pixbuf__qtif_image_stop_load (gpointer context, GError **error);
|
||||
static gboolean gdk_pixbuf__qtif_image_load_increment(gpointer context,
|
||||
const guchar *buf, guint size,
|
||||
GError **error);
|
||||
static gboolean gdk_pixbuf__qtif_image_create_loader (QTIFContext *context, GError **error);
|
||||
static gboolean gdk_pixbuf__qtif_image_free_loader (QTIFContext *context, GError **error);
|
||||
|
||||
static void gdk_pixbuf__qtif_cb_size_prepared(GdkPixbufLoader *loader,
|
||||
gint width,
|
||||
gint height,
|
||||
gpointer user_data);
|
||||
static void gdk_pixbuf__qtif_cb_area_prepared(GdkPixbufLoader *loader, gpointer user_data);
|
||||
static void gdk_pixbuf__qtif_cb_area_updated(GdkPixbufLoader *loader,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
gpointer user_data);
|
||||
|
||||
/***
|
||||
* Function definitions.
|
||||
*/
|
||||
|
||||
/* Load QTIF from a file handler. */
|
||||
static GdkPixbuf *gdk_pixbuf__qtif_image_load (FILE *f, GError **error)
|
||||
{
|
||||
guint count;
|
||||
|
||||
if(f == NULL)
|
||||
{
|
||||
g_set_error_literal (error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("Input file descriptor is NULL."));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for(count = QTIF_ATOM_COUNT_MAX; count != 0u; count--)
|
||||
{
|
||||
QtHeader hdr;
|
||||
size_t rd;
|
||||
|
||||
/* Read QtHeader. */
|
||||
rd = fread(&hdr, 1, sizeof(QtHeader), f);
|
||||
if(rd != sizeof(QtHeader))
|
||||
{
|
||||
g_set_error_literal(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("Failed to read QTIF header"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hdr.length = GUINT32_FROM_BE(hdr.length) - sizeof(QtHeader);
|
||||
if(hdr.length > ATOM_SIZE_MAX)
|
||||
{
|
||||
g_set_error(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("QTIF atom size too large (%d bytes)"), hdr.length);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch(GUINT32_FROM_BE(hdr.tag))
|
||||
{
|
||||
case QTIF_TAG_IDATA: /* "idat" data atom. */
|
||||
{
|
||||
/* Load image using GdkPixbufLoader. */
|
||||
guchar *buf;
|
||||
GdkPixbufLoader *loader;
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
GError *tmp = NULL;
|
||||
|
||||
/* Allocate read buffer. */
|
||||
buf = g_try_malloc(READ_BUFFER_SIZE);
|
||||
if(buf == NULL)
|
||||
{
|
||||
g_set_error(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
|
||||
_("Failed to allocate %d bytes for file read buffer"), READ_BUFFER_SIZE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Create GdkPixbufLoader. */
|
||||
loader = gdk_pixbuf_loader_new();
|
||||
if(loader == NULL)
|
||||
{
|
||||
g_set_error(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("QTIF atom size too large (%d bytes)"), hdr.length);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* Read atom data. */
|
||||
while(hdr.length != 0u)
|
||||
{
|
||||
rd = (hdr.length > READ_BUFFER_SIZE) ? READ_BUFFER_SIZE : hdr.length;
|
||||
|
||||
rd = fread(buf, 1, rd, f);
|
||||
if(rd < 0)
|
||||
{
|
||||
g_set_error(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("File error when reading QTIF atom: %s"), g_strerror(errno));
|
||||
break;
|
||||
}
|
||||
|
||||
if(!gdk_pixbuf_loader_write(loader, buf, rd, &tmp))
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
break;
|
||||
}
|
||||
hdr.length -= rd;
|
||||
}
|
||||
|
||||
clean_up:
|
||||
/* Release loader */
|
||||
if(loader != NULL)
|
||||
{
|
||||
gdk_pixbuf_loader_close(loader, NULL);
|
||||
pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
|
||||
if(pixbuf != NULL)
|
||||
{
|
||||
g_object_ref(pixbuf);
|
||||
}
|
||||
g_object_unref(loader);
|
||||
}
|
||||
if(buf != NULL)
|
||||
{
|
||||
g_free(buf);
|
||||
}
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
default:
|
||||
/* Skip any other types of atom. */
|
||||
if(!fseek(f, hdr.length, SEEK_CUR))
|
||||
{
|
||||
g_set_error(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("Failed to skip the next %d bytes with seek()."), hdr.length);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Incremental load begin. */
|
||||
static gpointer gdk_pixbuf__qtif_image_begin_load (GdkPixbufModuleSizeFunc size_func,
|
||||
GdkPixbufModulePreparedFunc prepare_func,
|
||||
GdkPixbufModuleUpdatedFunc update_func,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
QTIFContext *context;
|
||||
|
||||
/* Create context struct. */
|
||||
context = g_new0(QTIFContext, 1);
|
||||
if(context == NULL)
|
||||
{
|
||||
g_set_error_literal (error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
|
||||
_("Failed to QTIF context structure."));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Fill context parameters. */
|
||||
context->loader = NULL;
|
||||
context->user_data = user_data;
|
||||
context->state = STATE_READY;
|
||||
context->run_length = 0u;
|
||||
context->atom_count = QTIF_ATOM_COUNT_MAX;
|
||||
context->size_func = size_func;
|
||||
context->prepare_func = prepare_func;
|
||||
context->update_func = update_func;
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
/* Incremental load clean up. */
|
||||
static gboolean gdk_pixbuf__qtif_image_stop_load (gpointer data, GError **error)
|
||||
{
|
||||
QTIFContext *context = (QTIFContext *)data;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
if(context->loader != NULL)
|
||||
{
|
||||
GError *tmp = NULL;
|
||||
|
||||
ret = gdk_pixbuf__qtif_image_free_loader(context, &tmp);
|
||||
if(!ret)
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
}
|
||||
}
|
||||
g_free(context);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Create a new GdkPixbufLoader and connect to its signals. */
|
||||
static gboolean gdk_pixbuf__qtif_image_create_loader (QTIFContext *context, GError **error)
|
||||
{
|
||||
GError *tmp = NULL;
|
||||
|
||||
if(context == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Free existing loader. */
|
||||
if(context->loader != NULL)
|
||||
{
|
||||
gdk_pixbuf__qtif_image_free_loader(context, &tmp);
|
||||
}
|
||||
|
||||
/* Create GdkPixbufLoader object. */
|
||||
context->loader = gdk_pixbuf_loader_new();
|
||||
if(context->loader == NULL)
|
||||
{
|
||||
g_set_error_literal (error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_FAILED,
|
||||
_("Failed to create GdkPixbufLoader object."));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Connect signals. */
|
||||
context->cb_prepare_count = 0;
|
||||
context->cb_update_count = 0;
|
||||
if(context->size_func != NULL)
|
||||
{
|
||||
g_signal_connect(context->loader, "size-prepared",
|
||||
G_CALLBACK(gdk_pixbuf__qtif_cb_size_prepared),
|
||||
context);
|
||||
}
|
||||
if(context->prepare_func != NULL)
|
||||
{
|
||||
g_signal_connect(context->loader, "area-prepared",
|
||||
G_CALLBACK(gdk_pixbuf__qtif_cb_area_prepared),
|
||||
context);
|
||||
}
|
||||
if(context->update_func != NULL)
|
||||
{
|
||||
g_signal_connect(context->loader, "area-updated",
|
||||
G_CALLBACK(gdk_pixbuf__qtif_cb_area_updated),
|
||||
context);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Free the GdkPixbufLoader and perform callback if haven't done so. */
|
||||
static gboolean gdk_pixbuf__qtif_image_free_loader (QTIFContext *context, GError **error)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GError *tmp = NULL;
|
||||
gboolean ret;
|
||||
|
||||
if((context == NULL) || (context->loader == NULL))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Close GdkPixbufLoader. */
|
||||
ret = gdk_pixbuf_loader_close(context->loader, &tmp);
|
||||
if(!ret)
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
}
|
||||
|
||||
|
||||
/* Get GdkPixbuf from GdkPixbufLoader. */
|
||||
pixbuf = gdk_pixbuf_loader_get_pixbuf(context->loader);
|
||||
if(pixbuf != NULL)
|
||||
{
|
||||
g_object_ref(pixbuf);
|
||||
}
|
||||
|
||||
/* Free GdkPixbufLoader. */
|
||||
g_object_ref(context->loader);
|
||||
context->loader = NULL;
|
||||
|
||||
if(pixbuf != NULL)
|
||||
{
|
||||
/* Callback functions should be called for at least once. */
|
||||
if((context->prepare_func != NULL) && (context->cb_prepare_count == 0))
|
||||
{
|
||||
(context->prepare_func)(pixbuf, NULL, context->user_data);
|
||||
}
|
||||
|
||||
if((context->update_func != NULL) && (context->cb_update_count == 0))
|
||||
{
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
width = gdk_pixbuf_get_width(pixbuf);
|
||||
height = gdk_pixbuf_get_height(pixbuf);
|
||||
(context->update_func)(pixbuf, 0, 0, width, height, context->user_data);
|
||||
}
|
||||
|
||||
/* Free GdkPixbuf (callback function should ref it). */
|
||||
g_object_ref(pixbuf);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Incrementally load the next chunk of data. */
|
||||
static gboolean gdk_pixbuf__qtif_image_load_increment (gpointer data,
|
||||
const guchar *buf, guint size,
|
||||
GError **error)
|
||||
{
|
||||
QTIFContext *context = (QTIFContext *)data;
|
||||
GError *tmp = NULL;
|
||||
gboolean ret = TRUE; /* Return TRUE for insufficient data. */
|
||||
|
||||
while(ret && (size != 0u))
|
||||
{
|
||||
switch(context->state)
|
||||
{
|
||||
case STATE_READY:
|
||||
/* Abort if we have seen too mant atoms. */
|
||||
if(context->atom_count == 0u)
|
||||
{
|
||||
g_set_error_literal (error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("Failed to find an image data atom."));
|
||||
return FALSE;
|
||||
}
|
||||
context->atom_count--;
|
||||
|
||||
/* Copy to header buffer in context, in case supplied data is not enough. */
|
||||
while(context->run_length < sizeof(QtHeader))
|
||||
{
|
||||
context->header_buffer[context->run_length] = *buf;
|
||||
context->run_length++;
|
||||
buf++;
|
||||
size--;
|
||||
}
|
||||
|
||||
/* Parse buffer as QT header. */
|
||||
if(context->run_length == sizeof(QtHeader))
|
||||
{
|
||||
QtHeader *hdr = (QtHeader *)context->header_buffer;
|
||||
context->run_length = GUINT32_FROM_BE(hdr->length) - sizeof(QtHeader);
|
||||
|
||||
/* Atom max size check. */
|
||||
if(context->run_length > ATOM_SIZE_MAX)
|
||||
{
|
||||
g_set_error(error, GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("QTIF atom size too large (%d bytes)"), hdr->length);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Set state according to atom type. */
|
||||
if(GUINT32_FROM_BE(hdr->tag) == QTIF_TAG_IDATA)
|
||||
{
|
||||
GError *tmp = NULL;
|
||||
|
||||
context->state = STATE_DATA;
|
||||
|
||||
/* Create GdkPixbufLoader for this image data. */
|
||||
ret = gdk_pixbuf__qtif_image_create_loader(context, &tmp);
|
||||
if(!ret)
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context->state = STATE_OTHER;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default: /* Both STATE_DATA and STATE_OTHER will come here. */
|
||||
/* Check for atom boundary. */
|
||||
if(context->run_length > size)
|
||||
{
|
||||
/* Supply image data to GdkPixbufLoader if in STATE_DATA. */
|
||||
if(context->state == STATE_DATA)
|
||||
{
|
||||
tmp = NULL;
|
||||
ret = gdk_pixbuf_loader_write(context->loader, buf, size, &tmp);
|
||||
if(!ret && (error != NULL) && (*error == NULL))
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
}
|
||||
}
|
||||
context->run_length -= size;
|
||||
size = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Supply image data to GdkPixbufLoader if in STATE_DATA. */
|
||||
if(context->state == STATE_DATA)
|
||||
{
|
||||
gboolean r;
|
||||
|
||||
/* Here we should have concluded a complete image atom. */
|
||||
tmp = NULL;
|
||||
ret = gdk_pixbuf_loader_write(context->loader, buf, context->run_length, &tmp);
|
||||
if(!ret && (error != NULL) && (*error == NULL))
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
}
|
||||
|
||||
/* Free GdkPixbufLoader and handle callback. */
|
||||
tmp = NULL;
|
||||
r = gdk_pixbuf__qtif_image_free_loader(context, &tmp);
|
||||
if(!r)
|
||||
{
|
||||
if((error != NULL) && (*error == NULL))
|
||||
{
|
||||
g_propagate_error (error, tmp);
|
||||
}
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
buf = &buf[context->run_length];
|
||||
size -= context->run_length;
|
||||
context->run_length = 0u;
|
||||
context->state = STATE_READY;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Event handlers */
|
||||
static void gdk_pixbuf__qtif_cb_size_prepared(GdkPixbufLoader *loader,
|
||||
gint width,
|
||||
gint height,
|
||||
gpointer user_data)
|
||||
{
|
||||
QTIFContext *context = (QTIFContext *)user_data;
|
||||
if((context != NULL) && (context->size_func != NULL))
|
||||
{
|
||||
(context->size_func)(&width, &height, context->user_data);
|
||||
context->cb_prepare_count++;
|
||||
}
|
||||
}
|
||||
|
||||
static void gdk_pixbuf__qtif_cb_area_prepared(GdkPixbufLoader *loader, gpointer user_data)
|
||||
{
|
||||
QTIFContext *context = (QTIFContext *)user_data;
|
||||
if((loader != NULL) && (context != NULL) && (context->prepare_func != NULL))
|
||||
{
|
||||
GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf(context->loader);
|
||||
(context->prepare_func)(pixbuf, NULL, context->user_data);
|
||||
context->cb_update_count++;
|
||||
}
|
||||
}
|
||||
|
||||
static void gdk_pixbuf__qtif_cb_area_updated(GdkPixbufLoader *loader,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
gpointer user_data)
|
||||
{
|
||||
QTIFContext *context = (QTIFContext *)user_data;
|
||||
if((loader != NULL) && (context != NULL) && (context->update_func != NULL))
|
||||
{
|
||||
GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf(context->loader);
|
||||
(context->update_func)(pixbuf, x, y, width, height, context->user_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef INCLUDE_qtif
|
||||
#define MODULE_ENTRY(function) G_MODULE_EXPORT void function
|
||||
#else
|
||||
#define MODULE_ENTRY(function) void _gdk_pixbuf__qtif_ ## function
|
||||
#endif
|
||||
|
||||
MODULE_ENTRY (fill_vtable) (GdkPixbufModule *module)
|
||||
{
|
||||
module->load = gdk_pixbuf__qtif_image_load;
|
||||
module->begin_load = gdk_pixbuf__qtif_image_begin_load;
|
||||
module->stop_load = gdk_pixbuf__qtif_image_stop_load;
|
||||
module->load_increment = gdk_pixbuf__qtif_image_load_increment;
|
||||
}
|
||||
|
||||
MODULE_ENTRY (fill_info) (GdkPixbufFormat *info)
|
||||
{
|
||||
static GdkPixbufModulePattern signature[] = {
|
||||
{ "abcdidsc", "xxxx ", 100 },
|
||||
{ "abcdidat", "xxxx ", 100 },
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
static gchar * mime_types[] = {
|
||||
"image/x-quicktime",
|
||||
"image/qtif",
|
||||
NULL
|
||||
};
|
||||
static gchar * extensions[] = {
|
||||
"qtif",
|
||||
"qif",
|
||||
NULL
|
||||
};
|
||||
|
||||
info->name = "qtif";
|
||||
info->signature = signature;
|
||||
info->description = N_("The QTIF image format");
|
||||
info->mime_types = mime_types;
|
||||
info->extensions = extensions;
|
||||
info->flags = GDK_PIXBUF_FORMAT_THREADSAFE;
|
||||
info->license = "LGPL";
|
||||
}
|
||||
|
||||
+13
-67
@@ -149,11 +149,6 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
|
||||
GdkPixbuf *pixbuf;
|
||||
uint16 orientation = 0;
|
||||
uint16 transform = 0;
|
||||
uint16 codec;
|
||||
gchar *icc_profile_base64;
|
||||
const gchar *icc_profile;
|
||||
guint icc_profile_size;
|
||||
gint retval;
|
||||
|
||||
/* We're called with the lock held. */
|
||||
|
||||
@@ -271,21 +266,6 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
|
||||
gdk_pixbuf_set_option (pixbuf, "orientation", str);
|
||||
}
|
||||
|
||||
TIFFGetField (tiff, TIFFTAG_COMPRESSION, &codec);
|
||||
if (codec > 0) {
|
||||
gchar str[5];
|
||||
g_snprintf (str, sizeof (str), "%d", codec);
|
||||
gdk_pixbuf_set_option (pixbuf, "compression", str);
|
||||
}
|
||||
|
||||
/* Extract embedded ICC profile */
|
||||
retval = TIFFGetField (tiff, TIFFTAG_ICCPROFILE, &icc_profile_size, &icc_profile);
|
||||
if (retval == 1) {
|
||||
icc_profile_base64 = g_base64_encode ((const guchar *) icc_profile, icc_profile_size);
|
||||
gdk_pixbuf_set_option (pixbuf, "icc-profile", icc_profile_base64);
|
||||
g_free (icc_profile_base64);
|
||||
}
|
||||
|
||||
if (context && context->prepare_func)
|
||||
(* context->prepare_func) (pixbuf, NULL, context->user_data);
|
||||
|
||||
@@ -674,8 +654,6 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
int y;
|
||||
TiffSaveContext *context;
|
||||
gboolean retval;
|
||||
guchar *icc_profile = NULL;
|
||||
gsize icc_profile_size = 0;
|
||||
|
||||
tiff_push_handlers ();
|
||||
|
||||
@@ -711,40 +689,6 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
TIFFSetField (tiff, TIFFTAG_SAMPLESPERPIXEL, has_alpha ? 4 : 3);
|
||||
TIFFSetField (tiff, TIFFTAG_ROWSPERSTRIP, height);
|
||||
|
||||
/* libtiff supports a number of 'codecs' such as:
|
||||
1 None, 2 Huffman, 5 LZW, 7 JPEG, 8 Deflate, see tiff.h */
|
||||
if (keys && *keys && values && *values) {
|
||||
guint i = 0;
|
||||
|
||||
while (keys[i]) {
|
||||
if (g_str_equal (keys[i], "compression")) {
|
||||
guint16 codec = strtol (values[i], NULL, 0);
|
||||
if (TIFFIsCODECConfigured (codec))
|
||||
TIFFSetField (tiff, TIFFTAG_COMPRESSION, codec);
|
||||
else {
|
||||
tiff_set_error (error,
|
||||
GDK_PIXBUF_ERROR_FAILED,
|
||||
_("TIFF compression doesn't refer to a valid codec."));
|
||||
retval = FALSE;
|
||||
goto cleanup;
|
||||
}
|
||||
} else if (g_str_equal (keys[i], "icc-profile")) {
|
||||
/* decode from base64 */
|
||||
icc_profile = g_base64_decode (values[i], &icc_profile_size);
|
||||
if (icc_profile_size < 127) {
|
||||
g_set_error (error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_BAD_OPTION,
|
||||
_("Color profile has invalid length '%d'."),
|
||||
icc_profile_size);
|
||||
retval = FALSE;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_alpha)
|
||||
TIFFSetField (tiff, TIFFTAG_EXTRASAMPLES, 1, alpha_samples);
|
||||
|
||||
@@ -752,9 +696,6 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
TIFFSetField (tiff, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
|
||||
TIFFSetField (tiff, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
|
||||
|
||||
if (icc_profile != NULL)
|
||||
TIFFSetField (tiff, TIFFTAG_ICCPROFILE, icc_profile_size, icc_profile);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
if (TIFFWriteScanline (tiff, pixels + y * rowstride, y, 0) == -1 ||
|
||||
global_error)
|
||||
@@ -767,8 +708,11 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
_("Failed to write TIFF data"));
|
||||
|
||||
TIFFClose (tiff);
|
||||
retval = FALSE;
|
||||
goto cleanup;
|
||||
|
||||
free_save_context (context);
|
||||
tiff_pop_handlers ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TIFFClose (tiff);
|
||||
@@ -776,18 +720,20 @@ gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func,
|
||||
tiff_set_error (error,
|
||||
GDK_PIXBUF_ERROR_FAILED,
|
||||
_("TIFFClose operation failed"));
|
||||
retval = FALSE;
|
||||
goto cleanup;
|
||||
|
||||
free_save_context (context);
|
||||
tiff_pop_handlers ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
tiff_pop_handlers ();
|
||||
|
||||
/* Now call the callback */
|
||||
retval = save_func (context->buffer, context->used, error, user_data);
|
||||
|
||||
cleanup:
|
||||
g_free (icc_profile);
|
||||
tiff_pop_handlers ();
|
||||
free_save_context (context);
|
||||
free_save_context (context);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
+5
-42
@@ -1,19 +1,9 @@
|
||||
## Makefile.am for gtk+/gdk
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
include $(INTROSPECTION_MAKEFILE)
|
||||
INTROSPECTION_GIRS =
|
||||
INTROSPECTION_SCANNER_ARGS = \
|
||||
--add-include-path=../gdk-pixbuf
|
||||
INTROSPECTION_COMPILER_ARGS = \
|
||||
--includedir=$(srcdir) \
|
||||
--includedir=. \
|
||||
--includedir=../gdk-pixbuf
|
||||
|
||||
SUBDIRS = $(gdktarget) . tests
|
||||
DIST_SUBDIRS = win32 x11 quartz directfb tests
|
||||
|
||||
CLEANFILES =
|
||||
|
||||
EXTRA_DIST += \
|
||||
keynames.txt \
|
||||
keyname-table.h \
|
||||
@@ -110,12 +100,6 @@ gdk_built_public_sources = \
|
||||
gdk_built_private_headers = \
|
||||
gdkalias.h
|
||||
|
||||
gdk_private_headers = \
|
||||
gdkinternals.h \
|
||||
gdkintl.h \
|
||||
gdkpoly-generic.h \
|
||||
gdkregion-generic.h
|
||||
|
||||
gdk_c_sources = \
|
||||
$(medialib_sources) \
|
||||
gdk.c \
|
||||
@@ -132,6 +116,8 @@ gdk_c_sources = \
|
||||
gdkgc.c \
|
||||
gdkglobals.c \
|
||||
gdkimage.c \
|
||||
gdkinternals.h \
|
||||
gdkintl.h \
|
||||
gdkkeys.c \
|
||||
gdkkeyuni.c \
|
||||
gdkoffscreenwindow.c \
|
||||
@@ -139,9 +125,11 @@ gdk_c_sources = \
|
||||
gdkpixbuf-drawable.c \
|
||||
gdkpixbuf-render.c \
|
||||
gdkpixmap.c \
|
||||
gdkpoly-generic.h \
|
||||
gdkpolyreg-generic.c \
|
||||
gdkrectangle.c \
|
||||
gdkregion-generic.c \
|
||||
gdkregion-generic.h \
|
||||
gdkrgb.c \
|
||||
gdkscreen.c \
|
||||
gdkselection.c \
|
||||
@@ -165,8 +153,7 @@ gdkincludedir = $(includedir)/gtk-2.0/gdk
|
||||
gdkinclude_HEADERS = $(gdk_public_h_sources) $(gdk_built_public_sources)
|
||||
|
||||
common_sources = \
|
||||
$(gdk_private_headers) \
|
||||
$(gdk_c_sources) \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkmarshalers.c \
|
||||
gdkmarshalers.h
|
||||
@@ -192,30 +179,6 @@ libgdk_win32_2_0_la_LIBADD = win32/libgdk-win32.la $(GDK_DEP_LIBS) \
|
||||
libgdk_win32_2_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
|
||||
libgdk_win32_2_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def $(LDADD)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
introspection_files = \
|
||||
$(gdk_public_h_sources) \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkenumtypes.h
|
||||
|
||||
Gdk_2_0_gir_SCANNERFLAGS = --strip-prefix=Gdk --add-include-path=../gdk-pixbuf
|
||||
Gdk_2_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0
|
||||
Gdk_2_0_gir_LIBS = $(gdktargetlib)
|
||||
Gdk_2_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_files))
|
||||
Gdk_2_0_gir_CFLAGS = $(INCLUDES)
|
||||
INTROSPECTION_GIRS += Gdk-2.0.gir
|
||||
|
||||
girdir = $(INTROSPECTION_GIRDIR)
|
||||
dist_gir_DATA = $(INTROSPECTION_GIRS)
|
||||
|
||||
typelibsdir = $(INTROSPECTION_TYPELIBDIR)
|
||||
typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
|
||||
|
||||
CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA)
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
install-def-file: gdk.def
|
||||
$(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-2.0.def
|
||||
|
||||
@@ -73,7 +73,7 @@ gdk_colormap_get_type (void)
|
||||
static GType object_type = 0;
|
||||
|
||||
if (!object_type) {
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkColormapClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
|
||||
@@ -140,7 +140,7 @@ gdk_display_dfb_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkDisplayDFBClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
|
||||
@@ -123,7 +123,7 @@ gdk_drag_context_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkDragContextClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
@@ -235,7 +235,7 @@ local_send_enter (GdkDragContext *context,
|
||||
|
||||
if (current_dest_drag != NULL)
|
||||
{
|
||||
g_object_unref (current_dest_drag);
|
||||
gdk_drag_context_unref (current_dest_drag);
|
||||
current_dest_drag = NULL;
|
||||
}
|
||||
|
||||
@@ -627,7 +627,7 @@ gdk_drop_finish (GdkDragContext *context,
|
||||
context->dest_window);
|
||||
if (src_context)
|
||||
{
|
||||
g_object_ref (src_context);
|
||||
gdk_drag_context_ref (src_context);
|
||||
|
||||
event.dnd.type = GDK_DROP_FINISHED;
|
||||
event.dnd.window = src_context->source_window;
|
||||
|
||||
@@ -160,7 +160,7 @@ gdk_directfb_set_colormap (GdkDrawable *drawable,
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p ) <- old %p\n", G_STRFUNC, drawable, colormap, impl->colormap );
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p ) <- old %p\n", __FUNCTION__, drawable, colormap, impl->colormap );
|
||||
|
||||
if (impl->colormap == colormap)
|
||||
return;
|
||||
@@ -235,7 +235,7 @@ gdk_directfb_clip_region (GdkDrawable *drawable,
|
||||
g_return_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable));
|
||||
g_return_if_fail (ret_clip != NULL);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_DrawClip, "%s( %p, %p, %p )\n", G_STRFUNC, drawable, gc, draw_rect );
|
||||
D_DEBUG_AT( GDKDFB_DrawClip, "%s( %p, %p, %p )\n", __FUNCTION__, drawable, gc, draw_rect );
|
||||
|
||||
private = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
|
||||
@@ -435,7 +435,7 @@ gdk_directfb_draw_rectangle (GdkDrawable *drawable,
|
||||
|
||||
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %s, %4d,%4d - %4dx%4d )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %s, %4d,%4d - %4dx%4d )\n", __FUNCTION__,
|
||||
drawable, gc, filled ? " filled" : "outline", x, y, width, height );
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
@@ -593,7 +593,7 @@ gdk_directfb_draw_polygon (GdkDrawable *drawable,
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %s, %p, %d )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %s, %p, %d )\n", __FUNCTION__,
|
||||
drawable, gc, filled ? " filled" : "outline", points, npoints );
|
||||
|
||||
if (npoints < 3)
|
||||
@@ -704,7 +704,7 @@ gdk_directfb_draw_drawable (GdkDrawable *drawable,
|
||||
DFBRectangle rect = { xsrc, ysrc, width, height };
|
||||
gint i;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %4d,%4d -> %4d,%4d - %dx%d )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %4d,%4d -> %4d,%4d - %dx%d )\n", __FUNCTION__,
|
||||
drawable, gc, src, xsrc, ysrc, xdest, ydest, width, height );
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
@@ -749,7 +749,7 @@ gdk_directfb_draw_points (GdkDrawable *drawable,
|
||||
|
||||
DFBRegion region = { points->x, points->y, points->x, points->y };
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", G_STRFUNC, drawable, gc, points, npoints );
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", __FUNCTION__, drawable, gc, points, npoints );
|
||||
|
||||
if (npoints < 1)
|
||||
return;
|
||||
@@ -798,7 +798,7 @@ gdk_directfb_draw_segments (GdkDrawable *drawable,
|
||||
|
||||
// DFBRegion region = { segs->x1, segs->y1, segs->x2, segs->y2 };
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", G_STRFUNC, drawable, gc, segs, nsegs );
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", __FUNCTION__, drawable, gc, segs, nsegs );
|
||||
|
||||
if (nsegs < 1)
|
||||
return;
|
||||
@@ -878,7 +878,7 @@ gdk_directfb_draw_lines (GdkDrawable *drawable,
|
||||
|
||||
DFBRegion region = { points->x, points->y, points->x, points->y };
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", G_STRFUNC, drawable, gc, points, npoints );
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", __FUNCTION__, drawable, gc, points, npoints );
|
||||
|
||||
if (npoints < 2)
|
||||
return;
|
||||
@@ -953,7 +953,7 @@ gdk_directfb_draw_image (GdkDrawable *drawable,
|
||||
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
|
||||
g_return_if_fail (image != NULL);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %4d,%4d -> %4d,%4d - %dx%d )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %4d,%4d -> %4d,%4d - %dx%d )\n", __FUNCTION__,
|
||||
drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height );
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
@@ -1202,7 +1202,7 @@ gdk_directfb_draw_pixbuf (GdkDrawable *drawable,
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %4d,%4d -> %4d,%4d - %dx%d )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %4d,%4d -> %4d,%4d - %dx%d )\n", __FUNCTION__,
|
||||
drawable, gc, pixbuf, src_x, src_y, dest_x, dest_y, width, height );
|
||||
|
||||
/* Clip to the drawable; this is required for get_from_drawable() so
|
||||
@@ -1494,7 +1494,7 @@ gdk_drawable_impl_directfb_finalize (GObject *object)
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (object);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p ) <- %dx%d (%s at %4d,%4d)\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p ) <- %dx%d (%s at %4d,%4d)\n", __FUNCTION__,
|
||||
object, impl->width, impl->height,
|
||||
drawable_impl_type_name( object ),
|
||||
impl->abs_x, impl->abs_y );
|
||||
@@ -1568,7 +1568,7 @@ gdk_drawable_impl_directfb_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkDrawableImplDirectFBClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
|
||||
@@ -184,8 +184,6 @@ dfb_events_dispatch (void)
|
||||
GdkDisplay *display = gdk_display_get_default ();
|
||||
GdkEvent *event;
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
while ((event = _gdk_event_unqueue (display)) != NULL)
|
||||
{
|
||||
if (_gdk_event_func)
|
||||
@@ -193,8 +191,6 @@ dfb_events_dispatch (void)
|
||||
|
||||
gdk_event_free (event);
|
||||
}
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -213,7 +209,7 @@ dfb_events_io_func (GIOChannel *channel,
|
||||
|
||||
if (result == G_IO_STATUS_ERROR)
|
||||
{
|
||||
g_warning ("%s: GIOError occured", G_STRFUNC);
|
||||
g_warning ("%s: GIOError occured", __FUNCTION__);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ gdk_gc_directfb_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkGCDirectFBClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
|
||||
@@ -58,7 +58,7 @@ gdk_image_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkImageClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
@@ -151,7 +151,7 @@ gdk_image_new_bitmap (GdkVisual *visual,
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_image_new_bitmap: %dx%d\n", w, h));
|
||||
|
||||
g_message ("not fully implemented %s", G_STRFUNC);
|
||||
g_message ("not fully implemented %s", __FUNCTION__);
|
||||
|
||||
image->bpl = (w + 7) / 8;
|
||||
image->mem = g_malloc (image->bpl * h);
|
||||
@@ -209,7 +209,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
|
||||
format = DSPF_ARGB;
|
||||
break;
|
||||
default:
|
||||
g_message ("unimplemented %s for depth %d", G_STRFUNC, depth);
|
||||
g_message ("unimplemented %s for depth %d", __FUNCTION__, depth);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ gdk_device_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkDeviceClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
@@ -228,7 +228,7 @@ gboolean
|
||||
gdk_device_set_mode (GdkDevice *device,
|
||||
GdkInputMode mode)
|
||||
{
|
||||
g_message ("unimplemented %s", G_STRFUNC);
|
||||
g_message ("unimplemented %s", __FUNCTION__);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -303,7 +303,7 @@ gdk_input_set_extension_events (GdkWindow *window,
|
||||
gint mask,
|
||||
GdkExtensionMode mode)
|
||||
{
|
||||
g_message ("unimplemented %s", G_STRFUNC);
|
||||
g_message ("unimplemented %s", __FUNCTION__);
|
||||
}
|
||||
|
||||
GList *
|
||||
|
||||
@@ -61,7 +61,7 @@ gdk_pixmap_impl_directfb_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkPixmapImplDirectFBClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
@@ -170,7 +170,7 @@ _gdk_pixmap_new (GdkDrawable *drawable,
|
||||
format = DSPF_RGB32;
|
||||
break;
|
||||
default:
|
||||
g_message ("unimplemented %s for depth %d", G_STRFUNC, depth);
|
||||
g_message ("unimplemented %s for depth %d", __FUNCTION__, depth);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,14 +86,6 @@ gdk_screen_get_n_monitors (GdkScreen *screen)
|
||||
return 1;
|
||||
}
|
||||
|
||||
gint
|
||||
gdk_screen_get_primary_monitor (GdkScreen *screen)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_screen_get_monitor_geometry (GdkScreen *screen,
|
||||
gint num_monitor,
|
||||
|
||||
@@ -88,7 +88,7 @@ gdk_visual_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkVisualClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
|
||||
@@ -92,7 +92,7 @@ gdk_window_impl_directfb_get_type (void)
|
||||
|
||||
if (!object_type)
|
||||
{
|
||||
const GTypeInfo object_info =
|
||||
static const GTypeInfo object_info =
|
||||
{
|
||||
sizeof (GdkWindowImplDirectFBClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
@@ -105,14 +105,14 @@ gdk_window_impl_directfb_get_type (void)
|
||||
(GInstanceInitFunc) gdk_window_impl_directfb_init,
|
||||
};
|
||||
|
||||
const GInterfaceInfo paintable_info =
|
||||
static const GInterfaceInfo paintable_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gdk_window_impl_directfb_paintable_init,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
const GInterfaceInfo window_impl_info =
|
||||
static const GInterfaceInfo window_impl_info =
|
||||
{
|
||||
(GInterfaceInitFunc) gdk_window_impl_iface_init,
|
||||
NULL,
|
||||
@@ -185,7 +185,7 @@ gdk_window_impl_directfb_finalize (GObject *object)
|
||||
{
|
||||
GdkWindowImplDirectFB *impl = GDK_WINDOW_IMPL_DIRECTFB (object);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p ) <- %dx%d\n", G_STRFUNC, impl, impl->drawable.width, impl->drawable.height );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p ) <- %dx%d\n", __FUNCTION__, impl, impl->drawable.width, impl->drawable.height );
|
||||
|
||||
if (GDK_WINDOW_IS_MAPPED (impl->drawable.wrapper))
|
||||
gdk_window_hide (impl->drawable.wrapper);
|
||||
@@ -216,7 +216,7 @@ gdk_window_impl_directfb_get_visible_region (GdkDrawable *drawable)
|
||||
GdkRectangle rect = { 0, 0, 0, 0 };
|
||||
DFBRectangle drect = { 0, 0, 0, 0 };
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, drawable );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, drawable );
|
||||
|
||||
if (priv->surface)
|
||||
priv->surface->GetVisibleRectangle (priv->surface, &drect);
|
||||
@@ -259,7 +259,7 @@ create_directfb_window (GdkWindowImplDirectFB *impl,
|
||||
DFBResult ret;
|
||||
IDirectFBWindow *window;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %4dx%4d, caps 0x%08x )\n", G_STRFUNC, desc->width, desc->height, desc->caps );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %4dx%4d, caps 0x%08x )\n", __FUNCTION__, desc->width, desc->height, desc->caps );
|
||||
|
||||
ret = _gdk_display->layer->CreateWindow (_gdk_display->layer, desc, &window);
|
||||
|
||||
@@ -370,7 +370,7 @@ gdk_directfb_window_new (GdkWindow *parent,
|
||||
|
||||
g_return_val_if_fail (attributes != NULL, NULL);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, parent );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, parent );
|
||||
|
||||
if (!parent || attributes->window_type != GDK_WINDOW_CHILD)
|
||||
parent = _gdk_parent_root;
|
||||
@@ -747,7 +747,7 @@ gdk_directfb_window_destroy (GdkWindow *window,
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %srecursing, %sforeign )\n", G_STRFUNC, window,
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %srecursing, %sforeign )\n", __FUNCTION__, window,
|
||||
recursing ? "" : "not ", foreign_destroy ? "" : "no " );
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
@@ -789,7 +789,7 @@ gdk_window_destroy_notify (GdkWindow *window)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
{
|
||||
@@ -838,7 +838,7 @@ gdk_directfb_change_focus (GdkWindow *new_focus_window)
|
||||
GdkWindow *new_win;
|
||||
GdkWindow *event_win;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, new_focus_window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, new_focus_window );
|
||||
|
||||
/* No focus changes while the pointer is grabbed */
|
||||
if (_gdk_directfb_pointer_grab_window)
|
||||
@@ -914,7 +914,7 @@ gdk_directfb_window_raise (GdkWindow *window)
|
||||
{
|
||||
GdkWindowObject *parent;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
parent = GDK_WINDOW_OBJECT (window)->parent;
|
||||
|
||||
@@ -932,7 +932,7 @@ gdk_directfb_window_lower (GdkWindow *window)
|
||||
{
|
||||
GdkWindowObject *parent;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
parent = GDK_WINDOW_OBJECT (window)->parent;
|
||||
|
||||
@@ -963,7 +963,7 @@ send_map_events (GdkWindowObject *private)
|
||||
if (!GDK_WINDOW_IS_MAPPED (private))
|
||||
return;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, private );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, private );
|
||||
|
||||
event_win = gdk_directfb_other_event_window ((GdkWindow *) private, GDK_MAP);
|
||||
if (event_win)
|
||||
@@ -1006,7 +1006,7 @@ gdk_directfb_window_send_crossing_events (GdkWindow *src,
|
||||
GdkWindow *b;
|
||||
GdkWindow *event_win;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Crossing, "%s( %p -> %p, %d )\n", G_STRFUNC, src, dest, mode );
|
||||
D_DEBUG_AT( GDKDFB_Crossing, "%s( %p -> %p, %d )\n", __FUNCTION__, src, dest, mode );
|
||||
|
||||
/* Do a possible cursor change before checking if we need to
|
||||
generate crossing events so cursor changes due to pointer
|
||||
@@ -1259,7 +1259,7 @@ show_window_internal (GdkWindow *window,
|
||||
GdkWindowImplDirectFB *impl;
|
||||
GdkWindow *mousewin;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %sraise )\n", G_STRFUNC, window, raise ? "" : "no " );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %sraise )\n", __FUNCTION__, window, raise ? "" : "no " );
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
@@ -1303,7 +1303,7 @@ gdk_directfb_window_show (GdkWindow *window,
|
||||
{
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
show_window_internal (window, raise);
|
||||
}
|
||||
@@ -1318,7 +1318,7 @@ gdk_directfb_window_hide (GdkWindow *window)
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
|
||||
@@ -1522,14 +1522,13 @@ gdk_directfb_window_move_resize (GdkWindow *window,
|
||||
}
|
||||
else if (impl->window)
|
||||
{
|
||||
if (with_move) {
|
||||
private->x = x;
|
||||
private->y = y;
|
||||
impl->window->MoveTo (impl->window, x, y);
|
||||
}
|
||||
private->x = x;
|
||||
private->y = y;
|
||||
impl->drawable.width = width;
|
||||
impl->drawable.height = height;
|
||||
|
||||
if (with_move)
|
||||
impl->window->MoveTo (impl->window, x, y);
|
||||
impl->window->Resize (impl->window, width, height);
|
||||
}
|
||||
else
|
||||
@@ -1671,7 +1670,7 @@ gdk_window_directfb_raise (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@@ -1702,7 +1701,7 @@ gdk_window_directfb_lower (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplDirectFB *impl;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@@ -1743,7 +1742,7 @@ gdk_window_set_hints (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %3d,%3d, min %4dx%4d, max %4dx%4d, flags 0x%08x )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %3d,%3d, min %4dx%4d, max %4dx%4d, flags 0x%08x )\n", __FUNCTION__,
|
||||
window, x,y, min_width, min_height, max_width, max_height, flags );
|
||||
/* N/A */
|
||||
}
|
||||
@@ -1770,9 +1769,9 @@ gdk_window_set_title (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, '%s' )\n", G_STRFUNC, window, title );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, '%s' )\n", __FUNCTION__, window, title );
|
||||
/* N/A */
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, window );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1840,7 +1839,7 @@ gdk_directfb_window_set_background (GdkWindow *window,
|
||||
|
||||
g_return_if_fail (color != NULL);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %d,%d,%d )\n", G_STRFUNC, window, color->red, color->green, color->blue );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %d,%d,%d )\n", __FUNCTION__, window, color->red, color->green, color->blue );
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
private->bg_color = *color;
|
||||
@@ -1861,7 +1860,7 @@ gdk_directfb_window_set_back_pixmap (GdkWindow *window,
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %p )\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p, %p )\n", __FUNCTION__,
|
||||
window, pixmap);
|
||||
|
||||
private = GDK_WINDOW_OBJECT (window);
|
||||
@@ -1989,7 +1988,7 @@ _gdk_directfb_calc_abs (GdkWindow *window)
|
||||
impl->abs_y += parent_impl->abs_y;
|
||||
}
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p ) -> %4d,%4d\n", G_STRFUNC, window, impl->abs_x, impl->abs_y );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p ) -> %4d,%4d\n", __FUNCTION__, window, impl->abs_x, impl->abs_y );
|
||||
|
||||
for (list = private->children; list; list = list->next)
|
||||
{
|
||||
@@ -2078,8 +2077,7 @@ GdkWindow *
|
||||
_gdk_windowing_window_at_pointer (GdkDisplay *display,
|
||||
gint *win_x,
|
||||
gint *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkWindow *retval;
|
||||
gint wx, wy;
|
||||
@@ -2139,8 +2137,7 @@ _gdk_windowing_get_pointer (GdkDisplay *display,
|
||||
gdk_directfb_window_get_pointer (_gdk_windowing_window_at_pointer (display,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE),
|
||||
NULL),
|
||||
x, y, mask);
|
||||
}
|
||||
|
||||
@@ -2503,7 +2500,7 @@ gdk_window_set_functions (GdkWindow *window,
|
||||
return;
|
||||
|
||||
/* N/A */
|
||||
g_message("unimplemented %s", G_STRFUNC);
|
||||
g_message("unimplemented %s", __FUNCTION__);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -2516,7 +2513,7 @@ gdk_directfb_window_set_static_gravities (GdkWindow *window,
|
||||
return FALSE;
|
||||
|
||||
/* N/A */
|
||||
g_message("unimplemented %s", G_STRFUNC);
|
||||
g_message("unimplemented %s", __FUNCTION__);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2534,7 +2531,7 @@ gdk_window_begin_resize_drag (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
g_message("unimplemented %s", G_STRFUNC);
|
||||
g_message("unimplemented %s", __FUNCTION__);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2549,7 +2546,7 @@ gdk_window_begin_move_drag (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
g_message("unimplemented %s", G_STRFUNC);
|
||||
g_message("unimplemented %s", __FUNCTION__);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2864,7 +2861,7 @@ gdk_window_impl_directfb_begin_paint_region (GdkPaintable *paintable,
|
||||
if (!region)
|
||||
return;
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p ) <- %4d,%4d-%4d,%4d (%ld boxes)\n", G_STRFUNC,
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p ) <- %4d,%4d-%4d,%4d (%ld boxes)\n", __FUNCTION__,
|
||||
paintable, GDKDFB_RECTANGLE_VALS_FROM_BOX(®ion->extents), region->numRects );
|
||||
|
||||
/* When it's buffered... */
|
||||
@@ -2927,7 +2924,7 @@ gdk_window_impl_directfb_end_paint (GdkPaintable *paintable)
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (paintable);
|
||||
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", G_STRFUNC, paintable );
|
||||
D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, paintable );
|
||||
|
||||
g_return_if_fail (impl->paint_depth > 0);
|
||||
|
||||
|
||||
@@ -338,10 +338,9 @@ gdk_display_open_default_libgtk_only (void)
|
||||
return display;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_init_check:
|
||||
* @argc: (inout):
|
||||
* @argv: (array length=argc) (inout):
|
||||
/*
|
||||
*--------------------------------------------------------------
|
||||
* gdk_init_check
|
||||
*
|
||||
* Initialize the library for use.
|
||||
*
|
||||
@@ -360,6 +359,7 @@ gdk_display_open_default_libgtk_only (void)
|
||||
*
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
|
||||
gboolean
|
||||
gdk_init_check (int *argc,
|
||||
char ***argv)
|
||||
@@ -369,12 +369,6 @@ gdk_init_check (int *argc,
|
||||
return gdk_display_open_default_libgtk_only () != NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gdk_init:
|
||||
* @argc: (inout):
|
||||
* @argv: (array length=argc) (inout):
|
||||
*/
|
||||
void
|
||||
gdk_init (int *argc, char ***argv)
|
||||
{
|
||||
|
||||
+1
-3
@@ -852,7 +852,6 @@ gdk_keymap_have_bidi_layouts
|
||||
gdk_keymap_get_caps_lock_state
|
||||
gdk_keymap_lookup_key
|
||||
gdk_keymap_translate_keyboard_state
|
||||
gdk_keymap_map_virtual_modifiers
|
||||
gdk_keyval_convert_case
|
||||
gdk_keyval_from_name
|
||||
gdk_keyval_name G_GNUC_CONST
|
||||
@@ -1075,13 +1074,12 @@ gdk_screen_get_width_mm
|
||||
gdk_screen_get_height
|
||||
gdk_screen_get_height_mm
|
||||
gdk_screen_get_number
|
||||
gdk_screen_get_primary_monitor
|
||||
gdk_screen_get_root_window
|
||||
gdk_screen_get_default_colormap
|
||||
gdk_screen_set_default_colormap
|
||||
gdk_screen_get_n_monitors
|
||||
gdk_screen_get_monitor_geometry
|
||||
gdk_screen_get_monitor_width_mm
|
||||
gdk_screen_get_monitor_width_mm
|
||||
gdk_screen_get_monitor_height_mm
|
||||
gdk_screen_get_monitor_plug_name
|
||||
gdk_screen_get_rgba_colormap
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user