Blame gobject/gtype-private.h

Packit ae235b
/* GObject - GLib Type, Object, Parameter and Signal Library
Packit ae235b
 * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
Packit ae235b
 *
Packit ae235b
 * This library is free software; you can redistribute it and/or
Packit ae235b
 * modify it under the terms of the GNU Lesser General Public
Packit ae235b
 * License as published by the Free Software Foundation; either
Packit ae235b
 * version 2.1 of the License, or (at your option) any later version.
Packit ae235b
 *
Packit ae235b
 * This library is distributed in the hope that it will be useful,
Packit ae235b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit ae235b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit ae235b
 * Lesser General Public License for more details.
Packit ae235b
 *
Packit ae235b
 * You should have received a copy of the GNU Lesser General
Packit ae235b
 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
Packit ae235b
 */
Packit ae235b
#ifndef __G_TYPE_PRIVATE_H__
Packit ae235b
#define __G_TYPE_PRIVATE_H__
Packit ae235b
Packit ae235b
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
Packit ae235b
#error "Only <glib-object.h> can be included directly."
Packit ae235b
#endif
Packit ae235b
Packit ae235b
#include "gboxed.h"
Packit ae235b
#include "gclosure.h"
Packit ae235b
Packit ae235b
/*< private >
Packit ae235b
 * GOBJECT_IF_DEBUG:
Packit ae235b
 * @debug_type: Currently only OBJECTS and SIGNALS are supported.
Packit ae235b
 * @code_block: Custom debug code.
Packit ae235b
 *
Packit ae235b
 * A convenience macro for debugging GObject.
Packit ae235b
 * This macro is only used internally.
Packit ae235b
 */
Packit ae235b
#ifdef G_ENABLE_DEBUG
Packit ae235b
#define GOBJECT_IF_DEBUG(debug_type, code_block) \
Packit ae235b
G_STMT_START { \
Packit ae235b
    if (_g_type_debug_flags & G_TYPE_DEBUG_ ## debug_type) \
Packit ae235b
      { code_block; } \
Packit ae235b
} G_STMT_END
Packit ae235b
#else   /* !G_ENABLE_DEBUG */
Packit ae235b
#define GOBJECT_IF_DEBUG(debug_type, code_block)
Packit ae235b
#endif  /* G_ENABLE_DEBUG */
Packit ae235b
Packit ae235b
G_BEGIN_DECLS
Packit ae235b
Packit ae235b
extern GTypeDebugFlags _g_type_debug_flags;
Packit ae235b
Packit ae235b
typedef struct _GRealClosure  GRealClosure;
Packit ae235b
struct _GRealClosure
Packit ae235b
{
Packit ae235b
  GClosureMarshal meta_marshal;
Packit ae235b
  gpointer meta_marshal_data;
Packit ae235b
  GVaClosureMarshal va_meta_marshal;
Packit ae235b
  GVaClosureMarshal va_marshal;
Packit ae235b
  GClosure closure;
Packit ae235b
};
Packit ae235b
Packit ae235b
#define G_REAL_CLOSURE(_c) \
Packit ae235b
  ((GRealClosure *)G_STRUCT_MEMBER_P ((_c), -G_STRUCT_OFFSET (GRealClosure, closure)))
Packit ae235b
Packit ae235b
void    _g_value_c_init          (void); /* sync with gvalue.c */
Packit ae235b
void    _g_value_types_init      (void); /* sync with gvaluetypes.c */
Packit ae235b
void    _g_enum_types_init       (void); /* sync with genums.c */
Packit ae235b
void    _g_param_type_init       (void); /* sync with gparam.c */
Packit ae235b
void    _g_boxed_type_init       (void); /* sync with gboxed.c */
Packit ae235b
void    _g_object_type_init      (void); /* sync with gobject.c */
Packit ae235b
void    _g_param_spec_types_init (void); /* sync with gparamspecs.c */
Packit ae235b
void    _g_value_transforms_init (void); /* sync with gvaluetransform.c */
Packit ae235b
void    _g_signal_init           (void); /* sync with gsignal.c */
Packit ae235b
Packit ae235b
/* for gboxed.c */
Packit ae235b
gpointer        _g_type_boxed_copy      (GType          type,
Packit ae235b
                                         gpointer       value);
Packit ae235b
void            _g_type_boxed_free      (GType          type,
Packit ae235b
                                         gpointer       value);
Packit ae235b
void            _g_type_boxed_init      (GType          type,
Packit ae235b
                                         GBoxedCopyFunc copy_func,
Packit ae235b
                                         GBoxedFreeFunc free_func);
Packit ae235b
Packit ae235b
gboolean    _g_closure_is_void (GClosure       *closure,
Packit ae235b
				gpointer        instance);
Packit ae235b
gboolean    _g_closure_supports_invoke_va (GClosure       *closure);
Packit ae235b
void        _g_closure_set_va_marshal (GClosure       *closure,
Packit ae235b
				       GVaClosureMarshal marshal);
Packit ae235b
void        _g_closure_invoke_va (GClosure       *closure,
Packit ae235b
				  GValue /*out*/ *return_value,
Packit ae235b
				  gpointer        instance,
Packit ae235b
				  va_list         args,
Packit ae235b
				  int             n_params,
Packit ae235b
				  GType          *param_types);
Packit ae235b
Packit ae235b
/**
Packit ae235b
 * _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE:
Packit ae235b
 *
Packit ae235b
 * See also G_DEFINE_TYPE_EXTENDED().  This macro is generally only
Packit ae235b
 * necessary as a workaround for classes which have properties of
Packit ae235b
 * object types that may be initialized in distinct threads.  See:
Packit ae235b
 * https://bugzilla.gnome.org/show_bug.cgi?id=674885
Packit ae235b
 *
Packit ae235b
 * Currently private.
Packit ae235b
 */
Packit ae235b
#define _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE(TN, t_n, T_P, _f_, _P_, _C_)	    _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE (TN, t_n, T_P) {_P_;} _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER (TN, t_n, T_P, _f_){_C_;} _G_DEFINE_TYPE_EXTENDED_END()
Packit ae235b
Packit ae235b
G_END_DECLS
Packit ae235b
Packit ae235b
#endif /* __G_TYPE_PRIVATE_H__ */