glib (2.79.0)

(root)/
include/
glib-2.0/
girepository/
gicallableinfo.h
       1  /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
       2   * GObject introspection: Callable
       3   *
       4   * Copyright (C) 2005 Matthias Clasen
       5   * Copyright (C) 2008,2009 Red Hat, Inc.
       6   *
       7   * SPDX-License-Identifier: LGPL-2.1-or-later
       8   *
       9   * This library is free software; you can redistribute it and/or
      10   * modify it under the terms of the GNU Lesser General Public
      11   * License as published by the Free Software Foundation; either
      12   * version 2 of the License, or (at your option) any later version.
      13   *
      14   * This library is distributed in the hope that it will be useful,
      15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17   * Lesser General Public License for more details.
      18   *
      19   * You should have received a copy of the GNU Lesser General Public
      20   * License along with this library; if not, write to the
      21   * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      22   * Boston, MA 02111-1307, USA.
      23   */
      24  
      25  #pragma once
      26  
      27  #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
      28  #error "Only <girepository.h> can be included directly."
      29  #endif
      30  
      31  #include <girepository/gitypes.h>
      32  
      33  G_BEGIN_DECLS
      34  
      35  /**
      36   * GI_IS_CALLABLE_INFO:
      37   * @info: an info structure
      38   *
      39   * Checks if @info is a [class@GIRepository.CallableInfo] or derived from it.
      40   *
      41   * Since: 2.80
      42   */
      43  #define GI_IS_CALLABLE_INFO(info)					\
      44      ((gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_FUNCTION) || \
      45       (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_CALLBACK) || \
      46       (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_SIGNAL) || \
      47       (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_VFUNC))
      48  
      49  
      50  GI_AVAILABLE_IN_ALL
      51  gboolean               gi_callable_info_is_method (GICallableInfo *info);
      52  
      53  GI_AVAILABLE_IN_ALL
      54  gboolean               gi_callable_info_can_throw_gerror (GICallableInfo *info);
      55  
      56  GI_AVAILABLE_IN_ALL
      57  GITypeInfo *           gi_callable_info_get_return_type (GICallableInfo *info);
      58  
      59  GI_AVAILABLE_IN_ALL
      60  void                   gi_callable_info_load_return_type (GICallableInfo *info,
      61                                                            GITypeInfo     *type);
      62  
      63  GI_AVAILABLE_IN_ALL
      64  const gchar *          gi_callable_info_get_return_attribute (GICallableInfo *info,
      65                                                                const gchar    *name);
      66  
      67  GI_AVAILABLE_IN_ALL
      68  gboolean               gi_callable_info_iterate_return_attributes (GICallableInfo   *info,
      69                                                                     GIAttributeIter  *iterator,
      70                                                                     const char      **name,
      71                                                                     const char      **value);
      72  
      73  GI_AVAILABLE_IN_ALL
      74  GITransfer             gi_callable_info_get_caller_owns (GICallableInfo *info);
      75  
      76  GI_AVAILABLE_IN_ALL
      77  gboolean               gi_callable_info_may_return_null (GICallableInfo *info);
      78  
      79  GI_AVAILABLE_IN_ALL
      80  gboolean               gi_callable_info_skip_return     (GICallableInfo *info);
      81  
      82  GI_AVAILABLE_IN_ALL
      83  guint                  gi_callable_info_get_n_args      (GICallableInfo *info);
      84  
      85  GI_AVAILABLE_IN_ALL
      86  GIArgInfo *            gi_callable_info_get_arg         (GICallableInfo *info,
      87                                                           guint           n);
      88  
      89  GI_AVAILABLE_IN_ALL
      90  void                   gi_callable_info_load_arg        (GICallableInfo *info,
      91                                                           guint           n,
      92                                                           GIArgInfo      *arg);
      93  
      94  GI_AVAILABLE_IN_ALL
      95  gboolean               gi_callable_info_invoke          (GICallableInfo    *info,
      96                                                           gpointer           function,
      97                                                           const GIArgument  *in_args,
      98                                                           gsize              n_in_args,
      99                                                           const GIArgument  *out_args,
     100                                                           gsize              n_out_args,
     101                                                           GIArgument        *return_value,
     102                                                           gboolean           is_method,
     103                                                           gboolean           throws,
     104                                                           GError           **error);
     105  
     106  GI_AVAILABLE_IN_ALL
     107  GITransfer             gi_callable_info_get_instance_ownership_transfer (GICallableInfo *info);
     108  
     109  G_END_DECLS