1
/****************************************************************************
2
* task_python.h - Functions for task python api
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>
8
* This file is part of Superkaramba.
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
****************************************************************************/
28
//****p* Task/performTaskAction
31
// long performTaskAction(widget, task, action)
33
// This peforms the given action on a task object. widget is a reference to
34
// the current widget. task is a reference to a task object you got from
35
// getTaskList(). Action is a number from 1 to 10. See the list below.
38
// * 1 = Maximize the window
39
// * 2 = Restore the window (use on iconified windows)
40
// * 3 = Iconify the window (minimize it)
41
// * 4 = Close the window
42
// * 5 = Activate (give focus to) the window
43
// * 6 = Raise the window
44
// * 7 = Lower the window
45
// * 8 = Smart Focus/Minimize - This will what the KDE taskbar does when you
46
// click on a window. If it is iconified, raise it. If it has focus,
48
// * 9 = Toggle whether this window is always on top
49
// * 10 = Toggle wheter this window is shaded (rolled up)
51
// * long widget -- karamba
52
// * long task -- pointer to task
53
// * long action -- action number
57
PyObject* py_perform_task_action(PyObject *self, PyObject *args);
59
//****p* Task/getTaskInfo
62
// list getTaskInfo(widget, task)
64
// This returns all of the info about a certain task in the form of a Python
65
// List. widget is a reference to the current widget. task is a reference to
66
// the window you want info about which you obtain by calling getTaskList().
68
// * long widget -- karamba
69
// * long task -- pointer to task
71
// Here is the format of the returned list by index value:
72
// * 0 = Task name (The full name of the window)
74
// * 2 = Class name - This is for grouping tasks. All tasks with the same
75
// name can be grouped together because they are instances of the same
77
// * 3 = Desktop number - The desktop number this window is on
78
// * 4 = Is this window maximized? 0=no, 1=yes
79
// * 5 = Is this window iconified (minimized)? 0=no, 1=yes
80
// * 6 = Is this window shaded (rolled up)? 0=no, 1=yes
81
// * 7 = Is this window focused? 0=no, 1=yes
82
// * 8 = A reference back to the task you got info on
84
PyObject* py_get_task_info(PyObject *self, PyObject *args);
86
//****p* Task/getStartupInfo
89
// list getStartupInfo(widget, task)
91
// This returns all of the info about a certain starting task in the form of
92
// a Python List. widget is a reference to the current widget. task is a
93
// reference to the window you want info about which you obtain by calling
96
// * long widget -- karamba
97
// * long task -- pointer to task
99
// Here is the format of the returned list by index value:
100
// * 0 = Task name (The full name of the window)
102
// * 2 = Executable name
103
// * 3 = A reference back to the task you got info on
105
PyObject* py_get_startup_info(PyObject* self, PyObject* args);
107
//****p* Task/getTaskNames
110
// list getTaskNames(widget)
112
// This returns a Python List containing the String names of all open
113
// windows on the system. This is for convience if you want to list open
114
// windows or see if a window by a certain name exists. Anything else
115
// requires the reference to the window you would obtain from getTaskList()
117
// * long widget -- karamba
121
PyObject* py_get_task_names(PyObject *self, PyObject *args);
123
//****p* Task/getTaskList
126
// list getTaskList(widget)
128
// This returns a Python List object with references to all the current
129
// windows open on this system. You can then call performTaskAction() or
130
// getTaskInfo() on any of the entries in the list.
132
// * long widget -- karamba
136
PyObject* py_get_task_list(PyObject *self, PyObject *args);
138
//****p* Task/getStartupList
141
// list getTaskList(widget)
143
// This returns a Python List object with references to all the current
144
// windows that are in the process of loading on this system. You can then
145
// call getStartupInfo() on any of the entries in the list.
147
// * long widget -- karamba
151
PyObject* py_get_startup_list(PyObject *self, PyObject *args);
153
#endif // TASK_PYTHON_H