Read the ChangeLog :)

This commit is contained in:
Elliot Lee 1997-12-06 22:12:10 +00:00
parent 0219b8b6b4
commit 7e4ee8cb4f
22 changed files with 930 additions and 550 deletions

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,3 +1,15 @@
Fri Dec 5 1997 Elliot Lee <sopwith@cuc.edu>
* gdk/gdk.c: clean up warnings, remove some un-ifdef'd debugging
printing, DnD is Bug Free now, etc.
* gtk/gtkcolorsel.c: fix DnD support.
* gtk/gtkmain.c: DnD events go to the original window even if
there is a grab - if I drop on a window the data had better go
to it and not some other window :)
* gtk/testgtk.c: Replace (GtkSignalFunc) with GTK_SIGNAL_FUNC(),
and do a nicer DnD demo.
* My very first ChangeLog entry, seeing as people have
a fixation on them (what's wrong with "rcs2log" output?)
Thu Dec 4 1997 Owen Taylor <owt1@cornell.edu>
* gdk/gdkgc.c: Ignore gdk_gc_set_font if font is a fontset.

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2c from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -49,12 +49,12 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
CC = @CC@
@ -146,7 +146,7 @@ all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
list='$(SUBDIRS)'; for subdir in $$list; do \
for subdir in $(SUBDIRS); do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
@ -156,9 +156,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
done; \
rev=''; for subdir in $(SUBDIRS); do rev="$$subdir $$rev"; done; \
for subdir in $$rev; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
@ -172,18 +170,17 @@ tags-recursive:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
done; \
test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) -o $$here/TAGS)
mostlyclean-tags:

255
configure vendored
View File

