1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
#include "e.h"
#include "e_mod_system.h"
/* Increment for Major Changes */
#define MOD_CONFIG_FILE_EPOCH 1
/* Increment for Minor Changes (ie: user doesn't need a new config) */
#define MOD_CONFIG_FILE_GENERATION 0
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)
typedef struct E_Mixer_Gadget_Config
{
int lock_sliders;
int show_locked;
int keybindings_popup;
const char *card;
const char *channel_name;
const char *id;
E_Mixer_Channel_State state;
Eina_Bool using_default;
E_Config_Dialog *dialog;
struct E_Mixer_Instance *instance;
} E_Mixer_Gadget_Config;
typedef struct E_Mixer_Module_Config
{
int version;
const char *default_gc_id;
Eina_Hash *gadgets;
int desktop_notification;
} E_Mixer_Module_Config;
typedef struct E_Mixer_Instance
{
E_Gadcon_Client *gcc;
E_Gadcon_Popup *popup;
Ecore_Timer *popup_timer;
struct
{
Evas_Object *gadget;
Evas_Object *label;
Evas_Object *left;
Evas_Object *right;
Evas_Object *mute;
Evas_Object *table;
Evas_Object *button;
} ui;
E_Mixer_System *sys;
E_Mixer_Channel *channel;
E_Mixer_Channel_State mixer_state;
E_Mixer_Gadget_Config *conf;
#ifdef HAVE_ENOTIFY
unsigned int notification_id;
#endif
} 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;
Eina_List *instances;
E_Dialog *mixer_dialog;
struct st_mixer_actions
{
E_Action *incr;
E_Action *decr;
E_Action *mute;
} actions;
int desktop_notification;
} E_Mixer_Module_Context;
typedef int (*E_Mixer_Volume_Set_Cb)(E_Mixer_System *, E_Mixer_Channel *, int, int);
typedef int (*E_Mixer_Volume_Get_Cb)(E_Mixer_System *, E_Mixer_Channel *, int *, int *);
typedef int (*E_Mixer_Mute_Get_Cb)(E_Mixer_System *, E_Mixer_Channel *, int *);
typedef int (*E_Mixer_Mute_Set_Cb)(E_Mixer_System *, E_Mixer_Channel *, int);
typedef int (*E_Mixer_State_Get_Cb)(E_Mixer_System *, E_Mixer_Channel *, E_Mixer_Channel_State *);
typedef int (*E_Mixer_Capture_Cb)(E_Mixer_System *, E_Mixer_Channel *);
typedef void *(*E_Mixer_Cb)();
EAPI extern E_Module_Api e_modapi;
EAPI void *e_modapi_init(E_Module *m);
EAPI int e_modapi_shutdown(E_Module *m);
EAPI int e_modapi_save(E_Module *m);
E_Config_Dialog *e_mixer_config_module_dialog_new(E_Container *con, E_Mixer_Module_Context *ctxt);
E_Config_Dialog *e_mixer_config_dialog_new(E_Container *con, E_Mixer_Gadget_Config *conf);
E_Dialog *e_mixer_app_dialog_new(E_Container *con, void (*func)(E_Dialog *dialog, void *data), void *data);
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);
void e_mixer_default_setup(void);
void e_mixer_pulse_setup(void);
const char *e_mixer_theme_path(void);
void e_mod_mixer_pulse_ready(Eina_Bool);
void e_mod_mixer_pulse_update(void);
extern Eina_Bool _mixer_using_default;
extern E_Mixer_Volume_Get_Cb e_mod_mixer_volume_get;
extern E_Mixer_Volume_Set_Cb e_mod_mixer_volume_set;
extern E_Mixer_Mute_Get_Cb e_mod_mixer_mute_get;
extern E_Mixer_Mute_Set_Cb e_mod_mixer_mute_set;
extern E_Mixer_Capture_Cb e_mod_mixer_mutable_get;
extern E_Mixer_State_Get_Cb e_mod_mixer_state_get;
extern E_Mixer_Capture_Cb e_mod_mixer_capture_get;
extern E_Mixer_Cb e_mod_mixer_new;
extern E_Mixer_Cb e_mod_mixer_del;
extern E_Mixer_Cb e_mod_mixer_channel_default_name_get;
extern E_Mixer_Cb e_mod_mixer_channel_get_by_name;
extern E_Mixer_Cb e_mod_mixer_channel_name_get;
extern E_Mixer_Cb e_mod_mixer_channel_del;
extern E_Mixer_Cb e_mod_mixer_channel_free;
extern E_Mixer_Cb e_mod_mixer_channels_free;
extern E_Mixer_Cb e_mod_mixer_channels_get;
extern E_Mixer_Cb e_mod_mixer_channels_names_get;
extern E_Mixer_Cb e_mod_mixer_card_name_get;
extern E_Mixer_Cb e_mod_mixer_cards_get;
extern E_Mixer_Cb e_mod_mixer_cards_free;
extern E_Mixer_Cb e_mod_mixer_card_default_get;
/**
* @addtogroup Optional_Devices
* @{
*
* @defgroup Module_Mixer Audio Mixer (Volume Control)
*
* Controls the audio volume and mute status for both playback
* (output) and record (input) devices.
*
* Can work with ALSA (http://www.alsa-project.org/) or PulseAudio
* (http://www.pulseaudio.org/).
*
* @}
*/
#endif
|