[gnome-shell/wip/clutter-deprecation-fixes: 12/25] st-widget: Copy get_focus_chain from StContainer
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/clutter-deprecation-fixes: 12/25] st-widget: Copy get_focus_chain from StContainer
- Date: Tue, 14 Feb 2012 04:40:07 +0000 (UTC)
commit 5ebc1f637c64e49d2055bc66ee194dd9dfe0123b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Feb 13 19:55:30 2012 -0500
st-widget: Copy get_focus_chain from StContainer
This is a prerequisite to getting rid of StContainer
src/st/st-widget.c | 24 ++++++++++++++++++++++++
src/st/st-widget.h | 5 +++++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index 9522ec6..79145ef 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -772,6 +772,12 @@ st_widget_get_paint_volume (ClutterActor *self,
return TRUE;
}
+static GList *
+st_widget_real_get_focus_chain (StWidget *widget)
+{
+ return clutter_actor_get_children (CLUTTER_ACTOR (widget));
+}
+
static void
st_widget_class_init (StWidgetClass *klass)
@@ -809,6 +815,7 @@ st_widget_class_init (StWidgetClass *klass)
klass->style_changed = st_widget_real_style_changed;
klass->navigate_focus = st_widget_real_navigate_focus;
klass->get_accessible_type = st_widget_accessible_get_type;
+ klass->get_focus_chain = st_widget_real_get_focus_chain;
/**
* StWidget:pseudo-class:
@@ -2527,3 +2534,20 @@ check_labels (StWidgetAccessible *widget_accessible,
ATK_OBJECT (widget_accessible));
}
}
+
+/**
+ * st_widget_get_focus_chain:
+ * @widget: An #StWidget
+ *
+ * Gets a list of the focusable children of @widget, in "Tab"
+ * order. By default, this returns all visible
+ * (as in CLUTTER_ACTOR_IS_VISIBLE()) children of @widget.
+ *
+ * Returns: (element-type Clutter.Actor) (transfer container):
+ * @widget's focusable children
+ */
+GList *
+st_widget_get_focus_chain (StWidget *widget)
+{
+ return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget);
+}
diff --git a/src/st/st-widget.h b/src/st/st-widget.h
index 2ed46b3..e4a57fb 100644
--- a/src/st/st-widget.h
+++ b/src/st/st-widget.h
@@ -86,6 +86,8 @@ struct _StWidgetClass
ClutterActor *from,
GtkDirectionType direction);
GType (* get_accessible_type) (void);
+
+ GList * (* get_focus_chain) (StWidget *widget);
};
GType st_widget_get_type (void) G_GNUC_CONST;
@@ -161,6 +163,9 @@ void st_widget_style_changed (StWidget *widg
StThemeNode * st_widget_get_theme_node (StWidget *widget);
StThemeNode * st_widget_peek_theme_node (StWidget *widget);
+GList * st_widget_get_focus_chain (StWidget *widget);
+
+
/* debug methods */
char *st_describe_actor (ClutterActor *actor);
void st_set_slow_down_factor (gfloat factor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]