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

Re: Is there any way to match a key event against key binding rules for GtkTextView class without creating a GtkTextView object?



Can anybody give me some suggestions about this issue?

On Fri, Jul 24, 2009 at 5:16 PM, Zhe Su <james su gmail com> wrote:

> Hi,
>   GtkTextView widget can use key binding rules defined in gtkrc file. For
> example, when Emacs key theme is selected, ctrl-w will be mapped to
> cut-clipboard signal. Now, I'm developing a custom widget and want to handle
> those key bindings supported by GtkTextView. After reading the source code
> of gtkwidget, I found that gtk_bindings_activate_event() is used for
> matching activating key bindings for a specific object. However this
> function can only match and activate key bindings explicitly defined for a
> specific object type. So if I want to match and activate all key bindings
> supported by GtkTextView, a GtkTextView object must be used when calling
> this function. Now the question is: is it possible to retrieve the
> information of all key bindings defined for GtkTextView and apply them to my
> custom widget, so that  gtk_bindings_activate_event() can work with my
> custom widget object as if it's a GtkTextView object?
>
> Regards
> James Su
>


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