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

Re: [MiNT] Hotkeys (Was: Re: Background)



Jo Even Skarstein wrote:

> On Thu, 22 Sep 2011 14:09:35 +0200, Helmut Karlowski
> <helmut.karlowski@ish.de> wrote:
>
> > I just changed my mind: It's much better to extend the AES-API for that:
> >
> > Create a new code for appl_control: APC_SYSKEY
> >
> > with modes
> >
> > REQUEST (is it free? if not who owns it?)
> > SET_IF_FREE
> > SET_FORCED
> > RELEASE
> >
> > (the names may change in the implementation)
> >
> > Is there a better place than appl_control?
>
> Maybe appl_options() is better suited for this.
>
> > That would also be easier than to parse those strings in the config.
>
> And much easier for the user, as there's no need to modify config-files.

That seems a little "overdressed" for the job:

int16_t appl_options(int16_t mode, int16_t aopts0, int16_t aopts1, int16_t aopts2, int16_t aopt3, int16_t *out0, int16_t *out1, int16_t *out2, int16_t
*out3);
The purpose of the appl_options function is to let application set/get options available to it, such as the extended [417]objc_edit mode.

Parameter Meaning

mode      Selects the mode. If mode is AOPT_CLEAR (0), then the selected options found in aopt0 - aopt3 are cleared, disabling them. If AOPT_SET (1),
          then the selected option bit is set, enabling them.
aopt0     The first group of 16 options which have the following meaning:

          Bit 0 - AO0_WF_SLIDER
                If this bit is set, blah, blah, yeah.
          Bit 1 - AO0_OBJC_EDIT
                If this options is enabled, [418]objc_edit... blah


I'll see what is best.

> But that can be changed. Key-release events would make hotkeys more
> versatile.
>
> > But taskbar could poll KbShift for that.
>
> Only for modifiers.

To get the same behaviour as the windows-version this would be enough.

> > BTW: Does taskbar call APC_SYSTEM?
>
> No. APC_SYSTEM is undocumented.


Name:         [G»Application control« - Targeted control of applications.
Opcode:       129
Syntax:       int16_t appl_control ( int16_t ap_cid, int16_t ap_cwhat, void *ap_cout);
Description:  The call appl_control can be used to control the activity of applications.

              Parameter Meaning
              ap_cid    The AES ID (apid) of the application you want to control.
              ap_cwhat  The type of control:

                        0 to 9           Reserved for N.AES
                        APC_TOPNEXT (0)  OAESis internal mode
                        APC_KILL (1)     OAESis internal mode
                        APC_SYSTEM (2)   [60]XaAES internal mode


It sets a flag so XaAES knows it's a system-app and it will be skipped
when Ctrl-Alt-Tabbing.

Also this could be needed when the "protected taskbar-area" shall be implemented.



-Helmut