@ -1714,19 +1714,16 @@ fi
if eval "test x$GCC = xyes"; then
test `echo "$CFLAGS" | grep "\-Wall" > /dev/null 2> /dev/null`
if test ! $?; then
if test ! `echo "$CFLAGS" | grep "\-Wall" 2> /dev/null` ; then
CFLAGS="$CFLAGS -Wall"
fi
if eval "test x$enable_ansi = xyes"; then
test `echo "$CFLAGS" | grep "\-ansi" > /dev/null 2> /dev/null`
if test ! $?; then
if test ! `echo "$CFLAGS" | grep "\-ansi" 2> /dev/null` ; then
CFLAGS="$CFLAGS -ansi"
fi
test `echo "$CFLAGS" | grep "\-pedantic" > /dev/null 2> /dev/null`
if test ! $?; then
if test ! `echo "$CFLAGS" | grep "\-pedantic" 2> /dev/null` ; then
CFLAGS="$CFLAGS -pedantic"
fi
fi
@ -1738,7 +1735,7 @@ fi
# Find the X11 include and library directories
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1742: checking how to run the C preprocessor" >&5
echo "configure:1739: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1753,13 +1750,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1757 "configure"
#line 1754 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -1770,13 +1767,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1774 "configure"
#line 1771 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@ -1803,7 +1800,7 @@ echo "$ac_t""$CPP" 1>&6
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:1807: checking for X" >&5
echo "configure:1804: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@ -1865,12 +1862,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 1869 "configure"
#line 1866 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1939,14 +1936,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1943 "configure"
#line 1940 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@ -2052,17 +2049,17 @@ else
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:2056: checking whether -R must be followed by a space" >&5
echo "configure:2053: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
#line 2059 "configure"
#line 2056 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_nospace=yes
else
@ -2078,14 +2075,14 @@ rm -f conftest*
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
#line 2082 "configure"
#line 2079 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_space=yes
else
@ -2117,7 +2114,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:2121: checking for dnet_ntoa in -ldnet" >&5
echo "configure:2118: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2125,7 +2122,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2129 "configure"
#line 2126 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2136,7 +2133,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2158,7 +2155,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:2162: checking for dnet_ntoa in -ldnet_stub" >&5
echo "configure:2159: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2166,7 +2163,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2170 "configure"
#line 2167 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2177,7 +2174,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2206,12 +2203,12 @@ fi
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:2210: checking for gethostbyname" >&5
echo "configure:2207: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2215 "configure"
#line 2212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@ -2234,7 +2231,7 @@ gethostbyname();
; return 0; }
EOF
if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@ -2255,7 +2252,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:2259: checking for gethostbyname in -lnsl" >&5
echo "configure:2256: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2263,7 +2260,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2267 "configure"
#line 2264 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2274,7 +2271,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:2278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2304,12 +2301,12 @@ fi
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:2308: checking for connect" >&5
echo "configure:2305: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2313 "configure"
#line 2310 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@ -2332,7 +2329,7 @@ connect();
; return 0; }
EOF
if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@ -2353,7 +2350,7 @@ fi
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:2357: checking for connect in -lsocket" >&5
echo "configure:2354: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2361,7 +2358,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2365 "configure"
#line 2362 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2372,7 +2369,7 @@ int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2396,12 +2393,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:2400: checking for remove" >&5
echo "configure:2397: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2405 "configure"
#line 2402 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
@ -2424,7 +2421,7 @@ remove();
; return 0; }
EOF
if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
@ -2445,7 +2442,7 @@ fi
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:2449: checking for remove in -lposix" >&5
echo "configure:2446: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2453,7 +2450,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2457 "configure"
#line 2454 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2464,7 +2461,7 @@ int main() {
remove()
; return 0; }
EOF
if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2488,12 +2485,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:2492: checking for shmat" >&5
echo "configure:2489: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2497 "configure"
#line 2494 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
@ -2516,7 +2513,7 @@ shmat();
; return 0; }
EOF
if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
@ -2537,7 +2534,7 @@ fi
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:2541: checking for shmat in -lipc" >&5
echo "configure:2538: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2545,7 +2542,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2549 "configure"
#line 2546 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2556,7 +2553,7 @@ int main() {
shmat()
; return 0; }
EOF
if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2589,7 +2586,7 @@ fi
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:2593: checking for IceConnectionNumber in -lICE" >&5
echo "configure:2590: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2597,7 +2594,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2601 "configure"
#line 2598 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2608,7 +2605,7 @@ int main() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2646,7 +2643,7 @@ LDFLAGS="$X_LDFLAGS $X_LIBS"
# Checks for libraries.
# Check for the X11 library
echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
echo "configure:2650: checking for XOpenDisplay in -lX11" >&5
echo "configure:2647: checking for XOpenDisplay in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2654,7 +2651,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lX11 $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2658 "configure"
#line 2655 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2665,7 +2662,7 @@ int main() {
XOpenDisplay()
; return 0; }
EOF
if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2690,7 +2687,7 @@ fi
if eval "test x$enable_shm = xyes"; then
# Check for the Xext library (needed for XShm extention)
echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6
echo "configure:2694: checking for XShmAttach in -lXext" >&5
echo "configure:2691: checking for XShmAttach in -lXext" >&5
ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2698,7 +2695,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lXext $x_libs $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2702 "configure"
#line 2699 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2709,7 +2706,7 @@ int main() {
XShmAttach()
; return 0; }
EOF
if { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2771,17 +2768,17 @@ if eval "test x$enable_shm = xyes"; then
# Check for shared memory
ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
echo "configure:2775: checking for sys/ipc.h" >&5
echo "configure:2772: checking for sys/ipc.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2780 "configure"
#line 2777 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2808,17 +2805,17 @@ fi
ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
echo "configure:2812: checking for sys/shm.h" >&5
echo "configure:2809: checking for sys/shm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2817 "configure"
#line 2814 "configure"
#include "confdefs.h"
#include <sys/shm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2847,12 +2844,12 @@ fi
# Check whether shmctl IPC_RMID allowes subsequent attaches
if test "$ac_cv_header_sys_shm_h" = "yes"; then
echo $ac_n "checking whether shmctl IPC_RMID allowes subsequent attaches""... $ac_c" 1>&6
echo "configure:2851: checking whether shmctl IPC_RMID allowes subsequent attaches" >&5
echo "configure:2848: checking whether shmctl IPC_RMID allowes subsequent attaches" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""assuming no" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2856 "configure"
#line 2853 "configure"
#include "confdefs.h"
#include <sys/types.h>
@ -2878,7 +2875,7 @@ else
}
EOF
if { (eval echo configure:2882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define IPC_RMID_DEFERRED_RELEASE 1
@ -2898,7 +2895,7 @@ fi
# Check for the X shared memory extension header file
echo $ac_n "checking X11/extensions/XShm.h""... $ac_c" 1>&6
echo "configure:2902: checking X11/extensions/XShm.h" >&5
echo "configure:2899: checking X11/extensions/XShm.h" >&5
if eval "test x$no_ext_lib = xyes"; then
echo "$ac_t""no" 1>&6
no_xshm=yes
@ -2918,7 +2915,7 @@ fi
# Check for private display resource base variable
echo $ac_n "checking resource base field in XDisplay""... $ac_c" 1>&6
echo "configure:2922: checking resource base field in XDisplay" >&5
echo "configure:2919: checking resource base field in XDisplay" >&5
if eval "test \"`echo '$''{'gtk_cv_display_resource_base'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2926,7 +2923,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 2930 "configure"
#line 2927 "configure"
#include "confdefs.h"
#define XLIB_ILLEGAL_ACCESS
@ -2942,7 +2939,7 @@ main ()
display->resource_base;
}
EOF
if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
gtk_cv_display_resource_base="resource_base"
else
@ -2962,27 +2959,80 @@ cat >> confdefs.h <<EOF
EOF
# Look for wide string functions in wchar.h or wcstr.h
echo $ac_n "checking for <wchar.h> or <wcstr.h>""... $ac_c" 1>&6
echo "configure:2966: checking for <wchar.h> or <wcstr.h>" >&5
cat > conftest.$ac_ext <<EOF
#line 2968 "configure"
#include "confdefs.h"
#include <wchar.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
gtk_ok=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gtk_ok=no
fi
rm -f conftest*
if test $gtk_ok = no; then
cat > conftest.$ac_ext <<EOF
#line 2988 "configure"
#include "confdefs.h"
#include <wcstr.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
gtk_ok=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
gtk_ok=no
fi
rm -f conftest*
if test $gtk_ok = no; then
gtk_cv_x_locale=yes
fi
fi
echo "$ac_t""$gtk_ok" 1>&6
# Check if X_LOCALE definition is necessary
echo $ac_n "checking need -DX_LOCALE""... $ac_c" 1>&6
echo "configure:2969: checking need -DX_LOCALE" >&5
if test "$cross_compiling" = yes; then
echo "configure:3016: checking need -DX_LOCALE" >&5
if test x$gtk_cv_x_locale = xyes; then
echo "$ac_t""yes (C library doesn't include wide string functions)" 1>&6
else
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 2974 "configure"
#line 3024 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <locale.h>
#include <stdio.h>
#include <locale.h>
int
main ()
{
return setlocale (LC_ALL, "${with_locale}") == NULL;
}
int
main ()
{
return setlocale (LC_ALL, "${with_locale}") == NULL;
}
EOF
if { (eval echo configure:2986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
gtk_cv_x_locale=no
else
@ -2994,19 +3044,20 @@ fi
rm -fr conftest*
fi
echo "$ac_t""$gtk_cv_x_locale" 1>&6
echo "$ac_t""$gtk_cv_x_locale" 1>&6
fi
if test $gtk_cv_x_locale = yes; then
CFLAGS="$CFLAGS -DX_LOCALE"
fi
# Checks for header files.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3005: checking for ANSI C header files" >&5
echo "configure:3056: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3010 "configure"
#line 3061 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -3014,7 +3065,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3031,7 +3082,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3035 "configure"
#line 3086 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -3049,7 +3100,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3053 "configure"
#line 3104 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -3070,7 +3121,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3074 "configure"
#line 3125 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -3081,7 +3132,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@ -3107,12 +3158,12 @@ fi
# Checks for typedefs, structures, and compiler characteristics.
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:3111: checking for working const" >&5
echo "configure:3162: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3116 "configure"
#line 3167 "configure"
#include "confdefs.h"
int main() {
@ -3161,7 +3212,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:3165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -3184,12 +3235,12 @@ fi
# Checks for library functions.
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:3188: checking return type of signal handlers" >&5
echo "configure:3239: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3193 "configure"
#line 3244 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -3206,7 +3257,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:3210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@ -3228,16 +3279,16 @@ EOF
# Check for sys/select.h
echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
echo "configure:3232: checking fd_set and sys/select" >&5
echo "configure:3283: checking fd_set and sys/select" >&5
cat > conftest.$ac_ext <<EOF
#line 3234 "configure"
#line 3285 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
fd_set readMask, writeMask;
; return 0; }
EOF
if { (eval echo configure:3241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gtk_ok=yes
else
@ -3249,7 +3300,7 @@ fi
rm -f conftest*
if test $gtk_ok = no; then
cat > conftest.$ac_ext <<EOF
#line 3253 "configure"
#line 3304 "configure"
#include "confdefs.h"
#include <sys/select.h>
EOF

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2c from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -49,12 +49,12 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
CC = @CC@
@ -170,8 +170,7 @@ uninstall-info:
ii=yes; \
else ii=; fi; \
for file in $(INFO_DEPS); do \
test -z "$ii" \
|| install-info --info-dir=$(infodir) --remove $$file; \
test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \
done
$(NORMAL_UNINSTALL)
for file in $(INFO_DEPS); do \

View File

@ -2,6 +2,7 @@
Makefile
.deps
_libs
.libs
libgdk.la
gdkcursors.h
gdkkeysyms.h

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2c from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -49,12 +49,12 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
CC = @CC@
@ -180,7 +180,7 @@ OBJECTS = $(libgdk_la_OBJECTS) $(gxid_OBJECTS)
default: all
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
.SUFFIXES: .c .lo .o
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu gdk/Makefile
@ -203,8 +203,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
$(mkinstalldirs) $(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
echo "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p; \
else :; fi; \
done
@ -217,12 +217,6 @@ uninstall-libLTLIBRARIES:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
@ -236,17 +230,11 @@ maintainer-clean-compile:
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-rm -rf .libs
distclean-libtool:
@ -300,15 +288,14 @@ uninstall-gdkincludeHEADERS:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) -o $$here/TAGS)
mostlyclean-tags:
@ -450,6 +437,8 @@ files:
echo $$p; \
done
$(DEP_FILES) : $(BUILT_SOURCES)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

142
gdk/gdk.c
View File

@ -17,6 +17,8 @@
*/
#include "../config.h"
/* #define DEBUG_DND 1 */ /* Shouldn't be needed much these days */
#include <X11/Xlocale.h>
#include <ctype.h>
#include <signal.h>
@ -109,20 +111,24 @@ static void gdk_synthesize_click (GdkEvent *event,
static void gdk_dnd_drag_begin (GdkWindow *initial_window);
static void gdk_dnd_drag_enter (Window dest);
static void gdk_dnd_drag_leave (Window dest);
static void gdk_dnd_drag_end (Window dest,
static void gdk_dnd_drag_end (Window dest,
GdkPoint coords);
static GdkAtom gdk_dnd_check_types (GdkWindow *window,
XEvent *xevent);
#ifdef DEBUG_DND
static void gdk_print_atom (GdkAtom anatom);
#endif
/*
* old junk from offix, we might use it though so leave it
*/
static Window gdk_drop_get_client_window (Display *dpy,
Window win);
Window gdk_get_client_window (Display *dpy,
Window win);
#ifdef WE_HAVE_MOTIF_DROPS_DONE
static GdkWindow * gdk_drop_get_real_window (GdkWindow *w,
guint16 *x,
guint16 *y);
#endif
static void gdk_exit_func (void);
static int gdk_x_error (Display *display,
XErrorEvent *error);
@ -1708,7 +1714,6 @@ gdk_event_translate (GdkEvent *event,
will be the one that is actually dragged */
XWindowAttributes dnd_winattr;
XSetWindowAttributes dnd_setwinattr;
Status rv;
/* We need to get motion events while the button is down, so
we can know whether to really start dragging or not... */
@ -1835,16 +1840,17 @@ gdk_event_translate (GdkEvent *event,
/* XXX there has to be a better way to do this, perhaps with
XTranslateCoordinates or XQueryTree - I don't know how,
and this sort of works */
Window curwin, childwin = gdk_root_window, rootwinret;
static Window lastwin = None, curwin = None;
Window childwin = gdk_root_window;
int x, y;
unsigned int mask;
lastwin = curwin;
while(childwin != None)
{
curwin = childwin;
XQueryPointer(gdk_display, curwin, &rootwinret, &childwin,
&x, &y, &x, &y, &mask);
XTranslateCoordinates(gdk_display, curwin, childwin,
x, y, &x, &y, &childwin);
}
if(curwin != dnd_drag_curwin)
if(curwin != dnd_drag_curwin && curwin != lastwin)
{
/* We have left one window and entered another
(do leave & enter bits) */
@ -1855,6 +1861,10 @@ gdk_event_translate (GdkEvent *event,
dnd_drag_dropzone.x = dnd_drag_dropzone.y = 0;
dnd_drag_dropzone.width = dnd_drag_dropzone.height = 0;
dnd_drag_target = None;
#ifdef DEBUG_DND
g_print("curwin = %#x, lastwin = %#x, dnd_drag_curwin = %#x\n",
curwin, lastwin, dnd_drag_curwin);
#endif
XChangeActivePointerGrab(gdk_display,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
@ -1863,7 +1873,8 @@ gdk_event_translate (GdkEvent *event,
CurrentTime);
}
else if(dnd_drag_dropzone.width > 0
&& dnd_drag_dropzone.height > 0)
&& dnd_drag_dropzone.height > 0
&& curwin == dnd_drag_curwin)
{
/* Handle all that dropzone stuff - thanks John ;-) */
if(dnd_drag_target != None
@ -1879,6 +1890,8 @@ gdk_event_translate (GdkEvent *event,
{
/* We were outside drop zone but in the window
- have to send enter events */
#ifdef DEBUG_DND
#endif
gdk_dnd_drag_enter(curwin);
dnd_drag_curwin = curwin;
dnd_drag_dropzone.x = dnd_drag_dropzone.y = 0;
@ -1889,7 +1902,7 @@ gdk_event_translate (GdkEvent *event,
return_val = FALSE;
}
else
return_val = window_private && !window_private->destroyed;
return_val = window_private && !window_private->destroyed;
break;
case EnterNotify:
@ -1942,13 +1955,39 @@ gdk_event_translate (GdkEvent *event,
break;
}
if(dnd_drag_perhaps
&& gdk_dnd.drag_really
&& xevent->xcrossing.window == real_sw->xwindow)
#ifdef DEBUG_DND
if(dnd_drag_perhaps)
{
gdk_dnd.drag_really = 0;
XUngrabPointer(gdk_display, CurrentTime);
g_print("We may[%d] have a drag into %#x = %#x\n",
gdk_dnd.drag_really,
xevent->xcrossing.window, real_sw->xwindow);
}
#endif
if(dnd_drag_perhaps) {
if(!gdk_dnd.drag_really && xevent->xcrossing.window != real_sw->xwindow)
{
gdk_dnd_drag_addwindow((GdkWindow *) real_sw);
gdk_dnd_drag_begin((GdkWindow *) real_sw);
XGrabPointer(gdk_display, real_sw->xwindow, False,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
gdk_dnd.gdk_cursor_dragdefault, CurrentTime);
gdk_dnd.drag_really = 1;
}
else if(gdk_dnd.drag_really && xevent->xcrossing.window == real_sw->xwindow)
{
gdk_dnd.drag_really = 0;
#ifdef DEBUG_DND
g_print("Ungrabbed\n");
#endif
gdk_dnd.drag_numwindows = 0;
g_free(gdk_dnd.drag_startwindows);
gdk_dnd.drag_startwindows = NULL;
XUngrabPointer(gdk_display, CurrentTime);
}
}
return_val = window_private && !window_private->destroyed;
break;
@ -1987,19 +2026,40 @@ gdk_event_translate (GdkEvent *event,
event->crossing.detail = GDK_NOTIFY_UNKNOWN;
break;
}
if(dnd_drag_perhaps
&& !gdk_dnd.drag_really)
#ifdef DEBUG_DND
if(dnd_drag_perhaps)
{
gdk_dnd_drag_addwindow((GdkWindow *) real_sw);
gdk_dnd_drag_begin((GdkWindow *) real_sw);
XGrabPointer(gdk_display, real_sw->xwindow, False,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
gdk_dnd.gdk_cursor_dragdefault, CurrentTime);
gdk_dnd.drag_really = 1;
g_print("We may[%d] have a drag out of %#x = %#x\n",
gdk_dnd.drag_really,
xevent->xcrossing.window, real_sw->xwindow);
}
#endif
if(dnd_drag_perhaps) {
if(!gdk_dnd.drag_really && xevent->xcrossing.window != real_sw->xwindow)
{
gdk_dnd_drag_addwindow((GdkWindow *) real_sw);
gdk_dnd_drag_begin((GdkWindow *) real_sw);
XGrabPointer(gdk_display, real_sw->xwindow, False,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
gdk_dnd.gdk_cursor_dragdefault, CurrentTime);
gdk_dnd.drag_really = 1;
}
else if(gdk_dnd.drag_really && xevent->xcrossing.window == real_sw->xwindow)
{
gdk_dnd.drag_really = 0;
#ifdef DEBUG_DND
g_print("Ungrabbed\n");
#endif
gdk_dnd.drag_numwindows = 0;
g_free(gdk_dnd.drag_startwindows);
gdk_dnd.drag_startwindows = NULL;
XUngrabPointer(gdk_display, CurrentTime);
}
}
return_val = window_private && !window_private->destroyed;
break;
@ -2331,7 +2391,9 @@ gdk_event_translate (GdkEvent *event,
Atom reptype = 0;
event->dropenter.u.allflags = xevent->xclient.data.l[1];
#ifndef DEBUG_DND
if (gdk_show_events)
#endif
g_print ("GDK_DROP_ENTER\n");
return_val = FALSE;
@ -2372,7 +2434,9 @@ gdk_event_translate (GdkEvent *event,
}
else if (xevent->xclient.message_type == gdk_dnd.gdk_XdeLeave)
{
#ifndef DEBUG_DND
if (gdk_show_events)
#endif
g_print ("GDK_DROP_LEAVE\n");
if (window_private && window_private->dnd_drop_enabled)
{
@ -2391,7 +2455,9 @@ gdk_event_translate (GdkEvent *event,
* make sure to only handle requests from the window the cursor is
* over
*/
#ifndef DEBUG_DND
if (gdk_show_events)
#endif
g_print ("GDK_DRAG_REQUEST\n");
event->dragrequest.u.allflags = xevent->xclient.data.l[1];
return_val = FALSE;
@ -2443,9 +2509,10 @@ gdk_event_translate (GdkEvent *event,
gint tmp_int; Atom tmp_atom;
gulong tmp_long;
guchar *tmp_charptr;
gpointer tmp_ptr;
#ifndef DEBUG_DND
if(gdk_show_events)
#endif
g_print("GDK_DROP_DATA_AVAIL\n");
event->dropdataavailable.u.allflags = xevent->xclient.data.l[1];
if(window
@ -2474,8 +2541,10 @@ gdk_event_translate (GdkEvent *event,
}
else
{
#ifdef DEBUG_DND
g_print("XGetWindowProperty got us %d bytes\n",
event->dropdataavailable.data_numbytes);
#endif
event->dropdataavailable.data =
g_malloc(event->dropdataavailable.data_numbytes);
memcpy(event->dropdataavailable.data,
@ -2485,7 +2554,9 @@ gdk_event_translate (GdkEvent *event,
}
return_val = TRUE;
}
} else {
}
else
{
/* Send unknown ClientMessage's on to Gtk for it to use */
event->client.type = GDK_CLIENT_EVENT;
event->client.window = window;
@ -2816,7 +2887,6 @@ gdk_dnd_drag_enter (Window dest)
void gdk_im_begin (GdkIC ic, GdkWindow* window)
{
GdkEventMask event;
GdkICPrivate *private;
Window xwin;
@ -2904,6 +2974,7 @@ gdk_im_choose_better_style (GdkIMStyle style1, GdkIMStyle style2)
else if ( u & GdkIMStatusNone)
return (s1 == GdkIMStatusNone)? style1:style2;
}
return 0; /* Get rid of stupid warning */
}
GdkIMStyle
@ -2969,8 +3040,6 @@ gdk_im_set_best_style (GdkIMStyle style)
static gint gdk_im_open (XrmDatabase db, gchar* res_name, gchar* res_class)
{
XIMStyle style;
int i;
xim_im = XOpenIM (GDK_DISPLAY(), db, res_name, res_class);
if (xim_im == NULL)
@ -3171,7 +3240,7 @@ gdk_ic_get_events (GdkIC ic)
}
if (xmask)
g_warning ("ic requires the events not supported by the application (%04x)", xmask);
g_warning ("ic requires the events not supported by the application (%04lx)", xmask);
return mask;
}
@ -3267,7 +3336,6 @@ gdk_dnd_drag_end (Window dest,
{
GdkWindowPrivate *wp;
GdkEventDragRequest tev;
gchar *tmp_cptr;
int i;
tev.type = GDK_DRAG_REQUEST;
@ -3359,6 +3427,7 @@ gdk_dnd_check_types (GdkWindow *window,
/*
* used for debugging only
*/
#ifdef DEBUG_DND
static void
gdk_print_atom (GdkAtom anatom)
{
@ -3368,6 +3437,7 @@ gdk_print_atom (GdkAtom anatom)
if(tmpstr)
g_free(tmpstr);
}
#endif
/*
* used only by below routine and itself
@ -3441,6 +3511,7 @@ gdk_get_client_window (Display *dpy,
return inf;
}
#ifdef WE_HAVE_MOTIF_DROPS_DONE
static GdkWindow *
gdk_drop_get_real_window (GdkWindow *w,
guint16 *x,
@ -3478,6 +3549,7 @@ descend:
return retval;
}
#endif
/* Sends a ClientMessage to all toplevel client windows */
void

View File

@ -1323,7 +1323,9 @@ gdk_window_dnd_data_set (GdkWindow *window,
XA_PRIMARY, 8, GDK_PROP_MODE_REPLACE, data,
data_numbytes);
tmp = gdk_atom_name(window_private->dnd_drag_data_type);
#ifdef DEBUG_DND
g_print("DnD type %s on window %ld\n", tmp, window_private->xwindow);
#endif
g_free(tmp);
/*

View File

@ -17,6 +17,8 @@
*/
#include "../config.h"
/* #define DEBUG_DND 1 */ /* Shouldn't be needed much these days */
#include <X11/Xlocale.h>
#include <ctype.h>
#include <signal.h>
@ -109,20 +111,24 @@ static void gdk_synthesize_click (GdkEvent *event,
static void gdk_dnd_drag_begin (GdkWindow *initial_window);
static void gdk_dnd_drag_enter (Window dest);
static void gdk_dnd_drag_leave (Window dest);
static void gdk_dnd_drag_end (Window dest,
static void gdk_dnd_drag_end (Window dest,
GdkPoint coords);
static GdkAtom gdk_dnd_check_types (GdkWindow *window,
XEvent *xevent);
#ifdef DEBUG_DND
static void gdk_print_atom (GdkAtom anatom);
#endif
/*
* old junk from offix, we might use it though so leave it
*/
static Window gdk_drop_get_client_window (Display *dpy,
Window win);
Window gdk_get_client_window (Display *dpy,
Window win);
#ifdef WE_HAVE_MOTIF_DROPS_DONE
static GdkWindow * gdk_drop_get_real_window (GdkWindow *w,
guint16 *x,
guint16 *y);
#endif
static void gdk_exit_func (void);
static int gdk_x_error (Display *display,
XErrorEvent *error);
@ -1708,7 +1714,6 @@ gdk_event_translate (GdkEvent *event,
will be the one that is actually dragged */
XWindowAttributes dnd_winattr;
XSetWindowAttributes dnd_setwinattr;
Status rv;
/* We need to get motion events while the button is down, so
we can know whether to really start dragging or not... */
@ -1835,16 +1840,17 @@ gdk_event_translate (GdkEvent *event,
/* XXX there has to be a better way to do this, perhaps with
XTranslateCoordinates or XQueryTree - I don't know how,
and this sort of works */
Window curwin, childwin = gdk_root_window, rootwinret;
static Window lastwin = None, curwin = None;
Window childwin = gdk_root_window;
int x, y;
unsigned int mask;
lastwin = curwin;
while(childwin != None)
{
curwin = childwin;
XQueryPointer(gdk_display, curwin, &rootwinret, &childwin,
&x, &y, &x, &y, &mask);
XTranslateCoordinates(gdk_display, curwin, childwin,
x, y, &x, &y, &childwin);
}
if(curwin != dnd_drag_curwin)
if(curwin != dnd_drag_curwin && curwin != lastwin)
{
/* We have left one window and entered another
(do leave & enter bits) */
@ -1855,6 +1861,10 @@ gdk_event_translate (GdkEvent *event,
dnd_drag_dropzone.x = dnd_drag_dropzone.y = 0;
dnd_drag_dropzone.width = dnd_drag_dropzone.height = 0;
dnd_drag_target = None;
#ifdef DEBUG_DND
g_print("curwin = %#x, lastwin = %#x, dnd_drag_curwin = %#x\n",
curwin, lastwin, dnd_drag_curwin);
#endif
XChangeActivePointerGrab(gdk_display,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
@ -1863,7 +1873,8 @@ gdk_event_translate (GdkEvent *event,
CurrentTime);
}
else if(dnd_drag_dropzone.width > 0
&& dnd_drag_dropzone.height > 0)
&& dnd_drag_dropzone.height > 0
&& curwin == dnd_drag_curwin)
{
/* Handle all that dropzone stuff - thanks John ;-) */
if(dnd_drag_target != None
@ -1879,6 +1890,8 @@ gdk_event_translate (GdkEvent *event,
{
/* We were outside drop zone but in the window
- have to send enter events */
#ifdef DEBUG_DND
#endif
gdk_dnd_drag_enter(curwin);
dnd_drag_curwin = curwin;
dnd_drag_dropzone.x = dnd_drag_dropzone.y = 0;
@ -1889,7 +1902,7 @@ gdk_event_translate (GdkEvent *event,
return_val = FALSE;
}
else
return_val = window_private && !window_private->destroyed;
return_val = window_private && !window_private->destroyed;
break;
case EnterNotify:
@ -1942,13 +1955,39 @@ gdk_event_translate (GdkEvent *event,
break;
}
if(dnd_drag_perhaps
&& gdk_dnd.drag_really
&& xevent->xcrossing.window == real_sw->xwindow)
#ifdef DEBUG_DND
if(dnd_drag_perhaps)
{
gdk_dnd.drag_really = 0;
XUngrabPointer(gdk_display, CurrentTime);
g_print("We may[%d] have a drag into %#x = %#x\n",
gdk_dnd.drag_really,
xevent->xcrossing.window, real_sw->xwindow);
}
#endif
if(dnd_drag_perhaps) {
if(!gdk_dnd.drag_really && xevent->xcrossing.window != real_sw->xwindow)
{
gdk_dnd_drag_addwindow((GdkWindow *) real_sw);
gdk_dnd_drag_begin((GdkWindow *) real_sw);
XGrabPointer(gdk_display, real_sw->xwindow, False,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
gdk_dnd.gdk_cursor_dragdefault, CurrentTime);
gdk_dnd.drag_really = 1;
}
else if(gdk_dnd.drag_really && xevent->xcrossing.window == real_sw->xwindow)
{
gdk_dnd.drag_really = 0;
#ifdef DEBUG_DND
g_print("Ungrabbed\n");
#endif
gdk_dnd.drag_numwindows = 0;
g_free(gdk_dnd.drag_startwindows);
gdk_dnd.drag_startwindows = NULL;
XUngrabPointer(gdk_display, CurrentTime);
}
}
return_val = window_private && !window_private->destroyed;
break;
@ -1987,19 +2026,40 @@ gdk_event_translate (GdkEvent *event,
event->crossing.detail = GDK_NOTIFY_UNKNOWN;
break;
}
if(dnd_drag_perhaps
&& !gdk_dnd.drag_really)
#ifdef DEBUG_DND
if(dnd_drag_perhaps)
{
gdk_dnd_drag_addwindow((GdkWindow *) real_sw);
gdk_dnd_drag_begin((GdkWindow *) real_sw);
XGrabPointer(gdk_display, real_sw->xwindow, False,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
gdk_dnd.gdk_cursor_dragdefault, CurrentTime);
gdk_dnd.drag_really = 1;
g_print("We may[%d] have a drag out of %#x = %#x\n",
gdk_dnd.drag_really,
xevent->xcrossing.window, real_sw->xwindow);
}
#endif
if(dnd_drag_perhaps) {
if(!gdk_dnd.drag_really && xevent->xcrossing.window != real_sw->xwindow)
{
gdk_dnd_drag_addwindow((GdkWindow *) real_sw);
gdk_dnd_drag_begin((GdkWindow *) real_sw);
XGrabPointer(gdk_display, real_sw->xwindow, False,
ButtonMotionMask |
ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
gdk_dnd.gdk_cursor_dragdefault, CurrentTime);
gdk_dnd.drag_really = 1;
}
else if(gdk_dnd.drag_really && xevent->xcrossing.window == real_sw->xwindow)
{
gdk_dnd.drag_really = 0;
#ifdef DEBUG_DND
g_print("Ungrabbed\n");
#endif
gdk_dnd.drag_numwindows = 0;
g_free(gdk_dnd.drag_startwindows);
gdk_dnd.drag_startwindows = NULL;
XUngrabPointer(gdk_display, CurrentTime);
}
}
return_val = window_private && !window_private->destroyed;
break;
@ -2331,7 +2391,9 @@ gdk_event_translate (GdkEvent *event,
Atom reptype = 0;
event->dropenter.u.allflags = xevent->xclient.data.l[1];
#ifndef DEBUG_DND
if (gdk_show_events)
#endif
g_print ("GDK_DROP_ENTER\n");
return_val = FALSE;
@ -2372,7 +2434,9 @@ gdk_event_translate (GdkEvent *event,
}
else if (xevent->xclient.message_type == gdk_dnd.gdk_XdeLeave)
{
#ifndef DEBUG_DND
if (gdk_show_events)
#endif
g_print ("GDK_DROP_LEAVE\n");
if (window_private && window_private->dnd_drop_enabled)
{
@ -2391,7 +2455,9 @@ gdk_event_translate (GdkEvent *event,
* make sure to only handle requests from the window the cursor is
* over
*/
#ifndef DEBUG_DND
if (gdk_show_events)
#endif
g_print ("GDK_DRAG_REQUEST\n");
event->dragrequest.u.allflags = xevent->xclient.data.l[1];
return_val = FALSE;
@ -2443,9 +2509,10 @@ gdk_event_translate (GdkEvent *event,
gint tmp_int; Atom tmp_atom;
gulong tmp_long;
guchar *tmp_charptr;
gpointer tmp_ptr;
#ifndef DEBUG_DND
if(gdk_show_events)
#endif
g_print("GDK_DROP_DATA_AVAIL\n");
event->dropdataavailable.u.allflags = xevent->xclient.data.l[1];
if(window
@ -2474,8 +2541,10 @@ gdk_event_translate (GdkEvent *event,
}
else
{
#ifdef DEBUG_DND
g_print("XGetWindowProperty got us %d bytes\n",
event->dropdataavailable.data_numbytes);
#endif
event->dropdataavailable.data =
g_malloc(event->dropdataavailable.data_numbytes);
memcpy(event->dropdataavailable.data,
@ -2485,7 +2554,9 @@ gdk_event_translate (GdkEvent *event,
}
return_val = TRUE;
}
} else {
}
else
{
/* Send unknown ClientMessage's on to Gtk for it to use */
event->client.type = GDK_CLIENT_EVENT;
event->client.window = window;
@ -2816,7 +2887,6 @@ gdk_dnd_drag_enter (Window dest)
void gdk_im_begin (GdkIC ic, GdkWindow* window)
{
GdkEventMask event;
GdkICPrivate *private;
Window xwin;
@ -2904,6 +2974,7 @@ gdk_im_choose_better_style (GdkIMStyle style1, GdkIMStyle style2)
else if ( u & GdkIMStatusNone)
return (s1 == GdkIMStatusNone)? style1:style2;
}
return 0; /* Get rid of stupid warning */
}
GdkIMStyle
@ -2969,8 +3040,6 @@ gdk_im_set_best_style (GdkIMStyle style)
static gint gdk_im_open (XrmDatabase db, gchar* res_name, gchar* res_class)
{
XIMStyle style;
int i;
xim_im = XOpenIM (GDK_DISPLAY(), db, res_name, res_class);
if (xim_im == NULL)
@ -3171,7 +3240,7 @@ gdk_ic_get_events (GdkIC ic)
}
if (xmask)
g_warning ("ic requires the events not supported by the application (%04x)", xmask);
g_warning ("ic requires the events not supported by the application (%04lx)", xmask);
return mask;
}
@ -3267,7 +3336,6 @@ gdk_dnd_drag_end (Window dest,
{
GdkWindowPrivate *wp;
GdkEventDragRequest tev;
gchar *tmp_cptr;
int i;
tev.type = GDK_DRAG_REQUEST;
@ -3359,6 +3427,7 @@ gdk_dnd_check_types (GdkWindow *window,
/*
* used for debugging only
*/
#ifdef DEBUG_DND
static void
gdk_print_atom (GdkAtom anatom)
{
@ -3368,6 +3437,7 @@ gdk_print_atom (GdkAtom anatom)
if(tmpstr)
g_free(tmpstr);
}
#endif
/*
* used only by below routine and itself
@ -3441,6 +3511,7 @@ gdk_get_client_window (Display *dpy,
return inf;
}
#ifdef WE_HAVE_MOTIF_DROPS_DONE
static GdkWindow *
gdk_drop_get_real_window (GdkWindow *w,
guint16 *x,
@ -3478,6 +3549,7 @@ descend:
return retval;
}
#endif
/* Sends a ClientMessage to all toplevel client windows */
void

View File

@ -1323,7 +1323,9 @@ gdk_window_dnd_data_set (GdkWindow *window,
XA_PRIMARY, 8, GDK_PROP_MODE_REPLACE, data,
data_numbytes);
tmp = gdk_atom_name(window_private->dnd_drag_data_type);
#ifdef DEBUG_DND
g_print("DnD type %s on window %ld\n", tmp, window_private->xwindow);
#endif
g_free(tmp);
/*

View File

@ -2,6 +2,7 @@
Makefile
.deps
_libs
.libs
libgtk.la
testgtk
testinput

View File

@ -1,4 +1,4 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2c from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@ -49,12 +49,12 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
CC = @CC@
@ -400,7 +400,7 @@ OBJECTS = $(libgtk_la_OBJECTS) testgtk.o testinput.o testselection.o simple.o
default: all
.SUFFIXES:
.SUFFIXES: .S .c .lo .o .s
.SUFFIXES: .c .lo .o
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu gtk/Makefile
@ -423,8 +423,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
$(mkinstalldirs) $(libdir)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
echo "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p; \
else :; fi; \
done
@ -437,12 +437,6 @@ uninstall-libLTLIBRARIES:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
@ -456,17 +450,11 @@ maintainer-clean-compile:
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.s.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
.S.lo:
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-rm -rf .libs
distclean-libtool:
@ -516,15 +504,14 @@ uninstall-gtkincludeHEADERS:
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) -o $$here/TAGS)
mostlyclean-tags:

View File

@ -18,6 +18,11 @@
#include <math.h>
#include "gtkcolorsel.h"
/*
* If you change the way the color values are stored,
* please make sure to update the drag & drop support so it sends
* across all the color info (currently RGBA). - Elliot
*/
#define DEGTORAD(a) (2.0*M_PI*a/360.0)
#define SQR(a) (a*a)
@ -126,9 +131,11 @@ static gint gtk_color_selection_wheel_timeout (GtkColorSelection *colorsel)
static void gtk_color_selection_sample_resize (GtkWidget *widget,
gpointer data);
static void gtk_color_selection_drop_handle (GtkWidget *widget,
GdkEvent *event);
GdkEvent *event,
GtkWidget *theclorsel);
static void gtk_color_selection_drag_handle (GtkWidget *widget,
GdkEvent *event);
GdkEvent *event,
GtkWidget *thecolorsel);
static void gtk_color_selection_draw_wheel_marker (GtkColorSelection *colorsel);
static void gtk_color_selection_draw_wheel_frame (GtkColorSelection *colorsel);
static void gtk_color_selection_draw_value_marker (GtkColorSelection *colorsel);
@ -261,6 +268,7 @@ gtk_color_selection_init (GtkColorSelection *colorsel)
gtk_widget_show (hbox2);
colorsel->wheel_area = gtk_preview_new (GTK_PREVIEW_COLOR);
old_mask = gtk_widget_get_events(colorsel->wheel_area);
gtk_widget_set_events (colorsel->wheel_area,
old_mask |
GDK_BUTTON_PRESS_MASK |
@ -493,11 +501,11 @@ gtk_color_selection_realize (GtkWidget *widget)
gtk_signal_connect_after (GTK_OBJECT (colorsel->sample_area),
"drop_data_available_event",
GTK_SIGNAL_FUNC (gtk_color_selection_drop_handle),
NULL);
colorsel);
gtk_signal_connect_after (GTK_OBJECT (colorsel->sample_area),
"drag_request_event",
GTK_SIGNAL_FUNC (gtk_color_selection_drag_handle),
NULL);
colorsel);
}
static void
@ -770,24 +778,39 @@ gtk_color_selection_sample_resize (GtkWidget *widget,
}
static void
gtk_color_selection_drop_handle (GtkWidget *widget, GdkEvent *event)
gtk_color_selection_drop_handle (GtkWidget *widget, GdkEvent *event,
GtkWidget *thecolorsel)
{
int i;
GtkColorSelection *w;
gdouble *newbuf;
g_print("Handling drop in color selection\n");
gtk_color_selection_set_color(GTK_COLOR_SELECTION(widget),
event->dropdataavailable.data);
/* This is currently a gdouble array of the format (I think):
use_opacity
R
G
B
opacity
*/
gdouble *v = event->dropdataavailable.data;
gtk_color_selection_set_opacity(GTK_COLOR_SELECTION(thecolorsel),
(v[0]==1.0)?TRUE:FALSE);
gtk_color_selection_set_color(GTK_COLOR_SELECTION(thecolorsel),
v + 1);
g_free(event->dropdataavailable.data);
g_free(event->dropdataavailable.data_type);
}
static void
gtk_color_selection_drag_handle (GtkWidget *widget, GdkEvent *event)
gtk_color_selection_drag_handle (GtkWidget *widget, GdkEvent *event,
GtkWidget *thecolorsel)
{
g_print("Handling drag in color selector\n");
gtk_widget_dnd_data_set(widget, event, GTK_COLOR_SELECTION(widget)->values,
sizeof(GTK_COLOR_SELECTION(widget)->values));
gdouble sendvals[(BLUE - RED + 1) + 3];
sendvals[0] = (GTK_COLOR_SELECTION(thecolorsel)->use_opacity)?1.0:0.0;
gtk_color_selection_get_color(GTK_COLOR_SELECTION(thecolorsel),
sendvals + 1);
gtk_widget_dnd_data_set(widget,
event,
(gpointer)sendvals,
sizeof(sendvals));
}
static void

View File

@ -366,6 +366,11 @@ gtk_main_iteration ()
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
case GDK_CLIENT_EVENT:
case GDK_DRAG_BEGIN:
case GDK_DRAG_REQUEST:
case GDK_DROP_ENTER:
case GDK_DROP_LEAVE:
case GDK_DROP_DATA_AVAIL:
gtk_widget_event (event_widget, &event_copy);
break;
@ -379,11 +384,6 @@ gtk_main_iteration ()
case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT:
case GDK_OTHER_EVENT:
case GDK_DRAG_BEGIN:
case GDK_DRAG_REQUEST:
case GDK_DROP_ENTER:
case GDK_DROP_LEAVE:
case GDK_DROP_DATA_AVAIL:
gtk_propagate_event (grab_widget, &event_copy);
break;

View File

@ -54,10 +54,10 @@ create_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "buttons");
@ -87,7 +87,7 @@ create_buttons ()
button[8] = gtk_button_new_with_label ("button9");
gtk_signal_connect (GTK_OBJECT (button[0]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[1]);
gtk_table_attach (GTK_TABLE (table), button[0], 0, 1, 0, 1,
@ -95,7 +95,7 @@ create_buttons ()
gtk_widget_show (button[0]);
gtk_signal_connect (GTK_OBJECT (button[1]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[2]);
gtk_table_attach (GTK_TABLE (table), button[1], 1, 2, 1, 2,
@ -103,49 +103,49 @@ create_buttons ()
gtk_widget_show (button[1]);
gtk_signal_connect (GTK_OBJECT (button[2]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[3]);
gtk_table_attach (GTK_TABLE (table), button[2], 2, 3, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[2]);
gtk_signal_connect (GTK_OBJECT (button[3]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[4]);
gtk_table_attach (GTK_TABLE (table), button[3], 0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[3]);
gtk_signal_connect (GTK_OBJECT (button[4]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[5]);
gtk_table_attach (GTK_TABLE (table), button[4], 2, 3, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[4]);
gtk_signal_connect (GTK_OBJECT (button[5]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[6]);
gtk_table_attach (GTK_TABLE (table), button[5], 1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[5]);
gtk_signal_connect (GTK_OBJECT (button[6]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[7]);
gtk_table_attach (GTK_TABLE (table), button[6], 1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[6]);
gtk_signal_connect (GTK_OBJECT (button[7]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[8]);
gtk_table_attach (GTK_TABLE (table), button[7], 2, 3, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[7]);
gtk_signal_connect (GTK_OBJECT (button[8]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[0]);
gtk_table_attach (GTK_TABLE (table), button[8], 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -165,7 +165,7 @@ create_buttons ()
button[9] = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button[9]), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button[9], TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button[9], GTK_CAN_DEFAULT);
@ -193,10 +193,10 @@ create_toggle_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "toggle buttons");
@ -240,7 +240,7 @@ create_toggle_buttons ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -268,10 +268,10 @@ create_check_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "check buttons");
@ -315,7 +315,7 @@ create_check_buttons ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -343,10 +343,10 @@ create_radio_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "radio buttons");
@ -395,7 +395,7 @@ create_radio_buttons ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -433,9 +433,9 @@ create_bbox_window (gint horizontal,
gtk_window_set_title (GTK_WINDOW (window), title);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) bbox_widget_destroy, window);
GTK_SIGNAL_FUNC(bbox_widget_destroy), window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) bbox_widget_destroy, window);
GTK_SIGNAL_FUNC(bbox_widget_destroy), window);
if (horizontal)
{
@ -469,7 +469,7 @@ create_bbox_window (gint horizontal,
gtk_container_add (GTK_CONTAINER(bbox), button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) bbox_widget_destroy, window);
GTK_SIGNAL_FUNC(bbox_widget_destroy), window);
gtk_widget_show (button);
@ -516,9 +516,9 @@ create_button_box ()
"Button Box Test");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window, &window);
GTK_SIGNAL_FUNC(destroy_window), &window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window, &window);
GTK_SIGNAL_FUNC(destroy_window), &window);
gtk_container_border_width (GTK_CONTAINER (window), 20);
@ -531,13 +531,13 @@ create_button_box ()
button = gtk_button_new_with_label ("Horizontal");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) test_hbbox, 0);
GTK_SIGNAL_FUNC(test_hbbox), 0);
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Vertical");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) test_vbbox, 0);
GTK_SIGNAL_FUNC(test_vbbox), 0);
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_widget_show (button);
}
@ -577,10 +577,10 @@ create_reparent ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "buttons");
@ -611,7 +611,7 @@ create_reparent ()
button = gtk_button_new_with_label ("switch");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) reparent_label,
GTK_SIGNAL_FUNC(reparent_label),
box3);
gtk_object_set_user_data (GTK_OBJECT (button), label);
gtk_box_pack_start (GTK_BOX (box3), button, FALSE, TRUE, 0);
@ -632,7 +632,7 @@ create_reparent ()
button = gtk_button_new_with_label ("switch");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) reparent_label,
GTK_SIGNAL_FUNC(reparent_label),
box3);
gtk_object_set_user_data (GTK_OBJECT (button), label);
gtk_box_pack_start (GTK_BOX (box3), button, FALSE, TRUE, 0);
@ -652,7 +652,7 @@ create_reparent ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -686,10 +686,10 @@ create_pixmap ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "pixmap");
@ -739,7 +739,7 @@ create_pixmap ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -768,10 +768,10 @@ create_tooltips ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "tooltips");
@ -821,7 +821,7 @@ create_tooltips ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -891,10 +891,10 @@ create_menus ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "menus");
@ -955,7 +955,7 @@ create_menus ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -984,10 +984,10 @@ create_scrolled_windows ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "dialog");
@ -1022,7 +1022,7 @@ create_scrolled_windows ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -1052,10 +1052,10 @@ create_entry ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "entry");
@ -1093,7 +1093,7 @@ create_entry ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1185,10 +1185,10 @@ create_list ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "list");
@ -1229,7 +1229,7 @@ create_list ()
button = gtk_button_new_with_label ("add");
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) list_add,
GTK_SIGNAL_FUNC(list_add),
list);
gtk_box_pack_start (GTK_BOX (box2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@ -1237,7 +1237,7 @@ create_list ()
button = gtk_button_new_with_label ("remove");
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) list_remove,
GTK_SIGNAL_FUNC(list_remove),
list);
gtk_box_pack_start (GTK_BOX (box2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@ -1256,7 +1256,7 @@ create_list ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1318,28 +1318,28 @@ create_color_selection ()
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (
GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (window)->colorsel),
"color_changed",
(GtkSignalFunc) color_selection_changed,
GTK_SIGNAL_FUNC(color_selection_changed),
window);
gtk_signal_connect (
GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (window)->ok_button),
"clicked",
(GtkSignalFunc) color_selection_ok,
GTK_SIGNAL_FUNC(color_selection_ok),
window);
gtk_signal_connect_object (
GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (window)->cancel_button),
"clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_widget_pop_colormap ();
@ -1371,17 +1371,17 @@ create_file_selection ()
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (window)->ok_button),
"clicked", (GtkSignalFunc) file_selection_ok,
"clicked", GTK_SIGNAL_FUNC(file_selection_ok),
window);
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (window)->cancel_button),
"clicked", (GtkSignalFunc) gtk_widget_destroy,
"clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
}
@ -1427,10 +1427,10 @@ create_dialog ()
dialog_window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (dialog_window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&dialog_window);
gtk_signal_connect (GTK_OBJECT (dialog_window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&dialog_window);
gtk_window_set_title (GTK_WINDOW (dialog_window), "dialog");
@ -1445,7 +1445,7 @@ create_dialog ()
button = gtk_button_new_with_label ("Toggle");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) label_toggle,
GTK_SIGNAL_FUNC(label_toggle),
&label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
@ -1482,10 +1482,10 @@ create_range_controls ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "range controls");
@ -1533,7 +1533,7 @@ create_range_controls ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1563,10 +1563,10 @@ create_rulers ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "rulers");
@ -1586,8 +1586,8 @@ create_rulers ()
gtk_signal_connect_object (
GTK_OBJECT (window),
"motion_notify_event",
(GtkSignalFunc)
GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event,
GTK_SIGNAL_FUNC(
GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event),
GTK_OBJECT (ruler));
gtk_table_attach (GTK_TABLE (table), ruler, 1, 2, 0, 1,
@ -1601,8 +1601,7 @@ create_rulers ()
gtk_signal_connect_object (
GTK_OBJECT (window),
"motion_notify_event",
(GtkSignalFunc)
GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event,
GTK_SIGNAL_FUNC (GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event),
GTK_OBJECT (ruler));
gtk_table_attach (GTK_TABLE (table), ruler, 0, 1, 1, 2,
@ -1639,10 +1638,10 @@ create_text ()
gtk_widget_set_name (window, "text window");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "test");
@ -1742,7 +1741,7 @@ create_text ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1786,10 +1785,10 @@ create_notebook ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "notebook");
@ -1844,7 +1843,7 @@ create_notebook ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1853,21 +1852,21 @@ create_notebook ()
button = gtk_button_new_with_label ("next");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_notebook_next_page,
GTK_SIGNAL_FUNC(gtk_notebook_next_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_with_label ("prev");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_notebook_prev_page,
GTK_SIGNAL_FUNC(gtk_notebook_prev_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_with_label ("rotate");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) rotate_notebook,
GTK_SIGNAL_FUNC(rotate_notebook),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
@ -1896,10 +1895,10 @@ create_panes ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Panes");
@ -1944,12 +1943,64 @@ create_panes ()
/*
* Drag -N- Drop
*/
gboolean
dnd_drop_destroy_popup (GtkWidget *widget, GtkWindow **window)
{
if(GTK_IS_BUTTON(widget)) /* I.e. they clicked the close button */
gtk_widget_destroy(GTK_WIDGET(*window));
else {
gtk_grab_remove(GTK_WIDGET(*window));
*window = NULL;
}
return TRUE;
}
void
dnd_drop (GtkWidget *button, GdkEvent *event)
{
g_print ("Got drop of type |%s| with data of:\n%s\n",
event->dropdataavailable.data_type,
event->dropdataavailable.data);
static GtkWidget *window = NULL;
GtkWidget *vbox, *lbl, *btn;
gchar *msg;
window = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_container_border_width (GTK_CONTAINER(window), 10);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(dnd_drop_destroy_popup),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC(dnd_drop_destroy_popup),
&window);
vbox = gtk_vbox_new(FALSE, 5);
/* Display message that we got from drop source */
msg = g_malloc(strlen(event->dropdataavailable.data)
+ strlen(event->dropdataavailable.data_type) + 100);
sprintf(msg, "Drop data of type %s was:\n\n%s",
event->dropdataavailable.data_type,
event->dropdataavailable.data);
lbl = gtk_label_new(msg);
gtk_label_set_justify(GTK_LABEL(lbl), GTK_JUSTIFY_FILL);
g_free(msg);
gtk_widget_show(lbl);
gtk_box_pack_start_defaults(GTK_BOX(vbox), lbl);
/* Provide an obvious way out of this heinousness */
btn = gtk_button_new_with_label("Continue with life in\nspite of this oppression");
gtk_signal_connect (GTK_OBJECT (btn), "clicked",
GTK_SIGNAL_FUNC(dnd_drop_destroy_popup),
&window);
gtk_widget_show(btn);
gtk_box_pack_start_defaults(GTK_BOX(vbox), btn);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show(vbox);
gtk_grab_add(window);
gtk_widget_show(window);
g_free (event->dropdataavailable.data);
g_free (event->dropdataavailable.data_type);
}
@ -1957,11 +2008,8 @@ dnd_drop (GtkWidget *button, GdkEvent *event)
void
dnd_drag_request (GtkWidget *button, GdkEvent *event)
{
g_print ("Button |%s| got drag request %d\n",
gtk_widget_get_name (button), event->type);
gtk_widget_dnd_data_set (button, event, "Hello world!!!",
strlen("Hello world!!!") + 1);
#define DND_STRING "Bill Gates demands royalties for\nyour use of his innovation."
gtk_widget_dnd_data_set (button, event, DND_STRING, strlen(DND_STRING) + 1);
}
void
@ -1975,17 +2023,19 @@ create_dnd ()
GtkWidget *frame;
GtkWidget *button;
GtkWidget *separator;
char *foo = "testing";
/* For clarity... */
char *possible_drag_types[] = {"text/plain"};
char *accepted_drop_types[] = {"text/plain"};
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Drag -N- Drop");
@ -2012,7 +2062,7 @@ create_dnd ()
/*
* FROM Button
*/
button = gtk_button_new_with_label ("From");
button = gtk_button_new_with_label ("Drag me!");
gtk_box_pack_start (GTK_BOX (box3), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@ -2021,12 +2071,12 @@ create_dnd ()
* set dnd on it, this needs to change
*/
gtk_widget_realize (button);
gtk_signal_connect (GTK_OBJECT (button),
gtk_signal_connect (GTK_OBJECT (button),
"drag_request_event",
(GtkSignalFunc) dnd_drag_request,
GTK_SIGNAL_FUNC(dnd_drag_request),
button);
gtk_widget_dnd_drag_set (button, TRUE, &foo, 1);
gtk_widget_dnd_drag_set (button, TRUE, possible_drag_types, 1);
frame = gtk_frame_new ("Drop");
@ -2049,10 +2099,10 @@ create_dnd ()
gtk_widget_realize (button);
gtk_signal_connect (GTK_OBJECT (button),
"drop_data_available_event",
(GtkSignalFunc) dnd_drop,
GTK_SIGNAL_FUNC(dnd_drop),
button);
gtk_widget_dnd_drop_set (button, TRUE, &foo, 1, FALSE);
gtk_widget_dnd_drop_set (button, TRUE, accepted_drop_types, 1, FALSE);
separator = gtk_hseparator_new ();
@ -2069,7 +2119,7 @@ create_dnd ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
@ -2203,10 +2253,10 @@ create_shapes ()
440, 140, 0,0, GTK_WINDOW_POPUP);
gtk_signal_connect (GTK_OBJECT (modeller), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&modeller);
gtk_signal_connect (GTK_OBJECT (modeller), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&modeller);
}
else
@ -2218,10 +2268,10 @@ create_shapes ()
580, 170, 0,0, GTK_WINDOW_POPUP);
gtk_signal_connect (GTK_OBJECT (sheets), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&sheets);
gtk_signal_connect (GTK_OBJECT (sheets), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&sheets);
}
@ -2234,10 +2284,10 @@ create_shapes ()
460, 270, 25,25, GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (rings), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&rings);
gtk_signal_connect (GTK_OBJECT (rings), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&rings);
}
else
@ -2288,10 +2338,10 @@ create_progress_bar ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_progress,
GTK_SIGNAL_FUNC(destroy_progress),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_progress,
GTK_SIGNAL_FUNC(destroy_progress),
&window);
gtk_window_set_title (GTK_WINDOW (window), "dialog");
@ -2318,7 +2368,7 @@ create_progress_bar ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2392,10 +2442,10 @@ create_color_preview ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) color_preview_destroy,
GTK_SIGNAL_FUNC(color_preview_destroy),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) color_preview_destroy,
GTK_SIGNAL_FUNC(color_preview_destroy),
&window);
gtk_window_set_title (GTK_WINDOW (window), "test");
@ -2485,10 +2535,10 @@ create_gray_preview ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) gray_preview_destroy,
GTK_SIGNAL_FUNC(gray_preview_destroy),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) gray_preview_destroy,
GTK_SIGNAL_FUNC(gray_preview_destroy),
&window);
gtk_window_set_title (GTK_WINDOW (window), "test");
@ -2600,10 +2650,10 @@ create_selection_test ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Selection Test");
@ -2681,10 +2731,10 @@ create_gamma_curve ()
gtk_container_border_width (GTK_CONTAINER (window), 10);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
curve = gtk_gamma_curve_new ();
@ -2768,10 +2818,10 @@ create_timeout_test ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_timeout_test,
GTK_SIGNAL_FUNC(destroy_timeout_test),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_timeout_test,
GTK_SIGNAL_FUNC(destroy_timeout_test),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Timeout Test");
@ -2785,7 +2835,7 @@ create_timeout_test ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2795,7 +2845,7 @@ create_timeout_test ()
button = gtk_button_new_with_label ("start");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) start_timeout_test,
GTK_SIGNAL_FUNC(start_timeout_test),
label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2804,7 +2854,7 @@ create_timeout_test ()
button = gtk_button_new_with_label ("stop");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) stop_timeout_test,
GTK_SIGNAL_FUNC(stop_timeout_test),
NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2877,10 +2927,10 @@ create_idle_test ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_idle_test,
GTK_SIGNAL_FUNC(destroy_idle_test),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_idle_test,
GTK_SIGNAL_FUNC(destroy_idle_test),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Idle Test");
@ -2894,7 +2944,7 @@ create_idle_test ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2904,7 +2954,7 @@ create_idle_test ()
button = gtk_button_new_with_label ("start");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) start_idle_test,
GTK_SIGNAL_FUNC(start_idle_test),
label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2913,7 +2963,7 @@ create_idle_test ()
button = gtk_button_new_with_label ("stop");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) stop_idle_test,
GTK_SIGNAL_FUNC(stop_idle_test),
NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2948,10 +2998,10 @@ create_test ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) test_destroy,
GTK_SIGNAL_FUNC(test_destroy),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) test_destroy,
GTK_SIGNAL_FUNC(test_destroy),
&window);
@ -3037,10 +3087,10 @@ create_main_window ()
gtk_widget_set_uposition (window, 20, 20);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) gtk_exit,
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) gtk_exit,
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
box1 = gtk_vbox_new (FALSE, 0);
@ -3066,8 +3116,8 @@ create_main_window ()
if (buttons[i].func)
gtk_signal_connect (GTK_OBJECT (button),
"clicked",
(GtkSignalFunc)
buttons[i].func, NULL);
GTK_SIGNAL_FUNC(buttons[i].func),
NULL);
else
gtk_widget_set_sensitive (button, FALSE);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
@ -3085,7 +3135,7 @@ create_main_window ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) do_exit, NULL);
GTK_SIGNAL_FUNC(do_exit), NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);

