2010-05-31 22:41:45 +02:00
|
|
|
/* -*- Mode: C; c-file-style: "gnu"; -*- */
|
|
|
|
/* GObject introspection: Private headers
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Johan Dahlin
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIREPOSITORY_PRIVATE_H__
|
|
|
|
#define __GIREPOSITORY_PRIVATE_H__
|
|
|
|
|
2010-06-07 04:22:57 +02:00
|
|
|
#include <ffi.h>
|
2010-05-31 22:41:45 +02:00
|
|
|
#include <glib.h>
|
|
|
|
|
2010-06-07 04:22:57 +02:00
|
|
|
#define __GIREPOSITORY_H_INSIDE__
|
|
|
|
|
2010-06-01 15:23:46 +02:00
|
|
|
#include <gibaseinfo.h>
|
2010-06-01 15:15:12 +02:00
|
|
|
#include <girepository.h>
|
2010-06-01 15:23:46 +02:00
|
|
|
#include <gitypelib.h>
|
2010-05-31 22:41:45 +02:00
|
|
|
|
|
|
|
typedef struct _GIRealInfo GIRealInfo;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* We just use one structure for all of the info object
|
|
|
|
* types; in general, we should be reading data directly
|
|
|
|
* from the typelib, and not having computed data in
|
|
|
|
* per-type structures.
|
|
|
|
*/
|
|
|
|
struct _GIRealInfo
|
|
|
|
{
|
|
|
|
/* Keep this part in sync with GIUnresolvedInfo below */
|
|
|
|
gint32 type;
|
|
|
|
gint32 ref_count;
|
|
|
|
GIRepository *repository;
|
|
|
|
GIBaseInfo *container;
|
|
|
|
|
|
|
|
/* Resolved specific */
|
|
|
|
|
2010-08-31 22:36:06 +02:00
|
|
|
GITypelib *typelib;
|
2010-05-31 22:41:45 +02:00
|
|
|
guint32 offset;
|
|
|
|
|
|
|
|
guint32 type_is_embedded : 1; /* Used by GITypeInfo */
|
|
|
|
guint32 reserved : 31;
|
|
|
|
|
|
|
|
gpointer reserved2[4];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GIUnresolvedInfo
|
|
|
|
{
|
|
|
|
/* Keep this part in sync with GIBaseInfo above */
|
|
|
|
gint32 type;
|
|
|
|
gint32 ref_count;
|
|
|
|
GIRepository *repository;
|
|
|
|
GIBaseInfo *container;
|
|
|
|
|
|
|
|
/* Unresolved specific */
|
|
|
|
|
|
|
|
const gchar *name;
|
|
|
|
const gchar *namespace;
|
|
|
|
};
|
|
|
|
|
|
|
|
void _g_info_init (GIRealInfo *info,
|
|
|
|
GIInfoType type,
|
|
|
|
GIRepository *repository,
|
|
|
|
GIBaseInfo *container,
|
2010-08-31 22:36:06 +02:00
|
|
|
GITypelib *typelib,
|
2010-05-31 22:41:45 +02:00
|
|
|
guint32 offset);
|
|
|
|
|
|
|
|
GIBaseInfo * _g_info_from_entry (GIRepository *repository,
|
2010-08-31 22:36:06 +02:00
|
|
|
GITypelib *typelib,
|
2010-05-31 22:41:45 +02:00
|
|
|
guint16 index);
|
|
|
|
|
2010-06-05 17:11:58 +02:00
|
|
|
GIBaseInfo * _g_info_new_full (GIInfoType type,
|
|
|
|
GIRepository *repository,
|
|
|
|
GIBaseInfo *container,
|
2010-08-31 22:36:06 +02:00
|
|
|
GITypelib *typelib,
|
2010-06-05 17:11:58 +02:00
|
|
|
guint32 offset);
|
|
|
|
|
|
|
|
GITypeInfo * _g_type_info_new (GIBaseInfo *container,
|
2010-08-31 22:36:06 +02:00
|
|
|
GITypelib *typelib,
|
2010-06-05 17:11:58 +02:00
|
|
|
guint32 offset);
|
|
|
|
|
|
|
|
void _g_type_info_init (GIBaseInfo *info,
|
|
|
|
GIBaseInfo *container,
|
2010-08-31 22:36:06 +02:00
|
|
|
GITypelib *typelib,
|
2010-06-05 17:11:58 +02:00
|
|
|
guint32 offset);
|
|
|
|
|
2010-06-07 00:52:12 +02:00
|
|
|
GIFunctionInfo * _g_base_info_find_method (GIBaseInfo *base,
|
|
|
|
guint32 offset,
|
|
|
|
gint n_methods,
|
|
|
|
const gchar *name);
|
|
|
|
|
|
|
|
GIVFuncInfo * _g_base_info_find_vfunc (GIRealInfo *rinfo,
|
|
|
|
guint32 offset,
|
|
|
|
gint n_vfuncs,
|
|
|
|
const gchar *name);
|
2010-05-31 22:41:45 +02:00
|
|
|
|
2010-12-13 13:53:55 +01:00
|
|
|
gboolean _g_callable_info_invoke (GICallableInfo *info,
|
|
|
|
gpointer function,
|
|
|
|
const GIArgument *in_args,
|
|
|
|
int n_in_args,
|
|
|
|
const GIArgument *out_args,
|
|
|
|
int n_out_args,
|
|
|
|
GIArgument *return_value,
|
|
|
|
gboolean is_method,
|
|
|
|
gboolean throws,
|
|
|
|
GError **error);
|
|
|
|
|
2010-07-28 14:01:33 +02:00
|
|
|
extern ffi_status ffi_prep_closure_loc (ffi_closure *,
|
|
|
|
ffi_cif *,
|
|
|
|
void (*fun)(ffi_cif *, void *, void **, void *),
|
|
|
|
void *user_data,
|
|
|
|
void *codeloc);
|
|
|
|
extern void *ffi_closure_alloc (size_t size, void **code);
|
|
|
|
extern void ffi_closure_free (void *);
|
|
|
|
|
|
|
|
|
2010-05-31 22:41:45 +02:00
|
|
|
#endif /* __GIREPOSITORY_PRIVATE_H__ */
|