2008-07-31 20:08:16 -07:00
|
|
|
#ifndef E_MOD_MAIN_H
|
|
|
|
#define E_MOD_MAIN_H
|
|
|
|
|
2012-11-30 06:38:34 -08:00
|
|
|
#include "e.h"
|
2013-02-23 15:45:12 -08:00
|
|
|
#include "e_mod_mixer.h"
|
2008-07-31 20:08:16 -07:00
|
|
|
|
2012-12-21 15:57:05 -08:00
|
|
|
/* Increment for Major Changes */
|
|
|
|
#define MOD_CONFIG_FILE_EPOCH 1
|
|
|
|
/* Increment for Minor Changes (ie: user doesn't need a new config) */
|
2014-09-16 21:26:45 -07:00
|
|
|
#define MOD_CONFIG_FILE_GENERATION 1
|
2012-12-21 15:57:05 -08:00
|
|
|
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
|
2008-07-31 20:08:16 -07:00
|
|
|
|
|
|
|
typedef struct E_Mixer_Gadget_Config
|
|
|
|
{
|
|
|
|
int lock_sliders;
|
|
|
|
int show_locked;
|
2010-10-17 12:01:50 -07:00
|
|
|
int keybindings_popup;
|
2008-07-31 20:08:16 -07:00
|
|
|
const char *card;
|
|
|
|
const char *channel_name;
|
|
|
|
const char *id;
|
2012-10-31 04:23:26 -07:00
|
|
|
E_Mixer_Channel_State state;
|
2012-09-13 00:43:33 -07:00
|
|
|
Eina_Bool using_default;
|
2008-07-31 20:08:16 -07:00
|
|
|
E_Config_Dialog *dialog;
|
|
|
|
struct E_Mixer_Instance *instance;
|
|
|
|
} E_Mixer_Gadget_Config;
|
|
|
|
|
|
|
|
typedef struct E_Mixer_Module_Config
|
|
|
|
{
|
2009-04-17 13:13:17 -07:00
|
|
|
int version;
|
|
|
|
const char *default_gc_id;
|
|
|
|
Eina_Hash *gadgets;
|
2011-08-31 05:30:56 -07:00
|
|
|
int desktop_notification;
|
2013-12-06 00:52:15 -08:00
|
|
|
int disable_pulse;
|
2014-09-16 21:26:45 -07:00
|
|
|
int external_mixer_enabled;
|
|
|
|
const char *external_mixer_command;
|
2008-07-31 20:08:16 -07:00
|
|
|
} E_Mixer_Module_Config;
|
|
|
|
|
|
|
|
typedef struct E_Mixer_Instance
|
|
|
|
{
|
|
|
|
E_Gadcon_Client *gcc;
|
|
|
|
E_Gadcon_Popup *popup;
|
2010-10-13 03:36:04 -07:00
|
|
|
Ecore_Timer *popup_timer;
|
2008-07-31 20:08:16 -07:00
|
|
|
|
|
|
|
struct
|
2009-04-17 13:13:17 -07:00
|
|
|
{
|
|
|
|
Evas_Object *gadget;
|
|
|
|
Evas_Object *label;
|
|
|
|
Evas_Object *left;
|
|
|
|
Evas_Object *right;
|
|
|
|
Evas_Object *mute;
|
|
|
|
Evas_Object *table;
|
|
|
|
Evas_Object *button;
|
|
|
|
} ui;
|
2008-07-31 20:08:16 -07:00
|
|
|
|
|
|
|
E_Mixer_System *sys;
|
2013-02-27 06:24:30 -08:00
|
|
|
E_Mixer_Channel_Info *channel;
|
2008-07-31 20:08:16 -07:00
|
|
|
E_Mixer_Channel_State mixer_state;
|
|
|
|
E_Mixer_Gadget_Config *conf;
|
2013-01-17 02:47:53 -08:00
|
|
|
|
|
|
|
#ifdef HAVE_ENOTIFY
|
|
|
|
unsigned int notification_id;
|
|
|
|
#endif
|
2008-07-31 20:08:16 -07:00
|
|
|
} E_Mixer_Instance;
|
|
|
|
|
|
|
|
typedef struct E_Mixer_Module_Context
|
|
|
|
{
|
|
|
|
E_Config_DD *module_conf_edd;
|
|
|
|
E_Config_DD *gadget_conf_edd;
|
|
|
|
E_Mixer_Module_Config *conf;
|
|
|
|
E_Config_Dialog *conf_dialog;
|
|
|
|
E_Mixer_Instance *default_instance;
|
2008-10-22 04:49:33 -07:00
|
|
|
Eina_List *instances;
|
2008-07-31 20:08:16 -07:00
|
|
|
E_Dialog *mixer_dialog;
|
2013-12-10 01:48:20 -08:00
|
|
|
double last_act_time;
|
2008-07-31 20:08:16 -07:00
|
|
|
struct st_mixer_actions
|
2009-04-17 13:13:17 -07:00
|
|
|
{
|
|
|
|
E_Action *incr;
|
|
|
|
E_Action *decr;
|
|
|
|
E_Action *mute;
|
|
|
|
} actions;
|
2011-08-31 05:30:56 -07:00
|
|
|
int desktop_notification;
|
2013-12-06 00:52:15 -08:00
|
|
|
int disable_pulse;
|
2014-09-16 21:26:45 -07:00
|
|
|
int external_mixer_enabled;
|
|
|
|
char *external_mixer_command;
|
2008-07-31 20:08:16 -07:00
|
|
|
} E_Mixer_Module_Context;
|
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API extern E_Module_Api e_modapi;
|
|
|
|
E_API void *e_modapi_init(E_Module *m);
|
|
|
|
E_API int e_modapi_shutdown(E_Module *m);
|
|
|
|
E_API int e_modapi_save(E_Module *m);
|
2008-07-31 20:08:16 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
E_Config_Dialog *e_mixer_config_module_dialog_new(Evas_Object *parent, E_Mixer_Module_Context *ctxt);
|
|
|
|
E_Config_Dialog *e_mixer_config_dialog_new(Evas_Object *parent, E_Mixer_Gadget_Config *conf);
|
|
|
|
E_Dialog *e_mixer_app_dialog_new(Evas_Object *parent, void (*func)(E_Dialog *dialog, void *data), void *data);
|
2008-07-31 20:08:16 -07:00
|
|
|
int e_mixer_app_dialog_select(E_Dialog *dialog, const char *card_name, const char *channel_name);
|
|
|
|
|
|
|
|
int e_mixer_update(E_Mixer_Instance *inst);
|
|
|
|
const char *e_mixer_theme_path(void);
|
|
|
|
|
2013-02-16 19:31:45 -08:00
|
|
|
void e_mod_mixer_pulse_ready(Eina_Bool);
|
|
|
|
void e_mod_mixer_pulse_update(void);
|
|
|
|
|
2008-07-31 20:08:16 -07:00
|
|
|
#endif
|