evisum/src/bin/ui/ui.h

119 lines
2.5 KiB
C
Raw Normal View History

2020-04-14 10:24:27 -07:00
#ifndef __UI_H__
2018-06-04 03:11:21 -07:00
#define __UI_H__
#include <Elementary.h>
2020-04-23 04:28:07 -07:00
#include "gettext.h"
#include "system/process.h"
#include "../evisum_config.h"
#include "ui/ui_util.h"
#include "ui/ui_cache.h"
2018-06-04 03:11:21 -07:00
2020-04-23 04:28:07 -07:00
#define _(STR) gettext(STR)
2020-06-02 05:23:41 -07:00
#define EVISUM_WIN_WIDTH 600
#define EVISUM_WIN_HEIGHT 520
2019-08-24 08:28:56 -07:00
2018-06-04 03:11:21 -07:00
typedef enum
{
SORT_BY_NONE,
SORT_BY_PID,
SORT_BY_UID,
SORT_BY_NICE,
SORT_BY_PRI,
SORT_BY_CPU,
SORT_BY_THREADS,
SORT_BY_SIZE,
SORT_BY_RSS,
SORT_BY_CMD,
SORT_BY_STATE,
SORT_BY_CPU_USAGE,
} Sort_Type;
typedef struct Ui
{
Evas_Object *win;
Evas_Object *menu;
Evas_Object *scroller;
Evas_Object *content;
Evas_Object *btn_general;
Evas_Object *btn_cpu;
Evas_Object *btn_mem;
Evas_Object *btn_storage;
Evas_Object *btn_misc;
Evas_Object *disk_view;
Evas_Object *disk_activity;
Evas_Object *cpu_view;
Evas_Object *cpu_activity;
Evas_Object *mem_view;
Evas_Object *mem_activity;
Evas_Object *misc_view;
Evas_Object *misc_activity;
Evas_Object *system_activity;
Elm_Transit *transit;
Evas_Object *current_view;
Eina_Bool cpu_visible;
Eina_Bool misc_visible;
Eina_Bool disk_visible;
Eina_Bool mem_visible;
Evas_Object *progress_cpu;
Evas_Object *progress_mem;
Evas_Object *progress_mem_used;
Evas_Object *progress_mem_cached;
Evas_Object *progress_mem_buffered;
Evas_Object *progress_mem_shared;
Evas_Object *progress_mem_swap;
Evas_Object *btn_pid;
Evas_Object *btn_uid;
Evas_Object *btn_size;
Evas_Object *btn_rss;
Evas_Object *btn_cmd;
Evas_Object *btn_state;
Evas_Object *btn_cpu_usage;
2020-04-14 10:24:27 -07:00
Evisum_Ui_Cache *cache;
Evas_Object *genlist_procs;
Evas_Object *entry_search;
Evas_Object *entry_search_border;
2018-06-04 03:11:21 -07:00
Ecore_Thread *thread_system;
Ecore_Thread *thread_process;
2020-06-24 05:11:10 -07:00
Ecore_Thread *thread_cpu;
2018-06-04 03:11:21 -07:00
Ecore_Timer *timer_pid;
pid_t selected_pid;
pid_t program_pid;
2018-06-04 03:11:21 -07:00
char *search_text;
2018-06-04 03:11:21 -07:00
Eina_Bool skip_wait;
Eina_Bool ready;
2018-06-04 03:11:21 -07:00
Eina_List *cpu_times;
Eina_List *cpu_list;
int poll_delay;
2018-06-04 03:11:21 -07:00
Sort_Type sort_type;
Eina_Bool sort_reverse;
Eina_Bool show_self;
2020-02-15 18:03:32 -08:00
Eina_Bool zfs_mounted;
uint64_t incoming_max;
uint64_t outgoing_max;
2018-06-04 03:11:21 -07:00
} Ui;
Ui *
2020-05-13 05:15:58 -07:00
evisum_ui_add(Evas_Object *win);
2018-06-04 03:11:21 -07:00
void
2020-05-13 05:15:58 -07:00
evisum_ui_shutdown(Ui *ui);
2018-06-04 03:11:21 -07:00
#endif