diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 2bda8f7717adf28da4af0d34fb82f63d2868c31d (patch) | |
tree | 8d927b7b47a90c4adb646482a52613f58acd6f8c /superkaramba/src/menu_python.h | |
download | tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.tar.gz tdeutils-2bda8f7717adf28da4af0d34fb82f63d2868c31d.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'superkaramba/src/menu_python.h')
-rw-r--r-- | superkaramba/src/menu_python.h | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/superkaramba/src/menu_python.h b/superkaramba/src/menu_python.h new file mode 100644 index 0000000..88f8ea0 --- /dev/null +++ b/superkaramba/src/menu_python.h @@ -0,0 +1,124 @@ +/**************************************************************************** +* menu_python.h - Functions for menu python api +* +* Copyright (C) 2003 Hans Karlsson <karlsson.h@home.se> +* Copyright (C) 2003-2004 Adam Geitgey <adam@rootnode.org> +* Copyright (c) 2004 Petri Damstén <damu@iki.fi> +* +* This file is part of SuperKaramba. +* +* SuperKaramba is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* SuperKaramba 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 General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with SuperKaramba; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +****************************************************************************/ + +#ifndef MENU_PYTHON_H +#define MENU_PYTHON_H + +/** Menu/createMenu +* +* SYNOPSIS +* long createMenu(widget) +* DESCRIPTION +* This creates an empty popup menu and returns a pointer to the menu. +* ARGUMENTS +* * long widget -- karamba +* RETURN VALUE +* pointer to menu +*/ +PyObject* py_create_menu(PyObject *self, PyObject *args); + +/** Menu/deleteMenu +* +* SYNOPSIS +* long deleteMenu(widget, menu) +* DESCRIPTION +* This deletes the referenced menu if that menu exists. +* ARGUMENTS +* * long widget -- karamba +* * long menu -- pointer to menu +* RETURN VALUE +* 1 if menu existed and was deleted, returns 0 otherwise. +*/ +PyObject* py_delete_menu(PyObject *self, PyObject *args); + +/** Menu/addMenuItem +* +* SYNOPSIS +* long addMenuItem(widget, menu, text, icon) +* DESCRIPTION +* This adds an entry to the given menu with label text and with given icon. +* icon can be just an application name in which case the user's current +* icon set is used, or can be a path to a 16x16 png file. +* +* The function returns the id of the menu item, which identifies that popup +* menu item uniquely among popupmenu items application-wide or returns 0 +* if the given menu doesn't exist. +* ARGUMENTS +* * long widget -- karamba +* * long menu -- pointer to menu +* * string text -- text for menu item +* * string icon -- icon +* RETURN VALUE +* menu item id +*/ +PyObject* py_add_menu_item(PyObject *self, PyObject *args); + +/** Menu/addMenuSeparator +* +* SYNOPSIS +* long addMenuSeparator(widget, menu) +* DESCRIPTION +* This adds an menu separator to the given menu. +* ARGUMENTS +* * long widget -- karamba +* * long menu -- pointer to menu +* RETURN VALUE +* menu item id +*/ +PyObject* py_add_menu_separator(PyObject *self, PyObject *args); + +/** Menu/removeMenuItem +* +* SYNOPSIS +* long removeMenuItem(widget, menu, id) +* DESCRIPTION +* This removes the item with given id from given menu if that menu exists. +* ARGUMENTS +* * long widget -- karamba +* * long menu -- pointer to menu +* * long id -- menu item id +* RETURN VALUE +* 1 if the menu item existed and was removed or returns zero otherwise. +*/ +PyObject* py_remove_menu_item(PyObject *self, PyObject *args); + +/** Menu/popupMenu +* +* SYNOPSIS +* long popupMenu(widget, menu, x, y) +* DESCRIPTION +* This pops up the given menu at the given co-ordinates. The co-ordinates +* are relative to the widget, not the screen. You can use negative +* co-ordinates to make a menu appear to the right of or above your theme. +* ARGUMENTS +* * long widget -- karamba +* * long menu -- pointer to menu +* * long x -- x coordinate +* * long y -- y coordinate +* RETURN VALUE +* 1 if the menu existed and was popped up, returns 0 otherwise. +*/ +PyObject* py_popup_menu(PyObject *self, PyObject *args); + +#endif // MENU_PYTHON_H |