Update memory sizes to 64 bit and fix compilation warnings.
[lxde/lxtask.git] / src / interface.h
1 /* $Id: interface.h 3940 2008-02-10 22:48:45Z nebulon $
2 *
3 * Copyright (c) 2006 Johannes Zellner, <webmaster@nebulon.de>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19
20 #ifndef INTERFACE_H
21 #define INTERFACE_H
22
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26
27 #include <sys/types.h>
28 #include <sys/stat.h>
29 #include <unistd.h>
30 #include <string.h>
31 #include <stdio.h>
32 #include <stdlib.h>
33
34 #include <gdk/gdkkeysyms.h>
35 #include <gtk/gtk.h>
36
37 #include "functions.h"
38 #include "callbacks.h"
39 #include "types.h"
40
41 GtkTreeStore *list_store;
42 GtkTreeSelection *selection;
43 GtkWidget *treeview;
44 GtkWidget *mainmenu;
45 GtkWidget *taskpopup;
46 GtkWidget *priopopup;
47 GtkWidget *cpu_usage_progress_bar;
48 GtkWidget *mem_usage_progress_bar;
49 GtkWidget *cpu_usage_progress_bar_box;
50 GtkWidget *mem_usage_progress_bar_box;
51
52 enum {
53 COLUMN_NAME = 0,
54 COLUMN_UNAME,
55 COLUMN_TIME,
56 COLUMN_RSS,
57 COLUMN_MEM,
58 COLUMN_PID,
59 COLUMN_STATE,
60 COLUMN_PRIO,
61 COLUMN_PPID
62 };
63
64 GtkTreeViewColumn *column;
65
66 void change_list_store_view(void);
67 void create_list_store(void);
68
69 GtkWidget* create_main_window (void);
70 GtkWidget* create_taskpopup (void);
71 GtkWidget* create_mainmenu (void);
72 GtkWidget *create_prio_submenu(void);
73
74 void show_about_dialog(void);
75
76 void fill_list_item(guint i, GtkTreeIter *iter);
77 void add_new_list_item(guint i);
78 gint compare_list_item(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data);
79 gint compare_int_list_item(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data);
80 gint compare_size_list_item(GtkTreeModel *model, GtkTreeIter *iter1, GtkTreeIter *iter2, gpointer column);
81 gint compare_string_list_item(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data);
82 void remove_list_item(pid_t i);
83 void refresh_list_item(guint i);
84
85 void change_task_view(void);
86 void change_full_path(void);
87
88 #endif