2005-04-18 07:33:24 -07:00
|
|
|
#ifndef E_MOD_MAIN_H
|
|
|
|
#define E_MOD_MAIN_H
|
|
|
|
|
|
|
|
typedef struct _Status Status;
|
|
|
|
typedef struct _Config Config;
|
|
|
|
|
2008-11-24 00:32:34 -08:00
|
|
|
#define CPUFREQ_CONFIG_VERSION 1
|
|
|
|
|
2005-04-18 07:33:24 -07:00
|
|
|
struct _Status
|
|
|
|
{
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *frequencies;
|
|
|
|
Eina_List *governors;
|
2006-04-20 04:30:25 -07:00
|
|
|
int cur_frequency;
|
2012-10-01 10:40:43 -07:00
|
|
|
#ifdef __OpenBSD__
|
|
|
|
int cur_percent;
|
|
|
|
#endif
|
2010-11-29 02:52:32 -08:00
|
|
|
int cur_min_frequency;
|
|
|
|
int cur_max_frequency;
|
2006-04-20 04:30:25 -07:00
|
|
|
int can_set_frequency;
|
|
|
|
char *cur_governor;
|
2008-11-24 00:32:34 -08:00
|
|
|
const char *orig_governor;
|
2006-04-20 04:30:25 -07:00
|
|
|
unsigned char active;
|
2005-04-18 07:33:24 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Config
|
|
|
|
{
|
2006-04-20 04:30:25 -07:00
|
|
|
/* saved * loaded config values */
|
2008-11-24 00:32:34 -08:00
|
|
|
int config_version;
|
2008-01-10 23:33:57 -08:00
|
|
|
int poll_interval;
|
|
|
|
int restore_governor;
|
2008-11-24 00:32:34 -08:00
|
|
|
int auto_powersave;
|
|
|
|
const char *powersave_governor;
|
2008-01-10 23:33:57 -08:00
|
|
|
const char *governor;
|
2006-04-20 04:30:25 -07:00
|
|
|
/* just config state */
|
2008-01-10 23:33:57 -08:00
|
|
|
E_Module *module;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *instances;
|
2008-01-10 23:33:57 -08:00
|
|
|
E_Menu *menu;
|
|
|
|
E_Menu *menu_poll;
|
|
|
|
E_Menu *menu_governor;
|
|
|
|
E_Menu *menu_frequency;
|
2008-11-24 00:32:34 -08:00
|
|
|
E_Menu *menu_powersave;
|
2008-01-10 23:33:57 -08:00
|
|
|
Status *status;
|
|
|
|
char *set_exe_path;
|
|
|
|
Ecore_Poller *frequency_check_poller;
|
2008-11-24 00:32:34 -08:00
|
|
|
Ecore_Event_Handler *handler;
|
2005-04-18 07:33:24 -07:00
|
|
|
};
|
|
|
|
|
2005-12-27 09:16:58 -08:00
|
|
|
EAPI extern E_Module_Api e_modapi;
|
2005-09-23 10:13:47 -07:00
|
|
|
|
2006-06-06 08:33:44 -07:00
|
|
|
EAPI void *e_modapi_init (E_Module *m);
|
2006-05-09 06:02:48 -07:00
|
|
|
EAPI int e_modapi_shutdown (E_Module *m);
|
|
|
|
EAPI int e_modapi_save (E_Module *m);
|
2005-04-18 07:33:24 -07:00
|
|
|
|
2012-01-19 15:25:32 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @addtogroup Optional_Gadgets
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @defgroup Module_CPUFreq CPU Frequency Monitor
|
|
|
|
*
|
|
|
|
* Monitors CPU frequency and may do actions given some thresholds.
|
|
|
|
*
|
|
|
|
* @see Module_Temperature
|
|
|
|
* @see Module_Battery
|
|
|
|
* @}
|
|
|
|
*/
|
2005-04-18 07:33:24 -07:00
|
|
|
#endif
|