Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-06 08:41:16

0001 /* GLIB - Library of useful routines for C programming
0002  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 /*
0021  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
0022  * file for a list of people on the GLib Team.  See the ChangeLog
0023  * files for a list of changes.  These files are distributed with
0024  * GLib at ftp://ftp.gtk.org/pub/gtk/.
0025  */
0026 
0027 #ifndef __G_DEPRECATED_MAIN_H__
0028 #define __G_DEPRECATED_MAIN_H__
0029 
0030 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0031 #error "Only <glib.h> can be included directly."
0032 #endif
0033 
0034 #include <glib/gmain.h>
0035 
0036 G_BEGIN_DECLS
0037 
0038 /* ============== Compat main loop stuff ================== */
0039 
0040 /**
0041  * g_main_new:
0042  * @is_running: set to %TRUE to indicate that the loop is running. This
0043  *     is not very important since calling g_main_run() will set this
0044  *     to %TRUE anyway.
0045  *
0046  * Creates a new #GMainLoop for th default main context.
0047  *
0048  * Returns: a new #GMainLoop
0049  *
0050  * Deprecated: 2.2: Use g_main_loop_new() instead
0051  */
0052 #define         g_main_new(is_running)  g_main_loop_new (NULL, is_running) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_new)
0053 
0054 /**
0055  * g_main_run:
0056  * @loop: a #GMainLoop
0057  *
0058  * Runs a main loop until it stops running.
0059  *
0060  * Deprecated: 2.2: Use g_main_loop_run() instead
0061  */
0062 #define         g_main_run(loop)        g_main_loop_run(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_run)
0063 
0064 /**
0065  * g_main_quit:
0066  * @loop: a #GMainLoop
0067  *
0068  * Stops the #GMainLoop.
0069  * If g_main_run() was called to run the #GMainLoop, it will now return.
0070  *
0071  * Deprecated: 2.2: Use g_main_loop_quit() instead
0072  */
0073 #define g_main_quit(loop)       g_main_loop_quit(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_quit)
0074 
0075 /**
0076  * g_main_destroy:
0077  * @loop: a #GMainLoop
0078  *
0079  * Frees the memory allocated for the #GMainLoop.
0080  *
0081  * Deprecated: 2.2: Use g_main_loop_unref() instead
0082  */
0083 #define g_main_destroy(loop)    g_main_loop_unref(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_unref)
0084 
0085 /**
0086  * g_main_is_running:
0087  * @loop: a #GMainLoop
0088  *
0089  * Checks if the main loop is running.
0090  *
0091  * Returns: %TRUE if the main loop is running
0092  *
0093  * Deprecated: 2.2: Use g_main_loop_is_running() instead
0094  */
0095 #define g_main_is_running(loop) g_main_loop_is_running(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_is_running)
0096 
0097 /**
0098  * g_main_iteration:
0099  * @may_block: set to %TRUE if it should block (i.e. wait) until an event
0100  *     source becomes ready. It will return after an event source has been
0101  *     processed. If set to %FALSE it will return immediately if no event
0102  *     source is ready to be processed.
0103  *
0104  * Runs a single iteration for the default #GMainContext.
0105  *
0106  * Returns: %TRUE if more events are pending.
0107  *
0108  * Deprecated: 2.2: Use g_main_context_iteration() instead.
0109  */
0110 #define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_iteration)
0111 
0112 /**
0113  * g_main_pending:
0114  *
0115  * Checks if any events are pending for the default #GMainContext
0116  * (i.e. ready to be processed).
0117  *
0118  * Returns: %TRUE if any events are pending.
0119  *
0120  * Deprecated: 2.2: Use g_main_context_pending() instead.
0121  */
0122 #define g_main_pending()            g_main_context_pending (NULL) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_pending)
0123 
0124 /**
0125  * g_main_set_poll_func:
0126  * @func: the function to call to poll all file descriptors
0127  *
0128  * Sets the function to use for the handle polling of file descriptors
0129  * for the default main context.
0130  *
0131  * Deprecated: 2.2: Use g_main_context_set_poll_func() again
0132  */
0133 #define g_main_set_poll_func(func)  g_main_context_set_poll_func (NULL, func) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_set_poll_func)
0134 
0135 G_END_DECLS
0136 
0137 #endif /* __G_DEPRECATED_MAIN_H__ */