MxFocusable

MxFocusable

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── MxFocusable

Known Implementations

MxFocusable is implemented by MxBin, MxBoxLayout, MxButton, MxComboBox, MxDialog, MxEntry, MxExpander, MxFrame, MxItemView, MxKineticScrollView, MxListView, MxMenu, MxNotebook, MxOffscreen, MxPathBar, MxScrollBar, MxScrollView, MxSlider, MxStack, MxTable, MxToolbar and MxViewport.

Description

Functions

mx_focusable_move_focus ()

MxFocusable *
mx_focusable_move_focus (MxFocusable *focusable,
                         MxFocusDirection direction,
                         MxFocusable *from);

Move the focus

Parameters

focusable

A MxFocusable

 

direction

A MxFocusDirection

 

from

focusable to move the focus from

 

Returns

the newly focused focusable.

[transfer none]


mx_focusable_accept_focus ()

MxFocusable *
mx_focusable_accept_focus (MxFocusable *focusable,
                           MxFocusHint hint);

Accept the focus

Parameters

focusable

A MxFocusable

 

hint

A MxFocusHint

 

Returns

the focusable.

[transfer none]


mx_focus_hint_from_direction ()

MxFocusHint
mx_focus_hint_from_direction (MxFocusDirection direction);

Transforms a focus direction to a focus hint. This is a convenience function for actors that implement the MxFocusable interface, to pass the correct MxFocusHint to their children when calling mx_focusable_accept_focus().

MX_FOCUS_DIRECTION_UP maps to MX_FOCUS_HINT_FROM_BELOW, MX_FOCUS_DIRECTION_DOWN maps to MX_FOCUS_HINT_FROM_ABOVE, MX_FOCUS_DIRECTION_LEFT maps to MX_FOCUS_HINT_FROM_RIGHT, MX_FOCUS_DIRECTION_RIGHT maps to MX_FOCUS_HINT_FROM_LEFT, MX_FOCUS_DIRECTION_NEXT maps to MX_FOCUS_HINT_FIRST, MX_FOCUS_DIRECTION_PREVIOUS maps to MX_FOCUS_HINT_LAST and anything else maps to MX_FOCUS_HINT_PRIOR.

Parameters

direction

A MxFocusDirection

 

Returns

A MxFocusHint

Since: 1.2

Types and Values

enum MxFocusDirection

Members

MX_FOCUS_DIRECTION_OUT

   

MX_FOCUS_DIRECTION_UP

   

MX_FOCUS_DIRECTION_DOWN

   

MX_FOCUS_DIRECTION_LEFT

   

MX_FOCUS_DIRECTION_RIGHT

   

MX_FOCUS_DIRECTION_NEXT

   

MX_FOCUS_DIRECTION_PREVIOUS

   

enum MxFocusHint

Members

MX_FOCUS_HINT_FIRST

   

MX_FOCUS_HINT_LAST

   

MX_FOCUS_HINT_PRIOR

   

MX_FOCUS_HINT_FROM_ABOVE

   

MX_FOCUS_HINT_FROM_BELOW

   

MX_FOCUS_HINT_FROM_LEFT

   

MX_FOCUS_HINT_FROM_RIGHT

   

MxFocusable

typedef struct _MxFocusable MxFocusable;

This is an opaque structure whose members cannot be directly accessed.


struct MxFocusableIface

struct MxFocusableIface {
  GObjectClass parent_class;

  MxFocusable* (*accept_focus) (MxFocusable *focusable,
                                MxFocusHint  hint);
  MxFocusable* (*move_focus)   (MxFocusable      *focusable,
                                MxFocusDirection  direction,
                                MxFocusable      *from);
};