~ubuntu-branches/ubuntu/dapper/superkaramba/dapper

« back to all changes in this revision

Viewing changes to src/task_python.h

  • Committer: Package Import Robot
  • Author(s): Daniel T Chen
  • Date: 2005-08-04 16:24:59 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20050804162459-izj1kjrrobm4wvsz
Tags: 0.36-1ubuntu2
* Fix FTBFS:
  + Remove config.{guess,sub}.
  + Build-Depend on autotools-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
*  task_python.h  -  Functions for task python api
 
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
23
****************************************************************************/
 
24
 
 
25
#ifndef TASK_PYTHON_H
 
26
#define TASK_PYTHON_H
 
27
 
 
28
//****p* Task/performTaskAction
 
29
//
 
30
// SYNOPSIS
 
31
//   long performTaskAction(widget, task, action)
 
32
// DESCRIPTION
 
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.
 
36
//
 
37
//   Possible actions:
 
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,
 
47
//         iconify it.
 
48
//   * 9 = Toggle whether this window is always on top
 
49
//   * 10 = Toggle wheter this window is shaded (rolled up)
 
50
// ARGUMENTS
 
51
//   * long widget -- karamba
 
52
//   * long task -- pointer to task
 
53
//   * long action -- action number
 
54
// RETURN VALUE
 
55
//   1 if successful
 
56
//***
 
57
PyObject* py_perform_task_action(PyObject *self, PyObject *args);
 
58
 
 
59
//****p* Task/getTaskInfo
 
60
//
 
61
// SYNOPSIS
 
62
//   list getTaskInfo(widget, task)
 
63
// DESCRIPTION
 
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().
 
67
// ARGUMENTS
 
68
//   * long widget -- karamba
 
69
//   * long task -- pointer to task
 
70
// RETURN VALUE
 
71
//   Here is the format of the returned list by index value:
 
72
//   * 0 = Task name (The full name of the window)
 
73
//   * 1 = Icon name
 
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
 
76
//         program.
 
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
 
83
//***
 
84
PyObject* py_get_task_info(PyObject *self, PyObject *args);
 
85
 
 
86
//****p* Task/getStartupInfo
 
87
//
 
88
// SYNOPSIS
 
89
//   list getStartupInfo(widget, task)
 
90
// DESCRIPTION
 
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
 
94
//   getStartupList().
 
95
// ARGUMENTS
 
96
//   * long widget -- karamba
 
97
//   * long task -- pointer to task
 
98
// RETURN VALUE
 
99
//   Here is the format of the returned list by index value:
 
100
//   * 0 = Task name (The full name of the window)
 
101
//   * 1 = Icon name
 
102
//   * 2 = Executable name
 
103
//   * 3 = A reference back to the task you got info on
 
104
//***
 
105
PyObject* py_get_startup_info(PyObject* self, PyObject* args);
 
106
 
 
107
//****p* Task/getTaskNames
 
108
//
 
109
// SYNOPSIS
 
110
//   list getTaskNames(widget)
 
111
// DESCRIPTION
 
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()
 
116
// ARGUMENTS
 
117
//   * long widget -- karamba
 
118
// RETURN VALUE
 
119
//   Task list
 
120
//***
 
121
PyObject* py_get_task_names(PyObject *self, PyObject *args);
 
122
 
 
123
//****p* Task/getTaskList
 
124
//
 
125
// SYNOPSIS
 
126
//   list getTaskList(widget)
 
127
// DESCRIPTION
 
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.
 
131
// ARGUMENTS
 
132
//   * long widget -- karamba
 
133
// RETURN VALUE
 
134
//   Task list
 
135
//***
 
136
PyObject* py_get_task_list(PyObject *self, PyObject *args);
 
137
 
 
138
//****p* Task/getStartupList
 
139
//
 
140
// SYNOPSIS
 
141
//   list getTaskList(widget)
 
142
// DESCRIPTION
 
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.
 
146
// ARGUMENTS
 
147
//   * long widget -- karamba
 
148
// RETURN VALUE
 
149
//   startup list
 
150
//***
 
151
PyObject* py_get_startup_list(PyObject *self, PyObject *args);
 
152
 
 
153
#endif // TASK_PYTHON_H