• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • superkaramba
 

superkaramba

  • superkaramba
  • src
karamba_python.h
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én <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 TQString;
29 class TDEPopupMenu;
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  PyObject* getFunc(const char* function);
49  bool callObject(const char* func, PyObject* pArgs);
50 
51 public:
52  KarambaPython(const ThemeFile& theme, bool reloading);
53  ~KarambaPython();
54 
55  static void initPython();
56  static void shutdownPython();
57 
58  bool isExtensionLoaded() { return pythonThemeExtensionLoaded; };
59  bool initWidget(karamba* k);
60  bool widgetUpdated(karamba* k);
61  bool widgetClosed(karamba* k);
62  bool menuOptionChanged(karamba* k, TQString key, bool value);
63  bool meterClicked(karamba* k, Meter* meter, int button);
64  bool meterClicked(karamba* k, TQString anchor, int button);
65  bool widgetClicked(karamba* k, int x, int y, int button);
66  bool keyPressed(karamba* k, const Meter* meter, const TQString& text);
67  bool widgetMouseMoved(karamba* k, int x, int y, int button);
68  bool menuItemClicked(karamba* k, TDEPopupMenu* menu, long id);
69  bool activeTaskChanged(karamba* k, Task* t);
70  bool taskAdded(karamba* k, Task* t);
71  bool taskRemoved(karamba* k, Task* t);
72  bool startupAdded(karamba* k, Startup* t);
73  bool startupRemoved(karamba* k, Startup* t);
74  bool commandOutput(karamba* k, int pid, char *buffer);
75  bool commandFinished(karamba* k, int pid);
76  bool itemDropped(karamba* k, TQString text, int x, int y);
77  bool themeNotify(karamba* k, const char *from, const char *txt);
78  bool systrayUpdated(karamba* k);
79  bool desktopChanged(karamba* k, int desktop);
80  bool wallpaperChanged(karamba* k, int desktop);
81 };
82 
83 #endif // KARAMBA_PYTHON_H
ThemeFile
Definition: themefile.h:42
Startup
Represents a task which is in the process of starting.
Definition: taskmanager.h:376
Task
A dynamic interface to a task (main window).
Definition: taskmanager.h:49

superkaramba

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

superkaramba

Skip menu "superkaramba"
  • kcalc
  •   knumber
  • superkaramba
Generated for superkaramba by doxygen 1.8.13
This website is maintained by Timothy Pearson.