Fix building.

git-svn-id: svn://localhost/ardour2/trunk@2791 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard
2007-12-18 07:20:02 +00:00
parent 35fc31a1de
commit 47a41c0d4d
107 changed files with 30979 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I scripts
SUBDIRS = tools glib examples docs scripts tests MSVC_Net2003
SUBDIRS = tools glib examples scripts tests MSVC_Net2003
DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST = build_shared/Makefile_build.am_fragment \

View File

@@ -23152,10 +23152,7 @@ AUTOHEADER=':'
ac_config_files="$ac_config_files Makefile glib/Makefile glib/glibmm-2.4.pc glib/src/Makefile glib/glibmm/Makefile glib/glibmm/private/Makefile tools/Makefile tools/gmmproc tools/generate_wrap_init.pl tools/m4/Makefile tools/pm/Makefile tools/extra_defs_gen/Makefile"
ac_config_files="$ac_config_files tests/Makefile tests/glibmm_value/Makefile examples/Makefile examples/markup/Makefile examples/options/Makefile examples/thread/Makefile examples/iochannel_stream/Makefile examples/child_watch/Makefile examples/regex/Makefile scripts/Makefile docs/Makefile docs/images/Makefile docs/reference/Makefile docs/reference/Doxyfile docs/reference/beautify_docs.pl docs/internal/Makefile"
ac_config_files="$ac_config_files MSVC_Net2003/Makefile MSVC_Net2003/gendef/Makefile MSVC_Net2003/glibmm/Makefile MSVC_Net2003/glibmm/glibmm.rc MSVC_Net2003/examples/Makefile MSVC_Net2003/examples/dispatcher/Makefile MSVC_Net2003/examples/dispatcher2/Makefile MSVC_Net2003/examples/markup/Makefile MSVC_Net2003/examples/options/Makefile MSVC_Net2003/examples/thread/Makefile MSVC_Net2003/examples/thread_pool/Makefile MSVC_Net2003/tests/Makefile MSVC_Net2003/tests/glibmm_value/Makefile"
ac_config_files="$ac_config_files tests/Makefile tests/glibmm_value/Makefile examples/Makefile examples/markup/Makefile examples/options/Makefile examples/thread/Makefile examples/iochannel_stream/Makefile examples/child_watch/Makefile examples/regex/Makefile scripts/Makefile"
cat >confcache <<\_ACEOF
@@ -23789,12 +23786,6 @@ do
"examples/child_watch/Makefile") CONFIG_FILES="$CONFIG_FILES examples/child_watch/Makefile" ;;
"examples/regex/Makefile") CONFIG_FILES="$CONFIG_FILES examples/regex/Makefile" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
"docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
"docs/images/Makefile") CONFIG_FILES="$CONFIG_FILES docs/images/Makefile" ;;
"docs/reference/Makefile") CONFIG_FILES="$CONFIG_FILES docs/reference/Makefile" ;;
"docs/reference/Doxyfile") CONFIG_FILES="$CONFIG_FILES docs/reference/Doxyfile" ;;
"docs/reference/beautify_docs.pl") CONFIG_FILES="$CONFIG_FILES docs/reference/beautify_docs.pl" ;;
"docs/internal/Makefile") CONFIG_FILES="$CONFIG_FILES docs/internal/Makefile" ;;
"MSVC_Net2003/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC_Net2003/Makefile" ;;
"MSVC_Net2003/gendef/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC_Net2003/gendef/Makefile" ;;
"MSVC_Net2003/glibmm/Makefile") CONFIG_FILES="$CONFIG_FILES MSVC_Net2003/glibmm/Makefile" ;;

View File

@@ -0,0 +1,21 @@
example_dirs = markup options thread iochannel_stream child_watch regex
# These use gtkmm stuff:
# thread
SUBDIRS = $(example_dirs)
EXTRA_DIST = README Makefile.am_fragment
#Web upload:
include $(top_srcdir)/docs/Makefile_web.am_fragment
web_path = $(web_path_gtkmm)examples
#rsync --cvs-exclude ignores *.o and anything in .cvsignore and some more:
rsync_options = -vzr --rsh ssh --cvs-exclude --delete-excluded --exclude=.libs --exclude=.deps --exclude=core --exclude=.cvsignore --exclude=a.out --exclude=Makefile --exclude=Makefile.in
post-html:
rsync $(rsync_options) $(example_dirs) $$USER@$(web_host):$(web_path)
.PHONY: post-html

View File

@@ -0,0 +1,40 @@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFS = @DEFS@
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes))
glibmm_docdir = $(datadir)/doc/glibmm-2.4
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src

View File

@@ -0,0 +1,530 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/docs/Makefile_web.am_fragment
subdir = examples
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
example_dirs = markup options thread iochannel_stream child_watch regex
# These use gtkmm stuff:
# thread
SUBDIRS = $(example_dirs)
EXTRA_DIST = README Makefile.am_fragment
web_host = gtkmm.org
web_path_gtkmm = /home/murrayc/gtkmm.org/docs/glibmm-2.4/
#web_path_gtkmm = /home/groups/g/gt/gtkmm/htdocs/docs/glibmm-2.4/
web_path_docs = $(web_path_gtkmm)docs/
rsync_args = -vz --rsh ssh
gtkmm_docdir = $(datadir)/doc/glibmm-2.4/docs
#Web upload:
web_path = $(web_path_gtkmm)examples
#rsync --cvs-exclude ignores *.o and anything in .cvsignore and some more:
rsync_options = -vzr --rsh ssh --cvs-exclude --delete-excluded --exclude=.libs --exclude=.deps --exclude=core --exclude=.cvsignore --exclude=a.out --exclude=Makefile --exclude=Makefile.in
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/docs/Makefile_web.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am
post-html:
rsync $(rsync_options) $(example_dirs) $$USER@$(web_host):$(web_path)
.PHONY: post-html
# 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:

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,11 @@
include $(top_srcdir)/examples/Makefile.am_fragment
# fork() does not work on win32
if OS_WIN32
else
#Build the executable, but don't install it.
noinst_PROGRAMS = child_watch
child_watch_SOURCES = main.cc
endif

View File

@@ -0,0 +1,493 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/examples/Makefile.am_fragment
@OS_WIN32_FALSE@noinst_PROGRAMS = child_watch$(EXEEXT)
subdir = examples/child_watch
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am__child_watch_SOURCES_DIST = main.cc
@OS_WIN32_FALSE@am_child_watch_OBJECTS = main.$(OBJEXT)
child_watch_OBJECTS = $(am_child_watch_OBJECTS)
child_watch_LDADD = $(LDADD)
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(child_watch_SOURCES)
DIST_SOURCES = $(am__child_watch_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes))
glibmm_docdir = $(datadir)/doc/glibmm-2.4
@OS_WIN32_FALSE@child_watch_SOURCES = main.cc
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/examples/Makefile.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/child_watch/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/child_watch/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
child_watch$(EXEEXT): $(child_watch_OBJECTS) $(child_watch_DEPENDENCIES)
@rm -f child_watch$(EXEEXT)
$(CXXLINK) $(child_watch_OBJECTS) $(child_watch_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-local
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src
# 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:

View File

@@ -0,0 +1,69 @@
/* Copyright (C) 2005 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm.h>
#include <sys/types.h>
#include <unistd.h>
#include <iostream>
using namespace std;
class ChildWatch : public sigc::trackable
{
public:
ChildWatch(const Glib::RefPtr<Glib::MainLoop>& mainLoop)
: m_mainLoop(mainLoop)
{}
void on_child_exited(GPid pid,int status);
void run(); // fork a child and call signal_child_watch
private:
Glib::RefPtr<Glib::MainLoop> m_mainLoop;
};
void ChildWatch::run()
{
GPid pid = fork();
if(pid==0)
{
sleep(5);
exit(0);
}
std:: cout << "Child " << pid << " created" << std::endl;
Glib::signal_child_watch().connect(sigc::mem_fun(*this, &ChildWatch::on_child_exited), pid);
}
void ChildWatch::on_child_exited(GPid pid, int status)
{
std::cout << "Child " << pid << " exited with status " << status << std::endl;
m_mainLoop->quit();
}
int main()
{
Glib::RefPtr<Glib::MainLoop> mainLoop = Glib::MainLoop::create();
ChildWatch cwatch(mainLoop);
cwatch.run();
mainLoop->run();
return 0;
}

View File

@@ -0,0 +1,11 @@
include $(top_srcdir)/examples/Makefile.am_fragment
#Build the executable, but don't install it.
# Don't build natively (mingw32) on win32 as mkfifo is
# not supported (TODO: implement with CreateNamedPipe).
if OS_WIN32
else
noinst_PROGRAMS = example
example_SOURCES = main.cc fdstream.h fdstream.cc
endif

View File

@@ -0,0 +1,503 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/examples/Makefile.am_fragment
@OS_WIN32_FALSE@noinst_PROGRAMS = example$(EXEEXT)
subdir = examples/iochannel_stream
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am__example_SOURCES_DIST = main.cc fdstream.h fdstream.cc
@OS_WIN32_FALSE@am_example_OBJECTS = main.$(OBJEXT) fdstream.$(OBJEXT)
example_OBJECTS = $(am_example_OBJECTS)
example_LDADD = $(LDADD)
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(example_SOURCES)
DIST_SOURCES = $(am__example_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes))
glibmm_docdir = $(datadir)/doc/glibmm-2.4
@OS_WIN32_FALSE@example_SOURCES = main.cc fdstream.h fdstream.cc
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/examples/Makefile.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/iochannel_stream/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/iochannel_stream/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
example$(EXEEXT): $(example_OBJECTS) $(example_DEPENDENCIES)
@rm -f example$(EXEEXT)
$(CXXLINK) $(example_OBJECTS) $(example_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdstream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-local
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src
# 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:

View File

@@ -0,0 +1,402 @@
/* Copyright (C) 2004 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "fdstream.h"
#include <glibmm/main.h>
fdstreambuf::fdstreambuf()
{
reset();
}
fdstreambuf::fdstreambuf(int fd, bool manage)
{
create_iochannel(fd, manage);
}
fdstreambuf::~fdstreambuf()
{
sync();
}
void fdstreambuf::reset()
{
setg(putback_buffer + 1, putback_buffer + 1, putback_buffer + 1);
error_condition.error = false;
}
void fdstreambuf::create_iochannel(int fd, bool manage)
{
sync();
reset();
if(fd >= 0)
{
iochannel_ = Glib::IOChannel::create_from_fd(fd);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
iochannel_->set_encoding("");
#else
std::auto_ptr<Glib::Error> ex;
iochannel_->set_encoding("", ex);
#endif //GLIBMM_EXCEPTIONS_ENABLED
iochannel_->set_buffered(true);
iochannel_->set_close_on_unref(manage);
}
}
void fdstreambuf::detach_fd()
{
iochannel_->set_close_on_unref(false);
}
void fdstreambuf::connect(const sigc::slot<bool, Glib::IOCondition>& callback,
Glib::IOCondition condition)
{
Glib::signal_io().connect(callback, iochannel_, condition);
}
fdstream_error fdstreambuf::get_error() const
{
return error_condition;
}
// the standard requires sync to return 0 for success and -1 for error
int fdstreambuf::sync()
{
if (!iochannel_)
return -1;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
iochannel_->flush();
}
catch(Glib::IOChannelError& io_error)
{
error_condition.error = true;
error_condition.code = io_error.code();
return -1;
}
#else
std::auto_ptr<Glib::Error> io_error;
iochannel_->flush(io_error);
if(io_error.get())
{
error_condition.error = true;
error_condition.code = (Glib::IOChannelError::Code)io_error->code();
return -1;
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
return 0;
}
void fdstreambuf::close_iochannel()
{
iochannel_->set_close_on_unref(false);
reset();
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
iochannel_->close(true);
}
catch(Glib::IOChannelError& io_error)
{
error_condition.error = true;
error_condition.code = io_error.code();
}
#else
std::auto_ptr<Glib::Error> io_error;
iochannel_->close(true, io_error);
if(io_error.get())
{
error_condition.error = true;
error_condition.code = (Glib::IOChannelError::Code)io_error->code();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
// the standard requires this to return either the character
// written on overflow or traits_type::eof() (= EOF with char_type == char)
fdstreambuf::traits_type::int_type fdstreambuf::overflow(int_type c)
{
if(!traits_type::eq_int_type(c, traits_type::eof()))
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
gsize result = 0;
char write_char = c;
iochannel_->write(&write_char, 1, result);
}
catch(Glib::IOChannelError& io_error)
{
error_condition.error = true;
error_condition.code = io_error.code();
return traits_type::eof();
}
#else
std::auto_ptr<Glib::Error> io_error;
gsize result = 0;
char write_char = c;
iochannel_->write(&write_char, 1, result, io_error);
if(io_error.get())
{
error_condition.error = true;
error_condition.code = (Glib::IOChannelError::Code)io_error->code();
return traits_type::eof();;
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
return traits_type::not_eof(c);
}
// the standard requires this to return the number of characters written
// (which will be 0 for stream failure - it is not correct to return EOF)
std::streamsize fdstreambuf::xsputn(const char* source, std::streamsize num)
{
gsize result = 0;
// the documentation for Glib::IOChannel indicates that Glib::IOChannel::write()
// will only do a short write in the event of stream failure, so there is no
// need to check result and have a second bite (byte) at it as would be
// necessary with Unix write()
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
iochannel_->write(source, num, result);
}
catch(Glib::IOChannelError& io_error)
{
error_condition.error = true;
error_condition.code = io_error.code();
result = 0;
}
#else
std::auto_ptr<Glib::Error> io_error;
iochannel_->write(source, num, result, io_error);
if(io_error.get())
{
error_condition.error = true;
error_condition.code = (Glib::IOChannelError::Code)io_error->code();
result = 0;
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
return result;
}
// the standard requires this to return the first character available
// on underflow or traits_type::eof() (= EOF with char_type == char)
fdstreambuf::traits_type::int_type fdstreambuf::underflow()
{
if(gptr() < egptr())
return traits_type::to_int_type(*gptr());
// copy the character in bump position (if any) to putback position
if(gptr() - eback())
*putback_buffer = *(gptr() - 1);
// now insert a character into the bump position
gsize result = 0;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
iochannel_->read(putback_buffer + 1, 1, result);
}
catch(Glib::IOChannelError& io_error)
{
error_condition.error = true;
error_condition.code = io_error.code();
return traits_type::eof();
}
#else
std::auto_ptr<Glib::Error> io_error;
iochannel_->read(putback_buffer + 1, 1, result, io_error);
if(io_error.get())
{
error_condition.error = true;
error_condition.code = (Glib::IOChannelError::Code)io_error->code();
return traits_type::eof();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
// some other error - is this possible? In case it is, cater for it
if (result == 0)
return traits_type::eof();
// reset buffer pointers
setg(putback_buffer,
putback_buffer + 1,
putback_buffer + 2);
// return character in bump/peek position
return traits_type::to_int_type(*gptr()); // == *(putback_buffer + 1)
}
// the standard requires this to return the number of characters fetched
// (which will be 0 for stream failure - it is not correct to return EOF)
std::streamsize fdstreambuf::xsgetn(char* dest, std::streamsize num)
{
std::streamsize chars_read = 0;
// available would normally be 0, but could be up to 2 if there
// have been putbacks or a peek and a putback
std::streamsize available = egptr() - gptr();
// if num is less than or equal to the characters already in the
// putback buffer, extract from buffer
if (num <= available)
{
traits_type::copy(dest, gptr(), num);
gbump(num);
chars_read = num;
}
else
{
// first copy out putback buffer
if (available)
{
traits_type::copy(dest, gptr(), available);
chars_read = available;
}
// read up to everything else we need with Glib::IOChannel::read()
gsize result = 0;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
#else
std::auto_ptr<Glib::Error> io_error;
#endif //GLIBMM_EXCEPTIONS_ENABLED
do
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
iochannel_->read(dest + chars_read,
num - chars_read,
result);
#else
iochannel_->read(dest + chars_read,
num - chars_read,
result, io_error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
if (result > 0)
chars_read += result;
}
while (result > 0 && result < static_cast<gsize>(num - chars_read));
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(Glib::IOChannelError& io_error)
#else
if(io_error.get())
#endif //GLIBMM_EXCEPTIONS_ENABLED
{
error_condition.error = true;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
error_condition.code = io_error.code();
#else
error_condition.code = (Glib::IOChannelError::Code)io_error->code();
#endif //GLIBMM_EXCEPTIONS_ENABLED
return chars_read;
}
if(chars_read)
{
// now mimic extraction of all characters by sbumpc() by putting
// two characters into the buffer (if available) and resetting the
// buffer pointers
int putback_count = 0;
if(chars_read >= 2)
{
*putback_buffer = *(dest + (chars_read - 2));
putback_count = 2;
}
else
{ // if we have reached here then we have only fetched
// one character and it must have been read with
// Glib::IOChannel::read() and not taken from the
// putback buffer - otherwise we would have ended
// at the first if block in this method
// - and this also means that gptr() == egptr()
if(gptr() - eback())
{
*putback_buffer = *(gptr() - 1);
putback_count = 2;
}
else putback_count = 1;
}
*(putback_buffer + 1) = *(dest + (chars_read - 1));
// reset buffer pointers
this->setg(putback_buffer + (2 - putback_count),
putback_buffer + 2,
putback_buffer + 2);
}
}
return chars_read;
}
fdstream::fdstream(int fd, bool manage)
: std::istream(0),
std::ostream(0),
buf(fd, manage)
{
std::istream::rdbuf(&buf);
std::ostream::rdbuf(&buf);
}
fdstream::fdstream()
: std::istream(0),
std::ostream(0)
{
std::istream::rdbuf(&buf);
std::ostream::rdbuf(&buf);
}
void fdstream::attach(int fd, bool manage)
{
buf.create_iochannel(fd, manage);
}
void fdstream::detach()
{
buf.detach_fd();
}
void fdstream::close()
{
buf.close_iochannel();
}
void fdstream::connect(const sigc::slot<bool, Glib::IOCondition>& callback,
Glib::IOCondition condition)
{
buf.connect(callback, condition);
}
fdstream_error fdstream::get_error() const
{
return buf.get_error();
}

View File

@@ -0,0 +1,121 @@
/* Copyright (C) 2004 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* The fdstream/fdstreambuf example classes provide a streambuffer
* interface for Glib::IOChannel, so that standard iostreams can be
* used with fifos, pipes and sockets, with safe temporary files
* opened with mkstemp() and with files opened with other system
* functions such as Unix open().
*
* It does not make use of the Glib::IOChannel automatic charset code
* conversion facilities (which when enabled will convert from UTF-8
* to the locale codeset when writing out, and vice-versa when reading
* in). Such automatic codeset conversion is usually undesirable as
* it makes the target file unportable - a file written out in the
* locale charset can only be used by those expecting the same locale
* codeset. It is also unnecessary as the <<() and >>() operators for
* Glib::ustring already carry out this codeset conversion (to avoid
* this use Glib::ustring::raw() when writing out to a stream via
* operator <<(), and read in via a std::string object with operator
* >>()).
*
* If an automatic codeset conversion option is thought to be
* valuable, it would be possible to provide this by having a read
* buffer in fdstreambuf large enough to take and putback six bytes
* (the largest space occupied by a UTF-8 character). This would
* require rewriting fdstreambuf::underflow(), but in compensation
* fdstreambuf::xsgetn() could be omitted, as if a read buffer were
* provided then std::streambuf::xsgetn() would be adequate for the
* purpose by itself.
*
* A serious implementation would probably also provide separate
* read-only ifdstream classes and write-only ofdstream classes, as
* fdstream provides both read and write facilities.
*/
#ifndef GLIBMMEXAMPLE_FDSTREAM_H
#define GLIBMMEXAMPLE_FDSTREAM_H
#include <istream>
#include <ostream>
#include <streambuf>
#include <glibmm/iochannel.h>
struct fdstream_error
{
bool error;
Glib::IOChannelError::Code code;
};
class fdstreambuf: public std::streambuf
{
public:
fdstreambuf(int fd, bool manage);
fdstreambuf();
~fdstreambuf();
void create_iochannel(int fd, bool manage);
void detach_fd();
void close_iochannel();
void connect(const sigc::slot<bool, Glib::IOCondition>& callback, Glib::IOCondition condition);
fdstream_error get_error() const;
protected:
virtual int_type underflow();
virtual std::streamsize xsgetn(char* dest, std::streamsize num);
virtual int sync();
virtual int_type overflow(int_type c);
virtual std::streamsize xsputn(const char* source, std::streamsize num);
private:
Glib::RefPtr<Glib::IOChannel> iochannel_;
fdstream_error error_condition;
// putback_buffer does not do any buffering: it reserves one character
// for putback and one character for a peek() and/or for bumping
// with sbumpc/uflow()
char putback_buffer[2];
void reset();
};
class fdstream :
public std::istream,
public std::ostream
{
public:
explicit fdstream(int fd, bool manage = true);
fdstream();
// If fdstream is managing a file descriptor, attaching a new
// one will close the old one - call detach() to unmanage it
void attach(int fd, bool manage = true);
void detach();
void close();
void connect(const sigc::slot<bool, Glib::IOCondition>& callback,
Glib::IOCondition condition);
fdstream_error get_error() const;
private:
fdstreambuf buf;
};
#endif /*GLIBMMEXAMPLE_FDSTREAM_H*/

View File

@@ -0,0 +1,102 @@
/* Copyright (C) 2004 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <iostream>
#include <string>
#include "fdstream.h"
fdstream input_stream;
Glib::RefPtr<Glib::MainLoop> mainloop;
/*
send to the fifo with:
echo "Hello" > testfifo
quit the program with:
echo "Q" > testfifo
*/
// this will be our signal handler for read operations
// it will print out the message sent to the fifo
// and quit the program if the message was, or began
// with, 'Q'
bool MyCallback(Glib::IOCondition io_condition)
{
if ((io_condition & Glib::IO_IN) == 0)
{
std::cerr << "Invalid fifo response" << std::endl;
}
else
{
// stream for stdout (does the same as std::cout
// - this is an example of using fdstream for output)
fdstream out(1, false);
std::string text;
input_stream >> text;
out << text << std::endl;
if (text[0] == 'Q')
mainloop->quit();
}
return true;
}
int main( /* int argc, char *argv[] */)
{
Glib::init();
// the usual Glib::Main object
mainloop = Glib::MainLoop::create();
if(access("testfifo", F_OK) == -1)
{
// fifo doesn't exit - create it
if (mkfifo("testfifo", 0666) != 0)
{
std::cerr << "error creating fifo" << std::endl;
return -1;
}
}
int read_fd = open("testfifo", O_RDONLY);
if(read_fd == -1)
{
std::cerr << "error opening fifo" << std::endl;
return -1;
}
input_stream.attach(read_fd);
input_stream.connect(sigc::ptr_fun(MyCallback), Glib::IO_IN);
// and last but not least - run the application main loop
mainloop->run();
// now remove the temporary fifo
if(unlink("testfifo"))
std::cerr << "error removing fifo" << std::endl;
return 0;
}

View File

@@ -0,0 +1,8 @@
include $(top_srcdir)/examples/Makefile.am_fragment
EXTRA_DIST = test.xml
#Build the executable, but don't install it.
noinst_PROGRAMS = parser
parser_SOURCES = parser.cc

View File

@@ -0,0 +1,493 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/examples/Makefile.am_fragment
noinst_PROGRAMS = parser$(EXEEXT)
subdir = examples/markup
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_parser_OBJECTS = parser.$(OBJEXT)
parser_OBJECTS = $(am_parser_OBJECTS)
parser_LDADD = $(LDADD)
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(parser_SOURCES)
DIST_SOURCES = $(parser_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes))
glibmm_docdir = $(datadir)/doc/glibmm-2.4
EXTRA_DIST = test.xml
parser_SOURCES = parser.cc
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/examples/Makefile.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/markup/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/markup/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
parser$(EXEEXT): $(parser_OBJECTS) $(parser_DEPENDENCIES)
@rm -f parser$(EXEEXT)
$(CXXLINK) $(parser_OBJECTS) $(parser_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-local
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src
# 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:

View File

@@ -0,0 +1,176 @@
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm.h>
#include <iomanip>
#include <iostream>
namespace
{
#ifndef GLIBMM_EXCEPTIONS_ENABLED
//This is an alternative, to use when we have disabled exceptions:
std::auto_ptr<Glib::Error> processing_error;
#endif //GLIBMM_EXCEPTIONS_ENABLED
void file_get_contents(const std::string& filename, Glib::ustring& contents)
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
const Glib::RefPtr<Glib::IOChannel> channel = Glib::IOChannel::create_from_file(filename, "r");
channel->read_to_end(contents);
#else
const Glib::RefPtr<Glib::IOChannel> channel = Glib::IOChannel::create_from_file(filename, "r", processing_error);
channel->read_to_end(contents, processing_error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
Glib::ustring trim_whitespace(const Glib::ustring& text)
{
Glib::ustring::const_iterator pbegin (text.begin());
Glib::ustring::const_iterator pend (text.end());
while(pbegin != pend && Glib::Unicode::isspace(*pbegin))
++pbegin;
Glib::ustring::const_iterator temp (pend);
while(pbegin != temp && Glib::Unicode::isspace(*--temp))
pend = temp;
return Glib::ustring(pbegin, pend);
}
class DumpParser : public Glib::Markup::Parser
{
public:
DumpParser();
virtual ~DumpParser();
protected:
virtual void on_start_element(Glib::Markup::ParseContext& context,
const Glib::ustring& element_name,
const AttributeMap& attributes);
virtual void on_end_element(Glib::Markup::ParseContext& context,
const Glib::ustring& element_name);
virtual void on_text(Glib::Markup::ParseContext& context, const Glib::ustring& text);
private:
int parse_depth_;
void indent();
};
DumpParser::DumpParser()
:
parse_depth_ (0)
{}
DumpParser::~DumpParser()
{}
void DumpParser::on_start_element(Glib::Markup::ParseContext&,
const Glib::ustring& element_name,
const AttributeMap& attributes)
{
indent();
std::cout << '<' << element_name;
for(AttributeMap::const_iterator p = attributes.begin(); p != attributes.end(); ++p)
{
std::cout << ' ' << p->first << "=\"" << p->second << '"';
}
std::cout << ">\n";
++parse_depth_;
}
void DumpParser::on_end_element(Glib::Markup::ParseContext&, const Glib::ustring& element_name)
{
--parse_depth_;
indent();
std::cout << "</" << element_name << ">\n";
}
void DumpParser::on_text(Glib::Markup::ParseContext&, const Glib::ustring& text)
{
const Glib::ustring trimmed_text = trim_whitespace(text);
if(!trimmed_text.empty())
{
indent();
std::cout << trimmed_text << '\n';
}
}
void DumpParser::indent()
{
if(parse_depth_ > 0)
{
std::cout << std::setw(4 * parse_depth_)
/* gcc 2.95.3 doesn't like this: << std::right */
<< ' ';
}
}
} // anonymous namespace
int main(int argc, char** argv)
{
if(argc < 2)
{
std::cerr << "Usage: parser filename\n";
return 1;
}
DumpParser parser;
Glib::Markup::ParseContext context (parser);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::ustring contents;
file_get_contents(argv[1], contents);
context.parse(contents);
context.end_parse();
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(const Glib::Error& error)
{
std::cerr << argv[1] << ": " << error.what() << std::endl;
return 1;
}
#else
if(processing_error.get())
{
std::cerr << argv[1] << ": " << processing_error->what() << std::endl;
return 1;
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
return 0;
}

View File

@@ -0,0 +1,73 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<widget class="GtkDialog" id="DialogBasic">
<property name="title" translatable="yes">basic libglademm example</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="has_separator">True</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area2">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">10</property>
<child>
<widget class="GtkButton" id="quit_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-quit</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="label" translatable="yes">This is a basic libglademm example</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View File

@@ -0,0 +1,6 @@
include $(top_srcdir)/examples/Makefile.am_fragment
#Build the executable, but don't install it.
noinst_PROGRAMS = example
example_SOURCES = main.cc

View File

@@ -0,0 +1,492 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/examples/Makefile.am_fragment
noinst_PROGRAMS = example$(EXEEXT)
subdir = examples/options
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_example_OBJECTS = main.$(OBJEXT)
example_OBJECTS = $(am_example_OBJECTS)
example_LDADD = $(LDADD)
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(example_SOURCES)
DIST_SOURCES = $(example_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes))
glibmm_docdir = $(datadir)/doc/glibmm-2.4
example_SOURCES = main.cc
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/examples/Makefile.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/options/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/options/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
example$(EXEEXT): $(example_OBJECTS) $(example_DEPENDENCIES)
@rm -f example$(EXEEXT)
$(CXXLINK) $(example_OBJECTS) $(example_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-local
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src
# 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:

View File

@@ -0,0 +1,146 @@
/* Copyright (C) 2004 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm.h>
#include <iomanip>
#include <iostream>
class ExampleOptionGroup : public Glib::OptionGroup
{
public:
ExampleOptionGroup();
virtual bool on_pre_parse(Glib::OptionContext& context, Glib::OptionGroup& group);
virtual bool on_post_parse(Glib::OptionContext& context, Glib::OptionGroup& group);
virtual void on_error(Glib::OptionContext& context, Glib::OptionGroup& group);
//These int instances should live as long as the OptionGroup to which they are added,
//and as long as the OptionContext to which those OptionGroups are added.
int m_arg_foo;
std::string m_arg_filename;
Glib::ustring m_arg_goo;
bool m_arg_boolean;
Glib::OptionGroup::vecustrings m_arg_list;
};
ExampleOptionGroup::ExampleOptionGroup()
: Glib::OptionGroup("example_group", "description of example group", "help description of example group"),
m_arg_foo(0), m_arg_boolean(false)
{
Glib::OptionEntry entry1;
entry1.set_long_name("foo");
entry1.set_short_name('f');
entry1.set_description("The Foo");
add_entry(entry1, m_arg_foo);
Glib::OptionEntry entry2;
entry2.set_long_name("file");
entry2.set_short_name('F');
entry2.set_description("The Filename");
add_entry_filename(entry2, m_arg_filename);
Glib::OptionEntry entry3;
entry3.set_long_name("goo");
entry3.set_short_name('g');
entry3.set_description("The Goo");
m_arg_goo = "default-goo-value"; //We can choose a default to be used if the user doesn't specify this option.
add_entry(entry3, m_arg_goo);
Glib::OptionEntry entry4;
entry4.set_long_name("activate_something");
entry4.set_description("Activate something");
add_entry(entry4, m_arg_boolean);
Glib::OptionEntry entry5;
entry5.set_long_name("list");
entry5.set_short_name('l');
entry5.set_description("The List");
add_entry(entry5, m_arg_list);
}
bool ExampleOptionGroup::on_pre_parse(Glib::OptionContext& context, Glib::OptionGroup& group)
{
//This is called before the m_arg_* instances are given their values.
// You do not need to override this method. This is just here to show you how,
// in case you want to do any extra processing.
return Glib::OptionGroup::on_pre_parse(context, group);
}
bool ExampleOptionGroup::on_post_parse(Glib::OptionContext& context, Glib::OptionGroup& group)
{
//This is called after the m_arg_* instances are given their values.
// You do not need to override this method. This is just here to show you how,
// in case you want to do any extra processing.
return Glib::OptionGroup::on_post_parse(context, group);
}
void ExampleOptionGroup::on_error(Glib::OptionContext& context, Glib::OptionGroup& group)
{
Glib::OptionGroup::on_error(context, group);
}
int main(int argc, char** argv)
{
//This example should be executed like so:
//./example --foo=1 --bar=2 --goo=abc
//./example --help
Glib::init();
Glib::OptionContext context;
ExampleOptionGroup group;
context.set_main_group(group);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
context.parse(argc, argv);
}
catch(const Glib::Error& ex)
{
std::cout << "Exception: " << ex.what() << std::endl;
}
#else
std::auto_ptr<Glib::Error> ex;
context.parse(argc, argv, ex);
if(ex.get())
{
std::cout << "Exception: " << ex->what() << std::endl;
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
std::cout << "parsed values: " << std::endl <<
" foo = " << group.m_arg_foo << std::endl <<
" filename = " << group.m_arg_filename << std::endl <<
" activate_something = " << (group.m_arg_boolean ? "enabled" : "disabled") << std::endl <<
" goo = " << group.m_arg_goo << std::endl;
//This one shows the results of multiple instance of the same option, such as --list=1 --list=a --list=b
std::cout << " list = ";
for(Glib::OptionGroup::vecustrings::const_iterator iter = group.m_arg_list.begin(); iter != group.m_arg_list.end(); ++iter)
{
std::cout << *iter << ", ";
}
std::cout << std::endl;
return 0;
}

View File

@@ -0,0 +1,6 @@
include $(top_srcdir)/examples/Makefile.am_fragment
#Build the executable, but don't install it.
noinst_PROGRAMS = example
example_SOURCES = main.cc

View File

@@ -0,0 +1,492 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/examples/Makefile.am_fragment
noinst_PROGRAMS = example$(EXEEXT)
subdir = examples/regex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_example_OBJECTS = main.$(OBJEXT)
example_OBJECTS = $(am_example_OBJECTS)
example_LDADD = $(LDADD)
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(example_SOURCES)
DIST_SOURCES = $(example_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes))
glibmm_docdir = $(datadir)/doc/glibmm-2.4
example_SOURCES = main.cc
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/examples/Makefile.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/regex/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/regex/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
example$(EXEEXT): $(example_OBJECTS) $(example_DEPENDENCIES)
@rm -f example$(EXEEXT)
$(CXXLINK) $(example_OBJECTS) $(example_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-local
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src
# 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:

View File

@@ -0,0 +1,49 @@
/* Copyright (C) 2004 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm.h>
#include <iostream>
Glib::ustring bool_text (bool val)
{
return val ? "true" : "false";
}
int main(int argc, char** argv)
{
Glib::init();
/* Reusing one regex pattern: */
Glib::RefPtr<Glib::Regex> regex = Glib::Regex::create ("(a)?(b)");
std::cout << "Pattern=" << regex->get_pattern()
<< ", with string=abcd, result="
<< bool_text( regex->match("abcd") )
<< std::endl;
std::cout << "Pattern=" << regex->get_pattern()
<< ", with string=1234, result="
<< bool_text( regex->match("1234") )
<< std::endl;
std::cout << std::endl;
/* Using the static function without a regex instance: */
std::cout << "Pattern=b* with string=abcd, result="
<< bool_text( Glib::Regex::match_simple("b*", "abcd") )
<< std::endl;
return 0;
}

View File

@@ -0,0 +1,19 @@
include $(top_srcdir)/examples/Makefile.am_fragment
INCLUDES += $(GTHREAD_CFLAGS)
## Build the executable, but don't install it.
noinst_PROGRAMS = dispatcher dispatcher2 thread threadpool
dispatcher_SOURCES = dispatcher.cc
dispatcher_LDFLAGS = $(GTHREAD_LIBS)
dispatcher2_SOURCES = dispatcher2.cc
dispatcher2_LDFLAGS = $(GTHREAD_LIBS)
thread_SOURCES = thread.cc
thread_LDFLAGS = $(GTHREAD_LIBS)
threadpool_SOURCES = threadpool.cc
threadpool_LDFLAGS = $(GTHREAD_LIBS)

View File

@@ -0,0 +1,535 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/examples/Makefile.am_fragment
noinst_PROGRAMS = dispatcher$(EXEEXT) dispatcher2$(EXEEXT) \
thread$(EXEEXT) threadpool$(EXEEXT)
subdir = examples/thread
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_dispatcher_OBJECTS = dispatcher.$(OBJEXT)
dispatcher_OBJECTS = $(am_dispatcher_OBJECTS)
dispatcher_LDADD = $(LDADD)
dispatcher_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(dispatcher_LDFLAGS) $(LDFLAGS) -o $@
am_dispatcher2_OBJECTS = dispatcher2.$(OBJEXT)
dispatcher2_OBJECTS = $(am_dispatcher2_OBJECTS)
dispatcher2_LDADD = $(LDADD)
dispatcher2_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(dispatcher2_LDFLAGS) $(LDFLAGS) -o $@
am_thread_OBJECTS = thread.$(OBJEXT)
thread_OBJECTS = $(am_thread_OBJECTS)
thread_LDADD = $(LDADD)
thread_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(thread_LDFLAGS) $(LDFLAGS) -o $@
am_threadpool_OBJECTS = threadpool.$(OBJEXT)
threadpool_OBJECTS = $(am_threadpool_OBJECTS)
threadpool_LDADD = $(LDADD)
threadpool_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(threadpool_LDFLAGS) $(LDFLAGS) -o $@
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(dispatcher_SOURCES) $(dispatcher2_SOURCES) \
$(thread_SOURCES) $(threadpool_SOURCES)
DIST_SOURCES = $(dispatcher_SOURCES) $(dispatcher2_SOURCES) \
$(thread_SOURCES) $(threadpool_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(local_glibmm_lib) $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
local_glibmm_lib = $(top_builddir)/glib/glibmm/libglibmm-2.4.la
all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib \
$(GLIBMM_CFLAGS) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS)
DEFAULT_INCLUDES =
INCLUDES = -I. -I$(srcdir) $(strip $(all_includes)) $(GTHREAD_CFLAGS)
glibmm_docdir = $(datadir)/doc/glibmm-2.4
dispatcher_SOURCES = dispatcher.cc
dispatcher_LDFLAGS = $(GTHREAD_LIBS)
dispatcher2_SOURCES = dispatcher2.cc
dispatcher2_LDFLAGS = $(GTHREAD_LIBS)
thread_SOURCES = thread.cc
thread_LDFLAGS = $(GTHREAD_LIBS)
threadpool_SOURCES = threadpool.cc
threadpool_LDFLAGS = $(GTHREAD_LIBS)
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/examples/Makefile.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/thread/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/thread/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
dispatcher$(EXEEXT): $(dispatcher_OBJECTS) $(dispatcher_DEPENDENCIES)
@rm -f dispatcher$(EXEEXT)
$(dispatcher_LINK) $(dispatcher_OBJECTS) $(dispatcher_LDADD) $(LIBS)
dispatcher2$(EXEEXT): $(dispatcher2_OBJECTS) $(dispatcher2_DEPENDENCIES)
@rm -f dispatcher2$(EXEEXT)
$(dispatcher2_LINK) $(dispatcher2_OBJECTS) $(dispatcher2_LDADD) $(LIBS)
thread$(EXEEXT): $(thread_OBJECTS) $(thread_DEPENDENCIES)
@rm -f thread$(EXEEXT)
$(thread_LINK) $(thread_OBJECTS) $(thread_LDADD) $(LIBS)
threadpool$(EXEEXT): $(threadpool_OBJECTS) $(threadpool_DEPENDENCIES)
@rm -f threadpool$(EXEEXT)
$(threadpool_LINK) $(threadpool_OBJECTS) $(threadpool_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatcher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatcher2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threadpool.Po@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-data-local
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-local
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-local
install-example-src:
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(glibmm_docdir)/$(subdir)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
uninstall-example-src:
@$(NORMAL_UNINSTALL)
for p in $(srcdir)/*.cc $(srcdir)/*.h; do \
if test -f $$p; then \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f"; \
rm -f $(DESTDIR)$(glibmm_docdir)/$(subdir)/$$f; \
fi; \
done
install-data-local: install-example-src
uninstall-local: uninstall-example-src
.PHONY: install-example-src uninstall-example-src
# 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:

View File

@@ -0,0 +1,226 @@
/*
* Glib::Dispatcher example -- cross thread signalling
* by Daniel Elstner <daniel.kitta@gmail.com>
*
* modified to only use glibmm
* by J. Abelardo Gutierrez <jabelardo@cantv.net>
*
* Copyright (c) 2002-2003 Free Software Foundation
*/
#include <glibmm.h>
#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
namespace
{
/*
* Note that it does not make sense for this class to inherit from
* sigc::trackable, as doing so would only give a false sense of security.
* Once the thread launch has been triggered, the object has to stay alive
* until the thread has been joined again. The code running in the thread
* assumes the existence of the object. If it is destroyed earlier, the
* program will crash, with sigc::trackable or without it.
*/
class ThreadProgress
{
public:
explicit ThreadProgress(int id);
virtual ~ThreadProgress();
int id() const;
void launch();
void join();
bool unfinished() const;
sigc::signal<void>& signal_finished();
private:
enum { ITERATIONS = 100 };
// Note that the thread does not write to the member data at all. It only
// reads signal_increment_, which is only written to before the thread is
// lauched. Therefore, no locking is required.
Glib::Thread* thread_;
int id_;
unsigned int progress_;
Glib::Dispatcher signal_increment_;
sigc::signal<void> signal_finished_;
void progress_increment();
void thread_function();
};
class Application : public sigc::trackable
{
public:
Application();
virtual ~Application();
void run();
private:
Glib::RefPtr<Glib::MainLoop> main_loop_;
std::vector<ThreadProgress*> progress_threads_;
void launch_threads();
void on_progress_finished(ThreadProgress* thread_progress);
};
template <class T>
class DeletePtr : public std::unary_function<void, T>
{
public:
void operator()(T ptr) const { delete ptr; }
};
ThreadProgress::ThreadProgress(int id)
:
thread_ (0),
id_ (id),
progress_ (0)
{
// Connect to the cross-thread signal.
signal_increment_.connect(sigc::mem_fun(*this, &ThreadProgress::progress_increment));
}
ThreadProgress::~ThreadProgress()
{
// It is an error if the thread is still running at this point.
g_return_if_fail(thread_ == 0);
}
int ThreadProgress::id() const
{
return id_;
}
void ThreadProgress::launch()
{
// Create a joinable thread.
thread_ = Glib::Thread::create(sigc::mem_fun(*this, &ThreadProgress::thread_function), true);
}
void ThreadProgress::join()
{
thread_->join();
thread_ = 0;
}
bool ThreadProgress::unfinished() const
{
return (progress_ < ITERATIONS);
}
sigc::signal<void>& ThreadProgress::signal_finished()
{
return signal_finished_;
}
void ThreadProgress::progress_increment()
{
++progress_;
std::cout << "Thread " << id_ << ": " << progress_ << '%' << std::endl;
if (progress_ >= ITERATIONS)
signal_finished_();
}
void ThreadProgress::thread_function()
{
Glib::Rand rand;
for (int i = 0; i < ITERATIONS; ++i)
{
Glib::usleep(rand.get_int_range(2000, 20000));
// Tell the main thread to increment the progress value.
signal_increment_();
}
}
Application::Application()
:
main_loop_ (Glib::MainLoop::create()),
progress_threads_ (5)
{
// Note that unless you're targetting an embedded platform, you can assume
// exceptions to be enabled. The #ifdef is only here to make the example
// compile in either case; you may ignore it otherwise.
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
#endif
{
for (std::vector<ThreadProgress*>::size_type i = 0; i < progress_threads_.size(); ++i)
{
ThreadProgress *const progress = new ThreadProgress(i + 1);
progress_threads_[i] = progress;
progress->signal_finished().connect(
sigc::bind<1>(sigc::mem_fun(*this, &Application::on_progress_finished), progress));
}
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
catch (...)
{
// In your own code, you should preferably use a smart pointer
// to ensure exception safety.
std::for_each(progress_threads_.begin(), progress_threads_.end(),
DeletePtr<ThreadProgress*>());
throw;
}
#endif
}
Application::~Application()
{
std::for_each(progress_threads_.begin(), progress_threads_.end(),
DeletePtr<ThreadProgress*>());
}
void Application::run()
{
// Install a one-shot idle handler to launch the threads.
Glib::signal_idle().connect(
sigc::bind_return(sigc::mem_fun(*this, &Application::launch_threads), false));
main_loop_->run();
}
void Application::launch_threads()
{
std::cout << "Launching " << progress_threads_.size() << " threads:" << std::endl;
std::for_each(progress_threads_.begin(), progress_threads_.end(),
std::mem_fun(&ThreadProgress::launch));
}
void Application::on_progress_finished(ThreadProgress* thread_progress)
{
thread_progress->join();
std::cout << "Thread " << thread_progress->id() << ": finished." << std::endl;
// Quit if it was the last thread to be joined.
if (std::find_if(progress_threads_.begin(), progress_threads_.end(),
std::mem_fun(&ThreadProgress::unfinished)) == progress_threads_.end())
{
main_loop_->quit();
}
}
} // anonymous namespace
int main(int, char**)
{
Glib::thread_init();
Application application;
application.run();
return 0;
}

View File

@@ -0,0 +1,232 @@
/*
* original Glib::Dispatcher example -- cross thread signalling
* by Daniel Elstner <daniel.elstner@gmx.net>
*
* Modified by Stephan Puchegger <stephan.puchegger@ap.univie.ac.at>
* to contain 2 mainloops in 2 different threads, that communicate
* via cross thread signalling in both directions. The timer thread
* sends the UI thread a cross thread signal every second, which in turn
* updates the label stating how many seconds have passed since the start
* of the program.
*
* Modified by J. Abelardo Gutierrez <jabelardo@cantv.net>
* to cast all gtkmm out and make it glimm only
*
* Note: This example is special stuff that's seldomly needed by the
* vast majority of applications. Don't bother working out what this
* code does unless you know for sure you need 2 main loops running in
* 2 distinct main contexts.
*
* Copyright (c) 2002-2003 Free Software Foundation
*/
#include <glibmm.h>
#include <sstream>
#include <iostream>
namespace
{
Glib::RefPtr<Glib::MainLoop> main_loop;
class ThreadTimer : public sigc::trackable
{
public:
ThreadTimer();
~ThreadTimer();
void launch();
void signal_finished_emit();
void print() const;
typedef sigc::signal<void> type_signal_end;
static type_signal_end& signal_end();
private:
unsigned int time_;
Glib::Dispatcher signal_increment_;
Glib::Dispatcher* signal_finished_ptr_;
Glib::Mutex startup_mutex_;
Glib::Cond startup_cond_;
Glib::Thread* thread_;
static type_signal_end signal_end_;
void timer_increment();
bool timeout_handler();
static void finished_handler(Glib::RefPtr<Glib::MainLoop> mainloop);
void thread_function();
};
//TODO: Rename to avoid confusion with Glib::Dispatcher. murrayc
class Dispatcher : public sigc::trackable
{
public:
Dispatcher();
void launch_thread();
void end();
private:
ThreadTimer* timer_;
};
ThreadTimer::ThreadTimer()
:
time_ (0),
// Create a new dispatcher that is attached to the default main context,
signal_increment_ (),
// This pointer will be initialized later by the 2nd thread.
signal_finished_ptr_ (NULL)
{
// Connect the cross-thread signal.
signal_increment_.connect(sigc::mem_fun(*this, &ThreadTimer::timer_increment));
}
ThreadTimer::~ThreadTimer()
{}
void ThreadTimer::launch()
{
// Unfortunately, the thread creation has to be fully synchronized in
// order to access the Dispatcher object instantiated by the 2nd thread.
// So, let's do some kind of hand-shake using a mutex and a condition
// variable.
Glib::Mutex::Lock lock (startup_mutex_);
// Create a joinable thread -- it needs to be joined, otherwise it's a memory leak.
thread_ = Glib::Thread::create(
sigc::mem_fun(*this, &ThreadTimer::thread_function), true);
// Wait for the 2nd thread's startup notification.
while(signal_finished_ptr_ == NULL)
startup_cond_.wait(startup_mutex_);
}
void ThreadTimer::signal_finished_emit()
{
// Cause the 2nd thread's main loop to quit.
signal_finished_ptr_->emit();
// wait for the thread to join
if(thread_ != NULL)
thread_->join();
signal_finished_ptr_ = NULL;
}
void ThreadTimer::print() const
{
std::cout << time_ << " seconds since start" << std::endl;
}
sigc::signal< void >& ThreadTimer::signal_end()
{
return signal_end_;
}
void ThreadTimer::timer_increment()
{
// another second has passed since the start of the program
++time_;
print();
if(time_ >= 10)
signal_finished_emit();
}
// static
void ThreadTimer::finished_handler(Glib::RefPtr<Glib::MainLoop> mainloop)
{
// quit the timer thread mainloop
mainloop->quit();
std::cout << "timer thread mainloop finished" << std::endl;
ThreadTimer::signal_end().emit();
}
bool ThreadTimer::timeout_handler()
{
// inform the printing thread that another second has passed
signal_increment_();
// this timer should stay alive
return true;
}
void ThreadTimer::thread_function()
{
// create a new Main Context
Glib::RefPtr<Glib::MainContext> context = Glib::MainContext::create();
// create a new Main Loop
Glib::RefPtr<Glib::MainLoop> mainloop = Glib::MainLoop::create(context, true);
// attach a timeout handler, that is called every second, to the
// newly created MainContext
context->signal_timeout().connect(sigc::mem_fun(*this, &ThreadTimer::timeout_handler), 1000);
// We need to lock while creating the Dispatcher instance,
// in order to ensure memory visibility.
Glib::Mutex::Lock lock (startup_mutex_);
// create a new dispatcher, that is connected to the newly
// created MainContext
Glib::Dispatcher signal_finished (context);
signal_finished.connect(sigc::bind(sigc::ptr_fun(&ThreadTimer::finished_handler), mainloop));
signal_finished_ptr_ = &signal_finished;
// Tell the launcher thread that everything is in place now.
startup_cond_.signal();
lock.release();
// start the mainloop
mainloop->run();
}
// initialize static member:
ThreadTimer::type_signal_end ThreadTimer::signal_end_;
Dispatcher::Dispatcher()
:
timer_ (NULL)
{
std::cout << "Thread Dispatcher Example #2" << std::endl;
timer_ = new ThreadTimer();
timer_->signal_end().connect(sigc::mem_fun(*this, &Dispatcher::end));
timer_->print();
}
void Dispatcher::launch_thread()
{
// launch the timer thread
timer_->launch();
}
void Dispatcher::end()
{
// quit the main mainloop
main_loop->quit();
}
} // anonymous namespace
int main(int, char**)
{
Glib::thread_init();
main_loop = Glib::MainLoop::create();
Dispatcher dispatcher;
// Install a one-shot idle handler to launch the threads
Glib::signal_idle().connect(
sigc::bind_return(sigc::mem_fun(dispatcher, &Dispatcher::launch_thread), false));
main_loop->run();
return 0;
}

View File

@@ -0,0 +1,113 @@
#include <iostream>
#include <queue>
#include <glibmm/random.h>
#include <glibmm/thread.h>
#include <glibmm/timer.h>
namespace
{
class MessageQueue : public sigc::trackable
{
public:
MessageQueue();
~MessageQueue();
void producer();
void consumer();
private:
Glib::Mutex mutex_;
Glib::Cond cond_push_;
Glib::Cond cond_pop_;
std::queue<int> queue_;
};
MessageQueue::MessageQueue()
{}
MessageQueue::~MessageQueue()
{}
void MessageQueue::producer()
{
Glib::Rand rand (1234);
for(int i = 0; i < 200; ++i)
{
{
Glib::Mutex::Lock lock (mutex_);
while(queue_.size() >= 64)
cond_pop_.wait(mutex_);
queue_.push(i);
std::cout << '*';
std::cout.flush();
cond_push_.signal();
}
if(rand.get_bool())
continue;
Glib::usleep(rand.get_int_range(0, 100000));
}
}
void MessageQueue::consumer()
{
Glib::Rand rand (4567);
for(;;)
{
{
Glib::Mutex::Lock lock (mutex_);
while(queue_.empty())
cond_push_.wait(mutex_);
const int i = queue_.front();
queue_.pop();
std::cout << "\x08 \x08";
std::cout.flush();
cond_pop_.signal();
if(i >= 199)
break;
}
if(rand.get_bool())
continue;
Glib::usleep(rand.get_int_range(10000, 200000));
}
}
}
int main(int, char**)
{
Glib::thread_init();
MessageQueue queue;
Glib::Thread *const producer = Glib::Thread::create(
sigc::mem_fun(queue, &MessageQueue::producer), true);
Glib::Thread *const consumer = Glib::Thread::create(
sigc::mem_fun(queue, &MessageQueue::consumer), true);
producer->join();
consumer->join();
std::cout << std::endl;
return 0;
}

View File

@@ -0,0 +1,49 @@
#include <iostream>
#include <glibmm/random.h>
#include <glibmm/thread.h>
#include <glibmm/threadpool.h>
#include <glibmm/timer.h>
namespace
{
Glib::StaticMutex mutex = GLIBMM_STATIC_MUTEX_INIT;
void print_char(char c)
{
Glib::Rand rand;
for(int i = 0; i < 100; ++i)
{
{
Glib::Mutex::Lock lock (mutex);
std::cout << c;
std::cout.flush();
}
Glib::usleep(rand.get_int_range(10000, 100000));
}
}
} // anonymous namespace
int main(int, char**)
{
Glib::thread_init();
Glib::ThreadPool pool (10);
for(char c = 'a'; c <= 'z'; ++c)
{
pool.push(sigc::bind<1>(sigc::ptr_fun(&print_char), c));
}
pool.shutdown();
std::cout << std::endl;
return 0;
}

View File

@@ -0,0 +1,8 @@
# Install m4 macros needed by other *mm packages:
m4dir = $(datadir)/aclocal
m4_DATA = glibmm_check_perl.m4
EXTRA_DIST = README config.sub missing config.guess install-sh \
ltmain.sh cxx.m4 cxx_std.m4 c_std.m4 docgen.m4 macros.m4 reduced.m4 \
$(m4_DATA)

View File

@@ -0,0 +1,387 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = scripts
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
config.guess config.sub depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(m4dir)"
m4DATA_INSTALL = $(INSTALL_DATA)
DATA = $(m4_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Install m4 macros needed by other *mm packages:
m4dir = $(datadir)/aclocal
m4_DATA = glibmm_check_perl.m4
EXTRA_DIST = README config.sub missing config.guess install-sh \
ltmain.sh cxx.m4 cxx_std.m4 c_std.m4 docgen.m4 macros.m4 reduced.m4 \
$(m4_DATA)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu scripts/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-m4DATA: $(m4_DATA)
@$(NORMAL_INSTALL)
test -z "$(m4dir)" || $(MKDIR_P) "$(DESTDIR)$(m4dir)"
@list='$(m4_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(m4DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4dir)/$$f'"; \
$(m4DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4dir)/$$f"; \
done
uninstall-m4DATA:
@$(NORMAL_UNINSTALL)
@list='$(m4_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(m4dir)/$$f'"; \
rm -f "$(DESTDIR)$(m4dir)/$$f"; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(m4dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-m4DATA
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-m4DATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-m4DATA install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-m4DATA
# 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:

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,43 @@
cv_c_std_time_t_is_not_int32
## GLIBMM_CXX_HAS_NAMESPACE_STD()
##
## Test whether libstdc++ declares namespace std. For safety,
## also check whether several randomly selected STL symbols
## are available in namespace std.
##
## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1.
##
AC_DEFUN([GLIBMM_C_STD_TIME_T_IS_NOT_INT32],
[
AC_CACHE_CHECK(
[whether time_t is not equivalent to gint32, meaning that it can be used for a method overload],
[gtkmm_cv_c_std_time_t_is_not_int32],
[
AC_TRY_COMPILE(
[
#include <time.h>
],[
typedef signed int gint32;
class Test
{
void something(gint32 val)
{}
void something(time_t val)
{}
};
],
[gtkmm_cv_c_std_time_t_is_not_int32="yes"],
[gtkmm_cv_c_std_time_t_is_not_int32="no"]
)
])
if test "x${gtkmm_cv_c_std_time_t_is_not_int32}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32],[1], [Defined when time_t is not equivalent to gint32, meaning that it can be used for a method overload])
}
fi
])

1471
libs/glibmm2/scripts/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1599
libs/glibmm2/scripts/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

364
libs/glibmm2/scripts/cxx.m4 Normal file
View File

@@ -0,0 +1,364 @@
dnl
dnl AC_CXX_NAMESPACES(ACTION_FOUND,ACTION_NOT_FOUND)
dnl
AC_DEFUN([AC_CXX_NAMESPACES],[
AC_MSG_CHECKING(if C++ compiler supports namespaces)
AC_TRY_COMPILE(
[
namespace Foo { struct A {}; }
using namespace Foo;
],[
A a;
(void)a;
],[
ac_cxx_namespaces=yes
AC_MSG_RESULT([$ac_cxx_namespaces])
$1
],[
ac_cxx_namespaces=no
AC_MSG_RESULT([$ac_cxx_namespaces])
$2
])
])
dnl
dnl AC_CXX_NAMESPACES(ACTION_FOUND,ACTION_NOT_FOUND)
dnl
AC_DEFUN([AC_CXX_BOOL],[
AC_MSG_CHECKING(if C++ compiler supports bool)
AC_TRY_COMPILE(
[
],[
bool b=true;
bool b1=false;
(void)b;
(void)b1;
],[
ac_cxx_bool=yes
AC_MSG_RESULT([$ac_cxx_bool])
$1
],[
ac_cxx_bool=no
AC_MSG_RESULT([$ac_cxx_bool])
$2
])
])
dnl
dnl AC_CXX_MUTABLE(ACTION_FOUND,ACTION_NOT_FOUND)
dnl
AC_DEFUN([AC_CXX_MUTABLE],[
AC_MSG_CHECKING(if C++ compiler supports mutable)
AC_TRY_COMPILE(
[
class k {
mutable char *c;
public:
void foo() const { c=0; }
};
],[
],[
ac_cxx_mutable=yes
AC_MSG_RESULT([$ac_cxx_mutable])
$1
],[
ac_cxx_mutable=no
AC_MSG_RESULT([$ac_cxx_mutable])
$2
])
])
dnl
dnl AC_CXX_CONST_CAST(ACTION_FOUND,ACTION_NOT_FOUND)
dnl
AC_DEFUN([AC_CXX_CONST_CAST],[
AC_MSG_CHECKING([if C++ compiler supports const_cast<>])
AC_TRY_COMPILE(
[
class foo;
],[
const foo *c=0;
foo *c1=const_cast<foo*>(c);
(void)c1;
],[
ac_cxx_const_cast=yes
AC_MSG_RESULT([$ac_cxx_const_cast])
],[
ac_cxx_const_cast=no
AC_MSG_RESULT([$ac_cxx_const_cast])
])
])
dnl
dnl GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES(ACTION_FOUND,ACTION_NOT_FOUND)
dnl
dnl Test whether the compiler allows member functions to refer to spezialized member function templates.
dnl Some compilers have problems with this. gcc 2.95.3 aborts with an internal compiler error.
dnl
AC_DEFUN([GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[
AC_MSG_CHECKING([if C++ compiler allows member functions to refer to member templates])
AC_TRY_COMPILE(
[
struct foo {
template <class C> inline
void doit();
void thebug();
};
template <class C> inline
void foo::doit() {
}
struct bar {
void neitherabug();
};
void notabug() {
void (foo::*func)();
func = &foo::doit<int>;
(void)func;
}
void bar::neitherabug() {
void (foo::*func)();
func = &foo::doit<int>;
(void)func;
}
void foo::thebug() {
void (foo::*func)();
func = &foo::doit<int>; //Compiler bugs usually show here.
(void)func;
}
],[],[
glibmm_cxx_member_functions_member_templates=yes
AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[1],[does the C++ compiler allow member functions to refer to member templates])
AC_MSG_RESULT([$glibmm_cxx_member_functions_member_templates])
],[
glibmm_cxx_member_functions_member_templates=no
AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[0])
AC_MSG_RESULT([$glibmm_cxx_member_functions_member_templates])
])
])
## GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS()
##
## Check whether the compiler finds it ambiguous to have both
## const and non-const template specializations,
## The SUN Forte compiler has this problem, though we are
## not 100% sure that it's a C++ standards violation.
##
AC_DEFUN([GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS],
[
AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
AC_CACHE_CHECK(
[whether the compiler finds it ambiguous to have both const and non-const template specializations],
[glibmm_cv_cxx_can_disambiguate_const_template_specializations],
[
AC_TRY_COMPILE(
[
#include <iostream>
template <class T> class Foo {};
template <typename T> class Traits {
public:
const char* whoami() {
return "generic template";
}
};
template <typename T> class Traits<Foo<T> > {
public:
const char* whoami() {
return "partial specialization for Foo<T>";
}
};
template <typename T> class Traits<Foo<const T> > {
public:
const char* whoami() {
return "partial specialization for Foo<const T>";
}
};
],[
Traits<int> it;
Traits<Foo<int> > fit;
Traits<Foo<const int> > cfit;
std::cout << "Traits<int> --> "
<< it.whoami() << std::endl;
std::cout << "Traits<Foo<int>> --> "
<< fit.whoami() << std::endl;
std::cout << "Traits<Foo<const int >> --> "
<< cfit.whoami() << std::endl;
],
[glibmm_cv_cxx_can_disambiguate_const_template_specializations="yes"],
[glibmm_cv_cxx_can_disambiguate_const_template_specializations="no"]
)
])
if test "x${glibmm_cv_cxx_can_disambiguate_const_template_specializations}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS],[1], [Defined if the compiler does not find it ambiguous to have both const and non-const template specializations])
}
fi
])
## GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION()
##
## Check whether the compiler allows us to define a template that uses
## dynamic_cast<> with an object whose type is not defined,
## even if we do not use that template before we have defined the type.
## This should probably not be allowed anyway.
##
AC_DEFUN([GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION],
[
AC_CACHE_CHECK(
[whether the compiler allows us to define a template that uses dynamic_cast<> with an object whose type is not yet defined],
[glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition],
[
AC_TRY_COMPILE(
[
class SomeClass;
SomeClass* some_function();
template <class T>
class SomeTemplate
{
static bool do_something()
{
//This does not compile, with the MipsPro (IRIX) compiler
//even if we don't use this template at all.
//(We would use it later, after we have defined the type).
return dynamic_cast<T*>(some_function());
}
};
],[
],
[glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition="yes"],
[glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition="no"]
)
])
if test "x${glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition}" = "xyes"; then
{
AC_DEFINE([GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION],[1], [Defined if the compiler allows us to define a template that uses dynamic_cast<> with an object whose type is not yet defined.])
}
fi
])
## GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS()
##
## Check whether the compiler allows us to use a non-extern "C" function,
## such as a static member function, to an extern "C" function pointer,
## such as a GTK+ callback.
## This should not be allowed anyway.
##
AC_DEFUN([GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS],
[
AC_CACHE_CHECK(
[whether the the compilerallows us to use a non-extern "C" function for an extern "C" function pointer.],
[glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks],
[
AC_TRY_COMPILE(
[
extern "C"
{
struct somestruct
{
void (*callback) (int);
};
} // extern "C"
void somefunction(int)
{
}
],[
somestruct something;
something.callback = &somefunction;
],
[glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks="yes"],
[glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks="no"]
)
])
if test "x${glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks}" = "xyes"; then
{
AC_DEFINE([GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS],[1], [Defined if the compiler allows us to use a non-extern "C" function for an extern "C" function pointer.])
}
fi
])
## GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC()
##
## Check whether the compiler puts extern "C" functions in the global namespace,
## even inside a namespace declaration. The AIX xlC compiler does this, and also
## gets confused if we declare the namespace again inside the extern "C" block.
## This seems like a compiler bug, but not a serious one.
##
AC_DEFUN([GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC],
[
AC_CACHE_CHECK(
[whether the compiler uses namespace declarations inside extern "C" blocks.],
[glibmm_cv_cxx_can_use_namespaces_inside_externc],
[
AC_TRY_COMPILE(
[
namespace test
{
extern "C"
{
void do_something();
} //extern C
class Something
{
protected:
int i;
friend void do_something();
};
void do_something()
{
Something something;
something.i = 1;
}
} //namespace
],[
],
[glibmm_cv_cxx_can_use_namespaces_inside_externc="yes"],
[glibmm_cv_cxx_can_use_namespaces_inside_externc="no"]
)
])
if test "x${glibmm_cv_cxx_can_use_namespaces_inside_externc}" = "xyes"; then
{
AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC],[1], [Defined if the compiler whether the compiler uses namespace declarations inside extern "C" blocks.])
}
fi
])

View File

@@ -0,0 +1,195 @@
cv_cxx_has_namespace_std
## GLIBMM_CXX_HAS_NAMESPACE_STD()
##
## Test whether libstdc++ declares namespace std. For safety,
## also check whether several randomly selected STL symbols
## are available in namespace std.
##
## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1.
##
AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD],
[
AC_CACHE_CHECK(
[whether C++ library symbols are declared in namespace std],
[gtkmm_cv_cxx_has_namespace_std],
[
AC_TRY_COMPILE(
[
#include <algorithm>
#include <iterator>
#include <iostream>
#include <string>
],[
using std::min;
using std::find;
using std::copy;
using std::bidirectional_iterator_tag;
using std::string;
using std::istream;
using std::cout;
],
[gtkmm_cv_cxx_has_namespace_std="yes"],
[gtkmm_cv_cxx_has_namespace_std="no"]
)
])
if test "x${gtkmm_cv_cxx_has_namespace_std}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_NAMESPACE_STD],[1], [Defined when the libstdc++ declares the std-namespace])
}
fi
])
## GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS()
##
## Check for standard-conform std::iterator_traits<>, and
## #define GLIBMM_HAVE_STD_ITERATOR_TRAITS on success.
##
AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS],
[
AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
AC_CACHE_CHECK(
[whether the C++ library supports std::iterator_traits],
[gtkmm_cv_cxx_has_std_iterator_traits],
[
AC_TRY_COMPILE(
[
#include <iterator>
#ifdef GLIBMM_HAVE_NAMESPACE_STD
using namespace std;
#endif
],[
typedef iterator_traits<char*>::value_type ValueType;
],
[gtkmm_cv_cxx_has_std_iterator_traits="yes"],
[gtkmm_cv_cxx_has_std_iterator_traits="no"]
)
])
if test "x${gtkmm_cv_cxx_has_std_iterator_traits}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_STD_ITERATOR_TRAITS],[1], [Defined if std::iterator_traits<> is standard-conforming])
}
fi
])
## GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR()
##
## Check for Sun libCstd style std::reverse_iterator,
## and #define GLIBMM_HAVE_SUN_REVERSE_ITERATOR if found.
##
AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR],
[
AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
AC_CACHE_CHECK(
[for non-standard Sun libCstd reverse_iterator],
[gtkmm_cv_cxx_has_sun_reverse_iterator],
[
AC_TRY_COMPILE(
[
#include <iterator>
#ifdef GLIBMM_HAVE_NAMESPACE_STD
using namespace std;
#endif
],[
typedef reverse_iterator<char*,random_access_iterator_tag,char,char&,char*,int> ReverseIter;
],
[gtkmm_cv_cxx_has_sun_reverse_iterator="yes"],
[gtkmm_cv_cxx_has_sun_reverse_iterator="no"]
)
])
if test "x${gtkmm_cv_cxx_has_sun_reverse_iterator}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_SUN_REVERSE_ITERATOR],[1], [Defined if std::reverse_iterator is in Sun libCstd style])
}
fi
])
## GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS()
##
## Check whether the STL containers have templated sequence ctors,
## and #define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS on success.
##
AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS],
[
AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
AC_CACHE_CHECK(
[whether STL containers have templated sequence constructors],
[gtkmm_cv_cxx_has_template_sequence_ctors],
[
AC_TRY_COMPILE(
[
#include <vector>
#include <deque>
#include <list>
#ifdef GLIBMM_HAVE_NAMESPACE_STD
using namespace std;
#endif
],[
const int array[8] = { 0, };
vector<int> test_vector (&array[0], &array[8]);
deque<short> test_deque (test_vector.begin(), test_vector.end());
list<long> test_list (test_deque.begin(), test_deque.end());
test_vector.assign(test_list.begin(), test_list.end());
],
[gtkmm_cv_cxx_has_template_sequence_ctors="yes"],
[gtkmm_cv_cxx_has_template_sequence_ctors="no"]
)
])
if test "x${gtkmm_cv_cxx_has_template_sequence_ctors}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS],[1], [Defined if the STL containers have templated sequence ctors])
}
fi
])
## GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS()
##
## Check whether the a static member variable may be initialized inline to std::string::npos.
## The MipsPro (IRIX) compiler does not like this.
## and #define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS on success.
##
AC_DEFUN([GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS],
[
AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
AC_CACHE_CHECK(
[whether the compiler allows a static member variable to be initialized inline to std::string::npos],
[gtkmm_cv_cxx_has_allows_static_inline_npos],
[
AC_TRY_COMPILE(
[
#include <string>
#include <iostream>
class ustringtest
{
public:
//The MipsPro compiler (IRIX) says "The indicated constant value is not known",
//so we need to initalize the static member data elsewhere.
static const std::string::size_type ustringnpos = std::string::npos;
};
],[
std::cout << "npos=" << ustringtest::ustringnpos << std::endl;
],
[gtkmm_cv_cxx_has_allows_static_inline_npos="yes"],
[gtkmm_cv_cxx_has_allows_static_inline_npos="no"]
)
])
if test "x${gtkmm_cv_cxx_has_allows_static_inline_npos}" = "xyes"; then
{
AC_DEFINE([GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS],[1], [Defined if a static member variable may be initialized inline to std::string::npos])
}
fi
])

584
libs/glibmm2/scripts/depcomp Executable file
View File

@@ -0,0 +1,584 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2006-10-15.18
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -0,0 +1,75 @@
## GTKMM_DOXYGEN_INPUT_SUBDIRS(subdirectory list)
##
AC_DEFUN([GTKMM_DOXYGEN_INPUT_SUBDIRS],
[
GTKMM_DOXYGEN_INPUT=
gtkmm_srcdir=`cd "$srcdir" >/dev/null && pwd`
gtkmm_list="$@"
for gtkmm_sublib in $gtkmm_list
do
GTKMM_DOXYGEN_INPUT="$GTKMM_DOXYGEN_INPUT ${gtkmm_srcdir}/${gtkmm_sublib}/${gtkmm_sublib}mm/"
done
AC_SUBST(GTKMM_DOXYGEN_INPUT)
])
## GTKMM_ARG_ENABLE_FULLDOCS()
##
## Check whether to build the full docs into the generated source. If yes,
## set GTKMMPROC_MERGECDOCS='--mergecdocs', which will be passed to gtkmmproc
## (in build_shared/Makefile_gensrc.am_fragment). This will be much slower.
##
AC_DEFUN([GTKMM_ARG_ENABLE_FULLDOCS],
[
AC_REQUIRE([GLIBMM_CHECK_PERL])
AC_MSG_CHECKING([[whether to merge C reference docs into generated headers]])
AC_ARG_ENABLE([fulldocs],
[ --enable-fulldocs Generate fully-documented reference docs, takes
longer to build. [[default=enabled for CVS builds]]],
[gtkmm_enable_fulldocs=$enableval],
[gtkmm_enable_fulldocs=$USE_MAINTAINER_MODE])
AC_MSG_RESULT([${gtkmm_enable_fulldocs}])
GTKMMPROC_MERGECDOCS=
if test "x$gtkmm_enable_fulldocs" = xyes; then
{
GTKMMPROC_MERGECDOCS='--mergecdocs'
if test "x$USE_MAINTAINER_MODE" != xyes; then
{
AC_MSG_WARN([[
*** --enable-fulldocs only works if --enable-maintainer-mode is also set.
*** gtkmm source tarballs should be packaged with --enable-fulldocs, so
*** usually you don't need this option unless you got gtkmm from CVS.
]])
}
fi
AC_CACHE_CHECK(
[whether the XML::Parser module is available],
[gtkmm_cv_have_xml_parser],
[
gtkmm_cv_have_xml_parser=no
"$PERL_PATH" -e 'use strict; use XML::Parser; exit 0;' >&5 2>&5 && gtkmm_cv_have_xml_parser=yes
])
if test "x$gtkmm_cv_have_xml_parser" = xno; then
{
AC_MSG_ERROR([[
*** The Perl module XML::Parser is required to build $PACKAGE from CVS.
]])
}
fi
}
fi
AC_SUBST(GTKMMPROC_MERGECDOCS)
])

View File

@@ -0,0 +1,54 @@
dnl
dnl Some macros needed for autoconf
dnl
## GLIBMM_CV_PERL_VERSION(version)
##
## Helper macro of GLIBMM_CHECK_PERL(). It generates a cache variable
## name that includes the version number, in order to avoid clashes.
##
AC_DEFUN([GLIBMM_CV_PERL_VERSION],[glibmm_cv_perl_version_[]m4_translit([$1],[.${}],[____])])
## GLIBMM_CHECK_PERL(version)
##
## Check for Perl >= version and set PERL_PATH. If Perl is not found
## and maintainer-mode is enabled, abort with an error message. If not
## in maintainer-mode, set PERL_PATH=perl on failure.
##
AC_DEFUN([GLIBMM_CHECK_PERL],
[
glibmm_perl_result=no
AC_PATH_PROGS([PERL_PATH], [perl perl5], [not found])
if test "x$PERL_PATH" != "xnot found"; then
{
AC_CACHE_CHECK(
[whether Perl is new enough],
GLIBMM_CV_PERL_VERSION([$1]),
[
]GLIBMM_CV_PERL_VERSION([$1])[=no
"$PERL_PATH" -e "require v$1; exit 0;" >/dev/null 2>&1 && ]GLIBMM_CV_PERL_VERSION([$1])[=yes
])
test "x${GLIBMM_CV_PERL_VERSION([$1])}" = xyes && glibmm_perl_result=yes
}
else
{
# Make sure we have something sensible, even if it doesn't work.
PERL_PATH=perl
}
fi
if test "x$glibmm_perl_result" = xno && test "x$USE_MAINTAINER_MODE" = xyes; then
{
AC_MSG_ERROR([[
*** Perl >= ]$1[ is required for building $PACKAGE in maintainer-mode.
]])
}
fi
AC_SUBST([PERL_PATH])
])

507
libs/glibmm2/scripts/install-sh Executable file
View File

@@ -0,0 +1,507 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2006-10-14.15
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
posix_glob=
posix_mkdir=
# Desired mode of installed file.
mode=0755
chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
shift
shift
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
done
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix=/ ;;
-*) prefix=./ ;;
*) prefix= ;;
esac
case $posix_glob in
'')
if (set -f) 2>/dev/null; then
posix_glob=true
else
posix_glob=false
fi ;;
esac
oIFS=$IFS
IFS=/
$posix_glob && set -f
set fnord $dstdir
shift
$posix_glob && set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dst"; then
$doit $rmcmd -f "$dst" 2>/dev/null \
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|| {
echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
} || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,134 @@
dnl
dnl Some macros needed for autoconf
dnl
dnl AL_PROG_GNU_M4(ACTION_NOT_FOUND)
dnl Check for GNU m4. (sun won't do.)
dnl
AC_DEFUN([AL_PROG_GNU_M4],[
AC_CHECK_PROGS(M4, gm4 m4, m4)
if test "$M4" = "m4"; then
AC_MSG_CHECKING(whether m4 is GNU m4)
if $M4 --version </dev/null 2>/dev/null | grep '^GNU [Mm]4 ' >/dev/null ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
if test "$host_vendor" = "sun"; then
$1
fi
fi
fi
])
dnl AL_PROG_GNU_MAKE(ACTION_NOT_FOUND)
dnl Check for GNU make (no sun make)
dnl
AC_DEFUN([AL_PROG_GNU_MAKE],[
dnl
dnl Check for GNU make (stolen from gtk+/configure.in)
AC_MSG_CHECKING(whether make is GNU Make)
if ${MAKE-make} --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
if test "$host_vendor" = "sun" ; then
$1
fi
fi
])
dnl AL_ACLOCAL_INCLUDE(macrodir)
dnl Add a directory to macro search (from gnome)
AC_DEFUN([AL_ACLOCAL_INCLUDE],
[
test "x$ACLOCAL_FLAGS" = "x" || ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
for dir in $1
do
ACLOCAL="$ACLOCAL -I $srcdir/$dir"
done
])
## GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING()
##
## Provide the --enable-debug-refcounting configure argument, disabled
## by default. If enabled, #define GTKMM_DEBUG_REFCOUNTING.
##
AC_DEFUN([GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING],
[
AC_ARG_ENABLE([debug-refcounting],
[ --enable-debug-refcounting Print a debug message on every ref/unref.
[[default=disabled]]],
[glibmm_debug_refcounting="$enableval"],
[glibmm_debug_refcounting='no'])
if test "x$glibmm_debug_refcounting" = "xyes"; then
{
AC_DEFINE([GLIBMM_DEBUG_REFCOUNTING],[1], [Defined when the --enable-debug-refcounting configure argument was given])
}
fi
])
## GTKMM_ARG_ENABLE_WARNINGS()
##
## Provide the --enable-warnings configure argument, set to 'minimum'
## by default.
##
AC_DEFUN([GTKMM_ARG_ENABLE_WARNINGS],
[
AC_ARG_ENABLE([warnings],
[ --enable-warnings=[[none|minimum|maximum|hardcore]]
Control compiler pickyness. [[default=minimum]]],
[gtkmm_enable_warnings="$enableval"],
[gtkmm_enable_warnings='minimum'])
AC_MSG_CHECKING([for compiler warning flags to use])
gtkmm_warning_flags=''
case "$gtkmm_enable_warnings" in
minimum|yes) gtkmm_warning_flags='-Wall -Wno-long-long';;
maximum) gtkmm_warning_flags='-pedantic -W -Wall -Wno-long-long';;
hardcore) gtkmm_warning_flags='-pedantic -W -Wall -Wno-long-long -Werror';;
esac
gtkmm_use_flags=''
if test "x$gtkmm_warning_flags" != "x"
then
echo 'int foo() { return 0; }' > conftest.cc
for flag in $gtkmm_warning_flags
do
# Test whether the compiler accepts the flag. GCC doesn't bail
# out when given an unsupported flag but prints a warning, so
# check the compiler output instead.
gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`"
rm -f conftest.$OBJEXT
test "x${gtkmm_cxx_out}" = "x" && \
gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag"
done
rm -f conftest.cc
gtkmm_cxx_out=''
fi
if test "x$gtkmm_use_flags" != "x"
then
for flag in $gtkmm_use_flags
do
case " $CXXFLAGS " in
*" $flag "*) ;; # don't add flags twice
*) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";;
esac
done
else
gtkmm_use_flags='none'
fi
AC_MSG_RESULT([$gtkmm_use_flags])
])

367
libs/glibmm2/scripts/missing Executable file
View File

@@ -0,0 +1,367 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@@ -0,0 +1,106 @@
## GLIBMM_ARG_ENABLE_API_PROPERTIES()
##
## Provide the --enable-api-properties configure argument, enabled
## by default.
##
AC_DEFUN([GLIBMM_ARG_ENABLE_API_PROPERTIES],
[
AC_ARG_ENABLE([api-properties],
[ --enable-api-properties Build properties API.
[[default=yes]]],
[glibmm_enable_api_properties="$enableval"],
[glibmm_enable_api_properties='yes'])
if test "x$glibmm_enable_api_properties" = "xyes"; then
{
AC_DEFINE([GLIBMM_PROPERTIES_ENABLED],[1], [Defined when the --enable-api-properties configure argument was given])
}
fi
])
## GLIBMM_ARG_ENABLE_API_VFUNCS()
##
## Provide the --enable-api-vfuncs configure argument, enabled
## by default.
##
AC_DEFUN([GLIBMM_ARG_ENABLE_API_VFUNCS],
[
AC_ARG_ENABLE([api-vfuncs],
[ --enable-api-vfuncs Build vfuncs API.
[[default=yes]]],
[glibmm_enable_api_vfuncs="$enableval"],
[glibmm_enable_api_vfuncs='yes'])
if test "x$glibmm_enable_api_vfuncs" = "xyes"; then
{
AC_DEFINE([GLIBMM_VFUNCS_ENABLED],[1], [Defined when the --enable-api-vfuncs configure argument was given])
}
fi
])
## GLIBMM_ARG_ENABLE_API_EXCEPTIONS()
##
## Provide the --enable-api-exceptions configure argument, enabled
## by default.
##
AC_DEFUN([GLIBMM_ARG_ENABLE_API_EXCEPTIONS],
[
AC_ARG_ENABLE([api-exceptions],
[ --enable-api-exceptions Build exceptions API.
[[default=yes]]],
[glibmm_enable_api_exceptions="$enableval"],
[glibmm_enable_api_exceptions='yes'])
if test "x$glibmm_enable_api_exceptions" = "xyes"; then
{
AC_DEFINE([GLIBMM_EXCEPTIONS_ENABLED],[1], [Defined when the --enable-api-exceptions configure argument was given])
}
fi
])
## GLIBMM_ARG_ENABLE_API_DEPRECATED()
##
## Provide the --enable-deprecated-api configure argument, enabled
## by default.
##
AC_DEFUN([GLIBMM_ARG_ENABLE_API_DEPRECATED],
[
AC_ARG_ENABLE(deprecated-api,
[ --enable-deprecated-api Include (build) deprecated API in the libraries.
[[default=yes]]],
[glibmm_enable_api_deprecated="$enableval"],
[glibmm_enable_api_deprecated='yes'])
if test "x$glibmm_enable_api_deprecated" = "xyes"; then
{
AC_MSG_WARN([Deprecated API will be built, for backwards-compatibility.])
}
else
{
AC_MSG_WARN([Deprecated API will not be built, breaking backwards-compatibility. Do not use this build for distribution packages.])
DISABLE_DEPRECATED_API_CFLAGS="-DGLIBMM_DISABLE_DEPRECATED"
AC_SUBST(DISABLE_DEPRECATED_API_CFLAGS)
}
fi
])
## GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS()
##
## Provide the --enable-api-default-signal-handlers configure argument, enabled
## by default.
##
AC_DEFUN([GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS],
[
AC_ARG_ENABLE([api-default-signal-handlers],
[ --enable-api-default-signal-handlers Build default signal handlers API.
[[default=yes]]],
[glibmm_enable_api_default_signal_handlers="$enableval"],
[glibmm_enable_api_default_signal_handlers='yes'])
if test "x$glibmm_enable_api_default_signal_handlers" = "xyes"; then
{
AC_DEFINE([GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED],[1], [Defined when the --enable-api-default-signal-handlers configure argument was given])
}
fi
])

View File

@@ -0,0 +1,15 @@
AC_DEFUN([GLIBMM_PROG_CXX_SUN],
[AC_CACHE_CHECK(whether we are using SUN CC compiler, ac_cv_prog_sun_cxx,
[if AC_TRY_COMMAND(${CXX-g++} -V 2>&1) | egrep "Sun WorkShop" >/dev/null 2>&1; then
ac_cv_prog_sun_cxx=yes
else
ac_cv_prog_sun_cxx=no
fi]
)]
if test "x${ac_cv_prog_sun_cxx}" = "xyes"; then
{
AC_DEFINE([GLIBMM_COMPILER_SUN_FORTE],[1], [Defined when the SUN Forte C++ compiler is being used.])
}
fi
)

View File

@@ -0,0 +1,11 @@
include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment
SUBDIRS = m4 pm extra_defs_gen
EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_perl) README TODO enum.pl
gmmproc_bin_SCRIPTS = gmmproc $(files_tools_genwrap)
gmmproc_bindir = $(libdir)/glibmm-2.4/proc

View File

@@ -0,0 +1,557 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/generate_wrap_init.pl.in $(srcdir)/gmmproc.in \
$(top_srcdir)/tools/Makefile_list_of_sources.am_fragment \
$(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment \
$(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment \
TODO
subdir = tools
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES = gmmproc generate_wrap_init.pl
am__installdirs = "$(DESTDIR)$(gmmproc_bindir)"
gmmproc_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(gmmproc_bin_SCRIPTS)
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \
class_generic.m4 class_gobject.m4 class_gtkobject.m4 \
class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \
gerror.m4 \
compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \
convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \
method.m4 property.m4 signal.m4 vfunc.m4
files_tools_pm = DocsParser.pm GtkDefs.pm Enum.pm Function.pm FunctionBase.pm Object.pm Output.pm Property.pm Util.pm WrapParser.pm
files_tools_genwrap = generate_wrap_init.pl
files_tools_perl = $(files_tools_genwrap) gmmproc.in
SUBDIRS = m4 pm extra_defs_gen
EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_perl) README TODO enum.pl
gmmproc_bin_SCRIPTS = gmmproc $(files_tools_genwrap)
gmmproc_bindir = $(libdir)/glibmm-2.4/proc
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tools/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
gmmproc: $(top_builddir)/config.status $(srcdir)/gmmproc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
generate_wrap_init.pl: $(top_builddir)/config.status $(srcdir)/generate_wrap_init.pl.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-gmmproc_binSCRIPTS: $(gmmproc_bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(gmmproc_bindir)" || $(MKDIR_P) "$(DESTDIR)$(gmmproc_bindir)"
@list='$(gmmproc_bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(gmmproc_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(gmmproc_bindir)/$$f'"; \
$(gmmproc_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(gmmproc_bindir)/$$f"; \
else :; fi; \
done
uninstall-gmmproc_binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(gmmproc_bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f '$(DESTDIR)$(gmmproc_bindir)/$$f'"; \
rm -f "$(DESTDIR)$(gmmproc_bindir)/$$f"; \
done
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(SCRIPTS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(gmmproc_bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am: install-gmmproc_binSCRIPTS
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-gmmproc_binSCRIPTS
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-gmmproc_binSCRIPTS install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-gmmproc_binSCRIPTS
# 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:

View File

@@ -0,0 +1,5 @@
include $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment
include $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment
files_tools_genwrap = generate_wrap_init.pl
files_tools_perl = $(files_tools_genwrap) gmmproc.in

View File

@@ -0,0 +1,4 @@
This directory contains the gtkmm preprocessor used for wrapping
gtk+ objects.
See docs/internal/ for some gtkmmproc documentation.

12
libs/glibmm2/tools/TODO Normal file
View File

@@ -0,0 +1,12 @@
* streams
- Please give more information. murrayc
* Incorporate new GtkDefs parser.
What does this mean? murrayc.
* Get gtkmmproc to run outside install directory.
What does this mean? It runs for gtkmm and it runs installed for libgnome*mm.

233
libs/glibmm2/tools/enum.pl Normal file
View File

@@ -0,0 +1,233 @@
#! /usr/bin/perl
# The lisp definitions for flags does not include order.
# thus we must extract it ourselves.
# Usage: ./enum.pl /gnome/head/cvs/gconf/gconf/*.h > gconf_enums.defs
use warnings;
my %token;
$module="none";
while ($ARGV[0] =~ /^--(\S+)/)
{
shift @ARGV;
$module=shift @ARGV if ($1 eq "module");
if ($1 eq "help")
{
print "enum.pl [--module modname] header_files ....\n";
exit 0;
}
}
foreach $file (@ARGV)
{
&parse($file);
}
exit;
# parse enums from C
sub parse
{
my ($file)=@_;
$from=0;
open(FILE,$file);
$enum=0;
$deprecated=0;
$comment=0;
while(<FILE>)
{
if($comment)
{
# end of multiline comment
$comment = 0 if(/\*\//);
next;
}
$deprecated = 1 if(s/^#ifndef [A-Z_]+_DISABLE_DEPRECATED//);
++$deprecated if($deprecated > 0 && /^#\s*if/);
--$deprecated if($deprecated > 0 && /^#\s*endif/);
next if($deprecated > 0);
# filter single-line comments
s/\/\*.*\*\///g;
# begin of multiline comment
if(/\/\*/)
{
$comment = 1;
next;
}
s/','/\%\%COMMA\%\%/;
s/'}'/\%\%RBRACE\%\%/;
if (/^\s*typedef enum/ )
{
print ";; From $file\n\n" if (!$from);
$from=1;
$enum=1;
next;
}
if ($enum && /\}/)
{
$enum=0;
&process($line,$_);
$line="";
}
$line.=$_ if ($enum);
}
}
# convert enums to lisp
sub process
{
my ($line,$def)=@_;
$def=~s/\s*\}\s*//g;
$def=~s/\s*;\s*$//;
my $c_name=$def;
$line=~s/\s+/ /g;
$line=~s/\/\*.*\*\///g;
$line=~s/\s*{\s*//;
my $entity = "enum";
$c_name =~ /^([A-Z][a-z]*)/;
$module = $1;
$def =~ s/$module//;
@c_name=();
@name=();
@number=();
$val=0;
foreach $i (split(/,/,$line))
{
$i=~s/^\s+//;
$i=~s/\s+$//;
if ($i =~ /^\S+$/)
{
push(@c_name,$i);
push(@number,sprintf("%d",$val));
$token{$i}=$val;
}
elsif ($i =~ /^(\S+)\s*=\s*(0x[0-9a-fA-F]+)$/ ||
$i =~ /^(\S+)\s*=\s*(-?[0-9]+)$/ ||
$i =~ /^(\S+)\s*=\s*(1\s*<<\s*[0-9]+)$/
)
{
my ($tmp1, $tmp2) = ($1, $2);
push(@c_name, $tmp1);
eval("\$val = $tmp2;");
$entity = "flags" if($tmp2 =~ /^1\s*<</ || $tmp2 =~ /^0x/);
push(@number, $tmp2);
$token{$tmp1} = $tmp2;
}
elsif ($i =~ /^(\S+)\s*=\s*([ _x0-9a-fA-Z|()~]+)$/)
{
my ($tmp1, $tmp2) = ($1, $2);
push(@c_name, $tmp1);
$tmp2 =~ s/([A-Z_]+)/($token{$1})/;
eval("\$val = $tmp2;");
$val = "#error" if(!$val);
$val = sprintf("0x%X", $val) if($entity eq "flags");
push(@number, $val);
$token{$tmp1} = $val;
}
elsif ($i =~ /^(\S+)\s*=\s*'(.)'$/)
{
push(@c_name,$1);
push(@number,"\'$2\'");
$val=ord($2);
$token{$1}=$val;
}
elsif ($i =~ /^(\S+)\s*=\s*(\%\%[A-Z]+\%\%)$/)
{
$tmp=$1;
$_=$2;
s/\%\%COMMA\%\%/,/;
s/\%\%RBRACE\%\%/]/;
push(@c_name,$tmp);
push(@number,"\'$_\'");
$val=ord($_);
$token{$tmp}=$val;
}
else
{
#print STDERR "$i\n";
}
$val++;
}
# remove the prefix to form names
&form_names(\@name,\@c_name);
my $format = "%d";
$format = "0x%X" if($entity eq "flags");
# evaluate any unevaluated values
my $j;
for ($j=0;$j<$#number+1;$j++)
{
if ($number[$j]=~/\$/)
{
$number[$j]=sprintf($format, eval($number[$j]));
}
}
#print ";; Enum $def\n\n";
print "(define-$entity-extended $def\n";
print " (in-module \"$module\")\n";
print " (c-name \"$c_name\")\n";
print " (values\n";
for ($j=0;$j<$#c_name+1;$j++)
{
print " \'(\"$name[$j]\" \"$c_name[$j]\"";
print " \"$number[$j]\"" if ($number[$j] ne "");
print ")\n";
}
print " )\n";
print ")\n\n";
}
sub form_names
{
my ($name,$c_name)=@_;
my $len=length($$c_name[0]) - 1;
my $j;
NAME: for ($j=0;$j<$#c_name;$j++)
{
while (substr($$c_name[$j],$len-1,1) ne "_" ||
substr($$c_name[$j],0,$len) ne substr($$c_name[$j+1],0,$len))
{
$len--;
last NAME if ($len <= 0);
}
#print substr($$c_name[$j],0,$len),"\n";
}
my $prefix=substr($$c_name[0],0,$len);
for ($j=0;$j<$#c_name+1;$j++)
{
$_=$$c_name[$j];
s/^$prefix//;
tr/A-Z_/a-z-/;
push(@$name,$_);
}
}

View File

@@ -0,0 +1,29 @@
# Build the library, to be installed and used by other defs-generating code:
files_h = generate_extra_defs.h
files_cc = generate_extra_defs.cc
if PLATFORM_WIN32
no_undefined = -no-undefined
else
no_undefined =
endif
lib_LTLIBRARIES = libglibmm_generate_extra_defs-2.4.la
libglibmm_generate_extra_defs_2_4_la_SOURCES = $(files_h) $(files_cc)
libglibmm_generate_extra_defs_2_4_la_LDFLAGS = $(no_undefined) -version-info $(LIBGLIBMM_SO_VERSION)
libglibmm_generate_extra_defs_2_4_la_LIBADD = $(GLIBMM_LIBS)
sublib_includedir = $(includedir)/glibmm-2.4/glibmm_generate_extra_defs
sublib_include_HEADERS = $(files_h)
# Build the generate_properties_defs utility executable.
# This is not used to build the rest of glibmm.
INCLUDES = $(GLIBMM_CFLAGS)
LIBS = $(GLIBMM_LIBS)
noinst_PROGRAMS = generate_extra_defs
generate_extra_defs_SOURCES = generate_defs_glib.cc
generate_extra_defs_LDADD = libglibmm_generate_extra_defs-2.4.la

View File

@@ -0,0 +1,568 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Build the library, to be installed and used by other defs-generating code:
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = generate_extra_defs$(EXEEXT)
subdir = tools/extra_defs_gen
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sublib_include_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(sublib_includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libglibmm_generate_extra_defs_2_4_la_DEPENDENCIES = \
$(am__DEPENDENCIES_1)
am__objects_1 =
am__objects_2 = generate_extra_defs.lo
am_libglibmm_generate_extra_defs_2_4_la_OBJECTS = $(am__objects_1) \
$(am__objects_2)
libglibmm_generate_extra_defs_2_4_la_OBJECTS = \
$(am_libglibmm_generate_extra_defs_2_4_la_OBJECTS)
libglibmm_generate_extra_defs_2_4_la_LINK = $(LIBTOOL) --tag=CXX \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
$(AM_CXXFLAGS) $(CXXFLAGS) \
$(libglibmm_generate_extra_defs_2_4_la_LDFLAGS) $(LDFLAGS) -o \
$@
PROGRAMS = $(noinst_PROGRAMS)
am_generate_extra_defs_OBJECTS = generate_defs_glib.$(OBJEXT)
generate_extra_defs_OBJECTS = $(am_generate_extra_defs_OBJECTS)
generate_extra_defs_DEPENDENCIES = \
libglibmm_generate_extra_defs-2.4.la
DEFAULT_INCLUDES = -I. -I$(top_builddir) -I$(top_builddir)/glib@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libglibmm_generate_extra_defs_2_4_la_SOURCES) \
$(generate_extra_defs_SOURCES)
DIST_SOURCES = $(libglibmm_generate_extra_defs_2_4_la_SOURCES) \
$(generate_extra_defs_SOURCES)
sublib_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(sublib_include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = $(GLIBMM_LIBS)
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
files_h = generate_extra_defs.h
files_cc = generate_extra_defs.cc
@PLATFORM_WIN32_FALSE@no_undefined =
@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined
lib_LTLIBRARIES = libglibmm_generate_extra_defs-2.4.la
libglibmm_generate_extra_defs_2_4_la_SOURCES = $(files_h) $(files_cc)
libglibmm_generate_extra_defs_2_4_la_LDFLAGS = $(no_undefined) -version-info $(LIBGLIBMM_SO_VERSION)
libglibmm_generate_extra_defs_2_4_la_LIBADD = $(GLIBMM_LIBS)
sublib_includedir = $(includedir)/glibmm-2.4/glibmm_generate_extra_defs
sublib_include_HEADERS = $(files_h)
# Build the generate_properties_defs utility executable.
# This is not used to build the rest of glibmm.
INCLUDES = $(GLIBMM_CFLAGS)
generate_extra_defs_SOURCES = generate_defs_glib.cc
generate_extra_defs_LDADD = libglibmm_generate_extra_defs-2.4.la
all: all-am
.SUFFIXES:
.SUFFIXES: .cc .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/extra_defs_gen/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tools/extra_defs_gen/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libglibmm_generate_extra_defs-2.4.la: $(libglibmm_generate_extra_defs_2_4_la_OBJECTS) $(libglibmm_generate_extra_defs_2_4_la_DEPENDENCIES)
$(libglibmm_generate_extra_defs_2_4_la_LINK) -rpath $(libdir) $(libglibmm_generate_extra_defs_2_4_la_OBJECTS) $(libglibmm_generate_extra_defs_2_4_la_LIBADD) $(LIBS)
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
generate_extra_defs$(EXEEXT): $(generate_extra_defs_OBJECTS) $(generate_extra_defs_DEPENDENCIES)
@rm -f generate_extra_defs$(EXEEXT)
$(CXXLINK) $(generate_extra_defs_OBJECTS) $(generate_extra_defs_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_defs_glib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_extra_defs.Plo@am__quote@
.cc.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cc.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-sublib_includeHEADERS: $(sublib_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(sublib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(sublib_includedir)"
@list='$(sublib_include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(sublib_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(sublib_includedir)/$$f'"; \
$(sublib_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(sublib_includedir)/$$f"; \
done
uninstall-sublib_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(sublib_include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(sublib_includedir)/$$f'"; \
rm -f "$(DESTDIR)$(sublib_includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sublib_includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-sublib_includeHEADERS
install-dvi: install-dvi-am
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-libLTLIBRARIES uninstall-sublib_includeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-libLTLIBRARIES install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
install-sublib_includeHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-libLTLIBRARIES \
uninstall-sublib_includeHEADERS
# 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:

View File

@@ -0,0 +1,34 @@
/* $Id: generate_defs_glib.cc 29 2003-04-19 12:39:06Z murrayc $ */
/* generate_defs_gtk.cc
*
* Copyright (C) 2001 The Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "generate_extra_defs.h"
//#include <glib/glib.h>
int main (int, char**)
{
//glib_init(&argc, &argv);
//std::cout << get_defs( ATK_TYPE_HYPERLINK )
std::cout << "No glib types were examined.";
return 0;
}

View File

@@ -0,0 +1,217 @@
/* $Id: generate_extra_defs.cc 204 2005-02-13 14:30:19Z murrayc $ */
/* generate_extra_defs.cc
*
* Copyright (C) 2001 The Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "generate_extra_defs.h"
std::string get_properties(GType gtype)
{
std::string strResult;
std::string strObjectName = g_type_name(gtype);
//Get the list of properties:
GObjectClass* pGClass = G_OBJECT_CLASS(g_type_class_ref(gtype));
guint iCount = 0;
GParamSpec** ppParamSpec = g_object_class_list_properties (pGClass, &iCount);
for(guint i = 0; i < iCount; i++)
{
GParamSpec* pParamSpec = ppParamSpec[i];
if(pParamSpec)
{
//Name and type:
std::string strName = g_param_spec_get_name(pParamSpec);
std::string strTypeName = G_PARAM_SPEC_TYPE_NAME(pParamSpec);
const gchar* pchBlurb = g_param_spec_get_blurb(pParamSpec);
std::string strDocs = (pchBlurb ? pchBlurb : std::string());
strResult += "(define-property " + strName + "\n";
strResult += " (of-object \"" + strObjectName + "\")\n";
strResult += " (prop-type \"" + strTypeName + "\")\n";
strResult += " (docs \"" + strDocs + "\")\n";
//Flags:
GParamFlags flags = pParamSpec->flags;
bool bReadable = (flags & G_PARAM_READABLE) == G_PARAM_READABLE;
bool bWritable = (flags & G_PARAM_WRITABLE) == G_PARAM_WRITABLE;
bool bConstructOnly = (flags & G_PARAM_CONSTRUCT_ONLY) == G_PARAM_CONSTRUCT_ONLY;
//#t and #f aren't documented, but I guess that it's correct based on the example in the .defs spec.
const std::string strTrue = "#t";
const std::string strFalse = "#f";
strResult += " (readable " + (bReadable ? strTrue : strFalse) + ")\n";
strResult += " (writable " + (bWritable ? strTrue : strFalse) + ")\n";
strResult += " (construct-only " + (bConstructOnly ? strTrue : strFalse) + ")\n";
strResult += ")\n\n"; //close (define-property
}
}
g_free(ppParamSpec);
g_type_class_unref(pGClass); //to match the g_type_class_ref() above.
return strResult;
}
std::string get_type_name(GType gtype) //Adds a * if necessary.
{
std::string strTypeName = g_type_name(gtype);
if( g_type_is_a(gtype, G_TYPE_OBJECT) || g_type_is_a(gtype, G_TYPE_BOXED) )
strTypeName += "*"; //Add * to show that it's a pointer.
else if( g_type_is_a(gtype, G_TYPE_STRING) )
strTypeName = "gchar*"; //g_type_name() returns "gchararray".
return strTypeName;
}
std::string get_type_name_parameter(GType gtype)
{
std::string strTypeName = get_type_name(gtype);
//All signal parameters that are registered as GTK_TYPE_STRING are actually const gchar*.
if(strTypeName == "gchar*")
strTypeName = "const-gchar*";
return strTypeName;
}
std::string get_type_name_signal(GType gtype)
{
return get_type_name_parameter(gtype); //At the moment, it needs the same stuff.
}
std::string get_signals(GType gtype)
{
std::string strResult;
std::string strObjectName = g_type_name(gtype);
gpointer gclass_ref = 0;
if(G_TYPE_IS_OBJECT(gtype))
gclass_ref = g_type_class_ref(gtype); //Ensures that class_init() is called.
//Get the list of signals:
guint iCount = 0;
guint* pIDs = g_signal_list_ids (gtype, &iCount);
//Loop through the list of signals:
if(pIDs)
{
for(guint i = 0; i < iCount; i++)
{
guint signal_id = pIDs[i];
//Name:
std::string strName = g_signal_name(signal_id);
strResult += "(define-signal " + strName + "\n";
strResult += " (of-object \"" + strObjectName + "\")\n";
//Other information about the signal:
GSignalQuery signalQuery = { 0, 0, 0, GSignalFlags(0), 0, 0, 0, };
g_signal_query(signal_id, &signalQuery);
//Return type:
std::string strReturnTypeName = get_type_name_signal( signalQuery.return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE ); //The type is mangled with a flag. Hacky.
//bool bReturnTypeHasStaticScope = (signalQuery.return_type & G_SIGNAL_TYPE_STATIC_SCOPE) == G_SIGNAL_TYPE_STATIC_SCOPE;
strResult += " (return-type \"" + strReturnTypeName + "\")\n";
//When:
{
bool bWhenFirst = (signalQuery.signal_flags & G_SIGNAL_RUN_FIRST) == G_SIGNAL_RUN_FIRST;
bool bWhenLast = (signalQuery.signal_flags & G_SIGNAL_RUN_LAST) == G_SIGNAL_RUN_LAST;
std::string strWhen = "unknown";
if(bWhenFirst && bWhenLast)
strWhen = "both";
else if(bWhenFirst)
strWhen = "first";
else if(bWhenLast)
strWhen = "last";
strResult += " (when \"" + strWhen + "\")\n";
}
//Loop through the list of parameters:
const GType* pParameters = signalQuery.param_types;
if(pParameters)
{
strResult += " (parameters\n";
for(unsigned i = 0; i < signalQuery.n_params; i++)
{
GType typeParamMangled = pParameters[i];
//Parameter name:
//TODO: How can we get the real parameter name?
gchar* pchNum = g_strdup_printf("%d", i);
std::string strParamName = "p" + std::string(pchNum);
g_free(pchNum);
pchNum = 0;
//Just like above, for the return type:
std::string strTypeName = get_type_name_signal( typeParamMangled & ~G_SIGNAL_TYPE_STATIC_SCOPE ); //The type is mangled with a flag. Hacky.
//bool bReturnTypeHasStaticScope = (typeParamMangled & G_SIGNAL_TYPE_STATIC_SCOPE) == G_SIGNAL_TYPE_STATIC_SCOPE;
strResult += " '(\"" + strTypeName + "\" \"" + strParamName + "\")\n";
}
strResult += " )\n"; //close (properties
}
strResult += ")\n\n"; //close (define=signal
}
}
g_free(pIDs);
if(gclass_ref)
g_type_class_unref(gclass_ref); //to match the g_type_class_ref() above.
return strResult;
}
std::string get_defs(GType gtype)
{
std::string strObjectName = g_type_name(gtype);
std::string strDefs = ";; From " + strObjectName + "\n\n";
strDefs += get_signals(gtype);
if(G_TYPE_IS_OBJECT(gtype))
strDefs += get_properties(gtype);
return strDefs;
}

View File

@@ -0,0 +1,33 @@
/* $Id: generate_extra_defs.h 2 2003-01-07 16:59:16Z murrayc $ */
/* generate_extra_defs.h
*
* Copyright (C) 2001 The Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glib-object.h>
#include <iostream>
#include <string>
std::string get_defs(GType gtype);
std::string get_properties(GType gtype);
std::string get_type_name(GType gtype);
std::string get_type_name_parameter(GType gtype);
std::string get_type_name_signal(GType gtype);
std::string get_signals(GType gtype);

View File

@@ -0,0 +1,392 @@
#! /usr/bin/perl
#
# tools/generate_wrap_init.pl. Generated from generate_wrap_init.pl.in by configure.
#
use strict;
my @namespace_whole = (); # list of strings.
my $function_prefix = "";
my $parent_dir = ""; # e.g. gtkmm
my $path = "gtk--";
my $debug = 0;
my @filenames_headers = ();
my %objects = ();
my %exceptions = ();
my %namespaces = (); # hashmap of lists of strings.
my %basenames = ();
my %win32_nowrap = ();
my %deprecated = ();
# Loop through command line arguments, setting variables:
while ($ARGV[0] =~ /^-/)
{
if ($ARGV[0] =~ /--namespace=(\S+)/)
{
push(@namespace_whole, $1);
if($parent_dir eq "")
{ $parent_dir = lc($1) . "mm"; }
}
elsif ($ARGV[0] =~ /--function_prefix=(\S+)/)
{
$function_prefix = "$1";
}
elsif ($ARGV[0] =~ /--parent_dir=(\S+)/)
{
$parent_dir = "$1";
}
elsif
(
$ARGV[0] =~ /--debug/) {$debug = 1;
}
elsif ($ARGV[0] =~ /--path=(\S+)/)
{
$path = "$1";
}
else
{
print "Error: unknown option $ARGV[0]\n";
exit;
}
shift @ARGV;
}
while ($ARGV[0])
{
if ($debug) {warn "Processing file : $ARGV[0]\n";}
my $filename = $ARGV[0];
open FILE, $filename or die "Couldn't open file $ARGV[0] : $!\n";
# my $file = $ARGV[0];
# $file =~ s/.*\/([^\/]+)$/$1/;
# $file =~ s/\.hg//;
my @tmpnamespace = @namespace_whole;
my $cppname = "";
my $cname = "";
my $ccast = "";
while (<FILE>)
{
if (/CLASS_START\((\w+)\)/) #We need a new way to get the namespace.
{
print "generate_wrap_init: namespace found: $1\n";
push(@tmpnamespace, $1);
}
elsif (/_CLASS_GOBJECT\s*\(/) #TODO: There is duplication of code here.
{
my $line = $_;
while ($line !~ /\)/ && ($_ = <FILE>))
{
$line .= $_;
}
$line =~ s/^.*_CLASS_GOBJECT\s*\(//;
$line =~ s/\s+//g;
($cppname, $cname, $ccast) = split(/,/, $line);
$objects{$cppname} = $cname;
@{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
$basenames{$cppname} = lc($ccast);
}
elsif (/_CLASS_GTKOBJECT\s*\(/)
{
my $line = $_;
while ($line !~ /\)/ && ($_ = <FILE>))
{
$line .= $_;
}
$line =~ s/^.*_CLASS_GTKOBJECT\s*\(//;
$line =~ s/\s+//g;
($cppname, $cname, $ccast) = split(/,/, $line);
#TODO: Remove this hack eventually.
if( ($cname ne "GtkTree") && ($cname ne "GtkTreeItem") && ($cname ne "GtkText") )
{
$objects{$cppname} = $cname;
@{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
$basenames{$cppname} = lc($ccast);
}
}
elsif (/_WRAP_GERROR\s*\(/) #TODO: There is duplication of code here.
{
my $line = $_;
while ($line !~ /\)/ && ($_ = <FILE>))
{
$line .= $_;
}
$line =~ s/^.*_WRAP_GERROR\s*\(//;
$line =~ s/\s+//g;
$line =~ s/\)//;
($cppname, $cname, $ccast) = split(/,/, $line);
$exceptions{$cppname} = $cname;
@{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
$basenames{$cppname} = lc($ccast);
}
elsif (/_GTKMMPROC_WIN32_NO_WRAP/)
{
$win32_nowrap{$cppname} = 1;
}
elsif (/_IS_DEPRECATED/)
{
$deprecated{$cppname} = 1;
}
}
# Store header filename so that we can #include it later:
my $filename_header = $filename;
$filename_header =~ s/.*\/([^\/]+)\.hg/$1.h/;
push(@filenames_headers, $filename_header);
shift @ARGV;
close(FILE);
}
# my $namespace_whole_lower = lc($namespace_whole);
print << "EOF";
#include <glib.h>
// Disable the 'const' function attribute of the get_type() functions.
// GCC would optimize them out because we don't use the return value.
#undef G_GNUC_CONST
#define G_GNUC_CONST /* empty */
#include <${parent_dir}/wrap_init.h>
#include <glibmm/error.h>
#include <glibmm/object.h>
// #include the widget headers so that we can call the get_type() static methods:
EOF
foreach( @filenames_headers )
{
print "#include \"" . $_ . "\"\n";
}
print "\n";
# Here we have to be subtle. The gtkmm objects are easy, they all go
# into the Gtk namespace. But in gnomemm, some go into the Gnome
# namespace (most of them), and some into the Gtk one (because the
# corresponding widget is Gtk-prefixed, e.g. GtkTed, GtkDial, etc...
# First, the Gtk namespace
print "extern \"C\"\n";
print "{\n";
print "\n//Declarations of the *_get_type() functions:\n\n";
my $i = 0;
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
print "GType $basenames{$i}_get_type(void);\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
print "\n//Declarations of the *_error_quark() functions:\n\n";
my $i = 0;
foreach $i (sort keys %exceptions)
{
print "GQuark $basenames{$i}_quark(void);\n";
}
print "} // extern \"C\"\n";
print "\n";
print "\n//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:\n\n";
my $i = 0;
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
my $namespace_declarations = "";
my $namespace_close = "";
foreach ( @{$namespaces{$i}} )
{
$namespace_declarations .= "namespace $_ { ";
$namespace_close .= " }";
}
print "${namespace_declarations} class ${i}_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; ${namespace_close}\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
# print "\n//Declarations of the *Error::throw_func() methods:\n\n";
#
# my $i = 0;
# foreach $i (sort keys %exceptions)
# {
# my $namespace_declarations = "";
# my $namespace_close = "";
# foreach ( @{$namespaces{$i}} )
# {
# $namespace_declarations .= "namespace $_ { ";
# $namespace_close .= " }";
# }
#
# print "${namespace_declarations} class ${i} { public: static void throw_func(GError*); }; ${namespace_close}\n";
# }
my $namespace_whole_declarations = "";
my $namespace_whole_close = "";
foreach( @namespace_whole )
{
$namespace_whole_declarations .= "namespace " . $_ ." { ";
$namespace_whole_close = "} //" . $_ . "\n" . $namespace_whole_close;
}
print "\n";
print "$namespace_whole_declarations\n";
print "\n";
print "void " .$function_prefix . "wrap_init()\n{\n";
# Generate namespace::wrap_init() body
#
print " // Register Error domains:\n";
foreach $i (sort keys %exceptions)
{
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
{
$namespace_prefix .= $_ ."::";
}
print " Glib::Error::register_domain($basenames{$i}_quark(), &", "${namespace_prefix}${i}::throw_func);\n";
}
print "\n";
print "// Map gtypes to gtkmm wrapper-creation functions:\n";
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
{
$namespace_prefix .= $_ ."::";
}
print " Glib::wrap_register($basenames{$i}_get_type(), &", "${namespace_prefix}${i}_Class::wrap_new);\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
print "\n";
print " // Register the gtkmm gtypes:\n";
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
{
$namespace_prefix .= $_ ."::";
}
print " ${namespace_prefix}${i}::get_type();\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
print << "EOF";
} // wrap_init()
$namespace_whole_close
EOF
exit 0;

View File

@@ -0,0 +1,392 @@
#! @PERL_PATH@
#
# @configure_input@
#
use strict;
my @namespace_whole = (); # list of strings.
my $function_prefix = "";
my $parent_dir = ""; # e.g. gtkmm
my $path = "gtk--";
my $debug = 0;
my @filenames_headers = ();
my %objects = ();
my %exceptions = ();
my %namespaces = (); # hashmap of lists of strings.
my %basenames = ();
my %win32_nowrap = ();
my %deprecated = ();
# Loop through command line arguments, setting variables:
while ($ARGV[0] =~ /^-/)
{
if ($ARGV[0] =~ /--namespace=(\S+)/)
{
push(@namespace_whole, $1);
if($parent_dir eq "")
{ $parent_dir = lc($1) . "mm"; }
}
elsif ($ARGV[0] =~ /--function_prefix=(\S+)/)
{
$function_prefix = "$1";
}
elsif ($ARGV[0] =~ /--parent_dir=(\S+)/)
{
$parent_dir = "$1";
}
elsif
(
$ARGV[0] =~ /--debug/) {$debug = 1;
}
elsif ($ARGV[0] =~ /--path=(\S+)/)
{
$path = "$1";
}
else
{
print "Error: unknown option $ARGV[0]\n";
exit;
}
shift @ARGV;
}
while ($ARGV[0])
{
if ($debug) {warn "Processing file : $ARGV[0]\n";}
my $filename = $ARGV[0];
open FILE, $filename or die "Couldn't open file $ARGV[0] : $!\n";
# my $file = $ARGV[0];
# $file =~ s/.*\/([^\/]+)$/$1/;
# $file =~ s/\.hg//;
my @tmpnamespace = @namespace_whole;
my $cppname = "";
my $cname = "";
my $ccast = "";
while (<FILE>)
{
if (/CLASS_START\((\w+)\)/) #We need a new way to get the namespace.
{
print "generate_wrap_init: namespace found: $1\n";
push(@tmpnamespace, $1);
}
elsif (/_CLASS_GOBJECT\s*\(/) #TODO: There is duplication of code here.
{
my $line = $_;
while ($line !~ /\)/ && ($_ = <FILE>))
{
$line .= $_;
}
$line =~ s/^.*_CLASS_GOBJECT\s*\(//;
$line =~ s/\s+//g;
($cppname, $cname, $ccast) = split(/,/, $line);
$objects{$cppname} = $cname;
@{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
$basenames{$cppname} = lc($ccast);
}
elsif (/_CLASS_GTKOBJECT\s*\(/)
{
my $line = $_;
while ($line !~ /\)/ && ($_ = <FILE>))
{
$line .= $_;
}
$line =~ s/^.*_CLASS_GTKOBJECT\s*\(//;
$line =~ s/\s+//g;
($cppname, $cname, $ccast) = split(/,/, $line);
#TODO: Remove this hack eventually.
if( ($cname ne "GtkTree") && ($cname ne "GtkTreeItem") && ($cname ne "GtkText") )
{
$objects{$cppname} = $cname;
@{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
$basenames{$cppname} = lc($ccast);
}
}
elsif (/_WRAP_GERROR\s*\(/) #TODO: There is duplication of code here.
{
my $line = $_;
while ($line !~ /\)/ && ($_ = <FILE>))
{
$line .= $_;
}
$line =~ s/^.*_WRAP_GERROR\s*\(//;
$line =~ s/\s+//g;
$line =~ s/\)//;
($cppname, $cname, $ccast) = split(/,/, $line);
$exceptions{$cppname} = $cname;
@{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings
$basenames{$cppname} = lc($ccast);
}
elsif (/_GTKMMPROC_WIN32_NO_WRAP/)
{
$win32_nowrap{$cppname} = 1;
}
elsif (/_IS_DEPRECATED/)
{
$deprecated{$cppname} = 1;
}
}
# Store header filename so that we can #include it later:
my $filename_header = $filename;
$filename_header =~ s/.*\/([^\/]+)\.hg/$1.h/;
push(@filenames_headers, $filename_header);
shift @ARGV;
close(FILE);
}
# my $namespace_whole_lower = lc($namespace_whole);
print << "EOF";
#include <glib.h>
// Disable the 'const' function attribute of the get_type() functions.
// GCC would optimize them out because we don't use the return value.
#undef G_GNUC_CONST
#define G_GNUC_CONST /* empty */
#include <${parent_dir}/wrap_init.h>
#include <glibmm/error.h>
#include <glibmm/object.h>
// #include the widget headers so that we can call the get_type() static methods:
EOF
foreach( @filenames_headers )
{
print "#include \"" . $_ . "\"\n";
}
print "\n";
# Here we have to be subtle. The gtkmm objects are easy, they all go
# into the Gtk namespace. But in gnomemm, some go into the Gnome
# namespace (most of them), and some into the Gtk one (because the
# corresponding widget is Gtk-prefixed, e.g. GtkTed, GtkDial, etc...
# First, the Gtk namespace
print "extern \"C\"\n";
print "{\n";
print "\n//Declarations of the *_get_type() functions:\n\n";
my $i = 0;
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
print "GType $basenames{$i}_get_type(void);\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
print "\n//Declarations of the *_error_quark() functions:\n\n";
my $i = 0;
foreach $i (sort keys %exceptions)
{
print "GQuark $basenames{$i}_quark(void);\n";
}
print "} // extern \"C\"\n";
print "\n";
print "\n//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:\n\n";
my $i = 0;
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
my $namespace_declarations = "";
my $namespace_close = "";
foreach ( @{$namespaces{$i}} )
{
$namespace_declarations .= "namespace $_ { ";
$namespace_close .= " }";
}
print "${namespace_declarations} class ${i}_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; ${namespace_close}\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
# print "\n//Declarations of the *Error::throw_func() methods:\n\n";
#
# my $i = 0;
# foreach $i (sort keys %exceptions)
# {
# my $namespace_declarations = "";
# my $namespace_close = "";
# foreach ( @{$namespaces{$i}} )
# {
# $namespace_declarations .= "namespace $_ { ";
# $namespace_close .= " }";
# }
#
# print "${namespace_declarations} class ${i} { public: static void throw_func(GError*); }; ${namespace_close}\n";
# }
my $namespace_whole_declarations = "";
my $namespace_whole_close = "";
foreach( @namespace_whole )
{
$namespace_whole_declarations .= "namespace " . $_ ." { ";
$namespace_whole_close = "} //" . $_ . "\n" . $namespace_whole_close;
}
print "\n";
print "$namespace_whole_declarations\n";
print "\n";
print "void " .$function_prefix . "wrap_init()\n{\n";
# Generate namespace::wrap_init() body
#
print " // Register Error domains:\n";
foreach $i (sort keys %exceptions)
{
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
{
$namespace_prefix .= $_ ."::";
}
print " Glib::Error::register_domain($basenames{$i}_quark(), &", "${namespace_prefix}${i}::throw_func);\n";
}
print "\n";
print "// Map gtypes to gtkmm wrapper-creation functions:\n";
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
{
$namespace_prefix .= $_ ."::";
}
print " Glib::wrap_register($basenames{$i}_get_type(), &", "${namespace_prefix}${i}_Class::wrap_new);\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
print "\n";
print " // Register the gtkmm gtypes:\n";
foreach $i (sort keys %objects)
{
if( $deprecated{$i} eq 1 )
{
# The uc(parent_dir) is a bit of a hack. One day it will get it wrong.
print "#ifndef " . uc($parent_dir) ."_DISABLE_DEPRECATED\n"
}
#On Win32, these classes are not compiled:
if( $win32_nowrap{$i} eq 1 )
{
print "#ifndef G_OS_WIN32\n"
}
my $namespace_prefix = "";
foreach( @{$namespaces{$i}} )
{
$namespace_prefix .= $_ ."::";
}
print " ${namespace_prefix}${i}::get_type();\n";
if( $win32_nowrap{$i} eq 1 )
{
print "#endif //G_OS_WIN32\n"
}
if( $deprecated{$i} eq 1 )
{
print "#endif // *_DISABLE_DEPRECATED\n"
}
}
print << "EOF";
} // wrap_init()
$namespace_whole_close
EOF
exit 0;

View File

@@ -0,0 +1,239 @@
#! @PERL_PATH@
#
# @configure_input@
#
######################################################################
# gmmproc (version 4)
######################################################################
#
# *** WARNING: Only modify gmmproc.in. gmmproc is built. ***
#
# Copyright 2001, Karl Einar Nelson, Murray Cumming
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
#
# 'classes':
# WrapParser: steps through .hg and .ccg files, outputting appropriate m4 code with Outputter.
# Outputter: Used by WrapParser to ouput wrapper code. Ouputs *.g1 temp file and uses m4 to generate *.g2 from it. Then outputs .h and .cc files.
# Function: Contains information about C and C++ functions and signals.
#
######################################################################
########################## 'main()' ##################################
$main::procdir;
$main::m4path;
BEGIN {
# get prefix info from configure
my $prefix = "@prefix@";
my $exec_prefix = "@exec_prefix@";
my $libdir = "@libdir@";
# This line must match the install directory in m4/Makefile.am
$main::procdir = "$libdir/glibmm-2.4/proc";
$main::m4path = "@M4@";
# This line must match install dir from pm/Makefile.am
push @INC,"$main::procdir/pm";
}
use strict;
use warnings;
use Output;
use WrapParser;
# initialize globals
@main::macrodirs = ();
$main::srcdir = ".";
$main::defsdir = ".";
$main::source = "";
$main::debug = 0;
$main::unwrapped = 1;
{ # checking the environment for a set variable can trigger a warning
no warnings;
$main::debug = 1 if ($ENV{'GMMPROC_DEBUG'} eq 1);
}
# prototypes
sub parse_command_line_args();
#main()
parse_command_line_args();
my $objOutputter = &Output::new($main::m4path, \@main::macrodirs);
my $objWrapParser = &WrapParser::new($objOutputter);
$$objWrapParser{srcdir} = $main::srcdir;
$$objWrapParser{defsdir} = $main::defsdir;
$$objWrapParser{source} = $main::source;
$$objOutputter{source} = $main::source;
$$objOutputter{destdir} = $ARGV[1];
# Merge the C docs, e.g. gtk_docs.xml
# Suck the whole file into one big string, breaking it into tokens:
$objWrapParser->read_file($main::srcdir, $main::source);
# Parse output
$objWrapParser->parse_and_build_output();
# Write out *.g1 temporary file:
$objOutputter->output_temp_g1($$objWrapParser{module}); # e.g. "gtk"
# Execute m4 to get *.g2 file:
{
my $exitcode = $objOutputter->make_g2_from_g1();
if ($exitcode != 0)
{
if (!$main::debug)
{
$objOutputter->remove_temp_files();
}
print STDERR "m4 failed with exit code $exitcode. Aborting...\n";
exit ($exitcode);
}
}
# Section out the resulting output
$objOutputter->write_sections_to_files();
# Remove temp files.
if (!$main::debug)
{
$objOutputter->remove_temp_files();
}
#Warn about any unwrapped function/signals:
if ($main::unwrapped)
{
my @unwrapped = GtkDefs::get_unwrapped();
if (@unwrapped)
{
no warnings;
my @methods =
grep {$$_{entity_type} eq "method" & $$_{c_name}!~/^_/ } @unwrapped;
my @signals =
grep {$$_{entity_type} eq "signal"} @unwrapped;
my @properties =
grep {$$_{entity_type} eq "property"} @unwrapped;
if (@methods)
{
print "Unwrapped functions:\n";
map { print " $$_{c_name}\n"} @methods;
}
if (@properties)
{
print "Unwrapped properties:\n";
map { print " $$_{class}::$$_{name}\n"} @properties;
}
if (@signals)
{
print "Unwrapped signals:\n";
map { print " $$_{class}::$$_{name}\n"} @signals;
}
}
}
# end of program
exit();
####################################################################
sub print_usage()
{
print
'Usage: gmmproc [options] name srcdir destdir
-h
--help This usage message.
--doc Produces a header file for documentation. (FIXME)
--debug Leave intermediate output arround for analysis.
Alternatively, set GMMPROC_DEBUG=1 in the environment.
--unwrapped Warn about possible unwrapped functions.
--defs dir Change the directory to seach for defs.
-I dir Specify the directory with m4 files.
Note: This will read srcdir/name.{hg,ccg} file and generates destdir/name.cc
';
exit (1);
}
# void parse_command_line_args()
sub parse_command_line_args()
{
print_usage() if ($#ARGV == -1);
while ($#ARGV != -1)
{
$_ = shift @ARGV;
if (/^-/)
{
print_usage() if ( /^--help/);
print_usage() if ( /^-h/);
if (/^-I/)
{
push @main::macrodirs, shift @ARGV;
}
elsif (/^--unwrapped/)
{
$main::unwrapped = 1;
}
elsif (/^--defs/)
{
$main::defsdir = shift @ARGV;
}
elsif (/^--debug/)
{
$main::debug = 1;
}
else
{
print "unknown parameter $_\n";
}
next;
}
last;
}
# we already have one argument
if ($#ARGV != 1)
{
print STDERR "Invalid number of arguments (", $#ARGV+2, ")\n";
print_usage();
}
$main::srcdir = $ARGV[0];
$main::source = $_;
push @main::macrodirs,"$main::procdir/m4";
}

View File

@@ -0,0 +1,10 @@
include $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment
EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_m4)
# Install the .m4, files:
tools_m4_includedir = $(libdir)/glibmm-2.4/proc/m4
tools_m4_include_HEADERS = $(files_tools_m4)

View File

@@ -0,0 +1,439 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(tools_m4_include_HEADERS) \
$(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment
subdir = tools/m4
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(tools_m4_includedir)"
tools_m4_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(tools_m4_include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \
class_generic.m4 class_gobject.m4 class_gtkobject.m4 \
class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \
gerror.m4 \
compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \
convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \
method.m4 property.m4 signal.m4 vfunc.m4
EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_m4)
# Install the .m4, files:
tools_m4_includedir = $(libdir)/glibmm-2.4/proc/m4
tools_m4_include_HEADERS = $(files_tools_m4)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tools/m4/Makefile_list_of_sources.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/m4/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tools/m4/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-tools_m4_includeHEADERS: $(tools_m4_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(tools_m4_includedir)" || $(MKDIR_P) "$(DESTDIR)$(tools_m4_includedir)"
@list='$(tools_m4_include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(tools_m4_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(tools_m4_includedir)/$$f'"; \
$(tools_m4_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(tools_m4_includedir)/$$f"; \
done
uninstall-tools_m4_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(tools_m4_include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(tools_m4_includedir)/$$f'"; \
rm -f "$(DESTDIR)$(tools_m4_includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(tools_m4_includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-tools_m4_includeHEADERS
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-tools_m4_includeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip \
install-tools_m4_includeHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags uninstall uninstall-am \
uninstall-tools_m4_includeHEADERS
# 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:

View File

@@ -0,0 +1,8 @@
files_tools_m4 = base.m4 class_shared.m4 class_boxedtype.m4 class_boxedtype_static.m4 \
class_generic.m4 class_gobject.m4 class_gtkobject.m4 \
class_interface.m4 class_opaque_refcounted.m4 class_opaque_copyable.m4 \
gerror.m4 \
compare.m4 convert.m4 convert_base.m4 convert_gtkmm.m4 convert_atk.m4 convert_gdk.m4 \
convert_glib.m4 convert_gtk.m4 convert_pango.m4 ctor.m4 doc.m4 enum.m4 list.m4 member.m4 \
method.m4 property.m4 signal.m4 vfunc.m4

View File

@@ -0,0 +1,436 @@
dnl $Id: base.m4 454 2007-10-12 19:58:00Z arminb $
divert(-1)
dnl
dnl The general convention is
dnl _* are macros
dnl __*__ are variables
dnl
dnl rename several m4 builtins to avoid name clashes
dnl
define(`_PREFIX_BUILTIN_ALIAS', `define(`m4_$1', defn(`$1'))')
define(`_PREFIX_BUILTIN', `_PREFIX_BUILTIN_ALIAS(`$1')`'undefine(`$1')')
_PREFIX_BUILTIN(`builtin')
_PREFIX_BUILTIN(`decr')
_PREFIX_BUILTIN(`errprint')
_PREFIX_BUILTIN(`esyscmd')
_PREFIX_BUILTIN(`eval')
_PREFIX_BUILTIN(`format')
_PREFIX_BUILTIN(`incr')
_PREFIX_BUILTIN(`index')
_PREFIX_BUILTIN(`indir')
_PREFIX_BUILTIN(`len')
_PREFIX_BUILTIN(`maketemp')
_PREFIX_BUILTIN(`syscmd')
_PREFIX_BUILTIN(`substr')
_PREFIX_BUILTIN(`sysval')
_PREFIX_BUILTIN(`mkstemp')
dnl
dnl More alternative names for m4 macros, not undefined (yet!).
dnl
_PREFIX_BUILTIN_ALIAS(`changecom')
_PREFIX_BUILTIN_ALIAS(`changequote')
_PREFIX_BUILTIN_ALIAS(`define')
_PREFIX_BUILTIN_ALIAS(`divert')
_PREFIX_BUILTIN_ALIAS(`divnum')
_PREFIX_BUILTIN_ALIAS(`ifdef')
_PREFIX_BUILTIN_ALIAS(`ifelse')
_PREFIX_BUILTIN_ALIAS(`include')
_PREFIX_BUILTIN_ALIAS(`m4exit')
_PREFIX_BUILTIN_ALIAS(`m4wrap')
_PREFIX_BUILTIN_ALIAS(`patsubst')
_PREFIX_BUILTIN_ALIAS(`popdef')
_PREFIX_BUILTIN_ALIAS(`pushdef')
_PREFIX_BUILTIN_ALIAS(`shift')
_PREFIX_BUILTIN_ALIAS(`undefine')
_PREFIX_BUILTIN_ALIAS(`undivert')
_PREFIX_BUILTIN_ALIAS(`regexp')
_PREFIX_BUILTIN_ALIAS(`translit')
dnl
dnl Type Conversion Macros
dnl
m4_include(convert.m4)
dnl
dnl ----------------------- Utility Macros -------------------------
dnl
dnl
dnl Add a comma before the arg if any, do nothing otherwise
dnl _COMMA_PREFIX(a) -> ,a
dnl _COMMA_PREFIX() -> `'
dnl
define(`_COMMA_PREFIX', `m4_ifelse(m4_eval(m4_len(`$*') >= 1), 1, `,$*')')dnl
dnl
dnl Add a comma after the arg if any, do nothing otherwise
dnl _COMMA_SUFFIX(a) -> a,
dnl _COMMA_SUFFIX() -> `'
dnl
define(`_COMMA_SUFFIX', `m4_ifelse(m4_eval(m4_len(`$*') >= 1), 1, `$*,')')dnl
dnl
dnl _UPPER(string)
dnl uppercase a string
define(`_UPPER',`m4_translit(`$*',`abcdefghijklmnopqrstuvwxyz',`ABCDEFGHIJKLMNOPQRSTUVWXYZ')')
dnl
dnl _LOWER(string)
dnl lower a string
define(`_LOWER',`m4_translit(`$*',`ABCDEFGHIJKLMNOPQRSTUVWXYZ',`abcdefghijklmnopqrstuvwxyz')')
dnl
dnl _QUOTE(macro)
dnl If a macro generates an output with commas we need to protect it
dnl from being broken down and interpreted
define(`_QUOTE',``$*'')
dnl
dnl _NUM(arglist)
dnl count number of arguments
define(`_NUM',`m4_ifelse(m4_len(`$*'),0,0,`$#')')
dnl
dnl For handling of included macro files.
dnl
dnl _PUSH(section_name)
dnl Uses pushdef() to redefine the __DIV__ macro
dnl so that it diverts ouput to the section_name,
dnl or discards it (-1) if no section_name is given.
dnl TODO: However, as far as I can tell, __DIV__ is not used anywhere. murrayc.
define(`_PUSH',`pushdef(`__DIV__',divnum)m4_divert(m4_ifelse($1,,-1,__SEC_$1))dnl`'')
dnl _POP(section_name)
dnl Uses popdef() to go back to the previous definition of the __DIV__ macro.
define(`_POP',`m4_divert(__DIV__)popdef(`__DIV__')dnl`'')
dnl _SECTION(section_name):
dnl m4_divert() sends subsequent output to the specified file:
define(`_SECTION',`m4_divert(__SEC_$1)dnl')
dnl _IMPORT(section_name):
define(`_IMPORT',`m4_undivert(__SEC_$1)dnl')
dnl _GET_TYPE_FUNC(GtkWidget) -> gtk_widget_get_type()
dnl The funny `[A-Z]?' part of the regexp is to catch things like GdkGCFooBar.
define(`_GET_TYPE_FUNC',`dnl
m4_translit(m4_substr(m4_patsubst(`$1',`[A-Z]?[A-Z]',`_\&'),1),`[A-Z]',`[a-z]')_get_type()`'dnl
')
dnl Define a new diversion
dnl In m4, m4_divert() selects the output file to be used for subsequent text output.
dnl 0 is the normal output. We define extra output files with _NEW_SECTION().
dnl This macro seems to redefine __SEC_COUNT as __SEC_COUNT+1, and also
dnl define __SEC_<the macro argument> as __SEC_COUNT.
dnl So it just sets that section identifier to the next number.
define(`__SEC_COUNT__',0)
define(`_NEW_SECTION',`dnl
define(`__SEC_COUNT__',m4_eval(__SEC_COUNT__+1))dnl
define(`__SEC_$1',__SEC_COUNT__)dnl
')
changequote([,])
define([__BT__],[changequote(,)`changequote(`,')])
define([__FT__],[changequote(,)'changequote(`,')])
changequote(`,')
changecom()
dnl
dnl ----------------------- Main Headers -------------------------
dnl
_NEW_SECTION(SECTION_HEADER_FIRST)dnl Before any generated code
_NEW_SECTION(SECTION_HEADER1) dnl header up to the first namespace
_NEW_SECTION(SECTION_HEADER2) dnl header after the first namespace
_NEW_SECTION(SECTION_HEADER3) dnl header after the first namespace
_NEW_SECTION(SECTION_PHEADER) dnl private header
_NEW_SECTION(SECTION_CC_INCLUDES) dnl section for additional includes
_NEW_SECTION(SECTION_SRC_CUSTOM) dnl user supplied implementation
_NEW_SECTION(SECTION_ANONYMOUS_NAMESPACE) dnl built implementation in anonymous namespace
_NEW_SECTION(SECTION_SRC_GENERATED) dnl built implementation
_NEW_SECTION(SECTION_CLASS1) dnl decl to _CLASS
_NEW_SECTION(SECTION_CLASS2) dnl _CLASS to end of class
_NEW_SECTION(SECTION_CC) dnl section for methods (in current namespace)
_NEW_SECTION(SECTION_CC_IMPLEMENTS_INTERFACES) dnl Calls SomeBaseInterface::add_interface(get_type()).
dnl Virtual Functions and Default Signal Handlers (Very similar)
_NEW_SECTION(SECTION_H_VFUNCS) dnl Declaration of vfunc hooks.
_NEW_SECTION(SECTION_H_VFUNCS_CPPWRAPPER) dnl Convenience method, using C++ types, that just calls the vfunc.
_NEW_SECTION(SECTION_H_DEFAULT_SIGNAL_HANDLERS) dnl Declaration of default signal handler' hooks.
_NEW_SECTION(SECTION_CC_DEFAULT_SIGNAL_HANDLERS)
_NEW_SECTION(SECTION_CC_VFUNCS)
_NEW_SECTION(SECTION_CC_VFUNCS_CPPWRAPPER) dnl Convenience method, using C++ types, that just calls the vfunc.
_NEW_SECTION(SECTION_PH_DEFAULT_SIGNAL_HANDLERS) dnl private class declaration
_NEW_SECTION(SECTION_PH_VFUNCS) dnl private class declaration
_NEW_SECTION(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS) dnl private class implementation
_NEW_SECTION(SECTION_PCC_VFUNCS) dnl private class implementation
_NEW_SECTION(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS) dnl gtk+ class_init function
_NEW_SECTION(SECTION_PCC_CLASS_INIT_VFUNCS) dnl gtk+ class_init function
dnl Signal Proxies:
dnl _NEW_SECTION(SECTION_H_SIGNALPROXIES) dnl signal member objects
_NEW_SECTION(SECTION_CC_SIGNALPROXIES) dnl signal member objects
dnl Property Proxies:
dnl _NEW_SECTION(SECTION_H_PROPERTYPROXIES)
_NEW_SECTION(SECTION_CC_PROPERTYPROXIES)
_NEW_SECTION(SECTION_CC_INITIALIZE_CLASS_EXTRA) dnl For instance, to initialize special member data from all constructors. Not commonly used.
dnl _NEW_SECTION(PROXY)
dnl _NEW_SECTION(SECTION_PCC_OBJECT_INIT) dnl gtk+ object_init function
_NEW_SECTION(SECTION_CHECK)
_NEW_SECTION(SECTION_USR)
define(`_CHECK',`dnl
_PUSH(SECTION_CHECK)
$*
_POP()
')
dnl This macro is for including the config header before any code (such as
dnl the #ifndef *_DISABLE_DEPRECATED in deprecated classes) is generated.
define(`_CONFIGINCLUDE',`dnl
_PUSH(SECTION_HEADER_FIRST)
#include <$1>
_POP()
')
dnl Start of processing
dnl
dnl _START(filname, module,modulecanonical) .e.g _START(button, gtkmm, gtkmm)
define(`_START',`dnl
define(`__MODULE__',$2)dnl
define(`__MODULE_CANONICAL__',$3)dnl
define(`__HEADER_GUARD__',`_`'_UPPER(m4_translit(`$3`'_`'$1', `-', `_'))')dnl
define(`__FILE__',$1)dnl
define(`__DEPRECATION_GUARD__',`_UPPER($3)'`_DISABLE_DEPRECATED')dnl
_SECTION(SECTION_HEADER1)
')
dnl Start deprecation of individual methods:
define(`_DEPRECATE_IFDEF_START',`dnl
#ifndef __DEPRECATION_GUARD__'
)
dnl end deprecation of individual methods:
define(`_DEPRECATE_IFDEF_END',`dnl
#endif // __DEPRECATION_GUARD__'
)
dnl begin optional deprecation of whole class
define(`_DEPRECATE_IFDEF_CLASS_START',`dnl
ifdef(`__BOOL_DEPRECATED__',`dnl
_DEPRECATE_IFDEF_START',`dnl
')
')
dnl end optional deprecation of whole class
define(`_DEPRECATE_IFDEF_CLASS_END',`dnl
ifdef(`__BOOL_DEPRECATED__',`dnl
_DEPRECATE_IFDEF_END',`dnl
')
')
dnl This does all the work of assembling the final output
dnl
dnl _END()
dnl
define(`_END',`dnl
m4_divert(0)dnl
#S 0 dnl Marks the beginning of the header file.
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef __HEADER_GUARD__`'_H
#define __HEADER_GUARD__`'_H
_IMPORT(SECTION_HEADER_FIRST)
_DEPRECATE_IFDEF_CLASS_START
m4_ifelse(__MODULE__,glibmm,,`dnl else
#include <glibmm.h>
')dnl
_IMPORT(SECTION_HEADER1)
_IMPORT(SECTION_HEADER2)
_IMPORT(SECTION_HEADER3)
_DEPRECATE_IFDEF_CLASS_END
#endif /* __HEADER_GUARD__`'_H */
#S 1 dnl Marks the beginning of the private header file.
// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef __HEADER_GUARD__`'_P_H
#define __HEADER_GUARD__`'_P_H
_DEPRECATE_IFDEF_CLASS_START
_IMPORT(SECTION_PHEADER)
_DEPRECATE_IFDEF_CLASS_END
#endif /* __HEADER_GUARD__`'_P_H */
#S 2 dnl Marks the beginning of the source file.
// Generated by gtkmmproc -- DO NOT MODIFY!
_DEPRECATE_IFDEF_CLASS_START
#include <__MODULE__/__FILE__.h>
#include <__MODULE__/private/__FILE__`'_p.h>
_IMPORT(SECTION_CC_INCLUDES)
_IMPORT(SECTION_SRC_CUSTOM)
namespace
{
_IMPORT(SECTION_ANONYMOUS_NAMESPACE)
} // anonymous namespace
_IMPORT(SECTION_SRC_GENERATED)
_DEPRECATE_IFDEF_CLASS_END
m4_divert(-1)
m4_undivert()
')
define(`_NAMESPACE',`dnl
_PUSH()
m4_ifdef(`__NAMESPACE__',`dnl
pushdef(`__NAMESPACE__',__NAMESPACE__`::'$1)
pushdef(`__NAMESPACE_BEGIN__',__NAMESPACE_BEGIN__`
namespace '$1`
{')
pushdef(`__NAMESPACE_END__',`} // namespace '$1`
'__NAMESPACE_END__)
',`dnl else
pushdef(`__NAMESPACE__',$1)
pushdef(`__NAMESPACE_BEGIN__',`namespace '$1`
{')
pushdef(`__NAMESPACE_END__',`} // namespace '$1)
')dnl endif __NAMESPACE__
_POP()
')dnl enddef _NAMESPACE
define(`_END_NAMESPACE',`dnl
_PUSH()
popdef(`__NAMESPACE__')
popdef(`__NAMESPACE_BEGIN__')
popdef(`__NAMESPACE_END__')
_POP()
')dnl enddef _END_NAMESPACE
define(`_INCLUDE_FLAG',`__FLAG_$1_INCLUDE_`'_UPPER(m4_translit(`$2',`/.-',`___'))__')dnl
define(`_PH_INCLUDE',`dnl
m4_ifdef(_INCLUDE_FLAG(PH,`$*'),,`dnl else
define(_INCLUDE_FLAG(PH,`$*'))dnl
_PUSH(SECTION_PHEADER)
#include <$*>
_POP()
')dnl endif
')dnl
define(`_CC_INCLUDE',`dnl
m4_ifdef(_INCLUDE_FLAG(CC,`$*'),,`dnl else
define(_INCLUDE_FLAG(CC,`$*'))dnl
_PUSH(SECTION_CC_INCLUDES)
#include <$*>
_POP()
')dnl endif
')dnl
define(`_PINCLUDE', defn(`_PH_INCLUDE'))
# Put these, for instance, around gtkmmproc macros (_WRAP_SIGNAL)
# to make the #ifndef appear around the generated code in both the .h
# and .cc files.
# e.g. _GTKMMPROC_H_AND_CC(#ifndef _SUN_CC_)
# e.g. _GTKMMPROC_H_AND_CC(#endif //_SUN_CC_)
# _GTKMMPROC_H_AND_CC(code)
define(`_GTKMMPROC_H_AND_CC',`dnl
$1
_PUSH(SECTION_CC)
$1
_POP()
')dnl
# Same thing as _GTKMMPROC_H_AND_CC but for signals (_WRAP_SIGNAL)
define(`_GTKMMPROC_SIGNAL_H_AND_CC',`dnl
$1
_PUSH(SECTION_ANONYMOUS_NAMESPACE)
$1
_POP()
$1
_PUSH(SECTION_H_DEFAULT_SIGNAL_HANDLERS)
$1
_POP()
$1
_PUSH(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS)
$1
_POP()
$1
_PUSH(SECTION_CC_DEFAULT_SIGNAL_HANDLERS)
$1
_POP()
$1
_PUSH(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS)
$1
_POP()
$1
_PUSH(SECTION_CC_SIGNALPROXIES)
$1
_POP()
')dnl
m4_include(class_shared.m4)
m4_include(class_generic.m4)
m4_include(class_gobject.m4)
m4_include(class_gtkobject.m4)
m4_include(class_boxedtype.m4)
m4_include(class_boxedtype_static.m4)
m4_include(class_interface.m4)
m4_include(class_opaque_copyable.m4)
m4_include(class_opaque_refcounted.m4)
m4_include(gerror.m4)
m4_include(signal.m4)
m4_include(vfunc.m4)
m4_include(method.m4)
m4_include(member.m4)
m4_include(compare.m4)
m4_include(ctor.m4)
m4_include(property.m4)
m4_include(enum.m4)
_SECTION(SECTION_HEADER1)

View File

@@ -0,0 +1,218 @@
dnl $Id: class_boxedtype.m4 413 2007-05-14 19:28:31Z murrayc $
dnl
dnl _CLASS_BOXEDTYPE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy)
dnl
define(`_CLASS_BOXEDTYPE',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`__BOXEDTYPE_FUNC_NEW',`$3')
define(`__BOXEDTYPE_FUNC_COPY',`$4')
define(`__BOXEDTYPE_FUNC_FREE',`$5')
define(`_CUSTOM_DEFAULT_CTOR',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1')
_POP()
')
_POP()
_SECTION(SECTION_CLASS2)
') dnl End of _CLASS_BOXEDTYPE.
dnl Some of the Gdk types are unions - e.g. GdkEvent.
define(`_CUSTOM_STRUCT_PROTOTYPE',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_STRUCT_PROTOTYPE__',`$1')
_POP()
')
dnl
dnl _END_CLASS_BOXEDTYPE()
dnl denotes the end of a class
dnl
define(`_END_CLASS_BOXEDTYPE',`
_SECTION(SECTION_HEADER1)
ifdef(`__BOOL_CUSTOM_STRUCT_PROTOTYPE__',`dnl
',`dnl
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _`'__CNAME__ __CNAME__; }
#endif
')dnl
_SECTION(SECTION_HEADER3)
__NAMESPACE_BEGIN__
/** @relates __NAMESPACE__::__CPPNAME__
* @param lhs The left-hand side
* @param rhs The right-hand side
*/
inline void swap(__CPPNAME__& lhs, __CPPNAME__& rhs)
{ lhs.swap(rhs); }
__NAMESPACE_END__
namespace Glib
{
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false);
')dnl endif __BOOL_NO_WRAP_FUNCTION__
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__>
{};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
} // namespace Glib
_SECTION(SECTION_SRC_GENERATED)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
namespace Glib
{
__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy)
{
return __NAMESPACE__::__CPPNAME__`'(object, take_copy);
}
} // namespace Glib
')dnl endif
__NAMESPACE_BEGIN__
dnl
dnl The implementation:
dnl
// static
GType __CPPNAME__::get_type()
{
return _GET_TYPE_FUNC(__CNAME__);
}
ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
',`dnl else
__CPPNAME__::__CPPNAME__`'()
:
ifelse(__BOXEDTYPE_FUNC_NEW,NONE,`dnl
gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
',`dnl else
gobject_ (__BOXEDTYPE_FUNC_NEW`'())
')dnl
{}
')dnl endif __BOOL_CUSTOM_DEFAULT_CTOR__
__CPPNAME__::__CPPNAME__`'(const __CPPNAME__& other)
:
gobject_ ((other.gobject_) ? __BOXEDTYPE_FUNC_COPY`'(other.gobject_) : 0)
{}
__CPPNAME__::__CPPNAME__`'(__CNAME__* gobject, bool make_a_copy)
:
// For BoxedType wrappers, make_a_copy is true by default. The static
// BoxedType wrappers must always take a copy, thus make_a_copy = true
// ensures identical behaviour if the default argument is used.
gobject_ ((make_a_copy && gobject) ? __BOXEDTYPE_FUNC_COPY`'(gobject) : gobject)
{}
__CPPNAME__& __CPPNAME__::operator=(const __CPPNAME__`'& other)
{
__CPPNAME__ temp (other);
swap(temp);
return *this;
}
__CPPNAME__::~__CPPNAME__`'()
{
dnl This could be a free or an unref, we do not need to know.
if(gobject_)
__BOXEDTYPE_FUNC_FREE`'(gobject_);
}
void __CPPNAME__::swap(__CPPNAME__& other)
{
__CNAME__ *const temp = gobject_;
gobject_ = other.gobject_;
other.gobject_ = temp;
}
__CNAME__* __CPPNAME__::gobj_copy() const
{
return __BOXEDTYPE_FUNC_COPY`'(gobject_);
}
_IMPORT(SECTION_CC)
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl
dnl The actual class, e.g. Pango::FontDescription, declaration:
dnl
_IMPORT(SECTION_CLASS1)
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __CNAME__ BaseObjectType;
static GType get_type() G_GNUC_CONST;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
',`dnl else
__CPPNAME__`'();
')dnl
explicit __CPPNAME__`'(__CNAME__* gobject, bool make_a_copy = true);
__CPPNAME__`'(const __CPPNAME__& other);
__CPPNAME__& operator=(const __CPPNAME__& other);
~__CPPNAME__`'();
void swap(__CPPNAME__& other);
///Provides access to the underlying C instance.
__CNAME__* gobj() { return gobject_; }
///Provides access to the underlying C instance.
const __CNAME__* gobj() const { return gobject_; }
///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
__CNAME__* gobj_copy() const;
protected:
__CNAME__* gobject_;
private:
_IMPORT(SECTION_CLASS2)
')

View File

@@ -0,0 +1,169 @@
dnl $Id: class_boxedtype_static.m4 58 2003-12-14 11:53:04Z murrayc $
dnl
dnl _CLASS_BOXEDTYPE_STATIC(TreeIter, GtkTreeIter)
dnl
define(`_CLASS_BOXEDTYPE_STATIC',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`_CUSTOM_DEFAULT_CTOR',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1')
_POP()
')
define(`_CUSTOM_CTOR_CAST',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_CTOR_CAST__',`$1')
_POP()
')
_POP()
_SECTION(SECTION_CLASS2)
') dnl End of _CLASS_BOXEDTYPE_STATIC.
dnl TreeIterBase shouldn't have a wrap() method - we'll custom implement them for TreeIter and TreeRow:
define(`_NO_WRAP_FUNCTION',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_NO_WRAP_FUNCTION__',`$1')
_POP()
')
dnl
dnl _END_CLASS_BOXEDTYPE_STATIC()
dnl denotes the end of a class
dnl
define(`_END_CLASS_BOXEDTYPE_STATIC',`
_SECTION(SECTION_HEADER3)
namespace Glib
{
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
/** @relates __NAMESPACE__::__CPPNAME__
* @param object The C instance
* @result A C++ instance that wraps this C instance.
*/
__NAMESPACE__::__CPPNAME__& wrap(__CNAME__* object);
/** @relates __NAMESPACE__::__CPPNAME__
* @param object The C instance
* @result A C++ instance that wraps this C instance.
*/
const __NAMESPACE__::__CPPNAME__& wrap(const __CNAME__* object);
')dnl endif __BOOL_NO_WRAP_FUNCTION__
#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__>
{};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
} // namespace Glib
_SECTION(SECTION_SRC_GENERATED)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
namespace Glib
{
__NAMESPACE__::__CPPNAME__& wrap(__CNAME__* object)
{
return *reinterpret_cast<__NAMESPACE__::__CPPNAME__*>(object);
}
const __NAMESPACE__::__CPPNAME__& wrap(const __CNAME__* object)
{
return *reinterpret_cast<const __NAMESPACE__::__CPPNAME__*>(object);
}
} // namespace Glib
')dnl endif __BOOL_NO_WRAP_FUNCTION__
__NAMESPACE_BEGIN__
dnl
dnl The implementation:
dnl
dnl // static
dnl const __CNAME__ __CPPNAME__::gobject_initializer_ = { 0, };
dnl
// static
GType __CPPNAME__::get_type()
{
return _GET_TYPE_FUNC(__CNAME__);
}
ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',,`dnl else
__CPPNAME__::__CPPNAME__`'()
{
GLIBMM_INITIALIZE_STRUCT`'(gobject_, __CNAME__);
}
')dnl
ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
__CPPNAME__::__CPPNAME__`'(const __CNAME__* gobject)
{
if(gobject)
gobject_ = *gobject;
else
GLIBMM_INITIALIZE_STRUCT`'(gobject_, __CNAME__);
}
')dnl
_IMPORT(SECTION_CC)
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl
dnl The actual class, e.g. Gtk::TreeIter, declaration:
dnl
_IMPORT(SECTION_CLASS1)
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __CNAME__ BaseObjectType;
static GType get_type() G_GNUC_CONST;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',,`dnl else
__CPPNAME__`'();
')dnl
ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
explicit __CPPNAME__`'(const __CNAME__* gobject); // always takes a copy
')dnl
///Provides access to the underlying C instance.
__CNAME__* gobj() { return &gobject_; }
///Provides access to the underlying C instance.
const __CNAME__* gobj() const { return &gobject_; }
protected:
__CNAME__ gobject_;
dnl static const __CNAME__ gobject_initializer_;
private:
_IMPORT(SECTION_CLASS2)
')

View File

@@ -0,0 +1,54 @@
dnl $Id: class_generic.m4 2 2003-01-07 16:59:16Z murrayc $
dnl
dnl _CLASS_GENERIC(LayoutIter, PangoLayoutIter)
dnl
define(`_CLASS_GENERIC',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
_POP()
_SECTION(SECTION_CLASS2)
') dnl End of _CLASS_GENERIC.
dnl
dnl _END_CLASS_GENERIC()
dnl denotes the end of a class
dnl
define(`_END_CLASS_GENERIC',`
_SECTION(SECTION_SRC_GENERATED)
__NAMESPACE_BEGIN__
dnl The implementation:
_IMPORT(SECTION_CC)
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl
dnl The actual class, e.g. Pango::FontDescription, declaration:
dnl
_IMPORT(SECTION_CLASS1)
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __CNAME__ BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
private:
_IMPORT(SECTION_CLASS2)
')

View File

@@ -0,0 +1,243 @@
dnl $Id: class_gobject.m4 413 2007-05-14 19:28:31Z murrayc $
define(`_CLASS_GOBJECT',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`__CCAST__',`$3')
define(`__BASE__',_LOWER(__CPPNAME__))
define(`__CPPPARENT__',`$4')
define(`__CPARENT__',`$5')
define(`__PCAST__',`($5*)')
dnl Some C types, e.g. GdkWindow or GdkPixmap, are a typedef to their base type,
dnl rather than the real instance type. That is really ugly, yes. We get around
dnl the problem by supporting optional __REAL_* arguments to this macro.
define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6'))
define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7'))
_POP()
_SECTION(SECTION_CLASS2)
') dnl end of _CLASS_GOBJECT
dnl Widget and Object, and some others, have custom-written destructor implementations:
define(`_CUSTOM_DTOR',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_DTOR__',`$1')
_POP()
')
dnl Gdk::Pixmap_Class::wrap_new() needs a custom implementation, in order
dnl to create a Gdk::Bitmap object if appropriate. See comments there.
define(`_CUSTOM_WRAP_NEW',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_WRAP_NEW__',`1')
_POP()
')
dnl Gnome::Canvas::CanvasAA::CanvasAA() needs access to the
dnl normally-private canvas_class_ member variable. See comments there.
define(`_GMMPROC_PROTECTED_GCLASS',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_PROTECTED_GCLASS__',`1')
_POP()
')
dnl Some of the Gdk types are actually direct typedefs of their base type.
dnl This means that 2 wrap functions would have the same argument.
dnl define(`_NO_WRAP_FUNCTION',`dnl
dnl _PUSH()
dnl Define this macro to be tested for later.
dnl define(`__BOOL_NO_WRAP_FUNCTION__',`$1')
dnl _POP()
dnl ')
dnl
dnl _CREATE_METHOD(args_type_and_name_hpp, args_type_and_name_cpp,args_name_only);
dnl
define(`_CREATE_METHOD',`
static Glib::RefPtr<`'__CPPNAME__`'> create(`'$1`');
_PUSH(SECTION_CC)
Glib::RefPtr<`'__CPPNAME__`'> __CPPNAME__`'::create(`'$2`')
{
return Glib::RefPtr<`'__CPPNAME__`'>( new __CPPNAME__`'(`'$3`') );
}
_POP()
')
dnl
dnl _END_CLASS_GOBJECT()
dnl denotes the end of a class
dnl
define(`_END_CLASS_GOBJECT',`
_SECTION(SECTION_HEADER1)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl
_STRUCT_PROTOTYPE()
')dnl
__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__
_SECTION(SECTION_HEADER3)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy = false);
}
')dnl
dnl
dnl
_SECTION(SECTION_PHEADER)
#include <glibmm/class.h>
__NAMESPACE_BEGIN__
_PH_CLASS_DECLARATION()
__NAMESPACE_END__
_SECTION(SECTION_SRC_GENERATED)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
namespace Glib
{
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy)
{
return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>( dynamic_cast<__NAMESPACE__::__CPPNAME__*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
}
} /* namespace Glib */
')dnl endif
__NAMESPACE_BEGIN__
/* The *_Class implementation: */
_PCC_CLASS_IMPLEMENTATION()
m4_ifdef(`__BOOL_CUSTOM_WRAP_NEW__',,`dnl else
Glib::ObjectBase* __CPPNAME__`'_Class::wrap_new(GObject* object)
{
return new __CPPNAME__`'((__CNAME__*)`'object);
}
')dnl endif
/* The implementation: */
__CNAME__* __CPPNAME__::gobj_copy()
{
reference();
return gobj();
}
__CPPNAME__::__CPPNAME__`'(const Glib::ConstructParams& construct_params)
:
__CPPPARENT__`'(construct_params)
{}
__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem)
:
__CPPPARENT__`'(__PCAST__`'(castitem))
{}
ifdef(`__BOOL_CUSTOM_DTOR__',`dnl
',`dnl
__CPPNAME__::~__CPPNAME__`'()
{}
')dnl
_CC_CLASS_IMPLEMENTATION()
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl The actual class, e.g. Gtk::Widget, declaration:
dnl _IMPORT(SECTION_H_SIGNALPROXIES_CUSTOM)
_IMPORT(SECTION_CLASS1)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef __CPPNAME__ CppObjectType;
typedef __CPPNAME__`'_Class CppClassType;
typedef __CNAME__ BaseObjectType;
typedef __REAL_CNAME__`'Class BaseClassType;
m4_ifdef(`__BOOL_PROTECTED_GCLASS__',
`protected:',`dnl else
private:')dnl endif
friend class __CPPNAME__`'_Class;
static CppClassType `'__BASE__`'_class_;
private:
// noncopyable
__CPPNAME__`'(const __CPPNAME__&);
__CPPNAME__& operator=(const __CPPNAME__&);
protected:
explicit __CPPNAME__`'(const Glib::ConstructParams& construct_params);
explicit __CPPNAME__`'(__CNAME__* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
virtual ~__CPPNAME__`'();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
__CNAME__* gobj() { return reinterpret_cast<__CNAME__*>(gobject_); }
///Provides access to the underlying C GObject.
const __CNAME__* gobj() const { return reinterpret_cast<__CNAME__*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
__CNAME__* gobj_copy();
private:
_IMPORT(SECTION_CLASS2)
public:
_H_VFUNCS_AND_SIGNALS()
')

View File

@@ -0,0 +1,228 @@
dnl $Id: class_gtkobject.m4 413 2007-05-14 19:28:31Z murrayc $
define(`_CLASS_GTKOBJECT',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`__CCAST__',`$3')
define(`__BASE__',_LOWER(__CPPNAME__))
define(`__CPPPARENT__',`$4')
define(`__CPARENT__',`$5')
define(`__PCAST__',`($5*)')
dnl Some C types, e.g. GdkWindow or GdkPixmap, are a typedef to their base type,
dnl rather than the real instance type. That is really ugly, yes. We get around
dnl the problem by supporting optional __REAL_* arguments to this macro.
define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6'))
define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7'))
dnl
dnl ----------------------- Constructors -------------------------
dnl
_POP()
_SECTION(SECTION_CLASS2)
')dnl end of _CLASS_GTKOBJECT
dnl Widget and Object, and some others, have custom-written destructor implementations:
define(`_CUSTOM_DTOR',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_DTOR__',`$1')
_POP()
')
dnl Gtk::Object has a custom-written cast implementation:
define(`_CUSTOM_CTOR_CAST',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_CTOR_CAST__',`$1')
_POP()
')
dnl Top-level windows can not be manage()ed, so we should not use manage() in wrap_new().
define(`_UNMANAGEABLE',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_UNMANAGEABLE__',`$1')
_POP()
')
dnl Optionally ifdef-out the whole .h and .cc files:
define(`_IS_DEPRECATED',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_DEPRECATED__',`$1')
_POP()
')
dnl Gnome::Canvas::CanvasAA::CanvasAA() needs access to the
dnl normally-private canvas_class_ member variable. See comments there.
define(`_GMMPROC_PROTECTED_GCLASS',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_PROTECTED_GCLASS__',`1')
_POP()
')
dnl
dnl _END_CLASS_GTKOBJECT()
dnl denotes the end of a class
dnl
define(`_END_CLASS_GTKOBJECT',`
_SECTION(SECTION_HEADER1)
_STRUCT_PROTOTYPE()
__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__
_SECTION(SECTION_HEADER3)
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
__NAMESPACE__::__CPPNAME__`'* wrap(__CNAME__`'* object, bool take_copy = false);
} //namespace Glib
dnl
dnl
_SECTION(SECTION_PHEADER)
#include <glibmm/class.h>
__NAMESPACE_BEGIN__
_PH_CLASS_DECLARATION()
__NAMESPACE_END__
_SECTION(SECTION_SRC_GENERATED)
namespace Glib
{
__NAMESPACE__::__CPPNAME__`'* wrap(__CNAME__`'* object, bool take_copy)
{
return dynamic_cast<__NAMESPACE__::__CPPNAME__ *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
__NAMESPACE_BEGIN__
/* The *_Class implementation: */
_PCC_CLASS_IMPLEMENTATION()
Glib::ObjectBase* __CPPNAME__`'_Class::wrap_new(GObject* o)
{
ifdef(`__BOOL_UNMANAGEABLE__',`dnl
return new __CPPNAME__`'((__CNAME__*)`'(o)); //top-level windows can not be manage()ed.
',`dnl
return manage(new __CPPNAME__`'((__CNAME__*)`'(o)));
')
}
/* The implementation: */
ifdef(`__BOOL_CUSTOM_CTOR_CAST__',`dnl necessary for Gtk::Object implementation
',`dnl
__CPPNAME__::__CPPNAME__`'(const Glib::ConstructParams& construct_params)
:
__CPPPARENT__`'(construct_params)
{
_IMPORT(SECTION_CC_INITIALIZE_CLASS_EXTRA) dnl Does not seem to work - custom implement it instead.
}
__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem)
:
__CPPPARENT__`'(__PCAST__`'(castitem))
{
_IMPORT(SECTION_CC_INITIALIZE_CLASS_EXTRA) dnl Does not seem to work - custom implement it instead.
}
')dnl
ifdef(`__BOOL_CUSTOM_DTOR__',`dnl
',`dnl
__CPPNAME__::~__CPPNAME__`'()
{
destroy_();
}
')dnl
_CC_CLASS_IMPLEMENTATION()
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl The actual class, e.g. Gtk::Widget, declaration:
dnl _IMPORT(SECTION_H_SIGNALPROXIES_CUSTOM)
_IMPORT(SECTION_CLASS1)
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __CPPNAME__`'_Class CppClassType;
typedef __CNAME__ BaseObjectType;
typedef __REAL_CNAME__`'Class BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~__CPPNAME__`'();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
m4_ifdef(`__BOOL_PROTECTED_GCLASS__',
`protected:',`dnl else
private:')dnl endif
friend class __CPPNAME__`'_Class;
static CppClassType `'__BASE__`'_class_;
// noncopyable
__CPPNAME__`'(const __CPPNAME__&);
__CPPNAME__& operator=(const __CPPNAME__&);
protected:
explicit __CPPNAME__`'(const Glib::ConstructParams& construct_params);
explicit __CPPNAME__`'(__CNAME__* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
__CNAME__* gobj() { return reinterpret_cast<__CNAME__*>(gobject_); }
///Provides access to the underlying C GtkObject.
const __CNAME__* gobj() const { return reinterpret_cast<__CNAME__*>(gobject_); }
_H_VFUNCS_AND_SIGNALS()
private:
_IMPORT(SECTION_CLASS2)
')

View File

@@ -0,0 +1,273 @@
dnl $Id: class_interface.m4 446 2007-09-26 15:10:44Z murrayc $
define(`_CLASS_INTERFACE',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`__CCAST__',`$3')
define(`__CCLASS__',`$4') dnl SomethingIface or SomethingClass, both suffixes are used.
define(`__BASE__',_LOWER(__CPPNAME__))
define(`__CPPPARENT__',`Glib::Interface')
dnl define(`__CPARENT__',`GObject')
define(`__PCAST__',`(GObject*)')
define(`__BOOL_IS_INTERFACE__',`1')
_POP()
_SECTION(SECTION_CLASS2)
') dnl end of _CLASS_INTERFACE
dnl Some of the Gdk types are actually direct typedefs of their base type.
dnl This means that 2 wrap functions would have the same argument.
dnl define(`_NO_WRAP_FUNCTION',`dnl
dnl _PUSH()
dnl Define this macro to be tested for later.
dnl define(`__BOOL_NO_WRAP_FUNCTION__',`$1')
dnl _POP()
dnl ')
dnl
dnl
dnl
define(`_PH_CLASS_DECLARATION_INTERFACE',`dnl
class __CPPNAME__`'_Class : public Glib::Interface_Class
{
public:
typedef __CPPNAME__ CppObjectType;
typedef __CNAME__ BaseObjectType;
typedef __CCLASS__ BaseClassType;
typedef __CPPPARENT__`'_Class CppClassParent;
friend class __CPPNAME__;
const Glib::Interface_Class& init();
static void iface_init_function(void* g_iface, void* iface_data);
static Glib::ObjectBase* wrap_new(GObject*);
protected:
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
_IMPORT(SECTION_PH_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
//Callbacks (virtual functions):
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PH_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
};
')
dnl
dnl
dnl
define(`_PCC_CLASS_IMPLEMENTATION_INTERFACE',`dnl
const Glib::Interface_Class& __CPPNAME__`'_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Interface_Class has to know the interface init function
// in order to add interfaces to implementing types.
class_init_func_ = &__CPPNAME__`'_Class::iface_init_function;
// We can not derive from another interface, and it is not necessary anyway.
gtype_ = _LOWER(__CCAST__)_get_type();
}
return *this;
}
void __CPPNAME__`'_Class::iface_init_function(void* g_iface, void*)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
//This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
//This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
g_assert(klass != 0);
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PCC_CLASS_INIT_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
_IMPORT(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
}
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PCC_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
_IMPORT(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
')
dnl
dnl _END_CLASS_INTERFACE()
dnl denotes the end of a class
dnl
define(`_END_CLASS_INTERFACE',`
_SECTION(SECTION_HEADER1)
_STRUCT_PROTOTYPE()
__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__
_SECTION(SECTION_HEADER3)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy = false);
} // namespace Glib
')dnl
dnl
dnl
_SECTION(SECTION_PHEADER)
#include <glibmm/private/interface_p.h>
__NAMESPACE_BEGIN__
_PH_CLASS_DECLARATION_INTERFACE()
__NAMESPACE_END__
_SECTION(SECTION_SRC_GENERATED)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
namespace Glib
{
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy)
{
return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>( dynamic_cast<__NAMESPACE__::__CPPNAME__*> (Glib::wrap_auto_interface<__NAMESPACE__::__CPPNAME__> ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
}
} // namespace Glib
')dnl endif
__NAMESPACE_BEGIN__
/* The *_Class implementation: */
_PCC_CLASS_IMPLEMENTATION_INTERFACE()
Glib::ObjectBase* __CPPNAME__`'_Class::wrap_new(GObject* object)
{
return new __CPPNAME__`'((__CNAME__*)`'(object));
}
/* The implementation: */
__CPPNAME__::__CPPNAME__`'()
:
Glib::Interface(__BASE__`'_class_.init())
{}
__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem)
:
__CPPPARENT__`'(__PCAST__`'(castitem))
{}
__CPPNAME__::~__CPPNAME__`'()
{}
// static
void __CPPNAME__`'::add_interface(GType gtype_implementer)
{
__BASE__`'_class_.init().add_interface(gtype_implementer);
}
_CC_CLASS_IMPLEMENTATION()
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl The actual class, e.g. Gtk::Widget, declaration:
dnl _IMPORT(SECTION_H_SIGNALPROXIES_CUSTOM)
_IMPORT(SECTION_CLASS1)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef __CPPNAME__ CppObjectType;
typedef __CPPNAME__`'_Class CppClassType;
typedef __CNAME__ BaseObjectType;
typedef __CCLASS__ BaseClassType;
private:
friend class __CPPNAME__`'_Class;
static CppClassType `'__BASE__`'_class_;
// noncopyable
__CPPNAME__`'(const __CPPNAME__&);
__CPPNAME__& operator=(const __CPPNAME__&);
protected:
__CPPNAME__`'(); // you must derive from this class
public:
// This is public so that C++ wrapper instances can be
// created for C instances of unwrapped types.
// For instance, if an unexpected C type implements the C interface.
explicit __CPPNAME__`'(__CNAME__* castitem);
protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
virtual ~__CPPNAME__`'();
static void add_interface(GType gtype_implementer);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
__CNAME__* gobj() { return reinterpret_cast<__CNAME__*>(gobject_); }
///Provides access to the underlying C GObject.
const __CNAME__* gobj() const { return reinterpret_cast<__CNAME__*>(gobject_); }
private:
_IMPORT(SECTION_CLASS2)
public:
_H_VFUNCS_AND_SIGNALS()
')

View File

@@ -0,0 +1,184 @@
dnl $Id: class_opaque_copyable.m4 413 2007-05-14 19:28:31Z murrayc $
dnl
dnl _CLASS_OPAQUE_COPYABLE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy)
dnl
define(`_CLASS_OPAQUE_COPYABLE',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`__OPAQUE_FUNC_NEW',`$3')
define(`__OPAQUE_FUNC_COPY',`$4')
define(`__OPAQUE_FUNC_FREE',`$5')
define(`_CUSTOM_DEFAULT_CTOR',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_CUSTOM_DEFAULT_CTOR__',`$1')
_POP()
')
_POP()
_SECTION(SECTION_CLASS2)
') dnl End of _CLASS_OPAQUE_COPYABLE.
dnl
dnl _END_CLASS_OPAQUE_COPYABLE()
dnl denotes the end of a class
dnl
define(`_END_CLASS_OPAQUE_COPYABLE',`
_SECTION(SECTION_HEADER3)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false);
} // namespace Glib
')dnl endif __BOOL_NO_WRAP_FUNCTION__
_SECTION(SECTION_SRC_GENERATED)
ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl
',`dnl else
namespace Glib
{
__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy /* = false */)
{
return __NAMESPACE__::__CPPNAME__`'(object, take_copy);
}
} // namespace Glib
')dnl endif
__NAMESPACE_BEGIN__
dnl
dnl The implementation:
dnl
ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
',`dnl else
__CPPNAME__::__CPPNAME__`'()
:
ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl
gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
',`dnl else
gobject_ (__OPAQUE_FUNC_NEW`'())
')dnl
{}
')dnl endif __BOOL_CUSTOM_DEFAULT_CTOR__
__CPPNAME__::__CPPNAME__`'(const __CPPNAME__& src)
:
gobject_ ((src.gobject_) ? __OPAQUE_FUNC_COPY`'(src.gobject_) : 0)
{}
__CPPNAME__::__CPPNAME__`'(__CNAME__* castitem, bool make_a_copy /* = false */)
{
if(!make_a_copy)
{
// It was given to us by a function which has already made a copy for us to keep.
gobject_ = castitem;
}
else
{
// We are probably getting it via direct access to a struct,
// so we can not just take it - we have to take a copy of it.
if(castitem)
gobject_ = __OPAQUE_FUNC_COPY`'(castitem);
else
gobject_ = 0;
}
}
ifelse(__OPAQUE_FUNC_COPY,NONE,`dnl
',`dnl else
__CPPNAME__& __CPPNAME__::operator=(const __CPPNAME__`'& src)
{
__CNAME__ *const new_gobject = (src.gobject_) ? __OPAQUE_FUNC_COPY`'(src.gobject_) : 0;
if(gobject_)
__OPAQUE_FUNC_FREE`'(gobject_);
gobject_ = new_gobject;
return *this;
}
')dnl
__CPPNAME__::~__CPPNAME__`'()
{
if(gobject_)
__OPAQUE_FUNC_FREE`'(gobject_);
}
__CNAME__* __CPPNAME__::gobj_copy() const
{
return __OPAQUE_FUNC_COPY`'(gobject_);
}
_IMPORT(SECTION_CC)
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl
dnl The actual class, e.g. Pango::FontDescription, declaration:
dnl
_IMPORT(SECTION_CLASS1)
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __CNAME__ BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
ifdef(`__BOOL_CUSTOM_DEFAULT_CTOR__',`dnl
',`dnl else
__CPPNAME__`'();
')dnl
// Use make_a_copy=true when getting it directly from a struct.
explicit __CPPNAME__`'(__CNAME__* castitem, bool make_a_copy = false);
__CPPNAME__`'(const __CPPNAME__& src);
__CPPNAME__& operator=(const __CPPNAME__& src);
~__CPPNAME__`'();
__CNAME__* gobj() { return gobject_; }
const __CNAME__* gobj() const { return gobject_; }
///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
__CNAME__* gobj_copy() const;
protected:
__CNAME__* gobject_;
private:
_IMPORT(SECTION_CLASS2)
')

View File

@@ -0,0 +1,175 @@
dnl $Id: class_opaque_refcounted.m4 413 2007-05-14 19:28:31Z murrayc $
dnl
dnl _CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref, pango_coverage_unref)
dnl
define(`_CLASS_OPAQUE_REFCOUNTED',`dnl
_PUSH()
dnl
dnl Define the args for later macros
define(`__CPPNAME__',`$1')
define(`__CNAME__',`$2')
define(`__OPAQUE_FUNC_NEW',`$3')
define(`__OPAQUE_FUNC_REF',`$4')
define(`__OPAQUE_FUNC_UNREF',`$5')
_POP()
_SECTION(SECTION_CLASS2)
')dnl End of _CLASS_OPAQUE_REFCOUNTED.
dnl
dnl _END_CLASS_OPAQUE_REFCOUNTED()
dnl denotes the end of a class
dnl
define(`_END_CLASS_OPAQUE_REFCOUNTED',`
_SECTION(SECTION_HEADER3)
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates __NAMESPACE__::__CPPNAME__
*/
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__* object, bool take_copy = false);
} // namespace Glib
_SECTION(SECTION_SRC_GENERATED)
/* Why reinterpret_cast<__CPPNAME__*>(gobject) is needed:
*
* A __CPPNAME__ instance is in fact always a __CNAME__ instance.
* Unfortunately, __CNAME__ cannot be a member of __CPPNAME__,
* because it is an opaque struct. Also, the C interface does not provide
* any hooks to install a destroy notification handler, thus we cannot
* wrap it dynamically either.
*
* The cast works because __CPPNAME__ does not have any member data, and
* it is impossible to derive from it. This is ensured by not implementing
* the (protected) default constructor. The ctor is protected rather than
* private just to avoid a compile warning.
*/
namespace Glib
{
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__* object, bool take_copy)
{
if(take_copy && object)
__OPAQUE_FUNC_REF`'(object);
// See the comment at the top of this file, if you want to know why the cast works.
return Glib::RefPtr<__NAMESPACE__::__CPPNAME__>(reinterpret_cast<__NAMESPACE__::__CPPNAME__*>(object));
}
} // namespace Glib
__NAMESPACE_BEGIN__
dnl
dnl The implementation:
dnl
ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl
',`dnl else
// static
Glib::RefPtr<__CPPNAME__> __CPPNAME__::create()
{
// See the comment at the top of this file, if you want to know why the cast works.
return Glib::RefPtr<__CPPNAME__>(reinterpret_cast<__CPPNAME__*>(__OPAQUE_FUNC_NEW`'()));
}
')dnl endif __OPAQUE_FUNC_NEW
void __CPPNAME__::reference() const
{
// See the comment at the top of this file, if you want to know why the cast works.
__OPAQUE_FUNC_REF`'(reinterpret_cast<__CNAME__*>(const_cast<__CPPNAME__*>(this)));
}
void __CPPNAME__::unreference() const
{
// See the comment at the top of this file, if you want to know why the cast works.
__OPAQUE_FUNC_UNREF`'(reinterpret_cast<__CNAME__*>(const_cast<__CPPNAME__*>(this)));
}
__CNAME__* __CPPNAME__::gobj()
{
// See the comment at the top of this file, if you want to know why the cast works.
return reinterpret_cast<__CNAME__*>(this);
}
const __CNAME__* __CPPNAME__::gobj() const
{
// See the comment at the top of this file, if you want to know why the cast works.
return reinterpret_cast<const __CNAME__*>(this);
}
__CNAME__* __CPPNAME__::gobj_copy() const
{
// See the comment at the top of this file, if you want to know why the cast works.
__CNAME__ *const gobject = reinterpret_cast<__CNAME__*>(const_cast<__CPPNAME__*>(this));
__OPAQUE_FUNC_REF`'(gobject);
return gobject;
}
_IMPORT(SECTION_CC)
__NAMESPACE_END__
dnl
dnl
dnl
dnl
_POP()
dnl
dnl
dnl The actual class, e.g. Pango::FontDescription, declaration:
dnl
_IMPORT(SECTION_CLASS1)
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __CNAME__ BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
ifelse(__OPAQUE_FUNC_NEW,NONE,`dnl
',`dnl else
static Glib::RefPtr<__CPPNAME__> create();
')dnl endif __OPAQUE_FUNC_NEW
// For use with Glib::RefPtr<> only.
void reference() const;
void unreference() const;
///Provides access to the underlying C instance.
__CNAME__* gobj();
///Provides access to the underlying C instance.
const __CNAME__* gobj() const;
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
__CNAME__* gobj_copy() const;
protected:
// Do not derive this. __NAMESPACE__::__CPPNAME__ can neither be constructed nor deleted.
__CPPNAME__`'();
void operator delete(void*, size_t);
private:
// noncopyable
__CPPNAME__`'(const __CPPNAME__&);
__CPPNAME__& operator=(const __CPPNAME__&);
_IMPORT(SECTION_CLASS2)
')

View File

@@ -0,0 +1,221 @@
dnl $Id: class_shared.m4 320 2006-09-19 20:07:31Z murrayc $
define(`_CLASS_START',`dnl
_PUSH(SECTION_CLASS1)
')
dnl
dnl
dnl
define(`_H_VFUNCS_AND_SIGNALS',`dnl
public:
//C++ methods used to invoke GTK+ virtual functions:
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_H_VFUNCS_CPPWRAPPER)
#endif //GLIBMM_VFUNCS_ENABLED
protected:
//GTK+ Virtual Functions (override these to change behaviour):
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_H_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
//Default Signal Handlers::
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
_IMPORT(SECTION_H_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
')
dnl
dnl
dnl
define(`_IMPLEMENTS_INTERFACE_CC',`dnl
_PUSH(SECTION_CC_IMPLEMENTS_INTERFACES)
ifelse(`$2',,,`#ifdef $2'
)dnl
$1`'::add_interface(get_type());
ifelse(`$2',,,`
#endif // $2
')dnl
_POP()
')
dnl
dnl
dnl
define(`_PH_CLASS_DECLARATION',`dnl
class __CPPNAME__`'_Class : public Glib::Class
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef __CPPNAME__ CppObjectType;
typedef __REAL_CNAME__ BaseObjectType;
ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl
',`dnl
typedef __REAL_CNAME__`'Class BaseClassType;
typedef __CPPPARENT__`'_Class CppClassParent;
typedef __REAL_CPARENT__`'Class BaseClassParent;
')dnl
friend class __CPPNAME__;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
const Glib::Class& init();
ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl
',`dnl
static void class_init_function(void* g_class, void* class_data);
')dnl
static Glib::ObjectBase* wrap_new(GObject*);
protected:
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
//Callbacks (default signal handlers):
//These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
//You could prevent the original default signal handlers being called by overriding the *_impl method.
_IMPORT(SECTION_PH_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
//Callbacks (virtual functions):
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PH_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
};
')
dnl
dnl
dnl
define(`_PCC_CLASS_IMPLEMENTATION',`dnl
const Glib::Class& __CPPNAME__`'_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Class has to know the class init function to clone custom types.
class_init_func_ = &__CPPNAME__`'_Class::class_init_function;
// This is actually just optimized away, apparently with no harm.
// Make sure that the parent type has been created.
//CppClassParent::CppObjectType::get_type();
// Create the wrapper type, with the same class/instance size as the base type.
register_derived_type(_LOWER(__CCAST__)_get_type());
// Add derived versions of interfaces, if the C type implements any interfaces:
_IMPORT(SECTION_CC_IMPLEMENTS_INTERFACES)
}
return *this;
}
ifdef(`__BOOL_NO_DERIVED_CLASS__',`dnl
',`dnl
void __CPPNAME__`'_Class::class_init_function(void* g_class, void* class_data)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
CppClassParent::class_init_function(klass, class_data);
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PCC_CLASS_INIT_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
_IMPORT(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
}
')dnl
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_PCC_VFUNCS)
#endif //GLIBMM_VFUNCS_ENABLED
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
_IMPORT(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
')
dnl
dnl
dnl
define(`_CC_CLASS_IMPLEMENTATION',`dnl
__CPPNAME__::CppClassType __CPPNAME__::`'__BASE__`'_class_; // initialize static member
GType __CPPNAME__::get_type()
{
return __BASE__`'_class_.init().get_type();
}
GType __CPPNAME__::get_base_type()
{
return _LOWER(__CCAST__)_get_type();
}
_IMPORT(SECTION_CC)
dnl _IMPORT(SECTION_CC_SIGNALPROXIES_CUSTOM)
_IMPORT(SECTION_CC_SIGNALPROXIES)
_IMPORT(SECTION_CC_PROPERTYPROXIES)
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
_IMPORT(SECTION_CC_DEFAULT_SIGNAL_HANDLERS)
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
#ifdef GLIBMM_VFUNCS_ENABLED
_IMPORT(SECTION_CC_VFUNCS)
_IMPORT(SECTION_CC_VFUNCS_CPPWRAPPER)
#endif //GLIBMM_VFUNCS_ENABLED
')
dnl _PARENT_GCLASS_FROM_OBJECT(object_instance_name)
define(`_PARENT_GCLASS_FROM_OBJECT',`dnl
g_type_class_peek_parent`'(G_OBJECT_GET_CLASS`'($1)) // Get the parent class of the object class (The original underlying C class).
')
dnl _IFACE_PARENT_FROM_OBJECT(object_instance_name)
define(`_IFACE_PARENT_FROM_OBJECT',`dnl
g_type_interface_peek_parent`'( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek`'(G_OBJECT_GET_CLASS`'($1), CppObjectType::get_type`'()) // Get the interface.
)dnl
')
dnl Bonobo doesn't use the "typedef struct _somestruct struct" system.
define(`_STRUCT_NOT_HIDDEN',`dnl
_PUSH()
dnl Define this macro to be tested for later.
define(`__BOOL_STRUCT_NOT_HIDDEN__',`$1')
_POP()
')
dnl _STRUCT_PROTOTYPE()
define(`_STRUCT_PROTOTYPE',`dnl
#ifndef DOXYGEN_SHOULD_SKIP_THIS
ifdef(`__BOOL_STRUCT_NOT_HIDDEN__',`dnl
',`dnl
typedef struct _`'__CNAME__ __CNAME__;
typedef struct _`'__CNAME__`'Class __CNAME__`'Class;
')dnl
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
')
dnl _GTKMMPROC_WIN32_NO_WRAP
dnl Just process it to remove it from the generated file.
dnl generate_wrap_init.pl will look for this in the original .hg file.
dnl
define(`_GTKMMPROC_WIN32_NO_WRAP', dnl
`//This is not available in on Win32.
//This source file will not be compiled,
//and the class will not be registered in wrap_init.h or wrap_init.cc
')dnl

View File

@@ -0,0 +1,118 @@
dnl $Id: compare.m4 58 2003-12-14 11:53:04Z murrayc $
define(`__OPERATOR_DECL',`dnl
/** @relates __NAMESPACE__::__CPPNAME__
* @param lhs The left-hand side
* @param rhs The right-hand side
* @result The result
*/
bool operator`'$1`'(const __CPPNAME__& lhs, const __CPPNAME__& rhs);
')
define(`__OPERATOR_IMPL',`dnl
bool operator`'$1`'(const __CPPNAME__& lhs, const __CPPNAME__& rhs)
{'
ifelse`'(`__UNCONST__',`unconst',`dnl
return ($2`'(const_cast<__CNAME__*>(lhs.gobj()), const_cast<__CNAME__*>(rhs.gobj())) $3);
',`dnl else
return ($2`'(lhs.gobj(), rhs.gobj()) $3);
')`dnl endif
}
')
dnl
dnl _WRAP_EQUAL(gdk_region_equal, unconst)
dnl
define(`_WRAP_EQUAL',`dnl
pushdef(`__FUNC_EQUAL__',$1)dnl
pushdef(`__UNCONST__',$2)dnl
_PUSH(SECTION_HEADER3)
__NAMESPACE_BEGIN__
__OPERATOR_DECL(`==')
__OPERATOR_DECL(`!=')
__NAMESPACE_END__
_SECTION(SECTION_CC)
__OPERATOR_IMPL(`==', __FUNC_EQUAL__, `!= 0')
__OPERATOR_IMPL(`!=', __FUNC_EQUAL__, `== 0')
_POP()
popdef(`__UNCONST__')dnl
popdef(`__FUNC_EQUAL__')dnl
')dnl enddef _WRAP_EQUAL
dnl
dnl _WRAP_COMPARE(gtk_tree_path_compare)
dnl
define(`_WRAP_COMPARE',`dnl
pushdef(`__FUNC_COMPARE__',$1)dnl
pushdef(`__UNCONST__',$2)dnl
_PUSH(SECTION_HEADER3)
__NAMESPACE_BEGIN__
__OPERATOR_DECL(`==')
__OPERATOR_DECL(`!=')
__OPERATOR_DECL(`<')
__OPERATOR_DECL(`>')
__OPERATOR_DECL(`<=')
__OPERATOR_DECL(`>=')
__NAMESPACE_END__
_SECTION(SECTION_CC)
__OPERATOR_IMPL(`==', __FUNC_COMPARE__, `== 0')
__OPERATOR_IMPL(`!=', __FUNC_COMPARE__, `!= 0')
__OPERATOR_IMPL(`<', __FUNC_COMPARE__, `< 0')
__OPERATOR_IMPL(`>', __FUNC_COMPARE__, `> 0')
__OPERATOR_IMPL(`<=', __FUNC_COMPARE__, `<= 0')
__OPERATOR_IMPL(`>=', __FUNC_COMPARE__, `>= 0')
_POP()
popdef(`__UNCONST__')dnl
popdef(`__FUNC_COMPARE__')dnl
')dnl enddef _WRAP_COMPARE
dnl
dnl _WRAP_EQUAL_AND_COMPARE(gtk_text_iter_equal, gtk_text_iter_compare)
dnl
define(`_WRAP_EQUAL_AND_COMPARE',`dnl
pushdef(`__FUNC_EQUAL__',$1)dnl
pushdef(`__FUNC_COMPARE__',$2)dnl
pushdef(`__UNCONST__',$3)dnl
_PUSH(SECTION_HEADER3)
__NAMESPACE_BEGIN__
__OPERATOR_DECL(`==')
__OPERATOR_DECL(`!=')
__OPERATOR_DECL(`<')
__OPERATOR_DECL(`>')
__OPERATOR_DECL(`<=')
__OPERATOR_DECL(`>=')
__NAMESPACE_END__
_SECTION(SECTION_CC)
__OPERATOR_IMPL(`==', __FUNC_EQUAL__, `!= 0')
__OPERATOR_IMPL(`!=', __FUNC_EQUAL__, `== 0')
__OPERATOR_IMPL(`<', __FUNC_COMPARE__, `< 0')
__OPERATOR_IMPL(`>', __FUNC_COMPARE__, `> 0')
__OPERATOR_IMPL(`<=', __FUNC_COMPARE__, `<= 0')
__OPERATOR_IMPL(`>=', __FUNC_COMPARE__, `>= 0')
_POP()
popdef(`__UNCONST__')dnl
popdef(`__FUNC_COMPARE__')dnl
popdef(`__FUNC_EQUAL__')dnl
')dnl enddef _WRAP_EQUAL_AND_COMPARE

View File

@@ -0,0 +1,6 @@
dnl $Id: convert.m4 2 2003-01-07 16:59:16Z murrayc $
# Other libraries, such as libgnomeuimm, can provide their own convert.m4 files,
# Maybe choosing to include the same files as this one.
include(convert_gtkmm.m4)

View File

@@ -0,0 +1,34 @@
include(convert_glib.m4)
_EQUAL(State,AtkState)
_CONV_ENUM(Atk,Role)
_CONV_ENUM(Atk,Layer)
_CONV_ENUM(Atk,RelationType)
_CONV_ENUM(Atk,StateType)
_CONV_ENUM(Atk,CoordType)
_CONV_ENUM(Atk,TextBoundary)
_CONVERSION(`AtkObject*',`Glib::RefPtr<Atk::Object>',Glib::wrap($3))
_CONVERSION(`AtkObject*',`Glib::RefPtr<Object>',Glib::wrap($3))
_CONVERSION(`AtkObject*',`Glib::RefPtr<Atk::Object>',Glib::wrap($3))
_CONVERSION(`AtkObject*',`Glib::RefPtr<const Object>',Glib::wrap($3))
_CONVERSION(`AtkObject*',`Glib::RefPtr<const Atk::Object>',Glib::wrap($3))
_CONVERSION(`AtkObject*',`const Glib::RefPtr<Atk::Object>&',`Glib::wrap($3, true)')
_CONVERSION(`const Glib::RefPtr<Object>&',`AtkObject*',`Glib::unwrap($3)')
_CONVERSION(`const Glib::RefPtr<Atk::Object>&',`AtkObject*',`Glib::unwrap($3)')
_CONVERSION(`Glib::RefPtr<Atk::Object>',`AtkObject*',`Glib::unwrap($3)')
_CONVERSION(`Glib::RefPtr<Object>',`AtkObject*',`Glib::unwrap($3)')
_CONVERSION(`AtkRelationSet*',`Glib::RefPtr<RelationSet>',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<Relation>&',`AtkRelation*',`Glib::unwrap($3)')
_CONVERSION(`AtkRelation*',`Glib::RefPtr<Relation>',Glib::wrap($3))
_CONVERSION(`AtkStateSet*',`Glib::RefPtr<StateSet>',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<StateSet>&',`AtkStateSet*',`Glib::unwrap($3)')
_CONVERSION(`AtkGObjectAccessible*',`Glib::RefPtr<ObjectAccessible>',Glib::wrap($3))
_CONVERSION(`AtkGObjectAccessible*',`Glib::RefPtr<const ObjectAccessible>',Glib::wrap($3))
_CONVERSION(`AtkAttributeSet*', `AttributeSet', `AttributeSet($3, Glib::OWNERSHIP_DEEP)')
_CONVERSION(`const AttributeSet&', `AtkAttributeSet*', `($3).data()')

View File

@@ -0,0 +1,71 @@
dnl $Id: convert_base.m4 293 2006-05-16 19:49:07Z murrayc $
#
# Define a hashing for names
#
define(`__HASH',`__`'m4_translit(`$*',`ABCDEFGHIJKLMNOPQRSTUVWXYZ<>[]&*, ',`abcdefghijklmnopqrstuvwxyzVBNMRSC_')`'')
define(`__EQUIV',`m4_ifdef(EV`'__HASH(`$1'),EV`'__HASH(`$1'),`$1')')
define(`__HASH2',`dnl
pushdef(`__E1',__EQUIV(`$1'))pushdef(`__E2',__EQUIV(`$2'))dnl
m4_ifelse(__E1,__E2,`__EQ',__HASH(__E1)`'__HASH(__E2))`'dnl
popdef(`__E1')popdef(`__E2')`'')
define(`CF__EQ',`$3')
#
# _CONVERT(fromtype, totype, name, wrap_line)
# Print the conversion from ctype to cpptype
define(`_CONVERT',`dnl
m4_ifelse(`$2',void,`$3',`dnl
pushdef(`__COV',`CF`'__HASH2(`$1',`$2')')dnl
m4_ifdef(__COV,`m4_indir(__COV,`$1',`$2',`$3')',`
m4_errprint(`No conversion from $1 to $2 defined (line: $4, parameter name: $3)
')
m4_m4exit(1)
')`'dnl
')`'dnl
')
#
# Functions for populating the tables.
#
define(`_CONVERSION',`
m4_ifelse(`$3',,,`define(CF`'__HASH2(`$1',`$2'),`$3')')
')
define(`_EQUAL',`define(EV`'__HASH(`$1'),`$2')')
/*******************************************************************/
define(`__ARG3__',`$`'3')
define(`_CONV_ENUM',`dnl
_CONVERSION(`$1$2', `$2', (($2)(__ARG3__)))
_CONVERSION(`$1$2', `$1::$2', (($1::$2)(__ARG3__)))
_CONVERSION(`$2', `$1$2', (($1$2)(__ARG3__)))
_CONVERSION(`$1::$2', `$1$2', (($1$2)(__ARG3__)))
')dnl
# e.g. Glib::RefPtr<Gdk::Something> to GdkSomething*
define(`__CONVERT_REFPTR_TO_P',`Glib::unwrap($`'3)')
# e.g. Glib::RefPtr<const Gdk::Something> to GdkSomething*
#define(`__CONVERT_CONST_REFPTR_TO_P',`const_cast<$`'2>($`'3->gobj())')
define(`__CONVERT_CONST_REFPTR_TO_P',`const_cast<$`'2>(Glib::unwrap($`'3))')
# The Sun Forte compiler doesn't seem to be able to handle these, so we are using the altlernative, __CONVERT_CONST_REFPTR_TO_P_SUN.
# The Sun compiler gives this error, for instance:
#  "widget.cc", line 4463: Error: Overloading ambiguity between "Glib::unwrap<Gdk::Window>(const Glib::RefPtr<const Gdk::Window>&)" and
# "Glib::unwrap<const Gdk::Window>(const Glib::RefPtr<const Gdk::Window>&)".
#
define(`__CONVERT_CONST_REFPTR_TO_P_SUN',`const_cast<$`'2>(Glib::unwrap<$1>($`'3))')
include(convert_gtk.m4)
include(convert_pango.m4)
include(convert_gdk.m4)
include(convert_atk.m4)
include(convert_glib.m4)

View File

@@ -0,0 +1,231 @@
include(convert_glib.m4)
_EQUAL(gint8[],gint8*)
_EQUAL(guchar,guint8)
_EQUAL(guchar*,guint8*)
_EQUAL(gfloat,float)
# Enums
_CONV_ENUM(Gdk,AxisUse)
_CONV_ENUM(Gdk,ByteOrder)
_CONV_ENUM(Gdk,CapStyle)
_CONV_ENUM(Gdk,Colorspace)
_CONV_ENUM(Gdk,CursorType)
_CONV_ENUM(Gdk,DragAction)
_CONV_ENUM(Gdk,DragProtocol)
_CONV_ENUM(Gdk,EventMask)
_CONV_ENUM(Gdk,EventType)
_CONV_ENUM(Gdk,ExtensionMode)
_CONV_ENUM(Gdk,Fill)
_CONV_ENUM(Gdk,FillRule)
_CONV_ENUM(Gdk,Function)
_CONV_ENUM(Gdk,GCValuesMask)
_CONV_ENUM(Gdk,Gravity)
_CONV_ENUM(Gdk,ImageType)
_CONV_ENUM(Gdk,InputCondition)
_CONV_ENUM(Gdk,InputMode)
_CONV_ENUM(Gdk,InterpType)
_CONV_ENUM(Gdk,JoinStyle)
_CONV_ENUM(Gdk,LineStyle)
_CONV_ENUM(Gdk,ModifierType)
_CONV_ENUM(Gdk,OverlapType)
_CONV_ENUM(Gdk,PixbufAlphaMode)
_CONV_ENUM(Gdk,RgbDither)
_CONV_ENUM(Gdk,Status)
_CONV_ENUM(Gdk,SubwindowMode)
_CONV_ENUM(Gdk,VisualType)
_CONV_ENUM(Gdk,WindowAttributesType)
_CONV_ENUM(Gdk,WindowEdge)
_CONV_ENUM(Gdk,WindowHints)
_CONV_ENUM(Gdk,WindowState)
_CONV_ENUM(Gdk,WindowType)
_CONV_ENUM(Gdk,WindowTypeHint)
_CONV_ENUM(Gdk,WMDecoration)
_CONV_ENUM(Gdk,WMFunction)
_CONV_ENUM(Gdk,GrabStatus)
_CONVERSION(`Gdk::EventMask',`gint',`$3')
_CONVERSION(`gint',`Gdk::EventMask',`static_cast<Gdk::EventMask>($3)')
_CONVERSION(`ModifierType&',`GdkModifierType*',`(($2) &($3))')
_CONVERSION(`WMDecoration&',`GdkWMDecoration*',`(($2) &($3))')
_CONVERSION(`GdkDragProtocol&',`GdkDragProtocol*',`&($3)')
_CONVERSION(`GdkRectangle&',`GdkRectangle*',`&$3',`*$3')
_CONVERSION(`GdkRgbCmap&',`GdkRgbCmap*',`&$3',`*$3')
# TODO: Remove this, and use Gdk::Device:
_CONVERSION(`GdkDevice*',`const GdkDevice*',`$3')
_CONVERSION(`GdkKeymap*',`const GdkKeymap*',`$3')
# for GtkStyle public struct members
_CONVERSION(`Gdk::Color',`GdkColor', `(*($3).gobj())')
_CONVERSION(`GdkColor',`Gdk::Color', `Gdk::Color(const_cast<GdkColor*>(&($3)), true)')
# Ref (gdkmm) -> Ptr (gtk+)
_CONVERSION(`Color&',`GdkColor*',($3).gobj())
_CONVERSION(`Rectangle&',`GdkRectangle*',($3).gobj())
_CONVERSION(`Gdk::Rectangle&',`GdkRectangle*',($3).gobj())
_CONVERSION(`Font&',`GdkFont*',($3).gobj())
_CONVERSION(`Region&',`GdkRegion*',($3).gobj())
_CONVERSION(`const Glib::RefPtr<Gdk::Colormap>&',`GdkColormap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Pixmap>&',`GdkPixmap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Window>&',`GdkWindow*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Window>&',`GdkWindow*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Pixmap>&',`GdkPixmap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Pixmap>&',`GdkPixmap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Bitmap>&',`GdkBitmap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Bitmap>&',`GdkBitmap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Colormap>&',`GdkColormap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Colormap>&',`GdkColormap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Colormap))
_CONVERSION(`const Glib::RefPtr<GC>&',`GdkGC*',`Glib::unwrap<Gdk::GC>($3)')
_CONVERSION(`const Glib::RefPtr<const GC>&',`GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(GC))
_CONVERSION(`const Glib::RefPtr<Gdk::GC>&',`GdkGC*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Drawable>&',`GdkDrawable*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Drawable>&',`GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable))
_CONVERSION(`const Glib::RefPtr<Image>&',`GdkImage*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Image>&',`GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image))
_CONVERSION(`const Glib::RefPtr<Gdk::Image>&',`GdkImage*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Pixbuf>&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Pixbuf>&',`GdkPixbuf*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pixbuf))
_CONVERSION(`const Glib::RefPtr<Gdk::Pixbuf>&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`Glib::RefPtr<Gdk::Pixbuf>',`GdkPixbuf*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::PixbufAnimation>&',`GdkPixbufAnimation*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::PixbufAnimationIter>&',`GdkPixbufAnimationIter*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::DragContext>&',`GdkDragContext*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Display>&',`GdkDisplay*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Screen>&',`GdkScreen*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Display>&',`GdkDisplay*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gdk::Screen>&',`GdkScreen*',__CONVERT_REFPTR_TO_P)
define(`__CFR2P',`const_cast<$`'2>($`'3.gobj())')
_CONVERSION(const Font&,GdkFont*,__CFR2P)
_CONVERSION(const Gdk::Color&,GdkColor*,__CFR2P)
_CONVERSION(const Color&,GdkColor*,__CFR2P)
_CONVERSION(const Gdk::Rectangle&,GdkRectangle*,__CFR2P)
_CONVERSION(const Rectangle&,GdkRectangle*,__CFR2P)
_CONVERSION(const Gdk::Geometry&,GdkGeometry*,const_cast<$2>(&($3)))
_CONVERSION(const Geometry&,GdkGeometry*,const_cast<$2>(&($3)))
_CONVERSION(const RgbCmap&,GdkRgbCmap*,__CFR2P)
_CONVERSION(`Gdk::Rectangle*',`GdkRectangle*',`Glib::unwrap($3)')
_CONVERSION(`const Gdk::Rectangle*',`GdkRectangle*',`Glib::unwrap(const_cast<Gdk::Rectangle*>($3))')
_CONVERSION(`GdkRectangle*',`Gdk::Rectangle*',`&Glib::wrap($3)')
_CONVERSION(`GdkRectangle*',`const Gdk::Rectangle*',`&Glib::wrap($3)')
_CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
dnl TODO: Should this always be a copy?
_CONVERSION(const Cursor&,GdkCursor*,($3).gobj_copy())
# Special treatment for the Sun Forte compiler
#_CONVERSION(const Glib::RefPtr<const Gdk::Pixmap>&,GdkPixmap*,__CONVERT_CONST_REFPTR_TO_P)
#_CONVERSION(const Glib::RefPtr<const Gdk::Window>&,GdkWindow*,__CONVERT_CONST_REFPTR_TO_P)
#_CONVERSION(const Glib::RefPtr<const Gdk::Colormap>&,GdkColormap*,__CONVERT_CONST_REFPTR_TO_P)
#_CONVERSION(const Glib::RefPtr<const Gdk::Visual>&,GdkVisual*,__CONVERT_CONST_REFPTR_TO_P)
#_CONVERSION(const Glib::RefPtr<const Gdk::Bitmap>&,GdkBitmap*,__CONVERT_CONST_REFPTR_TO_P)
#_CONVERSION(const Glib::RefPtr<const Gdk::Image>&,GdkImage*,__CONVERT_CONST_REFPTR_TO_P)
#_CONVERSION(const Glib::RefPtr<const Gdk::GC>&,GdkGC*,__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Gdk::Pixmap>&', `GdkPixmap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Pixmap))
_CONVERSION(`const Glib::RefPtr<const Gdk::Window>&', `GdkWindow*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Window))
_CONVERSION(`const Glib::RefPtr<const Window>&', `GdkWindow*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Window))
_CONVERSION(`const Glib::RefPtr<const Gdk::Colormap>&', `GdkColormap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Colormap))
_CONVERSION(`const Glib::RefPtr<const Gdk::Visual>&', `GdkVisual*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Visual))
_CONVERSION(`const Glib::RefPtr<const Gdk::Bitmap>&', `GdkBitmap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Bitmap))
_CONVERSION(`const Glib::RefPtr<const Gdk::Image>&', `GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Image))
_CONVERSION(`const Glib::RefPtr<const Image>&', `GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image))
_CONVERSION(`const Glib::RefPtr<const Gdk::GC>&', `GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::GC))
_CONVERSION(`const Glib::RefPtr<const GC>&', `GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(GC))
#_CONVERSION(`const Glib::RefPtr<const Gdk::Drawable>&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Drawable))
#_CONVERSION(`const Glib::RefPtr<const Drawable>&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable))
#_CONVERSION(`const Glib::RefPtr<const Display>&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable))
_CONVERSION(`GdkWindow*',`Glib::RefPtr<Window>', `Glib::wrap((GdkWindowObject*)($3))')
_CONVERSION(`GdkWindow*',`Glib::RefPtr<const Window>', `Glib::wrap((GdkWindowObject*)($3))')
_CONVERSION(`GdkWindow*',`Glib::RefPtr<Gdk::Window>', `Glib::wrap((GdkWindowObject*)($3))')
_CONVERSION(`GdkWindow*',`Glib::RefPtr<const Gdk::Window>', `Glib::wrap((GdkWindowObject*)($3))')
_CONVERSION(`GdkWindow*',`const Glib::RefPtr<Gdk::Window>&', `Glib::wrap((GdkWindowObject*)($3), true)')
_CONVERSION(`GdkPixmap*',`Glib::RefPtr<Pixmap>', `Glib::wrap((GdkPixmapObject*)($3))')
_CONVERSION(`GdkPixmap*',`Glib::RefPtr<const Pixmap>', `Glib::wrap((GdkPixmapObject*)($3))')
_CONVERSION(`GdkPixmap*',`Glib::RefPtr<const Gdk::Pixmap>', `Glib::wrap((GdkPixmapObject*)($3))')
_CONVERSION(`GdkPixmap*',`Glib::RefPtr<Gdk::Pixmap>', `Glib::wrap((GdkPixmapObject*)($3))')
_CONVERSION(`GdkColormap*',`Glib::RefPtr<Colormap>', `Glib::wrap($3)')
_CONVERSION(`GdkColormap*',`Glib::RefPtr<const Colormap>', `Glib::wrap($3)')
_CONVERSION(`GdkColormap*',`Glib::RefPtr<Gdk::Colormap>', `Glib::wrap($3)')
_CONVERSION(`GdkVisual*',`Glib::RefPtr<Gdk::Visual>', `Glib::wrap($3)')
_CONVERSION(`GdkVisual*',`Glib::RefPtr<Visual>', `Glib::wrap($3)')
_CONVERSION(`GdkVisual*',`Glib::RefPtr<const Visual>', `Glib::wrap($3)')
_CONVERSION(`GdkImage*',`Glib::RefPtr<Image>', `Glib::wrap($3)')
_CONVERSION(`GdkPixbuf*',`Glib::RefPtr<Pixbuf>', `Glib::wrap($3)')
_CONVERSION(`GdkPixbuf*',`Glib::RefPtr<Gdk::Pixbuf>', `Glib::wrap($3)')
_CONVERSION(`GdkPixbufAnimationIter*',`Glib::RefPtr<PixbufAnimationIter>', `Glib::wrap($3)')
_CONVERSION(`GdkPixbuf*',`Glib::RefPtr<Gdk::Pixbuf>', Glib::wrap($3))
_CONVERSION(`GdkPixbufAnimation*',`Glib::RefPtr<Gdk::PixbufAnimation>', `Glib::wrap($3)')
_CONVERSION(`GdkGC*',`Glib::RefPtr<Gdk::GC>', `Glib::wrap($3)')
_CONVERSION(`GdkGC*',`Glib::RefPtr<const Gdk::GC>', `Glib::wrap($3)')
_CONVERSION(`GdkDisplay*',`Glib::RefPtr<Display>', `Glib::wrap($3)')
_CONVERSION(`GdkDisplay*',`Glib::RefPtr<const Display>', `Glib::wrap($3)')
_CONVERSION(`GdkDisplay*',`Glib::RefPtr<Gdk::Display>', `Glib::wrap($3)')
_CONVERSION(`GdkDisplay*',`Glib::RefPtr<const Gdk::Display>', `Glib::wrap($3)')
_CONVERSION(`GdkDisplayManager*',`Glib::RefPtr<DisplayManager>', `Glib::wrap($3)')
_CONVERSION(`GdkDisplayManager*',`Glib::RefPtr<const DisplayManager>', `Glib::wrap($3)')
_CONVERSION(`GdkScreen*',`Glib::RefPtr<Screen>', `Glib::wrap($3)')
_CONVERSION(`GdkScreen*',`Glib::RefPtr<const Screen>', `Glib::wrap($3)')
_CONVERSION(`GdkScreen*',`Glib::RefPtr<Gdk::Screen>', `Glib::wrap($3)')
_CONVERSION(`GdkScreen*',`Glib::RefPtr<const Gdk::Screen>', `Glib::wrap($3)')
_CONVERSION(`GdkDevice*',`Glib::RefPtr<Device>', `Glib::wrap($3)')
_CONVERSION(`GdkDevice*',`Glib::RefPtr<const Device>', `Glib::wrap($3)')
# Glib::ListHandle<> (gdkmm) -> GList (gdk)
_CONVERSION(`const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >&',`GList*',`$3.data()')
# GList (gdk) -> Glib::ListHandle<> (gdkmm)
_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Device> >',`$2($3, Glib::OWNERSHIP_DEEP)')
_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Visual> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
_CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Window> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<Display> >',`$2($3, Glib::OWNERSHIP_SHALLOW)')
# XPM data
_CONVERSION(`const char*const*',`const char**',`const_cast<const char**>($3)',`$3')
_CONVERSION(GdkFont*, Gdk::Font, `Gdk::Font($3)')
_CONVERSION(GdkEvent*, Event, `Event($3)')
_CONVERSION(GdkRegion*, Region, `Region($3)')
_CONVERSION(`GdkTimeCoord**&',`GdkTimeCoord***',`&($3)')
dnl _CONVERSION(GdkPixmap*,Gdk::Pixmap&,`Glib::unwrap_boxed($3)',`$3')
dnl _CONVERSION(GdkBitmap*,Gdk::Bitmap&,`Glib::unwrap_boxed($3)',`$3')
# Used by signals:
_CONVERSION(`GdkDragContext*',`const Glib::RefPtr<Gdk::DragContext>&',Glib::wrap($3, true))
_CONVERSION(`GdkPixbuf*',`const Glib::RefPtr<Gdk::Pixbuf>&', Glib::wrap($3, true))
_CONVERSION(`GdkDragContext*',`Glib::RefPtr<Gdk::DragContext>',Glib::wrap($3, true))
_CONVERSION(`GdkDisplay*',`const Glib::RefPtr<Display>&', Glib::wrap($3, true))

View File

@@ -0,0 +1,69 @@
dnl
dnl Glib C names have prefix 'G' but C++ namespace Glib
dnl
define(`_CONV_GLIB_ENUM',`dnl
_CONVERSION(`G$1', `$1', (($1)(__ARG3__)))
_CONVERSION(`G$1', `Glib::$1', ((Glib::$1)(__ARG3__)))
_CONVERSION(`$1', `G$1', ((G$1)(__ARG3__)))
_CONVERSION(`Glib::$1', `G$1', ((G$1)(__ARG3__)))
')dnl
_EQUAL(gchar,char)
_EQUAL(gchar*,char*)
_EQUAL(gchar**,char**)
_EQUAL(gint**,int**)
_EQUAL(gchar**,char*[])
_EQUAL(const gchar*,const char*)
_EQUAL(const-gchar*,const char*)
_EQUAL(gpointer*,void**)
_CONV_GLIB_ENUM(IOStatus)
_CONV_GLIB_ENUM(IOFlags)
_CONV_GLIB_ENUM(IOCondition)
_CONV_GLIB_ENUM(SeekType)
_CONV_GLIB_ENUM(OptionArg)
_CONV_GLIB_ENUM(KeyFileFlags)
_CONV_GLIB_ENUM(RegexCompileFlags)
_CONV_GLIB_ENUM(RegexMatchFlags)
_CONVERSION(`gunichar&',`gunichar*',`&($3)')
_CONVERSION(`gsize&',`gsize*',`&($3)')
# Strings:
define(`__GCHARP_TO_USTRING',`Glib::convert_const_gchar_ptr_to_ustring($`'3)')
define(`__GCHARP_TO_STDSTRING',`Glib::convert_const_gchar_ptr_to_stdstring($`'3)')
_CONVERSION(`const Glib::ustring&',`const char*',`$3.c_str()')
_CONVERSION(`const std::string&',`const char*',`$3.c_str()')
_CONVERSION(`const Glib::ustring&',`gchar*',`const_cast<gchar*>($3.c_str())')
_CONVERSION(`gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
_CONVERSION(`const-gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
_CONVERSION(`const gchar*',`Glib::ustring',__GCHARP_TO_USTRING)
_CONVERSION(`const char*',`Glib::ustring',__GCHARP_TO_USTRING)
_CONVERSION(`const char*',`std::string',__GCHARP_TO_STDSTRING)
_CONVERSION(`const gchar*',`const Glib::ustring&',__GCHARP_TO_USTRING)
_CONVERSION(`const char*',`const-gchar*',`$3')
_CONVERSION(`const-gchar*',`const char*',`$3')
_CONVERSION(`return-gchar*',`Glib::ustring',`Glib::convert_return_gchar_ptr_to_ustring($3)')
_CONVERSION(`return-gchar*',`std::string',`Glib::convert_return_gchar_ptr_to_stdstring($3)')
_CONVERSION(`return-char*',`Glib::ustring',`Glib::convert_return_gchar_ptr_to_ustring($3)')
_CONVERSION(`const Glib::RefPtr<Glib::Object>&',`GObject*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Glib::Object>&',`GObject*',__CONVERT_CONST_REFPTR_TO_P_SUN(Glib::Object))
_CONVERSION(`GObject*',`Glib::RefPtr<Glib::Object>',`Glib::wrap($3)')
_CONVERSION(`GObject*',`Glib::RefPtr<const Glib::Object>',`Glib::wrap($3)')
_CONVERSION(`GRegex*',`Glib::RefPtr<Regex>',`Glib::wrap($3)')
_CONVERSION(`GRegex*',`Glib::RefPtr<const Regex>',`Glib::wrap($3)')
_CONVERSION(`Glib::ValueBase&',`GValue*',`($3).gobj()')
_CONVERSION(`const Glib::ValueBase&',`const GValue*',`($3).gobj()')
_CONVERSION(`const Glib::ValueBase&',`GValue*',`const_cast<GValue*>(($3).gobj())')
_CONVERSION(`GValue*', `Glib::ValueBase&', `*reinterpret_cast<Glib::ValueBase*>($3)')
_CONVERSION(`const GValue*', `const Glib::ValueBase&', `*reinterpret_cast<const Glib::ValueBase*>($3)')
_CONVERSION(`OptionGroup&',`GOptionGroup*',`($3).gobj()')
#_CONVERSION(`GOptionGroup*',`OptionGroup',`Glib::wrap(($3), true /* take_copy */)')

View File

@@ -0,0 +1,394 @@
dnl $Id: convert_gtk.m4 35 2003-05-02 16:07:24Z murrayc $
include(convert_glib.m4)
#
# Table of widgets
#
_EQUAL(gboolean,int)
_EQUAL(gint,int)
_EQUAL(gint*,int*)
_EQUAL(gint&,int&)
_EQUAL(guint,unsigned int)
_EQUAL(guint*,unsigned int*)
_EQUAL(guint&,unsigned int&)
_EQUAL(gdouble,double)
_EQUAL(gdouble*,double*)
_EQUAL(gfloat, float)
_EQUAL(float*,gfloat[])
_EQUAL(GdkAtom,Gdk::Atom)
_EQUAL(const-char*,const-gchar*)
_EQUAL(return-char*,return-gchar*)
_EQUAL(gpointer,void*)
_EQUAL(gconstpointer,const void*)
#
# Basic Types
_CONVERSION(`int',`bool',`$3')
_CONVERSION(`bool',`int',`static_cast<int>($3)')
_CONVERSION(`unsigned int',`bool',`$3')
_CONVERSION(`bool',`unsigned int',`static_cast<unsigned int>($3)')
_CONVERSION(`int&',`gint*',`&($3)')
_CONVERSION(`gint*',`int&',`*($3)')
_CONVERSION(`guint&',`guint*',`&($3)')
_CONVERSION(`double&',`gdouble*',`&($3)')
_CONVERSION(`float&',`gfloat*',`&($3)')
_CONVERSION(`gchar**',`char**',`$3')
_CONVERSION(`char**',`gchar**',`$3')
_CONVERSION(`gpointer&',`gpointer*',`&($3)')
_CONVERSION(`void*&',`gpointer*',`&($3)')
_CONVERSION(`GError*&',`GError**',`&($3)')
# Enums:
_CONV_ENUM(Gtk,AccelFlags)
_CONV_ENUM(Gtk,ArrowType)
_CONV_ENUM(Gtk,AttachOptions)
_CONV_ENUM(Gtk,ButtonBoxStyle)
_CONV_ENUM(Gtk,ButtonsType)
_CONV_ENUM(Gtk,CalendarDisplayOptions)
_CONV_ENUM(Gtk,CellRendererMode)
_CONV_ENUM(Gtk,CellRendererState)
_CONV_ENUM(Gtk,CornerType)
_CONV_ENUM(Gtk,CurveType)
_CONV_ENUM(Gtk,DeleteType)
_CONV_ENUM(Gtk,DestDefaults)
_CONV_ENUM(Gtk,DirectionType)
_CONV_ENUM(Gtk,ExpanderStyle)
_CONV_ENUM(Gtk,ImageType)
_CONV_ENUM(Gtk,Justification)
_CONV_ENUM(Gtk,MenuDirectionType)
_CONV_ENUM(Gtk,MessageType)
_CONV_ENUM(Gtk,MetricType)
_CONV_ENUM(Gtk,MovementStep)
_CONV_ENUM(Gtk,NotebookTab)
_CONV_ENUM(Gtk,Orientation)
_CONV_ENUM(Gtk,PackType)
_CONV_ENUM(Gtk,PolicyType)
_CONV_ENUM(Gtk,PositionType)
_CONV_ENUM(Gtk,PreviewType)
_CONV_ENUM(Gtk,ProgressBarOrientation)
_CONV_ENUM(Gtk,ProgressBarStyle)
_CONV_ENUM(Gtk,ReliefStyle)
_CONV_ENUM(Gtk,ResizeMode)
_CONV_ENUM(Gtk,ScrollType)
_CONV_ENUM(Gtk,SelectionMode)
_CONV_ENUM(Gtk,ShadowType)
_CONV_ENUM(Gtk,SizeGroupMode)
_CONV_ENUM(Gtk,SortType)
_CONV_ENUM(Gtk,SpinButtonUpdatePolicy)
_CONV_ENUM(Gtk,SpinType)
_CONV_ENUM(Gtk,StateType)
_CONV_ENUM(Gtk,TextDirection)
_CONV_ENUM(Gtk,TextSearchFlags)
_CONV_ENUM(Gtk,TextWindowType)
_CONV_ENUM(Gtk,ToolbarChildType)
_CONV_ENUM(Gtk,ToolbarStyle)
_CONV_ENUM(Gtk,TreeModelFlags)
_CONV_ENUM(Gtk,TreeViewColumnSizing)
_CONV_ENUM(Gtk,TreeViewDropPosition)
_CONV_ENUM(Gtk,UpdateType)
_CONV_ENUM(Gtk,Visibility)
_CONV_ENUM(Gtk,WidgetHelpType)
_CONV_ENUM(Gtk,WindowPosition)
_CONV_ENUM(Gtk,WindowType)
_CONV_ENUM(Gtk,WrapMode)
_CONVERSION(`GtkIconSize',`IconSize',`IconSize(static_cast<int>($3))')
_CONVERSION(`GtkIconSize',`Gtk::IconSize',`Gtk::IconSize(static_cast<int>($3))')
_CONVERSION(`IconSize',`GtkIconSize',`static_cast<GtkIconSize>(int($3))')
_CONVERSION(`Gtk::IconSize',`GtkIconSize',`static_cast<GtkIconSize>(int($3))')
include(convert_atk.m4)
include(convert_pango.m4)
include(convert_gdk.m4)
_CONVERSION(`guint',`WindowType',`static_cast<WindowType>($3)')
_CONVERSION(`PolicyType&',`GtkPolicyType*',`(($2) &($3))')
_CONVERSION(`SortType&',`GtkSortType*',`(($2) &($3))')
_CONVERSION(`SortType*',`GtkSortType*',`(($2) ($3))')
_CONVERSION(`GtkSortType*',`SortType*',`(($2) ($3))')
_CONVERSION(`guint8',`Gtk::StateType',`static_cast<StateType>($3)')
# StockID:
_CONVERSION(`const Gtk::StockID&',`const char*',`($3).get_c_str()')
_CONVERSION(`char*',`StockID',`StockID($3)') # the StockID ctor handles 0
#
# Ptr (gtk+) -> Ptr (gtkmm)
define(`__FP2P',`($`'2)Glib::unwrap($`'3)')
define(`__RP2P',`Glib::wrap($`'3)')
define(`__RP2PD',`Glib::wrap((tran`'slit($`'2,:,))($`'3))')
define(`__RP2CPD',`Glib::wrap((tran`'slit(pat`'subst($`'2,^const ,),:,))($`'3))')
_CONVERSION(`GtkAdjustment*',`Gtk::Adjustment*',__RP2P)
_CONVERSION(`GtkAdjustment*',`Adjustment*',__RP2P)
_CONVERSION(`GtkWidget*',`Gtk::Widget*',__RP2P)
_CONVERSION(`GtkWidget*',`Widget*',__RP2P)
_CONVERSION(`GtkWindow*',`Window*',__RP2P)
_CONVERSION(`GtkMenu*',`Menu*',__RP2P)
# Ptr (gtk+) -> const Ptr (gtkmm)
_CONVERSION(`GtkAdjustment*',`const Gtk::Adjustment*',__RP2P)
_CONVERSION(`GtkAdjustment*',`const Adjustment*',__RP2P)
_CONVERSION(`GtkWidget*',`const Gtk::Widget*',__RP2P)
_CONVERSION(`GtkWidget*',`const Widget*',__RP2P)
_CONVERSION(`GtkWindow*',`const Window*',__RP2P)
# Style:
_CONVERSION(`GtkStyle*',`Glib::RefPtr<Style>',`Glib::wrap($3)')
_CONVERSION(`GtkStyle*',`Glib::RefPtr<const Style>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Style>&',`GtkStyle*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`Glib::RefPtr<Style>',`GtkStyle*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GtkRcStyle*',`Glib::RefPtr<RcStyle>',`Glib::wrap($3)')
_CONVERSION(`GtkRcStyle*',`Glib::RefPtr<const RcStyle>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<RcStyle>&',`GtkRcStyle*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`Glib::RefPtr<RcStyle>',`GtkRcStyle*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GtkRcStyle*',`const Glib::RefPtr<RcStyle>&',`Glib::wrap($3)')
# AccelGroup:
_CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<AccelGroup>',`Glib::wrap($3)')
_CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<const AccelGroup>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<AccelGroup>&',`GtkAccelGroup*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`Gtk::Object&',`GObject*', `($3).Glib::Object::gobj()')
#
# Ptr (Gtkmm) -> Ptr (gtk+)
_CONVERSION(`Gtk::Adjustment*',`GtkAdjustment*',__FP2P)
_CONVERSION(`Adjustment*',`GtkAdjustment*',__FP2P)
_CONVERSION(`Gtk::Widget*',`GtkWidget*',__FP2P)
_CONVERSION(`Widget*',`GtkWidget*',__FP2P)
_CONVERSION(`Menu*',`GtkMenu*',__FP2P)
#
# Ptr (gtk+) -> Ptr (gtkmm) (downcast)
_CONVERSION(`GtkWidget*',`Button*',`Glib::wrap((GtkButton*)($3))')
_CONVERSION(`GtkWidget*',`Box*',`Glib::wrap((GtkBox*)($3))')
_CONVERSION(`GtkWidget*',`HBox*',`Glib::wrap((GtkHBox*)($3))')
_CONVERSION(`GtkWidget*',`VBox*',`Glib::wrap((GtkVBox*)($3))')
_CONVERSION(`GtkWidget*',`ColorSelection*',`Glib::wrap((GtkColorSelection*)($3))')
_CONVERSION(`GtkWidget*',`Gtk::CheckButton*',__RP2PD)
_CONVERSION(`GtkWidget*',`Entry*',`Glib::wrap((GtkEntry*)($3))')
_CONVERSION(`GtkWidget*',`FontSelection*',`Glib::wrap((GtkFontSelection*)($3))')
_CONVERSION(`GtkWidget*',`Label*',`Glib::wrap((GtkLabel*)($3))')
_CONVERSION(`GtkWidget*',`Menu*',`Glib::wrap((GtkMenu*)($3))')
_CONVERSION(`GtkWidget*',`MenuItem*',`Glib::wrap((GtkMenuItem*)($3))')
_CONVERSION(`GtkWidget*',`OptionMenu*',`Glib::wrap((GtkOptionMenu*)($3))')
_CONVERSION(`GtkWidget*',`RadioButton*',`Glib::wrap((GtkRadioButton*)($3))')
_CONVERSION(`GtkWidget*',`Gtk::Scrollbar*',__RP2PD)
_CONVERSION(`GtkWidget*',`Gtk::HScrollbar*',__RP2PD)
_CONVERSION(`GtkWidget*',`Gtk::VScrollbar*',__RP2PD)
_CONVERSION(`GtkWidget*',`Table*',`Glib::wrap((GtkTable*)($3))')
_CONVERSION(`GtkWidget*',`Gtk::Tree*',__RP2PD)
_CONVERSION(`GtkWidget*',`ScrolledWindow*',`Glib::wrap((GtkScrolledWindow*)($3))')
_CONVERSION(`GtkWidget*',`Window*',`Glib::wrap((GtkWindow*)($3))')
_CONVERSION(`GtkWidget*',`TreeView*',`Glib::wrap((GtkTreeView*)($3))')
_CONVERSION(`GtkWidget*',`HButtonBox*',`Glib::wrap((GtkHButtonBox*)($3))')
_CONVERSION(`GtkWidget*',`ComboDropDown*',`Glib::wrap((GtkList*)($3))')
# Ptr (gtk+) -> const Ptr (gtkmm) (downcast)
_CONVERSION(`GtkWidget*',`const Button*',`Glib::wrap((GtkButton*)($3))')
_CONVERSION(`GtkWidget*',`const Box*',`Glib::wrap((GtkBox*)($3))')
_CONVERSION(`GtkWidget*',`const HBox*',`Glib::wrap((GtkHBox*)($3))')
_CONVERSION(`GtkWidget*',`const VBox*',`Glib::wrap((GtkVBox*)($3))')
_CONVERSION(`GtkWidget*',`const ColorSelection*',`Glib::wrap((GtkColorSelection*)($3))')
_CONVERSION(`GtkWidget*',`const Gtk::CheckButton*',__RP2CPD)
_CONVERSION(`GtkWidget*',`const Entry*',`Glib::wrap((GtkEntry*)($3))')
_CONVERSION(`GtkWidget*',`const FontSelection*',`Glib::wrap((GtkFontSelection*)($3))')
_CONVERSION(`GtkWidget*',`const Label*',`Glib::wrap((GtkLabel*)($3))')
_CONVERSION(`GtkWidget*',`const Menu*',`Glib::wrap((GtkMenu*)($3))')
_CONVERSION(`GtkWidget*',`const MenuItem*',`Glib::wrap((GtkMenuItem*)($3))')
_CONVERSION(`GtkWidget*',`const OptionMenu*',`Glib::wrap((GtkOptionMenu*)($3))')
_CONVERSION(`GtkWidget*',`const RadioButton*',`Glib::wrap((GtkRadioButton*)($3))')
_CONVERSION(`GtkWidget*',`const Gtk::Scrollbar*',__RP2CPD)
_CONVERSION(`GtkWidget*',`const Gtk::HScrollbar*',__RP2CPD)
_CONVERSION(`GtkWidget*',`const Gtk::VScrollbar*',__RP2CPD)
_CONVERSION(`GtkWidget*',`const Table*',`Glib::wrap((GtkTable*)($3))')
_CONVERSION(`GtkWidget*',`const Gtk::Tree*',__RP2CPD)
_CONVERSION(`GtkWidget*',`const ScrolledWindow*',`Glib::wrap((GtkScrolledWindow*)($3))')
_CONVERSION(`GtkWidget*',`const Window*',`Glib::wrap((GtkWindow*)($3))')
_CONVERSION(`GtkWidget*',`const TreeView*',`Glib::wrap((GtkTreeView*)($3))')
_CONVERSION(`GtkWidget*',`const HButtonBox*',`Glib::wrap((GtkHButtonBox*)($3))')
_CONVERSION(`GtkWidget*',`const ComboDropDown*',`Glib::wrap((GtkList*)($3))')
# Ptr (gtk+) -> Ref (Gtkmm)
_CONVERSION(`GtkWidget*', `Widget&', `*Glib::wrap($3)')
# Ref (Gtkmm) -> GtkWidget* Ptr (gtk+)
define(`__FR2PD',`($`'3).Gtk::Widget::gobj()')
_CONVERSION(`MenuShell&',`GtkWidget*',__FR2PD)
_CONVERSION(`MenuItem&',`GtkWidget*',__FR2PD)
_CONVERSION(`Menu&',`GtkWidget*',__FR2PD)
_CONVERSION(`Gtk::TreeItem&',`GtkWidget*',__FR2PD)
# Ref (Gtkmm) -> Ptr (gtk+)
define(`__FR2P',`($`'3).gobj()')
define(`__FCR2P',`const_cast<$`'2>(($`'3).gobj())')
_CONVERSION(`Gtk::Adjustment&',`GtkAdjustment*',__FR2P)
_CONVERSION(`Adjustment&',`GtkAdjustment*',__FR2P)
_CONVERSION(`Gtk::Style&',`GtkStyle*',__FR2P)
_CONVERSION(`Gtk::Widget&',`GtkWidget*',__FR2P)
_CONVERSION(`Widget&',`GtkWidget*',__FR2P)
_CONVERSION(`Window&',`GtkWindow*',__FR2P)
_CONVERSION(`CellRenderer&',`GtkCellRenderer*',__FR2P)
# Glib::ListHandle<> (gtkmm) -> GList (gtk+)
_CONVERSION(`const Glib::ListHandle<Glib::ustring>&',`GList*',`$3.data()')
_CONVERSION(`const Glib::ListHandle<Widget*>&',`GList*',`$3.data()')
_CONVERSION(`const Glib::ListHandle<const Widget*>&',`GList*',`$3.data()')
_CONVERSION(`const Glib::ListHandle<Window*>&',`GList*',`$3.data()')
# GList (gtk+) -> Glib::ListHandle<> (gtkmm)
define(`__FL2H_SHALLOW',`$`'2($`'3, Glib::OWNERSHIP_SHALLOW)')
_CONVERSION(`GList*',`Glib::ListHandle<Widget*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<const Widget*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<Window*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<TreeViewColumn*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<const TreeViewColumn*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<CellRenderer*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<const CellRenderer*>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<TreeModel::Row>',__FL2H_SHALLOW)
_CONVERSION(`GList*',`Glib::ListHandle<const TreeModel::Row>',__FL2H_SHALLOW)
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<Tag> >',__FL2H_SHALLOW)
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<TextTag> >',__FL2H_SHALLOW)
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<TextMark> >',__FL2H_SHALLOW)
_CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr<TextBuffer::Mark> >',__FL2H_SHALLOW)
_CONVERSION(`const Widget&',`GtkWidget*',__FCR2P)
_CONVERSION(`int&',`int*',`&$3',`*$3')
dnl
dnl # These are for fixmegtkconst
_CONVERSION(`gdouble*',`const gdouble*',`const_cast<const gdouble*>($3)',`$3')
_CONVERSION(`const double*',`gdouble*',`const_cast<gdouble*>($3)',`$3')
_CONVERSION(`const guchar*',`guchar*',`const_cast<guchar*>($3)',`$3')
#_CONVERSION(`GSList*',`const Group&',`Group($3)')
_CONVERSION(`GSList*',`Group',`Group($3)')
_CONVERSION(`Group&',`GSList*',`$3.group_')
_CONVERSION(`Group',`GSList*',`$3.group_')
_CONVERSION(`Gtk::Item&',`GtkItem*',__FR2P)
_CONVERSION(Gtk::Notebook_Helpers::Page*,GtkNotebookPage*,`($1)((void*)($3))',`($2)((void*)($3))')
_CONVERSION(`GtkSettings*',`Glib::RefPtr<Settings>', Glib::wrap($3))
_CONVERSION(`IconSet&',`GtkIconSet*',__FR2P)
_CONVERSION(`const IconSet&',`GtkIconSet*',`const_cast<GtkIconSet*>(($3).gobj())')
_CONVERSION(`GtkIconSet*',`IconSet',`Glib::wrap($3)')
_CONVERSION(`IconSource&',`GtkIconSource*',__FR2P)
_CONVERSION(`const IconSource&',`const GtkIconSource*',__FR2P)
_CONVERSION(`const GtkIconSource*',`const IconSource&',`Glib::wrap(const_cast<GtkIconSource*>($3), true)')
# gpointer conversions:
# There's doesn't seem to be a way to tell g_signal_new that it's a pointer to a gint, for instance:
#_CONVERSION(`int*',`gpointer',`($1)$3')
#_CONVERSION(`gpointer',`int*',`($1)$3')
# Text:
_CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<TextTagTable>',`Glib::wrap($3)')
_CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<TagTable>',`Glib::wrap($3)')
_CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<TextBuffer::TagTable>',`Glib::wrap($3)')
_CONVERSION(`GtkTextTagTable*',`Glib::RefPtr<const TextBuffer::TagTable>',`Glib::wrap($3)')
_CONVERSION(`GtkTextMark*',`Glib::RefPtr<Mark>',`Glib::wrap($3)')
_CONVERSION(`GtkTextMark*',`Glib::RefPtr<TextBuffer::Mark>',`Glib::wrap($3)')
_CONVERSION(`GtkTextMark*',`Glib::RefPtr<const TextBuffer::Mark>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Mark>&',`GtkTextMark*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TextBuffer::Mark>&',`GtkTextMark*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GtkTextTag*',`Glib::RefPtr<TextTag>',`Glib::wrap($3)')
_CONVERSION(`GtkTextTag*',`Glib::RefPtr<const TextTag>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<TextTag>&',`GtkTextTag*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Tag>&',`GtkTextTag*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TextBuffer::Tag>&',`GtkTextTag*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GtkTextBuffer*',`Glib::RefPtr<TextBuffer>',`Glib::wrap($3)')
_CONVERSION(`GtkTextBuffer*',`Glib::RefPtr<const TextBuffer>',`Glib::wrap($3)')
_CONVERSION(`TextIter&',`GtkTextIter*',__FR2P)
_CONVERSION(`TextBuffer::iterator&',`GtkTextIter*',__FR2P)
_CONVERSION(`iterator&',`GtkTextIter*',__FR2P)
_CONVERSION(`const TextIter&',`const GtkTextIter*',__FR2P)
_CONVERSION(`const TextBuffer::iterator&',`const GtkTextIter*',__FR2P)
_CONVERSION(`const iterator&',`const GtkTextIter*',__FR2P)
_CONVERSION(`TextAttributes&',`GtkTextAttributes*',__FR2P)
_CONVERSION(`GtkTextAttributes*',`TextAttributes',TextAttributes($3))
_CONVERSION(`const Glib::RefPtr<TextTagTable>&',`GtkTextTagTable*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TextBuffer>&',`GtkTextBuffer*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<TextChildAnchor>&',`GtkTextChildAnchor*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GtkTextChildAnchor*',`Glib::RefPtr<TextChildAnchor>',`Glib::wrap($3)')
# Tree:
_CONVERSION(`const TreeIter&',`const GtkTreeIter*',__FR2P)
_CONVERSION(`const iterator&',`const GtkTreeIter*',__FR2P)
_CONVERSION(`const TreeIter&',`GtkTreeIter*',__FCR2P)
_CONVERSION(`const iterator&',`GtkTreeIter*',__FCR2P)
_CONVERSION(`const TreeModel::Row&',`GtkTreeIter*',__FCR2P)
_CONVERSION(`iterator&',`GtkTreeIter*',__FR2P)
_CONVERSION(`const TreeModel::iterator&',`GtkTreeIter*',__FCR2P)
_CONVERSION(`TreeViewColumn&',`GtkTreeViewColumn*',__FR2P)
_CONVERSION(`GtkTreeViewColumn*',`TreeViewColumn*',`Glib::wrap($3)')
_CONVERSION(`GtkTreeViewColumn*',`const TreeViewColumn*',`Glib::wrap($3)')
_CONVERSION(`TreePath&',`GtkTreePath*',__FR2P)
_CONVERSION(`const TreePath&',`const GtkTreePath*',__FR2P)
_CONVERSION(`const TreePath&',`GtkTreePath*',__FCR2P)
_CONVERSION(`const Path&',`GtkTreePath*',__FCR2P)
_CONVERSION(`const TreeModel::Path&',`GtkTreePath*',__FCR2P)
_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')
_CONVERSION(`GtkTreeView*',`const TreeView*',`Glib::wrap($3)')
_CONVERSION(`GtkTreeModel*',`Glib::RefPtr<TreeModel>',`Glib::wrap($3)')
_CONVERSION(`GtkTreeModel*',`Glib::RefPtr<const TreeModel>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<TreeModel>&',`GtkTreeModel*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`GtkTreeSelection*',`Glib::RefPtr<TreeSelection>',`Glib::wrap($3)')
_CONVERSION(`GtkTreeSelection*',`Glib::RefPtr<const TreeSelection>',`Glib::wrap($3)')
_CONVERSION(`const TreeModelColumnBase&',`int',`($3).index`'()')
_CONVERSION(`GtkTreePath*',`TreePath', `Gtk::TreePath($3, false)')
_CONVERSION(`GtkTreePath*',`Path', `Gtk::TreePath($3, false)')
_CONVERSION(`GtkTreePath*',`TreeModel::Path', `Gtk::TreePath($3, false)')
_CONVERSION(`GtkIconSet*&',`GtkIconSet**',`&($3)')
_CONVERSION(`GtkIconSize&',`GtkIconSize*',`&($3)')
_CONVERSION(`GtkCellEditable*',`CellEditable*',`dynamic_cast<$2>(Glib::wrap_auto((GObject*)($3), false))')
_CONVERSION(`CellEditable*',`GtkCellEditable*',`Glib::unwrap($3)')
#_CONVERSION(`Clipboard&',`GtkClipboard*',`($3).gobj()')
_CONVERSION(`GtkClipboard*',`Glib::RefPtr<Clipboard>',`Glib::wrap($3)')
_CONVERSION(`GtkClipboard*',`Glib::RefPtr<const Clipboard>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Clipboard>&',`GtkClipboard*',__CONVERT_REFPTR_TO_P($3))
#_CONVERSION(`GtkClipboard*',`Gtk::Clipboard&',`Glib::wrap($3, true)')
_CONVERSION(`SelectionData',`GtkSelectionData*', `($3).gobj()')
_CONVERSION(`const SelectionData&',`GtkSelectionData*', __FCR2P)
_CONVERSION(`SelectionData&',`GtkSelectionData*', __FR2P)
#_CONVERSION(`GtkSelectionData*',`SelectionData', `Gtk::SelectionData(($3), true)')
# Used by Signals:
_CONVERSION(`GtkTextIter*',`const TextIter&',Glib::wrap($3))
_CONVERSION(`GtkTextIter*',`const TextBuffer::iterator&',Glib::wrap($3))
_CONVERSION(`const GtkTextIter*',`const TextIter&',Glib::wrap($3))
_CONVERSION(`const GtkTextIter*',`const TextBuffer::iterator&',Glib::wrap($3))
_CONVERSION(`const TextIter&',`GtkTextIter*',__FCR2P)
_CONVERSION(`const TextBuffer::iterator&',`GtkTextIter*',__FCR2P)
_CONVERSION(`GtkTextChildAnchor*',`const Glib::RefPtr<TextChildAnchor>&',`Glib::wrap($3, true)')
_CONVERSION(`GtkTextMark*',`const Glib::RefPtr<Mark>&',`Glib::wrap($3, true)')
_CONVERSION(`GtkTextMark*',`const Glib::RefPtr<TextBuffer::Mark>&',`Glib::wrap($3, true)')
_CONVERSION(`GtkTextTag*',`const Glib::RefPtr<TextTag>&',`Glib::wrap($3, true)')
_CONVERSION(`GtkTextTag*',`const Glib::RefPtr<TextBuffer::Tag>&',`Glib::wrap($3, true)')
_CONVERSION(`GObject*',`const Glib::RefPtr<Glib::Object>&',`Glib::wrap($3, true)')
_CONVERSION(`GtkTreePath*',`const TreeModel::Path&',`Gtk::TreePath($3, true)')
_CONVERSION(`GtkTreePath*',`const Path&',`Gtk::TreePath($3, true)')
_CONVERSION(`TreeViewColumn*',`GtkTreeViewColumn*',__FP2P)
_CONVERSION(`GtkStyle*',`const Glib::RefPtr<Style>&',`Glib::wrap($3, true)')
_CONVERSION(`AlignmentEnum',`float',`_gtkmm_align_float_from_enum($3)')

View File

@@ -0,0 +1,8 @@
dnl $Id: convert_gtkmm.m4 2 2003-01-07 16:59:16Z murrayc $
include(convert_base.m4)
include(convert_gtk.m4)
include(convert_pango.m4)
include(convert_gdk.m4)
include(convert_atk.m4)
include(convert_glib.m4)

View File

@@ -0,0 +1,137 @@
# Enums:
_CONV_ENUM(Pango,AttrType)
_CONV_ENUM(Pango,Underline)
_CONV_ENUM(Pango,Direction)
_CONV_ENUM(Pango,CoverageLevel)
_CONV_ENUM(Pango,Style)
_CONV_ENUM(Pango,Variant)
_CONV_ENUM(Pango,Stretch)
_CONV_ENUM(Pango,Weight)
_CONV_ENUM(Pango,FontMask)
_CONV_ENUM(Pango,Alignment)
_CONV_ENUM(Pango,WrapMode)
_CONV_ENUM(Pango,TabAlign)
# General conversions:
_CONVERSION(`gchar*',`const char*',`($3)')
_CONVERSION(`guchar*&',`guchar**',`&($3)')
_CONVERSION(`int*&',`int**',`&($3)')
# Wrapper type conversions:
_CONVERSION(`PangoLanguage*',`Language',`Language($3)')
_CONVERSION(`PangoLanguage*',`Pango::Language',`Pango::Language($3)')
_CONVERSION(`const Language&',`const PangoLanguage*',`($3).gobj()')
_CONVERSION(`const Language&',`PangoLanguage*',`const_cast<PangoLanguage*>(`($3).gobj()')')
_CONVERSION(`Rectangle&',`PangoRectangle*',`($3).gobj()')
_CONVERSION(`Rectangle',`PangoRectangle',`*($3).gobj()')
_CONVERSION(`PangoRectangle',`Rectangle',`Rectangle(&($3))')
_CONVERSION(`Color&',`PangoColor*',`($3).gobj()')
_CONVERSION(`const Color&',`const PangoColor*',`($3).gobj()')
_CONVERSION(`Color',`PangoColor',`*($3).gobj()')
_CONVERSION(`PangoColor',`Color',`Color(&($3))')
_CONVERSION(`PangoFontDescription*',`FontDescription',`FontDescription(($3))')
_CONVERSION(`Pango::FontDescription&',`PangoFontDescription*',`($3).gobj()')
_CONVERSION(`FontDescription&',`PangoFontDescription*',`($3).gobj()')
_CONVERSION(`const FontDescription&',`const PangoFontDescription*',`($3).gobj()')
_CONVERSION(`const Pango::FontDescription&',`PangoFontDescription*',`const_cast<PangoFontDescription*>(`($3).gobj()')')
_CONVERSION(`const FontDescription&',`PangoFontDescription*',`const_cast<PangoFontDescription*>(`($3).gobj()')')
_CONVERSION(`PangoFontMetrics*',`FontMetrics',`FontMetrics(($3))')
_CONVERSION(`PangoAttribute*',`Attribute',`Attribute(($3))')
_CONVERSION(`Attribute&',`PangoAttribute*',`($3).gobj()')
_CONVERSION(`const Attribute&',`const PangoAttribute*',`($3).gobj()')
_CONVERSION(`PangoAttrList*',`AttrList',`AttrList(($3))')
_CONVERSION(`PangoAttrList*',`Pango::AttrList',`Pango::AttrList(($3))')
_CONVERSION(`AttrList&',`PangoAttrList*',`($3).gobj()')
_CONVERSION(`Pango::AttrList&',`PangoAttrList*',`($3).gobj()')
_CONVERSION(`PangoAttrIterator*',`AttrIter',`Glib::wrap(($3))')
_CONVERSION(`PangoAnalysis',`Analysis',`Analysis(&($3))')
_CONVERSION(`PangoAnalysis',`const Analysis',`Analysis(&($3))')
_CONVERSION(`Analysis&',`PangoAnalysis*',`($3).gobj()')
_CONVERSION(`const Analysis&',`const PangoAnalysis*',`($3).gobj()')
_CONVERSION(`const Analysis&',`PangoAnalysis*',`const_cast<PangoAnalysis*>(($3).gobj())')
_CONVERSION(`PangoItem*',`Item',`Item(($3))')
_CONVERSION(`PangoItem*',`const Item',`Item(($3))')
_CONVERSION(`Item&',`PangoItem*',`($3).gobj()')
_CONVERSION(`const Item&',`const PangoItem*',`($3).gobj()')
_EQUAL(`PangoGlyph',`Glyph')
_EQUAL(`PangoGlyphUnit',`GlyphUnit')
_EQUAL(`PangoGlyphVisAttr',`GlyphVisAttr')
#_CONVERSION(`PangoGlyphVisAttr',`GlyphVisAttr',`GlyphVisAttr(&($3))')
#_CONVERSION(`GlyphVisAttr',`PangoGlyphVisAttr',`*($3).gobj()')
_CONVERSION(`PangoGlyphGeometry',`GlyphGeometry',`GlyphGeometry(&($3))')
_CONVERSION(`GlyphGeometry',`PangoGlyphGeometry',`*($3).gobj()')
_CONVERSION(`PangoGlyphString*',`GlyphString',`GlyphString(($3))')
_CONVERSION(`PangoGlyphString*',`const GlyphString',`GlyphString(($3))')
_CONVERSION(`PangoFont*',`Glib::RefPtr<Font>',Glib::wrap($3))
_CONVERSION(`PangoFont*',`Glib::RefPtr<Pango::Font>',Glib::wrap($3))
_CONVERSION(`PangoFont*',`Glib::RefPtr<const Font>',Glib::wrap($3))
_CONVERSION(`PangoFont*',`Glib::RefPtr<const Pango::Font>',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<Font>&',`PangoFont*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Pango::Font>&',`PangoFont*',__CONVERT_REFPTR_TO_P)
# Special treatment for the Sun Forte compiler
#_CONVERSION(const Glib::RefPtr<const Font>&,`PangoFont*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Font>&',`PangoFont*',__CONVERT_CONST_REFPTR_TO_P_SUN(Font))
#_CONVERSION(`const Glib::RefPtr<const Font>&',`PangoFont*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Pango::Font>&',`PangoFont*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pango::Font))
_CONVERSION(`PangoFontMap*',`Glib::RefPtr<FontMap>',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<FontMap>&',`PangoFontMap*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`PangoFontSet*',`Glib::RefPtr<FontSet>',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<FontSet>&',`PangoFontSet*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`PangoContext*',`Glib::RefPtr<Pango::Context>',Glib::wrap($3))
_CONVERSION(`PangoContext*',`Glib::RefPtr<Context>',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<Context>&',`PangoContext*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`PangoLayout*',`Glib::RefPtr<Pango::Layout>',Glib::wrap($3))
_CONVERSION(`PangoLayout*',`Glib::RefPtr<const Pango::Layout>',Glib::wrap($3))
_CONVERSION(`PangoLayout*',`Glib::RefPtr<Layout>',Glib::wrap($3))
_CONVERSION(`PangoLayout*',`const Glib::RefPtr<Pango::Layout>&',Glib::wrap($3))
_CONVERSION(`const Glib::RefPtr<Layout>&',`PangoLayout*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Pango::Layout>&',`PangoLayout*',__CONVERT_REFPTR_TO_P)
# Special treatment for the Sun Forte compiler
_CONVERSION(`const Glib::RefPtr<const Pango::Layout>&',`PangoLayout*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pango::Layout))
_CONVERSION(`const Glib::RefPtr<const Layout>&',`PangoLayout*',__CONVERT_CONST_REFPTR_TO_P_SUN(Layout))
_CONVERSION(`PangoLayoutLine*',`Glib::RefPtr<Pango::LayoutLine>',`Glib::wrap($3)')
_CONVERSION(`PangoLayoutLine*',`Glib::RefPtr<LayoutLine>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Pango::LayoutLine>&',`PangoLayoutLine*',__CONVERT_REFPTR_TO_P)
# Special treatment for the Sun Forte compiler
_CONVERSION(`const Glib::RefPtr<const Pango::LayoutLine>&',`PangoLayoutLine*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pango::LayoutLine))
_CONVERSION(`const Glib::RefPtr<const LayoutLine>&',`PangoLayoutLine*',__CONVERT_CONST_REFPTR_TO_P_SUN(LayoutLine))
_CONVERSION(`PangoLayoutRun*',`LayoutRun',Glib::wrap($3))
_CONVERSION(`PangoLayoutIter*',`LayoutIter',`LayoutIter($3)')
_CONVERSION(`PangoCoverage*',`Glib::RefPtr<Coverage>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Coverage>&',`PangoCoverage*',`Glib::unwrap($3)')
_CONVERSION(`PangoTabArray*',`Pango::TabArray',`Pango::TabArray(($3))')
_CONVERSION(`PangoTabArray*',`TabArray',`TabArray(($3))')
_CONVERSION(`Pango::TabArray&',`PangoTabArray*',($3).gobj())
_CONVERSION(`TabArray&',`PangoTabArray*',($3).gobj())
_CONVERSION(`PangoTabAlign&',`PangoTabAlign*',`&$3',`*$3')
_CONVERSION(`Pango::TabAlign&',`PangoTabAlign*',`((PangoTabAlign*) &($3))')
_CONVERSION(`TabAlign&',`PangoTabAlign*',`((PangoTabAlign*) &($3))')
define(`__FL2H_SHALLOW',`$`'2($`'3, Glib::OWNERSHIP_SHALLOW)')
_CONVERSION(`GSList*',`SListHandle_LayoutLine',__FL2H_SHALLOW)

View File

@@ -0,0 +1,59 @@
dnl $Id: ctor.m4 376 2007-01-28 22:22:16Z daniel $
dnl
dnl M4 macros for constructor generation.
dnl
dnl Declares and implements the default constructor
dnl
m4_define(`_CTOR_DEFAULT',`dnl
__CPPNAME__`'();
_PUSH(SECTION_CC)
__CPPNAME__::__CPPNAME__`'()
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(0),
__CPPPARENT__`'(Glib::ConstructParams(__BASE__`'_class_.init()))
{
_IMPORT(SECTION_CC_INITIALIZE_CLASS_EXTRA)
}
_POP()')
dnl Constructors with property initializations.
dnl
dnl _CTOR_IMPL(cppname, cname, cppargs, c_varargs)
dnl $1 $2 $3 $4
dnl
m4_define(`_CTOR_IMPL',`dnl
_PUSH(SECTION_CC)
__CPPNAME__::$1`'($3)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(0),
__CPPPARENT__`'(Glib::ConstructParams(__BASE__`'_class_.init()m4_ifelse(`$4',,,`, $4, static_cast<char*>(0)')))
{
_IMPORT(SECTION_CC_INITIALIZE_CLASS_EXTRA)
}
_POP()')
m4_define(`_CONSTRUCT',
`// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(0),
__CPPPARENT__`'(Glib::ConstructParams(__BASE__`'_class_.init()m4_ifelse(`$1',,,`, $@, static_cast<char*>(0)')))')
dnl _CONSTRUCT() does not deal with multiple class definitions in one file.
dnl If necessary, _CONSTRUCT_SPECIFIC(BaseClass, Class) must be used instead.
dnl
m4_define(`_CONSTRUCT_SPECIFIC',
`// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(0),
$1`'(Glib::ConstructParams(_LOWER(`$2')_class_.init()m4_ifelse(`$3',,,`, m4_shift(m4_shift($@)), static_cast<char*>(0)')))')
dnl Extra code for initialize_class.
dnl Not commonly used.
dnl
m4_define(`_INITIALIZE_CLASS_EXTRA',`dnl
_PUSH(SECTION_CC_INITIALIZE_CLASS_EXTRA)
$1
_POP()')

View File

@@ -0,0 +1,3 @@
dnl $Id: doc.m4 2 2003-01-07 16:59:16Z murrayc $
divert(-1)

View File

@@ -0,0 +1,101 @@
dnl
dnl _ENUM(cpp_type, c_type, value_suffix, `element_list', `flags', `optional_refdoc_comment', 'get_type_function_name')
dnl
m4_define(`_ENUM',`dnl
_PUSH()
m4_define(`__ENUM_CPPNAME__',`$1')
m4_define(`__ENUM_CNAME__',`$2')
m4_define(`__ENUM_VALUE_BASE__',`Glib::Value_$3<__NAMESPACE__::__ENUM_CPPNAME__>')
_POP()
dnl
dnl // Define a new Doxygen group if this is the first enum in the file.
dnl
m4_ifdef(`__DOCGROUP_'__MODULE_CANONICAL__`_ENUMS__',,`dnl else
m4_define(`__DOCGROUP_'__MODULE_CANONICAL__`_ENUMS__')dnl
/** @addtogroup '__MODULE_CANONICAL__`Enums Enums and Flags */
')dnl endif
dnl
dnl
/**$6
* @ingroup __MODULE_CANONICAL__`'Enums
m4_ifelse($3,Flags,`dnl
* @par Bitwise operators:
* <tt>%__ENUM_CPPNAME__ operator|(__ENUM_CPPNAME__, __ENUM_CPPNAME__)</tt><br>
* <tt>%__ENUM_CPPNAME__ operator&(__ENUM_CPPNAME__, __ENUM_CPPNAME__)</tt><br>
* <tt>%__ENUM_CPPNAME__ operator^(__ENUM_CPPNAME__, __ENUM_CPPNAME__)</tt><br>
* <tt>%__ENUM_CPPNAME__ operator~(__ENUM_CPPNAME__)</tt><br>
* <tt>%__ENUM_CPPNAME__& operator|=(__ENUM_CPPNAME__&, __ENUM_CPPNAME__)</tt><br>
* <tt>%__ENUM_CPPNAME__& operator&=(__ENUM_CPPNAME__&, __ENUM_CPPNAME__)</tt><br>
* <tt>%__ENUM_CPPNAME__& operator^=(__ENUM_CPPNAME__&, __ENUM_CPPNAME__)</tt><br>
')dnl endif
*/
enum __ENUM_CPPNAME__
{
$4
};
m4_ifelse($3,Flags,`dnl
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__ operator|(__ENUM_CPPNAME__ lhs, __ENUM_CPPNAME__ rhs)
{ return static_cast<__ENUM_CPPNAME__>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__ operator&(__ENUM_CPPNAME__ lhs, __ENUM_CPPNAME__ rhs)
{ return static_cast<__ENUM_CPPNAME__>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__ operator^(__ENUM_CPPNAME__ lhs, __ENUM_CPPNAME__ rhs)
{ return static_cast<__ENUM_CPPNAME__>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__ operator~(__ENUM_CPPNAME__ flags)
{ return static_cast<__ENUM_CPPNAME__>(~static_cast<unsigned>(flags)); }
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__& operator|=(__ENUM_CPPNAME__& lhs, __ENUM_CPPNAME__ rhs)
{ return (lhs = static_cast<__ENUM_CPPNAME__>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__& operator&=(__ENUM_CPPNAME__& lhs, __ENUM_CPPNAME__ rhs)
{ return (lhs = static_cast<__ENUM_CPPNAME__>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
/** @ingroup __MODULE_CANONICAL__`'Enums */
inline __ENUM_CPPNAME__& operator^=(__ENUM_CPPNAME__& lhs, __ENUM_CPPNAME__ rhs)
{ return (lhs = static_cast<__ENUM_CPPNAME__>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
')dnl endif Flags
m4_ifelse($5,`NO_GTYPE',,`dnl else
__NAMESPACE_END__
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<__NAMESPACE__::__ENUM_CPPNAME__> : public __ENUM_VALUE_BASE__
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
__NAMESPACE_BEGIN__
_PUSH(SECTION_SRC_GENERATED)
// static
GType Glib::Value<__NAMESPACE__::__ENUM_CPPNAME__>::value_type()
{
return _GET_TYPE_FUNC(__ENUM_CNAME__);
}
_POP()
')dnl endif !NO_GTYPE
')dnl enddef _ENUM

View File

@@ -0,0 +1,102 @@
dnl $Id: gerror.m4 291 2006-05-12 08:08:45Z murrayc $
dnl
dnl _GERROR(PixbufError,GdkPixbufError,GDK_PIXBUF_ERROR,`<enum_value_list>',[NO_GTYPE])
dnl
m4_define(`_GERROR',`dnl
_PUSH()
dnl
dnl Define the args for later macros
m4_define(`__CPPNAME__',`$1')
m4_define(`__CNAME__',`$2')
m4_define(`__CQUARK__',`$3')
m4_define(`__VALUE_BASE__',`Glib::Value_Enum<__NAMESPACE__::__CPPNAME__::Code>')
_POP()
class __CPPNAME__ : public Glib::Error
{
public:
enum Code
{
$4
};
__CPPNAME__`'(Code error_code, const Glib::ustring& error_message);
explicit __CPPNAME__`'(GError* gobject);
Code code() const;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
#ifdef GLIBMM_EXCEPTIONS_ENABLED
static void throw_func(GError* gobject);
#else
//When not using exceptions, we just pass the Exception object around without throwing it:
static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
#endif //GLIBMM_EXCEPTIONS_ENABLED
friend void wrap_init(); // uses throw_func()
#endif
};
m4_ifelse($5,`NO_GTYPE',,`dnl else
__NAMESPACE_END__
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{
template <>
class Value<__NAMESPACE__::__CPPNAME__::Code> : public __VALUE_BASE__
{
public:
static GType value_type() G_GNUC_CONST;
};
} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
__NAMESPACE_BEGIN__
')dnl endif !NO_GTYPE
_PUSH(SECTION_SRC_GENERATED)
__NAMESPACE__::__CPPNAME__::__CPPNAME__`'(__NAMESPACE__::__CPPNAME__::Code error_code, const Glib::ustring& error_message)
:
Glib::Error (__CQUARK__, error_code, error_message)
{}
__NAMESPACE__::__CPPNAME__::__CPPNAME__`'(GError* gobject)
:
Glib::Error (gobject)
{}
__NAMESPACE__::__CPPNAME__::Code __NAMESPACE__::__CPPNAME__::code() const
{
return static_cast<Code>(Glib::Error::code());
}
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void __NAMESPACE__::__CPPNAME__::throw_func(GError* gobject)
{
throw __NAMESPACE__::__CPPNAME__`'(gobject);
}
#else
//When not using exceptions, we just pass the Exception object around without throwing it:
std::auto_ptr<Glib::Error> __NAMESPACE__::__CPPNAME__::throw_func(GError* gobject)
{
return std::auto_ptr<Glib::Error>(new __NAMESPACE__::__CPPNAME__`'(gobject));
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
m4_ifelse($5,`NO_GTYPE',,`dnl else
// static
GType Glib::Value<__NAMESPACE__::__CPPNAME__::Code>::value_type()
{
return _GET_TYPE_FUNC(__CNAME__);
}
')dnl endif !NO_GTYPE
_POP()
') dnl enddef _GERROR

View File

@@ -0,0 +1,230 @@
_PUSH()
dnl
dnl These variables affect the generation of the list
dnl
define(GP_LIST_HELPER_NAMESPACE,`define(`__LIST_NAMESPACE__',$1)')
define(GP_LIST_ELEM,`define(`__LISTELEM__',`$*')')
define(GP_LIST_ITER,`define(`__LISTITER__',`$*')')
define(GP_LIST_NOINSERT,`define(`__LISTEO__')')
dnl
dnl GP_LIST(ListName, ParentCppType, ParentCType, ChildCppType, FieldNameC)
dnl
dnl In the .ccg file, you'll need to implement:
dnl iterator insert(iterator position, element_type& e);
dnl
dnl Fieldname assumed to be children if not specified
define(GP_LIST,`
_PUSH()
define(`__LISTNAME__',$1)
define(`__LISTPARENT__',$2)
define(`__LISTPARENT_G__',$3)
define(`__LISTTYPE__',$4)
define(`__LISTELEM__',const Element)
define(`__LISTITER__',Glib::List_Iterator< __LISTTYPE__ >)
define(`__LIST_NAMESPACE__',$2_Helpers)
#define(`__LISTFIELD__',ifelse($5,,children,$5))
define(`__LISTFIELD__',$5)
_SECTION(SECTION_USR)
')
dnl
dnl GP_LIST_END()
dnl
dnl Closes a list
define(GP_LIST_END,`dnl
_POP()
class __LISTNAME__ : public Glib::HelperList< __LISTTYPE__, __LISTELEM__, __LISTITER__ >
{
public:
__LISTNAME__`'();
explicit __LISTNAME__`'(__LISTPARENT_G__* gparent);
__LISTNAME__`'(const __LISTNAME__& src);
virtual ~__LISTNAME__`'() {}
__LISTNAME__& operator=(const __LISTNAME__& src);
typedef Glib::HelperList< __LISTTYPE__, __LISTELEM__, __LISTITER__ > type_base;
__LISTPARENT_G__* gparent();
const __LISTPARENT_G__* gparent() const;
virtual GList*& glist() const; // front of list
virtual void erase(iterator start, iterator stop);
virtual iterator erase(iterator); //Implented as custom or by LIST_CONTAINER_REMOVE
virtual void remove(const_reference); //Implented as custom or by LIST_CONTAINER_REMOVE
/// This is order n. (use at own risk)
reference operator[](size_type l) const;
ifdef(`__LISTEO__',`dnl
protected:
//Hide these because it's read-only:
iterator insert(iterator position, element_type& e);
inline void pop_front();
inline void pop_back();
,`dnl
public:
iterator insert(iterator position, element_type& e); //custom-implemented.
template <class InputIterator>
inline void insert(iterator position, InputIterator first, InputIterator last)
{
for(;first != last; ++first)
position = insert(position, *first);
}
inline void push_front(element_type& e)
{ insert(begin(), e); }
inline void push_back(element_type& e)
{ insert(end(), e); }
')dnl
_IMPORT(SECTION_USR)
};
_PUSH(SECTION_CC)
namespace __LIST_NAMESPACE__
{
__LISTNAME__::__LISTNAME__`'()
{}
__LISTNAME__::__LISTNAME__`'(__LISTPARENT_G__* gparent)
: type_base((GObject*)gparent)
{}
__LISTNAME__::__LISTNAME__`'(const __LISTNAME__& src)
:
type_base(src)
{}
__LISTNAME__& __LISTNAME__::operator=(const __LISTNAME__& src)
{
type_base::operator=(src);
return *this;
}
ifelse(__LISTFIELD__,CUSTOM,`dnl
',`dnl else
GList*& __LISTNAME__::glist() const
{
return ((__LISTPARENT_G__*)gparent_)->__LISTFIELD__;
}
')dnl endif
void __LISTNAME__::erase(iterator start, iterator stop)
{
type_base::erase(start, stop);
}
__LISTPARENT_G__* __LISTNAME__::gparent()
{
return (__LISTPARENT_G__*)type_base::gparent();
}
const __LISTPARENT_G__* __LISTNAME__::gparent() const
{
return (__LISTPARENT_G__*)type_base::gparent();
}
__LISTNAME__::reference __LISTNAME__::operator[](size_type l) const
{
return type_base::operator[](l);
}
} /* namespace __LIST_NAMESPACE__ */
undefine(`__LISTNAME__')dnl
undefine(`__LISTTYPE__')dnl
undefine(`__LISTPARENT__')dnl
undefine(`__LISTELEM__')dnl
undefine(`__LISTFIELD__')dnl
_POP()
')
dnl
dnl GP_LIST_FIND(access_method)
dnl
dnl Defines find(containertype) and find(Widget&)
dnl access_method is the name of method returning a Widget*
define(GP_LIST_FIND,`
iterator find(const_reference c);
iterator find(Widget&);
_PUSH(SECTION_CC)
namespace __LIST_NAMESPACE__
{
__LISTNAME__::iterator __LISTNAME__::find(const_reference w)
{
iterator i = begin();
for(i = begin(); i != end() && (i->ifelse($1,,,$1()->)gobj() != w.ifelse($1,,,$1()->)gobj()); i++);
return i;
}
__LISTNAME__::iterator __LISTNAME__::find(Widget& w)
{
iterator i;
for(i = begin(); i != end() && ((GtkWidget*)i->ifelse($1,,,$1()->)gobj() != w.gobj()); i++);
return i;
}
} /* namespace __LIST_NAMESPACE__ */
_POP()
')
dnl
dnl GP_LIST_CONTAINER_REMOVE(access_method)
dnl
dnl Implements remove(const_reference), erase(iterator)
dnl and defines remove(Widget&)
dnl (assumes that the widget uses gtk+ container methods).
dnl access_method is the name of the method returning a Widget*
define(GP_LIST_CONTAINER_REMOVE,`
virtual void remove(Widget& w); //Implented as custom or by LIST_CONTAINER_REMOVE
_PUSH(SECTION_CC)
namespace __LIST_NAMESPACE__
{
void __LISTNAME__::remove(const_reference child)
{
gtk_container_remove(GTK_CONTAINER(gparent_),
(GtkWidget*)(child.ifelse($1,,,$1()->)gobj()));
}
void __LISTNAME__::remove(Widget& widget)
{
gtk_container_remove(GTK_CONTAINER(gparent_), (GtkWidget*)(widget.gobj()));
}
__LISTNAME__::iterator __LISTNAME__::erase(iterator position)
{
//Check that it is a valid iterator, to a real item:
if ( !position.node_|| (position == end()) )
return end();
//Get an iterator the the next item, to return:
iterator next = position;
next++;
//Use GTK+ C function to remove it, by providing the GtkWidget*:
gtk_container_remove( GTK_CONTAINER(gparent_), (GtkWidget*)(position->ifelse($1,,,$1()->)gobj()) );
return next;
}
} /* namespace __LIST_NAMESPACE__ */
_POP()
')
_POP()dnl

View File

@@ -0,0 +1,132 @@
dnl
dnl --------------------------- Accessors ----------------------------
dnl
dnl Get:
dnl Creates accessors for simple types:
dnl _MEMBER_GET(cpp_name, c_name, cpp_type, c_type, deprecated (optional))
define(`_MEMBER_GET',`dnl
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
$3 get_$1() const;
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_PUSH(SECTION_CC)
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
$3 __CPPNAME__::get_$1() const
{
return _CONVERT($4,$3,`gobj()->$2');
}
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_POP()')
dnl Creates two accessors for pointer types, one const and one non-const:
define(`_MEMBER_GET_PTR',`dnl
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
$3 get_$1();
const $3 get_$1() const;
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_PUSH(SECTION_CC)
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
$3 __CPPNAME__::get_$1()
{
return _CONVERT($4,$3,`gobj()->$2');
}
const $3 __CPPNAME__::get_$1() const
{
return _CONVERT($4,const $3,`gobj()->$2');
}
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_POP()')
dnl Creates accessors for GObject-derived types that must be ref()ed.
define(`_MEMBER_GET_GOBJECT',`dnl
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
Glib::RefPtr<$3> get_$1();
Glib::RefPtr<const $3> get_$1() const;
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_PUSH(SECTION_CC)
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
Glib::RefPtr<$3> __CPPNAME__::get_$1()
{
Glib::RefPtr<$3> ref_ptr(_CONVERT($4,Glib::RefPtr<$3>,`gobj()->$2'));
dnl We could use the bool with Glib::wrap(), but we want to share the m4 type-conversion map.
if(ref_ptr)
ref_ptr->reference();
return ref_ptr;
}
Glib::RefPtr<const $3> __CPPNAME__::get_$1() const
{
Glib::RefPtr<const $3> ref_ptr(_CONVERT($4,Glib::RefPtr<const $3>,`gobj()->$2'));
dnl We could use the bool with Glib::wrap(), but we want to share the m4 type-conversion map.
if(ref_ptr)
ref_ptr->reference();
return ref_ptr;
}
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_POP()')
dnl Set:
dnl Creates accessors for simple types:
define(`_MEMBER_SET',`dnl
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
void set_$1(const $3`'& value);
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_PUSH(SECTION_CC)
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
void __CPPNAME__::set_$1(const $3`'& value)
{
gobj()->$2 = _CONVERT($3,$4,`value');
}
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_POP()')
dnl Creates accessors for pointer types:
define(`_MEMBER_SET_PTR',`dnl
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
void set_$1($3 value);
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_PUSH(SECTION_CC)
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
void __CPPNAME__::set_$1($3 value)
{
gobj()->$2 = _CONVERT($3,$4,`value');
}
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_POP()')
dnl Creates accessors for GObject-derived types that must be ref()ed.
define(`_MEMBER_SET_GOBJECT',`dnl
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
void set_$1(const Glib::RefPtr<$3>& value);
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_PUSH(SECTION_CC)
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_START ') dnl
void __CPPNAME__::set_$1(const Glib::RefPtr<$3>& value)
{
Glib::RefPtr<$3> valueOld(_CONVERT($4,Glib::RefPtr<$3>,`gobj()->$2')); //Take possession of the old one, unref-ing it in the destructor.
if(value)
value->reference(); //Ref once for the recipient.
gobj()->$2 = _CONVERT(const Glib::RefPtr<$3>&,$4,`value');
}
ifelse(`$5',`deprecated',`_DEPRECATE_IFDEF_END ') dnl
_POP()')

View File

@@ -0,0 +1,108 @@
dnl $Id: method.m4 320 2006-09-19 20:07:31Z murrayc $
dnl
dnl
dnl Code generation sections for making a method.
dnl
dnl
dnl
dnl method
dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14
dnl _METHOD(cppname,cname,cpprettype,crettype,arglist,cargs,const,refreturn,errthrow,deprecated,constversion,ifdef, arglist_without_types)
define(`_METHOD',`dnl
_PUSH(SECTION_CC)
ifelse(`$10',,,`_DEPRECATE_IFDEF_START
')dnl
ifelse(`$13',,,`#ifdef $13'
)dnl
ifelse(`$9',,,`#ifdef GLIBMM_EXCEPTIONS_ENABLED'
)dnl
$3 __CPPNAME__::$1`'($5)ifelse(`$7',1,` const')
ifelse(`$9',,,`#else
$3 __CPPNAME__::$1`'(`'$5`'ifelse(($5),(),`',`, ')std::auto_ptr<Glib::Error>& error)ifelse(`$7',1,` const')
#endif //GLIBMM_EXCEPTIONS_ENABLED
')dnl
{
ifelse(`$11',,dnl
`ifelse(`$8'`$9',,dnl If it is not errthrow or refreturn
`ifelse(`$3',void,dnl If it returns voids:
`$2(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'ifelse(`$6',,,`, ')$6);' dnl It it returns non-void:
,` return _CONVERT($4,$3,`$2`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'ifelse(`$6',,,`, ')$6)');')'dnl End if it returns voids.
,dnl If is errthrow or refreturn
`ifelse(`$9',,,` GError* gerror = 0;')
ifelse(`$3',void,,``$3' retvalue = ')_CONVERT($4,$3,`$2`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'ifelse(`$6',,,`, ')$6)');dnl
ifelse(`$9',,,`
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
')
ifelse(`$8',,,`dnl
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
')dnl
ifelse(`$3',void,,` return retvalue;')
')dnl End errthrow/refreturn
',` return const_cast<__CPPNAME__*>(this)->$1($12);')
}
ifelse(`$13',,,`
#endif // $13
')dnl
ifelse(`$10',,,`_DEPRECATE_IFDEF_END
')dnl
_POP()')
dnl
dnl static method
dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 $10
dnl _STATIC_METHOD(cppname,cname,cpprettype,crettype,arglist,cargs,refreturn,errthrow,deprecated,ifdef))
define(`_STATIC_METHOD',`dnl
_PUSH(SECTION_CC)
ifelse(`$9',,,`_DEPRECATE_IFDEF_START
')dnl
ifelse(`$10',,,`#ifdef $10'
)dnl
ifelse(`$8',,,`#ifdef GLIBMM_EXCEPTIONS_ENABLED
')dnl
$3 __CPPNAME__::$1($5)
ifelse(`$8',,,`#else
$3 __CPPNAME__::$1(`'$5`'ifelse(($5),(),`',`, ')std::auto_ptr<Glib::Error>& error)
#endif //GLIBMM_EXCEPTIONS_ENABLED
')dnl
{
ifelse(`$7'`$8',,dnl
`ifelse(`$3',void,,` return ')_CONVERT($4,$3,`$2`'($6)');
',dnl
`ifelse(`$8',,,` GError* gerror = 0;')
ifelse(`$3',void,,``$3' retvalue = ')_CONVERT($4,$3,`$2`'($6)');
ifelse(`$8',,,`
#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
#else
if(gerror)
error = ::Glib::Error::throw_exception(gerror);
#endif //GLIBMM_EXCEPTIONS_ENABLED
')
ifelse(`$7',,,`dnl
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
')dnl
ifelse(`$3',void,,` return retvalue;')
')dnl
}
ifelse(`$10',,,`
#endif // $10
')dnl
ifelse(`$9',,,`_DEPRECATE_IFDEF_END
')
_POP()')

View File

@@ -0,0 +1,40 @@
dnl $Id: property.m4 291 2006-05-12 08:08:45Z murrayc $
dnl
dnl
dnl Code generation sections for properties
dnl
dnl
dnl
dnl _PROPERTY_PROXY(name, name_underscored, cpp_type, proxy_suffix, docs)
dnl proxy_suffix could be "_WriteOnly" or "_ReadOnly"
dnl The method will be const if the propertyproxy is _ReadOnly.
dnl
define(`_PROPERTY_PROXY',`dnl
dnl
dnl Put spaces around the template parameter if necessary.
pushdef(`__PROXY_TYPE__',`dnl
Glib::PropertyProxy$4<'ifelse(regexp(_QUOTE($3),`>$'),`-1',_QUOTE($3),` '_QUOTE($3)` ')`>'dnl
)dnl
#ifdef GLIBMM_PROPERTIES_ENABLED
/** $5
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
__PROXY_TYPE__ property_$2`'() ifelse($4,_ReadOnly, const,);
#endif //#GLIBMM_PROPERTIES_ENABLED
_PUSH(SECTION_CC_PROPERTYPROXIES)
#ifdef GLIBMM_PROPERTIES_ENABLED
__PROXY_TYPE__ __CPPNAME__::property_$2`'() ifelse($4,_ReadOnly, const,)
{
return __PROXY_TYPE__`'(this, "$1");
}
#endif //GLIBMM_PROPERTIES_ENABLED
_POP()
popdef(`__PROXY_TYPE__')dnl
')dnl

View File

@@ -0,0 +1,272 @@
#
# --------------------------- Signal Decl----------------------------
#
dnl _SIGNAL_PROXY($1 = c_signal_name,
dnl $2 = c_return_type,
dnl $3 = `<c_arg_types_and_names>',
dnl $4 = cpp_signal_name,
dnl $5 = cpp_return_type,
dnl $6 = `<cpp_arg_types>',
dnl $7 = `<c_args_to_cpp>',
dnl $8 = `custom_c_callback (boolean)',
dnl $9 = `refdoc_comment',
dnl $10 = ifdef)
define(`_SIGNAL_PROXY',`
$9
ifelse(`$10',,,`#ifdef $10'
)dnl
Glib::SignalProxy`'_NUM($6)< $5`'_COMMA_PREFIX($6) > signal_$4`'();
ifelse(`$10',,,`#endif // $10
')dnl
dnl
_PUSH(SECTION_ANONYMOUS_NAMESPACE)
ifelse(`$10',,,`#ifdef $10'
)dnl
dnl
ifelse($2`'_NUM($3)`'$5`'_NUM($6),`void0void0',`dnl
dnl
dnl Use predefined callback for SignalProxy0<void>, to reduce code size.
static const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
{
"$1",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};
',`dnl else
ifelse($8,`1',,`dnl Do not generate the implementation if it should be custom:
static $2 __CPPNAME__`'_signal_$4_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3)`'void* data)
{
using namespace __NAMESPACE__;
typedef sigc::slot< $5`'_COMMA_PREFIX($6) > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot`'(data))
ifelse(`$2',void,`dnl
(*static_cast<SlotType*>(slot))($7);
',`dnl else
return _CONVERT($5,$2,`(*static_cast<SlotType*>(slot))($7)');
')dnl endif
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
ifelse($2,void,,`dnl else
typedef $2 RType;
return RType`'();
')dnl
}
ifelse($2,void,,`dnl else
static $2 __CPPNAME__`'_signal_$4_notify_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3)`' void* data)
{
using namespace __NAMESPACE__;
typedef sigc::slot< void`'_COMMA_PREFIX($6) > SlotType;
// Do not try to call a signal on a disassociated wrapper.
if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot`'(data))
(*static_cast<SlotType*>(slot))($7);
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
typedef $2 RType;
return RType`'();
}
')dnl endif
')dnl endif
static const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
{
"$1",
(GCallback) &__CPPNAME__`'_signal_$4_callback,
(GCallback) &__CPPNAME__`'_signal_$4_`'ifelse($2,void,,notify_)`'callback
};
')dnl endif
ifelse(`$10',,,`#endif // $10
')dnl
_SECTION(SECTION_CC_SIGNALPROXIES)
ifelse(`$10',,,`#ifdef $10'
)dnl
Glib::SignalProxy`'_NUM($6)< $5`'_COMMA_PREFIX($6) > __CPPNAME__::signal_$4`'()
{
return Glib::SignalProxy`'_NUM($6)< $5`'_COMMA_PREFIX($6) >(this, &__CPPNAME__`'_signal_$4_info);
}
ifelse(`$10',,,`#endif // $10
')dnl
_POP()')
dnl
dnl _SIGNAL_PH(gname, crettype, cargs and names)
dnl Create a callback and set it in our derived G*Class.
dnl
define(`_SIGNAL_PH',`dnl
_PUSH(SECTION_PCC_CLASS_INIT_DEFAULT_SIGNAL_HANDLERS)
ifelse(`$4',,,`#ifdef $4'
)dnl
klass->$1 = `&'$1_callback;
ifelse(`$4',,,`#endif // $4
')dnl
_SECTION(SECTION_PH_DEFAULT_SIGNAL_HANDLERS)
ifelse(`$4',,,`#ifdef $4'
)dnl
static $2 $1_callback`'($3);
ifelse(`$4',,,`#endif // $4
')dnl
_POP()')
dnl $1 $2 $3 $4
dnl _SIGNAL_PCC(cppname,gname,cpprettype,crettype,
dnl $5 $6 $7 $8 $9
dnl `<cargs and names>',`<cnames>',`<cpparg names>', firstarg, <ifndef>)
dnl
define(`_SIGNAL_PCC',`dnl
_PUSH(SECTION_PCC_DEFAULT_SIGNAL_HANDLERS)
ifelse(`$9',,,`#ifdef $9'
)dnl
$4 __CPPNAME__`'_Class::$2_callback`'($5)
{
dnl First, do a simple cast to ObjectBase. We will have to do a dynamic_cast
dnl eventually, but it is not necessary to check whether we need to call
dnl the vfunc.
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper`'((GObject*)$8));
_IMPORT(SECTION_CHECK)
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
dnl We need to do a dynamic cast to get the real object type, to call the
dnl C++ vfunc on it.
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
ifelse($4,void,`dnl
obj->on_$1`'($7);
return;
',`dnl
return _CONVERT($3,$4,`obj->on_$1`'($7)');
')dnl
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke`'();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
ifdef(`__BOOL_IS_INTERFACE__',`dnl
_IFACE_PARENT_FROM_OBJECT($8)dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT($8)dnl
') );
dnl g_assert(base != 0);
// Call the original underlying C function:
if(base && base->$2)
ifelse($4,void,,`return ')(*base->$2)`'($6);
ifelse($4,void,,`dnl
typedef $4 RType;
return RType`'();
')dnl
}
ifelse(`$9',,,`#endif // $9
')dnl
_POP()')
dnl $1 $2 $3 $4
dnl _SIGNAL_H(signame, rettype, `<cppargs>', <ifdef>)
dnl
define(`_SIGNAL_H',`dnl
_PUSH(SECTION_H_DEFAULT_SIGNAL_HANDLERS)
ifelse(`$4',,,`#ifdef $4'
)dnl
virtual $2 on_$1`'($3);
ifelse(`$4',,,`#endif // $4
')dnl
_POP()')
dnl $1 $2 $3 $4 $5 $6 $7 $8 $9
dnl _SIGNAL_CC(signame,gname,rettype,crettype,`<cppargs>',`<carg_names>', const, refreturn, <ifdef>)
dnl
define(`_SIGNAL_CC',`dnl
_PUSH(SECTION_CC_DEFAULT_SIGNAL_HANDLERS)
ifelse(`$9',,,`#ifdef $9'
)dnl
$3 __NAMESPACE__::__CPPNAME__::on_$1`'($5)
{
BaseClassType *const base = static_cast<BaseClassType*>(
ifdef(`__BOOL_IS_INTERFACE__',`dnl
_IFACE_PARENT_FROM_OBJECT(gobject_)dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT(gobject_)dnl
') );
dnl g_assert(base != 0);
if(base && base->$2)
ifelse($3,void,`dnl
(*base->$2)`'(gobj`'()`'_COMMA_PREFIX($6));
',`dnl
ifelse($8,refreturn,`dnl Assume Glib::wrap() is correct if refreturn is requested.
return Glib::wrap((*base->$2)`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'_COMMA_PREFIX($6)), true);
',`dnl
return _CONVERT($4,$3,`(*base->$2)`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'_COMMA_PREFIX($6))');
')dnl
typedef $3 RType;
return RType`'();
')dnl
}
ifelse(`$9',,,`#endif // $9
')dnl
_POP()')

View File

@@ -0,0 +1,154 @@
dnl
dnl _VFUNC_PH(gtkname, crettype, cargs and names)
dnl Create a callback and set it in our derived G*Class.
dnl
define(`_VFUNC_PH',`dnl
_PUSH(SECTION_PCC_CLASS_INIT_VFUNCS)
ifelse(`$4',,,`#ifdef $4'
)dnl
klass->$1 = `&'$1_vfunc_callback;
ifelse(`$4',,,`#endif // $4
')dnl
_SECTION(SECTION_PH_VFUNCS)
ifelse(`$4',,,`#ifdef $4'
)dnl
static $2 $1_vfunc_callback`'($3);
ifelse(`$4',,,`#endif // $4
')dnl
_POP()')
dnl $1 $2 $3 $4
dnl _VFUNC_PCC(cppname,gtkname,cpprettype,crettype,
dnl $5 $6 $7 $8 $9 $10
dnl `<cargs and names>',`<cnames>',`<cpparg names>',firstarg, refreturn_ctype, ifdef)
dnl
dnl Note: _get_current_wrapper_inline() could be used throughout for performance instead of _get_current_wrapper(),
dnl and is_derived_() instead of is_derived_(),
dnl but it is not yet clear whether that would be a worthwhile performance optimization.
define(`_VFUNC_PCC',`dnl
_PUSH(SECTION_PCC_VFUNCS)
ifelse(`$10',,,`#ifdef $10'
)dnl
$4 __CPPNAME__`'_Class::$2_vfunc_callback`'($5)
{
dnl First, do a simple cast to ObjectBase. We will have to do a dynamic_cast
dnl eventually, but it is not necessary to check whether we need to call
dnl the vfunc.
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper`'((GObject*)$8));
_IMPORT(SECTION_CHECK)
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
dnl We need to do a dynamic cast to get the real object type, to call the
dnl C++ vfunc on it.
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
ifelse($4,void,`dnl
obj->$1`'($7);
return;
',`dnl
ifelse($9,refreturn_ctype,`dnl Assume Glib::unwrap_copy() is correct if refreturn_ctype is requested.
return Glib::unwrap_copy`'(`obj->$1'($7));
',`dnl
return _CONVERT($3,$4,`obj->$1`'($7)');
')dnl
')dnl
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke`'();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
ifdef(`__BOOL_IS_INTERFACE__',`dnl
_IFACE_PARENT_FROM_OBJECT($8)dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT($8)dnl
') );
dnl g_assert(base != 0);
// Call the original underlying C function:
if(base && base->$2)
ifelse($4,void,,`return ')(*base->$2)`'($6);
ifelse($4,void,,`dnl
typedef $4 RType;
return RType`'();
')dnl
}
ifelse(`$10',,,`#endif // $10
')dnl
_POP()')
# $1 $2 $3 $4 $5 $6 $7 $8 $9
# _VFUNC_CC(vfunc_name, gtkname, cpp_rettype, c_rettype, `<cppargs>', `<carg_names>', is_const, refreturn, $ifdef)
#
define(`_VFUNC_CC',`dnl
_PUSH(SECTION_CC_VFUNCS)
ifelse(`$9',,,`#ifdef $9'
)dnl
$3 __NAMESPACE__::__CPPNAME__::$1`'($5) ifelse($7,1,const,)
{
BaseClassType *const base = static_cast<BaseClassType*>(
ifdef(`__BOOL_IS_INTERFACE__',`dnl
_IFACE_PARENT_FROM_OBJECT(gobject_)dnl
',`dnl
_PARENT_GCLASS_FROM_OBJECT(gobject_)dnl
') );
dnl g_assert(base != 0);
if(base && base->$2)
ifelse($3,void,`dnl
(*base->$2)`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'_COMMA_PREFIX($6));
',`dnl
ifelse($8,refreturn,`dnl Assume Glib::wrap() is correct if refreturn is requested.
return Glib::wrap((*base->$2)`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'_COMMA_PREFIX($6)), true);
',`dnl
return _CONVERT($4,$3,`(*base->$2)`'(ifelse(`$7',1,const_cast<__CNAME__*>(gobj()),gobj())`'_COMMA_PREFIX($6))');
')dnl
typedef $3 RType;
return RType`'();
')dnl
}
ifelse(`$9',,,`#endif // $9
')dnl
_POP()')
# $1 $2 $3 $4 $5
# _VFUNC_H(vfunc_name, rettype, `<cppargs>', is_const, ifndef)
# Only used for custom vfuncs.
#
define(`_VFUNC_H',`dnl
_PUSH(SECTION_H_VFUNCS)
ifelse(`$5',,,`#ifdef $5'
)dnl
ifelse($4,`1',`dnl
virtual $2 $1`'($3) const;
',`dnl
virtual $2 $1`'($3);
')
ifelse(`$5',,,`#endif // $5
')dnl
_POP()')

View File

@@ -0,0 +1,494 @@
# gtkmm - DocsParser module
#
# Copyright 2001 Free Software Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# Based on XML::Parser tutorial found at http://www.devshed.com/Server_Side/Perl/PerlXML/PerlXML1/page1.html
# This module isn't properly Object Orientated because the XML Parser needs global callbacks.
package DocsParser;
use XML::Parser;
use strict;
use warnings;
# use Util;
use Function;
use GtkDefs;
use Object;
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
# set the version for version checking
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = ( );
%EXPORT_TAGS = ( );
# your exported package globals go here,
# as well as any optionally exported functions
@EXPORT_OK = ( );
}
our @EXPORT_OK;
#####################################
use strict;
use warnings;
#####################################
$DocsParser::CurrentFile = "";
$DocsParser::refAppendTo = undef; # string reference to store the data into
$DocsParser::currentParam = undef;
$DocsParser::objCurrentFunction = undef; #Function
%DocsParser::hasharrayFunctions = (); #Function elements
#~ $DocsParser::bOverride = 0; #First we parse the C docs, then we parse the C++ override docs.
$DocsParser::commentStart = " /** ";
$DocsParser::commentMiddleStart = " * ";
$DocsParser::commentEnd = " */";
sub read_defs($$$)
{
my ($path, $filename, $filename_override) = @_;
my $objParser = new XML::Parser(ErrorContext => 0);
$objParser->setHandlers(Start => \&parse_on_start, End => \&parse_on_end, Char => \&parse_on_cdata);
# C documentation:
$DocsParser::CurrentFile = "$path/$filename";
if ( ! -r $DocsParser::CurrentFile)
{
print "DocsParser.pm: Warning: Can't read file \"" . $DocsParser::CurrentFile . "\".\n";
return;
}
# Parse
eval { $objParser->parsefile($DocsParser::CurrentFile) };
if( $@ )
{
$@ =~ s/at \/.*?$//s;
print "\nError in \"" . $DocsParser::CurrentFile . "\":$@\n";
return;
}
# C++ overide documentation:
$DocsParser::CurrentFile = "$path/$filename_override";
if ( ! -r $DocsParser::CurrentFile)
{
print "DocsParser.pm: Warning: Can't read file \"" . $DocsParser::CurrentFile . "\".\n";
return;
}
# Parse
eval { $objParser->parsefile($DocsParser::CurrentFile) };
if( $@ )
{
$@ =~ s/at \/.*?$//s;
print "\nError in \"" . $DocsParser::CurrentFile . "\":$@";
return;
}
}
sub parse_on_start($$%)
{
my ($objParser, $tag, %attr) = @_;
$tag = lc($tag);
if($tag eq "function")
{
if(defined $DocsParser::objCurrentFunction)
{
$objParser->xpcroak("\nClose a function tag before you open another one.");
}
my $functionName = $attr{name};
#Reuse existing Function, if it exists:
#(For instance, if this is the override parse)
$DocsParser::objCurrentFunction = $DocsParser::hasharrayFunctions{$functionName};
if(!$DocsParser::objCurrentFunction)
{
#Make a new one if necessary:
$DocsParser::objCurrentFunction = Function::new_empty();
# The idea is to change the policy a bit:
# If a function is redefined in a later parsing run only values which are redefined
# will be overwritten. For the name this is trivial. The description is simply rewritten.
# Same goes for the return description and the class mapping. Only exception is the
# parameter list. Everytime we enter a <parameters> tag the list is emptied again.
$$DocsParser::objCurrentFunction{name} = $functionName;
$$DocsParser::objCurrentFunction{description} = "";
$$DocsParser::objCurrentFunction{param_names} = [];
$$DocsParser::objCurrentFunction{param_descriptions} = ();
$$DocsParser::objCurrentFunction{return_description} = "";
$$DocsParser::objCurrentFunction{mapped_class} = "";
# We don't need this any more, the only reference to this field is commented
# $$DocsParser::objCurrentFunction{description_overridden} = $DocsParser::bOverride;
}
}
elsif($tag eq "parameters")
{
$$DocsParser::objCurrentFunction{param_names} = [];
$$DocsParser::objCurrentFunction{param_descriptions} = ();
}
elsif($tag eq "parameter")
{
$DocsParser::currentParam = $attr{name};
$$DocsParser::objCurrentFunction{param_descriptions}->{$DocsParser::currentParam} = "";
}
elsif($tag eq "description")
{
$$DocsParser::objCurrentFunction{description} = "";
# Set destination for parse_on_cdata().
$DocsParser::refAppendTo = \$$DocsParser::objCurrentFunction{description};
}
elsif($tag eq "parameter_description")
{
# Set destination for parse_on_cdata().
my $param_desc = \$$DocsParser::objCurrentFunction{param_descriptions};
$DocsParser::refAppendTo = \$$param_desc->{$DocsParser::currentParam};
}
elsif($tag eq "return")
{
$$DocsParser::objCurrentFunction{return_description} = "";
# Set destination for parse_on_cdata().
$DocsParser::refAppendTo = \$$DocsParser::objCurrentFunction{return_description};
}
elsif($tag eq "mapping")
{
$$DocsParser::objCurrentFunction{mapped_class} = $attr{class};
}
elsif($tag ne "root")
{
$objParser->xpcroak("\nUnknown tag \"$tag\".");
}
}
sub parse_on_end($$)
{
my ($parser, $tag) = @_;
# Clear destination for parse_on_cdata().
$DocsParser::refAppendTo = undef;
$tag = lc($tag);
if($tag eq "function")
{
# Store the Function structure in the array:
my $functionName = $$DocsParser::objCurrentFunction{name};
$DocsParser::hasharrayFunctions{$functionName} = $DocsParser::objCurrentFunction;
$DocsParser::objCurrentFunction = undef;
}
elsif($tag eq "parameter")
{
# <parameter name="returns"> and <return> means the same.
if($DocsParser::currentParam eq "returns")
{
my $param_descriptions = \$$DocsParser::objCurrentFunction{param_descriptions};
my $return_description = \$$DocsParser::objCurrentFunction{return_description};
$$return_description = delete $$param_descriptions->{"returns"};
}
else
{
# Append to list of parameters.
push(@{$$DocsParser::objCurrentFunction{param_names}}, $DocsParser::currentParam);
}
$DocsParser::currentParam = undef;
}
}
sub parse_on_cdata($$)
{
my ($parser, $data) = @_;
if(defined $DocsParser::refAppendTo)
{
# Dispatch $data to the current destination string.
$$DocsParser::refAppendTo .= $data;
}
}
# $strCommentBlock lookup_documentation($strFunctionName)
sub lookup_documentation($$)
{
my ($functionName, $deprecation_docs) = @_;
my $objFunction = $DocsParser::hasharrayFunctions{$functionName};
if(!$objFunction)
{
#print "DocsParser.pm: Warning: function not found: $functionName\n";
return ""
}
my $text = $$objFunction{description};
if(length($text) eq 0)
{
print "DocsParser.pm: Warning: No C docs for function: \"$functionName\"\n";
}
DocsParser::convert_docs_to_cpp($objFunction, \$text);
#Add note about deprecation if we have specified that in our _WRAP_METHOD() call:
if($deprecation_docs ne "")
{
$text .= "\n\@deprecated $deprecation_docs";
}
DocsParser::append_parameter_docs($objFunction, \$text);
DocsParser::append_return_docs($objFunction, \$text);
# Escape the space after "i.e." or "e.g." in the brief description.
$text =~ s/^([^.]*\b(?:i\.e\.|e\.g\.))\s/$1\\ /;
# Convert to Doxygen-style comment.
$text =~ s/\n/\n${DocsParser::commentMiddleStart}/g;
$text = $DocsParser::commentStart . $text;
$text .= "\n${DocsParser::commentEnd}\n";
return $text;
}
sub append_parameter_docs($$)
{
my ($obj_function, $text) = @_;
my @param_names = @{$$obj_function{param_names}};
my $param_descriptions = \$$obj_function{param_descriptions};
# Strip first parameter if this is a method.
my $defs_method = GtkDefs::lookup_method_dont_mark($$obj_function{name});
# the second alternative is for use with method-mappings meaning:
# this function is mapped into this Gtk::class
shift(@param_names) if(($defs_method && $$defs_method{class} ne "") ||
($$obj_function{mapped_class} ne ""));
foreach my $param (@param_names)
{
my $desc = $$param_descriptions->{$param};
$param =~ s/([a-zA-Z0-9]*(_[a-zA-Z0-9]+)*)_?/$1/g;
DocsParser::convert_docs_to_cpp($obj_function, \$desc);
if(length($desc) > 0)
{
$desc .= '.' unless($desc =~ /(?:^|\.)$/);
$$text .= "\n\@param ${param} \u${desc}";
}
}
}
sub append_return_docs($$)
{
my ($obj_function, $text) = @_;
my $desc = $$obj_function{return_description};
DocsParser::convert_docs_to_cpp($obj_function, \$desc);
$desc =~ s/\.$//;
$$text .= "\n\@return \u${desc}." unless($desc eq "");
}
sub convert_docs_to_cpp($$)
{
my ($obj_function, $text) = @_;
# Chop off leading and trailing whitespace.
$$text =~ s/^\s+//;
$$text =~ s/\s+$//;
# HagenM: this is the only reference to $$obj_function{description_overridden}
# and it seems not to be in use.
# if(!$$obj_function{description_overridden})
# {
# Convert C documentation to C++.
DocsParser::convert_tags_to_doxygen($text);
DocsParser::substitute_identifiers($$obj_function{name}, $text);
$$text =~ s/\bX\s+Window\b/X&nbsp;\%Window/g;
$$text =~ s/\bWindow\s+manager/\%Window manager/g;
# }
}
sub convert_tags_to_doxygen($)
{
my ($text) = @_;
for($$text)
{
# Replace format tags.
s"&lt;(/?)emphasis&gt;"<$1em>"g;
s"&lt;(/?)literal&gt;"<$1tt>"g;
s"&lt;(/?)function&gt;"<$1tt>"g;
# Some argument names are suffixed by "_" -- strip this.
# gtk-doc uses @thearg, but doxygen uses @a thearg.
s" ?\@([a-zA-Z0-9]*(_[a-zA-Z0-9]+)*)_?\b" \@a $1 "g;
s"^Note ?\d?: "\@note "mg;
s"&lt;/?programlisting&gt;""g;
s"&lt;informalexample&gt;"\@code"g;
s"&lt;/informalexample&gt;"\@endcode"g;
s"&lt;!&gt;""g;
# Remove all link tags.
s"&lt;/?u?link[^&]*&gt;""g;
# Remove all para tags (from tmpl sgml files).
s"&lt;/?para&gt;""g;
# Use our doxgen since/newin tags:
# TODO: Do this generically, regardless of the number:
s"Since: 2\.2"\@newin2p2"mg;
s"Since: 2\.4"\@newin2p4"mg;
s"Since: 2\.6"\@newin2p6"mg;
s"Since: 2\.8"\@newin2p8"mg;
s"Since: 2\.10"\@newin2p10"mg;
s"Since: 2\.12"\@newin2p12"mg;
s"Since: 2\.14"\@newin2p14"mg;
s"Since: 2\.16"\@newin2p16"mg;
s"Since: 2\.18"\@newin2p18"mg;
s"\b-&gt;\b"->"g;
# Doxygen is too dumb to handle &mdash;
s"&mdash;" \@htmlonly&mdash;\@endhtmlonly "g;
s"\%?FALSE\b"<tt>false</tt>"g;
s"\%?TRUE\b"<tt>true</tt>"g;
s"\%?NULL\b"<tt>0</tt>"g;
s"#?\bgboolean\b"<tt>bool</tt>"g;
s"#?\bg(int|short|long)\b"<tt>$1</tt>"g;
s"#?\bgu(int|short|long)\b"<tt>unsigned $1</tt>"g;
# For Gtk::TextIter.
s"(\\[rn])\b"<tt>\\$1</tt>"g;
}
}
sub substitute_identifiers($$)
{
my ($doc_func, $text) = @_;
for($$text)
{
# TODO: handle more than one namespace
s/[#%]([A-Z][a-z]*)([A-Z][A-Za-z]+)\b/$1::$2/g; # type names
s/[#%]([A-Z])([A-Z]*)_([A-Z\d_]+)\b/$1\L$2\E::$3/g; # enum values
# Undo wrong substitutions.
s/\bHas::/HAS_/g;
s/\bNo::/NO_/g;
# Replace C function names with C++ counterparts.
s/\b([a-z]+_[a-z][a-z\d_]+) ?\(\)/&DocsParser::substitute_function($doc_func, $1)/eg;
}
}
sub substitute_function($$)
{
my ($doc_func, $name) = @_;
if(my $defs_method = GtkDefs::lookup_method_dont_mark($name))
{
if(my $defs_object = DocsParser::lookup_object_of_method($$defs_method{class}, $name))
{
my $module = $$defs_object{module};
my $class = $$defs_object{name};
DocsParser::build_method_name($doc_func, $module, $class, \$name);
}
}
else
{
# Not perfect, but better than nothing.
$name =~ s/^g_/Glib::/;
}
return $name . "()";
}
sub lookup_object_of_method($$)
{
my ($object, $name) = @_;
if($object ne "")
{
# We already know the C object name, because $name is a non-static method.
return GtkDefs::lookup_object($object);
}
my @parts = split(/_/, $name);
pop(@parts);
# (gtk, foo, bar) -> (Gtk, Foo, Bar)
foreach(@parts) { $_ = (length > 2) ? ucfirst : uc; }
# Do a bit of try'n'error.
while(scalar(@parts) > 1)
{
my $try = join("", @parts);
if(my $defs_object = GtkDefs::lookup_object($try))
{ return $defs_object; }
pop(@parts);
}
return undef;
}
sub build_method_name($$$$)
{
my ($doc_func, $module, $class, $name) = @_;
my $prefix = $module . $class;
$prefix =~ s/([a-z])([A-Z])/$1_$2/g;
$prefix = lc($prefix) . '_';
if($$name =~ /^$prefix/)
{
my $scope = "";
$scope = "${module}::${class}::" unless($doc_func =~ /^$prefix/);
substr($$name, 0, length($prefix)) = $scope;
}
}
1; # indicate proper module load.

View File

@@ -0,0 +1,246 @@
package Enum;
use strict;
use warnings;
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
# set the version for version checking
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = ( );
%EXPORT_TAGS = ( );
# your exported package globals go here,
# as well as any optionally exported functions
@EXPORT_OK = ( );
}
our @EXPORT_OK;
# class Enum
# {
# bool flags;
# string type;
# string module;
# string c_type;
#
# string array elem_names;
# string array elem_values;
#
# bool mark;
# }
sub new
{
my ($def) = @_;
my $self = {};
bless $self;
$def =~ s/^\(//;
$def =~ s/\)$//;
$$self{mark} = 0;
$$self{flags} = 0;
$$self{elem_names} = [];
$$self{elem_values} = [];
# snarf down the fields
if($def =~ s/^define-(enum|flags)-extended (\S+)//)
{
$$self{type} = $2;
$$self{flags} = 1 if($1 eq "flags");
}
$$self{module} = $1 if($def =~ s/\(in-module "(\S+)"\)//);
$$self{c_type} = $1 if($def =~ s/\(c-name "(\S+)"\)//);
# values are compound lisp statement
if($def =~ s/\(values((?: '\("\S+" "\S+" "[^"]+"\))*) \)//)
{
$self->parse_values($1);
}
if($def !~ /^\s*$/)
{
GtkDefs::error("Unhandled enum def ($def) in $$self{module}\::$$self{type}\n")
}
# this should never happen
warn if(scalar(@{$$self{elem_names}}) != scalar(@{$$self{elem_values}}));
return $self;
}
sub parse_values($$)
{
my ($self, $value) = @_;
my $elem_names = [];
my $elem_values = [];
my $common_prefix = undef;
# break up the value statements
foreach(split(/\s*'*[()]\s*/, $value))
{
next if($_ eq "");
if(/^"\S+" "(\S+)" "([^"]+)"$/)
{
my ($name, $value) = ($1, $2);
# detect whether there is module prefix common to all names, e.g. GTK_
my $prefix = $1 if ($name =~ /^([^_]+_)/);
if (not defined($common_prefix))
{
$common_prefix = $prefix;
}
elsif ($prefix ne $common_prefix)
{
$common_prefix = "";
}
push(@$elem_names, $name);
push(@$elem_values, $value);
}
else
{
GtkDefs::error("Unknown value statement ($_) in $$self{c_type}\n");
}
}
if ($common_prefix)
{
# cut off the module prefix, e.g. GTK_
s/^$common_prefix// foreach (@$elem_names);
}
$$self{elem_names} = $elem_names;
$$self{elem_values} = $elem_values;
}
sub beautify_values($)
{
my ($self) = @_;
return if($$self{flags});
my $elem_names = $$self{elem_names};
my $elem_values = $$self{elem_values};
my $num_elements = scalar(@$elem_values);
return if($num_elements == 0);
my $first = $$elem_values[0];
return if($first !~ /^-?[0-9]+$/);
my $prev = $first;
# Continuous? (Aliases to prior enum values are allowed.)
foreach my $value (@$elem_values)
{
return if(($value < $first) || ($value > $prev + 1));
$prev = $value;
}
# This point is reached only if the values are a continuous range.
# 1) Let's kill all the superfluous values, for better readability.
# 2) Substitute aliases to prior enum values.
my %aliases = ();
for(my $i = 0; $i < $num_elements; ++$i)
{
my $value = \$$elem_values[$i];
my $alias = \$aliases{$$value};
if(defined($$alias))
{
$$value = $$alias;
}
else
{
$$alias = $$elem_names[$i];
$$value = "" unless($first != 0 && $$value == $first);
}
}
}
sub build_element_list($$$$)
{
my ($self, $ref_flags, $ref_no_gtype, $indent) = @_;
my @subst_in = [];
my @subst_out = [];
# Build a list of custom substitutions, and recognize some flags too.
foreach(@$ref_flags)
{
if(/^\s*(NO_GTYPE)\s*$/)
{
$$ref_no_gtype = $1;
}
elsif(/^\s*(get_type_func=)(\s*)\s*$/)
{
my $part1 = $1;
my $part2 = $2;
}
elsif(/^\s*s#([^#]+)#([^#]*)#\s*$/)
{
push(@subst_in, $1);
push(@subst_out, $2);
}
elsif($_ !~ /^\s*$/)
{
return undef;
}
}
my $elem_names = $$self{elem_names};
my $elem_values = $$self{elem_values};
my $num_elements = scalar(@$elem_names);
my $elements = "";
for(my $i = 0; $i < $num_elements; ++$i)
{
my $name = $$elem_names[$i];
my $value = $$elem_values[$i];
for(my $ii = 0; $ii < scalar(@subst_in); ++$ii)
{
$name =~ s/${subst_in[$ii]}/${subst_out[$ii]}/;
$value =~ s/${subst_in[$ii]}/${subst_out[$ii]}/;
}
$elements .= "${indent}${name}";
$elements .= " = ${value}" if($value ne "");
$elements .= ",\n" if($i < $num_elements - 1);
}
return $elements;
}
sub dump($)
{
my ($self) = @_;
print "<enum module=\"$$self{module}\" type=\"$$self{type}\" flags=$$self{flags}>\n";
my $elem_names = $$self{elem_names};
my $elem_values = $$self{elem_values};
for(my $i = 0; $i < scalar(@$elem_names); ++$i)
{
print " <element name=\"$$elem_names[$i]\" value=\"$$elem_values[$i]\"/>\n";
}
print "</enum>\n\n";
}
1; # indicate proper module load.

View File

@@ -0,0 +1,351 @@
package Function;
use strict;
use warnings;
use Util;
use FunctionBase;
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
# set the version for version checking
$VERSION = 1.00;
@ISA = qw(FunctionBase);
@EXPORT = qw(&func1 &func2 &func4);
%EXPORT_TAGS = ( );
# your exported package globals go here,
# as well as any optionally exported functions
@EXPORT_OK = qw($Var1 %Hashit &func3);
}
our @EXPORT_OK;
##################################################
### Function
# Commonly used algorithm for parsing a function declaration into
# its component pieces
#
# class Function : FunctionBase
# {
# string rettype;
# bool const;
# bool static;
# string name; e.g. gtk_accelerator_valid
# string c_name;
# string array param_type;
# string array param_name;
# string array param_default_value;
# string in_module; e.g. Gtk
# string signal_when. e.g. first, last, or both.
# string class e.g. GtkButton ( == of-object. Useful for signal because their names are not unique.
# string entity_type. e.g. method or signal
# }
sub new_empty()
{
my $self = {};
bless $self;
return $self;
}
# $objFunction new($function_declaration, $objWrapParser)
sub new($$)
{
#Parse a function/method declaration.
#e.g. guint gtk_something_set_thing(guint a, const gchar* something)
my ($line, $objWrapParser) = @_;
my $self = {};
bless $self;
#Initialize member data:
$$self{rettype} = "";
$$self{rettype_needs_ref} = 0; #Often the gtk function doesn't do an extra ref for the receiver.
$$self{const} = 0;
$$self{name} = "";
$$self{param_types} = [];
$$self{param_names} = [];
$$self{param_default_values} = [];
$$self{in_module} = "";
$$self{class} = "";
$$self{entity_type} = "method";
$line =~ s/^\s+//; # Remove leading whitespace.
$line =~ s/\s+/ /g; # Compress white space.
if ($line =~ /^static\s+([^()]+)\s+(\S+)\s*\((.*)\)\s*$/)
{
$$self{rettype} = $1;
$$self{name} = $2;
$$self{c_name} = $2;
$self->parse_param($3);
$$self{static} = 1;
}
elsif ($line =~ /^([^()]+)\s+(\S+)\s*\((.*)\)\s*(const)*$/)
{
no warnings qw(uninitialized); # disable the uninitialize warning for $4
$$self{rettype} = $1;
$$self{name} = $2;
$$self{c_name} = $2;
$self->parse_param($3);
$$self{const} = ($4 eq "const");
}
else
{
$objWrapParser->error("fail to parse $line\n");
}
return $self;
}
# $objFunction new_ctor($function_declaration, $objWrapParser)
# Like new(), but the function_declaration doesn't need a return type.
sub new_ctor($$)
{
#Parse a function/method declaration.
#e.g. guint gtk_something_set_thing(guint a, const gchar* something)
my ($line, $objWrapParser) = @_;
my $self = {};
bless $self;
#Initialize member data:
$$self{rettype} = "";
$$self{rettype_needs_ref} = 0;
$$self{const} = 0;
$$self{name} = "";
$$self{param_types} = [];
$$self{param_names} = [];
$$self{param_default_values} = [];
$$self{in_module} = "";
$$self{class} = "";
$$self{entity_type} = "method";
$line =~ s/^\s+//; # Remove leading whitespace.
$line =~ s/\s+/ /g; # Compress white space.
if ($line =~ /^(\S+)\s*\((.*)\)\s*/)
{
$$self{name} = $1;
$$self{c_name} = $2;
$self->parse_param($2);
}
else
{
$objWrapParser->error("fail to parse $line\n");
}
return $self;
}
# $num num_args()
sub num_args #($)
{
my ($self) = @_;
my $param_types = $$self{param_types};
return $#$param_types+1;
}
# parses C++ parameter lists.
# forms a list of types, names, and initial values
# (we don't currently use values)
sub parse_param($$)
{
my ($self, $line) = @_;
my $type = "";
my $name = "";
my $value = "";
my $id = 0;
my $has_value = 0;
my $param_types = $$self{param_types};
my $param_names = $$self{param_names};
my $param_default_values = $$self{param_default_values};
# clean up space and handle empty case
$line = string_trim($line);
$line =~ s/\s+/ /g; # Compress whitespace.
return if ($line =~ /^$/);
# parse through argument list
my @str = ();
my $par = 0;
foreach (split(/(const )|([,=&*()])|(<[^,]*>)|(\s+)/, $line)) #special characters OR <something> OR whitespace.
{
next if ( !defined($_) or $_ eq "" );
if ( $_ eq "(" ) #Detect the opening bracket.
{
push(@str, $_);
$par++; #Increment the number of parameters.
next;
}
elsif ( $_ eq ")" )
{
push(@str, $_);
$par--; #Decrement the number of parameters.
next;
}
elsif ( $par || /^(const )|(<[^,]*>)|([*&])|(\s+)/ ) #TODO: What's happening here?
{
push(@str, $_); #This looks like part of the type, so we store it.
next;
}
elsif ( $_ eq "=" ) #Default value
{
$type = join("", @str); #The type is everything before the = character.
@str = (); #Wipe it so that it will only contain the default value, which comes next.
$has_value = 1;
next;
}
elsif ( $_ eq "," ) #The end of one parameter:
{
if ($has_value)
{
$value = join("", @str); # If there's a default value, then it's the part before the next ",".
}
else
{
$type = join("", @str);
}
if ($name eq "")
{
$name = sprintf("p%s", $#$param_types + 2)
}
$type = string_trim($type);
push(@$param_types, $type);
push(@$param_names, $name);
push(@$param_default_values, $value);
#Clear variables, ready for the next parameter.
@str = ();
$type= "";
$value = "";
$has_value = 0;
$name = "";
$id = 0;
next;
}
if ($has_value)
{
push(@str, $_);
next;
}
$id++;
$name = $_ if ($id == 2);
push(@str, $_) if ($id == 1);
if ($id > 2)
{
print STDERR "Can't parse $line.\n";
print STDERR " arg type so far: $type\n";
print STDERR " arg name so far: $name\n";
print STDERR " arg default value so far: $value\n";
}
}
# handle last argument (There's no , at the end.)
if ($has_value)
{
$value = join("", @str);
}
else
{
$type = join("", @str);
}
if ($name eq "")
{
$name = sprintf("p%s", $#$param_types + 2)
}
$type = string_trim($type);
push(@$param_types, $type);
push(@$param_names, $name);
push(@$param_default_values, $value);
}
# add_parameter_autoname($, $type, $name)
# Adds e.g "sometype somename"
sub add_parameter_autoname($$)
{
my ($self, $type) = @_;
add_parameter($self, $type, "");
}
# add_parameter($, $type, $name)
# Adds e.g GtkSomething* p1"
sub add_parameter($$$)
{
my ($self, $type, $name) = @_;
$type = string_unquote($type);
$type =~ s/-/ /g;
my $param_names = $$self{param_names};
if ($name eq "")
{
$name = sprintf("p%s", $#$param_names + 2);
}
push(@$param_names, $name);
my $param_types = $$self{param_types};
push(@$param_types, $type);
return $self;
}
# $string get_refdoc_comment()
# Generate a readable prototype for signals.
sub get_refdoc_comment($)
{
my ($self) = @_;
my $str = " /**\n";
$str .= " * \@par Prototype:\n";
$str .= " * <tt>$$self{rettype} on_my_\%$$self{name}(";
my $param_names = $$self{param_names};
my $param_types = $$self{param_types};
my $num_params = scalar(@$param_types);
# List the parameters:
for(my $i = 0; $i < $num_params; ++$i)
{
$str .= $$param_types[$i] . ' ' . $$param_names[$i];
$str .= ", " if($i < $num_params - 1);
}
$str .= ")</tt>\n";
$str .= " */";
return $str;
}
sub get_is_const($)
{
my ($self) = @_;
return $$self{const};
}
1; # indicate proper module load.

View File

@@ -0,0 +1,217 @@
package FunctionBase;
use strict;
use warnings;
use Util;
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
# set the version for version checking
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = qw(&func1 &func2 &func4);
%EXPORT_TAGS = ( );
# your exported package globals go here,
# as well as any optionally exported functions
@EXPORT_OK = qw($Var1 %Hashit &func3);
}
our @EXPORT_OK;
##################################################
### FunctionBase
# Contains data and methods used by both Function (C++ declarations) and GtkDefs::Function (C defs descriptions)
# Note that GtkDefs::Signal inherits from GtkDefs::Function so it get these methods too.
#
# class Function : FunctionBase
# {
# string array param_types;
# string array param_names;
# string array param_documentation;
# string return_documention;
# }
# $string args_types_only($)
# comma-delimited argument types.
sub args_types_only($)
{
my ($self) = @_;
my $param_types = $$self{param_types};
return join(", ", @$param_types);
}
# $string args_names_only($)
sub args_names_only($)
{
my ($self) = @_;
my $param_names = $$self{param_names};
return join(", ", @$param_names);
}
# $string args_types_and_names($)
sub args_types_and_names($)
{
my ($self) = @_;
my $i;
my $param_names = $$self{param_names};
my $param_types = $$self{param_types};
my @out;
#debugging:
#if($#$param_types)
#{
# return "NOARGS";
#}
for ($i = 0; $i < $#$param_types + 1; $i++)
{
my $str = sprintf("%s %s", $$param_types[$i], $$param_names[$i]);
push(@out, $str);
}
my $result = join(", ", @out);
return $result;
}
# $string args_names_only_without_object($)
sub args_names_only_without_object2($)
{
my ($self) = @_;
my $param_names = $$self{param_names};
my $result = "";
my $bInclude = 0; #Ignore the first (object) arg.
foreach (@{$param_names})
{
# Add comma if there was an arg before this one:
if( $result ne "")
{
$result .= ", ";
}
# Append this arg if it's not the first one:
if($bInclude)
{
$result .= $_;
}
$bInclude = 1;
}
return $result;
}
# $string args_types_and_names_without_object($)
sub args_types_and_names_without_object($)
{
my ($self) = @_;
my $param_names = $$self{param_names};
my $param_types = $$self{param_types};
my $i = 0;
my @out;
for ($i = 1; $i < $#$param_types + 1; $i++) #Ignore the first arg.
{
my $str = sprintf("%s %s", $$param_types[$i], $$param_names[$i]);
push(@out, $str);
}
return join(", ", @out);
}
# $string args_names_only_without_object($)
sub args_names_only_without_object($)
{
my ($self) = @_;
my $param_names = $$self{param_names};
my $result = "";
my $bInclude = 0; #Ignore the first (object) arg.
foreach (@{$param_names})
{
# Add comma if there was an arg before this one:
if( $result ne "")
{
$result .= ", ";
}
# Append this arg if it's not the first one:
if($bInclude)
{
$result .= $_;
}
$bInclude = 1;
}
return $result;
}
sub dump($)
{
my ($self) = @_;
my $param_types = $$self{param_types};
my $param_names = $$self{param_names};
print "<function>\n";
foreach (keys %$self)
{
print " <$_ value=\"$$self{$_}\"/>\n" if (!ref $$self{$_} && $$self{$_} ne "");
}
if (scalar(@$param_types)>0)
{
print " <parameters>\n";
for (my $i = 0; $i < scalar(@$param_types); $i++)
{
print " \"$$param_types[$i]\" \"$$param_names[$i]\" \n";
}
print " </parameters>\n";
}
print "</function>\n\n";
}
sub args_types_and_names_with_default_values($)
{
my ($self) = @_;
my $i;
my $param_names = $$self{param_names};
my $param_types = $$self{param_types};
my $param_default_values = $$self{param_default_values};
my @out;
for ($i = 0; $i < $#$param_types + 1; $i++)
{
my $str = sprintf("%s %s", $$param_types[$i], $$param_names[$i]);
if(defined($$param_default_values[$i]))
{
if($$param_default_values[$i] ne "")
{
$str .= " = " . $$param_default_values[$i];
}
}
push(@out, $str);
}
return join(", ", @out);
}
1; # indicate proper module load.

View File

@@ -0,0 +1,635 @@
# gtkmm - GtkDefs module
#
# Copyright 2001 Free Software Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
package GtkDefs;
use strict;
use warnings;
use Util;
use Enum;
use Object;
use Property;
use FunctionBase;
#
# Public functions
# read_defs(path, file)
#
# @ get_methods()
# @ get_signals()
# @ get_properties()
#
# $ lookup_enum(c_type)
# $ lookup_object(c_name)
# $ lookup_method(c_name)
# $ lookup_function(c_name)
# $ lookup_property(object, c_name)
# $ lookup_signal(object, c_name)
#
BEGIN {
use Exporter ();
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
# set the version for version checking
$VERSION = 1.00;
@ISA = qw(Exporter);
@EXPORT = ( );
%EXPORT_TAGS = ( );
# your exported package globals go here,
# # as well as any optionally exported functions
@EXPORT_OK = ( );
}
our @EXPORT_OK;
#####################################
use strict;
use warnings;
#####################################
%GtkDefs::enums = (); #Enum
%GtkDefs::objects = (); #Object
%GtkDefs::methods = (); #GtkDefs::Function
%GtkDefs::signals = (); #GtkDefs::Signal
%GtkDefs::properties = (); #Property
@GtkDefs::read = ();
@GtkDefs::file = ();
#####################################
#prototype to get rid of warning
sub read_defs($$;$);
sub read_defs($$;$)
{
my ($path, $filename, $restrict) = @_;
$restrict = "" if ($#_ < 2);
# check that the file is there.
if ( ! -r "$path/$filename")
{
print "Error: can't read defs file $filename\n";
return;
}
# break the tokens into lisp phrases up to three levels deep.
# WARNING: reading the following perl statement may induce seizures,
# please flush eyes with water immediately, and consult a mortician.
my @tokens = split(
m/(
\(
(?:
[^()]*
\(
(?:
[^()]*
\(
[^()]*
\)
)*
[^()]*
\)
)*
[^()]*
\)
)/x,
read_file($path, $filename));
# scan through top level tokens
while ($#tokens > -1)
{
my $token = shift @tokens;
next if ($token =~ /^\s*$/);
if ($token =~ /\(include (\S+)\)/)
{
read_defs($path,$1,$restrict);
next;
}
elsif ($token =~ /^\(define-flags-extended.*\)$/)
{ on_enum($token); }
elsif ($token =~ /^\(define-enum-extended.*\)$/)
{ on_enum($token); }
elsif ($token =~ /^\(define-flags.*\)$/)
{ }
elsif ($token =~ /^\(define-enum.*\)$/)
{ }
elsif ($token =~ /^\(define-object.*\)$/)
{ on_object($token); }
elsif ($token =~ /^\(define-function.*\)$/)
{ on_function($token); }
elsif ($token =~ /^\(define-method.*\)$/)
{ on_method($token); }
elsif ($token =~ /^\(define-property.*\)$/)
{ on_property($token); }
elsif ($token =~ /^\(define-signal.*\)$/)
{ on_signal($token); }
elsif ($token =~ /^\(define-vfunc.*\)$/)
{ on_vfunc($token); }
else
{
if ( $token =~ /^\(define-(\S+) (\S+)/)
{
# FIXME need to figure out the line number.
print STDERR "Broken lisp definition for $1 $2.\n";
}
else
{
print "unknown token $token \n";
}
}
}
}
sub read_file($$)
{
my ($path, $filename)=@_;
my @buf = ();
# don't read a file twice
foreach (@GtkDefs::read)
{
return "" if ($_ eq "$path/$filename");
}
push @GtkDefs::read, "$path/$filename";
# read file while stripping comments
open(FILE, "$path/$filename");
while (<FILE>)
{
s/^;.*$//; # remove comments
chop; # remove new lines
push(@buf, $_);
}
close(FILE);
$_ = join("", @buf);
s/\s+/ /g;
return $_;
}
sub on_enum($)
{
my $thing = Enum::new(shift(@_));
$GtkDefs::enums{$$thing{c_type}} = $thing;
}
sub on_object($)
{
my $thing = Object::new(shift(@_));
$GtkDefs::objects{$$thing{c_name}} = $thing;
}
sub on_function($)
{
my $thing = GtkDefs::Function::new(shift(@_));
$GtkDefs::methods{$$thing{c_name}} = $thing;
}
sub on_method($)
{
my $thing = GtkDefs::Function::new(shift(@_));
$GtkDefs::methods{$$thing{c_name}} = $thing if ($thing);
}
sub on_property($)
{
my $thing = Property::new(shift(@_));
$GtkDefs::properties{"$$thing{class}::$$thing{name}"} = $thing;
}
sub on_signal($)
{
my $thing = GtkDefs::Signal::new(shift(@_));
$GtkDefs::signals{"$$thing{class}::$$thing{name}"} = $thing;
}
sub on_vfunc($)
{
my $thing = GtkDefs::Signal::new(shift(@_));
$GtkDefs::signals{"$$thing{class}::$$thing{name}"} = $thing;
}
##########################
sub get_enums
{
return sort {$$a{c_type} cmp $$b{c_type}} values %GtkDefs::enums;
}
sub get_methods
{
return sort {$$a{c_name} cmp $$b{c_name}} values %GtkDefs::methods;
}
sub get_signals
{
return sort {$$a{name} cmp $$b{name}} values %GtkDefs::signals;
}
sub get_properties
{
return sort {$$a{name} cmp $$b{name}} values %GtkDefs::properties;
}
sub get_marked
{
no warnings;
return grep {$$_{mark}==1} values %GtkDefs::methods;
}
# This searches for items wrapped by this file and then tries to locate
# other functions/signal/properties which may have been left unmarked.
sub get_unwrapped
{
# find methods which were used in for a _WRAP
my @targets;
push @targets,grep {$$_{entity_type} eq "method" && $$_{mark}==1} values %GtkDefs::methods;
push @targets,grep {$$_{mark}==1} values %GtkDefs::signals;
push @targets,grep {$$_{mark}==1} values %GtkDefs::properties;
# find the classes which used them.
my @classes = join(" ", unique(map { $$_{class} } @targets));
# find methods which are in those classes which didn't get marked.
my @unwrapped;
my $class;
foreach $class (@classes)
{
push @unwrapped, grep {$$_{class} eq $class && $$_{mark}==0} values %GtkDefs::methods;
push @unwrapped, grep {$$_{class} eq $class && $$_{mark}==0} values %GtkDefs::properties;
push @unwrapped, grep {$$_{class} eq $class && $$_{mark}==0} values %GtkDefs::signals;
}
return @unwrapped;
}
##########################
sub lookup_enum($)
{
no warnings;
my ($c_type) = @_;
my $obj = $GtkDefs::enums{$c_type};
return 0 if(!$obj);
$$obj{mark} = 1;
return $obj;
}
sub lookup_object($)
{
no warnings;
return $GtkDefs::objects{$_[0]};
}
# $objProperty lookup_property($name, $parent_object_name)
sub lookup_property($$)
{
no warnings;
my ($parent_object_name, $name) = @_;
$name =~ s/-/_/g;
my $obj = $GtkDefs::properties{"${parent_object_name}::${name}"};
return 0 if ($obj eq "");
$$obj{mark} = 1;
return $obj;
}
sub lookup_method_dont_mark($)
{
no warnings;
my ($c_name) = @_;
$c_name =~ s/-/_/g;
my $obj = $GtkDefs::methods{$c_name};
return 0 if ($obj eq "");
return $obj;
}
sub lookup_method($)
{
my $obj = lookup_method_dont_mark($_);
$$obj{mark} = 1 if($obj);
return $obj;
}
sub lookup_function($)
{
return lookup_method($_[0]);
}
sub lookup_signal($$)
{
no warnings;
my ($parent_object_name, $name) = @_;
$name =~ s/-/_/g;
my $obj = $GtkDefs::signals{"${parent_object_name}::${name}"};
return 0 if ($obj eq "");
$$obj{mark} = 1;
return $obj;
}
sub error
{
my $format = shift @_;
printf STDERR "GtkDefs.pm: $format\n", @_;
}
########################################################################
package GtkDefs::Function;
BEGIN { @GtkDefs::Function::ISA=qw(FunctionBase); }
# class Function : FunctionBase
#
# {
# string name; e.g. gtk_accelerator_valid
# string c_name;
# string class e.g. GtkButton
#
# string rettype;
# string array param_types;
# string array param_names;
#
# string entity_type. e.g. method or signal
#
# bool varargs;
# bool mark;
#
# }
# "new" can't have prototype
sub new
{
my ($def) = @_;
my $whole = $def;
my $self = {};
bless $self;
$def =~ s/^\(//;
$def =~ s/\)$//;
$def =~ s/^\s*define-(\S+)\s+(\S+)\s*//;
$$self{entity_type} = $1;
$$self{name} = $2;
$$self{name} =~ s/-/_/g; # change - to _
# init variables
$$self{mark} = 0;
$$self{rettype} = "none";
$$self{param_types} = [];
$$self{param_names} = [];
$$self{class} = "";
# snarf down lisp fields
$$self{c_name} = $1 if ($def=~s/\(c-name "(\S+)"\)//);
$$self{class} = $1 if ($def=~s/\(of-object "(\S+)"\)//);
if ($def =~ s/\(return-type "(\S+)"\)//)
{
$$self{rettype} = $1;
$$self{rettype} =~ s/-/ /g; #e.g. replace const-gchar* with const gchar*. Otherwise it will be used in code.
}
$$self{varargs} = 1 if ($def=~s/\(varargs\s+#t\)//);
$$self{rettype} = "void" if ($$self{rettype} eq "none");
# methods have a parameter not stated in the defs file
if ($$self{entity_type} eq "method")
{
push( @{$$self{param_types}}, "$$self{class}*" );
push( @{$$self{param_names}}, "self" );
}
# parameters are compound lisp statement
if ($def =~ s/\(parameters(( '\("\S+" "\S+"\))*) \)//)
{
$self->parse_param($1);
}
# is-constructor-of:
if ($def =~ s/\(is-constructor-of "(\S+)"\)//)
{
#Ignore them.
}
# of-object
if ($def =~ s/\(of-object "(\S+)"\)//)
{
#Ignore them.
}
GtkDefs::error("Unhandled function parameter ($def) in $$self{c_name}\n")
if ($def !~ /^\s*$/);
return $self;
}
sub parse_param($$)
{
my ($self, $param) = @_;
# break up the parameter statements
foreach (split(/\s*'*[()]\s*/, $param))
{
next if ($_ eq "");
if (/^"(\S+)" "(\S+)"$/)
{
my ($p1, $p2) = ($1,$2);
$p1 =~ s/-/ /;
push( @{$$self{param_types}}, $p1);
push( @{$$self{param_names}}, $p2);
}
else
{
GtkDefs::error("Unknown parameter statement ($_) in $$self{c_name}\n");
}
}
}
# $string get_return_type_for_methods().
# Changes gchar* (not const-gchar*) to return-gchar* so that _CONVERT knows that it needs to be freed.
sub get_return_type_for_methods($)
{
my ($self) = @_;
my $rettype = $$self{rettype};
if($rettype eq "gchar*" || $rettype eq "char*")
{
$rettype = "return-" . $rettype;
}
return $rettype;
}
sub get_param_names
{
my ($self) = @_;
return @$self{param_names};
}
######################################################################
package GtkDefs::Signal;
BEGIN { @GtkDefs::Signal::ISA=qw(GtkDefs::Function); }
# class Signal : Function
# {
# string name; e.g. gtk_accelerator_valid
# string class e.g. GtkButton ( == of-object.)
#
# string rettype;
#
# string when. e.g. first, last, or both.
# string entity_type. e.g. method or signal
# }
# "new" can't have prototype
sub new
{
my ($def) = @_;
my $whole = $def;
my $self = {};
bless $self;
#Remove first and last braces:
$def =~ s/^\(//;
$def =~ s/\)$//;
$def =~ s/^\s*define-(\S+)\s+(\S+)\s*//;
$$self{entity_type} = $1;
$$self{name} = $2;
$$self{name} =~ s/-/_/g; #change - to _
# init variables
$$self{mark}=0;
$$self{rettype} = "none";
$$self{param_types} = [];
$$self{param_names} = [];
$$self{when} = "";
$$self{class} = "";
# snarf down lisp fields
if($def =~ s/\(of-object "(\S+)"\)//)
{
$$self{class} = $1;
}
else
{
GtkDefs::error("define-signal/define-vfunc without of-object (entity type: $$self{entity_type}): $whole");
}
if($def =~ s/\(return-type "(\S+)"\)//)
{
$$self{rettype} = $1;
$$self{rettype} =~ s/-/ /g; #e.g. replace const-gchar* with const gchar*. Otherwise it will be used in code.
}
if($def =~ s/\(when "(\S+)"\)//)
{
$$self{when} = $1;
}
if($$self{rettype} eq "none")
{
$$self{rettype} = "void"
}
# signals always have a parameter
push(@{$$self{param_types}}, "$$self{class}*");
push(@{$$self{param_names}}, "self");
# parameters are compound lisp statement
if ($def =~ s/\(parameters(( '\("\S+" "\S+"\))+) \)//)
{
$self->parse_param($1);
}
if ($def!~/^\s*$/)
{
GtkDefs::error("Unhandled signal/vfunc def ($def) in $$self{class}::$$self{name}");
}
return $self;
}
# bool has_same_types($objFunction)
# Compares return types and argument types
sub has_same_types($$)
{
my ($self, $objFuncOther) = @_;
#Compare return types:
if($self->types_are_equal($$self{rettype}, $$objFuncOther{rettype}) ne 1)
{
# printf("debug: different return types: %s, %s\n", $$self{rettype}, $$objFuncOther{rettype});
return 0; #Different types found.
}
#Compare arguement types:
my $i = 0;
my $param_types = $$self{param_types};
my $param_types_other = $$objFuncOther{param_types};
for ($i = 1; $i < $#$param_types + 1; $i++)
{
my $type_a = $$param_types[$i];
my $type_b = $$param_types_other[$i-1];
if($self->types_are_equal($type_a, $type_b) ne 1)
{
# printf("debug: different arg types: %s, %s\n", $type_a, $type_b);
return 0; #Different types found.
}
}
return 1; #They must all be the same for it to get this far.
}
# bool types_are_equal($a, $b)
# Compares types, ignoring gint/int differences, etc.
sub types_are_equal($$$)
{
#TODO: Proper method of getting a normalized type name.
my ($self, $type_a, $type_b) = @_;
if($type_a ne $type_b)
{
#Try adding g to one of them:
if( ("g" . $type_a) ne $type_b )
{
#Try adding g to the other one:
if( $type_a ne ("g" . $type_b) )
{
#After all these checks it's still not equal:
return 0; #not equal.
}
}
}
# printf("DEBUG: types are equal: %s, %s\n", $$type_a, $$type_b);
return 1; #They must be the same for it to get this far.
}
1; # indicate proper module load.

View File

@@ -0,0 +1,10 @@
include $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment
EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_pm)
# Install the .pm, files:
tools_pm_includedir = $(libdir)/glibmm-2.4/proc/pm
tools_pm_include_HEADERS = $(files_tools_pm)

View File

@@ -0,0 +1,432 @@
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(tools_pm_include_HEADERS) \
$(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment
subdir = tools/pm
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/scripts/c_std.m4 \
$(top_srcdir)/scripts/cxx.m4 $(top_srcdir)/scripts/cxx_std.m4 \
$(top_srcdir)/scripts/docgen.m4 \
$(top_srcdir)/scripts/glibmm_check_perl.m4 \
$(top_srcdir)/scripts/macros.m4 \
$(top_srcdir)/scripts/reduced.m4 $(top_srcdir)/scripts/sun.m4 \
$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/glib/glibmmconfig.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(tools_pm_includedir)"
tools_pm_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(tools_pm_include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED_API_CFLAGS = @DISABLE_DEPRECATED_API_CFLAGS@
DISABLE_DEPRECATED_CFLAGS = @DISABLE_DEPRECATED_CFLAGS@
DLLTOOL = @DLLTOOL@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GLIBMM_CFLAGS = @GLIBMM_CFLAGS@
GLIBMM_LIBS = @GLIBMM_LIBS@
GLIBMM_MAJOR_VERSION = @GLIBMM_MAJOR_VERSION@
GLIBMM_MICRO_VERSION = @GLIBMM_MICRO_VERSION@
GLIBMM_MINOR_VERSION = @GLIBMM_MINOR_VERSION@
GLIBMM_RELEASE = @GLIBMM_RELEASE@
GLIBMM_VERSION = @GLIBMM_VERSION@
GREP = @GREP@
GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
GTHREAD_LIBS = @GTHREAD_LIBS@
GTKMMPROC_MERGECDOCS = @GTKMMPROC_MERGECDOCS@
GTKMM_DOXYGEN_INPUT = @GTKMM_DOXYGEN_INPUT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBGLIBMM_SO_VERSION = @LIBGLIBMM_SO_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
M4 = @M4@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_PATH = @PERL_PATH@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
files_tools_pm = DocsParser.pm GtkDefs.pm Enum.pm Function.pm FunctionBase.pm Object.pm Output.pm Property.pm Util.pm WrapParser.pm
EXTRA_DIST = Makefile_list_of_sources.am_fragment $(files_tools_pm)
# Install the .pm, files:
tools_pm_includedir = $(libdir)/glibmm-2.4/proc/pm
tools_pm_include_HEADERS = $(files_tools_pm)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/tools/pm/Makefile_list_of_sources.am_fragment $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/pm/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu tools/pm/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-tools_pm_includeHEADERS: $(tools_pm_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(tools_pm_includedir)" || $(MKDIR_P) "$(DESTDIR)$(tools_pm_includedir)"
@list='$(tools_pm_include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(tools_pm_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(tools_pm_includedir)/$$f'"; \
$(tools_pm_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(tools_pm_includedir)/$$f"; \
done
uninstall-tools_pm_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(tools_pm_include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(tools_pm_includedir)/$$f'"; \
rm -f "$(DESTDIR)$(tools_pm_includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(tools_pm_includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-tools_pm_includeHEADERS
install-dvi: install-dvi-am
install-exec-am:
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-tools_pm_includeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip \
install-tools_pm_includeHEADERS installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags uninstall uninstall-am \
uninstall-tools_pm_includeHEADERS
# 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:

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