From e7546c7c0986174ab423bb05909073dd4262c17f Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Mon, 11 Aug 2008 22:02:09 -0400 Subject: [PATCH] Compiling widget --- autom4te.cache/output.2 | 44 ++++++++++++++----- autom4te.cache/output.3 | 44 ++++++++++++++----- autom4te.cache/traces.2 | 32 +++++++------- autom4te.cache/traces.3 | 28 ++++++++---- configure | 42 +++++++++++++----- configure.ac | 8 ++-- src/Makefile.am | 4 +- src/Makefile.in | 12 ++--- src/champlain_defines.h | 26 +++++++++++ ...hamplain_widget.cpp => champlain_widget.c} | 20 +++++---- src/champlain_widget.h | 20 ++++----- src/launcher.c | 28 ++++++++++++ 12 files changed, 220 insertions(+), 88 deletions(-) create mode 100644 src/champlain_defines.h rename src/{champlain_widget.cpp => champlain_widget.c} (83%) create mode 100644 src/launcher.c diff --git a/autom4te.cache/output.2 b/autom4te.cache/output.2 index e52a404..a22f004 100644 --- a/autom4te.cache/output.2 +++ b/autom4te.cache/output.2 @@ -578,7 +578,7 @@ PACKAGE_VERSION='0.1' PACKAGE_STRING='champlain 0.1' PACKAGE_BUGREPORT='pierre-luc@squidy.info' -ac_unique_file="src/champlain.c" +ac_unique_file="src/champlain_widget.h" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME @@ -2157,7 +2157,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - + case $enable_ltdl_convenience in @@ -3403,14 +3403,20 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DEPS_CFLAGS="$DEPS_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.2 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.2 + ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.2 + pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null` else pkg_failed=yes @@ -3424,14 +3430,20 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DEPS_LIBS="$DEPS_LIBS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.2 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.2 + ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.2 + pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null` else pkg_failed=yes @@ -3451,16 +3463,22 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.2 + DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 "` else - DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.2 + DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 "` fi # Put the nasty error message in config.log where it belongs echo "$DEPS_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.2 + { { echo "$as_me:$LINENO: error: Package requirements ( glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ) were not met: $DEPS_PKG_ERRORS @@ -3472,7 +3490,9 @@ Alternatively, you may set the environment variables DEPS_CFLAGS and DEPS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -echo "$as_me: error: Package requirements (glib-2.0 >= 2.2 +echo "$as_me: error: Package requirements ( glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ) were not met: $DEPS_PKG_ERRORS diff --git a/autom4te.cache/output.3 b/autom4te.cache/output.3 index e52a404..a22f004 100644 --- a/autom4te.cache/output.3 +++ b/autom4te.cache/output.3 @@ -578,7 +578,7 @@ PACKAGE_VERSION='0.1' PACKAGE_STRING='champlain 0.1' PACKAGE_BUGREPORT='pierre-luc@squidy.info' -ac_unique_file="src/champlain.c" +ac_unique_file="src/champlain_widget.h" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME @@ -2157,7 +2157,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - + case $enable_ltdl_convenience in @@ -3403,14 +3403,20 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DEPS_CFLAGS="$DEPS_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.2 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.2 + ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.2 + pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null` else pkg_failed=yes @@ -3424,14 +3430,20 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DEPS_LIBS="$DEPS_LIBS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.2 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.2 + ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.2 + pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null` else pkg_failed=yes @@ -3451,16 +3463,22 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.2 + DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 "` else - DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.2 + DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 "` fi # Put the nasty error message in config.log where it belongs echo "$DEPS_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.2 + { { echo "$as_me:$LINENO: error: Package requirements ( glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ) were not met: $DEPS_PKG_ERRORS @@ -3472,7 +3490,9 @@ Alternatively, you may set the environment variables DEPS_CFLAGS and DEPS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -echo "$as_me: error: Package requirements (glib-2.0 >= 2.2 +echo "$as_me: error: Package requirements ( glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ) were not met: $DEPS_PKG_ERRORS diff --git a/autom4te.cache/traces.2 b/autom4te.cache/traces.2 index ca233e2..2310ffc 100644 --- a/autom4te.cache/traces.2 +++ b/autom4te.cache/traces.2 @@ -307,20 +307,20 @@ m4trace:configure.ac:21: -1- m4_pattern_allow([^DEPS_CFLAGS$]) m4trace:configure.ac:21: -1- AC_SUBST([DEPS_LIBS]) m4trace:configure.ac:21: -1- AC_SUBST_TRACE([DEPS_LIBS]) m4trace:configure.ac:21: -1- m4_pattern_allow([^DEPS_LIBS$]) -m4trace:configure.ac:31: -1- AC_CONFIG_FILES([Makefile +m4trace:configure.ac:33: -1- AC_CONFIG_FILES([Makefile src/Makefile]) -m4trace:configure.ac:33: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:33: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:33: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:33: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.ac:33: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:35: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:35: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:35: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:35: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:35: -1- AC_SUBST_TRACE([INSTALL]) diff --git a/autom4te.cache/traces.3 b/autom4te.cache/traces.3 index a2a6880..d536bee 100644 --- a/autom4te.cache/traces.3 +++ b/autom4te.cache/traces.3 @@ -6895,7 +6895,9 @@ m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^DEPS_CFLAGS$]) m4trace:configure.ac:19: -1- m4_pattern_allow([^DEPS_LIBS$]) -m4trace:configure.ac:21: -1- PKG_CHECK_MODULES([DEPS], [glib-2.0 >= 2.2 +m4trace:configure.ac:21: -1- PKG_CHECK_MODULES([DEPS], [ glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ]) m4trace:configure.ac:21: -1- PKG_PROG_PKG_CONFIG m4trace:configure.ac:21: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$]) @@ -6904,14 +6906,22 @@ m4trace:configure.ac:21: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:21: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.ac:21: -1- m4_pattern_allow([^DEPS_CFLAGS$]) m4trace:configure.ac:21: -1- m4_pattern_allow([^DEPS_LIBS$]) -m4trace:configure.ac:21: -1- PKG_CHECK_EXISTS([glib-2.0 >= 2.2 -], [pkg_cv_[]DEPS_CFLAGS=`$PKG_CONFIG --[]cflags "glib-2.0 >= 2.2 +m4trace:configure.ac:21: -1- PKG_CHECK_EXISTS([ glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 +], [pkg_cv_[]DEPS_CFLAGS=`$PKG_CONFIG --[]cflags " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null`], [pkg_failed=yes]) -m4trace:configure.ac:21: -1- PKG_CHECK_EXISTS([glib-2.0 >= 2.2 -], [pkg_cv_[]DEPS_LIBS=`$PKG_CONFIG --[]libs "glib-2.0 >= 2.2 +m4trace:configure.ac:21: -1- PKG_CHECK_EXISTS([ glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 +], [pkg_cv_[]DEPS_LIBS=`$PKG_CONFIG --[]libs " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null`], [pkg_failed=yes]) m4trace:configure.ac:21: -1- _PKG_SHORT_ERRORS_SUPPORTED -m4trace:configure.ac:33: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:33: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:33: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file]) -m4trace:configure.ac:33: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:35: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:35: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:35: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file]) +m4trace:configure.ac:35: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS diff --git a/configure b/configure index b0e2d58..2c94152 100755 --- a/configure +++ b/configure @@ -578,7 +578,7 @@ PACKAGE_VERSION='0.1' PACKAGE_STRING='champlain 0.1' PACKAGE_BUGREPORT='pierre-luc@squidy.info' -ac_unique_file="src/champlain.c" +ac_unique_file="src/champlain_widget.h" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME @@ -3403,14 +3403,20 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DEPS_CFLAGS="$DEPS_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.2 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.2 + ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.2 + pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null` else pkg_failed=yes @@ -3424,14 +3430,20 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DEPS_LIBS="$DEPS_LIBS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.2 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 \"") >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.2 + ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.2 + pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 " 2>/dev/null` else pkg_failed=yes @@ -3451,16 +3463,22 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.2 + DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 "` else - DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.2 + DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 "` fi # Put the nasty error message in config.log where it belongs echo "$DEPS_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= 2.2 + { { echo "$as_me:$LINENO: error: Package requirements ( glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ) were not met: $DEPS_PKG_ERRORS @@ -3472,7 +3490,9 @@ Alternatively, you may set the environment variables DEPS_CFLAGS and DEPS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -echo "$as_me: error: Package requirements (glib-2.0 >= 2.2 +echo "$as_me: error: Package requirements ( glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ) were not met: $DEPS_PKG_ERRORS diff --git a/configure.ac b/configure.ac index e5c2348..52cafc7 100644 --- a/configure.ac +++ b/configure.ac @@ -3,10 +3,10 @@ AC_PREREQ(2.61) AC_INIT(champlain, 0.1, pierre-luc@squidy.info) -AC_CONFIG_SRCDIR([src/champlain.c]) +AC_CONFIG_SRCDIR([src/champlain_widget.h]) AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE AC_LIBTOOL_DLOPEN AC_LIBLTDL_CONVENIENCE @@ -19,7 +19,9 @@ AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) PKG_CHECK_MODULES(DEPS, - glib-2.0 >= 2.2 + [ glib-2.0 >= 2.2, + gobject-2.0 >= 2.0, + gtk+-2.0 >= 2.2 ] ) # Checks for header files. diff --git a/src/Makefile.am b/src/Makefile.am index f0d252c..8c3f541 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ bin_PROGRAMS = champlain -champlain_SOURCES = champlain.c +champlain_SOURCES = champlain_widget.c launcher.c -sofa_LDADD = $(DEPS_LIBS) libsofa.la +champlain_LDADD = $(DEPS_LIBS) AM_CPPFLAGS = $(DEPS_CFLAGS) diff --git a/src/Makefile.in b/src/Makefile.in index 7fd7e20..1c2bd2d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -47,9 +47,10 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_champlain_OBJECTS = champlain.$(OBJEXT) +am_champlain_OBJECTS = champlain_widget.$(OBJEXT) launcher.$(OBJEXT) champlain_OBJECTS = $(am_champlain_OBJECTS) -champlain_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +champlain_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -140,8 +141,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -champlain_SOURCES = champlain.c -sofa_LDADD = $(DEPS_LIBS) libsofa.la +champlain_SOURCES = champlain_widget.c launcher.c +champlain_LDADD = $(DEPS_LIBS) AM_CPPFLAGS = $(DEPS_CFLAGS) all: all-am @@ -209,7 +210,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/champlain.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/champlain_widget.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launcher.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ diff --git a/src/champlain_defines.h b/src/champlain_defines.h new file mode 100644 index 0000000..b0bdc31 --- /dev/null +++ b/src/champlain_defines.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2008 Pierre-Luc Beaudoin + * + * 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; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef CHAMPLAIN_DEFINES_H +#define CHAMPLAIN_DEFINES_H + +#define CHAMPLAIN_API __attribute__((visibility("default"))) +#define CHAMPLAIN_OBSOLETE_API CHAMPLAIN_API __attribute__((deprecated)) + +#endif diff --git a/src/champlain_widget.cpp b/src/champlain_widget.c similarity index 83% rename from src/champlain_widget.cpp rename to src/champlain_widget.c index 74570fc..0d721f8 100644 --- a/src/champlain_widget.cpp +++ b/src/champlain_widget.c @@ -19,17 +19,12 @@ #include "config.h" -#include "champlain.h" +#include "champlain_defines.h" #include "champlain_widget.h" #include - -int main(int argc, char* argv[]) -{ - printf("Hello, world!\n"); - - return 0; -} +#include +#include enum { /* normal signals */ @@ -47,3 +42,12 @@ static guint champlain_widget_signals[LAST_SIGNAL] = { 0, }; G_DEFINE_TYPE(ChamplainWidget, champlain_widget, GTK_TYPE_CONTAINER) +static void +champlain_widget_class_init(ChamplainWidgetClass* champlainWidgetClass) +{ +} + +static void champlain_widget_init(ChamplainWidget* champlainWidget) +{ + +} diff --git a/src/champlain_widget.h b/src/champlain_widget.h index a530d29..9f4af93 100644 --- a/src/champlain_widget.h +++ b/src/champlain_widget.h @@ -17,10 +17,14 @@ * Boston, MA 02110-1301, USA. */ -#ifndef CHAMPLAIN_H -#define CHAMPLAIN_H +#ifndef CHAMPLAIN_WIDGET_H +#define CHAMPLAIN_WIDGET_H + +#include +#include +#include +#include -#include G_BEGIN_DECLS @@ -32,6 +36,8 @@ G_BEGIN_DECLS #define CHAMPLAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), CHAMPLAIN_TYPE_WIDGET, ChamplainWidgetClass)) typedef struct _ChamplainWidgetPrivate ChamplainWidgetPrivate; +typedef struct _ChamplainWidget ChamplainWidget; +typedef struct _ChamplainWidgetClass ChamplainWidgetClass; struct _ChamplainWidget { GtkContainer parent_instance; @@ -50,18 +56,12 @@ struct _ChamplainWidgetClass { void (* copy_clipboard) (ChamplainWidget *widget); void (* paste_clipboard) (ChamplainWidget *widget); - /* - * internal - */ - void (* set_scroll_adjustments) (ChamplainWidget *widget, - GtkAdjustment *hadjustment, - GtkAdjustment *vadjustment); }; CHAMPLAIN_API GType champlain_widget_get_type (void); -CHAMPLAIN_API GtkWidget * +CHAMPLAIN_API ChamplainWidget * champlain_widget_new (void); #endif diff --git a/src/launcher.c b/src/launcher.c new file mode 100644 index 0000000..aee0ccf --- /dev/null +++ b/src/launcher.c @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2008 Pierre-Luc Beaudoin + * + * 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; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include + +int main(int argc, char* argv[]) +{ + printf("Hello, world!\n"); + + return 0; +} + -- 2.39.5