diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/Makefile.in | 645 | ||||
-rw-r--r-- | example/simple-client-vala.c | 881 |
2 files changed, 1526 insertions, 0 deletions
diff --git a/example/Makefile.in b/example/Makefile.in new file mode 100644 index 0000000..c8972db --- /dev/null +++ b/example/Makefile.in @@ -0,0 +1,645 @@ +# 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@ +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 +am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(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_simple_client_OBJECTS = simple_client-simple-client.$(OBJEXT) +simple_client_OBJECTS = $(am_simple_client_OBJECTS) +am__DEPENDENCIES_1 = +simple_client_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(top_builddir)/src/libappindicator$(VER).la +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +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 +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +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) $(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) +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@ +DLLTOOL = @DLLTOOL@ +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_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +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@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +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_AR = @ac_ct_AR@ +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@ +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@ +@USE_GTK3_FALSE@VER = +@USE_GTK3_TRUE@VER = 3 +CLEANFILES = $(am__append_1) +EXTRA_DIST = simple-client-test-icon.png simple-client-vala.vala + +######################################### +######################################### +simple_client_SOURCES = \ + simple-client.c + + +#-Werror removed for Vala +simple_client_CFLAGS = \ + $(LIBRARY_CFLAGS) \ + -DLOCAL_ICON="\"$(abs_srcdir)/simple-client-test-icon.png\"" \ + -Wall \ + -I$(top_srcdir)/src + +simple_client_LDADD = \ + $(LIBRARY_LIBS) \ + $(top_builddir)/src/libappindicator$(VER).la + + +######################################### +######################################### +@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 +$(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 example/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu example/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): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +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) + +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 $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +simple_client-simple-client.o: simple-client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_CFLAGS) $(CFLAGS) -MT simple_client-simple-client.o -MD -MP -MF $(DEPDIR)/simple_client-simple-client.Tpo -c -o simple_client-simple-client.o `test -f 'simple-client.c' || echo '$(srcdir)/'`simple-client.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_client-simple-client.Tpo $(DEPDIR)/simple_client-simple-client.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple-client.c' object='simple_client-simple-client.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_CFLAGS) $(CFLAGS) -c -o simple_client-simple-client.o `test -f 'simple-client.c' || echo '$(srcdir)/'`simple-client.c + +simple_client-simple-client.obj: simple-client.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_client_CFLAGS) $(CFLAGS) -MT simple_client-simple-client.obj -MD -MP -MF $(DEPDIR)/simple_client-simple-client.Tpo -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` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_client-simple-client.Tpo $(DEPDIR)/simple_client-simple-client.Po +@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple-client.c' object='simple_client-simple-client.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_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 + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; 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: $(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 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) 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." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +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 -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.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 \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + +@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. +.NOEXPORT: diff --git a/example/simple-client-vala.c b/example/simple-client-vala.c new file mode 100644 index 0000000..08306c3 --- /dev/null +++ b/example/simple-client-vala.c @@ -0,0 +1,881 @@ +/* simple-client-vala.c generated by valac 0.14.0, 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 __lambda3_ (SimpleClient* self); +static void ___lambda3__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 __lambda4_ (SimpleClient* self, gint delta, guint direction); +static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self); +static gboolean __lambda5_ (SimpleClient* self); +static gboolean ___lambda5__gsource_func (gpointer self); +static void __lambda6_ (SimpleClient* self); +static void ___lambda6__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 __lambda7_ (SimpleClient* self); +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 __lambda12_ (Block2Data* _data2_); +static void ___lambda12__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; + gchar** _tmp0_; + gint _tmp0__length1; + SimpleClient* _tmp1_; + SimpleClient* sc; + _tmp0_ = args; + _tmp0__length1 = args_length1; + _tmp1_ = simple_client_new (_tmp0_, _tmp0__length1); + sc = _tmp1_; + 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_; + AppIndicator* _tmp1_; + AppIndicator* _tmp2_; + AppIndicator* _tmp3_; + 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); + _g_object_unref0 (self->priv->ci); + self->priv->ci = _tmp0_; + _tmp1_ = self->priv->ci; + app_indicator_set_status (_tmp1_, APP_INDICATOR_STATUS_ACTIVE); + _tmp2_ = self->priv->ci; + app_indicator_set_attention_icon (_tmp2_, "indicator-messages-new"); + _tmp3_ = self->priv->ci; + app_indicator_set_label (_tmp3_, "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) { + GtkWidget* _tmp0_; + GtkWidget* _tmp1_; + gboolean _tmp2_ = FALSE; + g_return_if_fail (self != NULL); + g_return_if_fail (widget != NULL); + _tmp0_ = widget; + _tmp1_ = widget; + _tmp2_ = gtk_widget_is_sensitive (_tmp1_); + gtk_widget_set_sensitive (_tmp0_, !_tmp2_); +} + + +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 __lambda3_ (SimpleClient* self) { + AppIndicator* _tmp0_; + AppIndicatorStatus _tmp1_ = 0; + _tmp0_ = self->priv->ci; + _tmp1_ = app_indicator_get_status (_tmp0_); + if (_tmp1_ == APP_INDICATOR_STATUS_ATTENTION) { + AppIndicator* _tmp2_; + _tmp2_ = self->priv->ci; + app_indicator_set_status (_tmp2_, APP_INDICATOR_STATUS_ACTIVE); + } else { + AppIndicator* _tmp3_; + _tmp3_ = self->priv->ci; + app_indicator_set_status (_tmp3_, APP_INDICATOR_STATUS_ATTENTION); + } +} + + +static void ___lambda3__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda3_ (self); +} + + +static void simple_client_append_submenu (SimpleClient* self, GtkMenuItem* item) { + Block1Data* _data1_; + GtkMenu* _tmp0_; + GtkMenu* _tmp1_; + GtkMenu* menu; + GtkMenuItem* mi = NULL; + GtkMenuItem* _tmp2_; + GtkMenuItem* _tmp3_; + GtkMenuItem* _tmp4_; + GtkMenuItem* _tmp5_; + GtkMenuItem* _tmp6_; + GtkMenuItem* _tmp7_; + GtkMenuItem* _tmp8_; + GtkMenuItem* _tmp9_; + GtkMenuItem* _tmp10_; + GtkMenuItem* _tmp11_; + GtkMenuItem* _tmp12_; + GtkMenuItem* _tmp13_; + GtkMenuItem* _tmp14_; + GtkMenuItem* _tmp15_; + GtkMenuItem* _tmp16_; + GtkMenuItem* _tmp17_; + GtkMenuItem* _tmp18_; + GtkMenuItem* _tmp19_; + AppIndicator* _tmp20_; + GtkMenuItem* _tmp21_; + GtkMenuItem* _tmp22_; + 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 (); + _tmp1_ = g_object_ref_sink (_tmp0_); + menu = _tmp1_; + _tmp2_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 1"); + _tmp3_ = g_object_ref_sink (_tmp2_); + _g_object_unref0 (mi); + mi = _tmp3_; + _tmp4_ = mi; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp4_); + _tmp5_ = mi; + g_signal_connect (_tmp5_, "activate", (GCallback) ___lambda0__gtk_menu_item_activate, self); + _tmp6_ = mi; + _tmp7_ = _g_object_ref0 (_tmp6_); + _data1_->prev_mi = _tmp7_; + _tmp8_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 2"); + _tmp9_ = g_object_ref_sink (_tmp8_); + _g_object_unref0 (mi); + mi = _tmp9_; + _tmp10_ = mi; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp10_); + _tmp11_ = mi; + g_signal_connect_data (_tmp11_, "activate", (GCallback) ___lambda1__gtk_menu_item_activate, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); + _tmp12_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Sub 3"); + _tmp13_ = g_object_ref_sink (_tmp12_); + _g_object_unref0 (mi); + mi = _tmp13_; + _tmp14_ = mi; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp14_); + _tmp15_ = mi; + g_signal_connect (_tmp15_, "activate", (GCallback) ___lambda2__gtk_menu_item_activate, self); + _tmp16_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle Attention"); + _tmp17_ = g_object_ref_sink (_tmp16_); + _g_object_unref0 (mi); + mi = _tmp17_; + _tmp18_ = mi; + gtk_menu_shell_append ((GtkMenuShell*) menu, (GtkWidget*) _tmp18_); + _tmp19_ = mi; + g_signal_connect (_tmp19_, "activate", (GCallback) ___lambda3__gtk_menu_item_activate, self); + _tmp20_ = self->priv->ci; + _tmp21_ = mi; + app_indicator_set_secondary_activate_target (_tmp20_, (GtkWidget*) _tmp21_); + gtk_widget_show_all ((GtkWidget*) menu); + _tmp22_ = item; + gtk_menu_item_set_submenu (_tmp22_, (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) { + gboolean _tmp0_; + gboolean _tmp1_; + g_return_if_fail (self != NULL); + g_return_if_fail (item != NULL); + _tmp0_ = self->priv->can_haz_label; + self->priv->can_haz_label = !_tmp0_; + _tmp1_ = self->priv->can_haz_label; + if (_tmp1_) { + GtkMenuItem* _tmp2_; + _tmp2_ = item; + gtk_menu_item_set_label (_tmp2_, "Hide label"); + } else { + GtkMenuItem* _tmp3_; + _tmp3_ = item; + gtk_menu_item_set_label (_tmp3_, "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 __lambda4_ (SimpleClient* self, gint delta, guint direction) { + gint _tmp0_; + gchar* _tmp1_ = NULL; + gchar* _tmp2_; + guint _tmp3_; + gchar* _tmp4_ = NULL; + gchar* _tmp5_; + gchar* _tmp6_ = NULL; + gchar* _tmp7_; + _tmp0_ = delta; + _tmp1_ = g_strdup_printf ("%i", _tmp0_); + _tmp2_ = _tmp1_; + _tmp3_ = direction; + _tmp4_ = g_strdup_printf ("%u", _tmp3_); + _tmp5_ = _tmp4_; + _tmp6_ = g_strconcat ("Got scroll event! delta: ", _tmp2_, ", direction: ", _tmp5_, "\n", NULL); + _tmp7_ = _tmp6_; + g_print ("%s", _tmp7_); + _g_free0 (_tmp7_); + _g_free0 (_tmp5_); + _g_free0 (_tmp2_); +} + + +static void ___lambda4__app_indicator_scroll_event (AppIndicator* _sender, gint delta, guint direction, gpointer self) { + __lambda4_ (self, delta, direction); +} + + +static gboolean __lambda5_ (SimpleClient* self) { + gboolean result = FALSE; + gint _tmp0_; + gboolean _tmp1_; + _tmp0_ = self->priv->percentage; + self->priv->percentage = (_tmp0_ + 1) % 100; + _tmp1_ = self->priv->can_haz_label; + if (_tmp1_) { + AppIndicator* _tmp2_; + gint _tmp3_; + gchar* _tmp4_ = NULL; + gchar* _tmp5_; + gchar* _tmp6_ = NULL; + gchar* _tmp7_; + _tmp2_ = self->priv->ci; + _tmp3_ = self->priv->percentage; + _tmp4_ = g_strdup_printf ("%i", _tmp3_ + 1); + _tmp5_ = _tmp4_; + _tmp6_ = g_strconcat (_tmp5_, "%", NULL); + _tmp7_ = _tmp6_; + app_indicator_set_label (_tmp2_, _tmp7_, ""); + _g_free0 (_tmp7_); + _g_free0 (_tmp5_); + } else { + AppIndicator* _tmp8_; + _tmp8_ = self->priv->ci; + app_indicator_set_label (_tmp8_, "", ""); + } + result = TRUE; + return result; +} + + +static gboolean ___lambda5__gsource_func (gpointer self) { + gboolean result; + result = __lambda5_ (self); + return result; +} + + +static void __lambda6_ (SimpleClient* self) { + g_print ("1\n"); +} + + +static void ___lambda6__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda6_ (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 __lambda7_ (SimpleClient* self) { + g_print ("2\n"); +} + + +static void ___lambda7__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda7_ (self); +} + + +static void __lambda8_ (Block2Data* _data2_) { + SimpleClient * self; + self = _data2_->self; + simple_client_toggle_sensitivity (self, (GtkWidget*) _data2_->submenu); +} + + +static void ___lambda8__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda8_ (self); +} + + +static void __lambda9_ (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 ___lambda9__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda9_ (self); +} + + +static void __lambda10_ (Block2Data* _data2_) { + SimpleClient * self; + gboolean _tmp0_; + self = _data2_->self; + _tmp0_ = self->priv->active; + if (_tmp0_) { + AppIndicator* _tmp1_; + _tmp1_ = self->priv->ci; + app_indicator_set_status (_tmp1_, APP_INDICATOR_STATUS_ATTENTION); + gtk_menu_item_set_label (_data2_->att, "I'm okay now"); + self->priv->active = FALSE; + } else { + AppIndicator* _tmp2_; + _tmp2_ = self->priv->ci; + app_indicator_set_status (_tmp2_, APP_INDICATOR_STATUS_ACTIVE); + gtk_menu_item_set_label (_data2_->att, "Get Attention"); + self->priv->active = FALSE; + } +} + + +static void ___lambda10__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda10_ (self); +} + + +static void __lambda11_ (Block2Data* _data2_) { + SimpleClient * self; + self = _data2_->self; + simple_client_label_toggle (self, _data2_->show); +} + + +static void ___lambda11__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda11_ (self); +} + + +static void __lambda12_ (Block2Data* _data2_) { + SimpleClient * self; + gboolean _tmp0_ = FALSE; + self = _data2_->self; + _tmp0_ = gtk_check_menu_item_get_active (_data2_->icon); + if (_tmp0_) { + AppIndicator* _tmp1_; + _tmp1_ = self->priv->ci; + app_indicator_set_icon (_tmp1_, "simple-client-test-icon.png"); + } else { + AppIndicator* _tmp2_; + _tmp2_ = self->priv->ci; + app_indicator_set_icon (_tmp2_, "indicator-messages"); + } +} + + +static void ___lambda12__gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { + __lambda12_ (self); +} + + +void simple_client_run (SimpleClient* self) { + Block2Data* _data2_; + AppIndicator* _tmp0_; + GtkMenu* _tmp1_; + GtkMenu* _tmp2_; + GtkCheckMenuItem* _tmp3_; + GtkCheckMenuItem* _tmp4_; + GtkCheckMenuItem* chk; + GtkMenu* _tmp5_; + GSList* _tmp6_; + GtkRadioMenuItem* _tmp7_; + GtkRadioMenuItem* _tmp8_; + GtkRadioMenuItem* _tmp9_; + GtkRadioMenuItem* radio; + GtkMenu* _tmp10_; + GtkMenuItem* _tmp11_; + GtkMenuItem* _tmp12_; + GtkMenu* _tmp13_; + GtkMenuItem* _tmp14_; + GtkMenuItem* _tmp15_; + GtkMenuItem* toggle_item; + GtkMenu* _tmp16_; + GtkImageMenuItem* _tmp17_; + GtkImageMenuItem* _tmp18_; + GtkMenu* _tmp19_; + GtkMenuItem* _tmp20_; + GtkMenuItem* _tmp21_; + GtkMenu* _tmp22_; + GtkMenuItem* _tmp23_; + GtkMenuItem* _tmp24_; + GtkMenu* _tmp25_; + GtkCheckMenuItem* _tmp26_; + GtkCheckMenuItem* _tmp27_; + GtkMenu* _tmp28_; + AppIndicator* _tmp29_; + GtkMenu* _tmp30_; + g_return_if_fail (self != NULL); + _data2_ = g_slice_new0 (Block2Data); + _data2_->_ref_count_ = 1; + _data2_->self = simple_client_ref (self); + _tmp0_ = self->priv->ci; + g_signal_connect (_tmp0_, "scroll-event", (GCallback) ___lambda4__app_indicator_scroll_event, self); + g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda5__gsource_func, simple_client_ref (self), simple_client_unref); + _tmp1_ = (GtkMenu*) gtk_menu_new (); + _tmp2_ = g_object_ref_sink (_tmp1_); + _g_object_unref0 (self->priv->menu); + self->priv->menu = _tmp2_; + _tmp3_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("1"); + _tmp4_ = g_object_ref_sink (_tmp3_); + chk = _tmp4_; + g_signal_connect ((GtkMenuItem*) chk, "activate", (GCallback) ___lambda6__gtk_menu_item_activate, self); + _tmp5_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp5_, (GtkWidget*) ((GtkMenuItem*) chk)); + gtk_widget_show ((GtkWidget*) chk); + _tmp6_ = NULL; + _tmp7_ = (GtkRadioMenuItem*) gtk_radio_menu_item_new_with_label (_tmp6_, "2"); + _tmp8_ = g_object_ref_sink (_tmp7_); + _tmp9_ = _tmp8_; + __g_slist_free__g_object_unref0_0 (_tmp6_); + radio = _tmp9_; + g_signal_connect ((GtkMenuItem*) radio, "activate", (GCallback) ___lambda7__gtk_menu_item_activate, self); + _tmp10_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp10_, (GtkWidget*) ((GtkMenuItem*) radio)); + gtk_widget_show ((GtkWidget*) radio); + _tmp11_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("3"); + _tmp12_ = g_object_ref_sink (_tmp11_); + _data2_->submenu = _tmp12_; + _tmp13_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp13_, (GtkWidget*) _data2_->submenu); + simple_client_append_submenu (self, _data2_->submenu); + gtk_widget_show ((GtkWidget*) _data2_->submenu); + _tmp14_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Toggle 3"); + _tmp15_ = g_object_ref_sink (_tmp14_); + toggle_item = _tmp15_; + g_signal_connect_data (toggle_item, "activate", (GCallback) ___lambda8__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + _tmp16_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp16_, (GtkWidget*) toggle_item); + gtk_widget_show ((GtkWidget*) toggle_item); + _tmp17_ = (GtkImageMenuItem*) gtk_image_menu_item_new_from_stock (GTK_STOCK_NEW, NULL); + _tmp18_ = g_object_ref_sink (_tmp17_); + _data2_->imgitem = _tmp18_; + g_signal_connect_data ((GtkMenuItem*) _data2_->imgitem, "activate", (GCallback) ___lambda9__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + _tmp19_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp19_, (GtkWidget*) ((GtkMenuItem*) _data2_->imgitem)); + gtk_widget_show ((GtkWidget*) _data2_->imgitem); + _tmp20_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Get Attention"); + _tmp21_ = g_object_ref_sink (_tmp20_); + _data2_->att = _tmp21_; + g_signal_connect_data (_data2_->att, "activate", (GCallback) ___lambda10__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + _tmp22_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp22_, (GtkWidget*) _data2_->att); + gtk_widget_show ((GtkWidget*) _data2_->att); + _tmp23_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Show Label"); + _tmp24_ = g_object_ref_sink (_tmp23_); + _data2_->show = _tmp24_; + simple_client_label_toggle (self, _data2_->show); + g_signal_connect_data (_data2_->show, "activate", (GCallback) ___lambda11__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + _tmp25_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp25_, (GtkWidget*) _data2_->show); + gtk_widget_show ((GtkWidget*) _data2_->show); + _tmp26_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Set Local Icon"); + _tmp27_ = g_object_ref_sink (_tmp26_); + _data2_->icon = _tmp27_; + g_signal_connect_data ((GtkMenuItem*) _data2_->icon, "activate", (GCallback) ___lambda12__gtk_menu_item_activate, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); + _tmp28_ = self->priv->menu; + gtk_menu_shell_append ((GtkMenuShell*) _tmp28_, (GtkWidget*) ((GtkMenuItem*) _data2_->icon)); + gtk_widget_show ((GtkWidget*) _data2_->icon); + _tmp29_ = self->priv->ci; + _tmp30_ = self->priv->menu; + app_indicator_set_menu (_tmp29_, _tmp30_); + 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); + } +} + + + |