Back to index

libappindicator  12.10.0
appindicatormodule.c
Go to the documentation of this file.
00001 /*
00002 Python bindings for libappindicator.
00003 
00004 Copyright 2009 Canonical Ltd.
00005 
00006 Authors:
00007     Eitan Isaacson <eitan@ascender.com>
00008     Neil Jagdish Patel <neil.patel@canonical.com>
00009 
00010 This program is free software: you can redistribute it and/or modify it 
00011 under the terms of either or both of the following licenses:
00012 
00013 1) the GNU Lesser General Public License version 3, as published by the 
00014 Free Software Foundation; and/or
00015 2) the GNU Lesser General Public License version 2.1, as published by 
00016 the Free Software Foundation.
00017 
00018 This program is distributed in the hope that it will be useful, but 
00019 WITHOUT ANY WARRANTY; without even the implied warranties of 
00020 MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 
00021 PURPOSE.  See the applicable version of the GNU Lesser General Public 
00022 License for more details.
00023 
00024 You should have received a copy of both the GNU Lesser General Public 
00025 License version 3 and version 2.1 along with this program.  If not, see 
00026 <http://www.gnu.org/licenses/>
00027 */
00028 #include <pygobject.h>
00029  
00030 void pyappindicator_register_classes (PyObject *d); 
00031 extern PyMethodDef pyappindicator_functions[];
00032 
00033 DL_EXPORT(void)
00034 init_appindicator(void)
00035 {
00036               PyObject *m, *d;
00037               
00038               init_pygobject ();
00039               
00040               m = Py_InitModule ("_appindicator", pyappindicator_functions);
00041               d = PyModule_GetDict (m);
00042               
00043               pyappindicator_register_classes (d);
00044 
00045               _appindicator_add_constants (m, "APP_INDICATOR_");
00046               if (PyErr_Occurred ()) {
00047                             Py_FatalError ("can't initialise module appindicator");
00048               }
00049 }