1
0
Fork 0

stage-window: Add set_accept_focus() vfunc

Allow Stage implementations to set whether or not they want to accept
key focus when being shown.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2500
This commit is contained in:
Emmanuele Bassi 2010-12-28 17:36:27 +00:00
parent 601b958ab1
commit e1cd6f49b2
2 changed files with 18 additions and 0 deletions

View file

@ -168,3 +168,15 @@ _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window)
return TRUE;
}
void
_clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
gboolean accept_focus)
{
ClutterStageWindowIface *iface;
g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window));
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->set_accept_focus)
iface->set_accept_focus (window, accept_focus);
}

View file

@ -63,6 +63,9 @@ struct _ClutterStageWindowIface
ClutterGeometry *stage_rectangle);
gboolean (* has_redraw_clips) (ClutterStageWindow *stage_window);
gboolean (* ignoring_redraw_clips) (ClutterStageWindow *stage_window);
void (* set_accept_focus) (ClutterStageWindow *stage_window,
gboolean accept_focus);
};
GType clutter_stage_window_get_type (void) G_GNUC_CONST;
@ -97,6 +100,9 @@ void _clutter_stage_window_add_redraw_clip (ClutterStageWindow *w
gboolean _clutter_stage_window_has_redraw_clips (ClutterStageWindow *window);
gboolean _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window);
void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
gboolean accept_focus);
G_END_DECLS
#endif /* __CLUTTER_STAGE_WINDOW_H__ */