1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
/****************************************************************************
* task_python.h - Functions for task 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 TASK_PYTHON_H
#define TASK_PYTHON_H
/** Task/performTaskAction
*
* SYNOPSIS
* long performTaskAction(widget, task, action)
* DESCRIPTION
* This peforms the given action on a task object. widget is a reference to
* the current widget. task is a reference to a task object you got from
* getTaskList(). Action is a number from 1 to 10. See the list below.
*
* Possible actions:
* * 1 = Maximize the window
* * 2 = Restore the window (use on iconified windows)
* * 3 = Iconify the window (minimize it)
* * 4 = Close the window
* * 5 = Activate (give focus to) the window
* * 6 = Raise the window
* * 7 = Lower the window
* * 8 = Smart Focus/Minimize - This will what the KDE taskbar does when you
* click on a window. If it is iconified, raise it. If it has focus,
* iconify it.
* * 9 = Toggle whether this window is always on top
* * 10 = Toggle wheter this window is shaded (rolled up)
* ARGUMENTS
* * long widget -- karamba
* * long task -- pointer to task
* * long action -- action number
* RETURN VALUE
* 1 if successful
*/
PyObject* py_perform_task_action(PyObject *self, PyObject *args);
/** Task/getTaskInfo
*
* SYNOPSIS
* list getTaskInfo(widget, task)
* DESCRIPTION
* This returns all of the info about a certain task in the form of a Python
* List. widget is a reference to the current widget. task is a reference to
* the window you want info about which you obtain by calling getTaskList().
* ARGUMENTS
* * long widget -- karamba
* * long task -- pointer to task
* RETURN VALUE
* Here is the format of the returned list by index value:
* * 0 = Task name (The full name of the window)
* * 1 = Icon name
* * 2 = Class name - This is for grouping tasks. All tasks with the same
* name can be grouped together because they are instances of the same
* program.
* * 3 = Desktop number - The desktop number this window is on
* * 4 = Is this window maximized? 0=no, 1=yes
* * 5 = Is this window iconified (minimized)? 0=no, 1=yes
* * 6 = Is this window shaded (rolled up)? 0=no, 1=yes
* * 7 = Is this window focused? 0=no, 1=yes
* * 8 = A reference back to the task you got info on
*/
PyObject* py_get_task_info(PyObject *self, PyObject *args);
/** Task/getStartupInfo
*
* SYNOPSIS
* list getStartupInfo(widget, task)
* DESCRIPTION
* This returns all of the info about a certain starting task in the form of
* a Python List. widget is a reference to the current widget. task is a
* reference to the window you want info about which you obtain by calling
* getStartupList().
* ARGUMENTS
* * long widget -- karamba
* * long task -- pointer to task
* RETURN VALUE
* Here is the format of the returned list by index value:
* * 0 = Task name (The full name of the window)
* * 1 = Icon name
* * 2 = Executable name
* * 3 = A reference back to the task you got info on
*/
PyObject* py_get_startup_info(PyObject* self, PyObject* args);
/** Task/getTaskNames
*
* SYNOPSIS
* list getTaskNames(widget)
* DESCRIPTION
* This returns a Python List containing the String names of all open
* windows on the system. This is for convience if you want to list open
* windows or see if a window by a certain name exists. Anything else
* requires the reference to the window you would obtain from getTaskList()
* ARGUMENTS
* * long widget -- karamba
* RETURN VALUE
* Task list
*/
PyObject* py_get_task_names(PyObject *self, PyObject *args);
/** Task/getTaskList
*
* SYNOPSIS
* list getTaskList(widget)
* DESCRIPTION
* This returns a Python List object with references to all the current
* windows open on this system. You can then call performTaskAction() or
* getTaskInfo() on any of the entries in the list.
* ARGUMENTS
* * long widget -- karamba
* RETURN VALUE
* Task list
*/
PyObject* py_get_task_list(PyObject *self, PyObject *args);
/** Task/getStartupList
*
* SYNOPSIS
* list getTaskList(widget)
* DESCRIPTION
* This returns a Python List object with references to all the current
* windows that are in the process of loading on this system. You can then
* call getStartupInfo() on any of the entries in the list.
* ARGUMENTS
* * long widget -- karamba
* RETURN VALUE
* startup list
*/
PyObject* py_get_startup_list(PyObject *self, PyObject *args);
#endif // TASK_PYTHON_H
|