diff options
author | Ted Gould <ted@gould.cx> | 2011-02-10 14:47:52 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-02-10 14:47:52 -0600 |
commit | 18d89929cb035b798916e10a6aa253fd5bcf4e7d (patch) | |
tree | 953e74c6b5755b722efcaa63b70c23890d11418b | |
parent | 41981b1b0cc723c58e515702fc34cfd6bf500ae9 (diff) | |
parent | 23a4650671cb87a0e440b5c4284e437905f768b6 (diff) | |
download | libayatana-appindicator-18d89929cb035b798916e10a6aa253fd5bcf4e7d.tar.gz libayatana-appindicator-18d89929cb035b798916e10a6aa253fd5bcf4e7d.tar.bz2 libayatana-appindicator-18d89929cb035b798916e10a6aa253fd5bcf4e7d.zip |
Import upstream version 0.2.93
48 files changed, 2780 insertions, 181 deletions
@@ -13,6 +13,7 @@ Ken Vandine Ken VanDine Krzysztof Klimonda + Marco Trevisan (Treviño) Michael Terry Neil Jagdish Patel Neil J. Patel @@ -1,5 +1,138 @@ # Generated by Makefile. Do not edit. +2011-02-10 Ted Gould <ted@gould.cx> + + 0.2.93 + +2011-02-10 Ted Gould <ted@gould.cx> + + Ignoring new Vala stuff + +2011-02-10 Ted Gould <ted@gould.cx> + + Being more specific about the types of the signal + +2011-02-10 Ted Gould <ted@gould.cx> + + Fixing Vala bindings + +2011-02-10 Ted Gould <ted@gould.cx> + + Ensuring we don't run the app as part of the test, just build it so this will work in automation. + +2011-02-03 Ted Gould <ted@gould.cx> + + Changing the build to be the check instead of running it as we might not be interactive. + +2011-02-05 Marco Trevisan (Treviño) <mail@3v1n0.net> + + example makefile code cleanup + +2011-02-05 Marco Trevisan (Treviño) <mail@3v1n0.net> + + examples, vala: check for valac + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + examples, added scroll-event demo. + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Merge against new trunk + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Vala simple client, compile workaround improved. + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + simple-client-vala: indentation fixes + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Examples, added simple-client-vala + + A rewrite of the simple-client.c version in Vala as example. + + Added a workaround for compiling it. + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Always check if vapigen is available when building VAPI + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Vala bindings: add metadata as build dependencies, support for gtk3 + +2011-02-04 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Include gir metadata file in built_sources + + Now make distcheck will work ;) + +2011-02-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + vala bindings makefile: just use deps file for dependencies + +2011-02-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Vala example, changed copyright year + +2011-02-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Vala example: indentation fixes + +2011-02-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Vala example: adding copyright message. + +2011-02-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Adding vala bindings and example + + Adding proper support for vala bindings, fixing the include path + Now they are built in the bindings subfolder and they + include a *.deps file. + and I've also added a small example. + +2011-02-03 Ted Gould <ted@gould.cx> + + Support the Scroll method for scroll whell support. + +2011-02-03 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Merge against new trunk + +2011-01-29 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Using the SNI method "Scroll" instead of XAyatanaScrollAction + + The indicator signal will use anyway the same syntax. + +2011-01-27 Marco Trevisan (Treviño) <mail@3v1n0.net> + + app-indicator: don't use two AppIndicator slots, reset one. + +2011-01-27 Marco Trevisan (Treviño) <mail@3v1n0.net> + + app-indicator: remove old debug code. + +2011-01-27 Marco Trevisan (Treviño) <mail@3v1n0.net> + + Updated mono bindings + +2011-01-27 Marco Trevisan (Treviño) <mail@3v1n0.net> + + app-indicator: listen for XAyatanaScrollAction and emit "scroll-event" signal + + libappindicator now when it gets a dbus call from + indicator-application (via the method XAyatanaScrollAction) + about the incoming scroll event, sends a "scroll-event" signal + to the appindicator application using this library. + + This works both in indicator and fallback (systray mode). + This commit includes a fix for bug #707591 + 2011-01-27 Ted Gould <ted@gould.cx> 0.2.92 diff --git a/Makefile.in b/Makefile.in index ea9da11..af96a22 100644 --- a/Makefile.in +++ b/Makefile.in @@ -218,6 +218,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -9361,4 +9361,34 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +# Autoconf support for the Vala compiler + +# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# +# This file 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. + +# serial 4 + +# Check whether the Vala compiler exists in `PATH'. If it is found, the +# variable VALAC is set. Optionally a minimum release number of the +# compiler can be requested. +# +# AM_PROG_VALAC([MINIMUM-VERSION]) +# -------------------------------- +AC_DEFUN([AM_PROG_VALAC], +[AC_PATH_PROG([VALAC], [valac], []) + AS_IF([test -z "$VALAC"], + [AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])], + [AS_IF([test -n "$1"], + [AC_MSG_CHECKING([$VALAC is at least version $1]) + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + AS_VERSION_COMPARE([$1], ["$am__vala_version"], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Vala $1 not found.])])])]) +]) + m4_include([acinclude.m4]) diff --git a/bindings/Makefile.am b/bindings/Makefile.am index f74dec5..8e621e4 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -1,7 +1,10 @@ if USE_GTK3 -SUBDIRS = mono +SUBDIRS = \ + mono \ + vala else SUBDIRS = \ mono \ - python + python \ + vala endif diff --git a/bindings/Makefile.in b/bindings/Makefile.in index 412f0b3..5e4e657 100644 --- a/bindings/Makefile.in +++ b/bindings/Makefile.in @@ -66,7 +66,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = mono python +DIST_SUBDIRS = mono python vala DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -202,6 +202,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -262,9 +263,13 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_GTK3_FALSE@SUBDIRS = \ @USE_GTK3_FALSE@ mono \ -@USE_GTK3_FALSE@ python +@USE_GTK3_FALSE@ python \ +@USE_GTK3_FALSE@ vala + +@USE_GTK3_TRUE@SUBDIRS = \ +@USE_GTK3_TRUE@ mono \ +@USE_GTK3_TRUE@ vala -@USE_GTK3_TRUE@SUBDIRS = mono all: all-recursive .SUFFIXES: diff --git a/bindings/mono/Makefile.in b/bindings/mono/Makefile.in index e048070..f336d0a 100644 --- a/bindings/mono/Makefile.in +++ b/bindings/mono/Makefile.in @@ -230,6 +230,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ diff --git a/bindings/mono/examples/Makefile.in b/bindings/mono/examples/Makefile.in index 42ba853..9ca2648 100644 --- a/bindings/mono/examples/Makefile.in +++ b/bindings/mono/examples/Makefile.in @@ -163,6 +163,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata index ccf58f1..e241ecf 100644 --- a/bindings/mono/libappindicator-api.metadata +++ b/bindings/mono/libappindicator-api.metadata @@ -9,6 +9,8 @@ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="cname">new-label</attr> <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="name">ConnectionChanged</attr> <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr> + <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="name">ScrollEvent</attr> + <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='scroll_event']" name="cname">scroll-event</attr> <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="name">NewIcon</attr> <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="cname">new-icon</attr> <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="name">NewIconThemePath</attr> diff --git a/bindings/mono/libappindicator-api.raw b/bindings/mono/libappindicator-api.raw index 203f141..90e5e84 100644 --- a/bindings/mono/libappindicator-api.raw +++ b/bindings/mono/libappindicator-api.raw @@ -79,6 +79,15 @@ <parameter type="gpointer" name="user_data" /> </parameters> </signal> + <signal when="LAST" field_name="scroll_event"> + <return-type type="void" /> + <parameters> + <parameter type="AppIndicator*" name="indicator" /> + <parameter type="gint" name="delta" /> + <parameter type="GdkScrollDirection" name="direction" /> + <parameter type="gpointer" name="user_data" /> + </parameters> + </signal> <virtual_method name="Fallback" cname="fallback"> <return-type type="GtkStatusIcon*" /> <parameters> diff --git a/bindings/python/Makefile.in b/bindings/python/Makefile.in index 8c45099..a015afd 100644 --- a/bindings/python/Makefile.in +++ b/bindings/python/Makefile.in @@ -227,6 +227,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am new file mode 100644 index 0000000..f80b48c --- /dev/null +++ b/bindings/vala/Makefile.am @@ -0,0 +1,36 @@ +if HAVE_INTROSPECTION +if HAVE_VAPIGEN + +SUBDIRS = . examples + +######################### +# VAPI Files +######################### + +if USE_GTK3 +GTKVAPI = gtk+-3.0 +VER=3 +else +GTKVAPI = gtk+-2.0 +VER= +endif + +vapidir = $(datadir)/vala/vapi +vapiprefix = appindicator$(VER)-0.1 +vapi_DATA = $(vapiprefix).vapi $(vapiprefix).deps +DEPS = $(GTKVAPI) + +$(vapiprefix).deps: + echo $(DEPS) > $@ + +$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ + $(top_builddir)/src/AppIndicator$(VER)-0.1.metadata \ + $(vapiprefix).deps + $(VALA_API_GEN) --library=$(vapiprefix) --girdir=$(srcdir)/src \ + $< + + +CLEANFILES = $(vapi_DATA) + +endif +endif diff --git a/bindings/vala/Makefile.in b/bindings/vala/Makefile.in new file mode 100644 index 0000000..4bb520b --- /dev/null +++ b/bindings/vala/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@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 = bindings/vala +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +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 +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 = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(vapidir)" +DATA = $(vapi_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = . examples +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AL = @AL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPINDICATOR_PYTHON_CFLAGS = @APPINDICATOR_PYTHON_CFLAGS@ +APPINDICATOR_PYTHON_LIBS = @APPINDICATOR_PYTHON_LIBS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSC = @CSC@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GACUTIL = @GACUTIL@ +GAPI_CFLAGS = @GAPI_CFLAGS@ +GAPI_CODEGEN = @GAPI_CODEGEN@ +GAPI_FIXUP = @GAPI_FIXUP@ +GAPI_LIBS = @GAPI_LIBS@ +GAPI_PARSER = @GAPI_PARSER@ +GENERATED_SOURCES = @GENERATED_SOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@ +GTK_SHARP_LIBS = @GTK_SHARP_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRARY_CFLAGS = @LIBRARY_CFLAGS@ +LIBRARY_LIBS = @LIBRARY_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_PREFIX = @LIB_PREFIX@ +LIB_SUFFIX = @LIB_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MONO_DEPENDENCY_CFLAGS = @MONO_DEPENDENCY_CFLAGS@ +MONO_DEPENDENCY_LIBS = @MONO_DEPENDENCY_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NUNIT_CFLAGS = @NUNIT_CFLAGS@ +NUNIT_LIBS = @NUNIT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUNTIME = @RUNTIME@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ +TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ +VALA_API_GEN = @VALA_API_GEN@ +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_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@SUBDIRS = . examples +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@@USE_GTK3_FALSE@GTKVAPI = gtk+-2.0 + +######################### +# VAPI Files +######################### +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@@USE_GTK3_TRUE@GTKVAPI = gtk+-3.0 +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@@USE_GTK3_FALSE@VER = +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@@USE_GTK3_TRUE@VER = 3 +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@vapidir = $(datadir)/vala/vapi +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@vapiprefix = appindicator$(VER)-0.1 +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@vapi_DATA = $(vapiprefix).vapi $(vapiprefix).deps +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@DEPS = $(GTKVAPI) +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@CLEANFILES = $(vapi_DATA) +all: all-recursive + +.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 ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/vala/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu bindings/vala/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 +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-vapiDATA: $(vapi_DATA) + @$(NORMAL_INSTALL) + test -z "$(vapidir)" || $(MKDIR_P) "$(DESTDIR)$(vapidir)" + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vapidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(vapidir)" || exit $$?; \ + done + +uninstall-vapiDATA: + @$(NORMAL_UNINSTALL) + @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(vapidir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(vapidir)" && rm -f $$files + +# 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): + @fail= 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; \ + ($(am__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): + @fail= 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; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + 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 || \ + set "$$@" "$$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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + 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; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__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 "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(vapidir)"; 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: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-vapiDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +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-vapiDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.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 install-vapiDATA \ + 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-vapiDATA + + +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@$(vapiprefix).deps: +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ echo $(DEPS) > $@ + +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@$(vapiprefix).vapi: $(top_builddir)/src/AppIndicator$(VER)-0.1.gir \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(top_builddir)/src/AppIndicator$(VER)-0.1.metadata \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(vapiprefix).deps +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $(VALA_API_GEN) --library=$(vapiprefix) --girdir=$(srcdir)/src \ +@HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ $< + +# 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: diff --git a/bindings/vala/examples/Makefile.am b/bindings/vala/examples/Makefile.am new file mode 100644 index 0000000..32a695b --- /dev/null +++ b/bindings/vala/examples/Makefile.am @@ -0,0 +1,13 @@ + +VALAFILES = indicator-example.vala +CLEANFILES = $(TESTS) *.c +EXTRA_DIST = $(VALAFILES) + +VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps + +if HAVE_VALAC +indicator-example: $(VALAFILES) Makefile.am + $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) + +check: indicator-example +endif diff --git a/bindings/vala/examples/Makefile.in b/bindings/vala/examples/Makefile.in new file mode 100644 index 0000000..3f1ff93 --- /dev/null +++ b/bindings/vala/examples/Makefile.in @@ -0,0 +1,421 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@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 = bindings/vala/examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AL = @AL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +APPINDICATOR_PYTHON_CFLAGS = @APPINDICATOR_PYTHON_CFLAGS@ +APPINDICATOR_PYTHON_LIBS = @APPINDICATOR_PYTHON_LIBS@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CSC = @CSC@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GACUTIL = @GACUTIL@ +GAPI_CFLAGS = @GAPI_CFLAGS@ +GAPI_CODEGEN = @GAPI_CODEGEN@ +GAPI_FIXUP = @GAPI_FIXUP@ +GAPI_LIBS = @GAPI_LIBS@ +GAPI_PARSER = @GAPI_PARSER@ +GENERATED_SOURCES = @GENERATED_SOURCES@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@ +GTK_SHARP_LIBS = @GTK_SHARP_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBRARY_CFLAGS = @LIBRARY_CFLAGS@ +LIBRARY_LIBS = @LIBRARY_LIBS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_PREFIX = @LIB_PREFIX@ +LIB_SUFFIX = @LIB_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MONO_DEPENDENCY_CFLAGS = @MONO_DEPENDENCY_CFLAGS@ +MONO_DEPENDENCY_LIBS = @MONO_DEPENDENCY_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NUNIT_CFLAGS = @NUNIT_CFLAGS@ +NUNIT_LIBS = @NUNIT_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PYGTK_CODEGEN = @PYGTK_CODEGEN@ +PYGTK_DEFSDIR = @PYGTK_DEFSDIR@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RUNTIME = @RUNTIME@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ +TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ +VALA_API_GEN = @VALA_API_GEN@ +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_DUMPBIN = @ac_ct_DUMPBIN@ +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@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +VALAFILES = indicator-example.vala +CLEANFILES = $(TESTS) *.c +EXTRA_DIST = $(VALAFILES) +VALAFLAGS = --pkg appindicator-0.1 --vapidir=$(top_builddir)/bindings/vala --save-temps +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 ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/vala/examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu bindings/vala/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 +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +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 "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$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 +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: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +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: + +.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-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 + + +@HAVE_VALAC_TRUE@indicator-example: $(VALAFILES) Makefile.am +@HAVE_VALAC_TRUE@ $(VALAC) $(VALAFLAGS) $(srcdir)/$(VALAFILES) + +@HAVE_VALAC_TRUE@check: indicator-example + +# 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: diff --git a/bindings/vala/examples/indicator-example.vala b/bindings/vala/examples/indicator-example.vala new file mode 100644 index 0000000..621c962 --- /dev/null +++ b/bindings/vala/examples/indicator-example.vala @@ -0,0 +1,64 @@ +/* + * Copyright 2011 Canonical Ltd. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 3, as published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranties of + * MERCHANTABILITY, SATISFACTORY QUALITY, 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, see <http://www.gnu.org/licenses/>. + * + * Authors: + * Marco Trevisan (Treviño) <mail@3v1n0.net> + */ + +using Gtk; +using AppIndicator; + +public class IndicatorExample { + public static int main(string[] args) { + Gtk.init(ref args); + + var win = new Window(); + win.title = "Indicator Test"; + win.resize(200, 200); + win.destroy.connect(Gtk.main_quit); + + var label = new Label("Hello, world!"); + win.add(label); + + var indicator = new Indicator(win.title, "indicator-messages", + IndicatorCategory.APPLICATION_STATUS); + + indicator.set_status(IndicatorStatus.ACTIVE); + indicator.set_attention_icon("indicator-messages-new"); + + var menu = new Menu(); + + var item = new MenuItem.with_label("Foo"); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + item.show(); + menu.append(item); + + item = new MenuItem.with_label("Bar"); + item.show(); + item.activate.connect(() => { + indicator.set_status(IndicatorStatus.ATTENTION); + }); + menu.append(item); + + indicator.set_menu(menu); + + win.show_all(); + + Gtk.main(); + return 0; + } +} @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for libappindicator 0.2.92. +# Generated by GNU Autoconf 2.67 for libappindicator 0.2.93. # # Report bugs to <ted@canonical.com>. # @@ -679,6 +679,66 @@ fi +as_awk_strverscmp=' + # Use only awk features that work with 7th edition Unix awk (1978). + # My, what an old awk you have, Mr. Solaris! + END { + while (length(v1) && length(v2)) { + # Set d1 to be the next thing to compare from v1, and likewise for d2. + # Normally this is a single character, but if v1 and v2 contain digits, + # compare them as integers and fractions as strverscmp does. + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + # Split v1 and v2 into their leading digit string components d1 and d2, + # and advance v1 and v2 past the leading digit strings. + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) + if (d1 ~ /^0/) { + if (d2 ~ /^0/) { + # Compare two fractions. + while (d1 ~ /^0/ && d2 ~ /^0/) { + d1 = substr(d1, 2); len1-- + d2 = substr(d2, 2); len2-- + } + if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { + # The two components differ in length, and the common prefix + # contains only leading zeros. Consider the longer to be less. + d1 = -len1 + d2 = -len2 + } else { + # Otherwise, compare as strings. + d1 = "x" d1 + d2 = "x" d2 + } + } else { + # A fraction is less than an integer. + exit 1 + } + } else { + if (d2 ~ /^0/) { + # An integer is greater than a fraction. + exit 2 + } else { + # Compare two integers. + d1 += 0 + d2 += 0 + } + } + } else { + # The normal case, without worrying about digits. + d1 = substr(v1, 1, 1); v1 = substr(v1, 2) + d2 = substr(v2, 1, 1); v2 = substr(v2, 2) + } + if (d1 < d2) exit 1 + if (d1 > d2) exit 2 + } + # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), + # which mishandles some comparisons of empty strings to integers. + if (length(v2)) exit 1 + if (length(v1)) exit 2 + } +' test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&1 @@ -703,8 +763,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libappindicator' PACKAGE_TARNAME='libappindicator' -PACKAGE_VERSION='0.2.92' -PACKAGE_STRING='libappindicator 0.2.92' +PACKAGE_VERSION='0.2.93' +PACKAGE_STRING='libappindicator 0.2.93' PACKAGE_BUGREPORT='ted@canonical.com' PACKAGE_URL='' @@ -780,6 +840,11 @@ RUNTIME AL MONO_DEPENDENCY_LIBS MONO_DEPENDENCY_CFLAGS +HAVE_VALAC_FALSE +HAVE_VALAC_TRUE +VALAC +HAVE_VAPIGEN_FALSE +HAVE_VAPIGEN_TRUE VALA_API_GEN INTROSPECTION_TEN_FALSE INTROSPECTION_TEN_TRUE @@ -1516,7 +1581,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libappindicator 0.2.92 to adapt to many kinds of systems. +\`configure' configures libappindicator 0.2.93 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1586,7 +1651,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libappindicator 0.2.92:";; + short | recursive ) echo "Configuration of libappindicator 0.2.93:";; esac cat <<\_ACEOF @@ -1728,7 +1793,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libappindicator configure 0.2.92 +libappindicator configure 0.2.93 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2008,7 +2073,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libappindicator $as_me 0.2.92, which was +It was created by libappindicator $as_me 0.2.93, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2829,7 +2894,7 @@ fi # Define the identity of the package. PACKAGE=libappindicator - VERSION=0.2.92 + VERSION=0.2.93 cat >>confdefs.h <<_ACEOF @@ -5653,13 +5718,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5656: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5721: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5659: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5724: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5662: output\"" >&5) + (eval echo "\"\$as_me:5727: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6864,7 +6929,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6867 "configure"' > conftest.$ac_ext + echo '#line 6932 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8139,11 +8204,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8142: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8207: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8146: \$? = $ac_status" >&5 + echo "$as_me:8211: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8478,11 +8543,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8481: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8546: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8485: \$? = $ac_status" >&5 + echo "$as_me:8550: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8583,11 +8648,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8586: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8651: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8590: \$? = $ac_status" >&5 + echo "$as_me:8655: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8638,11 +8703,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8641: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8706: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8645: \$? = $ac_status" >&5 + echo "$as_me:8710: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11022,7 +11087,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11025 "configure" +#line 11090 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11118,7 +11183,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11121 "configure" +#line 11186 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12348,6 +12413,95 @@ $as_echo "no" >&6; } fi + if test "x$VALA_API_GEN" != "x"; then + HAVE_VAPIGEN_TRUE= + HAVE_VAPIGEN_FALSE='#' +else + HAVE_VAPIGEN_TRUE='#' + HAVE_VAPIGEN_FALSE= +fi + + +########################### +# Vala Compiler support +########################### + +# Extract the first word of "valac", so it can be a program name with args. +set dummy valac; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_VALAC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $VALAC in + [\\/]* | ?:[\\/]*) + ac_cv_path_VALAC="$VALAC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_VALAC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +VALAC=$ac_cv_path_VALAC +if test -n "$VALAC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALAC" >&5 +$as_echo "$VALAC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$VALAC"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Vala compiler found. You will not be able to compile .vala source files." >&5 +$as_echo "$as_me: WARNING: No Vala compiler found. You will not be able to compile .vala source files." >&2;} +else + if test -n "0.11.0"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $VALAC is at least version 0.11.0" >&5 +$as_echo_n "checking $VALAC is at least version 0.11.0... " >&6; } + am__vala_version=`$VALAC --version | sed 's/Vala *//'` + as_arg_v1=0.11.0 +as_arg_v2="$am__vala_version" +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in #( + 1) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 0) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ;; #( + 2) : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Vala 0.11.0 not found." "$LINENO" 5 ;; #( + *) : + ;; +esac +fi +fi + + if test "x$VALAC" != "x"; then + HAVE_VALAC_TRUE= + HAVE_VALAC_FALSE='#' +else + HAVE_VALAC_TRUE='#' + HAVE_VALAC_FALSE= +fi + ########################### # Check for Mono support @@ -13394,7 +13548,7 @@ $as_echo "$PYGTK_CODEGEN" >&6; } # Files ########################### -ac_config_files="$ac_config_files Makefile src/Makefile src/appindicator-0.1.pc src/appindicator3-0.1.pc bindings/Makefile bindings/mono/Makefile bindings/mono/appindicator-sharp.dll.config bindings/mono/appindicator-sharp-0.1.pc bindings/mono/examples/Makefile bindings/mono/examples/indicator-example bindings/python/Makefile tests/Makefile example/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml docs/reference/libappindicator-docs.sgml" +ac_config_files="$ac_config_files Makefile src/Makefile src/appindicator-0.1.pc src/appindicator3-0.1.pc bindings/Makefile bindings/mono/Makefile bindings/mono/appindicator-sharp.dll.config bindings/mono/appindicator-sharp-0.1.pc bindings/mono/examples/Makefile bindings/mono/examples/indicator-example bindings/python/Makefile bindings/vala/Makefile bindings/vala/examples/Makefile tests/Makefile example/Makefile docs/Makefile docs/reference/Makefile docs/reference/version.xml docs/reference/libappindicator-docs.sgml" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -13550,6 +13704,14 @@ if test -z "${INTROSPECTION_TEN_TRUE}" && test -z "${INTROSPECTION_TEN_FALSE}"; as_fn_error $? "conditional \"INTROSPECTION_TEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_VAPIGEN_TRUE}" && test -z "${HAVE_VAPIGEN_FALSE}"; then + as_fn_error $? "conditional \"HAVE_VAPIGEN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_VALAC_TRUE}" && test -z "${HAVE_VALAC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_VALAC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 @@ -13958,7 +14120,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libappindicator $as_me 0.2.92, which was +This file was extended by libappindicator $as_me 0.2.93, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14024,7 +14186,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libappindicator config.status 0.2.92 +libappindicator config.status 0.2.93 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" @@ -14422,6 +14584,8 @@ do "bindings/mono/examples/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/mono/examples/Makefile" ;; "bindings/mono/examples/indicator-example") CONFIG_FILES="$CONFIG_FILES bindings/mono/examples/indicator-example" ;; "bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/python/Makefile" ;; + "bindings/vala/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/vala/Makefile" ;; + "bindings/vala/examples/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/vala/examples/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "example/Makefile") CONFIG_FILES="$CONFIG_FILES example/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; diff --git a/configure.ac b/configure.ac index 6f78786..24ef4e8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libappindicator, 0.2.92, ted@canonical.com) +AC_INIT(libappindicator, 0.2.93, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libappindicator, 0.2.92) +AM_INIT_AUTOMAKE(libappindicator, 0.2.93) AM_MAINTAINER_MODE @@ -94,6 +94,14 @@ AM_CONDITIONAL(INTROSPECTION_TEN, [test "x$introspection_ten" = "xyes"]) ########################### AC_PATH_PROG([VALA_API_GEN], [vapigen]) +AM_CONDITIONAL(HAVE_VAPIGEN, [test "x$VALA_API_GEN" != "x"]) + +########################### +# Vala Compiler support +########################### + +AM_PROG_VALAC([0.11.0]) +AM_CONDITIONAL(HAVE_VALAC, [test "x$VALAC" != "x"]) ########################### # Check for Mono support @@ -205,6 +213,8 @@ bindings/mono/appindicator-sharp-0.1.pc bindings/mono/examples/Makefile bindings/mono/examples/indicator-example bindings/python/Makefile +bindings/vala/Makefile +bindings/vala/examples/Makefile tests/Makefile example/Makefile docs/Makefile diff --git a/docs/Makefile.in b/docs/Makefile.in index 5e6aaeb..b965fc0 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -202,6 +202,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ diff --git a/docs/reference/Makefile.in b/docs/reference/Makefile.in index f809aeb..68ce90e 100644 --- a/docs/reference/Makefile.in +++ b/docs/reference/Makefile.in @@ -172,6 +172,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ diff --git a/docs/reference/html/api-index-full.html b/docs/reference/html/api-index-full.html index bf26947..c502c09 100644 --- a/docs/reference/html/api-index-full.html +++ b/docs/reference/html/api-index-full.html @@ -58,6 +58,10 @@ </dt> <dd></dd> <dt> +<a class="link" href="libappindicator-app-indicator.html#AppIndicator-scroll-event" title='The "scroll-event" signal'>AppIndicator::scroll-event</a>, object signal in <a class="link" href="libappindicator-app-indicator.html" title="AppIndicator">AppIndicator</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libappindicator-app-indicator.html#AppIndicator--attention-icon-name" title='The "attention-icon-name" property'>AppIndicator:attention-icon-name</a>, object property in <a class="link" href="libappindicator-app-indicator.html" title="AppIndicator">AppIndicator</a> </dt> <dd></dd> diff --git a/docs/reference/html/ch01.html b/docs/reference/html/ch01.html index 296ad61..a07db28 100644 --- a/docs/reference/html/ch01.html +++ b/docs/reference/html/ch01.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter"> <div class="titlepage"><div><div><h2 class="title"> -<a name="id348207"></a>Base Classes for Applications</h2></div></div></div> +<a name="id456819"></a>Base Classes for Applications</h2></div></div></div> <div class="toc"><dl><dt> <span class="refentrytitle"><a href="libappindicator-app-indicator.html">AppIndicator</a></span><span class="refpurpose"> — An object to put application information into the panel.</span> diff --git a/docs/reference/html/index.html b/docs/reference/html/index.html index 5fb3699..addc62c 100644 --- a/docs/reference/html/index.html +++ b/docs/reference/html/index.html @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libappindicator Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libappindicator 0.2.91.1 + for libappindicator 0.2.93 </p></div> </div> <hr> diff --git a/docs/reference/html/index.sgml b/docs/reference/html/index.sgml index b0a0a95..03e5962 100644 --- a/docs/reference/html/index.sgml +++ b/docs/reference/html/index.sgml @@ -72,3 +72,4 @@ <ANCHOR id="AppIndicator-new-icon-theme-path" href="libappindicator/libappindicator-app-indicator.html#AppIndicator-new-icon-theme-path"> <ANCHOR id="AppIndicator-new-label" href="libappindicator/libappindicator-app-indicator.html#AppIndicator-new-label"> <ANCHOR id="AppIndicator-new-status" href="libappindicator/libappindicator-app-indicator.html#AppIndicator-new-status"> +<ANCHOR id="AppIndicator-scroll-event" href="libappindicator/libappindicator-app-indicator.html#AppIndicator-scroll-event"> diff --git a/docs/reference/html/libappindicator-app-indicator.html b/docs/reference/html/libappindicator-app-indicator.html index b82dd98..f229c14 100644 --- a/docs/reference/html/libappindicator-app-indicator.html +++ b/docs/reference/html/libappindicator-app-indicator.html @@ -81,7 +81,7 @@ struct <a class="link" href="libappindicator-app-indicator.html#App <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-attention-icon" title="app_indicator_set_attention_icon ()">app_indicator_set_attention_icon</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-menu" title="app_indicator_set_menu ()">app_indicator_set_menu</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>); + <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-icon" title="app_indicator_set_icon ()">app_indicator_set_icon</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>); <span class="returnvalue">void</span> <a class="link" href="libappindicator-app-indicator.html#app-indicator-set-icon-theme-path" title="app_indicator_set_icon_theme_path ()">app_indicator_set_icon_theme_path</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, @@ -99,7 +99,7 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.htm (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-attention-icon" title="app_indicator_get_attention_icon ()">app_indicator_get_attention_icon</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); -<a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-menu" title="app_indicator_get_menu ()">app_indicator_get_menu</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); +<a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-menu" title="app_indicator_get_menu ()">app_indicator_get_menu</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-label" title="app_indicator_get_label ()">app_indicator_get_label</a> (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>); const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libappindicator-app-indicator.html#app-indicator-get-label-guide" title="app_indicator_get_label_guide ()">app_indicator_get_label_guide</a> @@ -143,6 +143,7 @@ const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.htm "<a class="link" href="libappindicator-app-indicator.html#AppIndicator-new-icon-theme-path" title='The "new-icon-theme-path" signal'>new-icon-theme-path</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a> "<a class="link" href="libappindicator-app-indicator.html#AppIndicator-new-label" title='The "new-label" signal'>new-label</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a> "<a class="link" href="libappindicator-app-indicator.html#AppIndicator-new-status" title='The "new-status" signal'>new-status</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a> + "<a class="link" href="libappindicator-app-indicator.html#AppIndicator-scroll-event" title='The "scroll-event" signal'>scroll-event</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a> </pre> </div> <div class="refsect1"> @@ -432,7 +433,12 @@ A application indicator represents the values that are needed to show a void (* connection_changed) (AppIndicator * indicator, gboolean connected, gpointer user_data); - void (*app_indicator_reserved_sw)(void); + + void (* scroll_event) (AppIndicator * indicator, + gint delta, + GdkScrollDirection direction, + gpointer user_data); + void (*app_indicator_reserved_ats)(void); /* Overridable Functions */ @@ -486,8 +492,8 @@ The signals and external functions that make up the <a class="link" href="libapp <td>Slot for <a class="link" href="libappindicator-app-indicator.html#AppIndicator-connection-changed" title='The "connection-changed" signal'><span class="type">"connection-changed"</span></a>.</td> </tr> <tr> -<td><p><span class="term"><em class="structfield"><code><a name="AppIndicatorClass.app-indicator-reserved-sw"></a>app_indicator_reserved_sw</code></em> ()</span></p></td> -<td>Reserved for future use.</td> +<td><p><span class="term"><em class="structfield"><code><a name="AppIndicatorClass.scroll-event"></a>scroll_event</code></em> ()</span></p></td> +<td></td> </tr> <tr> <td><p><span class="term"><em class="structfield"><code><a name="AppIndicatorClass.app-indicator-reserved-ats"></a>app_indicator_reserved_ats</code></em> ()</span></p></td> @@ -495,7 +501,7 @@ The signals and external functions that make up the <a class="link" href="libapp </tr> <tr> <td><p><span class="term"><em class="structfield"><code><a name="AppIndicatorClass.fallback"></a>fallback</code></em> ()</span></p></td> -<td>Function that gets called to make a <a href="http://library.gnome.org/devel/gtk/unstable/GtkStatusIcon.html"><span class="type">GtkStatusIcon</span></a> when +<td>Function that gets called to make a <a href="http://library.gnome.org/devel/gtk/2.22/GtkStatusIcon.html"><span class="type">GtkStatusIcon</span></a> when there is no Application Indicator area available.</td> </tr> <tr> @@ -666,7 +672,7 @@ Wrapper function for property <a class="link" href="libappindicator-app-indicato <div class="refsect2"> <a name="app-indicator-set-menu"></a><h3>app_indicator_set_menu ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> app_indicator_set_menu (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>, - <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>);</pre> + <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>);</pre> <p> Sets the menu that should be shown when the Application Indicator is clicked on in the panel. An application indicator will not @@ -684,7 +690,7 @@ Sets the menu that should be shown when the Application Indicator </tr> <tr> <td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> to set</td> +<td>A <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="type">GtkMenu</span></a> to set</td> </tr> </tbody> </table></div> @@ -924,7 +930,7 @@ Wrapper function for property <a class="link" href="libappindicator-app-indicato <hr> <div class="refsect2"> <a name="app-indicator-get-menu"></a><h3>app_indicator_get_menu ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * app_indicator_get_menu (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>);</pre> +<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="returnvalue">GtkMenu</span></a> * app_indicator_get_menu (<em class="parameter"><code><a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *self</code></em>);</pre> <p> Gets the menu being used for this application indicator. Wrapper function for property <span class="type">"menu"</span>. @@ -938,7 +944,7 @@ Gets the menu being used for this application indicator. </tr> <tr> <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>A <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if one hasn't been set.</td> +<td>A <a href="http://library.gnome.org/devel/gtk/2.22/GtkMenu.html"><span class="type">GtkMenu</span></a> object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if one hasn't been set.</td> </tr> </tbody> </table></div> @@ -1319,6 +1325,39 @@ Emitted when <a class="link" href="libappindicator-app-indicator.html#AppIndicat </tbody> </table></div> </div> +<hr> +<div class="refsect2"> +<a name="AppIndicator-scroll-event"></a><h3>The <code class="literal">"scroll-event"</code> signal</h3> +<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> *arg0, + <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> arg1, + <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg2, + <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre> +<p> +Signaled when there is a new icon set for the + object. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>arg0</code></em> :</span></p></td> +<td>The <a class="link" href="libappindicator-app-indicator.html#AppIndicator"><span class="type">AppIndicator</span></a> object</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td> +<td>How many steps the scroll wheel has taken</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>arg2</code></em> :</span></p></td> +<td>(type Gdk.ScrollDirection) Which direction the wheel went in</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> +<td>user data set when the signal handler was connected.</td> +</tr> +</tbody> +</table></div> +</div> </div> </div> <div class="footer"> diff --git a/docs/reference/html/libappindicator.devhelp b/docs/reference/html/libappindicator.devhelp index 9016c72..593c4d5 100644 --- a/docs/reference/html/libappindicator.devhelp +++ b/docs/reference/html/libappindicator.devhelp @@ -64,5 +64,6 @@ <function name="The "new-icon-theme-path" signal" link="libappindicator-app-indicator.html#AppIndicator-new-icon-theme-path"/> <function name="The "new-label" signal" link="libappindicator-app-indicator.html#AppIndicator-new-label"/> <function name="The "new-status" signal" link="libappindicator-app-indicator.html#AppIndicator-new-status"/> + <function name="The "scroll-event" signal" link="libappindicator-app-indicator.html#AppIndicator-scroll-event"/> </functions> </book> diff --git a/docs/reference/html/libappindicator.devhelp2 b/docs/reference/html/libappindicator.devhelp2 index ab1ddcb..52a12d7 100644 --- a/docs/reference/html/libappindicator.devhelp2 +++ b/docs/reference/html/libappindicator.devhelp2 @@ -64,6 +64,7 @@ <keyword type="signal" name="The "new-icon-theme-path" signal" link="libappindicator-app-indicator.html#AppIndicator-new-icon-theme-path"/> <keyword type="signal" name="The "new-label" signal" link="libappindicator-app-indicator.html#AppIndicator-new-label"/> <keyword type="signal" name="The "new-status" signal" link="libappindicator-app-indicator.html#AppIndicator-new-status"/> + <keyword type="signal" name="The "scroll-event" signal" link="libappindicator-app-indicator.html#AppIndicator-scroll-event"/> <keyword type="constant" name="APP_INDICATOR_CATEGORY_APPLICATION_STATUS" link="libappindicator-app-indicator.html#APP-INDICATOR-CATEGORY-APPLICATION-STATUS:CAPS"/> <keyword type="constant" name="APP_INDICATOR_CATEGORY_COMMUNICATIONS" link="libappindicator-app-indicator.html#APP-INDICATOR-CATEGORY-COMMUNICATIONS:CAPS"/> <keyword type="constant" name="APP_INDICATOR_CATEGORY_SYSTEM_SERVICES" link="libappindicator-app-indicator.html#APP-INDICATOR-CATEGORY-SYSTEM-SERVICES:CAPS"/> diff --git a/docs/reference/libappindicator-docs.sgml b/docs/reference/libappindicator-docs.sgml index b10890d..999432e 100644 --- a/docs/reference/libappindicator-docs.sgml +++ b/docs/reference/libappindicator-docs.sgml @@ -8,7 +8,7 @@ <bookinfo> <title>libappindicator Reference Manual</title> <releaseinfo> - for libappindicator 0.2.92 + for libappindicator 0.2.93 </releaseinfo> </bookinfo> diff --git a/docs/reference/tmpl/app-indicator.sgml b/docs/reference/tmpl/app-indicator.sgml index 0b3bb8a..1f102ef 100644 --- a/docs/reference/tmpl/app-indicator.sgml +++ b/docs/reference/tmpl/app-indicator.sgml @@ -188,6 +188,15 @@ AppIndicator @appindicator: the object which received the signal. @arg1: +<!-- ##### SIGNAL AppIndicator::scroll-event ##### --> +<para> + +</para> + +@appindicator: the object which received the signal. +@arg1: +@arg2: + <!-- ##### ARG AppIndicator:attention-icon-name ##### --> <para> @@ -255,7 +264,7 @@ AppIndicator @new_icon_theme_path: @new_label: @connection_changed: -@app_indicator_reserved_sw: +@scroll_event: @app_indicator_reserved_ats: @fallback: @unfallback: diff --git a/docs/reference/version.xml b/docs/reference/version.xml index 1b27b49..b50a1f4 100644 --- a/docs/reference/version.xml +++ b/docs/reference/version.xml @@ -1 +1 @@ -0.2.92 +0.2.93 diff --git a/docs/reference/xml/api-index-full.xml b/docs/reference/xml/api-index-full.xml index 84a6606..0108a0a 100644 --- a/docs/reference/xml/api-index-full.xml +++ b/docs/reference/xml/api-index-full.xml @@ -14,6 +14,7 @@ <indexentry><primaryie linkends="AppIndicator-new-icon-theme-path"><link linkend="AppIndicator-new-icon-theme-path">AppIndicator::new-icon-theme-path</link>, object signal in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> <indexentry><primaryie linkends="AppIndicator-new-label"><link linkend="AppIndicator-new-label">AppIndicator::new-label</link>, object signal in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> <indexentry><primaryie linkends="AppIndicator-new-status"><link linkend="AppIndicator-new-status">AppIndicator::new-status</link>, object signal in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> +<indexentry><primaryie linkends="AppIndicator-scroll-event"><link linkend="AppIndicator-scroll-event">AppIndicator::scroll-event</link>, object signal in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> <indexentry><primaryie linkends="AppIndicator--attention-icon-name"><link linkend="AppIndicator--attention-icon-name">AppIndicator:attention-icon-name</link>, object property in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> <indexentry><primaryie linkends="AppIndicator--category"><link linkend="AppIndicator--category">AppIndicator:category</link>, object property in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> <indexentry><primaryie linkends="AppIndicator--connected"><link linkend="AppIndicator--connected">AppIndicator:connected</link>, object property in <link linkend="libappindicator-app-indicator">AppIndicator</link></primaryie></indexentry> diff --git a/docs/reference/xml/app-indicator.xml b/docs/reference/xml/app-indicator.xml index 16b6969..3046b42 100644 --- a/docs/reference/xml/app-indicator.xml +++ b/docs/reference/xml/app-indicator.xml @@ -120,6 +120,7 @@ const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> * "<link linkend="AppIndicator-new-icon-theme-path">new-icon-theme-path</link>" : <link linkend="G-SIGNAL-RUN-LAST:CAPS"><literal>Run Last</literal></link> "<link linkend="AppIndicator-new-label">new-label</link>" : <link linkend="G-SIGNAL-RUN-LAST:CAPS"><literal>Run Last</literal></link> "<link linkend="AppIndicator-new-status">new-status</link>" : <link linkend="G-SIGNAL-RUN-LAST:CAPS"><literal>Run Last</literal></link> + "<link linkend="AppIndicator-scroll-event">scroll-event</link>" : <link linkend="G-SIGNAL-RUN-LAST:CAPS"><literal>Run Last</literal></link> </synopsis> </refsect1> @@ -366,7 +367,12 @@ A application indicator represents the values that are needed to show a void (* connection_changed) (AppIndicator * indicator, gboolean connected, gpointer user_data); - void (*app_indicator_reserved_sw)(void); + + void (* scroll_event) (AppIndicator * indicator, + gint delta, + GdkScrollDirection direction, + gpointer user_data); + void (*app_indicator_reserved_ats)(void); /* Overridable Functions */ @@ -408,8 +414,8 @@ The signals and external functions that make up the <link linkend="AppIndicator" <varlistentry><term><structfield id="AppIndicatorClass.connection-changed">connection_changed</structfield> ()</term> <listitem><simpara>Slot for <link linkend="AppIndicator-connection-changed"><type>"connection-changed"</type></link>.</simpara></listitem> </varlistentry> -<varlistentry><term><structfield id="AppIndicatorClass.app-indicator-reserved-sw">app_indicator_reserved_sw</structfield> ()</term> -<listitem><simpara>Reserved for future use.</simpara></listitem> +<varlistentry><term><structfield id="AppIndicatorClass.scroll-event">scroll_event</structfield> ()</term> +<listitem><simpara></simpara></listitem> </varlistentry> <varlistentry><term><structfield id="AppIndicatorClass.app-indicator-reserved-ats">app_indicator_reserved_ats</structfield> ()</term> <listitem><simpara>Reserved for future use.</simpara></listitem> @@ -924,6 +930,24 @@ Emitted when <link linkend="AppIndicator--status"><type>"status"</type></link> i <listitem><simpara>The string value of the <link linkend="AppIndicatorStatus"><type>AppIndicatorStatus</type></link> enum.</simpara></listitem></varlistentry> <varlistentry><term><parameter>user_data</parameter> :</term> <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry> +</variablelist></refsect2><refsect2 id="AppIndicator-scroll-event" role="signal"><title>The <literal>"scroll-event"</literal> signal</title> +<indexterm zone="AppIndicator-scroll-event"><primary>AppIndicator::scroll-event</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> user_function (<link linkend="AppIndicator"><type>AppIndicator</type></link> *arg0, + <link linkend="gint"><type>gint</type></link> arg1, + <link linkend="guint"><type>guint</type></link> arg2, + <link linkend="gpointer"><type>gpointer</type></link> user_data) : <link linkend="G-SIGNAL-RUN-LAST:CAPS"><literal>Run Last</literal></link></programlisting> +<para> +Signaled when there is a new icon set for the + object. +</para><variablelist role="params"> +<varlistentry><term><parameter>arg0</parameter> :</term> +<listitem><simpara>The <link linkend="AppIndicator"><type>AppIndicator</type></link> object</simpara></listitem></varlistentry> +<varlistentry><term><parameter>arg1</parameter> :</term> +<listitem><simpara>How many steps the scroll wheel has taken</simpara></listitem></varlistentry> +<varlistentry><term><parameter>arg2</parameter> :</term> +<listitem><simpara>(type Gdk.ScrollDirection) Which direction the wheel went in</simpara></listitem></varlistentry> +<varlistentry><term><parameter>user_data</parameter> :</term> +<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry> </variablelist></refsect2> </refsect1> diff --git a/example/Makefile.am b/example/Makefile.am index 0900baf..606317c 100644 --- a/example/Makefile.am +++ b/example/Makefile.am @@ -4,9 +4,11 @@ else VER= endif +CLEANFILES = check_PROGRAMS = \ - simple-client + simple-client \ + simple-client-vala ######################################### ## simple-client @@ -27,3 +29,28 @@ simple_client_LDADD = \ EXTRA_DIST = \ simple-client-test-icon.png + +######################################### +## simple-client-vala +######################################### +if HAVE_VALAC + +VALAFLAGS = \ + --pkg appindicator$(VER)-0.1 \ + --vapidir=$(top_builddir)/bindings/vala + +BUILT_SOURCES = simple-client-vala.c +simple-client-vala.c: $(srcdir)/simple-client-vala.vala + $(VALAC) $(VALAFLAGS) -C $< -o $@ + $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@ + +simple_client_vala_SOURCES = simple-client-vala.c +simple_client_vala_CFLAGS = \ + $(simple_client_CFLAGS) \ + -include $(top_srcdir)/src/app-indicator.h + +simple_client_vala_LDADD = $(simple_client_LDADD) + +CLEANFILES += *.stamp *-vala.c + +endif diff --git a/example/Makefile.in b/example/Makefile.in index f99848d..c848ea3 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -33,7 +33,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = simple-client$(EXEEXT) +check_PROGRAMS = simple-client$(EXEEXT) simple-client-vala$(EXEEXT) +@HAVE_VALAC_TRUE@am__append_1 = *.stamp *-vala.c subdir = example DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -56,6 +57,17 @@ am__v_lt_0 = --silent simple_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(simple_client_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__simple_client_vala_SOURCES_DIST = simple-client-vala.c +@HAVE_VALAC_TRUE@am_simple_client_vala_OBJECTS = simple_client_vala-simple-client-vala.$(OBJEXT) +simple_client_vala_OBJECTS = $(am_simple_client_vala_OBJECTS) +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ + $(top_builddir)/src/libappindicator$(VER).la +@HAVE_VALAC_TRUE@simple_client_vala_DEPENDENCIES = \ +@HAVE_VALAC_TRUE@ $(am__DEPENDENCIES_2) +simple_client_vala_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(simple_client_vala_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -82,8 +94,9 @@ am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(simple_client_SOURCES) -DIST_SOURCES = $(simple_client_SOURCES) +SOURCES = $(simple_client_SOURCES) $(simple_client_vala_SOURCES) +DIST_SOURCES = $(simple_client_SOURCES) \ + $(am__simple_client_vala_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -196,6 +209,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -256,6 +270,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_GTK3_FALSE@VER = @USE_GTK3_TRUE@VER = 3 +CLEANFILES = $(am__append_1) ######################################### ######################################### @@ -275,7 +290,22 @@ simple_client_LDADD = \ EXTRA_DIST = \ simple-client-test-icon.png -all: all-am + +######################################### +######################################### +@HAVE_VALAC_TRUE@VALAFLAGS = \ +@HAVE_VALAC_TRUE@ --pkg appindicator$(VER)-0.1 \ +@HAVE_VALAC_TRUE@ --vapidir=$(top_builddir)/bindings/vala + +@HAVE_VALAC_TRUE@BUILT_SOURCES = simple-client-vala.c +@HAVE_VALAC_TRUE@simple_client_vala_SOURCES = simple-client-vala.c +@HAVE_VALAC_TRUE@simple_client_vala_CFLAGS = \ +@HAVE_VALAC_TRUE@ $(simple_client_CFLAGS) \ +@HAVE_VALAC_TRUE@ -include $(top_srcdir)/src/app-indicator.h + +@HAVE_VALAC_TRUE@simple_client_vala_LDADD = $(simple_client_LDADD) +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -321,6 +351,9 @@ clean-checkPROGRAMS: simple-client$(EXEEXT): $(simple_client_OBJECTS) $(simple_client_DEPENDENCIES) @rm -f simple-client$(EXEEXT) $(AM_V_CCLD)$(simple_client_LINK) $(simple_client_OBJECTS) $(simple_client_LDADD) $(LIBS) +simple-client-vala$(EXEEXT): $(simple_client_vala_OBJECTS) $(simple_client_vala_DEPENDENCIES) + @rm -f simple-client-vala$(EXEEXT) + $(AM_V_CCLD)$(simple_client_vala_LINK) $(simple_client_vala_OBJECTS) $(simple_client_vala_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -329,6 +362,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_client-simple-client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_client_vala-simple-client-vala.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -370,6 +404,22 @@ simple_client-simple-client.obj: simple-client.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_CFLAGS) $(CFLAGS) -c -o simple_client-simple-client.obj `if test -f 'simple-client.c'; then $(CYGPATH_W) 'simple-client.c'; else $(CYGPATH_W) '$(srcdir)/simple-client.c'; fi` +simple_client_vala-simple-client-vala.o: simple-client-vala.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_vala_CFLAGS) $(CFLAGS) -MT simple_client_vala-simple-client-vala.o -MD -MP -MF $(DEPDIR)/simple_client_vala-simple-client-vala.Tpo -c -o simple_client_vala-simple-client-vala.o `test -f 'simple-client-vala.c' || echo '$(srcdir)/'`simple-client-vala.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_client_vala-simple-client-vala.Tpo $(DEPDIR)/simple_client_vala-simple-client-vala.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple-client-vala.c' object='simple_client_vala-simple-client-vala.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_vala_CFLAGS) $(CFLAGS) -c -o simple_client_vala-simple-client-vala.o `test -f 'simple-client-vala.c' || echo '$(srcdir)/'`simple-client-vala.c + +simple_client_vala-simple-client-vala.obj: simple-client-vala.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_vala_CFLAGS) $(CFLAGS) -MT simple_client_vala-simple-client-vala.obj -MD -MP -MF $(DEPDIR)/simple_client_vala-simple-client-vala.Tpo -c -o simple_client_vala-simple-client-vala.obj `if test -f 'simple-client-vala.c'; then $(CYGPATH_W) 'simple-client-vala.c'; else $(CYGPATH_W) '$(srcdir)/simple-client-vala.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_client_vala-simple-client-vala.Tpo $(DEPDIR)/simple_client_vala-simple-client-vala.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple-client-vala.c' object='simple_client_vala-simple-client-vala.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_vala_CFLAGS) $(CFLAGS) -c -o simple_client_vala-simple-client-vala.obj `if test -f 'simple-client-vala.c'; then $(CYGPATH_W) 'simple-client-vala.c'; else $(CYGPATH_W) '$(srcdir)/simple-client-vala.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -460,10 +510,12 @@ distdir: $(DISTFILES) done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile installdirs: -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -480,6 +532,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -488,6 +541,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ @@ -559,7 +613,7 @@ ps-am: uninstall-am: -.MAKE: check-am install-am install-strip +.MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ @@ -575,6 +629,9 @@ uninstall-am: mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am +@HAVE_VALAC_TRUE@simple-client-vala.c: $(srcdir)/simple-client-vala.vala +@HAVE_VALAC_TRUE@ $(VALAC) $(VALAFLAGS) -C $< -o $@ +@HAVE_VALAC_TRUE@ $(SED) -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" $@ # 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. diff --git a/example/simple-client-vala.c b/example/simple-client-vala.c new file mode 100644 index 0000000..0053429 --- /dev/null +++ b/example/simple-client-vala.c @@ -0,0 +1,738 @@ +/* simple-client-vala.c generated by valac 0.11.5, the Vala compiler + * generated from simple-client-vala.vala, do not modify */ + +/* +A small piece of sample code demonstrating a very simple application +with an indicator. + +Copyright 2011 Canonical Ltd. + +Authors: + Marco Trevisan <mail@3v1n0.net> + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License version 3, as published +by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY, 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, see <http://www.gnu.org/licenses/>. +*/ + +#include <glib.h> +#include <glib-object.h> +#include <stdlib.h> +#include <string.h> +#include <gtk/gtk.h> + +#include <gobject/gvaluecollector.h> + + +#define TYPE_SIMPLE_CLIENT (simple_client_get_type ()) +#define SIMPLE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SIMPLE_CLIENT, SimpleClient)) +#define SIMPLE_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SIMPLE_CLIENT, SimpleClientClass)) +#define IS_SIMPLE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SIMPLE_CLIENT)) +#define IS_SIMPLE_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SIMPLE_CLIENT)) +#define SIMPLE_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SIMPLE_CLIENT, SimpleClientClass)) + +typedef struct _SimpleClient SimpleClient; +typedef struct _SimpleClientClass SimpleClientClass; +#define _simple_client_unref0(var) ((var == NULL) ? NULL : (var = (simple_client_unref (var), NULL))) +typedef struct _SimpleClientPrivate SimpleClientPrivate; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) +typedef struct _Block1Data Block1Data; +typedef struct _Block2Data Block2Data; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define __g_slist_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_slist_free__g_object_unref0_ (var), NULL))) +typedef struct _ParamSpecSimpleClient ParamSpecSimpleClient; + +struct _SimpleClient { + GTypeInstance parent_instance; + volatile int ref_count; + SimpleClientPrivate * priv; +}; + +struct _SimpleClientClass { + GTypeClass parent_class; + void (*finalize) (SimpleClient *self); +}; + +struct _SimpleClientPrivate { + GtkMenu* menu; + AppIndicator* ci; + gint percentage; + gboolean active; + gboolean can_haz_label; +}; + +struct _Block1Data { + int _ref_count_; + SimpleClient * self; + GtkMenuItem* prev_mi; +}; + +struct _Block2Data { + int _ref_count_; + SimpleClient * self; + GtkMenuItem* submenu; + GtkImageMenuItem* imgitem; + GtkMenuItem* att; + GtkMenuItem* show; + GtkCheckMenuItem* icon; +}; + +struct _ParamSpecSimpleClient { + GParamSpec parent_instance; +}; + + +static gpointer simple_client_parent_class = NULL; + +gint _vala_main (gchar** args, int args_length1); +SimpleClient* simple_client_new (gchar** args, int args_length1); +SimpleClient* simple_client_construct (GType object_type, gchar** args, int args_length1); +gpointer simple_client_ref (gpointer instance); +void simple_client_unref (gpointer instance); +GParamSpec* param_spec_simple_client (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); +void value_set_simple_client (GValue* value, gpointer v_object); +void value_take_simple_client (GValue* value, gpointer v_object); +gpointer value_get_simple_client (const GValue* value); +GType simple_client_get_type (void) G_GNUC_CONST; +void simple_client_run (SimpleClient* self); +#define SIMPLE_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SIMPLE_CLIENT, SimpleClientPrivate)) +enum { + SIMPLE_CLIENT_DUMMY_PROPERTY +}; +static void simple_client_toggle_sensitivity (SimpleClient* self, GtkWidget* widget); +static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item); +static Block1Data* block1_data_ref (Block1Data* _data1_); +static void block1_data_unref (Block1Data* _data1_); +static void _lambda0_ (SimpleClient* self); +static void __lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda1_ (Block1Data* _data1_); +static void __lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda2_ (SimpleClient* self); +static void __lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void simple_client_label_toggle (SimpleClient* self, GtkMenuItem* item); +static Block2Data* block2_data_ref (Block2Data* _data2_); +static void block2_data_unref (Block2Data* _data2_); +static void _lambda3_ (gint delta, guint direction, SimpleClient* self); +static void __lambda3__app_indicator_scroll_event (AppIndicator* _sender, gint indicator, guint delta, gpointer self); +static gboolean _lambda4_ (SimpleClient* self); +static gboolean __lambda4__gsource_func (gpointer self); +static void _lambda5_ (SimpleClient* self); +static void __lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _g_object_unref0_ (gpointer var); +static void _g_slist_free__g_object_unref0_ (GSList* self); +static void _lambda6_ (SimpleClient* self); +static void __lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda7_ (Block2Data* _data2_); +static void __lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda8_ (Block2Data* _data2_); +static void __lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda9_ (Block2Data* _data2_); +static void __lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda10_ (Block2Data* _data2_); +static void __lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void _lambda11_ (Block2Data* _data2_); +static void __lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); +static void simple_client_finalize (SimpleClient* obj); + + +gint _vala_main (gchar** args, int args_length1) { + gint result = 0; + SimpleClient* _tmp0_ = NULL; + SimpleClient* sc; + _tmp0_ = simple_client_new (args, args_length1); + sc = _tmp0_; + simple_client_run (sc); + result = 0; + _simple_client_unref0 (sc); + return result; +} + + +int main (int argc, char ** argv) { + g_type_init (); + return _vala_main (argv, argc); +} + + +SimpleClient* simple_client_construct (GType object_type, gchar** args, int args_length1) { + SimpleClient* self = NULL; + AppIndicator* _tmp0_ = NULL; + AppIndicator* _tmp1_; + self = (SimpleClient*) g_type_create_instance (object_type); + gtk_init (&args_length1, &args); + _tmp0_ = app_indicator_new ("example-simple-client", "indicator-messages", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + _tmp1_ = _tmp0_; + _g_object_unref0 (self->priv->ci); + self->priv->ci = _tmp1_; + app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ACTIVE); + app_indicator_set_attention_icon (self->priv->ci, "indicator-messages-new"); + app_indicator_set_label (self->priv->ci, "1%", "100%"); + self->priv->active = TRUE; + self->priv->can_haz_label = TRUE; + return self; +} + + +SimpleClient* simple_client_new (gchar** args, int args_length1) { + return simple_client_construct (TYPE_SIMPLE_CLIENT, args, args_length1); +} + + +static void simple_client_toggle_sensitivity (SimpleClient* self, GtkWidget* widget) { + gboolean _tmp0_; + g_return_if_fail (self != NULL); + g_return_if_fail (widget != NULL); + _tmp0_ = gtk_widget_is_sensitive (widget); + gtk_widget_set_sensitive (widget, !_tmp0_); +} + + +static Block1Data* block1_data_ref (Block1Data* _data1_) { + g_atomic_int_inc (&_data1_->_ref_count_); + return _data1_; +} + + +static void block1_data_unref (Block1Data* _data1_) { + if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { + _simple_client_unref0 (_data1_->self); + _g_object_unref0 (_data1_->prev_mi); + g_slice_free (Block1Data, _data1_); + } +} + + +static void _lambda0_ (SimpleClient* self) { + g_print ("Sub1\n"); +} + + +static void __lambda0__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda0_ (self); +} + + +static gpointer _g_object_ref0 (gpointer self) { + return self ? g_object_ref (self) : NULL; +} + + +static void _lambda1_ (Block1Data* _data1_) { + SimpleClient * self; + self = _data1_->self; + simple_client_toggle_sensitivity (self, (GtkWidget*) _data1_->prev_mi); +} + + +static void __lambda1__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda1_ (self); +} + + +static void _lambda2_ (SimpleClient* self) { + g_print ("Sub3\n"); +} + + +static void __lambda2__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda2_ (self); +} + + +static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) { + Block1Data* _data1_; + GtkMenu* _tmp0_ = NULL; + GtkMenu* menu; + GtkMenuItem* mi = NULL; + GtkMenuItem* _tmp1_ = NULL; + GtkMenuItem* _tmp2_; + GtkMenuItem* _tmp3_; + GtkMenuItem* _tmp4_ = NULL; + GtkMenuItem* _tmp5_; + GtkMenuItem* _tmp6_ = NULL; + GtkMenuItem* _tmp7_; + g_return_if_fail (self != NULL); + g_return_if_fail (item != NULL); + _data1_ = g_slice_new0 (Block1Data); + _data1_->_ref_count_ = 1; + _data1_->self = simple_client_ref (self); + _tmp0_ = (GtkMenu*) gtk_menu_new (); + menu = g_object_ref_sink (_tmp0_); + _tmp1_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 1"); + _tmp2_ = g_object_ref_sink (_tmp1_); + _g_object_unref0 (mi); + mi = _tmp2_; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi); + g_signal_connect (mi, "activate", (GCallback) __lambda0__gtk_menu_item_activate, self); + _tmp3_ = _g_object_ref0 (mi); + _data1_->prev_mi = _tmp3_; + _tmp4_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 2"); + _tmp5_ = g_object_ref_sink (_tmp4_); + _g_object_unref0 (mi); + mi = _tmp5_; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi); + g_signal_connect_data (mi, "activate", (GCallback) __lambda1__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); + _tmp6_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3"); + _tmp7_ = g_object_ref_sink (_tmp6_); + _g_object_unref0 (mi); + mi = _tmp7_; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) mi); + g_signal_connect (mi, "activate", (GCallback) __lambda2__gtk_menu_item_activate, self); + gtk_widget_show_all ((GtkWidget*) menu); + gtk_menu_item_set_submenu (item, (GtkWidget*) menu); + _g_object_unref0 (mi); + _g_object_unref0 (menu); + block1_data_unref (_data1_); + _data1_ = NULL; +} + + +static void simple_client_label_toggle (SimpleClient* self, GtkMenuItem* item) { + g_return_if_fail (self != NULL); + g_return_if_fail (item != NULL); + self->priv->can_haz_label = !self->priv->can_haz_label; + if (self->priv->can_haz_label) { + gtk_menu_item_set_label (item, "Hide label"); + } else { + gtk_menu_item_set_label (item, "Show label"); + } +} + + +static Block2Data* block2_data_ref (Block2Data* _data2_) { + g_atomic_int_inc (&_data2_->_ref_count_); + return _data2_; +} + + +static void block2_data_unref (Block2Data* _data2_) { + if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { + _simple_client_unref0 (_data2_->self); + _g_object_unref0 (_data2_->icon); + _g_object_unref0 (_data2_->show); + _g_object_unref0 (_data2_->att); + _g_object_unref0 (_data2_->imgitem); + _g_object_unref0 (_data2_->submenu); + g_slice_free (Block2Data, _data2_); + } +} + + +static void _lambda3_ (gint delta, guint direction, SimpleClient* self) { + gchar* _tmp0_ = NULL; + gchar* _tmp1_; + gchar* _tmp2_ = NULL; + gchar* _tmp3_; + gchar* _tmp4_ = NULL; + gchar* _tmp5_; + _tmp0_ = g_strdup_printf ("%i", delta); + _tmp1_ = _tmp0_; + _tmp2_ = g_strdup_printf ("%u", direction); + _tmp3_ = _tmp2_; + _tmp4_ = g_strconcat ("Got scroll event! delta: ", _tmp1_, ", direction: ", _tmp3_, "\n", NULL); + _tmp5_ = _tmp4_; + g_print ("%s", _tmp5_); + _g_free0 (_tmp5_); + _g_free0 (_tmp3_); + _g_free0 (_tmp1_); +} + + +static void __lambda3__app_indicator_scroll_event (AppIndicator* _sender, gint indicator, guint delta, gpointer self) { + _lambda3_ (indicator, delta, self); +} + + +static gboolean _lambda4_ (SimpleClient* self) { + gboolean result = FALSE; + self->priv->percentage = (self->priv->percentage + 1) % 100; + if (self->priv->can_haz_label) { + gchar* _tmp0_ = NULL; + gchar* _tmp1_; + gchar* _tmp2_ = NULL; + gchar* _tmp3_; + _tmp0_ = g_strdup_printf ("%i", self->priv->percentage + 1); + _tmp1_ = _tmp0_; + _tmp2_ = g_strconcat (_tmp1_, "%", NULL); + _tmp3_ = _tmp2_; + app_indicator_set_label (self->priv->ci, _tmp3_, ""); + _g_free0 (_tmp3_); + _g_free0 (_tmp1_); + } else { + app_indicator_set_label (self->priv->ci, "", ""); + } + result = TRUE; + return result; +} + + +static gboolean __lambda4__gsource_func (gpointer self) { + gboolean result; + result = _lambda4_ (self); + return result; +} + + +static void _lambda5_ (SimpleClient* self) { + g_print ("1\n"); +} + + +static void __lambda5__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda5_ (self); +} + + +static void _g_object_unref0_ (gpointer var) { + (var == NULL) ? NULL : (var = (g_object_unref (var), NULL)); +} + + +static void _g_slist_free__g_object_unref0_ (GSList* self) { + g_slist_foreach (self, (GFunc) _g_object_unref0_, NULL); + g_slist_free (self); +} + + +static void _lambda6_ (SimpleClient* self) { + g_print ("2\n"); +} + + +static void __lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda6_ (self); +} + + +static void _lambda7_ (Block2Data* _data2_) { + SimpleClient * self; + self = _data2_->self; + simple_client_toggle_sensitivity (self, (GtkWidget*) _data2_->submenu); +} + + +static void __lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda7_ (self); +} + + +static void _lambda8_ (Block2Data* _data2_) { + SimpleClient * self; + GtkWidget* _tmp0_ = NULL; + GtkImage* _tmp1_; + GtkImage* img; + self = _data2_->self; + _tmp0_ = gtk_image_menu_item_get_image (_data2_->imgitem); + _tmp1_ = _g_object_ref0 (GTK_IMAGE (_tmp0_)); + img = _tmp1_; + gtk_image_set_from_stock (img, GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU); + _g_object_unref0 (img); +} + + +static void __lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda8_ (self); +} + + +static void _lambda9_ (Block2Data* _data2_) { + SimpleClient * self; + self = _data2_->self; + if (self->priv->active) { + app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ATTENTION); + gtk_menu_item_set_label (_data2_->att, "I'm okay now"); + self->priv->active = FALSE; + } else { + app_indicator_set_status (self->priv->ci, APP_INDICATOR_STATUS_ACTIVE); + gtk_menu_item_set_label (_data2_->att, "Get Attention"); + self->priv->active = FALSE; + } +} + + +static void __lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda9_ (self); +} + + +static void _lambda10_ (Block2Data* _data2_) { + SimpleClient * self; + self = _data2_->self; + simple_client_label_toggle (self, _data2_->show); +} + + +static void __lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda10_ (self); +} + + +static void _lambda11_ (Block2Data* _data2_) { + SimpleClient * self; + gboolean _tmp0_; + self = _data2_->self; + _tmp0_ = gtk_check_menu_item_get_active (_data2_->icon); + if (_tmp0_) { + app_indicator_set_icon (self->priv->ci, "simple-client-test-icon.png"); + } else { + app_indicator_set_icon (self->priv->ci, "indicator-messages"); + } +} + + +static void __lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + _lambda11_ (self); +} + + +void simple_client_run (SimpleClient* self) { + Block2Data* _data2_; + GtkMenu* _tmp0_ = NULL; + GtkMenu* _tmp1_; + GtkCheckMenuItem* _tmp2_ = NULL; + GtkCheckMenuItem* chk; + GSList* _tmp3_; + GtkRadioMenuItem* _tmp4_ = NULL; + GtkRadioMenuItem* _tmp5_; + GtkRadioMenuItem* radio; + GtkMenuItem* _tmp6_ = NULL; + GtkMenuItem* _tmp7_ = NULL; + GtkMenuItem* toggle_item; + GtkImageMenuItem* _tmp8_ = NULL; + GtkMenuItem* _tmp9_ = NULL; + GtkMenuItem* _tmp10_ = NULL; + GtkCheckMenuItem* _tmp11_ = NULL; + g_return_if_fail (self != NULL); + _data2_ = g_slice_new0 (Block2Data); + _data2_->_ref_count_ = 1; + _data2_->self = simple_client_ref (self); + g_signal_connect (self->priv->ci, "scroll-event", (GCallback) __lambda3__app_indicator_scroll_event, self); + g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, __lambda4__gsource_func, simple_client_ref (self), simple_client_unref); + _tmp0_ = (GtkMenu*) gtk_menu_new (); + _tmp1_ = g_object_ref_sink (_tmp0_); + _g_object_unref0 (self->priv->menu); + self->priv->menu = _tmp1_; + _tmp2_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1"); + chk = g_object_ref_sink (_tmp2_); + g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) __lambda5__gtk_menu_item_activate, self); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) chk)); + gtk_widget_show ((GtkWidget*) chk); + _tmp3_ = NULL; + _tmp4_ = (GtkRadioMenuItem*) gtk_radio_menu_item_new_with_label (_tmp3_, "2"); + radio = (_tmp5_ = g_object_ref_sink (_tmp4_), __g_slist_free__g_object_unref0_0 (_tmp3_), _tmp5_); + g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) __lambda6__gtk_menu_item_activate, self); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) radio)); + gtk_widget_show ((GtkWidget*) radio); + _tmp6_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("3"); + _data2_->submenu = g_object_ref_sink (_tmp6_); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) _data2_->submenu); + simple_client_append_submenu (self, _data2_->submenu); + gtk_widget_show ((GtkWidget*) _data2_->submenu); + _tmp7_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle 3"); + toggle_item = g_object_ref_sink (_tmp7_); + g_signal_connect_data (toggle_item, "activate", (GCallback) __lambda7__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) toggle_item); + gtk_widget_show ((GtkWidget*) toggle_item); + _tmp8_ = (GtkImageMenuItem*) gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL); + _data2_->imgitem = g_object_ref_sink (_tmp8_); + g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) __lambda8__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem)); + gtk_widget_show ((GtkWidget*) _data2_->imgitem); + _tmp9_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Get Attention"); + _data2_->att = g_object_ref_sink (_tmp9_); + g_signal_connect_data (_data2_->att, "activate", (GCallback) __lambda9__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) _data2_->att); + gtk_widget_show ((GtkWidget*) _data2_->att); + _tmp10_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Show Label"); + _data2_->show = g_object_ref_sink (_tmp10_); + simple_client_label_toggle (self, _data2_->show); + g_signal_connect_data (_data2_->show, "activate", (GCallback) __lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) _data2_->show); + gtk_widget_show ((GtkWidget*) _data2_->show); + _tmp11_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Set Local Icon"); + _data2_->icon = g_object_ref_sink (_tmp11_); + g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) __lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + gtk_menu_shell_append ((GtkMenuShell*) self->priv->menu, (GtkWidget*) ((GtkMenuItem*) _data2_->icon)); + gtk_widget_show ((GtkWidget*) _data2_->icon); + app_indicator_set_menu (self->priv->ci, self->priv->menu); + gtk_main (); + _g_object_unref0 (toggle_item); + _g_object_unref0 (radio); + _g_object_unref0 (chk); + block2_data_unref (_data2_); + _data2_ = NULL; +} + + +static void value_simple_client_init (GValue* value) { + value->data[0].v_pointer = NULL; +} + + +static void value_simple_client_free_value (GValue* value) { + if (value->data[0].v_pointer) { + simple_client_unref (value->data[0].v_pointer); + } +} + + +static void value_simple_client_copy_value (const GValue* src_value, GValue* dest_value) { + if (src_value->data[0].v_pointer) { + dest_value->data[0].v_pointer = simple_client_ref (src_value->data[0].v_pointer); + } else { + dest_value->data[0].v_pointer = NULL; + } +} + + +static gpointer value_simple_client_peek_pointer (const GValue* value) { + return value->data[0].v_pointer; +} + + +static gchar* value_simple_client_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + if (collect_values[0].v_pointer) { + SimpleClient* object; + object = collect_values[0].v_pointer; + if (object->parent_instance.g_class == NULL) { + return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); + } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { + return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); + } + value->data[0].v_pointer = simple_client_ref (object); + } else { + value->data[0].v_pointer = NULL; + } + return NULL; +} + + +static gchar* value_simple_client_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { + SimpleClient** object_p; + object_p = collect_values[0].v_pointer; + if (!object_p) { + return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); + } + if (!value->data[0].v_pointer) { + *object_p = NULL; + } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { + *object_p = value->data[0].v_pointer; + } else { + *object_p = simple_client_ref (value->data[0].v_pointer); + } + return NULL; +} + + +GParamSpec* param_spec_simple_client (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { + ParamSpecSimpleClient* spec; + g_return_val_if_fail (g_type_is_a (object_type, TYPE_SIMPLE_CLIENT), NULL); + spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); + G_PARAM_SPEC (spec)->value_type = object_type; + return G_PARAM_SPEC (spec); +} + + +gpointer value_get_simple_client (const GValue* value) { + g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_CLIENT), NULL); + return value->data[0].v_pointer; +} + + +void value_set_simple_client (GValue* value, gpointer v_object) { + SimpleClient* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_CLIENT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SIMPLE_CLIENT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + simple_client_ref (value->data[0].v_pointer); + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + simple_client_unref (old); + } +} + + +void value_take_simple_client (GValue* value, gpointer v_object) { + SimpleClient* old; + g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SIMPLE_CLIENT)); + old = value->data[0].v_pointer; + if (v_object) { + g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SIMPLE_CLIENT)); + g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); + value->data[0].v_pointer = v_object; + } else { + value->data[0].v_pointer = NULL; + } + if (old) { + simple_client_unref (old); + } +} + + +static void simple_client_class_init (SimpleClientClass * klass) { + simple_client_parent_class = g_type_class_peek_parent (klass); + SIMPLE_CLIENT_CLASS (klass)->finalize = simple_client_finalize; + g_type_class_add_private (klass, sizeof (SimpleClientPrivate)); +} + + +static void simple_client_instance_init (SimpleClient * self) { + self->priv = SIMPLE_CLIENT_GET_PRIVATE (self); + self->ref_count = 1; +} + + +static void simple_client_finalize (SimpleClient* obj) { + SimpleClient * self; + self = SIMPLE_CLIENT (obj); + _g_object_unref0 (self->priv->menu); + _g_object_unref0 (self->priv->ci); +} + + +GType simple_client_get_type (void) { + static volatile gsize simple_client_type_id__volatile = 0; + if (g_once_init_enter (&simple_client_type_id__volatile)) { + static const GTypeValueTable g_define_type_value_table = { value_simple_client_init, value_simple_client_free_value, value_simple_client_copy_value, value_simple_client_peek_pointer, "p", value_simple_client_collect_value, "p", value_simple_client_lcopy_value }; + static const GTypeInfo g_define_type_info = { sizeof (SimpleClientClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) simple_client_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SimpleClient), 0, (GInstanceInitFunc) simple_client_instance_init, &g_define_type_value_table }; + static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; + GType simple_client_type_id; + simple_client_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SimpleClient", &g_define_type_info, &g_define_type_fundamental_info, 0); + g_once_init_leave (&simple_client_type_id__volatile, simple_client_type_id); + } + return simple_client_type_id__volatile; +} + + +gpointer simple_client_ref (gpointer instance) { + SimpleClient* self; + self = instance; + g_atomic_int_inc (&self->ref_count); + return instance; +} + + +void simple_client_unref (gpointer instance) { + SimpleClient* self; + self = instance; + if (g_atomic_int_dec_and_test (&self->ref_count)) { + SIMPLE_CLIENT_GET_CLASS (self)->finalize (self); + g_type_free_instance ((GTypeInstance *) self); + } +} + + + diff --git a/example/simple-client.c b/example/simple-client.c index ac8360f..1cf06dc 100644 --- a/example/simple-client.c +++ b/example/simple-client.c @@ -98,6 +98,12 @@ image_clicked_cb (GtkWidget *widget, gpointer data) } static void +scroll_event_cb (AppIndicator * ci, gint delta, guint direction) +{ + g_print("Got scroll event! delta: %d, direction: %d\n", delta, direction); +} + +static void append_submenu (GtkWidget *item) { GtkWidget *menu; @@ -162,6 +168,9 @@ main (int argc, char ** argv) app_indicator_set_attention_icon(ci, "indicator-messages-new"); app_indicator_set_label (ci, "1%", "100%"); + g_signal_connect (ci, "scroll-event", + G_CALLBACK (scroll_event_cb), NULL); + g_timeout_add_seconds(1, percent_change, ci); menu = gtk_menu_new (); diff --git a/gtk-doc.make b/gtk-doc.make index 57fab98..00963af 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -30,10 +30,9 @@ EXTRA_DIST = \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - pdf-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ - $(srcdir)/pdf.stamp +DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \ + html-build.stamp pdf-build.stamp \ + setup.stamp tmpl.stamp sgml.stamp html.stamp pdf.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ @@ -70,20 +69,37 @@ docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp +#### setup #### + +setup-build.stamp:: + -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + cp -a $(abs_srcdir)/$(DOC_MAIN_SGML_FILE) $(abs_builddir)/; \ + cp -a $(abs_srcdir)/$(DOC_MODULE)* $(abs_builddir)/; \ + if test "x$(content_files)" != "x" ; then \ + for file in $(content_files) ; do \ + test -f $(abs_srcdir)/$$file || \ + cp -a $(abs_srcdir)/$$file $(abs_builddir)/; \ + done \ + fi \ + fi + + +setup.stamp: setup-build.stamp + @true + + #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + @_source_dir='' ; + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + done ; \ + gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) + @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) ; \ else \ - cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ @@ -97,8 +113,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE) tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo 'gtk-doc: Rebuilding template files' - @-chmod -R u+w $(srcdir) - @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) @touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @@ -112,11 +127,11 @@ $(srcdir)/tmpl/*.sgml: sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) @echo 'gtk-doc: Building XML' @-chmod -R u+w $(srcdir) - @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ + @_source_dir='' ; \ + for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - cd $(srcdir) && \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) + done ; \ + gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @touch sgml-build.stamp sgml.stamp: sgml-build.stamp @@ -126,26 +141,24 @@ sgml.stamp: sgml-build.stamp html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/html - @mkdir $(srcdir)/html + @rm -rf html + @mkdir html @mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ if test "$(?)" = "0"; then \ - mkhtml_options=--path="$(srcdir)"; \ + mkhtml_options=--path="$(abs_srcdir)"; \ fi; \ - cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html ) @echo 'gtk-doc: Fixing cross-references' - @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @touch html-build.stamp #### pdf #### pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo 'gtk-doc: Building PDF' - @-chmod -R u+w $(srcdir) - @rm -rf $(srcdir)/$(DOC_MODULE).pdf + @rm -rf $(DOC_MODULE).pdf @mkpdf_imgdirs=""; \ if test "x$(HTML_IMAGES)" != "x"; then \ for img in $(HTML_IMAGES); do \ @@ -156,7 +169,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) fi; \ done; \ fi; \ - cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) + gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) @touch pdf-build.stamp ############## @@ -166,12 +179,14 @@ clean-local: rm -rf .libs distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ + rm -f $(DOC_MAIN_SGML_FILE) $(DOC_MODULE)*; \ + fi maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html + rm -rf xml html install-data-local: @installfiles=`echo $(srcdir)/html/*`; \ diff --git a/src/AppIndicator-0.1.metadata b/src/AppIndicator-0.1.metadata deleted file mode 100644 index e4d068e..0000000 --- a/src/AppIndicator-0.1.metadata +++ /dev/null @@ -1 +0,0 @@ -AppIndicator name="AppIndicator" diff --git a/src/AppIndicator-0.1.metadata.in b/src/AppIndicator-0.1.metadata.in new file mode 100644 index 0000000..5790ddb --- /dev/null +++ b/src/AppIndicator-0.1.metadata.in @@ -0,0 +1,3 @@ +AppIndicator name="AppIndicator" +Indicator.priv hidden="1" +IndicatorPrivate hidden="1" diff --git a/src/Makefile.am b/src/Makefile.am index b9ee3e1..f83a6c4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,12 +2,10 @@ if USE_GTK3 VER=3 lib_LTLIBRARIES = libappindicator3.la GTKGIR = Gtk-3.0 -GTKVAPI = gtk+-3.0 else VER= lib_LTLIBRARIES = libappindicator.la GTKGIR = Gtk-2.0 -GTKVAPI = gtk+-2.0 endif CLEANFILES = @@ -16,7 +14,7 @@ BUILT_SOURCES = EXTRA_DIST = \ appindicator-0.1.pc.in \ appindicator3-0.1.pc.in \ - AppIndicator-0.1.metadata + AppIndicator$(VER)-0.1.metadata.in include $(top_srcdir)/Makefile.am.enum include $(top_srcdir)/Makefile.am.marshal @@ -45,7 +43,8 @@ glib_enum_headers = $(addprefix $(srcdir)/, $(libappindicator_headers)) DISTCLEANFILES += app-indicator-enum-types.c -libappindicatorincludedir=$(includedir)/libappindicator-0.1/libappindicator +libappindicatorincludefolder=libappindicator +libappindicatorincludedir=$(includedir)/libappindicator-0.1/$(libappindicatorincludefolder) libappindicator_headers = \ app-indicator.h @@ -133,13 +132,13 @@ INTROSPECTION_GIRS = if INTROSPECTION_TEN INTROSPECTION_SCANNER_ARGS = \ --add-include-path=$(srcdir) \ - $(addprefix --c-include=src/, $(introspection_sources)) \ + $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) \ --symbol-prefix=app \ --identifier-prefix=App else INTROSPECTION_SCANNER_ARGS = \ --add-include-path=$(srcdir) \ - $(addprefix --c-include=src/, $(introspection_sources)) + $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) endif INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) @@ -165,6 +164,12 @@ AppIndicator3_0_1_gir_FILES = $(AppIndicator_0_1_gir_FILES) INTROSPECTION_GIRS += AppIndicator$(VER)-0.1.gir +AppIndicator$(VER)-0.1.metadata: AppIndicator$(VER)-0.1.gir + cp -f $(srcdir)/$@.in $@ + +BUILT_SOURCES += AppIndicator$(VER)-0.1.metadata +CLEANFILES += AppIndicator$(VER)-0.1.metadata + girdir = $(datadir)/gir-1.0 gir_DATA = $(INTROSPECTION_GIRS) @@ -174,23 +179,3 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(gir_DATA) $(typelib_DATA) endif - -######################### -# VAPI Files -######################### - -if HAVE_INTROSPECTION - -vapidir = $(datadir)/vala/vapi -vapi_DATA = AppIndicator$(VER)-0.1.vapi - -AppIndicator$(VER)-0.1.vapi: AppIndicator$(VER)-0.1.gir Makefile.am - $(VALA_API_GEN) --library=AppIndicator$(VER)-0.1 \ - --pkg $(GTKVAPI) \ - --vapidir=$(top_builddir)/src \ - $< - -CLEANFILES += $(vapi_DATA) - -endif - diff --git a/src/Makefile.in b/src/Makefile.in index 2e2cd6b..20885b0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -76,8 +76,10 @@ DIST_COMMON = $(libappindicator3include_HEADERS) \ $(top_srcdir)/Makefile.am.enum \ $(top_srcdir)/Makefile.am.marshal @HAVE_INTROSPECTION_TRUE@am__append_1 = AppIndicator$(VER)-0.1.gir -@HAVE_INTROSPECTION_TRUE@am__append_2 = $(gir_DATA) $(typelib_DATA) \ -@HAVE_INTROSPECTION_TRUE@ $(vapi_DATA) +@HAVE_INTROSPECTION_TRUE@am__append_2 = AppIndicator$(VER)-0.1.metadata +@HAVE_INTROSPECTION_TRUE@am__append_3 = \ +@HAVE_INTROSPECTION_TRUE@ AppIndicator$(VER)-0.1.metadata \ +@HAVE_INTROSPECTION_TRUE@ $(gir_DATA) $(typelib_DATA) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ @@ -111,7 +113,6 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" \ - "$(DESTDIR)$(vapidir)" \ "$(DESTDIR)$(libappindicator3includedir)" \ "$(DESTDIR)$(libappindicatorincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @@ -179,7 +180,7 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libappindicator_la_SOURCES) $(libappindicator3_la_SOURCES) DIST_SOURCES = $(libappindicator_la_SOURCES) \ $(libappindicator3_la_SOURCES) -DATA = $(gir_DATA) $(pkgconfig_DATA) $(typelib_DATA) $(vapi_DATA) +DATA = $(gir_DATA) $(pkgconfig_DATA) $(typelib_DATA) HEADERS = $(libappindicator3include_HEADERS) \ $(libappindicatorinclude_HEADERS) ETAGS = etags @@ -294,6 +295,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -358,12 +360,10 @@ top_srcdir = @top_srcdir@ @USE_GTK3_TRUE@lib_LTLIBRARIES = libappindicator3.la @USE_GTK3_FALSE@GTKGIR = Gtk-2.0 @USE_GTK3_TRUE@GTKGIR = Gtk-3.0 -@USE_GTK3_FALSE@GTKVAPI = gtk+-2.0 -@USE_GTK3_TRUE@GTKVAPI = gtk+-3.0 CLEANFILES = stamp-enum-types stamp-marshal \ gen-notification-item.xml.c gen-notification-item.xml.h \ gen-notification-watcher.xml.c gen-notification-watcher.xml.h \ - $(am__append_2) + $(am__append_3) DISTCLEANFILES = $(glib_enum_h) $(glib_enum_c) $(marshal_h) \ $(marshal_c) app-indicator-enum-types.c @@ -374,10 +374,10 @@ BUILT_SOURCES = $(glib_enum_h) $(glib_enum_c) $(marshal_h) \ $(marshal_c) application-service-marshal.h \ application-service-marshal.c gen-notification-item.xml.c \ gen-notification-item.xml.h gen-notification-watcher.xml.c \ - gen-notification-watcher.xml.h + gen-notification-watcher.xml.h $(am__append_2) EXTRA_DIST = appindicator-0.1.pc.in appindicator3-0.1.pc.in \ - AppIndicator-0.1.metadata $(enum_tmpl_h) $(enum_tmpl_c) \ - $(glib_marshal_list) $(DBUS_SPECS) + AppIndicator$(VER)-0.1.metadata.in $(enum_tmpl_h) \ + $(enum_tmpl_c) $(glib_marshal_list) $(DBUS_SPECS) enum_tmpl_h = $(glib_enum_h:.h=.h.in) enum_tmpl_c = $(glib_enum_c:.c=.c.in) marshal_h = $(glib_marshal_list:.list=.h) @@ -393,7 +393,8 @@ pkgconfigdir = $(libdir)/pkgconfig glib_enum_h = app-indicator-enum-types.h glib_enum_c = app-indicator-enum-types.c glib_enum_headers = $(addprefix $(srcdir)/, $(libappindicator_headers)) -libappindicatorincludedir = $(includedir)/libappindicator-0.1/libappindicator +libappindicatorincludefolder = libappindicator +libappindicatorincludedir = $(includedir)/libappindicator-0.1/$(libappindicatorincludefolder) libappindicator_headers = \ app-indicator.h @@ -449,11 +450,11 @@ DBUS_SPECS = \ INTROSPECTION_GIRS = $(am__append_1) @INTROSPECTION_TEN_FALSE@INTROSPECTION_SCANNER_ARGS = \ @INTROSPECTION_TEN_FALSE@ --add-include-path=$(srcdir) \ -@INTROSPECTION_TEN_FALSE@ $(addprefix --c-include=src/, $(introspection_sources)) +@INTROSPECTION_TEN_FALSE@ $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) @INTROSPECTION_TEN_TRUE@INTROSPECTION_SCANNER_ARGS = \ @INTROSPECTION_TEN_TRUE@ --add-include-path=$(srcdir) \ -@INTROSPECTION_TEN_TRUE@ $(addprefix --c-include=src/, $(introspection_sources)) \ +@INTROSPECTION_TEN_TRUE@ $(addprefix --c-include=$(libappindicatorincludefolder)/, $(libappindicator_headers)) \ @INTROSPECTION_TEN_TRUE@ --symbol-prefix=app \ @INTROSPECTION_TEN_TRUE@ --identifier-prefix=App @@ -476,12 +477,6 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(builddir) @HAVE_INTROSPECTION_TRUE@gir_DATA = $(INTROSPECTION_GIRS) @HAVE_INTROSPECTION_TRUE@typelibdir = $(libdir)/girepository-1.0 @HAVE_INTROSPECTION_TRUE@typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) - -######################### -# VAPI Files -######################### -@HAVE_INTROSPECTION_TRUE@vapidir = $(datadir)/vala/vapi -@HAVE_INTROSPECTION_TRUE@vapi_DATA = AppIndicator$(VER)-0.1.vapi all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -761,26 +756,6 @@ uninstall-typelibDATA: test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(typelibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(typelibdir)" && rm -f $$files -install-vapiDATA: $(vapi_DATA) - @$(NORMAL_INSTALL) - test -z "$(vapidir)" || $(MKDIR_P) "$(DESTDIR)$(vapidir)" - @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(vapidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(vapidir)" || exit $$?; \ - done - -uninstall-vapiDATA: - @$(NORMAL_UNINSTALL) - @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(vapidir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(vapidir)" && rm -f $$files install-libappindicator3includeHEADERS: $(libappindicator3include_HEADERS) @$(NORMAL_INSTALL) test -z "$(libappindicator3includedir)" || $(MKDIR_P) "$(DESTDIR)$(libappindicator3includedir)" @@ -909,7 +884,7 @@ check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(vapidir)" "$(DESTDIR)$(libappindicator3includedir)" "$(DESTDIR)$(libappindicatorincludedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libappindicator3includedir)" "$(DESTDIR)$(libappindicatorincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -967,7 +942,7 @@ info-am: install-data-am: install-girDATA \ install-libappindicator3includeHEADERS \ install-libappindicatorincludeHEADERS install-pkgconfigDATA \ - install-typelibDATA install-vapiDATA + install-typelibDATA install-dvi: install-dvi-am @@ -1016,8 +991,7 @@ ps-am: uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-libappindicator3includeHEADERS \ uninstall-libappindicatorincludeHEADERS \ - uninstall-pkgconfigDATA uninstall-typelibDATA \ - uninstall-vapiDATA + uninstall-pkgconfigDATA uninstall-typelibDATA .MAKE: all check install install-am install-strip @@ -1031,16 +1005,14 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ install-libLTLIBRARIES install-libappindicator3includeHEADERS \ install-libappindicatorincludeHEADERS install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ - install-strip install-typelibDATA install-vapiDATA \ - 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-girDATA \ - uninstall-libLTLIBRARIES \ + install-strip install-typelibDATA 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-girDATA uninstall-libLTLIBRARIES \ uninstall-libappindicator3includeHEADERS \ uninstall-libappindicatorincludeHEADERS \ - uninstall-pkgconfigDATA uninstall-typelibDATA \ - uninstall-vapiDATA + uninstall-pkgconfigDATA uninstall-typelibDATA stamp-enum-types: $(glib_enum_headers) @@ -1102,11 +1074,8 @@ gen-%.xml.c: %.xml @HAVE_INTROSPECTION_TRUE@AppIndicator$(VER)-0.1.gir: libappindicator$(VER).la -@HAVE_INTROSPECTION_TRUE@AppIndicator$(VER)-0.1.vapi: AppIndicator$(VER)-0.1.gir Makefile.am -@HAVE_INTROSPECTION_TRUE@ $(VALA_API_GEN) --library=AppIndicator$(VER)-0.1 \ -@HAVE_INTROSPECTION_TRUE@ --pkg $(GTKVAPI) \ -@HAVE_INTROSPECTION_TRUE@ --vapidir=$(top_builddir)/src \ -@HAVE_INTROSPECTION_TRUE@ $< +@HAVE_INTROSPECTION_TRUE@AppIndicator$(VER)-0.1.metadata: AppIndicator$(VER)-0.1.gir +@HAVE_INTROSPECTION_TRUE@ cp -f $(srcdir)/$@.in $@ # 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. diff --git a/src/app-indicator.c b/src/app-indicator.c index 039b980..f4e9173 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -103,6 +103,7 @@ enum { NEW_LABEL, CONNECTION_CHANGED, NEW_ICON_THEME_PATH, + SCROLL_EVENT, LAST_SIGNAL }; @@ -170,19 +171,22 @@ static void start_fallback_timer (AppIndicator * self, gboolean disable_timeout) static gboolean fallback_timer_expire (gpointer data); static GtkStatusIcon * fallback (AppIndicator * self); static void status_icon_status_wrapper (AppIndicator * self, const gchar * status, gpointer data); +static gboolean scroll_event_wrapper(GtkWidget *status_icon, GdkEventScroll *event, gpointer user_data); static void status_icon_changes (AppIndicator * self, gpointer data); static void status_icon_activate (GtkStatusIcon * icon, gpointer data); +static void status_icon_menu_activate (GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data); static void unfallback (AppIndicator * self, GtkStatusIcon * status_icon); static gchar * append_panel_icon_suffix (const gchar * icon_name); static void watcher_owner_changed (GObject * obj, GParamSpec * pspec, gpointer user_data); static void client_menu_changed (GtkWidget *widget, GtkWidget *child, AppIndicator *indicator); static void theme_changed_cb (GtkIconTheme * theme, gpointer user_data); static GVariant * bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * property, GError ** error, gpointer user_data); +static void bus_method_call (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * method, GVariant * params, GDBusMethodInvocation * invocation, gpointer user_data); static void bus_creation (GObject * obj, GAsyncResult * res, gpointer user_data); static void bus_watcher_ready (GObject * obj, GAsyncResult * res, gpointer user_data); static const GDBusInterfaceVTable item_interface_table = { - method_call: NULL, /* No methods on this object */ + method_call: bus_method_call, get_property: bus_get_prop, set_property: NULL /* No properties that can be set */ }; @@ -469,6 +473,23 @@ app_indicator_class_init (AppIndicatorClass *klass) g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); + /** + AppIndicator::scroll-event: + @arg0: The #AppIndicator object + @arg1: How many steps the scroll wheel has taken + @arg2: (type Gdk.ScrollDirection) Which direction the wheel went in + + Signaled when there is a new icon set for the + object. + */ + signals[SCROLL_EVENT] = g_signal_new (APP_INDICATOR_SIGNAL_SCROLL_EVENT, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AppIndicatorClass, scroll_event), + NULL, NULL, + _application_service_marshal_VOID__INT_UINT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); + /* DBus interfaces */ if (item_node_info == NULL) { GError * error = NULL; @@ -899,6 +920,43 @@ bus_creation (GObject * obj, GAsyncResult * res, gpointer user_data) return; } +static void +bus_method_call (GDBusConnection * connection, const gchar * sender, + const gchar * path, const gchar * interface, + const gchar * method, GVariant * params, + GDBusMethodInvocation * invocation, gpointer user_data) +{ + g_return_if_fail(IS_APP_INDICATOR(user_data)); + + AppIndicator * app = APP_INDICATOR(user_data); + GVariant * retval = NULL; + + if (g_strcmp0(method, "Scroll") == 0) { + guint direction; + gint delta; + const gchar *orientation; + + g_variant_get(params, "(i&s)", &delta, &orientation); + + if (g_strcmp0(orientation, "horizontal") == 0) { + direction = (delta >= 0) ? GDK_SCROLL_RIGHT : GDK_SCROLL_LEFT; + } else if (g_strcmp0(orientation, "vertical") == 0) { + direction = (delta >= 0) ? GDK_SCROLL_DOWN : GDK_SCROLL_UP; + } else { + g_dbus_method_invocation_return_value(invocation, retval); + return; + } + + delta = ABS(delta); + g_signal_emit(app, signals[SCROLL_EVENT], 0, delta, direction); + + } else { + g_warning("Calling method '%s' on the app-indicator and it's unknown", method); + } + + g_dbus_method_invocation_return_value(invocation, retval); +} + /* DBus is asking for a property so we should figure out what it wants and try and deliver. */ static GVariant * @@ -1053,7 +1111,8 @@ check_connect (AppIndicator *self) if (priv->watcher_proxy == NULL) { /* Build Watcher Proxy */ g_dbus_proxy_new(priv->connection, - G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, /* We don't use these, don't bother with them */ + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES| + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, /* We don't use these, don't bother with them */ watcher_interface_info, NOTIFICATION_WATCHER_DBUS_ADDR, NOTIFICATION_WATCHER_DBUS_OBJ, @@ -1315,6 +1374,8 @@ fallback (AppIndicator * self) status_icon_changes(self, icon); g_signal_connect(G_OBJECT(icon), "activate", G_CALLBACK(status_icon_activate), self); + g_signal_connect(G_OBJECT(icon), "popup-menu", G_CALLBACK(status_icon_menu_activate), self); + g_signal_connect(G_OBJECT(icon), "scroll-event", G_CALLBACK(scroll_event_wrapper), self); return icon; } @@ -1327,6 +1388,18 @@ status_icon_status_wrapper (AppIndicator * self, const gchar * status, gpointer return status_icon_changes(self, data); } +/* A wrapper for redirecting the scroll events to the app-indicator from status + icon widget. */ +static gboolean +scroll_event_wrapper(GtkWidget *status_icon, GdkEventScroll *event, gpointer data) +{ + g_return_val_if_fail(IS_APP_INDICATOR(data), FALSE); + AppIndicator * app = APP_INDICATOR(data); + g_signal_emit(app, signals[SCROLL_EVENT], 0, 1, event->direction); + + return FALSE; +} + /* This tracks changes to either the status or the icons that are associated with the app indicator */ static void @@ -1388,6 +1461,14 @@ status_icon_activate (GtkStatusIcon * icon, gpointer data) return; } +/* Handles the right-click action by the status icon by showing + the menu in a popup. */ +static void +status_icon_menu_activate (GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) +{ + status_icon_activate(status_icon, user_data); +} + /* Removes the status icon as the application indicator area is now up and running again. */ static void @@ -1395,6 +1476,7 @@ unfallback (AppIndicator * self, GtkStatusIcon * status_icon) { g_signal_handlers_disconnect_by_func(G_OBJECT(self), status_icon_status_wrapper, status_icon); g_signal_handlers_disconnect_by_func(G_OBJECT(self), status_icon_changes, status_icon); + g_signal_handlers_disconnect_by_func(G_OBJECT(self), scroll_event_wrapper, status_icon); gtk_status_icon_set_visible(status_icon, FALSE); g_object_unref(G_OBJECT(status_icon)); return; diff --git a/src/app-indicator.h b/src/app-indicator.h index 3e159db..2a30b22 100644 --- a/src/app-indicator.h +++ b/src/app-indicator.h @@ -107,12 +107,18 @@ G_BEGIN_DECLS String identifier for the #AppIndicator::new-icon-theme-path signal. */ +/** + APP_INDICATOR_SIGNAL_SCROLL_EVENT: + + String identifier for the #AppIndicator::scroll-event signal. +*/ #define APP_INDICATOR_SIGNAL_NEW_ICON "new-icon" #define APP_INDICATOR_SIGNAL_NEW_ATTENTION_ICON "new-attention-icon" #define APP_INDICATOR_SIGNAL_NEW_STATUS "new-status" #define APP_INDICATOR_SIGNAL_NEW_LABEL "new-label" #define APP_INDICATOR_SIGNAL_CONNECTION_CHANGED "connection-changed" #define APP_INDICATOR_SIGNAL_NEW_ICON_THEME_PATH "new-icon-theme-path" +#define APP_INDICATOR_SIGNAL_SCROLL_EVENT "scroll-event" /** AppIndicatorCategory: @@ -163,7 +169,7 @@ typedef struct _AppIndicatorPrivate AppIndicatorPrivate; @new_icon_theme_path: Slot for #AppIndicator::new-icon-theme-path @new_label: Slot for #AppIndicator::new-label. @connection_changed: Slot for #AppIndicator::connection-changed. - @app_indicator_reserved_sw: Reserved for future use. + @scroll-event: Slot for #AppIndicator::scroll-event @app_indicator_reserved_ats: Reserved for future use. @fallback: Function that gets called to make a #GtkStatusIcon when there is no Application Indicator area available. @@ -203,7 +209,12 @@ struct _AppIndicatorClass { void (* connection_changed) (AppIndicator * indicator, gboolean connected, gpointer user_data); - void (*app_indicator_reserved_sw)(void); + + void (* scroll_event) (AppIndicator * indicator, + gint delta, + GdkScrollDirection direction, + gpointer user_data); + void (*app_indicator_reserved_ats)(void); /* Overridable Functions */ diff --git a/src/application-service-marshal.c b/src/application-service-marshal.c index e109d7c..fb940b7 100644 --- a/src/application-service-marshal.c +++ b/src/application-service-marshal.c @@ -249,3 +249,40 @@ _application_service_marshal_VOID__BOOLEAN_STRING_OBJECT (GClosure *closure, data2); } +/* VOID:INT,UINT (./application-service-marshal.list:24) */ +void +_application_service_marshal_VOID__INT_UINT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__INT_UINT) (gpointer data1, + gint arg_1, + guint arg_2, + gpointer data2); + register GMarshalFunc_VOID__INT_UINT callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__INT_UINT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_int (param_values + 1), + g_marshal_value_peek_uint (param_values + 2), + data2); +} + diff --git a/src/application-service-marshal.list b/src/application-service-marshal.list index 2b2efa5..39a55fe 100644 --- a/src/application-service-marshal.list +++ b/src/application-service-marshal.list @@ -21,3 +21,4 @@ VOID: INT, STRING, STRING VOID: INT, STRING VOID: STRING, STRING VOID: BOOL, STRING, OBJECT +VOID: INT, UINT diff --git a/src/gen-notification-item.xml.c b/src/gen-notification-item.xml.c index 5243f9e..b80567e 100644 --- a/src/gen-notification-item.xml.c +++ b/src/gen-notification-item.xml.c @@ -18,7 +18,10 @@ const char * _notification_item = " <property name=\"XAyatanaOrderingIndex\" type=\"u\" access=\"read\" />\n" "\n" "<!-- Methods -->\n" -" <!-- None currently -->\n" +" <method name=\"Scroll\">\n" +" <arg type=\"i\" name=\"delta\" direction=\"in\" />\n" +" <arg type=\"s\" name=\"orientation\" direction=\"in\" />\n" +" </method>\n" "\n" "<!-- Signals -->\n" " <signal name=\"NewIcon\">\n" @@ -35,7 +38,6 @@ const char * _notification_item = " <arg type=\"s\" name=\"label\" direction=\"out\" />\n" " <arg type=\"s\" name=\"guide\" direction=\"out\" />\n" " </signal>\n" -"\n" " </interface>\n" "</node>\n" ; diff --git a/src/notification-item.xml b/src/notification-item.xml index 05afd83..127eb3a 100644 --- a/src/notification-item.xml +++ b/src/notification-item.xml @@ -17,7 +17,10 @@ <property name="XAyatanaOrderingIndex" type="u" access="read" /> <!-- Methods --> - <!-- None currently --> + <method name="Scroll"> + <arg type="i" name="delta" direction="in" /> + <arg type="s" name="orientation" direction="in" /> + </method> <!-- Signals --> <signal name="NewIcon"> @@ -34,6 +37,5 @@ <arg type="s" name="label" direction="out" /> <arg type="s" name="guide" direction="out" /> </signal> - </interface> </node> diff --git a/tests/Makefile.in b/tests/Makefile.in index 528c09f..9f0135d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -292,6 +292,7 @@ SHELL = @SHELL@ STRIP = @STRIP@ TESTDEPS_CFLAGS = @TESTDEPS_CFLAGS@ TESTDEPS_LIBS = @TESTDEPS_LIBS@ +VALAC = @VALAC@ VALA_API_GEN = @VALA_API_GEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ |