[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Mixer control key bindings



Hi Nick,

The implementation of the key binding in mixer module is similar to
the implementation in language module. iirc, it was taken exactly from
that module.

The idea is, that module has to define the following things:

1) the action, which will be executed on key press, For example
"mixer_mute"
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:

E_Actoin *a;
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
e_action.h)

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
file. 

Feel free to contact me on IRC if you need more detailed explanation.

sndev



On Fri, Dec 29, 2006 at 04:12:15PM +0100, Nikolas Arend wrote:
> Hi,
> 
> 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
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

-- 

Aleksej Struk
Master Degree Student
Free University of Bozen-Bolzano
Faculty of Computer Science
phone: +39-0471-061749
cell phone: +39-3204627049 +370-61278908
astruk@gmail.com alstruk@unibz.it - http://astruk.googlepages.com/home