Gtk2-AppIndicator-0.15/0000755000175000017500000000000012022603710013256 5ustar hanshansGtk2-AppIndicator-0.15/ppport.h0000644000175000017500000000000011772317201014751 0ustar hanshansGtk2-AppIndicator-0.15/t/0000755000175000017500000000000012022603710013521 5ustar hanshansGtk2-AppIndicator-0.15/t/Gtk2-AppIndicator.t0000644000175000017500000000120312002111232017053 0ustar hanshans# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl Gtk2-OSXApplication.t' ######################### # change 'tests => 2' to 'tests => last_test_to_print'; use strict; use warnings; use Gtk2 "-init"; use Test::More tests => 2; BEGIN { use_ok('Gtk2::AppIndicator') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. my $osxapp=new Gtk2::AppIndicator("myapp","iconname"); ok(ref($osxapp) eq "Gtk2::AppIndicator" ,"osxapp"); Gtk2-AppIndicator-0.15/LICENSE0000644000175000017500000001372212002174147014275 0ustar hanshansArtistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Gtk2-AppIndicator-0.15/lib/0000755000175000017500000000000012022603710014024 5ustar hanshansGtk2-AppIndicator-0.15/lib/Gtk2/0000755000175000017500000000000012022603710014633 5ustar hanshansGtk2-AppIndicator-0.15/lib/Gtk2/AppIndicator.pm0000644000175000017500000002130112022423142017542 0ustar hanshanspackage Gtk2::AppIndicator; use 5.006; use strict; use warnings; use Carp; use Gtk2; require Exporter; use AutoLoader; our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use Gtk2::OSXApplication ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.15'; #sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() # XS function. # my $constname; # our $AUTOLOAD; # ($constname = $AUTOLOAD) =~ s/.*:://; # croak "&Gtk2::AppIndicator::constant not defined" if $constname eq 'constant'; # my ($error, $val) = constant($constname); # if ($error) { croak $error; } # { # no strict 'refs'; # Fixed between 5.005_53 and 5.005_61 #XXX if ($] >= 5.00561) { #XXX *$AUTOLOAD = sub () { $val }; #XXX } #XXX else { # *$AUTOLOAD = sub { $val }; #XXX } # } # goto &$AUTOLOAD; #} require XSLoader; XSLoader::load('Gtk2::AppIndicator', $VERSION); # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. sub new { my $class=shift; my $application_id=shift or die "Gtk2::AppIndicator->new needs an application id"; my $iconname=shift or die "Gtk2::AppIndicator->new needs an icon name"; my $type=shift; if (not(defined($type))) { $type="application-status"; } my $tp=-1; if ($type eq "application-status") { $tp=1; } elsif ($type eq "communications") { $tp=2; } elsif ($type eq "system-services") { $tp=3; } elsif ($type eq "hardware") { $tp=4; } elsif ($type eq "other") { $tp=5; } if ($tp==-1) { die "Gtk2::AppIndicator->new -> category of indicator must be one of 'application-status','communications','system-services','hardware','other'}"; } my $obj={}; bless $obj,$class; $obj->{ind}=appindicator_new($application_id,$iconname,$tp); return $obj; } sub get_category { my $self=shift; return appindicator_get_category($self->{ind}); } sub set_icon_theme_path { my $self=shift; my $path=shift; appindicator_set_icon_theme_path($self->{ind},$path); } sub get_icon_theme_path { my $self=shift; return appindicator_get_icon_theme_path($self->{ind}); } sub set_icon_name_active { my $self=shift; my $name=shift; my $text=shift; if (not(defined($text))) { $text="no text"; } appindicator_set_icon_name_active($self->{ind},$name,$text); } sub get_icon_name_active { my $self=shift; return appindicator_get_icon($self->{ind}); } sub get_icon_desc_active { my $self=shift; return appindicator_get_icon_desc($self->{ind}); } sub get_id { my $self=shift; return appindicator_get_id($self->{ind}); } sub set_icon_name_attention { my $self=shift; my $name=shift; my $text=shift; if (not(defined($text))) { $text="no text"; } appindicator_set_icon_name_attention($self->{ind},$name,$text); } sub get_icon_name_attention { my $self=shift; return appindicator_get_attention_icon($self->{ind}); } sub get_icon_desc_attention { my $self=shift; return appindicator_get_attention_icon_desc($self->{ind}); } sub set_active { my $self=shift; appindicator_set_active($self->{ind}); } sub set_attention { my $self=shift; appindicator_set_attention($self->{ind}); } sub set_passive { my $self=shift; appindicator_set_passive($self->{ind}); } sub set_status { my $self=shift; my $status=shift; if ($status eq "passive") { $self->set_passive(); } elsif ($status eq "active") { $self->set_active(); } elsif ($status eq "attention") { $self->set_attention(); } else { die "usage: set_status <'passive'|'active'|'attention'>"; } } sub get_status { my $self=shift; return appindicator_get_status($self->{ind}); } sub set_menu { my $self=shift; my $menu=shift; $self->{menu}=$menu; appindicator_set_menu($self->{ind},$menu); } sub get_menu { my $self=shift; return $self->{menu}; } sub set_secondary_active_target { my $self=shift; my $widget=shift; $self->{secondary}=$widget; appindicator_set_secondary_active_target($self->{ind},$widget); } sub get_secondary_active_target { my $self=shift; return $self->{secondary}; } sub set_title { my $self=shift; my $title=shift; appindicator_set_title($self->{ind},$title); } sub get_title { my $self=shift; return appindicator_get_title($self->{ind}); } sub set_label { my $self=shift; my $label=shift or die "usage: set_label(label,guide)"; my $guide=shift or die "usage: set_label(label,guide)"; appindicator_set_label($self->{ind},$label,$guide); } sub get_label { my $self=shift; return appindicator_get_label($self->{ind}); } sub get_guide { my $self=shift; return appindicator_get_label_guide($self->{ind}); } 1; __END__ # Below is stub documentation for your module. You'd better edit it! =head1 NAME Gtk2::AppIndicator - Perl extension for libappindicator =head1 SYNOPSIS use Gtk2 '-init'; use Gtk2::AppIndicator; use Cwd; # Initialize the status icon. an_icon_name must be present # at the icon theme path location, with an image extension like # .jpg, .png or .svg, etc. $status_icon=Gtk2::AppIndicator->new("AnAppName","an_icon_name"); # If you want to be in control over your icon location, you # can set it manually. It must be an absolute path, in order # to work. my $absolute_current_working_directory=getcwd(); my $acwd=$absolute_current_working_directory; $status_icon->set_icon_theme_path($acwd); # Optionally set different icons # $status_icon->set_icon_name_active("an_icon_name"); # $status_icon->set_icon_name_attention("an_other_icon_name"); # $status_icon->set_icon_name_passive("an_other_icon_name"); # Add a menu to the indicator my $menu=Gtk2::Menu->new(); my $showcp=Gtk2::CheckMenuItem->new_with_mnemonic("_Show My App"); $showcp->set_active(1); $showcp->signal_connect("toggled",sub { hide_show($window,$showcp); }); my $quit=Gtk2::MenuItem->new_with_mnemonic("_Quit"); $quit->signal_connect("activate",sub { Gtk->main_quit(); }); $menu->append($showcp); $menu->append(Gtk2::SeparatorMenuItem->new()); $menu->append($quit); $status_icon->set_menu($menu); # Show our icon and set the state $menu->show_all(); $status_icon->set_active(); =head1 DESCRIPTION This module gives an interface to the new ubuntu Unity libappindicator stuff. =head1 FUNCTIONS $ind=Gtk2::AppIndicator->new($application_id,$active_icon_name [,$category]) Creates a new application indicator object with given name (id) and icon name for the active icon. Category must be one of { 'application-status','communications','system-services','hardware','other' } if set. if not set, it defaults to 'application-status'. $ind->set_icon_theme_path($path) Set the icon theme path to 'path'. This is where icons should be found with names like .png. $ind->get_icon_theme_path() Returns the (previously written) icon theme path, or undefined if not set. $ind->get_category() Returns the previously set category with the new function. $ind->get_id() Returns the application id given to the new function. $ind->set_icon_name_active($name) Sets the icon name for the active icon. $ind->get_icon_name_active() Returns the name of the icon for active state. $ind->set_icon_name_attention($name) Sets the icon name for the attention icon $ind->get_icon_name_attention() Returns the name of the icon for attention state. $ind->set_active() Makes the application indicator active. $ind->set_attention() Makes the application indicator show the attention icon. $ind->set_passive() Makes the application indicator enter passive state, not showing any icon $ind->set_state($state) Sets application indicator in the given state, one of {'active','passive','attention'}. $ind->get_state() Returns the current state of the application indicator. $ind->set_menu($menu) Sets the popup menu for the indicator icon. $ind->get_menu() Returns the current menu (not from the C code, but as stored in the perl object) $ind->set_secondary_activate_target($widget) Sets the secondary active target (under the middle mouse button) to $widget $ind->get_secondary_activate_target() Returns the current secondary active target (not from the C code, but as stored in the perl object) =head1 AUTHOR Hans Oesterholt, Eoesterhol@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2012 by Hans Oesterholt This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. =cut Gtk2-AppIndicator-0.15/fallback/0000755000175000017500000000000012022603710015015 5ustar hanshansGtk2-AppIndicator-0.15/fallback/const-c.inc0000644000175000017500000000527311772301316017075 0ustar hanshans#define PERL_constant_NOTFOUND 1 #define PERL_constant_NOTDEF 2 #define PERL_constant_ISIV 3 #define PERL_constant_ISNO 4 #define PERL_constant_ISNV 5 #define PERL_constant_ISPV 6 #define PERL_constant_ISPVN 7 #define PERL_constant_ISSV 8 #define PERL_constant_ISUNDEF 9 #define PERL_constant_ISUV 10 #define PERL_constant_ISYES 11 #ifndef NVTYPE typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ #endif #ifndef aTHX_ #define aTHX_ /* 5.6 or later define this for threading support. */ #endif #ifndef pTHX_ #define pTHX_ /* 5.6 or later define this for threading support. */ #endif static int constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { /* Initially switch on the length of the name. */ /* When generated this function returned values for the list of names given in this section of perl code. Rather than manually editing these functions to add or remove constants, which would result in this comment and section of code becoming inaccurate, we recommend that you edit this section of code, and use it to regenerate a new set of constant functions which you then use to replace the originals. Regenerate these constant functions by feeding this entire source file to perl -x #!/usr/bin/perl -w use ExtUtils::Constant qw (constant_types C_constant XS_constant); my $types = {map {($_, 1)} qw(IV)}; my @names = (qw(GTK_TYPE_OSX_APPLICATION GTK_TYPE_OSX_APPLICATION_ATTENTION_TYPE), {name=>"CRITICAL_REQUEST", type=>"IV", macro=>"1"}, {name=>"INFO_REQUEST", type=>"IV", macro=>"1"}); print constant_types(), "\n"; # macro defs foreach (C_constant ("Gtk2::OSXApplication", 'constant', 'IV', $types, undef, 3, @names) ) { print $_, "\n"; # C constant subs } print "\n#### XS Section:\n"; print XS_constant ("Gtk2::OSXApplication", $types); __END__ */ switch (len) { case 12: if (memEQ(name, "INFO_REQUEST", 12)) { *iv_return = INFO_REQUEST; return PERL_constant_ISIV; } break; case 16: if (memEQ(name, "CRITICAL_REQUEST", 16)) { *iv_return = CRITICAL_REQUEST; return PERL_constant_ISIV; } break; case 24: if (memEQ(name, "GTK_TYPE_OSX_APPLICATION", 24)) { #ifdef GTK_TYPE_OSX_APPLICATION *iv_return = GTK_TYPE_OSX_APPLICATION; return PERL_constant_ISIV; #else return PERL_constant_NOTDEF; #endif } break; case 39: if (memEQ(name, "GTK_TYPE_OSX_APPLICATION_ATTENTION_TYPE", 39)) { #ifdef GTK_TYPE_OSX_APPLICATION_ATTENTION_TYPE *iv_return = GTK_TYPE_OSX_APPLICATION_ATTENTION_TYPE; return PERL_constant_ISIV; #else return PERL_constant_NOTDEF; #endif } break; } return PERL_constant_NOTFOUND; } Gtk2-AppIndicator-0.15/fallback/const-xs.inc0000644000175000017500000000521011772301316017274 0ustar hanshansvoid constant(sv) PREINIT: #ifdef dXSTARG dXSTARG; /* Faster if we have it. */ #else dTARGET; #endif STRLEN len; int type; IV iv; /* NV nv; Uncomment this if you need to return NVs */ /* const char *pv; Uncomment this if you need to return PVs */ INPUT: SV * sv; const char * s = SvPV(sv, len); PPCODE: /* Change this to constant(aTHX_ s, len, &iv, &nv); if you need to return both NVs and IVs */ type = constant(aTHX_ s, len, &iv); /* Return 1 or 2 items. First is error message, or undef if no error. Second, if present, is found value */ switch (type) { case PERL_constant_NOTFOUND: sv = sv_2mortal(newSVpvf("%s is not a valid Gtk2::OSXApplication macro", s)); PUSHs(sv); break; case PERL_constant_NOTDEF: sv = sv_2mortal(newSVpvf( "Your vendor has not defined Gtk2::OSXApplication macro %s, used", s)); PUSHs(sv); break; case PERL_constant_ISIV: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHi(iv); break; /* Uncomment this if you need to return NOs case PERL_constant_ISNO: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHs(&PL_sv_no); break; */ /* Uncomment this if you need to return NVs case PERL_constant_ISNV: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHn(nv); break; */ /* Uncomment this if you need to return PVs case PERL_constant_ISPV: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHp(pv, strlen(pv)); break; */ /* Uncomment this if you need to return PVNs case PERL_constant_ISPVN: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHp(pv, iv); break; */ /* Uncomment this if you need to return SVs case PERL_constant_ISSV: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHs(sv); break; */ /* Uncomment this if you need to return UNDEFs case PERL_constant_ISUNDEF: break; */ /* Uncomment this if you need to return UVs case PERL_constant_ISUV: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHu((UV)iv); break; */ /* Uncomment this if you need to return YESs case PERL_constant_ISYES: EXTEND(SP, 1); PUSHs(&PL_sv_undef); PUSHs(&PL_sv_yes); break; */ default: sv = sv_2mortal(newSVpvf( "Unexpected return type %d while processing Gtk2::OSXApplication macro %s, used", type, s)); PUSHs(sv); } Gtk2-AppIndicator-0.15/Makefile.PL0000644000175000017500000000346012002722063015234 0ustar hanshansuse 5.006; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. open my $fh,"pkg-config --cflags appindicator-0.1 gtk+-2.0 2>/dev/null |"; my $inc=<$fh>; chomp $inc; close $fh; open $fh,"pkg-config --libs appindicator-0.1 gtk+-2.0 2>/dev/null |"; my $lib=<$fh>; chomp $lib; close $fh; if (not($inc)) { die "pkg-config --cflags appindicator-0.1 gtk+-2.0 didn't succeed, make sure it is righly installed"; } WriteMakefile( NAME => 'Gtk2::AppIndicator', VERSION_FROM => 'lib/Gtk2/AppIndicator.pm', # finds $VERSION PREREQ_PM => { Gtk2 => 1.2 }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/Gtk2/AppIndicator.pm', # retrieve abstract from module AUTHOR => 'Hans Oesterholt ') : ()), LIBS => [$lib], # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' #INC => '-I.'." $inc $perl2gtkInc", # e.g., '-I. -I/usr/include/other' INC => '-I.'." $inc", # e.g., '-I. -I/usr/include/other' # Un-comment this if you add C files to link with later: # OBJECT => '$(O_FILES)', # link all the C files too ); if (eval {require ExtUtils::Constant; 1}) { # If you edit these definitions to change the constants used by this module, # you will need to use the generated const-c.inc and const-xs.inc # files to replace their "fallback" counterparts before distributing your # changes. } else { use File::Copy; use File::Spec; foreach my $file ('const-c.inc', 'const-xs.inc') { my $fallback = File::Spec->catfile('fallback', $file); copy ($fallback, $file) or die "Can't copy $fallback to $file: $!"; } } Gtk2-AppIndicator-0.15/META.yml0000664000175000017500000000106112022603710014527 0ustar hanshans--- #YAML:1.0 name: Gtk2-AppIndicator version: 0.15 abstract: Perl extension for libappindicator author: - Hans Oesterholt license: unknown distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: ExtUtils::MakeMaker: 0 requires: Gtk2: 1.2 no_index: directory: - t - inc generated_by: ExtUtils::MakeMaker version 6.57_05 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 Gtk2-AppIndicator-0.15/Changes0000644000175000017500000000047612002722135014561 0ustar hanshans0.14 Made sure that not working pkg-config is righly detected 0.13 Made the API interface complete for AppIndicator 0.12 Wrong email address in distribution 0.11 dh-make-perl somehow doesn't work on a directory, so I changed it (back) to --cpan 0.09 Removed dependency on perl 5.012003, perl 5.006 is more then enough Gtk2-AppIndicator-0.15/COPYRIGHT0000644000175000017500000000006612002032251014545 0ustar hanshansArtistic Distributed under the same license as perl. Gtk2-AppIndicator-0.15/MANIFEST0000644000175000017500000000042212002074551014410 0ustar hanshansLICENSE build-deb Changes COPYRIGHT Makefile.PL MANIFEST AppIndicator.xs ppport.h README typemap gperl.h t/Gtk2-AppIndicator.t fallback/const-c.inc fallback/const-xs.inc lib/Gtk2/AppIndicator.pm META.yml Module meta-data (added by MakeMaker) Gtk2-AppIndicator-0.15/README0000644000175000017500000000216112002074657014150 0ustar hanshansGtk2-AppIndicator ================================ The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION ************ You need Perl Gtk2 and development libraries of Gtk2 on your system, including development libraries of appindicator-0.1. Then: perl Makefile.PL make make test sudo make install COPYRIGHT AND LICENCE Artistic Copyright (C) 2012 by Hans Oesterholt This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available. Gtk2-AppIndicator-0.15/build-deb0000755000175000017500000000351412002721004015031 0ustar hanshans#!/bin/bash DISTS="natty oneiric precise quantal" find . -name "*~" -exec rm {} \; TEST=3 echo "argument: $1" if [ "$1" = "test" ]; then TEST=1 else if [ "$1" != "ppa" ]; then echo "usage: ./build-dep " exit 1 else TEST=0 fi fi if [ "$2" = "" ]; then SUBVERSION=1 else SUBVERSION=$2 fi echo "Making source package" BUILDDEPS=libgtk2.0-dev,libappindicator-dev,libgtk2-perl PPA=ppa:0k-hans-f8/ppa rm *.tar.gz make clean perl Makefile.PL make dist for DIST in $DISTS do echo "building $DIST, SUBVERSION=$SUBVERSION" rm -rf /tmp/appind mkdir /tmp/appind #tar -C /tmp/appind -x -z -f $NAME.tar.gz cd /tmp/appind export DEB_BUILD_OPTIONS="nocheck" export DEBFULLNAME="Hans Oesterholt (Lives in the Netherlands)" export EMAIL="debian@oesterholt.net" DEB_BUILD_OPTIONS=nocheck dh-make-perl --dist="precise" --email="debian@oesterholt.net" --cpan Gtk2::AppIndicator NAME=`ls -d Gtk2-AppIndicator* | sed -e 's/.tar.gz//'` VERSION=`echo $NAME | sed -e 's/Gtk2[-]AppIndicator[-]//'` mv /tmp/appind/libgtk2-appindicator-perl_$VERSION.orig.tar.gz /tmp/appind/libgtk2-appindicator-perl_$VERSION.$DIST.orig.tar.gz DIR=/tmp/appind/$NAME cat $DIR/debian/changelog | sed -e "s/$VERSION-1/$VERSION.$DIST-$SUBVERSION/" | sed -e s/unstable/$DIST/ >$DIR/debian/changelog.ff mv $DIR/debian/changelog.ff $DIR/debian/changelog cat $DIR/debian/control | sed -e "s/^[ ]perl/ $BUILDDEPS/" >$DIR/debian/control.ff mv $DIR/debian/control.ff $DIR/debian/control cat $DIR/debian/rules | sed -e "s/dh/DEB_BUILD_OPTIONS=nocheck dh/" >$DIR/debian/rules.ff mv $DIR/debian/rules.ff $DIR/debian/rules cd $DIR DEB_BUILD_OPTIONS=nocheck debuild -S if [ $TEST = 0 ]; then (cd /tmp/appind/;dput $PPA *.changes) else (cd /tmp/appind/;sudo pbuilder build *.dsc) fi done Gtk2-AppIndicator-0.15/gperl.h0000444000175000017500000002631712001535730014552 0ustar hanshans/* * Copyright (C) 2003-2005 by the gtk2-perl team (see the file AUTHORS for * the full list) * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at your * option) any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public * License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. * * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/gperl.h,v 1.41 2005/04/26 22:56:56 ebassi Exp $ */ #ifndef _GPERL_H_ #define _GPERL_H_ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef WIN32 /* perl and glib disagree on a few macros... let the wookie win. */ # undef pipe # undef malloc # undef realloc # undef free #endif #include /* * miscellaneous */ /* never use this function directly. use GPERL_CALL_BOOT. */ void _gperl_call_XS (pTHX_ void (*subaddr) (pTHX_ CV *), CV * cv, SV ** mark); /* * call the boot code of a module by symbol rather than by name. * * in a perl extension which uses several xs files but only one pm, you * need to bootstrap the other xs files in order to get their functions * exported to perl. if the file has MODULE = Foo::Bar, the boot symbol * would be boot_Foo__Bar. */ #define GPERL_CALL_BOOT(name) \ { \ extern XS(name); \ _gperl_call_XS (aTHX_ name, cv, mark); \ } gpointer gperl_alloc_temp (int nbytes); gchar *gperl_filename_from_sv (SV *sv); SV *gperl_sv_from_filename (const gchar *filename); gboolean gperl_str_eq (const char * a, const char * b); guint gperl_str_hash (gconstpointer key); typedef struct { int argc; char **argv; char **shadow; } GPerlArgv; GPerlArgv * gperl_argv_new (); void gperl_argv_update (GPerlArgv *pargv); void gperl_argv_free (GPerlArgv *pargv); char * gperl_format_variable_for_output (SV * sv); /* internal trickery */ gpointer gperl_type_class (GType type); /* * enums and flags */ gboolean gperl_try_convert_enum (GType type, SV * sv, gint * val); gint gperl_convert_enum (GType type, SV * val); SV * gperl_convert_back_enum_pass_unknown (GType type, gint val); SV * gperl_convert_back_enum (GType type, gint val); gboolean gperl_try_convert_flag (GType type, const char * val_p, gint * val); gint gperl_convert_flag_one (GType type, const char * val_p); gint gperl_convert_flags (GType type, SV * val); SV * gperl_convert_back_flags (GType type, gint val); /* register a fundamental type (enums, flags...) */ typedef struct _GPerlValueWrapperClass GPerlValueWrapperClass; typedef SV* (*GPerlValueWrapFunc) (const GValue * value); typedef void (*GPerlValueUnwrapFunc) (GValue * value, SV * sv); struct _GPerlValueWrapperClass { GPerlValueWrapFunc wrap; GPerlValueUnwrapFunc unwrap; }; void gperl_register_fundamental (GType gtype, const char * package); void gperl_register_fundamental_full (GType gtype, const char * package, GPerlValueWrapperClass * wrapper_class); GType gperl_fundamental_type_from_package (const char * package); const char * gperl_fundamental_package_from_type (GType gtype); GPerlValueWrapperClass * gperl_fundamental_wrapper_class_from_type (GType gtype); /* * GErrors as exception objects */ /* it is rare that you should ever want or need these two functions. */ SV * gperl_sv_from_gerror (GError * error); void gperl_gerror_from_sv (SV * sv, GError ** error); void gperl_register_error_domain (GQuark domain, GType error_enum, const char * package); void gperl_croak_gerror (const char * ignored, GError * err); /* * inheritance management */ /* push @{$parent_package}::ISA, $child_package */ void gperl_set_isa (const char * child_package, const char * parent_package); /* unshift @{$parent_package}::ISA, $child_package */ void gperl_prepend_isa (const char * child_package, const char * parent_package); /* these work regardless of what the actual type is (GBoxed, GObject, GEnum, * or GFlags). in general it's safer to use the most specific one, but this * is handy when you don't care. */ GType gperl_type_from_package (const char * package); const char * gperl_package_from_type (GType type); /* * we need a GBoxed wrapper for a generic SV, so we can store SVs * in GObjects reliably. */ #define GPERL_TYPE_SV (gperl_sv_get_type ()) GType gperl_sv_get_type (void) G_GNUC_CONST; SV * gperl_sv_copy (SV * sv); void gperl_sv_free (SV * sv); /* * clean function wrappers for treating gchar* as UTF8 strings, in the * same idiom as the rest of the cast macros. these are wrapped up * as functions because comma expressions in macros get kinda tricky. */ /*const*/ gchar * SvGChar (SV * sv); SV * newSVGChar (const gchar * str); /* * GValues */ gboolean gperl_value_from_sv (GValue * value, SV * sv); SV * gperl_sv_from_value (const GValue * value); /* * GBoxed */ typedef struct _GPerlBoxedWrapperClass GPerlBoxedWrapperClass; typedef SV* (*GPerlBoxedWrapFunc) (GType gtype, const char * package, gpointer boxed, gboolean own); typedef gpointer (*GPerlBoxedUnwrapFunc) (GType gtype, const char * package, SV * sv); typedef void (*GPerlBoxedDestroyFunc) (SV * sv); struct _GPerlBoxedWrapperClass { GPerlBoxedWrapFunc wrap; GPerlBoxedUnwrapFunc unwrap; GPerlBoxedDestroyFunc destroy; }; GPerlBoxedWrapperClass * gperl_default_boxed_wrapper_class (void); void gperl_register_boxed (GType gtype, const char * package, GPerlBoxedWrapperClass * wrapper_class); SV * gperl_new_boxed (gpointer boxed, GType gtype, gboolean own); SV * gperl_new_boxed_copy (gpointer boxed, GType gtype); gpointer gperl_get_boxed_check (SV * sv, GType gtype); GType gperl_boxed_type_from_package (const char * package); const char * gperl_boxed_package_from_type (GType type); /* * GObject */ void gperl_register_object (GType gtype, const char * package); typedef void (*GPerlObjectSinkFunc) (GObject *); void gperl_register_sink_func (GType gtype, GPerlObjectSinkFunc func); void gperl_object_set_no_warn_unreg_subclass (GType gtype, gboolean nowarn); const char * gperl_object_package_from_type (GType gtype); HV * gperl_object_stash_from_type (GType gtype); GType gperl_object_type_from_package (const char * package); SV * gperl_new_object (GObject * object, gboolean own); GObject * gperl_get_object (SV * sv); GObject * gperl_get_object_check (SV * sv, GType gtype); SV * gperl_object_check_type (SV * sv, GType gtype); /* typedefs and macros for use with the typemap */ typedef gchar gchar_length; typedef gchar gchar_own; typedef gchar gchar_ornull; typedef char char_ornull; typedef char char_own; typedef GObject GObject_ornull; typedef GObject GObject_noinc; typedef gchar *GPerlFilename; typedef const gchar *GPerlFilename_const; typedef gchar *GPerlFilename_own; typedef GPerlFilename GPerlFilename_ornull; #define newSVGObject(obj) (gperl_new_object ((obj), FALSE)) #define newSVGObject_noinc(obj) (gperl_new_object ((obj), TRUE)) #define SvGObject(sv) (gperl_get_object (sv)) #define SvGObject_ornull(sv) ((sv && SvOK (sv)) ? SvGObject (sv) : NULL) /* * GSignal.xs */ SV * newSVGSignalFlags (GSignalFlags flags); GSignalFlags SvGSignalFlags (SV * sv); SV * newSVGSignalInvocationHint (GSignalInvocationHint * ihint); SV * newSVGSignalQuery (GSignalQuery * query); void gperl_signal_set_marshaller_for (GType instance_type, char * detailed_signal, GClosureMarshal marshaller); gulong gperl_signal_connect (SV * instance, char * detailed_signal, SV * callback, SV * data, GConnectFlags flags); /* * GClosure */ typedef struct _GPerlClosure GPerlClosure; struct _GPerlClosure { GClosure closure; SV * callback; SV * data; /* callback data */ gboolean swap; /* TRUE if target and data are to be swapped */ int id; }; /* evaluates to true if the instance and data are to be swapped on invocation */ #define GPERL_CLOSURE_SWAP_DATA(gpc) ((gpc)->swap) /* this is the one you want. */ GClosure * gperl_closure_new (SV * callback, SV * data, gboolean swap); /* very scary, use only if you really know what you are doing */ GClosure * gperl_closure_new_with_marshaller (SV * callback, SV * data, gboolean swap, GClosureMarshal marshaller); /* * GPerlCallback */ typedef struct _GPerlCallback GPerlCallback; struct _GPerlCallback { gint n_params; GType * param_types; GType return_type; SV * func; SV * data; void * priv; }; GPerlCallback * gperl_callback_new (SV * func, SV * data, gint n_params, GType param_types[], GType return_type); void gperl_callback_destroy (GPerlCallback * callback); void gperl_callback_invoke (GPerlCallback * callback, GValue * return_value, ...); /* * exception handling */ int gperl_install_exception_handler (GClosure * closure); void gperl_remove_exception_handler (guint tag); void gperl_run_exception_handlers (void); /* * to be used by extensions... */ gint gperl_handle_logs_for (const gchar * log_domain); /* * gparamspec.h / GParamSpec.xs */ SV * newSVGParamSpec (GParamSpec * pspec); GParamSpec * SvGParamSpec (SV * sv); SV * newSVGParamFlags (GParamFlags flags); GParamFlags SvGParamFlags (SV * sv); /* * gkeyfile.h / GKeyFile.xs */ #if GLIB_CHECK_VERSION (2, 6, 0) SV * newSVGKeyFile (GKeyFile * key_file); GKeyFile * SvGKeyFile (SV * sv); SV * newSVGKeyFileFlags (GKeyFileFlags flags); GKeyFileFlags SvGKeyFileFlags (SV * sv); #endif /* GLIB_CHECK_VERSION (2, 6, 0) */ const char * gperl_param_spec_package_from_type (GType gtype); /* * helpful debugging stuff */ #define GPERL_OBJECT_VITALS(o) \ ((o) \ ? form ("%s(%p)[%d]", G_OBJECT_TYPE_NAME (o), (o), \ G_OBJECT (o)->ref_count) \ : "NULL") #define GPERL_WRAPPER_VITALS(w) \ ((SvTRUE (w)) \ ? ((SvROK (w)) \ ? form ("SvRV(%p)->%s(%p)[%d]", (w), \ sv_reftype (SvRV (w), TRUE), \ SvRV (w), SvREFCNT (SvRV (w))) \ : "[not a reference!]") \ : "undef") #endif /* _GPERL_H_ */ Gtk2-AppIndicator-0.15/typemap0000644000175000017500000001371512001536164014674 0ustar hanshans# Copyright (C) 2003-2005, 2010 by the gtk2-perl team (see the file AUTHORS for # the full list) # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Library General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for # more details. # # You should have received a copy of the GNU Library General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # $Id$ # TYPEMAP gboolean T_BOOL gint T_IV guint T_UV gint8 T_IV guint8 T_UV gint16 T_IV guint16 T_UV gint32 T_IV guint32 T_UV gint64 T_GINT64 guint64 T_GUINT64 gshort T_SHORT gushort T_U_SHORT glong T_IV gulong T_UV gunichar T_GUNICHAR gchar T_IV gchar * T_GCHAR const gchar * T_GCHAR gchar_own * T_GCHAR_OWN gchar_length * T_GCHAR_LEN const gchar_length * T_GCHAR_LEN gchar_utf8_length * T_GCHAR_UTF8_LEN const gchar_utf8_length * T_GCHAR_UTF8_LEN gchar_ornull * T_GCHAR_ORNULL gchar_own_ornull * T_GCHAR_OWN_ORNULL const gchar_ornull * T_GCHAR_ORNULL char_ornull * T_CHAR_ORNULL char_own * T_CHAR_OWN char_own_ornull * T_CHAR_OWN_ORNULL const char_ornull * T_CHAR_ORNULL guchar T_UV guchar * T_GUCHAR const guchar * T_GUCHAR gfloat T_FLOAT gdouble T_DOUBLE gsize T_UV gssize T_IV gpointer T_PTR GObject* T_GPERL_GENERIC_WRAPPER GObject_ornull* T_GPERL_GENERIC_WRAPPER GObject_noinc* T_GPERL_GENERIC_WRAPPER GParamSpec* T_GPERL_GENERIC_WRAPPER GParamSpec_ornull* T_GPERL_GENERIC_WRAPPER GParamFlags T_GPERL_GENERIC_WRAPPER GSignalFlags T_GPERL_GENERIC_WRAPPER GKeyFile* T_GPERL_GENERIC_WRAPPER GKeyFileFlags T_GPERL_GENERIC_WRAPPER GBookmarkFile* T_GPERL_GENERIC_WRAPPER GIOCondition T_G_TYPE_IO_CONDITION GMainContext* T_G_MAIN_CONTEXT GMainLoop* T_G_MAIN_LOOP GPerlFilename T_GPERL_FILENAME GPerlFilename_const T_GPERL_FILENAME GPerlFilename_own T_GPERL_FILENAME_OWN GPerlFilename_ornull T_GPERL_FILENAME_ORNULL GOptionContext * T_GPERL_GENERIC_WRAPPER GOptionContext_own * T_GPERL_GENERIC_WRAPPER GOptionGroup * T_GPERL_GENERIC_WRAPPER GOptionGroup_own * T_GPERL_GENERIC_WRAPPER GUserDirectory T_GPERL_GENERIC_WRAPPER ##### INPUT # a general-purpose typemap... strips any trailing star and/or leading "const", # leaving only the type name in the form SvMyType. this allows you to make a # typedef such as "typedef MyType MyType_ornull", and SvMyType_ornull will be # called for those. T_GPERL_GENERIC_WRAPPER $var = Sv${(my $ntype = $type) =~ s/(?:const\s+)?([:\w]+)(?:\s*\*)$/$1/x; \$ntype} ($arg); T_GINT64 $var = SvGInt64 ($arg); T_GUINT64 $var = SvGUInt64 ($arg); T_GUNICHAR $var = g_utf8_get_char (SvGChar ($arg)); T_GCHAR /* same as SvGChar(), but not in a function */ sv_utf8_upgrade ($arg); $var = ($type)SvPV_nolen ($arg); T_GCHAR_ORNULL /* same as SvGChar(), but allows undef as NULL */ if (gperl_sv_is_defined ($arg)) { sv_utf8_upgrade ($arg); $var = ($type)SvPV_nolen ($arg); } else { $var = NULL; } T_GCHAR_LEN sv_utf8_upgrade ($arg); $var = ($type)SvPV ($arg, STRLEN_length_of_$var); XSauto_length_of_$var = STRLEN_length_of_$var; T_GCHAR_UTF8_LEN sv_utf8_upgrade ($arg); $var = ($type)SvPV ($arg, STRLEN_length_of_$var); XSauto_length_of_$var = g_utf8_strlen ($var, STRLEN_length_of_$var); T_GUCHAR $var = ($type)SvPV_nolen ($arg); T_CHAR_ORNULL if (gperl_sv_is_defined ($arg)) { $var = ($type)SvPV_nolen ($arg); } else { $var = NULL; } T_G_TYPE_IO_CONDITION $var = gperl_convert_flags (G_TYPE_IO_CONDITION, $arg); T_G_MAIN_CONTEXT if (!gperl_sv_is_ref ($arg)) { $var = NULL; } else { $var = INT2PTR ($type, SvIV (SvRV ($arg))); } T_G_MAIN_LOOP $var = INT2PTR ($type, SvIV (SvRV ($arg))) T_GPERL_FILENAME $var = ($type) gperl_filename_from_sv ($arg) T_GPERL_FILENAME_ORNULL $var = ($type) (gperl_sv_is_defined ($arg) ? gperl_filename_from_sv ($arg) : NULL) ###### OUTPUT T_GPERL_GENERIC_WRAPPER $arg = newSV${(my $ntype = $type) =~ s/(?:const\s+)?([:\w]+)(?:\s*\*)$/$1/; \$ntype} ($var); T_GINT64 $arg = newSVGInt64 ($var); T_GUINT64 $arg = newSVGUInt64 ($var); T_GUNICHAR { gchar temp[6]; gint length = g_unichar_to_utf8 ($var, temp); sv_setpvn ((SV*)$arg, temp, length); SvUTF8_on ($arg); } T_GCHAR /* same as newSVGChar(), but not in a function */ sv_setpv ((SV*)$arg, $var); SvUTF8_on ($arg); T_GCHAR_ORNULL /* newSVGChar() allows NULL, but T_GCHAR does not. allow NULL. */ if ($var) { sv_setpv ((SV*)$arg, $var); SvUTF8_on ($arg); } else { SvSetSV ($arg, &PL_sv_undef); } T_GCHAR_OWN /* used when we can directly own the returned string. */ /* we have to copy in the case when perl's malloc != gtk's malloc, * so best copy all the time. */ sv_setpv ((SV*)$arg, $var); SvUTF8_on ($arg); g_free ($var); T_GCHAR_OWN_ORNULL if ($var) { sv_setpv ((SV*)$arg, $var); SvUTF8_on ($arg); g_free ($var); } else { SvSetSV ($arg, &PL_sv_undef); } T_CHAR_ORNULL if ($var) { sv_setpv ((SV*)$arg, $var); } else { SvSetSV ($arg, &PL_sv_undef); } T_CHAR_OWN_ORNULL if ($var) { sv_setpv ((SV*)$arg, $var); g_free ($var); } else { SvSetSV ($arg, &PL_sv_undef); } T_GUCHAR sv_setpv ((SV*)$arg, (char*)$var); T_CHAR_OWN sv_setpv ((SV*)$arg, $var); g_free ($var); T_G_TYPE_IO_CONDITION $arg = gperl_convert_back_flags (G_TYPE_IO_CONDITION, $var); T_G_MAIN_CONTEXT sv_setref_pv ($arg, \"Glib::MainContext\", $var); g_main_context_ref ($var); T_G_MAIN_LOOP sv_setref_pv ($arg, \"Glib::MainLoop\", $var); g_main_loop_ref ($var); T_GPERL_FILENAME sv_setsv ($arg, sv_2mortal (gperl_sv_from_filename ($var))); T_GPERL_FILENAME_OWN sv_setsv ($arg, sv_2mortal (gperl_sv_from_filename ($var))); g_free ($var); Gtk2-AppIndicator-0.15/AppIndicator.xs0000644000175000017500000001074012002110565016210 0ustar hanshans#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include #include #include #include MODULE = Gtk2::AppIndicator PACKAGE = Gtk2::AppIndicator GObject *appindicator_new(name,iconname,type) char *name char *iconname int type CODE: AppIndicator *theApp; int tp; if (type==1) { tp=APP_INDICATOR_CATEGORY_APPLICATION_STATUS; } else if (type==2) { tp=APP_INDICATOR_CATEGORY_COMMUNICATIONS; } else if (type==3) { tp=APP_INDICATOR_CATEGORY_SYSTEM_SERVICES; } else if (type==4) { tp=APP_INDICATOR_CATEGORY_HARDWARE; } else { tp=APP_INDICATOR_CATEGORY_OTHER; } theApp=app_indicator_new (name,iconname,tp); RETVAL=(GObject *) theApp; OUTPUT: RETVAL void appindicator_set_icon_theme_path(self,path) GObject *self char *path CODE: app_indicator_set_icon_theme_path((AppIndicator *) self,path); void appindicator_set_icon_name_active(self,name,text) GObject *self char *name char *text CODE: app_indicator_set_icon_full ((AppIndicator *) self, name , text); void appindicator_set_icon_name_attention(self,name,text) GObject *self char *name char *text CODE: app_indicator_set_attention_icon_full((AppIndicator *) self, name , text); void appindicator_set_passive(self) GObject *self CODE: app_indicator_set_status ((AppIndicator *) self, APP_INDICATOR_STATUS_PASSIVE); void appindicator_set_active(self) GObject *self CODE: app_indicator_set_status ((AppIndicator *) self, APP_INDICATOR_STATUS_ACTIVE); void appindicator_set_attention(self) GObject *self CODE: app_indicator_set_status ((AppIndicator *) self, APP_INDICATOR_STATUS_ATTENTION); void appindicator_set_menu(self,menu) GObject *self GObject *menu CODE: app_indicator_set_menu((AppIndicator *) self,(GtkMenu *) menu); void appindicator_set_label(self,label,guide) GObject *self char *label char *guide CODE: app_indicator_set_label((AppIndicator *) self,label,guide); void appindicator_set_secondary_activate_target(self,widget) GObject *self GObject *widget CODE: app_indicator_set_secondary_activate_target((AppIndicator *) self,GTK_WIDGET(widget)); void appindicator_set_title(self,title) GObject *self char *title CODE: app_indicator_set_title((AppIndicator *) self,title); const gchar *appindicator_get_id(self) GObject *self; CODE: RETVAL=app_indicator_get_id((AppIndicator *) self); OUTPUT: RETVAL const char *appindicator_get_category(self) GObject *self; CODE: int cat=app_indicator_get_category((AppIndicator *) self); if (cat==APP_INDICATOR_CATEGORY_APPLICATION_STATUS) { RETVAL="application-status"; } else if (cat==APP_INDICATOR_CATEGORY_COMMUNICATIONS) { RETVAL="communications"; } else if (cat==APP_INDICATOR_CATEGORY_SYSTEM_SERVICES) { RETVAL="system-services"; } else if (cat==APP_INDICATOR_CATEGORY_HARDWARE) { RETVAL="hardware"; } else { RETVAL="other"; } OUTPUT: RETVAL const char *appindicator_get_status(self) GObject *self; CODE: int s=app_indicator_get_category((AppIndicator *) self); if (s==APP_INDICATOR_STATUS_PASSIVE) { RETVAL="passive"; } else if (s==APP_INDICATOR_STATUS_ACTIVE) { RETVAL="active"; } else if (s==APP_INDICATOR_STATUS_ATTENTION) { RETVAL="attention"; } else { RETVAL=""; } OUTPUT: RETVAL const char *appindicator_get_icon(self) GObject *self; CODE: RETVAL=app_indicator_get_icon((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_icon_desc(self) GObject *self; CODE: RETVAL=app_indicator_get_icon_desc((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_icon_theme_path(self) GObject *self; CODE: RETVAL=app_indicator_get_icon_theme_path((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_attention_icon(self) GObject *self; CODE: RETVAL=app_indicator_get_attention_icon((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_attention_icon_desc(self) GObject *self; CODE: RETVAL=app_indicator_get_attention_icon_desc((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_label(self) GObject *self; CODE: RETVAL=app_indicator_get_label((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_label_guide(self) GObject *self; CODE: RETVAL=app_indicator_get_label_guide((AppIndicator *)self); OUTPUT: RETVAL const char *appindicator_get_title(self) GObject *self; CODE: RETVAL=app_indicator_get_title((AppIndicator *)self); OUTPUT: RETVAL