View File

@ -54,10 +54,10 @@ create_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "buttons");
@ -87,7 +87,7 @@ create_buttons ()
button[8] = gtk_button_new_with_label ("button9");
gtk_signal_connect (GTK_OBJECT (button[0]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[1]);
gtk_table_attach (GTK_TABLE (table), button[0], 0, 1, 0, 1,
@ -95,7 +95,7 @@ create_buttons ()
gtk_widget_show (button[0]);
gtk_signal_connect (GTK_OBJECT (button[1]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[2]);
gtk_table_attach (GTK_TABLE (table), button[1], 1, 2, 1, 2,
@ -103,49 +103,49 @@ create_buttons ()
gtk_widget_show (button[1]);
gtk_signal_connect (GTK_OBJECT (button[2]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[3]);
gtk_table_attach (GTK_TABLE (table), button[2], 2, 3, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[2]);
gtk_signal_connect (GTK_OBJECT (button[3]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[4]);
gtk_table_attach (GTK_TABLE (table), button[3], 0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[3]);
gtk_signal_connect (GTK_OBJECT (button[4]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[5]);
gtk_table_attach (GTK_TABLE (table), button[4], 2, 3, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[4]);
gtk_signal_connect (GTK_OBJECT (button[5]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[6]);
gtk_table_attach (GTK_TABLE (table), button[5], 1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[5]);
gtk_signal_connect (GTK_OBJECT (button[6]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[7]);
gtk_table_attach (GTK_TABLE (table), button[6], 1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[6]);
gtk_signal_connect (GTK_OBJECT (button[7]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[8]);
gtk_table_attach (GTK_TABLE (table), button[7], 2, 3, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (button[7]);
gtk_signal_connect (GTK_OBJECT (button[8]), "clicked",
(GtkSignalFunc) button_window,
GTK_SIGNAL_FUNC(button_window),
button[0]);
gtk_table_attach (GTK_TABLE (table), button[8], 0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
@ -165,7 +165,7 @@ create_buttons ()
button[9] = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button[9]), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button[9], TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button[9], GTK_CAN_DEFAULT);
@ -193,10 +193,10 @@ create_toggle_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "toggle buttons");
@ -240,7 +240,7 @@ create_toggle_buttons ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -268,10 +268,10 @@ create_check_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "check buttons");
@ -315,7 +315,7 @@ create_check_buttons ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -343,10 +343,10 @@ create_radio_buttons ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "radio buttons");
@ -395,7 +395,7 @@ create_radio_buttons ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -433,9 +433,9 @@ create_bbox_window (gint horizontal,
gtk_window_set_title (GTK_WINDOW (window), title);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) bbox_widget_destroy, window);
GTK_SIGNAL_FUNC(bbox_widget_destroy), window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) bbox_widget_destroy, window);
GTK_SIGNAL_FUNC(bbox_widget_destroy), window);
if (horizontal)
{
@ -469,7 +469,7 @@ create_bbox_window (gint horizontal,
gtk_container_add (GTK_CONTAINER(bbox), button);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) bbox_widget_destroy, window);
GTK_SIGNAL_FUNC(bbox_widget_destroy), window);
gtk_widget_show (button);
@ -516,9 +516,9 @@ create_button_box ()
"Button Box Test");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window, &window);
GTK_SIGNAL_FUNC(destroy_window), &window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window, &window);
GTK_SIGNAL_FUNC(destroy_window), &window);
gtk_container_border_width (GTK_CONTAINER (window), 20);
@ -531,13 +531,13 @@ create_button_box ()
button = gtk_button_new_with_label ("Horizontal");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) test_hbbox, 0);
GTK_SIGNAL_FUNC(test_hbbox), 0);
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_widget_show (button);
button = gtk_button_new_with_label ("Vertical");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) test_vbbox, 0);
GTK_SIGNAL_FUNC(test_vbbox), 0);
gtk_container_add (GTK_CONTAINER (bbox), button);
gtk_widget_show (button);
}
@ -577,10 +577,10 @@ create_reparent ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "buttons");
@ -611,7 +611,7 @@ create_reparent ()
button = gtk_button_new_with_label ("switch");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) reparent_label,
GTK_SIGNAL_FUNC(reparent_label),
box3);
gtk_object_set_user_data (GTK_OBJECT (button), label);
gtk_box_pack_start (GTK_BOX (box3), button, FALSE, TRUE, 0);
@ -632,7 +632,7 @@ create_reparent ()
button = gtk_button_new_with_label ("switch");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) reparent_label,
GTK_SIGNAL_FUNC(reparent_label),
box3);
gtk_object_set_user_data (GTK_OBJECT (button), label);
gtk_box_pack_start (GTK_BOX (box3), button, FALSE, TRUE, 0);
@ -652,7 +652,7 @@ create_reparent ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -686,10 +686,10 @@ create_pixmap ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "pixmap");
@ -739,7 +739,7 @@ create_pixmap ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -768,10 +768,10 @@ create_tooltips ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "tooltips");
@ -821,7 +821,7 @@ create_tooltips ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -891,10 +891,10 @@ create_menus ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "menus");
@ -955,7 +955,7 @@ create_menus ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -984,10 +984,10 @@ create_scrolled_windows ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "dialog");
@ -1022,7 +1022,7 @@ create_scrolled_windows ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -1052,10 +1052,10 @@ create_entry ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "entry");
@ -1093,7 +1093,7 @@ create_entry ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1185,10 +1185,10 @@ create_list ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "list");
@ -1229,7 +1229,7 @@ create_list ()
button = gtk_button_new_with_label ("add");
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) list_add,
GTK_SIGNAL_FUNC(list_add),
list);
gtk_box_pack_start (GTK_BOX (box2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@ -1237,7 +1237,7 @@ create_list ()
button = gtk_button_new_with_label ("remove");
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) list_remove,
GTK_SIGNAL_FUNC(list_remove),
list);
gtk_box_pack_start (GTK_BOX (box2), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@ -1256,7 +1256,7 @@ create_list ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1318,28 +1318,28 @@ create_color_selection ()
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (
GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (window)->colorsel),
"color_changed",
(GtkSignalFunc) color_selection_changed,
GTK_SIGNAL_FUNC(color_selection_changed),
window);
gtk_signal_connect (
GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (window)->ok_button),
"clicked",
(GtkSignalFunc) color_selection_ok,
GTK_SIGNAL_FUNC(color_selection_ok),
window);
gtk_signal_connect_object (
GTK_OBJECT (GTK_COLOR_SELECTION_DIALOG (window)->cancel_button),
"clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_widget_pop_colormap ();
@ -1371,17 +1371,17 @@ create_file_selection ()
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (window)->ok_button),
"clicked", (GtkSignalFunc) file_selection_ok,
"clicked", GTK_SIGNAL_FUNC(file_selection_ok),
window);
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (window)->cancel_button),
"clicked", (GtkSignalFunc) gtk_widget_destroy,
"clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
}
@ -1427,10 +1427,10 @@ create_dialog ()
dialog_window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (dialog_window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&dialog_window);
gtk_signal_connect (GTK_OBJECT (dialog_window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&dialog_window);
gtk_window_set_title (GTK_WINDOW (dialog_window), "dialog");
@ -1445,7 +1445,7 @@ create_dialog ()
button = gtk_button_new_with_label ("Toggle");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) label_toggle,
GTK_SIGNAL_FUNC(label_toggle),
&label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_window)->action_area),
@ -1482,10 +1482,10 @@ create_range_controls ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "range controls");
@ -1533,7 +1533,7 @@ create_range_controls ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1563,10 +1563,10 @@ create_rulers ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "rulers");
@ -1586,8 +1586,8 @@ create_rulers ()
gtk_signal_connect_object (
GTK_OBJECT (window),
"motion_notify_event",
(GtkSignalFunc)
GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event,
GTK_SIGNAL_FUNC(
GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event),
GTK_OBJECT (ruler));
gtk_table_attach (GTK_TABLE (table), ruler, 1, 2, 0, 1,
@ -1601,8 +1601,7 @@ create_rulers ()
gtk_signal_connect_object (
GTK_OBJECT (window),
"motion_notify_event",
(GtkSignalFunc)
GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event,
GTK_SIGNAL_FUNC (GTK_WIDGET_CLASS (GTK_OBJECT (ruler)->klass)->motion_notify_event),
GTK_OBJECT (ruler));
gtk_table_attach (GTK_TABLE (table), ruler, 0, 1, 1, 2,
@ -1639,10 +1638,10 @@ create_text ()
gtk_widget_set_name (window, "text window");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "test");
@ -1742,7 +1741,7 @@ create_text ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1786,10 +1785,10 @@ create_notebook ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "notebook");
@ -1844,7 +1843,7 @@ create_notebook ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
@ -1853,21 +1852,21 @@ create_notebook ()
button = gtk_button_new_with_label ("next");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_notebook_next_page,
GTK_SIGNAL_FUNC(gtk_notebook_next_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_with_label ("prev");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_notebook_prev_page,
GTK_SIGNAL_FUNC(gtk_notebook_prev_page),
GTK_OBJECT (notebook));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
button = gtk_button_new_with_label ("rotate");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) rotate_notebook,
GTK_SIGNAL_FUNC(rotate_notebook),
notebook);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
@ -1896,10 +1895,10 @@ create_panes ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Panes");
@ -1944,12 +1943,64 @@ create_panes ()
/*
* Drag -N- Drop
*/
gboolean
dnd_drop_destroy_popup (GtkWidget *widget, GtkWindow **window)
{
if(GTK_IS_BUTTON(widget)) /* I.e. they clicked the close button */
gtk_widget_destroy(GTK_WIDGET(*window));
else {
gtk_grab_remove(GTK_WIDGET(*window));
*window = NULL;
}
return TRUE;
}
void
dnd_drop (GtkWidget *button, GdkEvent *event)
{
g_print ("Got drop of type |%s| with data of:\n%s\n",
event->dropdataavailable.data_type,
event->dropdataavailable.data);
static GtkWidget *window = NULL;
GtkWidget *vbox, *lbl, *btn;
gchar *msg;
window = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_container_border_width (GTK_CONTAINER(window), 10);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(dnd_drop_destroy_popup),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC(dnd_drop_destroy_popup),
&window);
vbox = gtk_vbox_new(FALSE, 5);
/* Display message that we got from drop source */
msg = g_malloc(strlen(event->dropdataavailable.data)
+ strlen(event->dropdataavailable.data_type) + 100);
sprintf(msg, "Drop data of type %s was:\n\n%s",
event->dropdataavailable.data_type,
event->dropdataavailable.data);
lbl = gtk_label_new(msg);
gtk_label_set_justify(GTK_LABEL(lbl), GTK_JUSTIFY_FILL);
g_free(msg);
gtk_widget_show(lbl);
gtk_box_pack_start_defaults(GTK_BOX(vbox), lbl);
/* Provide an obvious way out of this heinousness */
btn = gtk_button_new_with_label("Continue with life in\nspite of this oppression");
gtk_signal_connect (GTK_OBJECT (btn), "clicked",
GTK_SIGNAL_FUNC(dnd_drop_destroy_popup),
&window);
gtk_widget_show(btn);
gtk_box_pack_start_defaults(GTK_BOX(vbox), btn);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show(vbox);
gtk_grab_add(window);
gtk_widget_show(window);
g_free (event->dropdataavailable.data);
g_free (event->dropdataavailable.data_type);
}
@ -1957,11 +2008,8 @@ dnd_drop (GtkWidget *button, GdkEvent *event)
void
dnd_drag_request (GtkWidget *button, GdkEvent *event)
{
g_print ("Button |%s| got drag request %d\n",
gtk_widget_get_name (button), event->type);
gtk_widget_dnd_data_set (button, event, "Hello world!!!",
strlen("Hello world!!!") + 1);
#define DND_STRING "Bill Gates demands royalties for\nyour use of his innovation."
gtk_widget_dnd_data_set (button, event, DND_STRING, strlen(DND_STRING) + 1);
}
void
@ -1975,17 +2023,19 @@ create_dnd ()
GtkWidget *frame;
GtkWidget *button;
GtkWidget *separator;
char *foo = "testing";
/* For clarity... */
char *possible_drag_types[] = {"text/plain"};
char *accepted_drop_types[] = {"text/plain"};
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Drag -N- Drop");
@ -2012,7 +2062,7 @@ create_dnd ()
/*
* FROM Button
*/
button = gtk_button_new_with_label ("From");
button = gtk_button_new_with_label ("Drag me!");
gtk_box_pack_start (GTK_BOX (box3), button, FALSE, TRUE, 0);
gtk_widget_show (button);
@ -2021,12 +2071,12 @@ create_dnd ()
* set dnd on it, this needs to change
*/
gtk_widget_realize (button);
gtk_signal_connect (GTK_OBJECT (button),
gtk_signal_connect (GTK_OBJECT (button),
"drag_request_event",
(GtkSignalFunc) dnd_drag_request,
GTK_SIGNAL_FUNC(dnd_drag_request),
button);
gtk_widget_dnd_drag_set (button, TRUE, &foo, 1);
gtk_widget_dnd_drag_set (button, TRUE, possible_drag_types, 1);
frame = gtk_frame_new ("Drop");
@ -2049,10 +2099,10 @@ create_dnd ()
gtk_widget_realize (button);
gtk_signal_connect (GTK_OBJECT (button),
"drop_data_available_event",
(GtkSignalFunc) dnd_drop,
GTK_SIGNAL_FUNC(dnd_drop),
button);
gtk_widget_dnd_drop_set (button, TRUE, &foo, 1, FALSE);
gtk_widget_dnd_drop_set (button, TRUE, accepted_drop_types, 1, FALSE);
separator = gtk_hseparator_new ();
@ -2069,7 +2119,7 @@ create_dnd ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
@ -2203,10 +2253,10 @@ create_shapes ()
440, 140, 0,0, GTK_WINDOW_POPUP);
gtk_signal_connect (GTK_OBJECT (modeller), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&modeller);
gtk_signal_connect (GTK_OBJECT (modeller), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&modeller);
}
else
@ -2218,10 +2268,10 @@ create_shapes ()
580, 170, 0,0, GTK_WINDOW_POPUP);
gtk_signal_connect (GTK_OBJECT (sheets), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&sheets);
gtk_signal_connect (GTK_OBJECT (sheets), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&sheets);
}
@ -2234,10 +2284,10 @@ create_shapes ()
460, 270, 25,25, GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (rings), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&rings);
gtk_signal_connect (GTK_OBJECT (rings), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&rings);
}
else
@ -2288,10 +2338,10 @@ create_progress_bar ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_progress,
GTK_SIGNAL_FUNC(destroy_progress),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_progress,
GTK_SIGNAL_FUNC(destroy_progress),
&window);
gtk_window_set_title (GTK_WINDOW (window), "dialog");
@ -2318,7 +2368,7 @@ create_progress_bar ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2392,10 +2442,10 @@ create_color_preview ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) color_preview_destroy,
GTK_SIGNAL_FUNC(color_preview_destroy),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) color_preview_destroy,
GTK_SIGNAL_FUNC(color_preview_destroy),
&window);
gtk_window_set_title (GTK_WINDOW (window), "test");
@ -2485,10 +2535,10 @@ create_gray_preview ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) gray_preview_destroy,
GTK_SIGNAL_FUNC(gray_preview_destroy),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) gray_preview_destroy,
GTK_SIGNAL_FUNC(gray_preview_destroy),
&window);
gtk_window_set_title (GTK_WINDOW (window), "test");
@ -2600,10 +2650,10 @@ create_selection_test ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Selection Test");
@ -2681,10 +2731,10 @@ create_gamma_curve ()
gtk_container_border_width (GTK_CONTAINER (window), 10);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_window,
GTK_SIGNAL_FUNC(destroy_window),
&window);
curve = gtk_gamma_curve_new ();
@ -2768,10 +2818,10 @@ create_timeout_test ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_timeout_test,
GTK_SIGNAL_FUNC(destroy_timeout_test),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_timeout_test,
GTK_SIGNAL_FUNC(destroy_timeout_test),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Timeout Test");
@ -2785,7 +2835,7 @@ create_timeout_test ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2795,7 +2845,7 @@ create_timeout_test ()
button = gtk_button_new_with_label ("start");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) start_timeout_test,
GTK_SIGNAL_FUNC(start_timeout_test),
label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2804,7 +2854,7 @@ create_timeout_test ()
button = gtk_button_new_with_label ("stop");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) stop_timeout_test,
GTK_SIGNAL_FUNC(stop_timeout_test),
NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2877,10 +2927,10 @@ create_idle_test ()
window = gtk_dialog_new ();
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) destroy_idle_test,
GTK_SIGNAL_FUNC(destroy_idle_test),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) destroy_idle_test,
GTK_SIGNAL_FUNC(destroy_idle_test),
&window);
gtk_window_set_title (GTK_WINDOW (window), "Idle Test");
@ -2894,7 +2944,7 @@ create_idle_test ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2904,7 +2954,7 @@ create_idle_test ()
button = gtk_button_new_with_label ("start");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) start_idle_test,
GTK_SIGNAL_FUNC(start_idle_test),
label);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2913,7 +2963,7 @@ create_idle_test ()
button = gtk_button_new_with_label ("stop");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) stop_idle_test,
GTK_SIGNAL_FUNC(stop_idle_test),
NULL);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area),
@ -2948,10 +2998,10 @@ create_test ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) test_destroy,
GTK_SIGNAL_FUNC(test_destroy),
&window);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) test_destroy,
GTK_SIGNAL_FUNC(test_destroy),
&window);
@ -3037,10 +3087,10 @@ create_main_window ()
gtk_widget_set_uposition (window, 20, 20);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
(GtkSignalFunc) gtk_exit,
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
(GtkSignalFunc) gtk_exit,
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
box1 = gtk_vbox_new (FALSE, 0);
@ -3066,8 +3116,8 @@ create_main_window ()
if (buttons[i].func)
gtk_signal_connect (GTK_OBJECT (button),
"clicked",
(GtkSignalFunc)
buttons[i].func, NULL);
GTK_SIGNAL_FUNC(buttons[i].func),
NULL);
else
gtk_widget_set_sensitive (button, FALSE);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
@ -3085,7 +3135,7 @@ create_main_window ()
button = gtk_button_new_with_label ("close");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) do_exit, NULL);
GTK_SIGNAL_FUNC(do_exit), NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);