docs: Small improvements to glib-mkenums man page
[glib.git] / glib / glib-private.h
blob31acd93867ac36be14c2cea507721310c8184719
1 /* glib-private.h - GLib-internal private API, shared between glib, gobject, gio
2 * Copyright (C) 2011 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef __GLIB_PRIVATE_H__
19 #define __GLIB_PRIVATE_H__
21 #include <glib.h>
22 #include "gwakeup.h"
23 #include "gstdioprivate.h"
25 #if defined(__GNUC__)
26 # define _g_alignof(type) (__alignof__ (type))
27 #else
28 # define _g_alignof(type) (G_STRUCT_OFFSET (struct { char a; type b; }, b))
29 #endif
31 GMainContext * g_get_worker_context (void);
32 gboolean g_check_setuid (void);
33 GMainContext * g_main_context_new_with_next_id (guint next_id);
35 #ifdef G_OS_WIN32
36 gchar *_glib_get_dll_directory (void);
37 GLIB_AVAILABLE_IN_ALL
38 gchar *_glib_get_locale_dir (void);
39 #endif
41 GDir * g_dir_open_with_errno (const gchar *path, guint flags);
42 GDir * g_dir_new_from_dirp (gpointer dirp);
44 #define GLIB_PRIVATE_CALL(symbol) (glib__private__()->symbol)
46 typedef struct {
47 /* See gwakeup.c */
48 GWakeup * (* g_wakeup_new) (void);
49 void (* g_wakeup_free) (GWakeup *wakeup);
50 void (* g_wakeup_get_pollfd) (GWakeup *wakeup,
51 GPollFD *poll_fd);
52 void (* g_wakeup_signal) (GWakeup *wakeup);
53 void (* g_wakeup_acknowledge) (GWakeup *wakeup);
55 /* See gmain.c */
56 GMainContext * (* g_get_worker_context) (void);
58 gboolean (* g_check_setuid) (void);
59 GMainContext * (* g_main_context_new_with_next_id) (guint next_id);
61 GDir * (* g_dir_open_with_errno) (const gchar *path,
62 guint flags);
63 GDir * (* g_dir_new_from_dirp) (gpointer dirp);
65 /* See glib-init.c */
66 void (* glib_init) (void);
68 /* See gstdio.c */
69 #ifdef G_OS_WIN32
70 int (* g_win32_stat_utf8) (const gchar *filename,
71 GWin32PrivateStat *buf);
73 int (* g_win32_lstat_utf8) (const gchar *filename,
74 GWin32PrivateStat *buf);
76 int (* g_win32_readlink_utf8) (const gchar *filename,
77 gchar *buf,
78 gsize buf_size);
80 int (* g_win32_fstat) (int fd,
81 GWin32PrivateStat *buf);
82 #endif
85 /* Add other private functions here, initialize them in glib-private.c */
86 } GLibPrivateVTable;
88 GLIB_AVAILABLE_IN_ALL
89 GLibPrivateVTable *glib__private__ (void);
91 #endif /* __GLIB_PRIVATE_H__ */