summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/efl/native/eina.rb2
-rw-r--r--spec/eina_spec.rb7
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/efl/native/eina.rb b/lib/efl/native/eina.rb
index 9c831f7..179c42d 100644
--- a/lib/efl/native/eina.rb
+++ b/lib/efl/native/eina.rb
@@ -46,6 +46,8 @@ module Efl
[ :eina_threads_init, [ ], :int ],
# EAPI int eina_threads_shutdown(void);
[ :eina_threads_shutdown, [ ], :int ],
+ # EAPI Eina_Bool eina_main_loop_is(void);
+ [ :eina_main_loop_is, [ ], :eina_bool ],
]
#
attach_fcts fcts
diff --git a/spec/eina_spec.rb b/spec/eina_spec.rb
index d3db081..296b941 100644
--- a/spec/eina_spec.rb
+++ b/spec/eina_spec.rb
@@ -17,6 +17,13 @@ describe "Efl::Eina #{Efl::Eina.version.full}" do
Efl::Eina.init.should == @i+3
end
#
+ it "should be main thread" do
+ Efl::Eina.main_loop_is.should be_true
+ Thread.new do
+ Efl::Eina.main_loop_is.should be_false
+ end.join
+ end
+ #
it "should shutdown" do
Efl::Eina.shutdown.should == @i+2
Efl::Eina.shutdown.should == @i+1