complete shedchange text information
[lttv.git] / ltt / branches / poly / lttv / modules / guiControlFlow / Process_List.h
CommitLineData
f0d936c0 1#ifndef _PROCESS_LIST_H
2#define _PROCESS_LIST_H
3
fa2c4dbe 4#include <gtk/gtk.h>
5#include <lttv/state.h>
6#include <ltt/ltt.h>
80a52ff8 7#include "Draw_Item.h"
fa2c4dbe 8
9/* The process list
10 *
11 * Tasks :
12 * Create a process list
13 * contains the data for the process list
14 * tells the height of the process list widget
15 * provides methods to add/remove process from the list
16 * note : the sync with drawing is left to the caller.
17 * provides helper function to convert a process unique identifier to
18 * pixels (in height).
5f16133f 19 *
20 * //FIXME : connect the scrolled window adjustment with the list.
fa2c4dbe 21 */
22
5f16133f 23typedef struct _ProcessInfo {
24
25 guint pid;
26 LttTime birth;
27
28} ProcessInfo;
29
80a52ff8 30typedef struct _HashedProcessData {
31
32 GtkTreeRowReference *RowRef;
33 DrawContext *draw_context;
5f16133f 34
80a52ff8 35} HashedProcessData;
36
5f16133f 37struct _ProcessList {
38
39 GtkWidget *Process_List_VC;
40 GtkListStore *Store_M;
41
42 /* A hash table by PID to speed up process position find in the list */
43 GHashTable *Process_Hash;
44
45 guint Number_Of_Process;
f7afe191 46 gboolean Test_Process_Sent;
5f16133f 47
48};
49
50
f0d936c0 51typedef struct _ProcessList ProcessList;
52
4c69e0cc 53ProcessList *processlist_construct(void);
54void processlist_destroy(ProcessList *Process_List);
55GtkWidget *processlist_get_widget(ProcessList *Process_List);
f0d936c0 56
fa2c4dbe 57// out : success (0) and height
4c69e0cc 58int processlist_add(ProcessList *Process_List, guint pid, LttTime *birth,
432a7065 59 gchar *name,
80a52ff8 60 guint *height, HashedProcessData **Hashed_Process_Data);
fa2c4dbe 61// out : success (0) and height
4c69e0cc 62int processlist_remove(ProcessList *Process_List, guint pid, LttTime *birth);
fa2c4dbe 63
4c69e0cc 64guint processlist_get_height(ProcessList *Process_List);
fa2c4dbe 65
66// Returns 0 on success
4c69e0cc 67gint processlist_get_process_pixels(ProcessList *Process_List,
fa2c4dbe 68 guint pid, LttTime *birth,
80a52ff8 69 guint *y, guint *height,
70 HashedProcessData **Hashed_Process_Data);
f0d936c0 71#endif // _PROCESS_LIST_H
This page took 0.025539 seconds and 4 git commands to generate.