1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 module gdk
is pkgconfig
"gtk+-3.0"
22 // Callback to Task::gdk_main
23 gboolean nit_gdk_callback_task(gpointer user_data) {
24 Task_decr_ref(user_data);
25 return Task_gdk_main(user_data);
32 # Small unit of code executed by the GDK loop when idle
34 # Returns `true` if this object should be invoked again.
42 # Add a callback to execute whenever there are no higher priority events pending
43 fun gdk_threads_add_idle
(task
: Task): Int import Task.gdk_main
`{
45 return gdk_threads_add_idle(&nit_gdk_callback_task, task);