From 9cad8c4bcefd9714c6f43ec6046bc5dea4d0a0f7 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sun, 22 Aug 2004 14:52:05 +0000 Subject: [PATCH] Implemented Window#focus. --- src/ecore_x/rb_window.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ecore_x/rb_window.c b/src/ecore_x/rb_window.c index d17817a..80aeda6 100644 --- a/src/ecore_x/rb_window.c +++ b/src/ecore_x/rb_window.c @@ -1,5 +1,5 @@ /* - * $Id: rb_window.c 85 2004-08-22 11:53:57Z tilman $ + * $Id: rb_window.c 87 2004-08-22 14:52:05Z tilman $ * * Copyright (C) 2004 ruby-ecore team (see AUTHORS) * @@ -186,6 +186,15 @@ static VALUE c_reparent (VALUE self, VALUE other, VALUE x, VALUE y) return Qnil; } +static VALUE c_focus (VALUE self) +{ + GET_OBJ (self, RbWindow, win); + + ecore_x_window_focus (win->real); + + return Qnil; +} + static VALUE c_move (VALUE self, VALUE x, VALUE y) { GET_OBJ (self, RbWindow, win); @@ -367,6 +376,7 @@ void Init_Window (void) rb_define_method (cWindow, "raise", c_raise, 0); rb_define_method (cWindow, "lower", c_lower, 0); rb_define_method (cWindow, "reparent", c_reparent, 3); + rb_define_method (cWindow, "focus", c_focus, 0); rb_define_method (cWindow, "move", c_move, 2); rb_define_method (cWindow, "resize", c_resize, 2); rb_define_method (cWindow, "size", c_size_get, 0); -- 2.30.2