evisum/src/bin/ui/ui.h

107 lines
1.9 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"
2020-11-09 06:28:55 -08:00
#include "evisum_actions.h"
#include "system/machine.h"
#include "system/process.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
2020-06-28 12:04:03 -07:00
#define EVISUM_WIN_HEIGHT 600
2019-08-24 08:28:56 -07:00
2018-06-04 03:11:21 -07:00
typedef struct Ui
{
2020-12-24 02:16:19 -08:00
pid_t program_pid;
Ecore_Event_Handler *handler_sig;
2020-11-09 06:28:55 -08:00
struct
{
Evas_Object *win;
int width;
int height;
int x, y;
Eina_Bool restart;
int poll_delay;
int sort_type;
Eina_Bool sort_reverse;
Eina_Bool show_self;
Eina_Bool show_kthreads;
Eina_Bool show_user;
Eina_Bool show_scroller;
} proc;
2020-11-09 06:28:55 -08:00
Evas_Object *win_about;
2020-10-03 07:44:32 -07:00
struct
{
Evas_Object *win;
int width;
int height;
int x, y;
Eina_Bool restart;
} cpu;
struct
{
2020-12-15 09:23:32 -08:00
Evas_Object *win;
int width;
int height;
int x, y;
Eina_Bool restart;
2020-12-15 09:23:32 -08:00
Eina_Bool zfs_mounted;
} mem;
struct
{
Evas_Object *win;
int width;
int height;
int x, y;
Eina_Bool restart;
} disk;
struct
{
Evas_Object *win;
int width;
int height;
int x, y;
Eina_Bool restart;
2020-10-05 08:11:26 -07:00
} sensors;
2018-06-04 03:11:21 -07:00
} Ui;
Ui *
evisum_ui_init(void);
2018-06-04 03:11:21 -07:00
void
evisum_ui_shutdown(Ui *ui);
2020-12-31 14:58:25 -08:00
Evas_Object *
evisum_ui_main_menu_create(Ui *ui, Evas_Object *parent, Evas_Object *obj);
2020-11-09 05:40:00 -08:00
void
evisum_ui_activate(Ui *ui, Evisum_Action action, int pid);
2020-10-29 06:26:31 -07:00
const char *
evisum_ui_icon_cache_find(Ui *ui, const char *cmd);
2020-11-09 05:40:00 -08:00
void
evisum_ui_config_load(Ui *ui);
void
evisum_ui_config_save(Ui *ui);
void
evisum_ui_restart(Ui *ui);
2018-06-04 03:11:21 -07:00
#endif