• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

superkaramba

  • sources
  • kde-4.12
  • kdeutils
  • superkaramba
  • src
  • python
python/karamba.h
Go to the documentation of this file.
1 /****************************************************************************
2 * karamba_python.h - Functions for calling python scripts
3 *
4 * Copyright (C) 2003 Hans Karlsson <karlsson.h@home.se>
5 * Copyright (C) 2003-2004 Adam Geitgey <adam@rootnode.org>
6 * Copyright (c) 2004 Petri Damst� <damu@iki.fi>
7 *
8 * This file is part of SuperKaramba.
9 *
10 * SuperKaramba is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * SuperKaramba is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with SuperKaramba; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 ****************************************************************************/
24 
25 #ifndef KARAMBA_PYTHON_H
26 #define KARAMBA_PYTHON_H
27 
28 class QString;
29 class KMenu;
30 class Task;
31 class Startup;
32 class Karamba;
33 class Meter;
34 struct _object;
35 typedef struct _object PyObject;
36 struct _ts;
37 typedef struct _ts PyThreadState;
38 class ThemeFile;
39 
40 class KarambaPython
41 {
42 protected:
43  bool pythonThemeExtensionLoaded;
44  PyObject *pName, *pModule;
45  PyObject *pDict;
46  static PyThreadState* mainThreadState;
47 
48  void getLock(PyThreadState** myThreadState);
49  PyObject* getFunc(const char* function);
50  void releaseLock(PyThreadState* myThreadState);
51  bool callObject(const char* func, PyObject* pArgs, bool lock = true);
52 
53 public:
54  KarambaPython(const ThemeFile& theme, bool reloading);
55  ~KarambaPython();
56 
57  static void initPython();
58  static void shutdownPython();
59 
60  bool isExtensionLoaded()
61  {
62  return pythonThemeExtensionLoaded;
63  }
64  bool initWidget(Karamba* k);
65  bool widgetUpdated(Karamba* k);
66  bool widgetClosed(Karamba* k);
67  bool menuOptionChanged(Karamba* k, QString key, bool value);
68  bool meterClicked(Karamba* k, Meter* meter, int button);
69  bool meterClicked(Karamba* k, QString anchor, int button);
70  bool widgetClicked(Karamba* k, int x, int y, int button);
71  bool keyPressed(Karamba* k, const Meter* meter, const QString& text);
72  bool widgetMouseMoved(Karamba* k, int x, int y, int button);
73  bool menuItemClicked(Karamba* k, KMenu* menu, long id);
74  bool activeTaskChanged(Karamba* k, Task* t);
75  bool taskAdded(Karamba* k, Task* t);
76  bool taskRemoved(Karamba* k, Task* t);
77  bool startupAdded(Karamba* k, Startup* t);
78  bool startupRemoved(Karamba* k, Startup* t);
79  bool commandOutput(Karamba* k, int pid, char *buffer);
80  bool commandFinished(Karamba* k, int pid);
81  bool itemDropped(Karamba* k, QString text, int x, int y);
82  bool themeNotify(Karamba* k, const char *from, const char *txt);
83  bool systrayUpdated(Karamba* k);
84  bool desktopChanged(Karamba* k, int desktop);
85  bool wallpaperChanged(Karamba* k, int desktop);
86 };
87 
88 PyObject* py_testInterface(PyObject *, PyObject *args);
89 
90 #endif // KARAMBA_PYTHON_H
KarambaPython::widgetClicked
bool widgetClicked(Karamba *k, int x, int y, int button)
Definition: python/karamba.cpp:538
KarambaPython::taskRemoved
bool taskRemoved(Karamba *k, Task *t)
Definition: python/karamba.cpp:569
PyObject
struct _object PyObject
Definition: python/karamba.h:35
ThemeFile
Definition: themefile.h:41
KarambaPython::taskAdded
bool taskAdded(Karamba *k, Task *t)
Definition: python/karamba.cpp:563
KarambaPython::pythonThemeExtensionLoaded
bool pythonThemeExtensionLoaded
Definition: python/karamba.h:43
KarambaPython::KarambaPython
KarambaPython(const ThemeFile &theme, bool reloading)
Definition: python/karamba.cpp:346
KarambaPython::commandFinished
bool commandFinished(Karamba *k, int pid)
Definition: python/karamba.cpp:593
KarambaPython::callObject
bool callObject(const char *func, PyObject *pArgs, bool lock=true)
Definition: python/karamba.cpp:468
Startup
Represents a task which is in the process of starting.
Definition: taskmanager.h:547
KarambaPython::commandOutput
bool commandOutput(Karamba *k, int pid, char *buffer)
Definition: python/karamba.cpp:587
PyThreadState
struct _ts PyThreadState
Definition: python/karamba.h:37
KarambaPython::wallpaperChanged
bool wallpaperChanged(Karamba *k, int desktop)
Definition: python/karamba.cpp:628
KarambaPython::itemDropped
bool itemDropped(Karamba *k, QString text, int x, int y)
Definition: python/karamba.cpp:599
Karamba
Definition: karamba.h:52
KarambaPython::widgetMouseMoved
bool widgetMouseMoved(Karamba *k, int x, int y, int button)
Definition: python/karamba.cpp:551
KarambaPython::initPython
static void initPython()
Definition: python/karamba.cpp:412
KarambaPython::menuOptionChanged
bool menuOptionChanged(Karamba *k, QString key, bool value)
Definition: python/karamba.cpp:514
KarambaPython::initWidget
bool initWidget(Karamba *k)
Definition: python/karamba.cpp:496
KarambaPython::widgetUpdated
bool widgetUpdated(Karamba *k)
Definition: python/karamba.cpp:502
KarambaPython::getLock
void getLock(PyThreadState **myThreadState)
Definition: python/karamba.cpp:438
KarambaPython::mainThreadState
static PyThreadState * mainThreadState
Definition: python/karamba.h:46
KarambaPython::systrayUpdated
bool systrayUpdated(Karamba *k)
Definition: python/karamba.cpp:616
KarambaPython::meterClicked
bool meterClicked(Karamba *k, Meter *meter, int button)
Definition: python/karamba.cpp:526
KarambaPython::startupRemoved
bool startupRemoved(Karamba *k, Startup *t)
Definition: python/karamba.cpp:581
KarambaPython::isExtensionLoaded
bool isExtensionLoaded()
Definition: python/karamba.h:60
KarambaPython::desktopChanged
bool desktopChanged(Karamba *k, int desktop)
Definition: python/karamba.cpp:622
py_testInterface
PyObject * py_testInterface(PyObject *, PyObject *args)
KarambaPython::pModule
PyObject * pModule
Definition: python/karamba.h:44
KarambaPython::menuItemClicked
bool menuItemClicked(Karamba *k, KMenu *menu, long id)
Definition: python/karamba.cpp:520
KarambaPython::keyPressed
bool keyPressed(Karamba *k, const Meter *meter, const QString &text)
Definition: python/karamba.cpp:544
KarambaPython::getFunc
PyObject * getFunc(const char *function)
Definition: python/karamba.cpp:460
KarambaPython::~KarambaPython
~KarambaPython()
Definition: python/karamba.cpp:397
KarambaPython::shutdownPython
static void shutdownPython()
Definition: python/karamba.cpp:427
KarambaPython::startupAdded
bool startupAdded(Karamba *k, Startup *t)
Definition: python/karamba.cpp:575
Meter
Definition: meters/meter.h:23
KarambaPython::activeTaskChanged
bool activeTaskChanged(Karamba *k, Task *t)
Definition: python/karamba.cpp:557
KarambaPython::widgetClosed
bool widgetClosed(Karamba *k)
Definition: python/karamba.cpp:508
Task
A dynamic interface to a task (main window).
Definition: taskmanager.h:73
KarambaPython::themeNotify
bool themeNotify(Karamba *k, const char *from, const char *txt)
Definition: python/karamba.cpp:605
KarambaPython
Definition: python/karamba.h:40
KarambaPython::releaseLock
void releaseLock(PyThreadState *myThreadState)
Definition: python/karamba.cpp:448
KarambaPython::pName
PyObject * pName
Definition: python/karamba.h:44
KarambaPython::pDict
PyObject * pDict
Definition: python/karamba.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal