[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [E-devel] Mixer control key bindings
The implementation of the key binding in mixer module is similar to
the implementation in language module. iirc, it was taken exactly from
The idea is, that module has to define the following things:
1) the action, which will be executed on key press, For example
2) the function, which is associated with the action.
3) The 'human readable' name of the action. For example "Mute The
Mixer". This name will appear in keybinding dialog.
4) The keybinding that uses the "mixer_mute" action. Actually this is optional. And has to be
done if you want to have default binding.
5) Finally, you have to do reverse actions on module unload.
1) and 2) are done by those several lines of code:
a = e_action_add("mixer_mute");
if (a) a->func.go = _some_binding_callback_funcition
3) is done basically by calling e_action_predef_name_set function (see
4) You have to define a E_Config_Binding_Key *eb variable and fill it
in with the correct values. After doing that, you have to: (i) insert
eb into e_config->key_bindings, and (ii) call to e_bindings_key_add to
make the binding active. Note, that you have to enclose (i) and (ii)
between e_manager_keys_ungrab() and e_managers_keys_grab() after.
For further information look into language madule e_mod_keybindigs.c
Feel free to contact me on IRC if you need more detailed explanation.
On Fri, Dec 29, 2006 at 04:12:15PM +0100, Nikolas Arend wrote:
> the key bindings for "Decrease/Increase Volume" and "Mute mixer" don't
> seem to work for me (SuSE 10.1). Could somebody give me a short
> explanation of how they are implemented? I guess they are supposed to
> work and it's a problem on my side?
> Thanks a lot, Nick.
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> enlightenment-devel mailing list
Master Degree Student
Free University of Bozen-Bolzano
Faculty of Computer Science
cell phone: +39-3204627049 +370-61278908
firstname.lastname@example.org email@example.com - http://astruk.googlepages.com/home