Re: atk_action_get_keybindings



Bill,

Firstly, I address your question about actions on menubar items. Both menu bar 
and menu are implemented by GtkMenuShell so a menubar item can be regarded as 
similar to a menu item in that it has one action which is to activate it; in the 
case of a menubar item this displays the menu associated with it.

I summarize what I believe might be in scope for keybindings and hopefully you 
are indicate what you believe is in scope.

There are three separate mechanisms which can be used when a user uses the 
keyboard:

bindings
accelerators
mnemonics

For the purposes of this mail I restrict myself to menus and menubars which are 
both implemented using GtkMenuShell.

gtk_menu_shell_class_init defines three binding

GDK_Escape which activates the cancel signal
GDK_Return ) both of which activate the current menu item
GDK_Space  )

A menu item may have an accelerator or a mnemonic or both.

For accelerators, an accelerator group GtkAccelGroup is created and attached to 
a window. A accelerator is associated with a menu item using 
gtk_widget_add-acclerator(). This function specifies the accelerator, the signal 
to be emitted and the accelerator key, e.g. GDK_F1.

A mnemonic is associated; normally a lable is a child of a menu item. A mnemonic 
is a character, typically displayed with an underscore and if pressed on the 
keyboard will activate the menu item.


Padraig

> Delivered-To: gnome-accessibility-list gnome org
> X-Accept-Language: en
> MIME-Version: 1.0
> To: "Padraig O'Briain" <Padraig Obriain sun com>
> Cc: Gnome-accessibility-list gnome org
> Subject: Re: atk_action_get_keybindings
> Content-Transfer-Encoding: 7bit
> X-BeenThere: gnome-accessibility-list gnome org
> X-Loop: gnome-accessibility-list gnome org
> X-Mailman-Version: 2.0beta5
> List-Id: GNOME accessibility development <gnome-accessibility-list.gnome.org>
> 
> Padraig O'Briain wrote:
> > 
> > Bill,
> > 
> > Can you give me an example of an action which has a keybinding and what the
> > keybinding is?
> > 
> > Padraig
> > 
> 
> Hi Padraig:
> 
> A button or GtkListItem with a keyboard mnemonic would be an example:
> in the case of a button with a keyboard shortcut, the action (usually
> "click" whose description might be gleaned from the button
> description) is where the keybinding is associated.
> 
> Likewise the File menubar item might have an "activate" action with
> keybinding "Alt-F".  I am not as familiar as you at this point with
> which "actions" make sense to expose on menubar items, but the
> appropriate action would be one which causes the menu to drop down as
> well as the word "file" to be highlighted.
> 
> The idea is that all UI elements that "do" something (other than
> display themselves, change their own appearance, or do something else
> that is not directly application-task-oriented) expose actions.  These
> actions have three uses as I see it:
> 
> 1) you can find out which AtkObjects "do" something when interacted
> with, and get descriptions of their "actions"
> 
> 2) you can find out if the AtkObjects have "workalike" keybindings for
> mouseless activation;
> 
> 3) you can actually invoke those actions via an alternate mechanism.
> 
> This last may be hard for a few cases like HTML form buttons but if we
> can get #3 working then we eliminate the need for ATs to do hacky
> things like synthesize mouse events, etc.
> 
> -Bill
> 
> > >
> > > >The comments on AtkAction Intreface describe it as basic support for
> > > >accelerators. Could Marc or Bill give me some idea of what is intended
> > > >here as
> > > >currently I have no idea what is intended?
> > > >
> > > >***
> > > I'll have to defer to Bill on this one-- my understanding is that 
AtkAction
> > > has been expanded to include a function called GetAccelerator, which needs
> > > to be supported on the GtkWidget level.
> > > ***
> > >
> > >
> 
> -- 
> --------------
> Bill Haneman
> Gnome Accessibility / Batik SVG Toolkit
> Sun Microsystems Ireland
> 
> _______________________________________________
> Gnome-accessibility-list mailing list
> Gnome-accessibility-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-list





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